Given a partial order compute the minimum fee and a price estimate for
the order. The response includes base order parameters in quote, plus
quote metadata such as expiration and id.
If your integration applies client-side slippage or partner fees before signing, recompute the signing amounts before you create the order.
Related docs:
The order parameters to compute a quote for.
Choose one request shape based on two decisions: how you specify the order size, and whether expiry is relative (validFor) or absolute (validTo).
Use sellAmountBeforeFee when you want to quote from a total sell budget, sellAmountAfterFee when you already know the exact sell amount that should land on the order, or buyAmountAfterFee when you want an exact buy target.
sell The total amount that is available for the order. From this value, the fee is deducted and the buy amount is calculated.
"1234567890"
ERC-20 token to be sold
"0x6810e776880c02933d47db1b9fc05908e5386b96"
ERC-20 token to be bought
"0x6810e776880c02933d47db1b9fc05908e5386b96"
20 byte Ethereum address encoded as a hex with 0x prefix.
"0x6810e776880c02933d47db1b9fc05908e5386b96"
Number (uint32) of seconds that the order should be valid for.
An optional address to receive the proceeds of the trade instead of the
owner (i.e. the order signer).
"0x6810e776880c02933d47db1b9fc05908e5386b96"
The hash of the stringified JSON appData doc.
If present, appData field must be set with the aforementioned
data where this hash is derived from.
In case they differ, the call will fail.
"0x0000000000000000000000000000000000000000000000000000000000000000"
Where should the sellToken be drawn from?
erc20, internal, external Where should the buyToken be transferred to?
erc20, internal How good should the price estimate be?
Fast: The price estimate is chosen among the fastest N price estimates. Optimal: The price estimate is chosen among all price estimates. Verified: The price estimate is chosen among all verified/simulated price estimates.
NOTE: Orders are supposed to be created from verified or optimal
price estimates.
fast, optimal, verified How was the order signed?
eip712, ethsign, presign, eip1271 Flag to signal whether the order is intended for on-chain order placement. Only valid for non ECDSA-signed orders."
User provided timeout in milliseconds. Can only be used to reduce the response time for quote requests if the default is too slow as values greater than the default will be capped to the default. Note that reducing the timeout can result in worse quotes because the reduced timeout might be too slow for some price estimators.
Quoted order parameters and quote metadata.
An order quote returned by the backend, including base order parameters
plus quote metadata such as expiration and id.
If your integration applies client-side slippage or partner fees before signing, recompute the signing amounts before order creation.
The quoted order parameters returned by the backend. These values can be signed directly only if they are submitted unchanged. If you apply client-side slippage or partner fees, recompute the signing amounts first.
Expiration date of the offered fee. Order service might not accept the fee after this expiration date. Encoded as ISO 8601 UTC.
"1985-03-10T18:35:18.814523Z"
Whether it was possible to verify that the quoted amounts are accurate using a simulation.
The address of the trader for whom the quote was requested.
"0x6810e776880c02933d47db1b9fc05908e5386b96"
Quote ID linked to a quote to enable providing more metadata when analysing order slippage.
Protocol fee in basis points (e.g., "2" for 0.02%). This represents the volume-based fee policy. Only present when a volume fee is configured.
"2"