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 :-)
They're referring to them like PHP associative arrays, although I suppose it would be clearer to call them objects because they're JSON objects.