v3

latestOpenAPI 3.1.02026-07-3173143.7 KB
Flash

Submit an order

Submit a flash order for MEV-protected execution.

Signing requirement. The funder wallet must sign data returned by POST /quote before this call:

  • EVM chains — sign the evm.orderTypedData payload (EIP-712); pass the 0x-prefixed hex signature as userSignature. Echo the typed data back as evmOrderTypedData. If the quote returned evm.permitTypedData, sign that too, echo it back as evmPermitTypedData, and pass the signature as evmPermitSignature.
  • SVM (solana) — produce a 64-byte Ed25519 signature over svm.orderMessage; pass the base58 signature as userSignature. Also echo svm.nonce as svmNonce and svm.deadline as svmDeadline from the quote response. If svm.sponsoredDelegateTx is non-null, sign and echo it back as svmSponsoredDelegateTx — Definitive covers the network fee.

Pass quoteId from the prior quote to lock pricing.

post/order

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

QuoteResponse.quoteId. For marketable orders, passing this value in tries executing the cached quote from before instead of requoting again. For non-market orders, this field is unnecessary.

flashIntegratorFeeBpsstring
erc8021AttributionCodestring

Optional. The integrator's ERC-8021 builder code as registered on base.dev (e.g. acme). Plain value, not key:value — the code is the lookup key into Base's on-chain Code Registry. Applies to EVM settlement transactions only; silently ignored for SVM (Solana) orders. Appended to the settlement transaction calldata alongside Definitive's own builder code as a comma-separated ERC-8021 suffix. An unregistered/typo'd code never fails the order — indexers just can't resolve it to a payout address.

userSignaturestring required

Funder wallet signature over the order payload. Accepts 0x-prefixed hex (EVM convention) or base58 (Solana convention). EVM: EIP-712 signature over evm.orderTypedData; SVM: 64-byte Ed25519 signature over svm.orderMessage.

evmOrderTypedDatastring

Echo of QuoteResponse.evm.orderTypedData. EVM-only.

evmPermitTypedDatastring

Echo of QuoteResponse.evm.permitTypedData. EVM-only.

evmPermitSignaturestring

Permit2 signature over evm.permitTypedData. EVM-only; accepts 0x-prefixed hex.

svmNoncestring

Echo of QuoteResponse.svm.nonce. SVM-only.

svmDeadlinestring

Unix-seconds expiry, echo of QuoteResponse.svm.deadline. SVM-only (the EVM deadline is encoded inside evm.orderTypedData).

svmSponsoredDelegateTxstring

Base64 echo of QuoteResponse.svm.sponsoredDelegateTx after signing with the funder wallet. SVM-only and required when the quote returned a non-null svm.sponsoredDelegateTx; omit otherwise.

twapBucketCountinteger

TWAP only. Must equal the value used at quote time.

startTimestring date-time

TWAP only. Scheduled execution start; must equal the value used at quote time.

Example request

{
  "targetChain": "ethereum",
  "contraChain": "ethereum",
  "targetAsset": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
  "contraAsset": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
  "side": "buy",
  "qty": "1.5",
  "orderType": "market",
  "limitNotionalPrice": "4000",
  "limitCrossPrice": "4000",
  "funderAddress": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
  "flashIntegratorFeeBps": "10",
  "erc8021AttributionCode": "acme",
  "userSignature": "0x...",
  "startTime": "2026-05-12T00:00:00Z",
  "triggers": [
    {
      "notionalPrice": "1800",
      "crossPrice": "1800"
    }
  ]
}

Response

Order submitted successfully

orderIdstring required

Example response

{
  "orderId": "ord_xyz789"
}