Skip to main content
POST
Quote a swap and build its transaction

Authorizations

X-API-Key
string
header
required

Body

application/json
market
string
required

Base58-encoded market address.

Example:

"u8tnfCb1JSSghuNFquQ2beStYgAN1kmd1f1Lhxbaec4"

maxSlippageBps
integer
required

Maximum allowed slippage in basis points.

Required range: x >= 0
side
enum<string>
required

Trade side.

Available options:
buy,
sell
size
string
required

Amount to trade (decimal string). Interpretation depends on swapMode.

accountOwner
string | null

The wallet that owns the ArcherAccount this request acts through. With platform it derives the account PDA server-side — you never handle a PDA. Omit for a plain wallet-owned book. Replaces the earlier archerAccount field, which is no longer read.

platform
enum<string> | null
default:self

Platform namespace for accountOwner. Ignored unless accountOwner is set.

Available options:
self,
treadfi
preflight
boolean | null
default:false

Simulate the built transaction before returning it, and reject with the program's reason if it would fail (insufficient balance, slippage, liquidity gone, unauthorised signer). Off by default: a transaction is otherwise returned whether or not the signer could land it right now, which callers that build at quote time rely on. Ignored without signer.

priorityFeeMicroLamports
integer<int64>

Priority fee for the transaction's compute-budget instruction, in micro-lamports per compute unit. Omitted → the server default.

Example:

50000

signer
string

The wallet that signs the swap: the taker, or with accountOwner the account's owner or delegate. Omit for a quote only: the response then carries quoteResponse and no transaction, and the caller's own maker books (if any) cannot be excluded from the quote. Existing clients may keep sending it as takerAddress; send one name only.

swapMode
enum<string>

Controls how size is interpreted. When omitted, size is in base tokens.

Available options:
MaxAmountIn,
MinAmountOut
withInstructions
boolean | null
default:false

Also return the unsigned instructions under instructions, for composing your own transaction instead of signing ours. Omitted or false leaves the response exactly as it was.

Response

The quote, and the transaction when a taker was named.

A swap quote and, when a taker was named, the unsigned transaction built from it. quoteResponse comes from the same engine run as the transaction.

addressLookupTables
string[]
required

Address lookup tables the transaction references. None are configured; always empty today.

quoteResponse
object
required

A swap quote. Amounts are what actually leaves and enters the taker's wallet — protocol and builder fees and any Token-2022 transfer fees included — computed by the same engine, over the same maker books in the same order, that POST /v1/orders/build executes.

swapMode
enum<string>
required

The effective mode, including the default applied when swapMode was omitted.

Available options:
MaxAmountIn,
MinAmountOut
transaction
string | null
required

Base64-encoded unsigned Solana transaction for the taker to sign and submit. null when the request carried no signer.

instructions
object | null

Unsigned instructions, present only when the request set withInstructions.