Skip to main content
POST
Quote Swap
Returns the fee, the amount converted and the amount you’ll receive. A quote doesn’t reserve the rate or your balance. To run the swap, call POST /wallet/swap with the same body.

Authorizations

X-Api-Key
string
header
required

Your API key (yativo_pk_...) from Developers → API Keys. Send together with X-Api-Secret.

X-Api-Secret
string
header
required

Your API secret (yativo_sk_...), shown once when the key is created.

Headers

Idempotency-Key
string
required

A unique string per request to ensure idempotent processing.

Body

application/json
from_currency
string
required

Currency of the wallet to debit.

Example:

"USD"

to_currency
string
required

Currency of the wallet to credit. Must differ from from_currency.

Example:

"USDC"

amount
number
required

Amount to swap in from_currency, including the fee. Must be greater than 0.

Example:

1000

idempotency_key
string

POST /wallet/swap only. Alternative to the Idempotency-Key header.

Maximum string length: 100

Response

Swap quote

status
string
Example:

"success"

status_code
integer
Example:

200

message
string
Example:

"Request successful"

data
object