Skip to main content

Create currency exchange quote

Endpoint accepts idempotency-key header to prevent the same quote from being created twice. In case of a duplicate request, the error code DUPLICATE_CURRENCY_EXCHANGE_QUOTE containing the id of the original quote (currencyExchangeQuoteId) will be returned. The key should be a random v4 UUID to avoid false collisions.

Required scopes:

  • partner.currency-exchange-quote.create

Query Parameters
maxBuyFallback boolean
Header Parameters
idempotency-key uuid
Request Body REQUIRED
sell string REQUIRED

Possible values: [BTC, USD, EUR, USDT, GBP]

Currency to sell.

buy string REQUIRED

Possible values: [BTC, USD, EUR, USDT, GBP]

Currency to buy.

amount object REQUIRED

Amount and currency to convert. The currency must match either buy or sell. FeePolicy defaults to EXCLUSIVE.

amount string REQUIRED

Currency amount in decimal format

currency string REQUIRED

Possible values: [BTC, USD, EUR, USDT, GBP]

Currency code

feePolicy string

Possible values: [INCLUSIVE, EXCLUSIVE]

Should the fee be included in the amount or added on top of it.

Responses
200

OK

Schema OPTIONAL
id uuid

ID of the exchange quote.

created date-time

Date and time when the exchange quote was created.

validUntil date-time

Date and time when the exchange quote expires.

source object

Amount sold.

amount string

Currency amount in decimal format

currency string

Possible values: [BTC, USD, EUR, USDT, GBP]

Currency code

target object

Amount bought.

amount string

Currency amount in decimal format

currency string

Possible values: [BTC, USD, EUR, USDT, GBP]

Currency code

fee object

Service fee. The user will be charged this amount on top of what the source specifies.

amount string

Currency amount in decimal format

currency string

Possible values: [BTC, USD, EUR, USDT, GBP]

Currency code

conversionRate object

Conversion rate used for the transaction.

amount string

Currency amount in decimal format

sourceCurrency string

Possible values: [BTC, USD, EUR, USDT, GBP]

Source currency code

targetCurrency string

Possible values: [BTC, USD, EUR, USDT, GBP]

Target currency code

state string

Possible values: [NEW, PENDING, COMPLETED, FAILED]

State of the currency exchange quote.

completed date-time OPTIONAL

Timestamp at which the exchange was completed.