v3

latestOpenAPI 3.1.02026-07-3173143.7 KB
Flash

Get a quote

Request a quote for a flash swap. Returns pricing, fee breakdown, asset amounts, and market quality indicators.

post/quote

Request body

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

Chain of the target (traded) asset.

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

Chain of the contra (counter) asset.

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
quickTradeboolean

Execution mode for sniping newly launched tokens (exclusive to market swaps). 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%). Defaults to 0.05.

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
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"
    }
  ]
}

Response

Quote generated successfully

quoteIdstring required
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.

Example response

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