Skip to main content
POST
Create a Treasury conversion quote

What this endpoint does

Creates an exact, short-lived quote to convert between AUD and an enabled stablecoin in this tenant account.

When to use it

Create it after the user chooses a direction and source amount, then display its all-in rate, fee, source debit, destination amount, and expiry for review alongside the available source balance from the balances endpoint. The quote always returns the settlement network it was struck on; the console stores the returned quote ID internally.

Before you call

Use a secret API key with treasury:write. The pair must be enabled and the source amount must meet current limits. Converting AUD to a stablecoin requires settlementNetwork — the chain the purchased stablecoin is settled onto, and therefore the chain you will hold and withdraw it on. There is no default: omitting it fails with settlement_network_required, a chain Wayex cannot receive on fails with unsupported_asset_network, and a chain that differs from a route Wayex has pinned for that asset fails with conversion_route_conflict. Converting a stablecoin to AUD does not need the field — that direction routes by the balance you already hold, and a supplied value is only an override.

Money and balance effect

Creating a quote does not reserve or move money. The source wallet is checked and reserved only when the quote is accepted.

States and completion

A quote is usable until its expiry. If it expires or no longer passes acceptance checks, create a fresh quote rather than altering it.

Safe retries

Send a unique Idempotency-Key for the logical action. If the response is lost, retry the same payload with the same key; never create a new key merely because the first response timed out. Read Conversions and withdrawals for the complete workflow.

Authorizations

Authorization
string
header
required

Send the same Wayex API key as Authorization: Bearer <key>.

Headers

Idempotency-Key
string
required

A unique key for this logical action. Reuse the same key and identical payload when retrying after an unknown response.

Required string length: 8 - 255

Body

application/json
sourceAsset
enum<string>
required
Available options:
AUD,
USDC,
USDT
destinationAsset
enum<string>
required
Available options:
AUD,
USDC,
USDT
externalReference
string
required
Minimum string length: 1
settlementNetwork
enum<string>

Physical settlement network. REQUIRED when sourceAsset is AUD — the chain the purchased stablecoin is settled onto. Optional routing override when converting a stablecoin to AUD.

Available options:
ethereum,
base,
arbitrum,
optimism,
polygon,
bsc,
avalanche,
solana,
tron
sourceAmount
string

The amount to convert, denominated in the source asset. Supply exactly one of sourceAmount / destinationAmount.

Pattern: ^\d+(\.\d+)?$
destinationAmount
string

The amount to receive, denominated in the destination asset — book an exact destination figure (e.g. AUD) and Wayex derives the required source amount. Supply exactly one of sourceAmount / destinationAmount.

Pattern: ^\d+(\.\d+)?$

Response

201 - application/json
id
string
required
Minimum string length: 1
clientId
string
required
Minimum string length: 1
externalReference
string
required
Minimum string length: 1
source
object
required
destination
object
required
settlementNetwork
enum<string>
required
Available options:
ethereum,
base,
arbitrum,
optimism,
polygon,
bsc,
avalanche,
solana,
tron
rate
string
required
Pattern: ^\d+(\.\d+)?$
fee
object
required
sourceDebit
object
required
configurationId
string
required
Minimum string length: 1
expiresAt
string<date-time>
required
createdAt
string<date-time>
required