/v2/balances/{currency}

GET

Get the balance for a currency from the account of the authenticating user.

The API responses shown below are static. If you want to try out the API please login, or register for an API key

API parameters

Required
NameInTypeDescription
X-Auth-Token header string Authentication token.
currency path string Three-digit currency code.
Optional
NameInTypeDescription
on_behalf_of query string Contact UUID.
curl -X GET  --header "X-Auth-Token: XXXX-XXXXX-XXXX"  https://devapi.currencycloud.com/v2/balances/{currency}

Response

{
    "id": "4e33f858-7f51-477d-9a15-aaa852f2a59e",
    "account_id": "72970a7c-7921-431c-b95f-3438724ba16f",
    "currency": "GBP",
    "amount": "96673.46",
    "created_at": "2018-04-18T12:30:40+00:00",
    "updated_at": "2018-08-10T16:35:05+00:00"
}
Error Codes
HTTP Status Code Description Params
400 invalid_currency XYZ is not a valid ISO 4217 currency code
currency_is_in_invalid_format currency is not a valid ISO 4217 currency code { "type" => "currency" }
on_behalf_of_is_not_valid_uuid on_behalf_of should be in UUID format
on_behalf_of_self You cannot act on behalf of your own Contact
contact_not_found Contact was not found for this id
unsupported_currency Unsupported currency XYZ
401 invalid_supplied_credentials Authentication failed with the supplied credentials
429 too_many_requests Too many requests have been made to the api. Please refer to the Developer Center for more information
500 internal_server_error Internal server error
503 service_unavailable Service is temporary unavailable
Was this page helpful?
Yes
No