This guide walks you through connecting Mercado Bitcoin to your Parfin account. This assumes that you already have a valid administrator account in Parfin and that you have a valid and verified Mercado Bitcoin account.

1. Preparing Parfin

As an administrator, log into your Parfin account, go to “Counterparties” and click “Connect Counterparty”
Select “Exchange” from the tabs, select “Mercado Bitcoin” from the dropdown
Give this connection any name (this name will show up across your account)

2. Creating a Write-Read key

Leave Parfin open in a tab, and in a new tab log in to Mercado Bitcoin and go to the “Chaves de API de Negociações” screen
Where it says “Criar uma nova chave”, enter any name (e.g. “Parfin Transactional”) and press the button
Once the system confirms that a new key has been created, enter your PIN under “Lista de Chaves' and click the button “OK”
Find the key you just created and make sure that it says “Acesso Total” near the green icon. If it says “Apenas Leitura” then click on the green icon to change it to “Acesso Total”
Copy the string next to “Identificador” and paste it in the Parfin window under “Write-Read Keys” (this could be referred to as “API ID” in Parfin)
Do the same with the string next to “Segredo” (this could also be referred to as “API Secret” in Parfin)

3. Creating a Read-only key

Leave Parfin open in a tab, and in a new tab log in to Mercado Bitcoin and go to the “Chaves de API de Negociações” screen
Where it says “Criar uma nova chave”, enter any name (e.g. “Parfin Transactional”) and press the button
Once the system confirms that a new key has been created, enter your PIN under “Lista de Chaves' and click the button “OK”
Find the key you just created and make sure that it says “Apenas Leitura” near the green icon. If it says “Acesso Total” then click on the green icon to change it to “Apenas Leitura”
Copy the string next to “Identificador” and paste it in the Parfin window under “Read-Only Keys” (this could be referred to as “API ID” in Parfin)
Do the same with the string next to “Segredo” (this could also be referred to as “API Secret” in Parfin)

4. Finishing Up

Back in Parfin click on “Connect”. If any error is shown, check the keys you copied & pasted and if necessary repeat steps 2 and 3 above.
After successful setup and a success message, you are able to see a correct balance on Dashboard.

5. Creating Whitelisted Withdrawal addresses in MercadoBitcoin

NOTE: For extra security, we highly recommend deleting any other whitelisted addresses from your MercadoBitcoin account and only leaving the Parfin ones.

For BTC:

Go back to MercadoBitcoin and open the Cadastro de Endereços screen
Under “Incluir novo endereço” in the “Nome” field enter the name “Parfin BTC” (without the quotes). Be careful to enter it exactly as shown here, otherwise, it will not work.
Select Bitcoin from the dropdown 
Go back to Parfin and in the “Counterparties” page, copy your internal wallet BTC address
Go back to MercadoBitcoin and paste this address under “Endereço”.
Press “Salvar”

For ETH:

Go back to MercadoBitcoin and open the Cadastro de Endereços screen
Repeat all the steps above under “For BTC” but replace BTC for ETH

Note 2: It may be necessary to approve the new whitelisted address via email, this will be an email from MercadoBitcoin asking for approval.

6. OPTIONAL - Test Sending a Transaction

Go to the Parfin dashboard, click on “Create Transaction” and create a transaction to send money from your MercadoBitcoin to your Parfin Internal Wallet. Do this for both BTC and ETH to make sure everything is working

Congratulations, your new connection to MercadoBitcoin is completed!