getBalance: retrieve an account balance

Retrieve an account balance with its account key. Please don’t call this method more than once every 30 seconds, and use a memory/disk cached value instead.

Method: POST
Content-type: application-json

Request properties

clientKeyStringYesClient account key

Request example

curl -i -H "Accept: application/json" \
     -H "Content-Type: application/json" \
     -X POST -d '{ "clientKey":"YOUR_API_KEY" }' \

Response structure

errorIdIntegerError identifier. 0 – no errors, operation completed successfully.
>1 – error identifier. Error code and short description transferred in errorCode and errorDescription properties.
errorCodeStringAn error code, won’t be included in the output if request produced no errors. See errors list for reference.
errorDescriptionStringShort description of the error
balanceDoubleAccount balance value in USD

Response example

JSON with no errors

    "errorId": 0,
    "balance": 12.3456

JSON with an error

    "errorId": 1,
    "errorCode": "ERROR_KEY_DOES_NOT_EXIST",
    "errorDescription": "Account authorization key not found in the system"