Login to your Kraken account and click Settings.
Then select API
Click on Generate New Key button
After clicking Generate New Key, make sure to give permission for Query Funds
Click on Generate Key button
After the message "New API key generated successfully" you can add them in Coin Stats
Please also note that in security settings two-factor authentication for API keys must be set to "No method" in order to be able to sync with Coin Stats.
Now go to Coin Stats app Altfolio tab, scroll far to the right and click Add new portfolio by Selecting Exchange (API KEYS).
Click QR and scan the QR code presented by Kraken or copy/past your KEY and Secret Manually.
After clicking Add you will see your Kraken portfolio synced with the Coin Stats app.