curl --request POST \
--url https://flash.definitive.fi/v1/order \
--header 'Content-Type: application/json' \
--header 'x-definitive-api-key: <api-key>' \
--data '
{
"targetChain": "ethereum",
"contraChain": "ethereum",
"targetAsset": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
"contraAsset": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"side": "buy",
"qty": "1.5",
"orderType": "market",
"funderAddress": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"userSignature": "0x...",
"quickTrade": true,
"maxSlippage": "<string>",
"maxPriceImpact": "<string>",
"limitNotionalPrice": "4000",
"limitCrossPrice": "4000",
"recipientAddress": "<string>",
"quoteId": "<string>",
"bridgeQuoteId": "<string>",
"flashIntegratorFeeBps": "10",
"erc8021AttributionCode": "acme",
"evmOrderTypedData": "<string>",
"evmPermitTypedData": "<string>",
"evmPermitSignature": "<string>",
"svmNonce": "<string>",
"svmDeadline": "<string>",
"svmSponsoredDelegateTx": "<string>",
"twapBucketCount": 1281,
"startTime": "2026-05-12T00:00:00Z",
"triggers": [
{
"notionalPrice": "1800",
"crossPrice": "1800"
}
]
}
'import requests
url = "https://flash.definitive.fi/v1/order"
payload = {
"targetChain": "ethereum",
"contraChain": "ethereum",
"targetAsset": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
"contraAsset": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"side": "buy",
"qty": "1.5",
"orderType": "market",
"funderAddress": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"userSignature": "0x...",
"quickTrade": True,
"maxSlippage": "<string>",
"maxPriceImpact": "<string>",
"limitNotionalPrice": "4000",
"limitCrossPrice": "4000",
"recipientAddress": "<string>",
"quoteId": "<string>",
"bridgeQuoteId": "<string>",
"flashIntegratorFeeBps": "10",
"erc8021AttributionCode": "acme",
"evmOrderTypedData": "<string>",
"evmPermitTypedData": "<string>",
"evmPermitSignature": "<string>",
"svmNonce": "<string>",
"svmDeadline": "<string>",
"svmSponsoredDelegateTx": "<string>",
"twapBucketCount": 1281,
"startTime": "2026-05-12T00:00:00Z",
"triggers": [
{
"notionalPrice": "1800",
"crossPrice": "1800"
}
]
}
headers = {
"x-definitive-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-definitive-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
targetChain: 'ethereum',
contraChain: 'ethereum',
targetAsset: '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2',
contraAsset: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48',
side: 'buy',
qty: '1.5',
orderType: 'market',
funderAddress: '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045',
userSignature: '0x...',
quickTrade: true,
maxSlippage: '<string>',
maxPriceImpact: '<string>',
limitNotionalPrice: '4000',
limitCrossPrice: '4000',
recipientAddress: '<string>',
quoteId: '<string>',
bridgeQuoteId: '<string>',
flashIntegratorFeeBps: '10',
erc8021AttributionCode: 'acme',
evmOrderTypedData: '<string>',
evmPermitTypedData: '<string>',
evmPermitSignature: '<string>',
svmNonce: '<string>',
svmDeadline: '<string>',
svmSponsoredDelegateTx: '<string>',
twapBucketCount: 1281,
startTime: '2026-05-12T00:00:00Z',
triggers: [{notionalPrice: '1800', crossPrice: '1800'}]
})
};
fetch('https://flash.definitive.fi/v1/order', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"orderId": "ord_xyz789",
"attachedBracket": {
"status": "pending_activation"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": null
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": null
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": null
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": null
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": null
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": null
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": null
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": null
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": null
}
}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.orderTypedDatapayload (EIP-712); pass the 0x-prefixed hex signature asuserSignature. Echo the typed data back asevmOrderTypedData. If the quote returnedevm.permitTypedData, sign that too, echo it back asevmPermitTypedData, and pass the signature asevmPermitSignature. - SVM (
solana) — produce a 64-byte Ed25519 signature oversvm.orderMessage; pass the base58 signature asuserSignature. Also echosvm.nonceassvmNonceandsvm.deadlineassvmDeadlinefrom the quote response. Ifsvm.sponsoredDelegateTxis non-null, sign and echo it back assvmSponsoredDelegateTx— Definitive covers the network fee.
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.
Pass quoteId from the prior quote to lock pricing.
For cross-chain market orders, also pass recipientAddress and echo a non-null bridgeQuoteId from the quote response.
curl --request POST \
--url https://flash.definitive.fi/v1/order \
--header 'Content-Type: application/json' \
--header 'x-definitive-api-key: <api-key>' \
--data '
{
"targetChain": "ethereum",
"contraChain": "ethereum",
"targetAsset": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
"contraAsset": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"side": "buy",
"qty": "1.5",
"orderType": "market",
"funderAddress": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"userSignature": "0x...",
"quickTrade": true,
"maxSlippage": "<string>",
"maxPriceImpact": "<string>",
"limitNotionalPrice": "4000",
"limitCrossPrice": "4000",
"recipientAddress": "<string>",
"quoteId": "<string>",
"bridgeQuoteId": "<string>",
"flashIntegratorFeeBps": "10",
"erc8021AttributionCode": "acme",
"evmOrderTypedData": "<string>",
"evmPermitTypedData": "<string>",
"evmPermitSignature": "<string>",
"svmNonce": "<string>",
"svmDeadline": "<string>",
"svmSponsoredDelegateTx": "<string>",
"twapBucketCount": 1281,
"startTime": "2026-05-12T00:00:00Z",
"triggers": [
{
"notionalPrice": "1800",
"crossPrice": "1800"
}
]
}
'import requests
url = "https://flash.definitive.fi/v1/order"
payload = {
"targetChain": "ethereum",
"contraChain": "ethereum",
"targetAsset": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
"contraAsset": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"side": "buy",
"qty": "1.5",
"orderType": "market",
"funderAddress": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"userSignature": "0x...",
"quickTrade": True,
"maxSlippage": "<string>",
"maxPriceImpact": "<string>",
"limitNotionalPrice": "4000",
"limitCrossPrice": "4000",
"recipientAddress": "<string>",
"quoteId": "<string>",
"bridgeQuoteId": "<string>",
"flashIntegratorFeeBps": "10",
"erc8021AttributionCode": "acme",
"evmOrderTypedData": "<string>",
"evmPermitTypedData": "<string>",
"evmPermitSignature": "<string>",
"svmNonce": "<string>",
"svmDeadline": "<string>",
"svmSponsoredDelegateTx": "<string>",
"twapBucketCount": 1281,
"startTime": "2026-05-12T00:00:00Z",
"triggers": [
{
"notionalPrice": "1800",
"crossPrice": "1800"
}
]
}
headers = {
"x-definitive-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-definitive-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
targetChain: 'ethereum',
contraChain: 'ethereum',
targetAsset: '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2',
contraAsset: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48',
side: 'buy',
qty: '1.5',
orderType: 'market',
funderAddress: '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045',
userSignature: '0x...',
quickTrade: true,
maxSlippage: '<string>',
maxPriceImpact: '<string>',
limitNotionalPrice: '4000',
limitCrossPrice: '4000',
recipientAddress: '<string>',
quoteId: '<string>',
bridgeQuoteId: '<string>',
flashIntegratorFeeBps: '10',
erc8021AttributionCode: 'acme',
evmOrderTypedData: '<string>',
evmPermitTypedData: '<string>',
evmPermitSignature: '<string>',
svmNonce: '<string>',
svmDeadline: '<string>',
svmSponsoredDelegateTx: '<string>',
twapBucketCount: 1281,
startTime: '2026-05-12T00:00:00Z',
triggers: [{notionalPrice: '1800', crossPrice: '1800'}]
})
};
fetch('https://flash.definitive.fi/v1/order', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"orderId": "ord_xyz789",
"attachedBracket": {
"status": "pending_activation"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": null
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": null
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": null
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": null
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": null
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": null
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": null
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": null
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": null
}
}Authorizations
Your Definitive API key.
Body
Chain of the target (traded) asset. May differ from contraChain for a cross-chain market order.
arbitrum, avalanche, base, bsc, ethereum, optimism, polygon, solana, hyperevm, plasma, monad, robinhood, ink, arc "ethereum"
Chain of the contra (counter) asset. May differ from targetChain for a cross-chain market order.
arbitrum, avalanche, base, bsc, ethereum, optimism, polygon, solana, hyperevm, plasma, monad, robinhood, ink, arc "ethereum"
Address of the target (traded) asset.
1"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"
Address of the contra (counter) asset — spent on buys, received on sells.
1"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"
direction of the order
buy, sell "buy"
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.
"1.5"
Order type. Cross-chain orders support market only.
market, limit, twap, stop, stop-loss, take-profit, bracket "market"
1"0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"
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.
1"0x..."
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.
Slippage tolerance as a decimal (e.g. 0.05 = 5%). When omitted, our engine sets a slippage at order admission.
Maximum price impact as a decimal (e.g. 0.05 = 5%). When omitted, our engine applies the order-type-specific default at admission.
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).
"4000"
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.
"4000"
Address that receives funds on the destination chain. Required when targetChain and contraChain differ.
1QuoteResponse.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.
1QuoteResponse.bridgeQuoteId. Cross-chain only; binds submission to the cached bridge quote when present.
1"10"
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.
^[a-zA-Z0-9_.-]{1,32}$"acme"
Echo of QuoteResponse.evm.orderTypedData. EVM-only.
Echo of QuoteResponse.evm.permitTypedData. EVM-only.
Permit2 signature over evm.permitTypedData. EVM-only; accepts 0x-prefixed hex.
Echo of QuoteResponse.svm.nonce. SVM-only.
Unix-seconds expiry, echo of QuoteResponse.svm.deadline. SVM-only (the EVM deadline is encoded inside evm.orderTypedData).
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.
TWAP only. Must equal the value used at quote time.
2 <= x <= 2560TWAP only. Scheduled execution start; must equal the value used at quote time.
"2026-05-12T00:00:00Z"
Price triggers. Each entry requires exactly one of notionalPrice or crossPrice. Must echo the values used at quote time for trigger orders.
2Show child attributes
Show child attributes
The attached take-profit / stop-loss pair: the legs as quoted plus the signature material from the quote's attachedBracket block.
Show child attributes
Show child attributes