This guide walks you through connecting Kraken to your Parfin account. This assumes that you already have a valid administrator account in Parfin and that you have a valid and verified Kraken 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 “Kraken” from the dropdown
Give this connection any name (this name will show up across your account)



2. Account ID

Go to Kraken > Settings > Account in the top right of the main screen

Copy the Public Account ID, which should be similar to this: AA04 N84D QWL6 RZOH

Paste it in the Parfin window under "Account ID", and make sure to delete all spaces of the account ID, for example, AA04N84DQWL6RZOH

3. Creating a Read-only key

Go back to Kraken > Security > API >  “Add key” button. Enter any name in “Key description”.
In “Nonce Window” enter the number 30000
Make sure you ONLY TICK the following boxes (and leave the rest un-selected): 
Query Funds
Query Open Orders & Trades
Query Closed Orders & Trades
Query Ledger Entries
Press “Generate Key” once the above is done
Copy the “API Key” and paste it in the Parfin window under “Read Only Keys” 
Do the same with the “API-Secret” key

4. Creating a Transactional key

Go back to Kraken > Security > API > API Key Management
Click on the “Generate New Key” button. Enter any name in “key description”.
In “Nonce Window” enter the number 30
Tick all boxes under “Funds”, “Order & Trades” and “Ledger”
Press “Generate Key” once the above is done
Copy the “API Key” and paste it in the Parfin window under “Write-Read Keys” 
Do the same with the “Private Key”

5. Finishing Up

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

6. Creating Whitelisted Withdrawal addresses in Kraken

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

For BTC:

Go back to Kraken and open the Funding > Withdrawal page for BTC
Click in “Add Address”
In “Description”, enter “Parfin BTC” (without the quotes). Be careful to enter it exactly as shown here, otherwise, it will not work.
Go back to Parfin and on the “Counterparties” page, copy your internal wallet BTC address.
Go back to Kraken and paste this address under “Bitcoin Address”. 
Press “Save Address”

For ETH:

Go back to Kraken and open the Funding > Withdrawal page for ETH
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 Kraken asking for approval.

7. OPTIONAL - Test Sending a Transaction

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

Congratulations, your new connection to Kraken is completed!