/v2/balances/top_up_margin

POST

Tops up the Margin Balance

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 formData string Currency to top up.
amount formData string Amount to top up.
Optional
NameInTypeDescription
on_behalf_of formData string Contact UUID.
curl -X POST  --header "X-Auth-Token: XXXX-XXXXX-XXXX"  https://devapi.currencycloud.com/v2/balances/top_up_margin

Response

{
    "account_id": "72970a7c-7921-431c-b95f-3438724ba16f",
    "currency": "GBP",
    "transferred_amount": "100.00"
}
Error Codes
HTTP Status Code Description Params
400 currency_is_required currency is required
currency_is_in_invalid_format currency is in invalid format { "type" => "currency" }
amount_is_required amount is required
amount_type_is_wrong amount should be of numeric_greater_than_zero type { "type" => "numeric_greater_than_zero" }
on_behalf_of_self You cannot act on behalf of your own Contact
contact_not_found Contact was not found for this id
on_behalf_of_is_not_valid_uuid on_behalf_of should be in UUID format
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