Flash

Get a quote

Request a quote for a Flash swap. Returns pricing, fee breakdown, asset amounts, market quality indicators, and source-chain signing actions. Cross-chain market orders are supported by setting targetChain and contraChain to different values and providing recipientAddress. Same-chain quotes for market, limit, and twap orders may attach a take-profit / stop-loss pair via attachedBracket — the response then carries a second signing payload and any funding actions for the received asset under attachedBracket.

post/quote

Request body

targetChain'arbitrum' | 'avalanche' | 'base' | 'bsc' | 'ethereum' | 'optimism' | 'polygon' | 'solana' | 'hyperevm' | 'plasma' | 'monad' | 'robinhood' required

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

contraChain'arbitrum' | 'avalanche' | 'base' | 'bsc' | 'ethereum' | 'optimism' | 'polygon' | 'solana' | 'hyperevm' | 'plasma' | 'monad' | 'robinhood' required

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

targetAssetstring required

Address of the target (traded) asset.

contraAssetstring required

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

side'buy' | 'sell' required

direction of the order

qtystring 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.

orderType'market' | 'limit' | 'twap' | 'stop' | 'stop-loss' | 'take-profit' | 'bracket' required

Order type. Cross-chain orders support market only.

quickTradeboolean

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.

maxSlippagestring

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

maxPriceImpactstring

Maximum price impact as a decimal (e.g. 0.05 = 5%). Defaults to 0.05.

limitNotionalPricestring

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).

limitCrossPricestring

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.

funderAddressstring

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

recipientAddressstring

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

evmUsePermit2boolean

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. Reach out to the Definitive team to discuss whether to populate this flag.

svmUseNativeSOLboolean

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.

flashIntegratorFeeBpsstring

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

expireTimestring date-time

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

startTimestring date-time

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

durationSecondsinteger

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

twapBucketCountinteger

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

Example request

{
  "targetChain": "ethereum",
  "contraChain": "ethereum",
  "targetAsset": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
  "contraAsset": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
  "side": "buy",
  "qty": "1.5",
  "orderType": "market",
  "limitNotionalPrice": "4000",
  "limitCrossPrice": "4000",
  "flashIntegratorFeeBps": "100",
  "expireTime": "2026-05-12T00:00:00Z",
  "startTime": "2026-05-12T00:00:00Z",
  "durationSeconds": 1800,
  "twapBucketCount": 12,
  "triggers": [
    {
      "notionalPrice": "1800",
      "crossPrice": "1800"
    }
  ],
  "attachedBracket": {
    "takeProfit": {
      "notionalPrice": "1800"
    },
    "stopLoss": {
      "notionalPrice": "1800"
    }
  }
}

Response

Quote generated successfully

quoteIdstring required
bridgeQuoteIdstring nullable

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

orderType'market' | 'limit' | 'twap' | 'stop' | 'stop-loss' | 'take-profit' | 'bracket' required
side'buy' | 'sell' required
targetAssetstring required
contraAssetstring required
estimatedPriceImpactstring nullable 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.

setupTxsstring[] nullable

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.

Example response

{
  "quoteId": "q_abc123",
  "targetAsset": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
  "contraAsset": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
  "fees": {
    "estimatedFeeNotional": "1.50"
  },
  "estimatedPriceImpact": "0.0042",
  "wrap": {
    "nativeAsset": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",
    "wrappedAsset": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"
  }
}

Changes