{"openapi":"3.1.0","info":{"title":"Definitive Flash API","version":"2.0.0","description":"Flash swap API for decentralized token trading."},"servers":[{"url":"https://flash.definitive.fi/v1"}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-definitive-api-key","description":"Your Definitive API key.","x-default":"dpka_513a2bd7_57a2_46d2_927b_2a3857fe271b"}},"schemas":{"OrderType":{"type":"string","enum":["market","limit","twap","stop","stop-loss","take-profit","bracket","trailing-stop","trailing-stop-limit"],"description":"`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`, and an optional `limitPrice` per leg (no order-level limit price). A funder may hold any number of brackets on an asset, each with its own `qty`.\n\n`trailing-stop` and `trailing-stop-limit` follow the market with a `trailingStop` block instead of `triggers`: a sell trails the high-water mark and fires when the price falls `trailPercent` below it, a buy trails the low-water mark and fires when the price rises `trailPercent` above it. `trailing-stop` executes at market when it fires; `trailing-stop-limit` rests a limit at the effective trigger price. Neither takes a client limit price."},"OrderSide":{"type":"string","enum":["buy","sell"]},"QuoteLeg":{"type":"object","properties":{"asset":{"type":"string","enum":["target","contra"]},"amount":{"type":"string"},"notional":{"type":"string"}},"required":["asset","amount","notional"],"description":"The spent leg. `asset` is `contra` on buys and `target` on sells."},"QuoteFees":{"type":"object","properties":{"estimatedFeeNotional":{"type":"string","description":"Total fee in USD notional: Definitive's fee + Integrator fee (configurable by the integrator) + Gas cost.","example":"1.50"}},"required":["estimatedFeeNotional"]},"SvmAccountMeta":{"type":"object","properties":{"pubkey":{"type":"string"},"isSigner":{"type":"boolean"},"isWritable":{"type":"boolean"}},"required":["pubkey","isSigner","isWritable"]},"SvmInstruction":{"type":"object","properties":{"programId":{"type":"string"},"accounts":{"type":"array","items":{"$ref":"#/components/schemas/SvmAccountMeta"}},"data":{"type":"string","description":"base58-encoded instruction data"}},"required":["programId","accounts","data"]},"QuoteWrapAction":{"type":"object","nullable":true,"properties":{"nativeAsset":{"type":"string","description":"Native asset address from the request. On Solana this equals `wrappedAsset`; the SOL mint is both raw SOL and wrapped SOL.","example":"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE"},"wrappedAsset":{"type":"string","description":"Wrapped-native token the quote was priced against. Approvals, signatures, and submit requests use this asset.","example":"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"},"evmTx":{"type":"object","nullable":true,"properties":{"to":{"type":"string"},"data":{"type":"string"},"value":{"type":"string"}},"required":["to","data","value"],"description":"EVM only. Transaction the funder sends before signing/submitting: a `deposit()` call on the wrapped-native contract with `value` attached in base units."},"svmInstructions":{"type":"array","nullable":true,"items":{"$ref":"#/components/schemas/SvmInstruction"},"description":"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."}},"required":["nativeAsset","wrappedAsset","evmTx","svmInstructions"],"description":"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."},"QuoteEvmActions":{"type":"object","nullable":true,"properties":{"approveTx":{"type":"object","nullable":true,"properties":{"to":{"type":"string"},"data":{"type":"string"}},"required":["to","data"],"description":"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."},"permitTypedData":{"type":"string","nullable":true,"description":"EIP-712 typed data for the Permit2 approval — the user signs it and echoes the value back as `evmPermitTypedData` at submit."},"orderTypedData":{"type":"string","nullable":true,"description":"EIP-712 typed data for the Flash order — the user signs it and echoes the value back as `evmOrderTypedData` at submit."}},"required":["approveTx","permitTypedData","orderTypedData"],"description":"EVM funding and signing actions. Present when the spent (source) asset is on an EVM chain; null when it is on SVM."},"QuoteSvmActions":{"type":"object","nullable":true,"properties":{"ataSetupIxs":{"type":"array","nullable":true,"items":{"$ref":"#/components/schemas/SvmInstruction"},"description":"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."},"delegateIx":{"allOf":[{"$ref":"#/components/schemas/SvmInstruction"},{"nullable":true,"description":"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)."}]},"sponsoredDelegateTx":{"type":"string","nullable":true,"description":"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":{"type":"string","nullable":true,"description":"UTF-8 string the user must sign."},"nonce":{"type":"string","nullable":true,"description":"Flash order nonce — pass back as `svmNonce` at submit so the program can rebuild the signed message."},"deadline":{"type":"string","nullable":true,"description":"Unix-seconds expiry — pass back as `svmDeadline` at submit so the program can rebuild the signed message."}},"required":["ataSetupIxs","delegateIx","sponsoredDelegateTx","orderMessage","nonce","deadline"],"description":"SVM funding and signing actions. Present when the spent (source) asset is on Solana; null when it is on EVM."},"QuoteAttachedBracketSigning":{"type":"object","properties":{"evm":{"type":"object","nullable":true,"properties":{"approveTx":{"type":"object","nullable":true,"properties":{"to":{"type":"string"},"data":{"type":"string"}},"required":["to","data"],"description":"ERC-20 approve calldata for the received asset — send before submit. Null when the allowance is already sufficient."},"permitTypedData":{"type":"string","nullable":true,"description":"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":{"type":"string","description":"EIP-712 typed data for the attached pair — sign it and pass the signature as `attachedBracket.userSignature` at submit."}},"required":["approveTx","permitTypedData","orderTypedData"],"description":"EVM signing actions for the attached pair. Present on EVM quotes; null on Solana."},"svm":{"type":"object","nullable":true,"properties":{"orderMessage":{"type":"string","nullable":true,"description":"UTF-8 string to Ed25519-sign for the attached pair — pass the signature as `attachedBracket.userSignature` at submit."},"nonce":{"type":"string","description":"The attached pair's own flash order nonce — always distinct from the entry's. Echo back as `attachedBracket.svmNonce` at submit."},"delegateIx":{"allOf":[{"$ref":"#/components/schemas/SvmInstruction"},{"nullable":true,"description":"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."}]}},"required":["orderMessage","nonce","delegateIx"],"description":"Solana signing actions for the attached pair. Present on Solana quotes; null on EVM."},"salt":{"type":"string","nullable":true,"description":"EVM only — echo back as `attachedBracket.salt` at submit. Null on Solana."},"deadline":{"type":"string","description":"Unix-seconds expiry baked into the signed payload. Echo back as `attachedBracket.deadline` at submit."},"signedMaxFromAmount":{"type":"string","description":"The maximum amount of the received asset the signature authorizes selling."}},"required":["evm","svm","salt","deadline","signedMaxFromAmount"],"description":"Signing payload and funding actions for the attached take-profit / stop-loss pair. Present only when the request carried `attachedBracket`."},"QuoteResponse":{"type":"object","properties":{"quoteId":{"type":"string","example":"q_abc123"},"bridgeQuoteId":{"type":"string","nullable":true,"description":"Cross-chain bridge quote identifier. When non-null, pass it as `bridgeQuoteId` on `POST /order`."},"orderType":{"$ref":"#/components/schemas/OrderType"},"side":{"$ref":"#/components/schemas/OrderSide"},"targetAsset":{"type":"string","example":"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"},"contraAsset":{"type":"string","example":"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"},"from":{"$ref":"#/components/schemas/QuoteLeg"},"to":{"allOf":[{"$ref":"#/components/schemas/QuoteLeg"},{"description":"The received (net, post-fee) leg. `asset` is `target` on buys and `contra` on sells."}]},"fees":{"$ref":"#/components/schemas/QuoteFees"},"estimatedPriceImpact":{"type":"string","nullable":true,"description":"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"},"recommendedSlippage":{"type":"string","nullable":true,"description":"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"},"wrap":{"$ref":"#/components/schemas/QuoteWrapAction"},"evm":{"$ref":"#/components/schemas/QuoteEvmActions"},"svm":{"$ref":"#/components/schemas/QuoteSvmActions"},"attachedBracket":{"$ref":"#/components/schemas/QuoteAttachedBracketSigning"},"setupTxs":{"type":"array","nullable":true,"items":{"type":"string"},"description":"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."}},"required":["quoteId","orderType","side","targetAsset","contraAsset","from","to","fees","estimatedPriceImpact","wrap","evm","svm"]},"ErrorResponse":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"nullable":true}},"required":["code","message"]}},"required":["error"]},"Chain":{"type":"string","enum":["arbitrum","avalanche","base","bsc","ethereum","optimism","polygon","solana","hyperevm","plasma","monad","robinhood","ink","arc","elysium"],"description":"Chain of the target (traded) asset. May differ from `contraChain` for a cross-chain market order.","example":"ethereum"},"PriceTrigger":{"type":"object","properties":{"notionalPrice":{"type":"string","description":"USD-price trigger on the traded (`targetAsset`) asset.","example":"1800"},"crossPrice":{"type":"string","description":"Pair-rate trigger — price of `targetAsset` denominated in `contraAsset`. Mutually exclusive with `notionalPrice`.","example":"1800"},"triggerType":{"type":"string","enum":["upper","lower"],"description":"\"lower\": fires when market drops to/below the price. \"upper\": rises to/above."},"limitPrice":{"type":"string","description":"`bracket` legs only. Optional limit price for the sell placed when this leg fires; omit to sell at market. Same units as the leg's trigger price: USD for `notionalPrice`, pair rate for `crossPrice`. `stop` / `stop-loss` / `take-profit` use `limitNotionalPrice` / `limitCrossPrice` instead.","example":"1774"}},"required":["triggerType"]},"TrailingStopTrigger":{"type":"object","properties":{"trailPercent":{"type":"string","description":"Trail distance as a fraction of the watermark: \"0.05\" is 5%. Between 0.005 and 0.5 inclusive.","example":"0.05"},"activationPrice":{"type":"string","description":"USD price of the traded (`targetAsset`) asset at which the trail arms. Until the market reaches it the order does not track a watermark. Omit to arm immediately.","example":"4000"}},"required":["trailPercent"],"description":"Required for `trailing-stop` / `trailing-stop-limit`; not allowed on any other type."},"AttachedBracketLeg":{"type":"object","properties":{"notionalPrice":{"type":"string","description":"USD-price trigger on the asset the order receives (the `to` leg). Each leg requires exactly one of `notionalPrice` or `crossPrice`.","example":"1800"},"crossPrice":{"type":"string","description":"Pair-rate trigger — price of the received asset denominated in the spent asset. Mutually exclusive with `notionalPrice`."},"limitPrice":{"type":"string","description":"Optional limit price for the exit placed when this leg fires. Omit to exit at market. Same denomination as the leg's trigger price."}},"description":"Fires when the received asset's price rises to or above the trigger."},"QuoteRequest":{"type":"object","properties":{"targetChain":{"$ref":"#/components/schemas/Chain"},"contraChain":{"allOf":[{"$ref":"#/components/schemas/Chain"},{"description":"Chain of the contra (counter) asset. May differ from `targetChain` for a cross-chain market order."}]},"targetAsset":{"type":"string","minLength":1,"description":"Address of the target (traded) asset.","example":"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"},"contraAsset":{"type":"string","minLength":1,"description":"Address of the contra (counter) asset — spent on buys, received on sells.","example":"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"},"side":{"allOf":[{"$ref":"#/components/schemas/OrderSide"},{"description":"direction of the order","example":"buy"}]},"qty":{"type":"string","description":"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":{"allOf":[{"$ref":"#/components/schemas/OrderType"},{"description":"Order type. Cross-chain orders support `market` only.","example":"market"}]},"quickTrade":{"type":"boolean","description":"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":{"type":"string","description":"Slippage tolerance as a decimal (e.g. 0.05 = 5%). When omitted, our engine sets a slippage at order admission."},"maxPriceImpact":{"type":"string","description":"Maximum price impact as a decimal (e.g. 0.05 = 5%). When omitted, our engine applies the order-type-specific default at admission."},"limitNotionalPrice":{"type":"string","description":"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":{"type":"string","description":"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":{"type":"string","description":"Wallet that funds the spent asset on the source chain. The source is `contraChain` for buys and `targetChain` for sells."},"recipientAddress":{"type":"string","description":"Address that receives funds on the destination chain. Required when `targetChain` and `contraChain` differ."},"evmUsePermit2":{"type":"boolean","description":"EVM only. When true, forces the Permit2 signing flow instead of the Flash settlement contract flow. When false, forces the Flash settlement contract flow: no Permit2 data is returned, and approveTx targets the Flash settlement contract when its allowance is short. When omitted, the server picks the flow from the funder's on-chain state — typically the Flash settlement contract flow, but Permit2 when the funder is already set up for it. Recommended when forceMinimalAllowance is set. Reach out to the Definitive team to discuss whether to populate this flag."},"forceMinimalAllowance":{"type":"boolean","description":"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":{"type":"boolean","description":"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":{"type":"string","description":"Integrator fee in basis points (100 = 1%). Maximum 1000 (10%).","example":"100"},"expireTime":{"type":"string","format":"date-time","description":"ISO-8601 expiry. Optional for LIMIT and trigger orders (omit for good-til-cancelled).","example":"2026-05-12T00:00:00Z"},"startTime":{"type":"string","format":"date-time","description":"TWAP only. ISO-8601 scheduled execution start. durationSeconds is measured from this time.","example":"2026-05-12T00:00:00Z"},"durationSeconds":{"type":"integer","minimum":300,"description":"TWAP only. Required for TWAP; minimum 300 (5 minutes).","example":1800},"twapBucketCount":{"type":"integer","minimum":2,"maximum":2560,"description":"TWAP only. Number of equal-time buckets. Omit to let the server auto-derive.","example":12},"triggers":{"type":"array","items":{"$ref":"#/components/schemas/PriceTrigger"},"maxItems":2,"description":"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). Each `bracket` leg may also carry a `limitPrice`."},"trailingStop":{"$ref":"#/components/schemas/TrailingStopTrigger"},"attachedBracket":{"type":"object","properties":{"takeProfit":{"$ref":"#/components/schemas/AttachedBracketLeg"},"stopLoss":{"allOf":[{"$ref":"#/components/schemas/AttachedBracketLeg"},{"description":"Fires when the received asset's price drops to or below the trigger."}]},"expireTime":{"type":"string","format":"date-time","description":"ISO-8601 expiry for the pair itself. The pair's signature carries it as its deadline and the protective order expires at it. Must be in the future and no earlier than the order's `expireTime` when that is set. Omit for a pair that never expires.","example":"2026-06-12T00:00:00Z"}},"required":["takeProfit","stopLoss"],"description":"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`."}},"required":["targetChain","contraChain","targetAsset","contraAsset","side","qty","orderType"]},"SubmitOrderResponse":{"type":"object","properties":{"orderId":{"type":"string","example":"ord_xyz789"},"attachedBracket":{"type":"object","properties":{"status":{"type":"string","description":"The attached pair becomes a live order on the entry's first fill; until then it is pending activation.","example":"pending_activation"}},"required":["status"],"description":"Present only when the order carried `attachedBracket`."}},"required":["orderId"]},"SubmitOrderRequest":{"type":"object","properties":{"targetChain":{"$ref":"#/components/schemas/Chain"},"contraChain":{"allOf":[{"$ref":"#/components/schemas/Chain"},{"description":"Chain of the contra (counter) asset. May differ from `targetChain` for a cross-chain market order."}]},"targetAsset":{"type":"string","minLength":1,"description":"Address of the target (traded) asset.","example":"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"},"contraAsset":{"type":"string","minLength":1,"description":"Address of the contra (counter) asset — spent on buys, received on sells.","example":"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"},"side":{"allOf":[{"$ref":"#/components/schemas/OrderSide"},{"description":"direction of the order","example":"buy"}]},"qty":{"type":"string","description":"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":{"allOf":[{"$ref":"#/components/schemas/OrderType"},{"description":"Order type. Cross-chain orders support `market` only.","example":"market"}]},"quickTrade":{"type":"boolean","description":"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":{"type":"string","description":"Slippage tolerance as a decimal (e.g. 0.05 = 5%). When omitted, our engine sets a slippage at order admission."},"maxPriceImpact":{"type":"string","description":"Maximum price impact as a decimal (e.g. 0.05 = 5%). When omitted, our engine applies the order-type-specific default at admission."},"limitNotionalPrice":{"type":"string","description":"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":{"type":"string","description":"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":{"type":"string","minLength":1,"example":"0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"},"recipientAddress":{"type":"string","minLength":1,"description":"Address that receives funds on the destination chain. Required when `targetChain` and `contraChain` differ."},"quoteId":{"type":"string","minLength":1,"description":"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."},"bridgeQuoteId":{"type":"string","minLength":1,"description":"QuoteResponse.bridgeQuoteId. Cross-chain only; binds submission to the cached bridge quote when present."},"flashIntegratorFeeBps":{"type":"string","example":"10"},"erc8021AttributionCode":{"type":"string","pattern":"^[a-zA-Z0-9_.-]{1,32}$","description":"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.","example":"acme"},"userSignature":{"type":"string","minLength":1,"description":"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`.","example":"0x..."},"evmOrderTypedData":{"type":"string","description":"Echo of `QuoteResponse.evm.orderTypedData`. EVM-only."},"evmPermitTypedData":{"type":"string","description":"Echo of `QuoteResponse.evm.permitTypedData`. EVM-only."},"evmPermitSignature":{"type":"string","description":"Permit2 signature over `evm.permitTypedData`. EVM-only; accepts 0x-prefixed hex."},"svmNonce":{"type":"string","description":"Echo of `QuoteResponse.svm.nonce`. SVM-only."},"svmDeadline":{"type":"string","description":"Unix-seconds expiry, echo of `QuoteResponse.svm.deadline`. SVM-only (the EVM deadline is encoded inside `evm.orderTypedData`)."},"svmSponsoredDelegateTx":{"type":"string","description":"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."},"twapBucketCount":{"type":"integer","minimum":2,"maximum":2560,"description":"TWAP only. Must equal the value used at quote time."},"startTime":{"type":"string","format":"date-time","description":"TWAP only. Scheduled execution start; must equal the value used at quote time.","example":"2026-05-12T00:00:00Z"},"triggers":{"type":"array","items":{"$ref":"#/components/schemas/PriceTrigger"},"maxItems":2,"description":"Price triggers. Each entry requires exactly one of `notionalPrice` or `crossPrice`, and a `bracket` leg may carry a `limitPrice`. Must echo the values used at quote time for trigger orders."},"trailingStop":{"allOf":[{"$ref":"#/components/schemas/TrailingStopTrigger"},{"description":"Required for `trailing-stop` / `trailing-stop-limit`; must echo the values used at quote time."}]},"attachedBracket":{"type":"object","properties":{"takeProfit":{"$ref":"#/components/schemas/AttachedBracketLeg"},"stopLoss":{"allOf":[{"$ref":"#/components/schemas/AttachedBracketLeg"},{"description":"Fires when the received asset's price drops to or below the trigger."}]},"userSignature":{"type":"string","minLength":1,"description":"Signature over the attached pair's signing payload: on EVM an EIP-712 signature over `attachedBracket.evm.orderTypedData` (0x-prefixed hex); on Solana an Ed25519 signature over `attachedBracket.svm.orderMessage` (base58 or hex)."},"salt":{"type":"string","minLength":1,"description":"EVM only — echo of the quote's `attachedBracket.salt`. Required on EVM; omit on Solana."},"svmNonce":{"type":"string","minLength":1,"description":"Solana only — echo of the quote's `attachedBracket.svm.nonce`. Required on Solana; omit on EVM."},"deadline":{"type":"string","minLength":1,"description":"Echo of the quote's `attachedBracket.deadline`."},"signedMaxFromAmount":{"type":"string","minLength":1,"description":"Echo of the quote's `attachedBracket.signedMaxFromAmount` — the value baked into the signed typed data."},"evmPermitSignature":{"type":"string","description":"Permit2 signature over the quote's `attachedBracket.evm.permitTypedData`. Required when that field was non-null; provide together with `evmPermitTypedData`."},"evmPermitTypedData":{"type":"string","description":"Echo of the quote's `attachedBracket.evm.permitTypedData`. Provide together with `evmPermitSignature`."}},"required":["takeProfit","stopLoss","userSignature","deadline","signedMaxFromAmount"],"description":"The attached take-profit / stop-loss pair: the legs as quoted plus the signature material from the quote's `attachedBracket` block."}},"required":["targetChain","contraChain","targetAsset","contraAsset","side","qty","orderType","funderAddress","userSignature"]},"SubmitSetupTransactionResponse":{"type":"object","properties":{"status":{"type":"string","enum":["confirmed","pending"],"description":"`confirmed` — the transaction reached the chain (Solana: confirmed commitment; EVM: included in a block), so the next setup transaction or the order can be submitted. `pending` — broadcast but not confirmed within the wait window, which is normal on slower chains: poll the transaction you signed, do not re-sign it."}},"required":["status"]},"SubmitSetupTransactionRequest":{"type":"object","properties":{"signedSetupTx":{"type":"string","minLength":1,"description":"One fully funder-signed entry from `QuoteResponse.setupTxs`: 0x-prefixed hex for EVM, base64 for Solana. Submit entries one per call, in order."}},"required":["signedSetupTx"]},"FlashOrderStatus":{"type":"string","enum":["ORDER_STATUS_UNSPECIFIED","ORDER_STATUS_PENDING","ORDER_STATUS_ACCEPTED","ORDER_STATUS_PARTIALLY_FILLED","ORDER_STATUS_FILLED","ORDER_STATUS_CANCELLED","ORDER_STATUS_REJECTED","ORDER_STATUS_TERMINATED"]},"FlashAssetChainRef":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"namespace":{"type":"string"}},"required":["id","name","namespace"]},"FlashAssetRef":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"address":{"type":"string"},"ticker":{"type":"string"},"chain":{"$ref":"#/components/schemas/FlashAssetChainRef"}},"required":["id","name","address","ticker","chain"]},"FlashOrderFilled":{"type":"object","nullable":true,"properties":{"targetAmount":{"type":"string","nullable":true},"contraAmount":{"type":"string","nullable":true},"averagePrice":{"type":"string","nullable":true},"averageNotionalPrice":{"type":"string","nullable":true}},"required":["targetAmount","contraAmount","averagePrice","averageNotionalPrice"]},"TrailingStopRead":{"type":"object","properties":{"trailPercent":{"type":"string","description":"Trail distance as submitted, a fraction (\"0.05\" is 5%)."},"activationPrice":{"type":"string","nullable":true,"description":"USD activation price as submitted; null when the trail armed immediately."},"activated":{"type":"boolean","description":"True once the trail is armed, as last persisted. False until the first watermark is saved, even without an `activationPrice`."},"watermarkPrice":{"type":"string","nullable":true,"description":"USD high-water mark (sell) or low-water mark (buy) the trail is measured from, as last persisted. Null until the first watermark is saved."},"effectiveTriggerPrice":{"type":"string","nullable":true,"description":"USD price the order fires at: the watermark less `trailPercent` on a sell, plus it on a buy. Null until the first watermark is saved."},"watermarkUpdatedAt":{"type":"string","nullable":true,"format":"date-time","description":"When `watermarkPrice` last moved; null until it has."}},"required":["trailPercent","activationPrice","activated","watermarkPrice","effectiveTriggerPrice","watermarkUpdatedAt"],"description":"The trail as submitted plus its live state. Present only on `trailing-stop` / `trailing-stop-limit` orders, whose `trigger` is null."},"AttachedBracketReadLeg":{"type":"object","nullable":true,"properties":{"notionalPrice":{"type":"string"},"crossPrice":{"type":"string"},"limitPrice":{"type":"string","description":"When set, this leg exits as a limit order at this price instead of at market."}},"description":"The take-profit leg as submitted. Null on stream frames — the full configuration rides GET."},"AttachedBracketRead":{"type":"object","properties":{"status":{"type":"string","enum":["pending_activation","never_activated","active"],"description":"pending_activation: becomes a live order on the entry's first fill. never_activated: the entry closed unfilled. active: the protective order exists — read it by `bracketOrderId`."},"bracketOrderId":{"type":"string","nullable":true,"description":"The protective order's own id; set once status is active."},"takeProfit":{"$ref":"#/components/schemas/AttachedBracketReadLeg"},"stopLoss":{"allOf":[{"$ref":"#/components/schemas/AttachedBracketReadLeg"},{"description":"The stop-loss leg as submitted. Null on stream frames — the full configuration rides GET."}]},"signedMaxFromAmount":{"type":"string","nullable":true,"description":"The maximum amount of the received asset the signature authorizes selling."},"expiresAt":{"type":"string","nullable":true,"description":"ISO-8601 time the pair expires, from the quote's `attachedBracket.expireTime`. Null when the pair never expires."}},"required":["status","bracketOrderId","takeProfit","stopLoss","signedMaxFromAmount","expiresAt"],"description":"The attached take-profit / stop-loss pair. Present only on orders submitted with an `attachedBracket` block."},"FlashOrder":{"type":"object","properties":{"orderId":{"type":"string"},"orderType":{"$ref":"#/components/schemas/OrderType"},"side":{"$ref":"#/components/schemas/OrderSide"},"status":{"$ref":"#/components/schemas/FlashOrderStatus"},"closeReason":{"type":"string","nullable":true,"description":"Reason the order was closed (e.g. `REASON_USER_REQUESTED`, `REASON_FULLY_FILLED`); null while the order is still active."},"funderAddress":{"type":"string"},"recipientAddress":{"type":"string","nullable":true,"description":"Address that receives the output: the `recipientAddress` given at submit, or the funder when none was given. Null on orders placed before this field was recorded."},"integratorFeeBps":{"type":"string","nullable":true,"description":"Your integrator fee requested at submit (`flashIntegratorFeeBps`), in basis points. Null when none was set."},"tradeFeeBps":{"type":"string","nullable":true,"description":"Definitive's platform fee rate applied to this order, in basis points. Null on market orders and on orders placed before this field was recorded."},"targetAsset":{"$ref":"#/components/schemas/FlashAssetRef"},"contraAsset":{"$ref":"#/components/schemas/FlashAssetRef"},"qty":{"type":"string"},"filled":{"$ref":"#/components/schemas/FlashOrderFilled"},"limitNotionalPrice":{"type":"string","nullable":true},"limitCrossPrice":{"type":"string","nullable":true},"trigger":{"allOf":[{"$ref":"#/components/schemas/PriceTrigger"},{"nullable":true,"description":"The single trigger of a `stop` / `stop-loss` / `take-profit` order. Null for every other type, including `bracket`, whose legs ride `brackets`."}]},"brackets":{"type":"array","nullable":true,"items":{"$ref":"#/components/schemas/PriceTrigger"},"description":"The two legs of a standalone `bracket` order, as submitted, including a leg's `limitPrice` when it has one. When either leg's price is reached the order sells `qty` (at market, or resting at that leg's `limitPrice`) and the other leg is discarded. Null for every other type."},"trailingStop":{"$ref":"#/components/schemas/TrailingStopRead"},"attachedBracket":{"$ref":"#/components/schemas/AttachedBracketRead"},"sourceEntryOrderId":{"type":"string","description":"On a protective order created by an attached pair: the entry order it was attached to."},"maxPriceImpact":{"type":"string","nullable":true},"twapBucketCount":{"type":"integer","nullable":true},"placedAt":{"type":"string","format":"date-time"},"acceptedAt":{"type":"string","nullable":true,"format":"date-time"},"closedAt":{"type":"string","nullable":true,"format":"date-time"},"expiresAt":{"type":"string","nullable":true,"format":"date-time","description":"When the order expires. Null for good-til-cancelled orders (no `expireTime` was set) and for market orders.","example":"2026-05-12T00:00:00Z"}},"required":["orderId","orderType","side","status","closeReason","funderAddress","recipientAddress","integratorFeeBps","tradeFeeBps","targetAsset","contraAsset","qty","filled","limitNotionalPrice","limitCrossPrice","trigger","brackets","maxPriceImpact","twapBucketCount","placedAt","acceptedAt","closedAt","expiresAt"]},"FlashListOrdersResponse":{"type":"object","properties":{"orders":{"type":"array","items":{"$ref":"#/components/schemas/FlashOrder"}},"nextPageToken":{"type":"string","nullable":true,"description":"Cursor for the next page; null when there are no more orders."}},"required":["orders","nextPageToken"]},"FlashOrderActivity":{"type":"object","nullable":true,"properties":{"summary":{"type":"string","description":"What Flash is doing with the order right now, e.g. resting, executing, or retrying with the latest failure reason."}},"default":null,"required":["summary"],"description":"What Flash is doing with the order while it is open. The wording may change; do not parse it. Use `order.status` and `order.closeReason` for logic. Null once the order is closed."},"FlashChainStatus":{"type":"string","enum":["CHAIN_STATUS_UNSPECIFIED","CHAIN_STATUS_PROCESSED","CHAIN_STATUS_REORGED","CHAIN_STATUS_FINALIZED"],"description":"On-chain status of the fill."},"FlashFill":{"type":"object","properties":{"status":{"$ref":"#/components/schemas/FlashChainStatus"},"notional":{"type":"string"},"venues":{"type":"array","items":{"type":"string"}},"filledAt":{"type":"string","format":"date-time"},"rootOrderId":{"type":"string"},"orderId":{"type":"string","description":"Order id this fill belongs to. For TWAP orders, this is the child slice that produced the fill; for all other order types it equals `rootOrderId`."},"parentOrderId":{"type":"string"},"transactionId":{"type":"string"},"fillPrice":{"type":"string"},"feeAmount":{"type":"string","description":"Total fee for this fill, denominated in `feeTicker`: Definitive's platform fee + network fee + your integrator fee. On a market order this is your integrator fee only."},"feeTicker":{"type":"string"},"tradeFeeAmount":{"type":"string","description":"Definitive's platform fee for this fill, denominated in `feeTicker`. Does not include your integrator fee. Omitted on market orders."},"networkFeeAmount":{"type":"string","description":"Network (gas) fee for this fill, denominated in `feeTicker`. Omitted on market orders."},"integratorFeeAmount":{"type":"string","description":"Your integrator fee for this fill, denominated in `feeTicker`. \"0\" when no integrator fee was charged."},"feeNotional":{"type":"string","description":"Total fee for this fill in USD — `feeAmount` converted at the `feeTicker` rate: Definitive's platform fee + network fee + your integrator fee. On a market order this is your integrator fee only."},"tradeFeeNotional":{"type":"string","description":"Definitive's platform fee for this fill, in USD. Omitted on market orders."},"networkFeeNotional":{"type":"string","description":"Network (gas) fee for this fill, in USD. Omitted on market orders."},"integratorFeeNotional":{"type":"string","description":"Your integrator fee for this fill, in USD."},"contraAmount":{"type":"string"},"targetAmount":{"type":"string"}},"required":["status","notional","venues","filledAt","rootOrderId","orderId","parentOrderId","transactionId","fillPrice","feeAmount","feeTicker","integratorFeeAmount","feeNotional","integratorFeeNotional","contraAmount","targetAmount"]},"FlashGetOrderResponse":{"type":"object","properties":{"order":{"$ref":"#/components/schemas/FlashOrder"},"activity":{"$ref":"#/components/schemas/FlashOrderActivity"},"fills":{"type":"array","items":{"$ref":"#/components/schemas/FlashFill"}}},"required":["order","fills"]},"BatchCancelErrorCode":{"type":"string","minLength":1,"description":"Present only when `ok` is false. Why that order was not cancelled:\n- `NOT_FOUND` — no such order, not a root Flash order, or the signer is not its funder. Drop it.\n- `ALREADY_FILLED` — the order filled before the cancel landed. Drop it.\n- `REJECTED` — the order was already rejected. Drop it.\n- `PENDING_CANCEL` — a cancel is already in flight for this order. Treat as cancelled and confirm via `GET /orders/{orderId}`.\n- `SETTLING` — the order's status is not known yet; re-check shortly.\n- `INTERNAL_ERROR` — transient failure; retry this id.\n\nTreat any other value as terminal for that order and do not retry it.","example":"ALREADY_FILLED"},"BatchCancelOrderResult":{"type":"object","properties":{"orderId":{"type":"string","description":"The requested order id."},"ok":{"type":"boolean","description":"True when the order was cancelled or was already cancelled; false otherwise."},"errorCode":{"$ref":"#/components/schemas/BatchCancelErrorCode"}},"required":["orderId","ok"]},"BatchCancelOrderResponse":{"type":"object","properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/BatchCancelOrderResult"},"description":"One result per requested order id, in request order."}},"required":["results"]},"BatchCancelOrderRequest":{"type":"object","properties":{"orderIds":{"type":"array","items":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"},"minItems":1,"maxItems":25,"description":"1–25 order ids to cancel, as lowercase hyphenated UUIDs, in the same order as the lines of `cancelMessage`. Duplicates are rejected."},"cancelMessage":{"type":"string","minLength":1,"description":"UTF-8 plaintext the funder wallet signed. Format: \"Definitive Flash v1 — Cancel Orders\\nOrders:\\n<orderId>\\n<orderId>...\" — one lowercase UUID per line in `orderIds` order, no trailing newline. Same bytes across EVM and SVM."},"userSignature":{"type":"string","minLength":1,"description":"Funder wallet signature over cancelMessage. Accepts 0x-prefixed hex (EVM convention) or base58 (Solana convention). EVM: 65 bytes from EIP-191 personal_sign. SVM: 64 bytes from Ed25519."}},"required":["orderIds","cancelMessage","userSignature"]},"CancelOrderResponse":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]}},"required":["ok"]},"CancelOrderRequest":{"type":"object","properties":{"cancelMessage":{"type":"string","minLength":1,"description":"UTF-8 plaintext the funder wallet signed. Format: \"Definitive Flash v1 — Cancel Order\\nOrder: <orderId>\". Same bytes across EVM and SVM."},"userSignature":{"type":"string","minLength":1,"description":"Funder wallet signature over cancelMessage. Accepts 0x-prefixed hex (EVM convention) or base58 (Solana convention). EVM: 65 bytes from EIP-191 personal_sign. SVM: 64 bytes from Ed25519."}},"required":["cancelMessage","userSignature"]},"UpdateOrderResponse":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]}},"required":["ok"]},"UpdateOrderTrigger":{"type":"object","properties":{"notionalPrice":{"type":"string","description":"New USD trigger price on the traded (`targetAsset`) asset. Mutually exclusive with `crossPrice`; set exactly one. Must equal the value signed in `updateMessage` exactly — no normalization is applied.","example":"3500"},"crossPrice":{"type":"string","description":"New pair-rate trigger price — price of `targetAsset` denominated in `contraAsset`. Mutually exclusive with `notionalPrice`; set exactly one. Must equal the value signed in `updateMessage` exactly — no normalization is applied.","example":"3500"},"triggerType":{"type":"string","enum":["upper","lower"],"description":"Direction of the trigger, matching the order's: \"lower\" fires when the market drops to/below the price (stop / stop-loss), \"upper\" when it rises to/above (take-profit). The direction itself cannot be changed by an update."}},"required":["triggerType"],"description":"New trigger price for a single-trigger order (`stop`, `stop-loss` / stop-limit, `take-profit` / take-profit-limit). Not valid on `limit` or `bracket` orders. On the market-execution types (`stop`, `take-profit`) the trigger is the only updatable field; on the -limit variants a trigger and/or a limit can travel in one update. A trigger update moves the threshold only: the direction and the price basis (cross vs notional) must match what the order's trigger was placed with — unlike the limit price, the trigger's basis cannot be switched by an update."},"UpdateBracketLeg":{"allOf":[{"$ref":"#/components/schemas/UpdateOrderTrigger"},{"type":"object","properties":{"limitPrice":{"type":"string","description":"New limit price for the sell placed when this leg fires; omit to sell at market, which removes a limit the leg had. Same units as the leg's trigger price: USD for `notionalPrice`, pair rate for `crossPrice`. Must equal the value signed in `updateMessage` exactly — no normalization is applied.","example":"1774"}}}]},"UpdateOrderRequest":{"type":"object","properties":{"limitNotionalPrice":{"type":"string","description":"New USD limit price for the traded (`targetAsset`) asset. Mutually exclusive with `limitCrossPrice`; set exactly one. Must equal the value signed in `updateMessage` exactly — no normalization is applied.","example":"4000"},"limitCrossPrice":{"type":"string","description":"New pair-rate limit price — how many `contraAsset` units one `targetAsset` unit is worth. Mutually exclusive with `limitNotionalPrice`; set exactly one. Must equal the value signed in `updateMessage` exactly — no normalization is applied.","example":"4000"},"updateMessage":{"type":"string","minLength":1,"description":"UTF-8 plaintext the funder wallet signed. Binds the order id, an RFC3339 `Issued At:` freshness stamp, and every updated value. Format:\n\n```\nDefinitive Flash — Update Order\nOrder: <orderId>\nIssued At: <RFC3339 UTC>\nLimit Cross Price: <decimal>\nTrigger Lower Cross Price: <decimal>\n```\n\nThe Limit line (`Limit Cross Price:` or `Limit Notional Price:`) and the Trigger line (`Trigger <Lower|Upper> <Cross|Notional> Price:`, direction matching `trigger.triggerType`) are each optional and appear at most once, matching the request fields; at least one is required, and when both are present the Limit line comes first.\n\nA bracket update (`triggers`) has no Limit line and one Trigger line per leg, the `lower` leg first, each followed by `Trigger <Lower|Upper> Limit Price: <decimal>` only when that leg carries `limitPrice`:\n\n```\nDefinitive Flash — Update Order\nOrder: <orderId>\nIssued At: <RFC3339 UTC>\nTrigger Lower Notional Price: <decimal>\nTrigger Lower Limit Price: <decimal>\nTrigger Upper Notional Price: <decimal>\n```\n\nSame bytes across EVM and SVM."},"userSignature":{"type":"string","minLength":1,"description":"Funder wallet signature over updateMessage. Accepts 0x-prefixed hex (EVM convention) or base58 (Solana convention). EVM: 65 bytes from EIP-191 personal_sign. SVM: 64 bytes from Ed25519."},"trigger":{"$ref":"#/components/schemas/UpdateOrderTrigger"},"triggers":{"type":"array","items":{"$ref":"#/components/schemas/UpdateBracketLeg"},"description":"New legs for a `bracket` order — a standalone bracket, or the pair an attached bracket minted, addressed by its `bracketOrderId` once the entry has filled. Exactly two legs, one `lower` and one `upper`, in any order; each carries its new trigger price in the basis the leg was placed with and an optional `limitPrice`. The update replaces both legs' prices and limits. The only field a bracket accepts: not valid with `trigger` or the limit fields."}},"required":["updateMessage","userSignature"]},"FlashAsset":{"type":"object","properties":{"chain":{"$ref":"#/components/schemas/Chain"},"address":{"type":"string","description":"Pass straight back to `POST /quote` as `targetAsset` or `contraAsset`. EVM native assets use the `0xEeee…EEeE` sentinel.","example":"0x4200000000000000000000000000000000000006"},"symbol":{"type":"string"},"name":{"type":"string","description":"Human-readable name. Falls back to `symbol` when Definitive has no distinct name, so it may equal `symbol`."},"decimals":{"type":"integer"},"price":{"type":"string","description":"Price in USD. `\"0\"` means Definitive has no current price for this asset — treat it as unknown, not as zero."},"marketCap":{"type":"string","description":"Circulating market cap in USD. `\"0\"` may mean unknown, as with `price`."},"liquidity":{"type":"string","description":"Liquidity in USD. `\"0\"` may mean unknown, as with `price`."},"volume24h":{"type":"string","description":"24h trading volume in USD. `\"0\"` may mean unknown, as with `price`."},"priceChange24h":{"type":"string","description":"24h price change as a decimal fraction — `-0.0342` is -3.42%. Multiply by 100 to display.","example":"-0.0342"},"holders":{"type":"integer","description":"Distinct holding addresses.","example":11},"imageUrl":{"type":"string"},"riskFlagged":{"type":"boolean","description":"Set when the asset shows common risk indicators — very low liquidity, supply concentrated in the deployer or a small group of wallets, or a contract that can mint or freeze tokens. Treat this as a caution signal, not a safety guarantee."}},"required":["chain","address","symbol","name","decimals","price","marketCap","liquidity","volume24h","priceChange24h","holders","imageUrl","riskFlagged"]},"FlashSearchAssetsResponse":{"type":"object","properties":{"assets":{"type":"array","items":{"$ref":"#/components/schemas/FlashAsset"}}},"required":["assets"]},"FlashTokenBalance":{"type":"object","properties":{"chain":{"allOf":[{"$ref":"#/components/schemas/Chain"},{"description":"Pass straight back to `POST /quote` as `targetChain` or `contraChain`."}]},"address":{"type":"string","description":"Pass straight back to `POST /quote` as `targetAsset` or `contraAsset`. EVM native assets use the `0xEeee…EEeE` sentinel.","example":"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"},"symbol":{"type":"string","description":"Display only — token symbols are not unique.","example":"USDC"},"tokenDecimals":{"type":"integer","minimum":0,"description":"Number of decimal places used by the token's base units.","example":6},"balance":{"type":"string","description":"Held amount as a decimal string in the asset's normalized units — the same units as `qty` on `POST /quote`.","example":"25.5"},"notional":{"type":"string","description":"Value of `balance` in USD. Tokens without a current Definitive price are not returned.","example":"25.50"},"priceChange24h":{"type":"string","nullable":true,"description":"24h price change as a decimal fraction — `-0.0342` is -3.42%. Multiply by 100 to display. `null` when Codex has no 24h change data.","example":"-0.0342"},"imageUrl":{"type":"string","description":"Token logo URL. `\"\"` when no image is available."},"isNative":{"type":"boolean","description":"Whether this row is the chain's native gas asset rather than a token holding. On Solana, native SOL and the wSOL token are separate rows sharing the `So111…112` address — `isNative` tells them apart."}},"required":["chain","address","symbol","tokenDecimals","balance","notional","priceChange24h","imageUrl","isNative"]},"FlashBalancesResponse":{"type":"object","properties":{"balances":{"type":"array","items":{"$ref":"#/components/schemas/FlashTokenBalance"},"description":"Token balances across every chain the address covers. Tokens flagged as scams and tokens without a current price are not returned."}},"required":["balances"]}},"parameters":{}},"paths":{"/quote":{"post":{"tags":["Flash"],"summary":"Get a quote","description":"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`.","security":[{"ApiKeyAuth":[]}],"x-mint":{"href":"/api-reference/flash/quote"},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteRequest"},"example":{"targetChain":"base","contraChain":"base","targetAsset":"0x4200000000000000000000000000000000000006","contraAsset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","side":"buy","qty":"100","orderType":"market","funderAddress":"0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045","maxSlippage":"0.01"}}}},"responses":{"200":{"description":"Quote generated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteResponse"}}}},"400":{"description":"Invalid request parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Resource state prevents the requested operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"504":{"description":"Gateway timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/order":{"post":{"tags":["Flash"],"summary":"Submit an order","description":"Submit a flash order for MEV-protected execution.\n\n**Signing requirement.** The funder wallet must sign data returned by `POST /quote` before this call:\n\n- **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`.\n- **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.\n\n**Attached brackets.** If the quote carried `attachedBracket`, sign its chain block with the funder wallet — on EVM sign `attachedBracket.evm.orderTypedData` (EIP-712) and echo `salt`; on Solana produce a 64-byte Ed25519 signature over `attachedBracket.svm.orderMessage` and echo `attachedBracket.svm.nonce` as `svmNonce` — and submit the block with the same legs plus `userSignature`, `deadline`, and `signedMaxFromAmount` echoed from the quote (on EVM, also the permit echo pair when the quote returned `attachedBracket.evm.permitTypedData`; on Solana, execute `attachedBracket.svm.delegateIx` first unless it rode the sponsored transaction). The pair becomes a live order on the entry's first fill and sells what the entry received when a leg triggers; the entry stops filling at that point. The response carries the entry's `orderId` alone — the protective order gets its own id once it activates.\n\nPass `quoteId` from the prior quote to lock pricing.\nFor cross-chain market orders, also pass `recipientAddress` and echo a non-null `bridgeQuoteId` from the quote response.","security":[{"ApiKeyAuth":[]}],"x-mint":{"href":"/api-reference/flash/order"},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitOrderRequest"}}}},"responses":{"201":{"description":"Order submitted successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitOrderResponse"}}}},"400":{"description":"Invalid request parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Resource state prevents the requested operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"504":{"description":"Gateway timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/setup-transaction":{"post":{"tags":["Flash"],"summary":"Submit a setup transaction","description":"Broadcast a funder-signed pre-trade setup transaction from `QuoteResponse.setupTxs` — no RPC provider needed. `status: \"pending\"` means broadcast but not yet confirmed, which is normal on slower chains: poll the transaction you signed rather than re-signing it. A `FAILED_PRECONDITION` error means the transaction went stale (expired blockhash, spent nonce, stale fees): request a new quote and re-sign.","security":[{"ApiKeyAuth":[]}],"x-mint":{"href":"/api-reference/flash/setup-transaction"},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitSetupTransactionRequest"}}}},"responses":{"200":{"description":"Setup transaction accepted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitSetupTransactionResponse"}}}},"400":{"description":"Invalid request parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Resource state prevents the requested operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"504":{"description":"Gateway timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/orders":{"get":{"tags":["Flash"],"summary":"List orders","description":"List Flash orders for a funder, most recent first. Returns up to `pageSize` orders per page; pass `nextPageToken` back as `pageToken` to fetch the next page.","security":[{"ApiKeyAuth":[]}],"x-mint":{"href":"/api-reference/flash/list-orders"},"parameters":[{"schema":{"type":"string","minLength":1,"description":"Funder wallet address whose orders to list. When omitted, orders for every funder in the portfolio are returned."},"required":false,"name":"funderAddress","in":"query"},{"schema":{"type":"string","description":"Comma-separated list of order statuses to filter by. When omitted, orders of every status are returned.","example":"ORDER_STATUS_FILLED,ORDER_STATUS_CANCELLED"},"required":false,"name":"statuses","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50,"description":"Number of orders to return. Defaults to 50; capped at 200."},"required":false,"name":"pageSize","in":"query"},{"schema":{"type":"string","description":"Fetch the next page by passing the `nextPageToken` from your previous response. Leave it out to get the first page. Copy the value exactly as-is — it's not meant to be read or built by hand."},"required":false,"name":"pageToken","in":"query"}],"responses":{"200":{"description":"Orders returned successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlashListOrdersResponse"}}}},"400":{"description":"Invalid request parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Resource state prevents the requested operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"504":{"description":"Gateway timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/orders/{orderId}":{"get":{"tags":["Flash"],"summary":"Get order detail","description":"Fetch a single Flash order with its execution fills.","security":[{"ApiKeyAuth":[]}],"x-mint":{"href":"/api-reference/flash/get-order"},"parameters":[{"schema":{"type":"string","format":"uuid","description":"Flash order ID."},"required":true,"name":"orderId","in":"path"},{"schema":{"type":"string","minLength":1,"description":"Funder wallet address that placed the order."},"required":true,"name":"funderAddress","in":"query"}],"responses":{"200":{"description":"Order detail returned successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlashGetOrderResponse"}}}},"400":{"description":"Invalid request parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Resource state prevents the requested operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"504":{"description":"Gateway timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"patch":{"tags":["Flash"],"summary":"Update an order","description":"Update a previously submitted flash order's limit price, trigger price, or bracket legs.\n\nExecuted as a cancel-and-replace under the same `orderId`. What each order type accepts:\n\n| Order type | `limitCrossPrice` / `limitNotionalPrice` | `trigger` | `triggers` |\n| --- | --- | --- | --- |\n| `limit` | yes (exactly one) | no | no |\n| `stop`, `stop-loss`, `take-profit` (no limit price — market execution) | no | yes | no |\n| stop-limit / take-profit-limit (placed with a limit price) | yes (exactly one) | yes | no |\n| `bracket` (standalone, or the pair an attached bracket minted) | no | no | yes (both legs) |\n\nEvery other order type is rejected with `422`. Send at least one of the limit or trigger fields; on the -limit variants both can travel in one update.\n\nOn the -limit variants the limit price is the **post-trigger execution limit** — where the order rests once its trigger fires — and the trigger price is where it arms; each moves independently. A trigger update moves the threshold only: the direction (`triggerType`) and the price basis (cross vs notional) must match what the order's trigger was placed with — unlike the limit price, whose basis can be switched freely. Updating after the trigger has already fired is also valid for the limit price: the resting limit order is cancelled and re-placed at the new price (a trigger update at that point is rejected — there is no trigger left to move).\n\nA `bracket` update re-sends both legs under `triggers`: each leg's new trigger price (same direction and basis it was placed with) and an optional `limitPrice`. The update replaces both legs' prices and limits; a leg sent without `limitPrice` sells at market when it fires. Leg count and directions are fixed. An attached pair is updated by the `bracketOrderId` its entry reports once the entry has filled. Before that `bracketOrderId` is null and there is no bracket order to update: `triggers` sent to the entry itself returns `422` on a `market` or `twap` entry and `400` on a `limit` entry.\n\n**Signature required.** Construct the canonical UTF-8 update message and sign it with the funder wallet:\n\n- Message format (a `Limit ... Price:` line, a `Trigger ... Price:` line, or both — limit first):\n\n```\nDefinitive Flash — Update Order\nOrder: <orderId>\nIssued At: <RFC3339 UTC>\nLimit Cross Price: <decimal>\nTrigger Lower Cross Price: <decimal>\n```\n\n- The `Limit` line is `Limit <Cross|Notional> Price:`, matching the request's limit field. The `Trigger` line is `Trigger <Lower|Upper> <Cross|Notional> Price:` — direction from `trigger.triggerType`, kind from which trigger price field is set. Each price must be byte-identical to the request value.\n- A bracket update has no `Limit` line and one `Trigger` line per leg, the `lower` leg first, each followed by `Trigger <Lower|Upper> Limit Price: <decimal>` only when that leg carries `limitPrice`:\n\n```\nDefinitive Flash — Update Order\nOrder: <orderId>\nIssued At: <RFC3339 UTC>\nTrigger Lower Notional Price: <decimal>\nTrigger Lower Limit Price: <decimal>\nTrigger Upper Notional Price: <decimal>\n```\n\n- The message binds the order id, every updated value, and an `Issued At:` freshness stamp (rejected outside a small skew window) to prevent replay of a captured signature. Use RFC3339 with sub-second precision (e.g. `new Date().toISOString()`) to issue more than one update per second on the same order.\n- **EVM chains** — sign with EIP-191 `personal_sign` over the message bytes; pass the 65-byte 0x-prefixed hex signature as `userSignature`.\n- **SVM** (`solana`) — sign with Ed25519 over the message bytes; pass the 64-byte base58 signature as `userSignature`.\n- Echo the exact message text back as `updateMessage`.\n\nErrors: `400` when the order type takes the update but not the fields sent (`trigger` on a `limit` or `bracket` order, a limit on a market-execution trigger type or a `bracket`, `triggers` on anything but a `bracket`), the new trigger changes direction or basis, a price or leg limit is not positive, or the order would fall below the minimum notional at the new prices (`order below minimum notional size requirement`); `422` when the order type cannot be updated at all, the new trigger price would fire immediately at the current market, the trigger has already fired (on a `bracket`, either leg), the order is pending cancel or already pending an update, or the order is closed — filled, cancelled, expired, or rejected (`order is closed and can no longer be updated`); `404` when the order does not exist, is not in the API key's portfolio, or the signature does not verify.","security":[{"ApiKeyAuth":[]}],"x-mint":{"href":"/api-reference/flash/update"},"parameters":[{"schema":{"type":"string","format":"uuid","description":"Flash order ID."},"required":true,"name":"orderId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateOrderRequest"}}}},"responses":{"200":{"description":"Order updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateOrderResponse"}}}},"400":{"description":"Invalid request parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Resource state prevents the requested operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"504":{"description":"Gateway timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/orders/cancel":{"post":{"tags":["Flash"],"summary":"Cancel orders in batch","description":"Cancel up to 25 flash orders with one funder signature. Returns 200 with one result per order id, in request order; partial success is reported per order, never as a whole-call failure.\n\n**Signature required.** Construct the canonical UTF-8 batch cancel message and sign it with the funder wallet:\n\n- Message format: `\"Definitive Flash v1 — Cancel Orders\\nOrders:\\n<orderId>\\n<orderId>...\"` — one lowercase UUID per line, in the same order as `orderIds`, no trailing newline. Identical bytes across EVM and SVM; only the signing primitive differs.\n- **EVM chains** — sign with EIP-191 `personal_sign` over the message bytes; pass the 65-byte 0x-prefixed hex signature as `userSignature`.\n- **SVM** (`solana`) — sign with Ed25519 over the message bytes; pass the 64-byte base58 signature as `userSignature`.\n- Echo the exact message text back as `cancelMessage`.\n\nOne wallet per batch: ids the signer does not fund come back `NOT_FOUND` and the rest proceed. A `userSignature` that is not valid hex or base58 is rejected with `400 INVALID_SIGNATURE` before any lookup; a well-formed signature that fails to verify is reported per order as `NOT_FOUND`, never as a 4xx.\n\nEach result mirrors single cancel: `ok: true` for a fresh or already-cancelled order; otherwise `ok: false` with an `errorCode` standing in for the status single cancel would have returned. `PENDING_CANCEL` means a cancel is already in flight — treat it as cancelled and confirm via `GET /orders/{orderId}`.\n\nCancelling an entry order never cancels its attached bracket pair; include the bracket's own id to cancel it.","security":[{"ApiKeyAuth":[]}],"x-mint":{"href":"/api-reference/flash/batch-cancel"},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchCancelOrderRequest"}}}},"responses":{"200":{"description":"Per-order results, in request order","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchCancelOrderResponse"}}}},"400":{"description":"Invalid request parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Resource state prevents the requested operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"504":{"description":"Gateway timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/orders/{orderId}/cancel":{"post":{"tags":["Flash"],"summary":"Cancel an order","description":"Cancel a previously submitted flash order.\n\n**Signature required.** Construct the canonical UTF-8 cancel message and sign it with the funder wallet:\n\n- Message format: `\"Definitive Flash v1 — Cancel Order\\nOrder: <orderId>\"` — identical bytes across EVM and SVM; only the signing primitive differs.\n- **EVM chains** — sign with EIP-191 `personal_sign` over the message bytes; pass the 65-byte 0x-prefixed hex signature as `userSignature`.\n- **SVM** (`solana`) — sign with Ed25519 over the message bytes; pass the 64-byte base58 signature as `userSignature`.\n- Echo the exact message text back as `cancelMessage`.\n\nIdempotent: cancelling an already-cancelled order returns 200, not 422.","security":[{"ApiKeyAuth":[]}],"x-mint":{"href":"/api-reference/flash/cancel"},"parameters":[{"schema":{"type":"string","format":"uuid","description":"Flash order ID."},"required":true,"name":"orderId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelOrderRequest"}}}},"responses":{"200":{"description":"Order cancelled (or already cancelled)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelOrderResponse"}}}},"400":{"description":"Invalid request parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Resource state prevents the requested operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"504":{"description":"Gateway timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/search":{"get":{"tags":["Flash"],"summary":"Search assets","description":"Search tradable assets by symbol, name, or contract address.\n\nResults are ranked by relevance and market quality, most relevant first. The returned `address` and `chain` feed directly into `POST /quote` as `targetAsset`/`contraAsset` and `targetChain`/`contraChain`.\n\nPass `chain` to restrict results to a single chain.","security":[{"ApiKeyAuth":[]}],"x-mint":{"href":"/api-reference/flash/search"},"parameters":[{"schema":{"type":"string","minLength":1,"description":"Symbol, name, or contract address.","example":"pepe","x-default":"pepe"},"required":true,"example":"pepe","name":"query","in":"query"},{"schema":{"type":"string","enum":["arbitrum","avalanche","base","bsc","ethereum","optimism","polygon","solana","hyperevm","plasma","monad","robinhood","ink","arc","elysium"],"description":"Restrict results to a single chain."},"required":false,"name":"chain","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":25,"default":10,"description":"Maximum assets to return. Defaults to 10; capped at 25."},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"Assets returned successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlashSearchAssetsResponse"}}}},"400":{"description":"Invalid request parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Resource state prevents the requested operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"504":{"description":"Gateway timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/balances/{address}":{"get":{"tags":["Flash"],"summary":"Get wallet balances","description":"Fetch the token balances a wallet holds as a flat array, with `chain` on every row.\n\nAn EVM address returns balances across every EVM chain Flash supports; a Solana address returns Solana balances. Each row's `address` and `chain` feed directly into `POST /quote` as `targetAsset`/`contraAsset` and `targetChain`/`contraChain`, and `balance` is in the same units as `qty`.","security":[{"ApiKeyAuth":[]}],"x-mint":{"href":"/api-reference/flash/balances"},"parameters":[{"schema":{"type":"string","description":"Wallet address to look up. An EVM address returns balances across every EVM chain Flash supports; a Solana address returns Solana balances.","example":"0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045","x-default":"0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"},"required":true,"example":"0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045","name":"address","in":"path"}],"responses":{"200":{"description":"Balances returned successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlashBalancesResponse"}}}},"400":{"description":"Invalid request parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Authentication failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Resource state prevents the requested operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service temporarily unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"504":{"description":"Gateway timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}