Exchanges
The following section refers to APIs related to initializing and processing currency exchange as well as getting the actual currency rates
You can use these APIs to get latest rates and to perform currency exchange.
Get currency rates
GET /v1/fx/rates
Get actual currency rates for exchange
Requires the X-Api-Key and X-Api-Secret headers.
Parameters
fromCurrencyrequired query · stringtoCurrencyrequired query · string
Responses
200 Latest fx rate
fromCurrencystringBase currency
toCurrencystringTarget currency
ratenumberCurrent exchange rate from base to target currency
400 The request is malformed or failed validation
traceIdstringtimestampstringcodeinteger · int32messagestringcausearray of ValidationCauseShow fields
fieldstringcausestringcauseKeystring
401 Missing or invalid API credentials, or invalid request signature
traceIdstringtimestampstringcodeinteger · int32messagestringcausearray of ValidationCauseShow fields
fieldstringcausestringcauseKeystring
409 The request conflicts with the merchant setup or the current state of the resource
traceIdstringtimestampstringcodeinteger · int32messagestringcausearray of ValidationCauseShow fields
fieldstringcausestringcauseKeystring
429 Rate limit exceeded
traceIdstringtimestampstringcodeinteger · int32messagestringcausearray of ValidationCauseShow fields
fieldstringcausestringcauseKeystring
500 Unexpected error
traceIdstringtimestampstringcodeinteger · int32messagestringcausearray of ValidationCauseShow fields
fieldstringcausestringcauseKeystring
Get currency rates (signed POST)
POST /v1/fx/rates
Same as GET /v1/fx/rates, with the currency pair in a signed JSON body
Requires the X-Api-Key and X-Api-Secret headers.
Parameters
X-Signatureheader · stringX-Signature-Key-Idheader · string
Request body
fromCurrencyrequired stringBase currency
toCurrencyrequired stringTarget currency
Responses
200 Latest fx rate
fromCurrencystringBase currency
toCurrencystringTarget currency
ratenumberCurrent exchange rate from base to target currency
400 The request is malformed or failed validation
traceIdstringtimestampstringcodeinteger · int32messagestringcausearray of ValidationCauseShow fields
fieldstringcausestringcauseKeystring
401 Missing or invalid API credentials, or invalid request signature
traceIdstringtimestampstringcodeinteger · int32messagestringcausearray of ValidationCauseShow fields
fieldstringcausestringcauseKeystring
409 The request conflicts with the merchant setup or the current state of the resource
traceIdstringtimestampstringcodeinteger · int32messagestringcausearray of ValidationCauseShow fields
fieldstringcausestringcauseKeystring
429 Rate limit exceeded
traceIdstringtimestampstringcodeinteger · int32messagestringcausearray of ValidationCauseShow fields
fieldstringcausestringcauseKeystring
500 Unexpected error
traceIdstringtimestampstringcodeinteger · int32messagestringcausearray of ValidationCauseShow fields
fieldstringcausestringcauseKeystring
Currency exchange
POST /v1/exchange
Exchange funds between two of your currency accounts. Identify each side by currency or by account ID. Use Get currency rates for an indicative rate.
Requires the X-Api-Key and X-Api-Secret headers.
Parameters
X-Signatureheader · stringX-Signature-Key-Idheader · string
Request body
fromCurrencystringCurrency to exchange from. Required if
fromAccountIdis missingfromAccountIdinteger · int64Source account. Required if
fromCurrencyis missingtoCurrencystringCurrency to exchange to. Required if
toAccountIdis missingtoAccountIdinteger · int64Destination account. Required if
toCurrencyis missingfromAmountrequired numberAmount to exchange, in the source currency
Responses
201 Exchange created
transactionIdinteger · int64Platform transaction ID
statusstringStatus of the transaction - PROCESSED, FAILED, etc.
feenumberTransaction fee for exchange
feeCurrencystringCurrency of transaction fee
ratenumberCurrent exchange rate from base currency to target currency
rateCurrencystringThe currency of the exchange rate.
fromCurrencystringBase currency for exchange.
toCurrencystringCurrency to which base currency is converted.
fromAmountnumberAmount in base currency.
toAmountnumberAmount in exchanged currency.
400 The request is malformed or failed validation
traceIdstringtimestampstringcodeinteger · int32messagestringcausearray of ValidationCauseShow fields
fieldstringcausestringcauseKeystring
401 Missing or invalid API credentials, or invalid request signature
traceIdstringtimestampstringcodeinteger · int32messagestringcausearray of ValidationCauseShow fields
fieldstringcausestringcauseKeystring
409 The request conflicts with the merchant setup or the current state of the resource
traceIdstringtimestampstringcodeinteger · int32messagestringcausearray of ValidationCauseShow fields
fieldstringcausestringcauseKeystring
429 Rate limit exceeded
traceIdstringtimestampstringcodeinteger · int32messagestringcausearray of ValidationCauseShow fields
fieldstringcausestringcauseKeystring
500 Unexpected error
traceIdstringtimestampstringcodeinteger · int32messagestringcausearray of ValidationCauseShow fields
fieldstringcausestringcauseKeystring