Just a note for the API docs:
https://www.kraken.com/help/api#get-account-balancesays:
Result: array of asset names and balance amount
but returns:
{"error":[],"result":{"XXBT":"0.4000000000"}}
Probably should say:
Result: object of asset name and balance amount pairs
I'd highly recommend putting example JSON responses in for every API method, helps speed up debugging :-)