---
title: "Get a quote"
method: POST
path: "/quote"
tags: ["Flash"]
---

# Get a quote

`POST /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`.

## Request body

- QuoteRequest
  - `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.
  - `targetAsset` string, required — Address of the target (traded) asset.
  - `contraAsset` string, required — Address of the contra (counter) asset — spent on buys, received on sells.
  - `side` 'buy' | 'sell', required — direction of the order
  - `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.
  - `orderType` 'market' | 'limit' | 'twap' | 'stop' | 'stop-loss' | 'take-profit' | 'bracket', required — Order type. Cross-chain orders support `market` only.
  - `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%). Defaults to 0.05.
  - `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).
  - `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.
  - `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. Reach out to the Definitive team to discuss whether to populate this flag.
  - `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%).
  - `expireTime` string, date-time — ISO-8601 expiry. Optional for LIMIT and trigger orders (omit for good-til-cancelled).
  - `startTime` string, date-time — TWAP only. ISO-8601 scheduled execution start. durationSeconds is measured from this time.
  - `durationSeconds` integer — TWAP only. Required for TWAP; minimum 300 (5 minutes).
  - `twapBucketCount` integer — TWAP only. Number of equal-time buckets. Omit to let the server auto-derive.
  - `triggers` PriceTrigger[] — 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).
    - `notionalPrice` string — USD-price trigger on the traded (`targetAsset`) asset.
    - `crossPrice` string — Pair-rate trigger — price of `targetAsset` denominated in `contraAsset`. Mutually exclusive with `notionalPrice`.
    - `triggerType` 'upper' | 'lower', required — "lower": fires when market drops to/below the price. "upper": rises to/above.
  - `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`.
    - `takeProfit` AttachedBracketLeg, required — Fires when the received asset's price rises to or above the trigger.
      - `notionalPrice` string — USD-price trigger on the asset the order receives (the `to` leg). Each leg requires exactly one of `notionalPrice` or `crossPrice`.
      - `crossPrice` string — Pair-rate trigger — price of the received asset denominated in the spent asset. Mutually exclusive with `notionalPrice`.
      - `limitPrice` string — Optional limit price for the exit placed when this leg fires. Omit to exit at market. Same denomination as the leg's trigger price.
    - `stopLoss` object, required — Fires when the received asset's price drops to or below the trigger.
      - `notionalPrice` string — USD-price trigger on the asset the order receives (the `to` leg). Each leg requires exactly one of `notionalPrice` or `crossPrice`.
      - `crossPrice` string — Pair-rate trigger — price of the received asset denominated in the spent asset. Mutually exclusive with `notionalPrice`.
      - `limitPrice` string — Optional limit price for the exit placed when this leg fires. Omit to exit at market. Same denomination as the leg's trigger price.

## Response `200`

Quote generated successfully

- QuoteResponse
  - `quoteId` string, required
  - `bridgeQuoteId` string, 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
  - `targetAsset` string, required
  - `contraAsset` string, required
  - `from` QuoteLeg, required — The spent leg. `asset` is `contra` on buys and `target` on sells.
    - `asset` 'target' | 'contra', required
    - `amount` string, required
    - `notional` string, required
  - `to` object, required — The received (net, post-fee) leg. `asset` is `target` on buys and `contra` on sells.
    - `asset` 'target' | 'contra', required
    - `amount` string, required
    - `notional` string, required
  - `fees` QuoteFees, required
    - `estimatedFeeNotional` string, required — Total fee in USD notional: Definitive's fee + Integrator fee (configurable by the integrator) + Gas cost.
  - `estimatedPriceImpact` string, 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.
  - `wrap` QuoteWrapAction, nullable, 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.
    - `nativeAsset` string, required — Native asset address from the request. On Solana this equals `wrappedAsset`; the SOL mint is both raw SOL and wrapped SOL.
    - `wrappedAsset` string, required — Wrapped-native token the quote was priced against. Approvals, signatures, and submit requests use this asset.
    - `evmTx` object, nullable, required — EVM only. Transaction the funder sends before signing/submitting: a `deposit()` call on the wrapped-native contract with `value` attached in base units.
      - `to` string, required
      - `data` string, required
      - `value` string, required
    - `svmInstructions` SvmInstruction[], nullable, required — Solana only. Instructions the funder sends before signing/submitting for native-SOL quotes. They wrap the full spend amount into the funder's wSOL ATA. Includes create ATA idempotent only when the ATA is missing, then transfers the spend amount and syncs native. Null unless the quote used native-SOL intent.
      - `programId` string, required
      - `accounts` SvmAccountMeta[], required
        - `pubkey` string, required
        - `isSigner` boolean, required
        - `isWritable` boolean, required
      - `data` string, required — base58-encoded instruction data
  - `evm` QuoteEvmActions, nullable, required — EVM funding and signing actions. Present when the spent (source) asset is on an EVM chain; null when it is on SVM.
    - `approveTx` object, nullable, required — ERC-20 approve calldata for the user to send before submit. Spender is the Permit2 contract (Permit2 flow) or the DefinitiveFlashAllowance contract (approval flow). Null when the relevant allowance is already sufficient.
      - `to` string, required
      - `data` string, required
    - `permitTypedData` string, nullable, required — EIP-712 typed data for the Permit2 approval — the user signs it and echoes the value back as `evmPermitTypedData` at submit.
    - `orderTypedData` string, nullable, required — EIP-712 typed data for the Flash order — the user signs it and echoes the value back as `evmOrderTypedData` at submit.
  - `svm` QuoteSvmActions, nullable, required — SVM funding and signing actions. Present when the spent (source) asset is on Solana; null when it is on EVM.
    - `ataSetupIxs` SvmInstruction[], nullable, required — Idempotent create-associated-token-account instructions for the funder's input and/or output token accounts when they don't yet exist on-chain (funder in the payer slot). Execute them first — before `wrap`, `delegateIx` / `sponsoredDelegateTx`, and submit — since the swap requires both accounts to exist. Null when both accounts already exist.
      - `programId` string, required
      - `accounts` SvmAccountMeta[], required
        - `pubkey` string, required
        - `isSigner` boolean, required
        - `isWritable` boolean, required
      - `data` string, required — base58-encoded instruction data
    - `delegateIx` object, nullable, required — Solana instruction the user wraps in a transaction and signs to grant delegate authority. Null when no delegation is needed, or when `sponsoredDelegateTx` is offered (use that instead).
      - `programId` string, required
      - `accounts` SvmAccountMeta[], required
        - `pubkey` string, required
        - `isSigner` boolean, required
        - `isWritable` boolean, required
      - `data` string, required — base58-encoded instruction data
    - `sponsoredDelegateTx` string, nullable, required — Base64-encoded Solana VersionedTransaction. Sponsor-paid alternative to `delegateIx`: sign with your funder wallet and echo back as `svmSponsoredDelegateTx` at submit (Definitive covers the network fee and broadcasts). Mutually exclusive with `delegateIx` — when this is non-null, `delegateIx` is null. Null when sponsorship is not offered.
    - `orderMessage` string, nullable, required — UTF-8 string the user must sign.
    - `nonce` string, nullable, required — Flash order nonce — pass back as `svmNonce` at submit so the program can rebuild the signed message.
    - `deadline` string, nullable, required — Unix-seconds expiry — pass back as `svmDeadline` at submit so the program can rebuild the signed message.
  - `attachedBracket` QuoteAttachedBracketSigning — Signing payload and funding actions for the attached take-profit / stop-loss pair. Present only when the request carried `attachedBracket`.
    - `evm` object, nullable, required — EVM signing actions for the attached pair. Present on EVM quotes; null on Solana.
      - `approveTx` object, nullable, required — ERC-20 approve calldata for the received asset — send before submit. Null when the allowance is already sufficient.
        - `to` string, required
        - `data` string, required
      - `permitTypedData` string, nullable, required — EIP-712 typed data for the received asset's Permit2 approval — sign it and echo it back as `attachedBracket.evmPermitTypedData` at submit, with the signature as `attachedBracket.evmPermitSignature`. Null when not needed.
      - `orderTypedData` string, required — EIP-712 typed data for the attached pair — sign it and pass the signature as `attachedBracket.userSignature` at submit.
    - `svm` object, nullable, required — Solana signing actions for the attached pair. Present on Solana quotes; null on EVM.
      - `orderMessage` string, nullable, required — UTF-8 string to Ed25519-sign for the attached pair — pass the signature as `attachedBracket.userSignature` at submit.
      - `nonce` string, required — The attached pair's own flash order nonce — always distinct from the entry's. Echo back as `attachedBracket.svmNonce` at submit.
      - `delegateIx` object, nullable, required — Delegate-authority instruction for the RECEIVED asset's token account (the attached pair sells it back). One-time per token per wallet; execute after any `svm.ataSetupIxs` from the entry block. When sponsorship applies it rides the entry-level `svm.sponsoredDelegateTx` as one combined transaction instead, and this is null.
        - `programId` string, required
        - `accounts` SvmAccountMeta[], required
          - `pubkey` string, required
          - `isSigner` boolean, required
          - `isWritable` boolean, required
        - `data` string, required — base58-encoded instruction data
    - `salt` string, nullable, required — EVM only — echo back as `attachedBracket.salt` at submit. Null on Solana.
    - `deadline` string, required — Unix-seconds expiry baked into the signed payload. Echo back as `attachedBracket.deadline` at submit.
    - `signedMaxFromAmount` string, required — The maximum amount of the received asset the signature authorizes selling.
  - `setupTxs` string[], 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.

## Other responses

- `400` — Invalid request parameters
- `401` — Authentication failed
- `403` — Permission denied
- `404` — Resource not found
- `422` — Resource state prevents the requested operation
- `429` — Rate limit exceeded
- `500` — Internal server error
- `503` — Service temporarily unavailable
- `504` — Gateway timeout

## Changes

- **2026-08-21** `a3fee79d0a4d` — 1 info
  - the `maxSlippage` request property default value `0.05` was removed
- **2026-08-19** `889a3320eed8` — 2 breaking, 1 info
  - the response property `attachedBracket/evm` became nullable for the status `200`
  - the response property `attachedBracket/salt` became nullable for the status `200`
  - added the required property `attachedBracket/svm` to the response with the `200` status
- **2026-08-15** `9dc67f6b9c3b` — 1 info
  - added the optional property `setupTxs` to the response with the `200` status
- **2026-08-13** `004dac239c15` — 2 info
  - added the new optional request property `attachedBracket`
  - added the optional property `attachedBracket` to the response with the `200` status
- **2026-08-05** `4b43a78e1989` — 2 info
  - added the new optional request property `recipientAddress`
  - added the optional property `bridgeQuoteId` to the response with the `200` status

[Full history](https://skmtc.dev/definitive/apis/definitive-flash-api/changes/quote/post.md)

---

[API](https://skmtc.dev/definitive/apis/definitive-flash-api.md) · [All operations](https://skmtc.dev/definitive/apis/definitive-flash-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/definitive/definitive-flash-api/revisions/a3fee79d0a4d/schema)
