Skip to main content
POST
Get a quote

Authorizations

x-definitive-api-key
string
header
default:dpka_513a2bd7_57a2_46d2_927b_2a3857fe271b
required

Your Definitive API key.

Body

application/json
targetChain
enum<string>
required

Chain of the target (traded) asset. May differ from contraChain for a cross-chain market order.

Available options:
arbitrum,
avalanche,
base,
bsc,
ethereum,
optimism,
polygon,
solana,
hyperevm,
plasma,
monad,
robinhood,
ink,
arc
Example:

"ethereum"

contraChain
enum<string>
required

Chain of the contra (counter) asset. May differ from targetChain for a cross-chain market order.

Available options:
arbitrum,
avalanche,
base,
bsc,
ethereum,
optimism,
polygon,
solana,
hyperevm,
plasma,
monad,
robinhood,
ink,
arc
Example:

"ethereum"

targetAsset
string
required

Address of the target (traded) asset.

Minimum string length: 1
Example:

"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"

contraAsset
string
required

Address of the contra (counter) asset — spent on buys, received on sells.

Minimum string length: 1
Example:

"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"

side
enum<string>
required

direction of the order

Available options:
buy,
sell
Example:

"buy"

qty
string
required

Amount of the asset being spent (sold), as a decimal string in the asset's normalized units. For buy orders this is in contraAsset units; for sell orders this is in targetAsset units.

Example:

"1.5"

orderType
enum<string>
required

Order type. Cross-chain orders support market only.

Available options:
market,
limit,
twap,
stop,
stop-loss,
take-profit,
bracket
Example:

"market"

quickTrade
boolean

Execution mode for sniping newly launched tokens (exclusive to same-chain market swaps; not supported cross-chain). Reach out to the Definitive team to find out whether QuickTrade is a good fit for your use case.

maxSlippage
string

Slippage tolerance as a decimal (e.g. 0.05 = 5%). When omitted, our engine sets a slippage at order admission.

maxPriceImpact
string

Maximum price impact as a decimal (e.g. 0.05 = 5%). When omitted, our engine applies the order-type-specific default at admission.

limitNotionalPrice
string

USD limit price for the traded (targetAsset) asset. Required for limit orders unless limitCrossPrice is set; optional for twap, stop, stop-loss, and take-profit (trigger orders are promoted to the corresponding LIMIT variant).

Example:

"4000"

limitCrossPrice
string

Pair-rate limit price — how many contraAsset units one targetAsset unit is worth. Frame is the same on buy and sell. Mutually exclusive with limitNotionalPrice; either satisfies the limit-price requirement.

Example:

"4000"

funderAddress
string

Wallet that funds the spent asset on the source chain. The source is contraChain for buys and targetChain for sells.

recipientAddress
string

Address that receives funds on the destination chain. Required when targetChain and contraChain differ.

evmUsePermit2
boolean

EVM only. When true, forces the Permit2 signing flow instead of the Flash settlement contract flow. When false or omitted, the server picks the flow from the funder's on-chain state — typically the Flash settlement contract flow. Recommended when forceMinimalAllowance is set. Reach out to the Definitive team to discuss whether to populate this flag.

forceMinimalAllowance
boolean

When true, ERC-20 approvals or Permit2 permits to FlashAllowance and Solana SPL delegations use the cumulative amount required for this quote and outstanding orders at quote acquisition (concurrent quotes do not reserve allowance). Existing authorization is reused only when it exactly equals the cumulative amount; otherwise a replacement approval, permit, or delegation sized to that amount is returned, so unlimited or oversized grants are revoked on the next order. ERC-20 approval to Permit2 remains unlimited. Recommended with evmUsePermit2 on EVM; see Minimal authorization. Defaults to false. With attachedBracket, the pair's authorization on the received asset is sized to its signed maximum plus the funder's other open orders on that asset.

svmUseNativeSOL
boolean

Quote-only Solana native-SOL intent. When true, a spent So11111111111111111111111111111111111111112 asset is treated as native SOL and the quote returns instructions to wrap the full spend amount into wSOL before signing/submitting. When false or omitted, So11111111111111111111111111111111111111112 is treated as an ordinary wSOL SPL token balance.

flashIntegratorFeeBps
string

Integrator fee in basis points (100 = 1%). Maximum 1000 (10%).

Example:

"100"

expireTime
string<date-time>

ISO-8601 expiry. Optional for LIMIT and trigger orders (omit for good-til-cancelled).

Example:

"2026-05-12T00:00:00Z"

startTime
string<date-time>

TWAP only. ISO-8601 scheduled execution start. durationSeconds is measured from this time.

Example:

"2026-05-12T00:00:00Z"

durationSeconds
integer

TWAP only. Required for TWAP; minimum 300 (5 minutes).

Required range: x >= 300
Example:

1800

twapBucketCount
integer

TWAP only. Number of equal-time buckets. Omit to let the server auto-derive.

Required range: 2 <= x <= 2560
Example:

12

triggers
object[]

Price triggers. Each entry requires exactly one of notionalPrice (USD) or crossPrice (pair rate). Required for stop / stop-loss / take-profit (length 1) and bracket (length 2, opposite triggerTypes).

Maximum array length: 2
attachedBracket
object

Attach a take-profit / stop-loss pair to the order. The pair protects what the order receives: when a leg's trigger is reached it sells the received asset (at market, or at the leg's limitPrice), and the order stops filling. Supported for market, limit, and twap orders on same-chain quotes; requires funderAddress. The response then carries a second signing payload under attachedBracket.

Response

Quote generated successfully

quoteId
string
required
Example:

"q_abc123"

orderType
enum<string>
required

bracket is a standalone take-profit / stop-loss pair on an asset the funder already holds: side: "sell", exactly two triggers with opposite triggerType, a fixed qty, no limit price. A funder may hold any number of brackets on an asset, each with its own qty.

Available options:
market,
limit,
twap,
stop,
stop-loss,
take-profit,
bracket
side
enum<string>
required
Available options:
buy,
sell
targetAsset
string
required
Example:

"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"

contraAsset
string
required
Example:

"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"

from
object
required

The spent leg. asset is contra on buys and target on sells.

to
object
required

The received (net, post-fee) leg. asset is target on buys and contra on sells.

fees
object
required
estimatedPriceImpact
string | null
required

Estimated price impact as a decimal (e.g. 0.0042 = 0.42%). Null when the quote produced no estimate. Can exceed the request's maxPriceImpact, which applies at fill time.

Example:

"0.0042"

wrap
object | null
required

Set when the quote request spends the chain's native gas asset and a pre-trade wrap is needed. On EVM, the spent side is quoted as the wrapped-native token and wrap.evmTx must be sent before submit. On Solana, quotes with svmUseNativeSOL=true include wrap.svmInstructions that wrap the full spend amount into wSOL before signing/submitting. Null otherwise.

evm
object | null
required

EVM funding and signing actions. Present when the spent (source) asset is on an EVM chain; null when it is on SVM.

svm
object | null
required

SVM funding and signing actions. Present when the spent (source) asset is on Solana; null when it is on EVM.

bridgeQuoteId
string | null

Cross-chain bridge quote identifier. When non-null, pass it as bridgeQuoteId on POST /order.

Recommended slippage tolerance based on the quote, as a decimal (e.g. 0.01 = 1%). Set on market-order quotes (including QuickTrade); null for limit, trigger, and TWAP quotes.

Example:

"0.01"

attachedBracket
object

Signing payload and funding actions for the attached take-profit / stop-loss pair. Present only when the request carried attachedBracket.

setupTxs
string[] | null

Unsigned pre-trade setup transactions (account creation, native wrap, allowance), fully assembled server-side. Sign each with the funder wallet and submit via POST /setup-transaction in order, waiting for a confirmed status before the next. Solana quotes carry one base64 transaction bundling every step; EVM quotes carry one or two 0x-hex transactions at consecutive nonces. Null when no setup is needed.