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

fromCurrency required query · string
toCurrency required query · string

Responses

200 Latest fx rate
fromCurrency string

Base currency

toCurrency string

Target currency

rate number

Current exchange rate from base to target currency

400 The request is malformed or failed validation
traceId string
timestamp string
code integer · int32
message string
cause array of ValidationCause
Show fields
field string
cause string
causeKey string
401 Missing or invalid API credentials, or invalid request signature
traceId string
timestamp string
code integer · int32
message string
cause array of ValidationCause
Show fields
field string
cause string
causeKey string
409 The request conflicts with the merchant setup or the current state of the resource
traceId string
timestamp string
code integer · int32
message string
cause array of ValidationCause
Show fields
field string
cause string
causeKey string
429 Rate limit exceeded
traceId string
timestamp string
code integer · int32
message string
cause array of ValidationCause
Show fields
field string
cause string
causeKey string
500 Unexpected error
traceId string
timestamp string
code integer · int32
message string
cause array of ValidationCause
Show fields
field string
cause string
causeKey string

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-Signature header · string
X-Signature-Key-Id header · string

Request body

fromCurrency required string

Base currency

toCurrency required string

Target currency

Responses

200 Latest fx rate
fromCurrency string

Base currency

toCurrency string

Target currency

rate number

Current exchange rate from base to target currency

400 The request is malformed or failed validation
traceId string
timestamp string
code integer · int32
message string
cause array of ValidationCause
Show fields
field string
cause string
causeKey string
401 Missing or invalid API credentials, or invalid request signature
traceId string
timestamp string
code integer · int32
message string
cause array of ValidationCause
Show fields
field string
cause string
causeKey string
409 The request conflicts with the merchant setup or the current state of the resource
traceId string
timestamp string
code integer · int32
message string
cause array of ValidationCause
Show fields
field string
cause string
causeKey string
429 Rate limit exceeded
traceId string
timestamp string
code integer · int32
message string
cause array of ValidationCause
Show fields
field string
cause string
causeKey string
500 Unexpected error
traceId string
timestamp string
code integer · int32
message string
cause array of ValidationCause
Show fields
field string
cause string
causeKey string

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-Signature header · string
X-Signature-Key-Id header · string

Request body

fromCurrency string

Currency to exchange from. Required if fromAccountId is missing

fromAccountId integer · int64

Source account. Required if fromCurrency is missing

toCurrency string

Currency to exchange to. Required if toAccountId is missing

toAccountId integer · int64

Destination account. Required if toCurrency is missing

fromAmount required number

Amount to exchange, in the source currency

Responses

201 Exchange created
transactionId integer · int64

Platform transaction ID

status string

Status of the transaction - PROCESSED, FAILED, etc.

fee number

Transaction fee for exchange

feeCurrency string

Currency of transaction fee

rate number

Current exchange rate from base currency to target currency

rateCurrency string

The currency of the exchange rate.

fromCurrency string

Base currency for exchange.

toCurrency string

Currency to which base currency is converted.

fromAmount number

Amount in base currency.

toAmount number

Amount in exchanged currency.

400 The request is malformed or failed validation
traceId string
timestamp string
code integer · int32
message string
cause array of ValidationCause
Show fields
field string
cause string
causeKey string
401 Missing or invalid API credentials, or invalid request signature
traceId string
timestamp string
code integer · int32
message string
cause array of ValidationCause
Show fields
field string
cause string
causeKey string
409 The request conflicts with the merchant setup or the current state of the resource
traceId string
timestamp string
code integer · int32
message string
cause array of ValidationCause
Show fields
field string
cause string
causeKey string
429 Rate limit exceeded
traceId string
timestamp string
code integer · int32
message string
cause array of ValidationCause
Show fields
field string
cause string
causeKey string
500 Unexpected error
traceId string
timestamp string
code integer · int32
message string
cause array of ValidationCause
Show fields
field string
cause string
causeKey string