POST /swap returns unsigned transaction calldata for a route: a swap on one chain (mode: "single-chain") or a transfer between two chains (mode: "cross-chain"). Olympex never signs or broadcasts your transaction. You approve the input token when needed, then send the transaction from account with your own signer. Get a quote from POST /quotes first and pass its dexHash here.Sign swaps with an API key of the partner account, like the quote. A child account of a partner can’t call this endpoint: it gets 403FORBIDDEN.
The response is real calldata for mainnet contracts. Broadcasting it from account moves that wallet’s funds, and there is no testnet or sandbox. Start with small amounts.
Request body
The swap takes the same trade as the quote, plus the wallet and the route:
Purpose
Single-chain swap
Cross-chain swap
Cross-chain quote, for comparison
Chains
chainId (integer)
fromChainId, toChainId (integers)
fromChainId, toChainId
Token you sell
inTokenAddress
inTokenAddress
inTokenAddress
Token you receive
outTokenAddress
outTokenAddress
outTokenAddress
Size and protection
amount, slippage
amount, slippage
amount, slippage
Gas price hint
gasPrice (whole gwei, rounded up)
Not sent
Not sent
Wallet
account
account
Not sent
Route
dexHash
dexHash
Returned as quote.dexHash
dexHash is the quote.dexHash that POST /quotes returned for the same pair and amount: 0x and 64 lowercase hex digits that identify the liquidity source. Copy it exactly. Uppercase hex fails with 400 VALIDATION_ERROR ("dexHash must be a lowercase 32-byte hex value"), and a hash Olympex doesn’t know, or a hash from the other mode, fails with 400 VALIDATION_ERROR ("Unknown or disabled dexHash"). On single-chain quotes, quote.aggregatorOrder lists the dexHash of every source that quoted, best first: if the swap fails with 422 NO_ROUTE or 500 SWAP_ERROR, or eth_estimateGas of its calldata reverts, build it again with the next one. Liquidity sources maps each single-chain dexHash to its source.
account is the wallet that sends the transaction and receives the output (on the destination chain, for cross-chain). The calldata is bound to it.
Keep the quote’s inputs. Send the same amount, slippage, gasPrice (single-chain) and, if you used it, fees object. amount stays human-readable: "10" is 10 USDT. See Gas and fees for fees.
dryRun is accepted on single-chain bodies for compatibility and has no effect, because this endpoint never broadcasts. Cross-chain bodies reject it with 400, like any other unknown top-level key.
Response fields
Field
Mode
Meaning
to
Both
The Olympex aggregator contract on the chain you send from. The transaction’s to.
data
Single-chain
Transaction calldata.
calldata
Cross-chain
Transaction calldata. Same role as data, different name.
value
Both
Native token to send with the transaction, in wei. "0" for ERC-20 input.
contractToApprove
Both
The ERC-20 spender for this swap. Approve this address, not to: they can differ. It isn’t the order contract that limit orders and DCA use.
outAmount
Single-chain
Expected output, in base units of the output token. "9999833" is 9.999833 USDC.
minOutAmount
Single-chain
Minimum output after slippage, in base units. The transaction reverts below it.
dexHash
Cross-chain
Identifies the provider: the same value as the quote’s dexHash. Store it with the transaction hash for POST /tx-status.
Prices move between the quote and the swap. Show your user outAmount and minOutAmount from this response, not from the quote.
Estimate gas yourself
gasLimit is estimatedGas × 2, and estimatedGas is unreliable: it’s "1500000" as a placeholder when the source gives no estimate, it can be "0", and on cross-chain routes it can be a wei amount rather than gas units, depending on the provider. A source’s estimate also covers only its own part of the route, not the Olympex contracts, so the transaction uses more gas than the quote’s estimatedGas. Estimate gas for the exact transaction with eth_estimateGas (from: account, to, data or calldata, value) and add a buffer, for example 20%. Use gasLimit only as a fallback, and never when it’s "0". Gas and fees has more on both estimates.
Check that the calldata executes
A 200 means Olympex built calldata for the route, not that the transaction succeeds: a source can return calldata that reverts. Always run eth_estimateGas on the exact transaction before you send it, and treat a revert as a failed build:
Rule out your side first. Check the allowance to contractToApprove, the balance of account and the calldata’s expiry.
Fall back to another route. If those are fine, the route can’t execute. For a single-chain swap, build it again with the next dexHash in the quote’s aggregatorOrder. Each source prices the trade separately, and a fallback can return noticeably less, so compare its outAmount and minOutAmount with the first build. For a cross-chain swap, request a new quote and build with its dexHash. Show the user the new outAmount and minOutAmount before they sign.
Send right after you build. Some routes include a market maker’s firm quote (an RFQ leg) whose price expires within seconds of the build. If the estimate or the transaction reverts because that quote expired, build the swap again and send it at once.
Execute the transaction
1
Approve the exact amount (ERC-20 input only)
Read allowance(account, contractToApprove) on the input token. If it’s below amount in base units, send approve(contractToApprove, amount) for exactly that amount, never an unlimited one, and wait for it to confirm. Some tokens, such as USDT, require you to set the allowance to 0 before you change it: do that first. Native-token input needs no approval.
2
Estimate gas
Call eth_estimateGas from account with to, data (or calldata) and value, then add your buffer. Estimation usually fails until the approval confirms. If it still reverts once the approval has confirmed, don’t send: fall back to another route.
3
Send right away
Send {to, data | calldata, value, gas} from account as soon as you have the estimate. If the approval took a while to confirm, call POST /swap again before you send.
4
Track the result
Poll GET /transactions/{hash} with the chain ID until status is success or reverted, or read the receipt from your RPC. For a cross-chain transfer, then poll POST /tx-status with the source transaction hash, the source chain ID and dexHash.
The calldata carries an on-chain expiry, 5 minutes on most routes. Routes with a market maker’s firm quote expire sooner, within seconds of the build. The calldata is also bound to account: another Olympex swap from the same account can invalidate calldata you built earlier. Call POST /swap right before the user signs, not when you first show the quote, and send at once.
Execute a swap and Cross-chain swap end-to-end cover the full flow, from quote to confirmed transaction.Both 200 examples shorten the calldata with …: a real response carries the full hex string. The single-chain 200 example swaps 10 USDT to USDC on Polygon; the cross-chain 200 example goes from 10 USDT on Polygon to USDT on Ethereum. Estimate gas yourself for both: gasLimit and estimatedGas come from the source.
Base64 of timestamp + "\n" + nonce + "\n" + bodyHash, where timestamp is Unix seconds, nonce is 24 new hexadecimal characters and bodyHash is the unpadded base64url SHA-256 of the canonical body.
x-passphrase
string
header
required
Your account passphrase. Treat it like the secret key.
x-signature
string
header
required
Lowercase hex HMAC-SHA256 (signature v2), keyed with your secret key string (UTF-8, not decoded), of seven lines joined with \n, with no trailing newline: OLPX-HMAC-SHA256-V2, timestamp, nonce, the uppercase method, path, canonicalQuery and bodyHash. path is the request path including /api/v1, without the query string, for example /api/v1/limit-order/<id>. canonicalQuery is the query parameters decoded (+ is a space), sorted by key and then by value, re-encoded per RFC 3986 and joined with &, or the empty string when there is no query. Headers signed for one request are rejected on any other. See Sign requests.
Body
application/json
Single-chain
Cross-chain
mode
enum<string>
required
Available options:
single-chain
params
object
required
Show child attributes
dryRun
boolean
default:true
Accepted for compatibility and ignored: POST /swap never broadcasts, whatever the value.
fees
object
Your integrator fee. It appears in integratorFeeBreakdown.integratorMarginBps and integratorMarginAmount. Olympex charges the fee in the signed request body: no fee is stored on the account. A child account of a partner can't call POST /quotes or POST /swap: it gets 403FORBIDDEN, and the partner account signs quotes and swaps instead.
Show child attributes
Response
Transaction calldata. data.mode matches the request.
success
enum<boolean>
required
Available options:
true
data
Single-chain · object
required
Single-chain
Cross-chain
Show child attributes
meta
object
required
Show child attributes
Was this page helpful?
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Olympex","description":"Build with Olympex: the REST API for aggregated swap quotes, transaction calldata, and cross-chain routing across EVM chains.","colors":{"primary":"#7B5BE6","light":"#B9A6FF","dark":"#6B4FD0"},"logo":{"light":"https://mintcdn.com/olympex/mK1ALhELt9gq8bdx/logo/logo.png?fit=max\u0026auto=format\u0026n=mK1ALhELt9gq8bdx\u0026q=85\u0026s=f95957c16f612d372883edef72525107","dark":"https://mintcdn.com/olympex/mK1ALhELt9gq8bdx/logo/logo.png?fit=max\u0026auto=format\u0026n=mK1ALhELt9gq8bdx\u0026q=85\u0026s=f95957c16f612d372883edef72525107","href":"https://olympex.io"},"favicon":"https://mintcdn.com/olympex/Hv2idqJvAaUqU38v/favicon.png?fit=max\u0026auto=format\u0026n=Hv2idqJvAaUqU38v\u0026q=85\u0026s=1626286ff9a0e7163e0c9c4e0e828db8","api":{"playground":{"display":"simple"},"url":"full"},"appearance":{"default":"dark"},"background":{"color":{"light":"#FFFFFF","dark":"#141319"}},"navbar":{"primary":{"type":"button","label":"Get a test API key","href":"/get-started/create-an-api-key"}},"footer":{"socials":{"x":"https://x.com/olympexlabs","github":"https://github.com/olympex","discord":"https://discord.gg/olympex","linkedin":"https://www.linkedin.com/company/olympex"},"links":[{"header":"Product","items":[{"label":"Olympex app","href":"https://app.olympex.io"},{"label":"Brand assets","href":"/resources/brand-assets"}]},{"header":"Developers","items":[{"label":"API reference","href":"/api-reference/overview"},{"label":"API console","href":"/api-reference/console"},{"label":"OpenAPI spec","href":"/api-reference/openapi-spec"}]},{"header":"Company","items":[{"label":"Talk to us","href":"https://calendar.app.google/zZGNMcrzbQwMjVMJA"},{"label":"Email","href":"mailto:partners@olympex.io"},{"label":"Legal","href":"/legal/terms"}]}]},"seo":{"metatags":{"og:image":"/images/og/default.png","og:site_name":"Olympex API","twitter:card":"summary","twitter:site":"@olympexlabs"},"indexing":"navigable"},"fonts":{"family":"Geist","weight":500,"format":"woff2"},"styling":{"eyebrows":"section","latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"olympex","hasAudioNarration":false,"actualSubdomain":"olympex","customDomains":["docs.olympex.io"],"gitSource":{"type":"github","owner":"devs5t","repo":"olympex-api-docs-cicd","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"feedback":{"thumbs":true},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6ae9db0c22dab27fc6c06261","clientVersion":"0.0.4304","searchFilterCounts":[{"language":"default","tag":"Documentation","count":28},{"language":"default","tag":"API reference","count":26},{"language":"default","tag":"Concepts","count":10},{"language":"default","tag":"Guides","count":8},{"language":"default","tag":"DCA","count":6},{"language":"default","tag":"Authentication","count":6},{"language":"default","tag":"Resources","count":6},{"language":"default","tag":"Limit orders","count":5},{"language":"default","tag":"Accounts and authentication","count":4},{"language":"default","tag":"Overview","count":4}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"site-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"treatment","enabled":true,"payload":{"type":"string","value":"treatment"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":true},"customCss":[{"filePath":"style.css","content":"/* cyrillic-ext */\n@font-face {\n font-family: 'Geist';\n font-style: normal;\n font-weight: 100 900;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geist/v5/gyByhwUxId8gMEwRGFWfOw.woff2) format('woff2');\n unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;\n}\n/* cyrillic */\n@font-face {\n font-family: 'Geist';\n font-style: normal;\n font-weight: 100 900;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geist/v5/gyByhwUxId8gMEwYGFWfOw.woff2) format('woff2');\n unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;\n}\n/* vietnamese */\n@font-face {\n font-family: 'Geist';\n font-style: normal;\n font-weight: 100 900;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geist/v5/gyByhwUxId8gMEwTGFWfOw.woff2) format('woff2');\n unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;\n}\n/* latin-ext */\n@font-face {\n font-family: 'Geist';\n font-style: normal;\n font-weight: 100 900;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geist/v5/gyByhwUxId8gMEwSGFWfOw.woff2) format('woff2');\n unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;\n}\n/* latin */\n@font-face {\n font-family: 'Geist';\n font-style: normal;\n font-weight: 100 900;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geist/v5/gyByhwUxId8gMEwcGFU.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n}\n/* cyrillic-ext */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 100 900;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrodmgPn.woff2) format('woff2');\n unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;\n}\n/* cyrillic */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 100 900;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrMdmgPn.woff2) format('woff2');\n unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;\n}\n/* symbols2 */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 100 900;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFg08vz7ehw.woff2) format('woff2');\n unicode-range: U+2000-2001, U+2004-2008, U+200A, U+23B8-23BD, U+2500-259F;\n}\n/* vietnamese */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 100 900;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrgdmgPn.woff2) format('woff2');\n unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;\n}\n/* latin-ext */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 100 900;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrkdmgPn.woff2) format('woff2');\n unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;\n}\n/* latin */\n@font-face {\n font-family: 'Geist Mono';\n font-style: normal;\n font-weight: 100 900;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/geistmono/v6/or3nQ6H-1_WfwkMZI_qYFrcdmg.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n}\n:root{--olympex-purple: #7B5BE6;--olympex-purple-light: #B9A6FF;--olympex-purple-dark: #6B4FD0;--olympex-purple-deep: #7354FF;--olympex-purple-soft: #A687FF;--olympex-orange: #FEAB59;--olympex-orange-light: #FFCB98;--olympex-bg-dark: #141319;--olympex-bg-dark-2: #0E0D11}html,body,[class*=\"font-\"],[class*=\"text-\"]{font-family:'Geist', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;font-feature-settings:'ss01', 'cv11';-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}h1,h2,h3,h4,h5,h6{font-family:'Geist', system-ui, sans-serif;letter-spacing:-0.018em;font-weight:600}code,pre,kbd,[class*=\"font-mono\"]{font-family:'Geist Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace}.hero-card{background:linear-gradient(135deg, var(--olympex-purple-deep) 0%, var(--olympex-purple-soft) 100%);color:white}.olx-console{--olx-border: rgb(20 19 25 / 0.12);--olx-surface: #ffffff;--olx-surface-2: #f7f6fb;--olx-text: #141319;--olx-muted: rgb(20 19 25 / 0.64);--olx-error: #b42318;--olx-error-bg: rgb(180 35 24 / 0.07);--olx-success: #067647;--olx-success-bg: rgb(6 118 71 / 0.07);--olx-accent: var(--olympex-purple);--olx-accent-hover: var(--olympex-purple-dark);--olx-on-accent: #ffffff;margin:1.5rem 0;border:1px solid var(--olx-border);border-radius:12px;background:var(--olx-surface);color:var(--olx-text);font-size:14px;line-height:1.5;overflow:hidden}html.dark .olx-console,html[data-theme=\"dark\"] .olx-console{--olx-border: rgb(255 255 255 / 0.12);--olx-surface: rgb(255 255 255 / 0.02);--olx-surface-2: var(--olympex-bg-dark-2);--olx-text: #f4f3f8;--olx-muted: rgb(244 243 248 / 0.66);--olx-error: #fda29b;--olx-error-bg: rgb(253 162 155 / 0.1);--olx-success: #75e0a7;--olx-success-bg: rgb(117 224 167 / 0.1);--olx-accent: var(--olympex-purple-light);--olx-accent-hover: #cbbcff;--olx-on-accent: var(--olympex-bg-dark)}.olx-head{display:flex;flex-wrap:wrap;align-items:center;gap:0.5rem 0.75rem;padding:0.75rem 1rem;border-bottom:1px solid var(--olx-border);background:var(--olx-surface-2)}.olx-pill{padding:3px 7px;border-radius:6px;background:var(--olx-accent);color:var(--olx-on-accent);font:600 11px/1.2 'Geist Mono', ui-monospace, monospace;letter-spacing:0.02em;flex:none}.olx-path,.olx-mono{font-family:'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace}.olx-path{font-size:13px;font-weight:500}.olx-request-line{display:flex;align-items:baseline;gap:0.5rem;margin:0;font-size:12.5px;color:var(--olx-muted)}.olx-break{overflow-wrap:anywhere}.olx-wallet{display:grid;gap:0.375rem;justify-items:start;margin-top:0.25rem}.olx-title{margin:0;font-size:14px;font-weight:600;letter-spacing:0;color:var(--olx-muted)}.olx-title-strong{color:var(--olx-text)}.olx-push{margin-left:auto}.olx-body{display:grid;grid-template-columns:minmax(0, 1fr);gap:1.25rem;padding:1rem}.olx-section,.olx-create,.olx-created{display:grid;grid-template-columns:minmax(0, 1fr);gap:0.75rem}.olx-console *{min-width:0}.olx-fieldset{display:grid;gap:0.75rem;margin:0;padding:0;border:0;min-width:0}.olx-legend{padding:0;margin-bottom:0.5rem;font-size:13px;font-weight:600}.olx-grid-3{display:grid;grid-template-columns:repeat(auto-fit, minmax(13rem, 1fr));gap:0.75rem}.olx-field{display:grid;gap:0.25rem;min-width:0}.olx-grow{flex:1 1 220px}.olx-label{font-size:13px;font-weight:500}.olx-input,.olx-select,.olx-textarea{box-sizing:border-box;width:100%;min-height:40px;padding:8px 10px;border:1px solid var(--olx-border);border-radius:8px;background:var(--olx-surface);color:var(--olx-text);font:13px/1.45 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace}html.dark .olx-input,html.dark .olx-select,html.dark .olx-textarea,html[data-theme=\"dark\"] .olx-input,html[data-theme=\"dark\"] .olx-select,html[data-theme=\"dark\"] .olx-textarea{background:var(--olympex-bg-dark-2)}.olx-textarea{resize:vertical;white-space:pre;overflow:auto;tab-size:2}.olx-input[aria-invalid=\"true\"],.olx-textarea[aria-invalid=\"true\"]{border-color:var(--olx-error)}.olx-input-group{display:flex;gap:0.375rem}.olx-input-group .olx-input{flex:1 1 auto}.olx-row{display:flex;flex-wrap:wrap;align-items:center;gap:0.5rem}.olx-space-between{justify-content:space-between}.olx-align-end{align-self:flex-end}.olx-btn{display:inline-flex;align-items:center;justify-content:center;min-height:40px;padding:0 14px;border:1px solid var(--olx-border);border-radius:8px;background:transparent;color:var(--olx-text);font:500 13px/1 'Geist', system-ui, sans-serif;cursor:pointer;white-space:nowrap}.olx-btn:hover:not(:disabled){background:var(--olx-surface-2)}.olx-btn:disabled{opacity:0.5;cursor:not-allowed}.olx-btn-primary{border-color:var(--olx-accent);background:var(--olx-accent);color:var(--olx-on-accent)}.olx-btn-primary:hover:not(:disabled){border-color:var(--olx-accent-hover);background:var(--olx-accent-hover)}.olx-btn-quiet{border-color:transparent}.olx-link,.olx-inline-link{padding:0;border:0;background:none;color:var(--olx-accent);font:inherit;text-decoration:underline;text-underline-offset:2px;cursor:pointer}.olx-inline-actions{display:inline-flex;gap:0.75rem;margin-left:0.75rem}.olx-btn:focus-visible,.olx-link:focus-visible,.olx-inline-link:focus-visible,.olx-input:focus-visible,.olx-select:focus-visible,.olx-textarea:focus-visible,.olx-summary:focus-visible,.olx-pre:focus-visible{outline:3px solid var(--olx-accent);outline-offset:2px}.olx-muted{margin:0;color:var(--olx-muted);font-size:13px}.olx-field-error{margin:0;color:var(--olx-error);font-size:12.5px}.olx-notice{margin:0;padding:0.625rem 0.75rem;border-left:3px solid var(--olx-border);border-radius:6px;background:var(--olx-surface-2);font-size:13px;overflow-wrap:anywhere}.olx-notice-error{border-left-color:var(--olx-error);background:var(--olx-error-bg)}.olx-notice-success{border-left-color:var(--olx-success);background:var(--olx-success-bg)}.olx-pre{box-sizing:border-box;max-width:100%;max-height:420px;margin:0;padding:12px;overflow:auto;border:1px solid var(--olx-border);border-radius:8px;background:var(--olx-surface-2);color:var(--olx-text);font:12.5px/1.5 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;white-space:pre}.olx-status-line{display:flex;flex-wrap:wrap;align-items:baseline;gap:0.375rem 0.875rem;margin:0}.olx-status{font:600 13px/1.4 'Geist Mono', ui-monospace, monospace}.olx-status-ok{color:var(--olx-success)}.olx-status-error{color:var(--olx-error)}.olx-details{border:1px solid var(--olx-border);border-radius:8px;padding:0.5rem 0.75rem}.olx-details[open]{display:grid;gap:0.75rem;padding-bottom:0.75rem}.olx-summary{cursor:pointer;font-size:13px;font-weight:500;padding:0.25rem 0}.olx-kv{display:grid;grid-template-columns:minmax(0, 1fr);gap:0.125rem 1rem;margin:0;font-size:12.5px}.olx-kv dt{font-weight:600}.olx-kv dd{margin:0 0 0.375rem;overflow-wrap:anywhere}.olx-masked{user-select:none;letter-spacing:0.1em}.olx-visually-hidden{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}html.dark,html.dark body,html[data-theme=\"dark\"],html[data-theme=\"dark\"] body{background-color:var(--olympex-bg-dark)}html.dark #sidebar,html.dark aside,html[data-theme=\"dark\"] #sidebar,html[data-theme=\"dark\"] aside{background-color:var(--olympex-bg-dark)}body{zoom:0.97}"}]}
{"page":{"pagePath":"api-reference/swap/build-swap","slug":"/api-reference/swap/build-swap","pageMetadata":{"title":"Build a swap","description":"Get unsigned transaction calldata for a quoted route, on one chain or across two chains.","openapi":"api-reference/openapi.json POST /swap","href":"/api-reference/swap/build-swap"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Get unsigned transaction calldata for a quoted route, on one chain or across two chains.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];const ApiConsole=({operation,view=`console`,defaultOpen=false})=>{const _components={a:`a`,..._provideComponents()};const olxSortKeysDeep=value=>{if(Array.isArray(value))return value.map(olxSortKeysDeep);if(value!==null\u0026\u0026typeof value===`object`){const sorted={};for(const key of Object.keys(value).sort())sorted[key]=olxSortKeysDeep(value[key]);return sorted}return value};const olxCanonicalBody=body=>body===undefined||body===null?``:JSON.stringify(olxSortKeysDeep(body));const olxHex=bytes=>Array.from(bytes,b=>b.toString(16).padStart(2,`0`)).join(``);const olxBase64Url=bytes=>btoa(String.fromCharCode(...bytes)).replace(/\\+/g,`-`).replace(/\\//g,`_`).replace(/=+$/,``);const olxRfc3986=text=>encodeURIComponent(text).replace(/[!'()*]/g,c=>`%${c.charCodeAt(0).toString(16).toUpperCase()}`);const olxCanonicalQuery=search=>Array.from(new URLSearchParams(search)).sort((a,b)=>a[0]\u003cb[0]?-1:a[0]>b[0]?1:a[1]\u003cb[1]?-1:a[1]>b[1]?1:0).map(([key,value])=>`${olxRfc3986(key)}=${olxRfc3986(value)}`).join(`\u0026`);const olxSignRequest=async(method,url,body,credentials,options={})=>{const{apiKeyId,secretKey,passphrase}=credentials;if(!apiKeyId||!secretKey||!passphrase){throw new Error(`API key ID, secret key and passphrase are all required.`)}const encoder=new TextEncoder;const verb=method.toUpperCase();const{pathname:path,search}=new URL(url);const query=olxCanonicalQuery(search);const bodyString=olxCanonicalBody(body);const timestamp=String(options.timestamp??Math.floor(Date.now()/1e3));const nonce=options.nonce??olxHex(crypto.getRandomValues(new Uint8Array(12)));const digest=await crypto.subtle.digest(`SHA-256`,encoder.encode(bodyString));const bodyHash=olxBase64Url(new Uint8Array(digest));const message=[`OLPX-HMAC-SHA256-V2`,timestamp,nonce,verb,path,query,bodyHash].join(`\n`);const key=await crypto.subtle.importKey(`raw`,encoder.encode(secretKey),{name:`HMAC`,hash:`SHA-256`},false,[`sign`]);const signature=olxHex(new Uint8Array(await crypto.subtle.sign(`HMAC`,key,encoder.encode(message))));return{method:verb,path,query,bodyString,bodyHash,timestamp,nonce,message,headers:{\"content-type\":`application/json`,\"x-api-key-id\":apiKeyId,\"x-value-info\":btoa(`${timestamp}\\n${nonce}\\n${bodyHash}`),\"x-passphrase\":passphrase,\"x-signature\":signature}}};const olxKeccak256=input=>{const MASK=(BigInt(1)\u003c\u003cBigInt(64))-BigInt(1);const RC=[`0000000000000001`,`0000000000008082`,`800000000000808a`,`8000000080008000`,`000000000000808b`,`0000000080000001`,`8000000080008081`,`8000000000008009`,`000000000000008a`,`0000000000000088`,`0000000080008009`,`000000008000000a`,`000000008000808b`,`800000000000008b`,`8000000000008089`,`8000000000008003`,`8000000000008002`,`8000000000000080`,`000000000000800a`,`800000008000000a`,`8000000080008081`,`8000000000008080`,`0000000080000001`,`8000000080008008`].map(hex=>BigInt(`0x${hex}`));const ROT=[0,1,62,28,27,36,44,6,55,20,3,10,43,25,39,41,45,15,21,8,18,2,61,56,14];const rotl=(value,bits)=>bits===0?value:(value\u003c\u003cBigInt(bits)|value>>BigInt(64-bits))\u0026MASK;const RATE=136;const padded=new Uint8Array(Math.ceil((input.length+1)/RATE)*RATE);padded.set(input);padded[input.length]^=1;padded[padded.length-1]^=128;const state=new Array(25).fill(BigInt(0));for(let offset=0;offset\u003cpadded.length;offset+=RATE){for(let lane=0;lane\u003cRATE/8;lane++){let value=BigInt(0);for(let byte=7;byte>=0;byte--)value=value\u003c\u003cBigInt(8)|BigInt(padded[offset+lane*8+byte]);state[lane]^=value}for(let round=0;round\u003c24;round++){const column=[0,1,2,3,4].map(x=>state[x]^state[x+5]^state[x+10]^state[x+15]^state[x+20]);for(let x=0;x\u003c5;x++){const delta=column[(x+4)%5]^rotl(column[(x+1)%5],1);for(let y=0;y\u003c25;y+=5)state[x+y]^=delta}const moved=new Array(25);for(let x=0;x\u003c5;x++)for(let y=0;y\u003c5;y++)moved[y+5*((2*x+3*y)%5)]=rotl(state[x+5*y],ROT[x+5*y]);for(let x=0;x\u003c5;x++){for(let y=0;y\u003c5;y++)state[x+5*y]=moved[x+5*y]^~moved[(x+1)%5+5*y]\u0026MASK\u0026moved[(x+2)%5+5*y]}state[0]^=RC[round]}}const out=new Uint8Array(32);for(let lane=0;lane\u003c4;lane++){let value=state[lane];for(let byte=0;byte\u003c8;byte++){out[lane*8+byte]=Number(value\u0026BigInt(255));value>>=BigInt(8)}}return out};const olxBytesToHex=bytes=>Array.from(bytes,b=>b.toString(16).padStart(2,`0`)).join(``);const olxIsAddress=value=>typeof value===`string`\u0026\u0026/^0x[0-9a-fA-F]{40}$/.test(value);const olxChecksumAddress=address=>{if(!olxIsAddress(address))throw new Error(`Not an address: ${address}`);const lower=address.slice(2).toLowerCase();const hash=olxBytesToHex(olxKeccak256(new TextEncoder().encode(lower)));return`0x${Array.from(lower,(char,i)=>parseInt(hash[i],16)>=8?char.toUpperCase():char).join(``)}`};const olxOrderPairDigest=(maker,tokenIn,tokenOut)=>{const packed=new Uint8Array(80);[maker,maker,tokenIn,tokenOut].forEach((address,index)=>{if(!olxIsAddress(address))throw new Error(`Not an address: ${address}`);for(let i=0;i\u003c20;i++)packed[index*20+i]=parseInt(address.slice(2+i*2,4+i*2),16)});return`0x${olxBytesToHex(olxKeccak256(packed))}`};const BASE_URL=`https://api-rest.olympex.io/api/v1`;const TIMEOUT_MS=35e3;const STORE_KEY=`olympex.apiConsole`;const KEY_ID_STORAGE=`olympex.apiConsole.apiKeyId`;const CREATE_KEY_HREF=`/get-started/create-an-api-key`;const ACCOUNT=`0x1E67cb01969D79B2B895179e4A07D24a839dBb52`;const NATIVE=`0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE`;const USDT_POLYGON=`0xc2132d05d31c914a87c6611c10748aeb04b58e8f`;const USDC_POLYGON=`0x3c499c542cef5e3811e1192ce70d8cc03d5c3359`;const WETH_POLYGON=`0x7ceb23fd6bc0add59e62ac25578270cff1b9f619`;const USDT_ETHEREUM=`0xdac17f958d2ee523a2206206994597c13d831ec7`;const SIGNATURE_PLACEHOLDER=`0x\u003cuse Sign with wallet, or paste the maker's 65-byte signature>`;const SIGNATURE_PATTERN=/^0x[0-9a-fA-F]{130}$/;const BODY_METHODS=[`POST`,`PATCH`,`PUT`];const GROUPS=[`Swaps`,`Chains and tokens`,`Limit orders`,`DCA`];const LIMIT_ORDER_STATUSES=[`pending`,`executing`,`submitted`,`completed`,`cancelled`,`failed`];const DCA_STRATEGY_STATUSES=[`pending`,`active`,`cancelled`,`finished`];const ID_PARAM=(resource,label)=>({name:`id`,in:`path`,required:true,resource,placeholder:`${label} ID`});const OPERATIONS={quotes:{group:`Swaps`,title:`Get a quote`,method:`POST`,path:`/quotes`,presets:[{label:`Single-chain: 10 USDT to USDC on Polygon`,body:{mode:`single-chain`,params:{amount:`10`,chainId:137,gasPrice:`35`,inTokenAddress:USDT_POLYGON,outTokenAddress:USDC_POLYGON,slippage:`1`}}},{label:`Cross-chain: 10 USDT on Polygon to USDT on Ethereum`,body:{mode:`cross-chain`,params:{amount:`10`,fromChainId:137,inTokenAddress:USDT_POLYGON,outTokenAddress:USDT_ETHEREUM,slippage:`1`,toChainId:1}}}]},swap:{group:`Swaps`,title:`Build a swap transaction`,method:`POST`,path:`/swap`,note:`Set dexHash to the value your quote returned for the same pair and amount. The response is real transaction calldata; nothing is broadcast.`,presets:[{label:`Single-chain: 10 USDT to USDC on Polygon`,body:{mode:`single-chain`,params:{account:ACCOUNT,amount:`10`,chainId:137,dexHash:`0xd9bf0c0ec020d1a26ba6698a24db3a538215d8fbf30588bddde694887c4cb55e`,gasPrice:`35`,inTokenAddress:USDT_POLYGON,outTokenAddress:USDC_POLYGON,slippage:`1`}}},{label:`Cross-chain: 10 USDT on Polygon to USDT on Ethereum`,body:{mode:`cross-chain`,params:{account:ACCOUNT,amount:`10`,dexHash:`0x2676e2ee99986d45baa8242aea50a63a90b996df49a22e8975ba756b3706279f`,fromChainId:137,inTokenAddress:USDT_POLYGON,outTokenAddress:USDT_ETHEREUM,slippage:`1`,toChainId:1}}}]},txStatus:{group:`Swaps`,title:`Get cross-chain transfer status`,method:`POST`,path:`/tx-status`,note:`Use the source-chain transaction hash you broadcast and the dexHash from the cross-chain swap response.`,presets:[{label:`Example transfer (replace hash)`,body:{chainId:137,dexHash:`0x6c2142a4113d1a2ef94717109dd5ac71f69439465f95a170fb9cf0f56d76ad7c`,hash:`0x5f2b0a3c3e8f9d1b7a6c4e2d0f8b6a4c2e0d8f6b4a2c0e8d6f4b2a0c8e6d4f2b`}}]},transaction:{group:`Swaps`,title:`Get on-chain transaction status`,method:`GET`,path:`/transactions/{hash}`,note:`An unknown hash returns not_found, so you can poll right after you broadcast.`,params:[{name:`hash`,in:`path`,required:true,placeholder:`0x and 64 hex characters`},{name:`chainId`,in:`query`,required:true,placeholder:`137`}],presets:[{label:`Example on Polygon`,params:{chainId:`137`,hash:`0xcf2337ce50fd03cc2d8f9a312ff1409adf96a7468e7b0ecd352203088d884322`}}]},chains:{group:`Chains and tokens`,title:`List enabled chains`,method:`GET`,path:`/chains`,presets:[{label:`All enabled chains`}]},tokens:{group:`Chains and tokens`,title:`List tokens for a chain`,method:`GET`,path:`/tokens`,params:[{name:`chainId`,in:`query`,required:true,placeholder:`137`}],presets:[{label:`Polygon (137)`,params:{chainId:`137`}},{label:`Ethereum (1)`,params:{chainId:`1`}},{label:`BNB Chain (56)`,params:{chainId:`56`}}]},supportChain:{group:`Chains and tokens`,title:`Check chain support`,method:`POST`,path:`/support-chain`,presets:[{label:`Polygon (137)`,body:{chainId:137}},{label:`zkSync Era (324)`,body:{chainId:324}}]},listLimitOrders:{group:`Limit orders`,title:`List limit orders`,method:`GET`,path:`/limit-order`,captures:`limitOrder`,params:[{name:`status`,in:`query`,options:LIMIT_ORDER_STATUSES},{name:`chainId`,in:`query`,placeholder:`137`},{name:`accountTo`,in:`query`,placeholder:ACCOUNT}],presets:[{label:`All limit orders for this API key`},{label:`Pending on Polygon`,params:{chainId:`137`,status:`pending`}}]},createLimitOrder:{group:`Limit orders`,title:`Create a limit order`,method:`POST`,path:`/limit-order`,captures:`limitOrder`,note:`Creates a real order. It can execute only after the maker wallet signs the pair and grants the Olympex order contract an allowance.`,walletSign:{tokenIn:`inTokenAddress`,tokenOut:`outTokenAddress`},presets:[{label:`Sell 0.5 WETH for USDC on Polygon at 4,200`,body:()=>({accountTo:ACCOUNT,amount:`0.5`,chainId:137,expired:String(Date.now()+7*24*60*60*1e3),gasPrice:`35`,inTokenAddress:WETH_POLYGON,outTokenAddress:USDC_POLYGON,price:`4200`,priceTrigger:`4200`,signature:SIGNATURE_PLACEHOLDER,slippage:`1`,tokenASymbol:`WETH`,tokenBSymbol:`USDC`})}]},getLimitOrder:{group:`Limit orders`,title:`Get a limit order`,method:`GET`,path:`/limit-order/{id}`,params:[ID_PARAM(`limitOrder`,`Limit order`)],presets:[{label:`Limit order by ID`}]},updateLimitOrder:{group:`Limit orders`,title:`Update a limit order`,method:`PATCH`,path:`/limit-order/{id}`,params:[ID_PARAM(`limitOrder`,`Limit order`)],note:`Only while the order is pending. Send only the fields you change: priceTrigger and price, amount, expired, slippage or gasPrice. To change the tokens, the chain or the maker, cancel the order and create a new one.`,presets:[{label:`Raise the limit price to 4,300`,body:{price:`4300`,priceTrigger:`4300`}}]},cancelLimitOrder:{group:`Limit orders`,title:`Cancel a limit order`,method:`DELETE`,path:`/limit-order/{id}`,params:[ID_PARAM(`limitOrder`,`Limit order`)],presets:[{label:`Cancel by ID`}]},listDcaStrategies:{group:`DCA`,title:`List DCA strategies`,method:`GET`,path:`/dca-order/strategies`,captures:`dcaStrategy`,params:[{name:`status`,in:`query`,options:DCA_STRATEGY_STATUSES},{name:`accountTo`,in:`query`,placeholder:ACCOUNT}],presets:[{label:`All DCA strategies for this API key`},{label:`Active strategies`,params:{status:`active`}}]},createDcaStrategy:{group:`DCA`,title:`Create a DCA strategy`,method:`POST`,path:`/dca-order/strategies`,captures:`dcaStrategy`,note:`Creates a real strategy that starts right away. Its orders execute only after the maker wallet signs the pair and grants the Olympex order contract an allowance.`,walletSign:{tokenIn:`tokenAddressFrom`,tokenOut:`tokenAddressTo`},presets:[{label:`Buy WETH with 100 USDC in 10 daily orders on Polygon`,body:{accountTo:ACCOUNT,chainIdFrom:137,chainIdTo:137,frequency:86400,iterations:10,pair:`USDC/WETH`,signature:SIGNATURE_PLACEHOLDER,slippage:1,tokenAddressFrom:USDC_POLYGON,tokenAddressTo:WETH_POLYGON,tokenSymbolFrom:`USDC`,tokenSymbolTo:`WETH`,totalAmount:100}}]},getDcaStrategy:{group:`DCA`,title:`Get a DCA strategy`,method:`GET`,path:`/dca-order/strategies/{id}`,params:[ID_PARAM(`dcaStrategy`,`Strategy`)],presets:[{label:`Strategy by ID`}]},updateDcaStrategy:{group:`DCA`,title:`Update a DCA strategy`,method:`PATCH`,path:`/dca-order/strategies/{id}`,params:[ID_PARAM(`dcaStrategy`,`Strategy`)],note:`Send only the fields you change.`,presets:[{label:`Cancel the strategy`,body:{status:`cancelled`}}]},listDcaStrategyOrders:{group:`DCA`,title:`List a strategy's DCA orders`,method:`GET`,path:`/dca-order/strategies/{id}/orders`,captures:`dcaOrder`,params:[ID_PARAM(`dcaStrategy`,`Strategy`)],presets:[{label:`Orders of a strategy`}]},getDcaOrder:{group:`DCA`,title:`Get a DCA order`,method:`GET`,path:`/dca-order/orders/{id}`,params:[ID_PARAM(`dcaOrder`,`DCA order`)],presets:[{label:`DCA order by ID`}]}};const OPERATION_IDS=Object.keys(OPERATIONS);const RESOURCE_LABEL={limitOrder:`limit order`,dcaStrategy:`DCA strategy`,dcaOrder:`DCA order`};const STATUS_TEXT={200:`OK`,400:`Bad Request`,401:`Unauthorized`,403:`Forbidden`,404:`Not Found`,409:`Conflict`,422:`Unprocessable Entity`,429:`Too Many Requests`,500:`Internal Server Error`,502:`Bad Gateway`,503:`Service Unavailable`,504:`Gateway Timeout`};const REDACT_KEYS=/^(x-passphrase|passphrase|password|secretKey|secret_key)$/i;const UUID=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;const getStore=()=>{const symbol=Symbol.for(STORE_KEY);if(!window[symbol]){window[symbol]={credentials:{apiKeyId:``,secretKey:``,passphrase:``},listeners:new Set,lastIds:{}}}if(!window[symbol].lastIds)window[symbol].lastIds={};return window[symbol]};const publishCredentials=next=>{const store=getStore();store.credentials={...next};try{if(next.apiKeyId)window.sessionStorage.setItem(KEY_ID_STORAGE,next.apiKeyId);else window.sessionStorage.removeItem(KEY_ID_STORAGE)}catch(storageError){}store.listeners.forEach(listener=>listener(store.credentials))};const pretty=value=>JSON.stringify(value,null,2);const redact=value=>{if(Array.isArray(value))return value.map(redact);if(value!==null\u0026\u0026typeof value===`object`){const out={};for(const key of Object.keys(value))out[key]=REDACT_KEYS.test(key)?`•••••• (hidden)`:redact(value[key]);return out}return value};const findProtoKey=value=>{if(Array.isArray(value))return value.some(findProtoKey);if(value!==null\u0026\u0026typeof value===`object`){return Object.keys(value).some(key=>key===`__proto__`||findProtoKey(value[key]))}return false};const validPassphrase=value=>/^[\\x20-\\x7E]+$/.test(value)\u0026\u0026value.trim()===value;const shellQuote=text=>`'${text.replace(/'/g,`'\\\\''`)}'`;const clock=seconds=>`${new Date(seconds*1e3).toISOString().slice(11,19)} UTC`;const randomToken=bytes=>olxBase64Url(crypto.getRandomValues(new Uint8Array(bytes)));const randomHex=bytes=>olxHex(crypto.getRandomValues(new Uint8Array(bytes)));const hasBodyFor=spec=>BODY_METHODS.includes(spec.method);const presetBody=preset=>{const body=preset\u0026\u0026preset.body;if(!body)return{};return typeof body===`object`?body:body()};const presetBodyText=(spec,preset)=>hasBodyFor(spec)?pretty(presetBody(preset)):``;const initialParams=(spec,preset,lastIds={})=>{const values={};(spec.params||[]).forEach(param=>{const fromPreset=preset\u0026\u0026preset.params?preset.params[param.name]:undefined;values[param.name]=fromPreset!==undefined?String(fromPreset):param.resource\u0026\u0026lastIds[param.resource]?lastIds[param.resource]:``});return values};const buildUrl=(spec,values)=>{const path=spec.path.replace(/\\{(\\w+)\\}/g,(match,name)=>encodeURIComponent((values[name]||``).trim()));const query=new URLSearchParams;(spec.params||[]).filter(param=>param.in===`query`).forEach(param=>{const value=(values[param.name]||``).trim();if(value)query.append(param.name,value)});const search=query.toString();return`${BASE_URL}${path}${search?`?${search}`:``}`};const captureIds=(spec,data)=>{if(!spec.captures||data===null||data===undefined)return null;const item=Array.isArray(data)?data[0]:data;if(!item||typeof item!==`object`||typeof item.id!==`string`||!item.id)return null;getStore().lastIds[spec.captures]=item.id;return item.id};const copyText=async text=>{try{await navigator.clipboard.writeText(text);return true}catch(clipboardError){return false}};const describeFailure=(spec,status,envelope,gatewayMessage)=>{const code=envelope\u0026\u0026envelope.error?envelope.error.code:null;const message=envelope\u0026\u0026envelope.error?envelope.error.message:null;if(status===400)return`Validation failed. Each entry in error.details names a field and the reason.`;if(status===401\u0026\u0026gatewayMessage)return`The gateway did not receive all four signing headers. Check that the API key ID, secret key and passphrase are set.`;if(status===401)return`The request reached Olympex without an authorizer context. Sign it again and resend.`;if(status===403\u0026\u0026code===`FORBIDDEN`\u0026\u0026message===`Invalid body hash`){return hasBodyFor(spec)?`The body did not match the signed bodyHash. Send exactly the canonical body you signed, with Content-Type: application/json.`:`The bodyHash did not match. A request without a body must be signed over the empty string and sent with no body.`}if(status===403){return`Olympex rejected the signature. Check the API key ID, secret key and passphrase, and that your clock is correct (requests must be signed within 300 seconds of server time).`}if(status===404\u0026\u0026code===`NOT_FOUND`\u0026\u0026!/^No route for /.test(message||``)){const resource=(spec.params||[]).find(param=>param.resource);return`No ${resource?RESOURCE_LABEL[resource.resource]:`resource`} with this ID belongs to your API key. IDs are visible only to the API key that created them.`}if(status===404)return`Unknown path or method.`;if(status===409)return`The limit order is no longer pending. Don't retry.`;if(code===`NO_ROUTE`)return`No route right now. Retry later, or on /swap try the next dexHash in the quote's aggregatorOrder.`;if(status===429)return`Too many requests to this endpoint for your account. Wait about a minute, then send again.`;if(code===`TX_STATUS_ERROR`\u0026\u0026spec.path===`/tx-status`)return`The provider has no status for this transfer yet, or reported a failure. Keep polling with backoff; right after broadcast this is expected.`;if(status===500\u0026\u0026gatewayMessage)return`The gateway failed before Olympex answered. This happens on the first request after a quiet period and on requests that run past about 30 seconds. Sign again and retry with backoff.`;if((status===503||status===504)\u0026\u0026gatewayMessage)return`The request ran past the gateway timeout (about 30 seconds). Retry with backoff.`;if(status>=500)return`Olympex could not complete the request. If it persists, contact support with meta.requestId.`;return null};const networkHint=method=>`The browser blocked the response. This usually means ${window.location.origin} is not on the API's CORS allowlist${method\u0026\u0026method!==`GET`\u0026\u0026method!==`POST`?` for ${method} requests`:``} yet, or the gateway rejected the request without CORS headers. Use \"Copy as cURL\" to run the same signed request from a terminal.`;const ids={root:useId()};const initialId=OPERATIONS[operation]?operation:`quotes`;const[open,setOpen]=useState(view===`create-key`||defaultOpen);const[operationId,setOperationId]=useState(initialId);const[presetIndex,setPresetIndex]=useState(0);const[bodyText,setBodyText]=useState(()=>presetBodyText(OPERATIONS[initialId],OPERATIONS[initialId].presets[0]));const[paramValues,setParamValues]=useState(()=>initialParams(OPERATIONS[initialId],OPERATIONS[initialId].presets[0]));const[credentials,setCredentials]=useState({apiKeyId:``,secretKey:``,passphrase:``});const[showSecret,setShowSecret]=useState(false);const[showPassphrase,setShowPassphrase]=useState(false);const[pending,setPending]=useState(false);const[response,setResponse]=useState(null);const[signed,setSigned]=useState(null);const[notice,setNotice]=useState(null);const[curlText,setCurlText]=useState(null);const[keyName,setKeyName]=useState(``);const[created,setCreated]=useState(null);const[createError,setCreateError]=useState(null);const[createFallback,setCreateFallback]=useState(null);const[revealCreatedSecret,setRevealCreatedSecret]=useState(false);const[revealCreatedPassphrase,setRevealCreatedPassphrase]=useState(false);const inFlight=useRef(false);const spec=OPERATIONS[operationId];const hasBody=hasBodyFor(spec);useEffect(()=>{const store=getStore();let initial=store.credentials;if(!initial.apiKeyId){try{const saved=window.sessionStorage.getItem(KEY_ID_STORAGE);if(saved)initial={...initial,apiKeyId:saved}}catch(storageError){}}setCredentials(initial);setParamValues(initialParams(OPERATIONS[initialId],OPERATIONS[initialId].presets[0],store.lastIds));const listener=next=>setCredentials({...next});store.listeners.add(listener);return()=>{store.listeners.delete(listener)}},[]);useEffect(()=>{if(!keyName)setKeyName(`docs-test-${randomHex(4)}`)},[keyName]);let parsedBody=null;let bodyError=null;if(hasBody){try{parsedBody=JSON.parse(bodyText);if(parsedBody===null||typeof parsedBody!==`object`||Array.isArray(parsedBody))bodyError=`The body must be a JSON object.`;else if(findProtoKey(parsedBody))bodyError=`Remove the \"__proto__\" key: the server drops it, so the signature would not match.`;else if(spec.walletSign\u0026\u0026!olxIsAddress(parsedBody.accountTo))bodyError=`accountTo must be the maker wallet address.`;else if(spec.walletSign\u0026\u0026!SIGNATURE_PATTERN.test(String(parsedBody.signature||``)))bodyError=`signature must be the maker's 65-byte signature over the token pair. Use Sign with wallet, or paste one.`}catch(parseError){bodyError=`Invalid JSON: ${parseError.message}`}}const paramErrors={};(spec.params||[]).forEach(param=>{if(param.required\u0026\u0026!(paramValues[param.name]||``).trim())paramErrors[param.name]=`Required.`});const hasParamErrors=Object.keys(paramErrors).length>0;const credentialErrors={apiKeyId:credentials.apiKeyId\u0026\u0026!UUID.test(credentials.apiKeyId.trim())?`Expected a UUID, for example 00000000-0000-4000-8000-000000000000.`:null,passphrase:credentials.passphrase\u0026\u0026!validPassphrase(credentials.passphrase)?`Use printable ASCII characters with no leading or trailing spaces.`:null};const hasCredentials=Boolean(credentials.apiKeyId\u0026\u0026credentials.secretKey\u0026\u0026credentials.passphrase);const canSign=hasCredentials\u0026\u0026!credentialErrors.apiKeyId\u0026\u0026!credentialErrors.passphrase\u0026\u0026!bodyError\u0026\u0026!hasParamErrors;const requestUrl=buildUrl(spec,paramValues);const updateCredential=(field,value)=>{const next={...credentials,[field]:value};setCredentials(next);publishCredentials(next)};const clearCredentials=()=>{const empty={apiKeyId:``,secretKey:``,passphrase:``};setCredentials(empty);publishCredentials(empty);setSigned(null);setCurlText(null);setNotice({tone:`info`,text:`Credentials cleared from this tab.`})};const updateParam=(name,value)=>setParamValues({...paramValues,[name]:value});const selectOperation=next=>{const nextSpec=OPERATIONS[next];setOperationId(next);setPresetIndex(0);setBodyText(presetBodyText(nextSpec,nextSpec.presets[0]));setParamValues(initialParams(nextSpec,nextSpec.presets[0],getStore().lastIds));setResponse(null);setSigned(null);setCurlText(null);setNotice(null)};const selectPreset=index=>{const preset=spec.presets[index];setPresetIndex(index);setBodyText(presetBodyText(spec,preset));const nextParams=initialParams(spec,preset,getStore().lastIds);(spec.params||[]).forEach(param=>{if(param.in===`path`\u0026\u0026!(preset.params\u0026\u0026preset.params[param.name]!==undefined)\u0026\u0026(paramValues[param.name]||``).trim()){nextParams[param.name]=paramValues[param.name]}});setParamValues(nextParams);setNotice(null)};const signCurrent=async()=>{const creds={apiKeyId:credentials.apiKeyId.trim(),secretKey:credentials.secretKey,passphrase:credentials.passphrase};return olxSignRequest(spec.method,requestUrl,hasBody?parsedBody:undefined,creds)};const signWithWallet=async()=>{const provider=typeof window!==`undefined`?window.ethereum:undefined;if(!provider||!provider.request){setNotice({tone:`error`,text:`No browser wallet found. Sign the pair with your own tooling (see Order signatures and allowances) and paste the signature.`});return}let body;try{body=JSON.parse(bodyText)}catch(parseError){setNotice({tone:`error`,text:`Fix the JSON body first.`});return}const tokenIn=body[spec.walletSign.tokenIn];const tokenOut=body[spec.walletSign.tokenOut];if(!olxIsAddress(tokenIn)||!olxIsAddress(tokenOut)){setNotice({tone:`error`,text:`Set ${spec.walletSign.tokenIn} and ${spec.walletSign.tokenOut} to token addresses first.`});return}try{const accounts=await provider.request({method:`eth_requestAccounts`});const maker=olxChecksumAddress(accounts[0]);const digest=olxOrderPairDigest(maker,tokenIn,tokenOut);const signature=await provider.request({method:`personal_sign`,params:[digest,maker]});if(!SIGNATURE_PATTERN.test(signature))throw new Error(`the wallet returned an unexpected signature format`);setBodyText(pretty({...body,accountTo:maker,signature}));setNotice({tone:`success`,text:`Signed by ${maker}. accountTo and signature are filled in.`})}catch(walletError){const rejected=walletError\u0026\u0026(walletError.code===4001||walletError.code===`ACTION_REJECTED`);setNotice({tone:`error`,text:rejected?`You rejected the signature request.`:`Wallet error: ${walletError\u0026\u0026walletError.message?walletError.message:`unknown`}`})}};const send=async()=>{if(!canSign||inFlight.current)return;inFlight.current=true;setPending(true);setNotice(null);setResponse(null);let request;try{request=await signCurrent()}catch(signError){setNotice({tone:`error`,text:`Could not sign the request: ${signError.message}`});setPending(false);inFlight.current=false;return}setSigned(request);let headers;try{headers=new Headers(request.headers)}catch(headerError){setNotice({tone:`error`,text:`A header value contains characters a browser can't send. Use printable ASCII in the passphrase.`});setPending(false);inFlight.current=false;return}if(typeof navigator!==`undefined`\u0026\u0026navigator.onLine===false){setNotice({tone:`error`,text:`You appear to be offline.`});setPending(false);inFlight.current=false;return}const controller=new AbortController;const timer=window.setTimeout(()=>controller.abort(),TIMEOUT_MS);const started=performance.now();try{const res=await fetch(requestUrl,{method:spec.method,mode:`cors`,credentials:`omit`,referrerPolicy:`no-referrer`,cache:`no-store`,headers,body:hasBody?request.bodyString:undefined,signal:controller.signal});const elapsed=performance.now()-started;const text=await res.text();let parsed=null;try{parsed=JSON.parse(text)}catch(jsonError){parsed=null}const envelope=parsed\u0026\u0026typeof parsed===`object`\u0026\u0026`success`in parsed?parsed:null;const gatewayMessage=parsed\u0026\u0026typeof parsed===`object`\u0026\u0026!envelope\u0026\u0026typeof parsed.message===`string`?parsed.message:null;const ok=res.ok\u0026\u0026Boolean(envelope\u0026\u0026envelope.success);const capturedId=ok?captureIds(spec,envelope.data):null;setResponse({status:res.status,ok,elapsed,requestId:envelope\u0026\u0026envelope.meta?envelope.meta.requestId:null,bodyDisplay:parsed!==null?pretty(redact(parsed)):text.slice(0,1e6),hint:res.ok?null:describeFailure(spec,res.status,envelope,gatewayMessage),gateway:Boolean(gatewayMessage),capturedId})}catch(fetchError){if(fetchError\u0026\u0026fetchError.name===`AbortError`){setNotice({tone:`error`,text:`No response within 35 seconds. Retry with backoff.`})}else{setNotice({tone:`error`,text:networkHint(spec.method)})}}finally{window.clearTimeout(timer);setPending(false);inFlight.current=false}};const copyCurl=async()=>{if(!canSign)return;let request;try{request=await signCurrent()}catch(signError){setNotice({tone:`error`,text:`Could not sign the request: ${signError.message}`});return}setSigned(request);const expires=Number(request.timestamp)+300;const command=[`curl -sS -X ${spec.method} ${shellQuote(requestUrl)}`,` -H 'content-type: application/json'`,` -H ${shellQuote(`x-api-key-id: ${request.headers[`x-api-key-id`]}`)}`,` -H ${shellQuote(`x-value-info: ${request.headers[`x-value-info`]}`)}`,' -H \"x-passphrase: ${OLYMPEX_PASSPHRASE:?set OLYMPEX_PASSPHRASE first: read -rs OLYMPEX_PASSPHRASE \u0026\u0026 export OLYMPEX_PASSPHRASE}\"',` -H ${shellQuote(`x-signature: ${request.headers[`x-signature`]}`)}`];if(hasBody)command.push(` --data-raw ${shellQuote(request.bodyString)}`);const text=[`# bash/zsh. Signed at ${clock(Number(request.timestamp))}; valid until about ${clock(expires)}. The nonce is single-use: copy again for another request.`,`# Needs OLYMPEX_PASSPHRASE in the environment. To set it without echo: read -rs OLYMPEX_PASSPHRASE \u0026\u0026 export OLYMPEX_PASSPHRASE`,command.join(` \\\\\n`)].join(`\n`);const copied=await copyText(text);setCurlText(copied?null:text);setNotice(copied?{tone:`success`,text:`Signed cURL copied. It is valid until about ${clock(expires)}.`}:{tone:`error`,text:`Copy failed. Select the command below and copy it manually.`})};const createKey=async()=>{if(inFlight.current)return;const name=keyName.trim();if(name.length\u003c6){setCreateError(`The name needs at least 6 characters.`);return}inFlight.current=true;setPending(true);setCreateError(null);setCreateFallback(null);const password=randomToken(24);const bodyString=JSON.stringify({name,password});try{const res=await fetch(`${BASE_URL}/accounts`,{method:`POST`,mode:`cors`,credentials:`omit`,referrerPolicy:`no-referrer`,cache:`no-store`,headers:{\"content-type\":`application/json`},body:bodyString});const text=await res.text();let parsed=null;try{parsed=JSON.parse(text)}catch(jsonError){parsed=null}if(res.ok\u0026\u0026parsed\u0026\u0026parsed.success\u0026\u0026parsed.data\u0026\u0026parsed.data.apiKey){const next={apiKeyId:parsed.data.apiKey,secretKey:parsed.data.secretKey,passphrase:password};setCreated({...next,name,requestId:parsed.meta?parsed.meta.requestId:null});setRevealCreatedSecret(false);setRevealCreatedPassphrase(false);setCredentials(next);publishCredentials(next)}else{const detail=parsed\u0026\u0026parsed.error?`${parsed.error.code}: ${parsed.error.message}`:`HTTP ${res.status}`;setCreateError(`Olympex could not create the account (${detail}).`)}}catch(fetchError){setCreateError(networkHint(`POST`).replace(`Use \"Copy as cURL\" to run the same signed request from a terminal.`,`Create the key from a terminal instead:`));setCreateFallback({passphrase:password,command:[`# bash/zsh. Paste the generated passphrase when prompted (input is hidden); it becomes your passphrase.`,`read -rs OLYMPEX_PASSPHRASE \u0026\u0026 export OLYMPEX_PASSPHRASE`,`curl -sS -X POST ${shellQuote(`${BASE_URL}/accounts`)} \\\\`,` -H 'content-type: application/json' \\\\`,` --data-raw ${shellQuote(`{\"name\":${JSON.stringify(name)},\"password\":\"`)}\"$OLYMPEX_PASSPHRASE\"'\"}'`].join(`\n`)})}finally{setPending(false);inFlight.current=false}};const envFile=values=>`OLYMPEX_API_KEY_ID=${values.apiKeyId}\\nOLYMPEX_SECRET_KEY=${values.secretKey}\\nOLYMPEX_PASSPHRASE=${values.passphrase}\\n`;const downloadEnv=values=>{const blob=new Blob([envFile(values)],{type:`text/plain`});const url=URL.createObjectURL(blob);const link=document.createElement(`a`);link.href=url;link.download=`olympex.env`;document.body.appendChild(link);link.click();link.remove();window.setTimeout(()=>URL.revokeObjectURL(url),1e3)};const copyWithNotice=async(text,label)=>{const copied=await copyText(text);setNotice(copied?{tone:`success`,text:`${label} copied.`}:{tone:`error`,text:`Could not copy ${label.toLowerCase()}. Your browser blocked clipboard access.`})};const renderNotice=()=>notice?_jsx(`p`,{role:notice.tone===`error`?`alert`:`status`,className:`olx-notice ${notice.tone===`error`?`olx-notice-error`:notice.tone===`success`?`olx-notice-success`:``}`,children:notice.text}):null;const renderCreateKey=compact=>_jsxs(`div`,{className:`olx-create`,children:[!compact\u0026\u0026_jsx(`p`,{className:`olx-muted`,children:`Creates a real API account and gives you an API key ID, a secret key and a generated passphrase. Use it to try the API and keep it out of production.`}),!created\u0026\u0026_jsxs(`div`,{className:`olx-row`,children:[_jsxs(`div`,{className:`olx-field olx-grow`,children:[_jsx(`label`,{className:`olx-label`,htmlFor:`${ids.root}-key-name`,children:`Account name`}),_jsx(`input`,{id:`${ids.root}-key-name`,className:`olx-input`,type:`text`,value:keyName,onChange:event=>setKeyName(event.target.value),autoComplete:`off`,autoCorrect:`off`,autoCapitalize:`off`,spellCheck:false,\"data-1p-ignore\":`true`,\"data-lpignore\":`true`})]}),_jsx(`button`,{type:`button`,className:`olx-btn olx-btn-primary olx-align-end`,onClick:createKey,disabled:pending,\"aria-busy\":pending,children:pending?`Creating…`:`Create a test API key`})]}),createError\u0026\u0026_jsx(`p`,{role:`alert`,className:`olx-notice olx-notice-error`,children:createError}),createFallback\u0026\u0026_jsxs(`div`,{className:`olx-section`,children:[_jsxs(`div`,{className:`olx-row`,children:[_jsx(`button`,{type:`button`,className:`olx-btn`,onClick:()=>copyWithNotice(createFallback.passphrase,`Generated passphrase`),children:`Copy generated passphrase`}),_jsx(`button`,{type:`button`,className:`olx-btn`,onClick:()=>copyWithNotice(createFallback.command,`Command`),children:`Copy command`})]}),_jsx(`pre`,{className:`olx-pre`,children:createFallback.command})]}),created\u0026\u0026_jsxs(`div`,{className:`olx-created`,children:[_jsx(`p`,{role:`status`,className:`olx-notice olx-notice-success`,children:`Key created and loaded into every console on this site until you reload. Save the secret key and passphrase now: Olympex can't show either of them again.`}),_jsxs(`dl`,{className:`olx-kv`,children:[_jsx(`dt`,{children:`API key ID`}),_jsx(`dd`,{className:`olx-mono`,children:created.apiKeyId}),_jsx(`dt`,{children:`Secret key`}),_jsxs(`dd`,{className:`olx-mono`,children:[_jsx(`span`,{className:`${revealCreatedSecret?``:`olx-masked`}`,children:revealCreatedSecret?created.secretKey:`•`.repeat(24)}),_jsxs(`span`,{className:`olx-inline-actions`,children:[_jsx(`button`,{type:`button`,className:`olx-link`,\"aria-pressed\":revealCreatedSecret,onClick:()=>setRevealCreatedSecret(!revealCreatedSecret),children:revealCreatedSecret?`Hide`:`Reveal`}),_jsx(`button`,{type:`button`,className:`olx-link`,onClick:()=>copyWithNotice(created.secretKey,`Secret key`),children:`Copy`})]})]}),created.requestId\u0026\u0026_jsx(`dt`,{children:`requestId`}),created.requestId\u0026\u0026_jsx(`dd`,{className:`olx-mono`,children:created.requestId}),_jsx(`dt`,{children:`Passphrase`}),_jsxs(`dd`,{className:`olx-mono`,children:[_jsx(`span`,{className:`${revealCreatedPassphrase?``:`olx-masked`}`,children:revealCreatedPassphrase?created.passphrase:`•`.repeat(24)}),_jsxs(`span`,{className:`olx-inline-actions`,children:[_jsx(`button`,{type:`button`,className:`olx-link`,\"aria-pressed\":revealCreatedPassphrase,onClick:()=>setRevealCreatedPassphrase(!revealCreatedPassphrase),children:revealCreatedPassphrase?`Hide`:`Reveal`}),_jsx(`button`,{type:`button`,className:`olx-link`,onClick:()=>copyWithNotice(created.passphrase,`Passphrase`),children:`Copy`})]})]})]}),_jsxs(`div`,{className:`olx-row`,children:[_jsx(`button`,{type:`button`,className:`olx-btn`,onClick:()=>copyWithNotice(envFile(created),`.env contents`),children:`Copy as .env`}),_jsx(`button`,{type:`button`,className:`olx-btn`,onClick:()=>downloadEnv(created),children:`Download .env`}),_jsx(`button`,{type:`button`,className:`olx-btn olx-btn-quiet`,onClick:()=>{setCreated(null);setKeyName(`docs-test-${randomHex(4)}`);setNotice(null)},children:`Create another`})]})]})]});const renderCredentials=()=>_jsxs(`fieldset`,{className:`olx-fieldset`,children:[_jsx(`legend`,{className:`olx-legend`,children:`Credentials`}),_jsxs(`div`,{className:`olx-grid-3`,children:[_jsxs(`div`,{className:`olx-field`,children:[_jsx(`label`,{className:`olx-label`,htmlFor:`${ids.root}-key-id`,children:`API key ID`}),_jsx(`input`,{id:`${ids.root}-key-id`,className:`olx-input`,type:`text`,value:credentials.apiKeyId,onChange:event=>updateCredential(`apiKeyId`,event.target.value),placeholder:`00000000-0000-4000-8000-000000000000`,\"aria-invalid\":Boolean(credentialErrors.apiKeyId),\"aria-describedby\":credentialErrors.apiKeyId?`${ids.root}-key-id-error`:undefined,autoComplete:`off`,autoCorrect:`off`,autoCapitalize:`off`,spellCheck:false,\"data-1p-ignore\":`true`,\"data-lpignore\":`true`}),credentialErrors.apiKeyId\u0026\u0026_jsx(`p`,{id:`${ids.root}-key-id-error`,className:`olx-field-error`,children:credentialErrors.apiKeyId})]}),_jsxs(`div`,{className:`olx-field`,children:[_jsx(`label`,{className:`olx-label`,htmlFor:`${ids.root}-secret`,children:`Secret key`}),_jsxs(`div`,{className:`olx-input-group`,children:[_jsx(`input`,{id:`${ids.root}-secret`,className:`olx-input`,type:showSecret?`text`:`password`,value:credentials.secretKey,onChange:event=>updateCredential(`secretKey`,event.target.value),autoComplete:`off`,autoCorrect:`off`,autoCapitalize:`off`,spellCheck:false,\"data-1p-ignore\":`true`,\"data-lpignore\":`true`}),_jsx(`button`,{type:`button`,className:`olx-btn olx-btn-quiet`,\"aria-pressed\":showSecret,\"aria-label\":showSecret?`Hide secret key`:`Show secret key`,onClick:()=>setShowSecret(!showSecret),children:showSecret?`Hide`:`Show`})]})]}),_jsxs(`div`,{className:`olx-field`,children:[_jsx(`label`,{className:`olx-label`,htmlFor:`${ids.root}-passphrase`,children:`Passphrase`}),_jsxs(`div`,{className:`olx-input-group`,children:[_jsx(`input`,{id:`${ids.root}-passphrase`,className:`olx-input`,type:showPassphrase?`text`:`password`,value:credentials.passphrase,onChange:event=>updateCredential(`passphrase`,event.target.value),\"aria-invalid\":Boolean(credentialErrors.passphrase),\"aria-describedby\":credentialErrors.passphrase?`${ids.root}-passphrase-error`:undefined,autoComplete:`off`,autoCorrect:`off`,autoCapitalize:`off`,spellCheck:false,\"data-1p-ignore\":`true`,\"data-lpignore\":`true`}),_jsx(`button`,{type:`button`,className:`olx-btn olx-btn-quiet`,\"aria-pressed\":showPassphrase,\"aria-label\":showPassphrase?`Hide passphrase`:`Show passphrase`,onClick:()=>setShowPassphrase(!showPassphrase),children:showPassphrase?`Hide`:`Show`})]}),credentialErrors.passphrase\u0026\u0026_jsx(`p`,{id:`${ids.root}-passphrase-error`,className:`olx-field-error`,children:credentialErrors.passphrase})]})]}),_jsxs(`div`,{className:`olx-row olx-space-between`,children:[_jsx(`p`,{className:`olx-muted`,children:`Kept in this tab's memory until you reload. Only the API key ID is remembered for the session.`}),_jsx(`button`,{type:`button`,className:`olx-btn olx-btn-quiet`,onClick:clearCredentials,children:`Clear`})]}),(!hasCredentials||created)\u0026\u0026_jsxs(`details`,{className:`olx-details`,open:created?true:undefined,children:[_jsx(`summary`,{className:`olx-summary`,children:created?`Your new test API key`:`No key yet? Create a test API key`}),renderCreateKey(true)]})]});const renderParam=param=>{const fieldId=`${ids.root}-param-${param.name}`;const error=paramErrors[param.name];const value=paramValues[param.name]||``;return _jsxs(`div`,{className:`olx-field`,children:[_jsx(`label`,{className:`olx-label`,htmlFor:fieldId,children:`${param.name} (${param.in}${param.required?`, required`:`, optional`})`}),param.options?_jsxs(`select`,{id:fieldId,className:`olx-select`,value,onChange:event=>updateParam(param.name,event.target.value),children:[_jsx(`option`,{value:``,children:`Any`}),param.options.map(option=>_jsx(`option`,{value:option,children:option},option))]}):_jsx(`input`,{id:fieldId,className:`olx-input olx-mono`,type:`text`,value,placeholder:param.placeholder,onChange:event=>updateParam(param.name,event.target.value),\"aria-invalid\":Boolean(error),\"aria-describedby\":error?`${fieldId}-error`:undefined,autoComplete:`off`,autoCorrect:`off`,autoCapitalize:`off`,spellCheck:false,\"data-1p-ignore\":`true`,\"data-lpignore\":`true`}),error\u0026\u0026_jsx(`p`,{id:`${fieldId}-error`,className:`olx-field-error`,children:param.resource?`Required. Paste a ${RESOURCE_LABEL[param.resource]} ID, or create or list one first.`:error})]},param.name)};const renderRequest=()=>_jsxs(`div`,{className:`olx-section`,children:[!operation\u0026\u0026_jsxs(`div`,{className:`olx-field`,children:[_jsx(`label`,{className:`olx-label`,htmlFor:`${ids.root}-operation`,children:`Endpoint`}),_jsx(`select`,{id:`${ids.root}-operation`,className:`olx-select`,value:operationId,onChange:event=>selectOperation(event.target.value),children:GROUPS.map(group=>_jsx(`optgroup`,{label:group,children:OPERATION_IDS.filter(id=>OPERATIONS[id].group===group).map(id=>_jsx(`option`,{value:id,children:`${OPERATIONS[id].method} ${OPERATIONS[id].path}: ${OPERATIONS[id].title}`},id))},group))})]}),spec.presets.length>1\u0026\u0026_jsxs(`div`,{className:`olx-field`,children:[_jsx(`label`,{className:`olx-label`,htmlFor:`${ids.root}-preset`,children:`Example`}),_jsx(`select`,{id:`${ids.root}-preset`,className:`olx-select`,value:presetIndex,onChange:event=>selectPreset(Number(event.target.value)),children:spec.presets.map((preset,index)=>_jsx(`option`,{value:index,children:preset.label},preset.label))})]}),spec.note\u0026\u0026_jsx(`p`,{className:`olx-muted`,children:spec.note}),spec.params\u0026\u0026spec.params.length>0\u0026\u0026_jsx(`div`,{className:`olx-grid-3`,children:spec.params.map(renderParam)}),_jsxs(`p`,{className:`olx-request-line olx-mono`,children:[_jsx(`span`,{className:`olx-pill`,children:spec.method}),_jsx(`span`,{className:`olx-break`,children:requestUrl})]}),hasBody?_jsxs(`div`,{className:`olx-field`,children:[_jsx(`label`,{className:`olx-label`,htmlFor:`${ids.root}-body`,children:`Request body (JSON)`}),_jsx(`textarea`,{id:`${ids.root}-body`,className:`olx-textarea`,value:bodyText,onChange:event=>setBodyText(event.target.value),rows:Math.min(18,Math.max(6,bodyText.split(`\n`).length+1)),\"aria-invalid\":Boolean(bodyError),\"aria-describedby\":bodyError?`${ids.root}-body-error`:`${ids.root}-body-help`,autoComplete:`off`,autoCorrect:`off`,autoCapitalize:`off`,spellCheck:false,\"data-1p-ignore\":`true`,\"data-lpignore\":`true`}),bodyError?_jsx(`p`,{id:`${ids.root}-body-error`,className:`olx-field-error`,children:bodyError}):_jsx(`p`,{id:`${ids.root}-body-help`,className:`olx-muted`,children:`Sent as canonical JSON (keys sorted, no whitespace), which is exactly what the signature covers.`}),spec.walletSign\u0026\u0026_jsxs(`div`,{className:`olx-wallet`,children:[_jsx(`button`,{type:`button`,className:`olx-btn`,onClick:signWithWallet,children:`Sign with wallet`}),_jsx(`p`,{className:`olx-muted`,children:`Your wallet signs the pair ${spec.walletSign.tokenIn} to ${spec.walletSign.tokenOut}. The signature lets the Olympex order contract swap that pair from your wallet, up to the allowance you grant it. Signing doesn't grant an allowance or move funds.`})]})]}):_jsx(`p`,{className:`olx-muted`,children:`No request body. The signature covers the empty string, the method, the path and the query.`}),_jsxs(`div`,{className:`olx-row`,children:[_jsx(`button`,{type:`button`,className:`olx-btn olx-btn-primary`,onClick:send,disabled:!canSign||pending,\"aria-busy\":pending,children:pending?`Sending…`:`Send request`}),_jsx(`button`,{type:`button`,className:`olx-btn`,onClick:copyCurl,disabled:!canSign,children:`Copy as cURL`}),_jsx(`button`,{type:`button`,className:`olx-btn olx-btn-quiet`,onClick:()=>selectPreset(presetIndex),children:hasBody?`Reset body`:`Reset`}),!hasCredentials\u0026\u0026_jsx(`span`,{className:`olx-muted`,children:`Add credentials to send.`})]})]});const renderResponse=()=>_jsxs(`div`,{className:`olx-section`,children:[_jsx(`p`,{className:`olx-visually-hidden`,\"aria-live\":`polite`,children:pending?`Sending request`:response?`Response ${response.status} ${STATUS_TEXT[response.status]||``}`:``}),renderNotice(),curlText\u0026\u0026_jsx(`pre`,{className:`olx-pre`,children:curlText}),response\u0026\u0026_jsxs(`div`,{className:`olx-response`,children:[_jsxs(`p`,{className:`olx-status-line`,children:[_jsx(`span`,{className:`olx-status ${response.ok?`olx-status-ok`:`olx-status-error`}`,children:`${response.status} ${STATUS_TEXT[response.status]||``}`.trim()}),_jsx(`span`,{className:`olx-muted`,children:`${(response.elapsed/1e3).toFixed(2)} s`}),response.requestId\u0026\u0026_jsx(`span`,{className:`olx-muted olx-mono`,children:`requestId ${response.requestId}`}),response.gateway\u0026\u0026_jsx(`span`,{className:`olx-muted`,children:`Gateway response`})]}),response.capturedId\u0026\u0026_jsx(`p`,{role:`status`,className:`olx-muted`,children:`ID ${response.capturedId} is filled in for the other ${RESOURCE_LABEL[spec.captures]} consoles until you reload.`}),response.hint\u0026\u0026_jsx(`p`,{role:`alert`,className:`olx-notice olx-notice-error`,children:response.hint}),_jsx(`pre`,{className:`olx-pre`,tabIndex:0,\"aria-label\":`Response body`,children:response.bodyDisplay})]}),signed\u0026\u0026_jsxs(`details`,{className:`olx-details`,children:[_jsx(`summary`,{className:`olx-summary`,children:`Signing details`}),_jsxs(`dl`,{className:`olx-kv`,children:[_jsx(`dt`,{children:`Method and path`}),_jsx(`dd`,{className:`olx-mono`,children:`${signed.method} ${signed.path}`}),_jsx(`dt`,{children:`Canonical query`}),_jsx(`dd`,{className:`olx-mono`,children:signed.query===``?`(empty string: no query)`:signed.query}),_jsx(`dt`,{children:`Canonical body`}),_jsx(`dd`,{className:`olx-mono`,children:signed.bodyString===``?`(empty string: no body)`:signed.bodyString}),_jsx(`dt`,{children:`bodyHash`}),_jsx(`dd`,{className:`olx-mono`,children:signed.bodyHash}),_jsx(`dt`,{children:`timestamp`}),_jsx(`dd`,{className:`olx-mono`,children:signed.timestamp}),_jsx(`dt`,{children:`nonce`}),_jsx(`dd`,{className:`olx-mono`,children:signed.nonce}),_jsx(`dt`,{children:`x-value-info`}),_jsx(`dd`,{className:`olx-mono`,children:signed.headers[`x-value-info`]}),_jsx(`dt`,{children:`x-signature`}),_jsx(`dd`,{className:`olx-mono`,children:signed.headers[`x-signature`]})]}),_jsx(`p`,{className:`olx-muted`,children:`Compare these with your own signer. The passphrase is sent as x-passphrase and is not shown here.`})]})]});if(view===`create-key`){return _jsxs(`section`,{className:`not-prose olx-console`,\"aria-labelledby\":`${ids.root}-title`,children:[_jsxs(`div`,{className:`olx-head`,children:[_jsx(`span`,{className:`olx-pill`,children:`POST`}),_jsx(`span`,{className:`olx-path`,children:`/accounts`}),_jsx(`h3`,{id:`${ids.root}-title`,className:`olx-title`,children:`Create a test API key`})]}),_jsxs(`div`,{className:`olx-body`,children:[renderCreateKey(false),renderNotice()]})]})}return _jsxs(`section`,{className:`not-prose olx-console`,\"aria-labelledby\":`${ids.root}-title`,children:[_jsxs(`div`,{className:`olx-head`,children:[operation?_jsx(`h2`,{id:`${ids.root}-title`,className:`olx-title olx-title-strong`,children:`Try it`}):_jsx(`h3`,{id:`${ids.root}-title`,className:`olx-title olx-title-strong`,children:`API console`}),_jsx(`span`,{className:`olx-muted`,children:operation?`Sign and send this request from your browser.`:`Sign and send any endpoint from your browser.`}),_jsx(`button`,{type:`button`,className:`olx-btn olx-btn-primary olx-push`,\"aria-expanded\":open,\"aria-controls\":open?`${ids.root}-panel`:undefined,onClick:()=>setOpen(!open),children:open?`Hide console`:`Open console`})]}),open\u0026\u0026_jsxs(`div`,{id:`${ids.root}-panel`,className:`olx-body`,children:[_jsxs(`p`,{className:`olx-muted`,children:[`Signs in your browser and calls the Olympex API directly, with no docs proxy. Use a test key: this page is hosted by Mintlify and loads analytics. `,_jsx(_components.a,{className:`olx-inline-link`,href:CREATE_KEY_HREF,children:`Create a test API key`}),`.`]}),renderCredentials(),renderRequest(),renderResponse()]})]})};function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{Heading,Note,Step,Steps,Table,Visibility,Warning,_MdxComponentBoundary}=_components;if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!Step)_missingMdxReference(`Step`,true);if(!Steps)_missingMdxReference(`Steps`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Visibility)_missingMdxReference(`Visibility`,true);if(!Warning)_missingMdxReference(`Warning`,true);if(!_MdxComponentBoundary)_missingMdxReference(`_MdxComponentBoundary`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[_jsx(_components.code,{children:`POST /swap`}),` returns unsigned transaction calldata for a route: a swap on one chain (`,_jsx(_components.code,{children:`mode: \"single-chain\"`}),`) or a transfer between two chains (`,_jsx(_components.code,{children:`mode: \"cross-chain\"`}),`). Olympex never signs or broadcasts your transaction. You approve the input token when needed, then send the transaction from `,_jsx(_components.code,{children:`account`}),` with your own signer. Get a quote from `,_jsx(_components.a,{href:`/api-reference/quotes/get-quote`,children:_jsx(_components.code,{children:`POST /quotes`})}),` first and pass its `,_jsx(_components.code,{children:`dexHash`}),` here.`]}),`\n`,_jsxs(_components.p,{children:[`Sign swaps with an API key of the partner account, like the quote. A child account of a partner can’t call this endpoint: it gets `,_jsx(_components.code,{children:`403`}),` `,_jsx(_components.code,{children:`FORBIDDEN`}),`.`]}),`\n`,_jsx(Visibility,{for:`humans`,children:_jsx(_MdxComponentBoundary,{name:`ApiConsole`,children:_jsx(ApiConsole,{operation:`swap`})})}),`\n`,_jsx(Visibility,{for:`agents`,children:_jsxs(_components.p,{children:[`Signed endpoint. Send `,_jsx(_components.code,{children:`Content-Type: application/json`}),`, the canonical JSON body, and the four headers `,_jsx(_components.code,{children:`x-api-key-id`}),`, `,_jsx(_components.code,{children:`x-value-info`}),`, `,_jsx(_components.code,{children:`x-passphrase`}),` and `,_jsx(_components.code,{children:`x-signature`}),` described in `,_jsx(_components.a,{href:`/authentication/sign-requests`,children:`Sign requests`}),`. Sign with an API key of the partner account: a child account of a partner gets `,_jsx(_components.code,{children:`403 FORBIDDEN`}),`. The response is real mainnet calldata: broadcasting it moves funds. Cross-chain swap bodies use the same token fields as cross-chain quotes: `,_jsx(_components.code,{children:`inTokenAddress`}),` and `,_jsx(_components.code,{children:`outTokenAddress`}),`. Cross-chain responses return the calldata as `,_jsx(_components.code,{children:`calldata`}),`, single-chain responses as `,_jsx(_components.code,{children:`data`}),`. `,_jsx(_components.code,{children:`params.dexHash`}),` is required in both modes: copy `,_jsx(_components.code,{children:`quote.dexHash`}),` from `,_jsx(_components.code,{children:`POST /quotes`}),` exactly, as `,_jsx(_components.code,{children:`0x`}),` and 64 lowercase hex digits. For a single-chain fallback, use the next value in the quote’s `,_jsx(_components.code,{children:`aggregatorOrder`}),`. Uppercase hex returns `,_jsx(_components.code,{children:`400 VALIDATION_ERROR`}),` “dexHash must be a lowercase 32-byte hex value”; an unknown hash, or one from the other mode, returns `,_jsx(_components.code,{children:`400 VALIDATION_ERROR`}),` “Unknown or disabled dexHash”.`]})}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`The response is real calldata for mainnet contracts. Broadcasting it from `,_jsx(_components.code,{children:`account`}),` moves that wallet’s funds, and there is no testnet or sandbox. Start with small amounts.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`request-body`,children:`Request body`}),`\n`,_jsx(_components.p,{children:`The swap takes the same trade as the quote, plus the wallet and the route:`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Purpose`}),_jsx(_components.th,{children:`Single-chain swap`}),_jsx(_components.th,{children:`Cross-chain swap`}),_jsx(_components.th,{children:`Cross-chain quote, for comparison`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Chains`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`chainId`}),` (integer)`]}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`fromChainId`}),`, `,_jsx(_components.code,{children:`toChainId`}),` (integers)`]}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`fromChainId`}),`, `,_jsx(_components.code,{children:`toChainId`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Token you sell`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`inTokenAddress`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`inTokenAddress`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`inTokenAddress`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Token you receive`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`outTokenAddress`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`outTokenAddress`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`outTokenAddress`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Size and protection`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`amount`}),`, `,_jsx(_components.code,{children:`slippage`})]}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`amount`}),`, `,_jsx(_components.code,{children:`slippage`})]}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`amount`}),`, `,_jsx(_components.code,{children:`slippage`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Gas price hint`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`gasPrice`}),` (whole gwei, rounded up)`]}),_jsx(_components.td,{children:`Not sent`}),_jsx(_components.td,{children:`Not sent`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Wallet`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`account`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`account`})}),_jsx(_components.td,{children:`Not sent`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Route`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`dexHash`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`dexHash`})}),_jsxs(_components.td,{children:[`Returned as `,_jsx(_components.code,{children:`quote.dexHash`})]})]})]})]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:_jsx(_components.code,{children:`dexHash`})}),` is the `,_jsx(_components.code,{children:`quote.dexHash`}),` that `,_jsx(_components.code,{children:`POST /quotes`}),` returned for the same pair and amount: `,_jsx(_components.code,{children:`0x`}),` and 64 lowercase hex digits that identify the liquidity source. Copy it exactly. Uppercase hex fails with `,_jsx(_components.code,{children:`400 VALIDATION_ERROR`}),` (`,_jsx(_components.code,{children:`\"dexHash must be a lowercase 32-byte hex value\"`}),`), and a hash Olympex doesn’t know, or a hash from the other mode, fails with `,_jsx(_components.code,{children:`400 VALIDATION_ERROR`}),` (`,_jsx(_components.code,{children:`\"Unknown or disabled dexHash\"`}),`). On single-chain quotes, `,_jsx(_components.code,{children:`quote.aggregatorOrder`}),` lists the `,_jsx(_components.code,{children:`dexHash`}),` of every source that quoted, best first: if the swap fails with `,_jsx(_components.code,{children:`422 NO_ROUTE`}),` or `,_jsx(_components.code,{children:`500 SWAP_ERROR`}),`, or `,_jsx(_components.code,{children:`eth_estimateGas`}),` of its calldata reverts, build it again with the next one. `,_jsx(_components.a,{href:`/api-reference/quotes/get-quote#liquidity-sources`,children:`Liquidity sources`}),` maps each single-chain `,_jsx(_components.code,{children:`dexHash`}),` to its source.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:_jsx(_components.code,{children:`account`})}),` is the wallet that sends the transaction and receives the output (on the destination chain, for cross-chain). The calldata is bound to it.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Keep the quote’s inputs.`}),` Send the same `,_jsx(_components.code,{children:`amount`}),`, `,_jsx(_components.code,{children:`slippage`}),`, `,_jsx(_components.code,{children:`gasPrice`}),` (single-chain) and, if you used it, `,_jsx(_components.code,{children:`fees`}),` object. `,_jsx(_components.code,{children:`amount`}),` stays human-readable: `,_jsx(_components.code,{children:`\"10\"`}),` is 10 USDT. See `,_jsx(_components.a,{href:`/concepts/gas-and-fees`,children:`Gas and fees`}),` for `,_jsx(_components.code,{children:`fees`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:_jsx(_components.code,{children:`dryRun`})}),` is accepted on single-chain bodies for compatibility and has no effect, because this endpoint never broadcasts. Cross-chain bodies reject it with `,_jsx(_components.code,{children:`400`}),`, like any other unknown top-level key.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`response-fields`,children:`Response fields`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`Mode`}),_jsx(_components.th,{children:`Meaning`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`to`})}),_jsx(_components.td,{children:`Both`}),_jsxs(_components.td,{children:[`The Olympex aggregator contract on the chain you send from. The transaction’s `,_jsx(_components.code,{children:`to`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`data`})}),_jsx(_components.td,{children:`Single-chain`}),_jsx(_components.td,{children:`Transaction calldata.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`calldata`})}),_jsx(_components.td,{children:`Cross-chain`}),_jsxs(_components.td,{children:[`Transaction calldata. Same role as `,_jsx(_components.code,{children:`data`}),`, different name.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`value`})}),_jsx(_components.td,{children:`Both`}),_jsxs(_components.td,{children:[`Native token to send with the transaction, in wei. `,_jsx(_components.code,{children:`\"0\"`}),` for ERC-20 input.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`contractToApprove`})}),_jsx(_components.td,{children:`Both`}),_jsxs(_components.td,{children:[`The ERC-20 spender for this swap. Approve this address, not `,_jsx(_components.code,{children:`to`}),`: they can differ. It isn’t the `,_jsx(_components.a,{href:`/concepts/order-authorization#the-order-contract`,children:`order contract`}),` that limit orders and DCA use.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`outAmount`})}),_jsx(_components.td,{children:`Single-chain`}),_jsxs(_components.td,{children:[`Expected output, in base units of the output token. `,_jsx(_components.code,{children:`\"9999833\"`}),` is 9.999833 USDC.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`minOutAmount`})}),_jsx(_components.td,{children:`Single-chain`}),_jsx(_components.td,{children:`Minimum output after slippage, in base units. The transaction reverts below it.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`dexHash`})}),_jsx(_components.td,{children:`Cross-chain`}),_jsxs(_components.td,{children:[`Identifies the provider: the same value as the quote’s `,_jsx(_components.code,{children:`dexHash`}),`. Store it with the transaction hash for `,_jsx(_components.a,{href:`/api-reference/transactions/get-transaction-status`,children:_jsx(_components.code,{children:`POST /tx-status`})}),`.`]})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`gasLimit`}),`, `,_jsx(_components.code,{children:`estimatedGas`})]}),_jsx(_components.td,{children:`Both`}),_jsxs(_components.td,{children:[`Unreliable. See `,_jsx(_components.a,{href:`#estimate-gas-yourself`,children:`Estimate gas yourself`}),`.`]})]})]})]}),`\n`,_jsxs(_components.p,{children:[`Prices move between the quote and the swap. Show your user `,_jsx(_components.code,{children:`outAmount`}),` and `,_jsx(_components.code,{children:`minOutAmount`}),` from this response, not from the quote.`]}),`\n`,_jsx(Heading,{level:`2`,id:`estimate-gas-yourself`,children:`Estimate gas yourself`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`gasLimit`}),` is `,_jsx(_components.code,{children:`estimatedGas × 2`}),`, and `,_jsx(_components.code,{children:`estimatedGas`}),` is unreliable: it’s `,_jsx(_components.code,{children:`\"1500000\"`}),` as a placeholder when the source gives no estimate, it can be `,_jsx(_components.code,{children:`\"0\"`}),`, and on cross-chain routes it can be a wei amount rather than gas units, depending on the provider. A source’s estimate also covers only its own part of the route, not the Olympex contracts, so the transaction uses more gas than the quote’s `,_jsx(_components.code,{children:`estimatedGas`}),`. Estimate gas for the exact transaction with `,_jsx(_components.code,{children:`eth_estimateGas`}),` (`,_jsx(_components.code,{children:`from: account`}),`, `,_jsx(_components.code,{children:`to`}),`, `,_jsx(_components.code,{children:`data`}),` or `,_jsx(_components.code,{children:`calldata`}),`, `,_jsx(_components.code,{children:`value`}),`) and add a buffer, for example 20%. Use `,_jsx(_components.code,{children:`gasLimit`}),` only as a fallback, and never when it’s `,_jsx(_components.code,{children:`\"0\"`}),`. `,_jsx(_components.a,{href:`/concepts/gas-and-fees`,children:`Gas and fees`}),` has more on both estimates.`]}),`\n`,_jsx(Heading,{level:`2`,id:`check-that-the-calldata-executes`,children:`Check that the calldata executes`}),`\n`,_jsxs(_components.p,{children:[`A `,_jsx(_components.code,{children:`200`}),` means Olympex built calldata for the route, not that the transaction succeeds: a source can return calldata that reverts. Always run `,_jsx(_components.code,{children:`eth_estimateGas`}),` on the exact transaction before you send it, and treat a revert as a failed build:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Rule out your side first.`}),` Check the allowance to `,_jsx(_components.code,{children:`contractToApprove`}),`, the balance of `,_jsx(_components.code,{children:`account`}),` and the calldata’s expiry.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Fall back to another route.`}),` If those are fine, the route can’t execute. For a single-chain swap, build it again with the next `,_jsx(_components.code,{children:`dexHash`}),` in the quote’s `,_jsx(_components.code,{children:`aggregatorOrder`}),`. Each source prices the trade separately, and a fallback can return noticeably less, so compare its `,_jsx(_components.code,{children:`outAmount`}),` and `,_jsx(_components.code,{children:`minOutAmount`}),` with the first build. For a cross-chain swap, request a new quote and build with its `,_jsx(_components.code,{children:`dexHash`}),`. Show the user the new `,_jsx(_components.code,{children:`outAmount`}),` and `,_jsx(_components.code,{children:`minOutAmount`}),` before they sign.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Send right after you build.`}),` Some routes include a market maker’s firm quote (an RFQ leg) whose price expires within seconds of the build. If the estimate or the transaction reverts because that quote expired, build the swap again and send it at once.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`execute-the-transaction`,children:`Execute the transaction`}),`\n`,_jsxs(Steps,{children:[_jsx(Step,{title:`Approve the exact amount (ERC-20 input only)`,children:_jsxs(_components.p,{children:[`Read `,_jsx(_components.code,{children:`allowance(account, contractToApprove)`}),` on the input token. If it’s below `,_jsx(_components.code,{children:`amount`}),` in base units, send `,_jsx(_components.code,{children:`approve(contractToApprove, amount)`}),` for exactly that amount, never an unlimited one, and wait for it to confirm. Some tokens, such as USDT, require you to set the allowance to 0 before you change it: do that first. Native-token input needs no approval.`]})}),_jsx(Step,{title:`Estimate gas`,children:_jsxs(_components.p,{children:[`Call `,_jsx(_components.code,{children:`eth_estimateGas`}),` from `,_jsx(_components.code,{children:`account`}),` with `,_jsx(_components.code,{children:`to`}),`, `,_jsx(_components.code,{children:`data`}),` (or `,_jsx(_components.code,{children:`calldata`}),`) and `,_jsx(_components.code,{children:`value`}),`, then add your buffer. Estimation usually fails until the approval confirms. If it still reverts once the approval has confirmed, don’t send: `,_jsx(_components.a,{href:`#check-that-the-calldata-executes`,children:`fall back to another route`}),`.`]})}),_jsx(Step,{title:`Send right away`,children:_jsxs(_components.p,{children:[`Send `,_jsx(_components.code,{children:`{to, data | calldata, value, gas}`}),` from `,_jsx(_components.code,{children:`account`}),` as soon as you have the estimate. If the approval took a while to confirm, call `,_jsx(_components.code,{children:`POST /swap`}),` again before you send.`]})}),_jsx(Step,{title:`Track the result`,children:_jsxs(_components.p,{children:[`Poll `,_jsx(_components.a,{href:`/api-reference/transactions/get-transaction`,children:_jsx(_components.code,{children:`GET /transactions/{hash}`})}),` with the chain ID until `,_jsx(_components.code,{children:`status`}),` is `,_jsx(_components.code,{children:`success`}),` or `,_jsx(_components.code,{children:`reverted`}),`, or read the receipt from your RPC. For a cross-chain transfer, then poll `,_jsx(_components.a,{href:`/api-reference/transactions/get-transaction-status`,children:_jsx(_components.code,{children:`POST /tx-status`})}),` with the source transaction hash, the source chain ID and `,_jsx(_components.code,{children:`dexHash`}),`.`]})})]}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`The calldata carries an on-chain expiry, 5 minutes on most routes. Routes with a market maker’s firm quote expire sooner, within seconds of the build. The calldata is also bound to `,_jsx(_components.code,{children:`account`}),`: another Olympex swap from the same account can invalidate calldata you built earlier. Call `,_jsx(_components.code,{children:`POST /swap`}),` right before the user signs, not when you first show the quote, and send at once.`]})}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.a,{href:`/guides/execute-a-swap`,children:`Execute a swap`}),` and `,_jsx(_components.a,{href:`/guides/cross-chain-swap-end-to-end`,children:`Cross-chain swap end-to-end`}),` cover the full flow, from quote to confirmed transaction.`]}),`\n`,_jsxs(_components.p,{children:[`Both `,_jsx(_components.code,{children:`200`}),` examples shorten the calldata with `,_jsx(_components.code,{children:`…`}),`: a real response carries the full hex string. The single-chain `,_jsx(_components.code,{children:`200`}),` example swaps 10 USDT to USDC on Polygon; the cross-chain `,_jsx(_components.code,{children:`200`}),` example goes from 10 USDT on Polygon to USDT on Ethereum. Estimate gas yourself for both: `,_jsx(_components.code,{children:`gasLimit`}),` and `,_jsx(_components.code,{children:`estimatedGas`}),` come from the source.`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{ApiConsole,default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Build a swap","description":"Get unsigned transaction calldata for a quoted route, on one chain or across two chains.","openapi":"api-reference/openapi.json POST /swap","href":"/api-reference/swap/build-swap"}}},"mdxSourceWithNoJs":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];const ApiConsole=()=>null;function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Note,RequestExample,ResponseExample,Step,Steps,Table,Visibility,Warning,_MdxComponentBoundary}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!RequestExample)_missingMdxReference(`RequestExample`,true);if(!ResponseExample)_missingMdxReference(`ResponseExample`,true);if(!Step)_missingMdxReference(`Step`,true);if(!Steps)_missingMdxReference(`Steps`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Visibility)_missingMdxReference(`Visibility`,true);if(!Warning)_missingMdxReference(`Warning`,true);if(!_MdxComponentBoundary)_missingMdxReference(`_MdxComponentBoundary`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[_jsx(_components.code,{children:`POST /swap`}),` returns unsigned transaction calldata for a route: a swap on one chain (`,_jsx(_components.code,{children:`mode: \"single-chain\"`}),`) or a transfer between two chains (`,_jsx(_components.code,{children:`mode: \"cross-chain\"`}),`). Olympex never signs or broadcasts your transaction. You approve the input token when needed, then send the transaction from `,_jsx(_components.code,{children:`account`}),` with your own signer. Get a quote from `,_jsx(_components.a,{href:`/api-reference/quotes/get-quote`,children:_jsx(_components.code,{children:`POST /quotes`})}),` first and pass its `,_jsx(_components.code,{children:`dexHash`}),` here.`]}),`\n`,_jsxs(_components.p,{children:[`Sign swaps with an API key of the partner account, like the quote. A child account of a partner can’t call this endpoint: it gets `,_jsx(_components.code,{children:`403`}),` `,_jsx(_components.code,{children:`FORBIDDEN`}),`.`]}),`\n`,_jsx(Visibility,{for:`humans`,children:_jsx(_MdxComponentBoundary,{name:`ApiConsole`,children:_jsx(ApiConsole,{operation:`swap`})})}),`\n`,_jsx(Visibility,{for:`agents`,children:_jsxs(_components.p,{children:[`Signed endpoint. Send `,_jsx(_components.code,{children:`Content-Type: application/json`}),`, the canonical JSON body, and the four headers `,_jsx(_components.code,{children:`x-api-key-id`}),`, `,_jsx(_components.code,{children:`x-value-info`}),`, `,_jsx(_components.code,{children:`x-passphrase`}),` and `,_jsx(_components.code,{children:`x-signature`}),` described in `,_jsx(_components.a,{href:`/authentication/sign-requests`,children:`Sign requests`}),`. Sign with an API key of the partner account: a child account of a partner gets `,_jsx(_components.code,{children:`403 FORBIDDEN`}),`. The response is real mainnet calldata: broadcasting it moves funds. Cross-chain swap bodies use the same token fields as cross-chain quotes: `,_jsx(_components.code,{children:`inTokenAddress`}),` and `,_jsx(_components.code,{children:`outTokenAddress`}),`. Cross-chain responses return the calldata as `,_jsx(_components.code,{children:`calldata`}),`, single-chain responses as `,_jsx(_components.code,{children:`data`}),`. `,_jsx(_components.code,{children:`params.dexHash`}),` is required in both modes: copy `,_jsx(_components.code,{children:`quote.dexHash`}),` from `,_jsx(_components.code,{children:`POST /quotes`}),` exactly, as `,_jsx(_components.code,{children:`0x`}),` and 64 lowercase hex digits. For a single-chain fallback, use the next value in the quote’s `,_jsx(_components.code,{children:`aggregatorOrder`}),`. Uppercase hex returns `,_jsx(_components.code,{children:`400 VALIDATION_ERROR`}),` “dexHash must be a lowercase 32-byte hex value”; an unknown hash, or one from the other mode, returns `,_jsx(_components.code,{children:`400 VALIDATION_ERROR`}),` “Unknown or disabled dexHash”.`]})}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`The response is real calldata for mainnet contracts. Broadcasting it from `,_jsx(_components.code,{children:`account`}),` moves that wallet’s funds, and there is no testnet or sandbox. Start with small amounts.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`request-body`,children:`Request body`}),`\n`,_jsx(_components.p,{children:`The swap takes the same trade as the quote, plus the wallet and the route:`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Purpose`}),_jsx(_components.th,{children:`Single-chain swap`}),_jsx(_components.th,{children:`Cross-chain swap`}),_jsx(_components.th,{children:`Cross-chain quote, for comparison`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Chains`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`chainId`}),` (integer)`]}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`fromChainId`}),`, `,_jsx(_components.code,{children:`toChainId`}),` (integers)`]}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`fromChainId`}),`, `,_jsx(_components.code,{children:`toChainId`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Token you sell`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`inTokenAddress`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`inTokenAddress`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`inTokenAddress`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Token you receive`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`outTokenAddress`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`outTokenAddress`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`outTokenAddress`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Size and protection`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`amount`}),`, `,_jsx(_components.code,{children:`slippage`})]}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`amount`}),`, `,_jsx(_components.code,{children:`slippage`})]}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`amount`}),`, `,_jsx(_components.code,{children:`slippage`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Gas price hint`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`gasPrice`}),` (whole gwei, rounded up)`]}),_jsx(_components.td,{children:`Not sent`}),_jsx(_components.td,{children:`Not sent`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Wallet`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`account`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`account`})}),_jsx(_components.td,{children:`Not sent`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Route`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`dexHash`})}),_jsx(_components.td,{children:_jsx(_components.code,{children:`dexHash`})}),_jsxs(_components.td,{children:[`Returned as `,_jsx(_components.code,{children:`quote.dexHash`})]})]})]})]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:_jsx(_components.code,{children:`dexHash`})}),` is the `,_jsx(_components.code,{children:`quote.dexHash`}),` that `,_jsx(_components.code,{children:`POST /quotes`}),` returned for the same pair and amount: `,_jsx(_components.code,{children:`0x`}),` and 64 lowercase hex digits that identify the liquidity source. Copy it exactly. Uppercase hex fails with `,_jsx(_components.code,{children:`400 VALIDATION_ERROR`}),` (`,_jsx(_components.code,{children:`\"dexHash must be a lowercase 32-byte hex value\"`}),`), and a hash Olympex doesn’t know, or a hash from the other mode, fails with `,_jsx(_components.code,{children:`400 VALIDATION_ERROR`}),` (`,_jsx(_components.code,{children:`\"Unknown or disabled dexHash\"`}),`). On single-chain quotes, `,_jsx(_components.code,{children:`quote.aggregatorOrder`}),` lists the `,_jsx(_components.code,{children:`dexHash`}),` of every source that quoted, best first: if the swap fails with `,_jsx(_components.code,{children:`422 NO_ROUTE`}),` or `,_jsx(_components.code,{children:`500 SWAP_ERROR`}),`, or `,_jsx(_components.code,{children:`eth_estimateGas`}),` of its calldata reverts, build it again with the next one. `,_jsx(_components.a,{href:`/api-reference/quotes/get-quote#liquidity-sources`,children:`Liquidity sources`}),` maps each single-chain `,_jsx(_components.code,{children:`dexHash`}),` to its source.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:_jsx(_components.code,{children:`account`})}),` is the wallet that sends the transaction and receives the output (on the destination chain, for cross-chain). The calldata is bound to it.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Keep the quote’s inputs.`}),` Send the same `,_jsx(_components.code,{children:`amount`}),`, `,_jsx(_components.code,{children:`slippage`}),`, `,_jsx(_components.code,{children:`gasPrice`}),` (single-chain) and, if you used it, `,_jsx(_components.code,{children:`fees`}),` object. `,_jsx(_components.code,{children:`amount`}),` stays human-readable: `,_jsx(_components.code,{children:`\"10\"`}),` is 10 USDT. See `,_jsx(_components.a,{href:`/concepts/gas-and-fees`,children:`Gas and fees`}),` for `,_jsx(_components.code,{children:`fees`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:_jsx(_components.code,{children:`dryRun`})}),` is accepted on single-chain bodies for compatibility and has no effect, because this endpoint never broadcasts. Cross-chain bodies reject it with `,_jsx(_components.code,{children:`400`}),`, like any other unknown top-level key.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`response-fields`,children:`Response fields`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`Mode`}),_jsx(_components.th,{children:`Meaning`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`to`})}),_jsx(_components.td,{children:`Both`}),_jsxs(_components.td,{children:[`The Olympex aggregator contract on the chain you send from. The transaction’s `,_jsx(_components.code,{children:`to`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`data`})}),_jsx(_components.td,{children:`Single-chain`}),_jsx(_components.td,{children:`Transaction calldata.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`calldata`})}),_jsx(_components.td,{children:`Cross-chain`}),_jsxs(_components.td,{children:[`Transaction calldata. Same role as `,_jsx(_components.code,{children:`data`}),`, different name.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`value`})}),_jsx(_components.td,{children:`Both`}),_jsxs(_components.td,{children:[`Native token to send with the transaction, in wei. `,_jsx(_components.code,{children:`\"0\"`}),` for ERC-20 input.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`contractToApprove`})}),_jsx(_components.td,{children:`Both`}),_jsxs(_components.td,{children:[`The ERC-20 spender for this swap. Approve this address, not `,_jsx(_components.code,{children:`to`}),`: they can differ. It isn’t the `,_jsx(_components.a,{href:`/concepts/order-authorization#the-order-contract`,children:`order contract`}),` that limit orders and DCA use.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`outAmount`})}),_jsx(_components.td,{children:`Single-chain`}),_jsxs(_components.td,{children:[`Expected output, in base units of the output token. `,_jsx(_components.code,{children:`\"9999833\"`}),` is 9.999833 USDC.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`minOutAmount`})}),_jsx(_components.td,{children:`Single-chain`}),_jsx(_components.td,{children:`Minimum output after slippage, in base units. The transaction reverts below it.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`dexHash`})}),_jsx(_components.td,{children:`Cross-chain`}),_jsxs(_components.td,{children:[`Identifies the provider: the same value as the quote’s `,_jsx(_components.code,{children:`dexHash`}),`. Store it with the transaction hash for `,_jsx(_components.a,{href:`/api-reference/transactions/get-transaction-status`,children:_jsx(_components.code,{children:`POST /tx-status`})}),`.`]})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`gasLimit`}),`, `,_jsx(_components.code,{children:`estimatedGas`})]}),_jsx(_components.td,{children:`Both`}),_jsxs(_components.td,{children:[`Unreliable. See `,_jsx(_components.a,{href:`#estimate-gas-yourself`,children:`Estimate gas yourself`}),`.`]})]})]})]}),`\n`,_jsxs(_components.p,{children:[`Prices move between the quote and the swap. Show your user `,_jsx(_components.code,{children:`outAmount`}),` and `,_jsx(_components.code,{children:`minOutAmount`}),` from this response, not from the quote.`]}),`\n`,_jsx(Heading,{level:`2`,id:`estimate-gas-yourself`,children:`Estimate gas yourself`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`gasLimit`}),` is `,_jsx(_components.code,{children:`estimatedGas × 2`}),`, and `,_jsx(_components.code,{children:`estimatedGas`}),` is unreliable: it’s `,_jsx(_components.code,{children:`\"1500000\"`}),` as a placeholder when the source gives no estimate, it can be `,_jsx(_components.code,{children:`\"0\"`}),`, and on cross-chain routes it can be a wei amount rather than gas units, depending on the provider. A source’s estimate also covers only its own part of the route, not the Olympex contracts, so the transaction uses more gas than the quote’s `,_jsx(_components.code,{children:`estimatedGas`}),`. Estimate gas for the exact transaction with `,_jsx(_components.code,{children:`eth_estimateGas`}),` (`,_jsx(_components.code,{children:`from: account`}),`, `,_jsx(_components.code,{children:`to`}),`, `,_jsx(_components.code,{children:`data`}),` or `,_jsx(_components.code,{children:`calldata`}),`, `,_jsx(_components.code,{children:`value`}),`) and add a buffer, for example 20%. Use `,_jsx(_components.code,{children:`gasLimit`}),` only as a fallback, and never when it’s `,_jsx(_components.code,{children:`\"0\"`}),`. `,_jsx(_components.a,{href:`/concepts/gas-and-fees`,children:`Gas and fees`}),` has more on both estimates.`]}),`\n`,_jsx(Heading,{level:`2`,id:`check-that-the-calldata-executes`,children:`Check that the calldata executes`}),`\n`,_jsxs(_components.p,{children:[`A `,_jsx(_components.code,{children:`200`}),` means Olympex built calldata for the route, not that the transaction succeeds: a source can return calldata that reverts. Always run `,_jsx(_components.code,{children:`eth_estimateGas`}),` on the exact transaction before you send it, and treat a revert as a failed build:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Rule out your side first.`}),` Check the allowance to `,_jsx(_components.code,{children:`contractToApprove`}),`, the balance of `,_jsx(_components.code,{children:`account`}),` and the calldata’s expiry.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Fall back to another route.`}),` If those are fine, the route can’t execute. For a single-chain swap, build it again with the next `,_jsx(_components.code,{children:`dexHash`}),` in the quote’s `,_jsx(_components.code,{children:`aggregatorOrder`}),`. Each source prices the trade separately, and a fallback can return noticeably less, so compare its `,_jsx(_components.code,{children:`outAmount`}),` and `,_jsx(_components.code,{children:`minOutAmount`}),` with the first build. For a cross-chain swap, request a new quote and build with its `,_jsx(_components.code,{children:`dexHash`}),`. Show the user the new `,_jsx(_components.code,{children:`outAmount`}),` and `,_jsx(_components.code,{children:`minOutAmount`}),` before they sign.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Send right after you build.`}),` Some routes include a market maker’s firm quote (an RFQ leg) whose price expires within seconds of the build. If the estimate or the transaction reverts because that quote expired, build the swap again and send it at once.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`execute-the-transaction`,children:`Execute the transaction`}),`\n`,_jsxs(Steps,{children:[_jsx(Step,{title:`Approve the exact amount (ERC-20 input only)`,children:_jsxs(_components.p,{children:[`Read `,_jsx(_components.code,{children:`allowance(account, contractToApprove)`}),` on the input token. If it’s below `,_jsx(_components.code,{children:`amount`}),` in base units, send `,_jsx(_components.code,{children:`approve(contractToApprove, amount)`}),` for exactly that amount, never an unlimited one, and wait for it to confirm. Some tokens, such as USDT, require you to set the allowance to 0 before you change it: do that first. Native-token input needs no approval.`]})}),_jsx(Step,{title:`Estimate gas`,children:_jsxs(_components.p,{children:[`Call `,_jsx(_components.code,{children:`eth_estimateGas`}),` from `,_jsx(_components.code,{children:`account`}),` with `,_jsx(_components.code,{children:`to`}),`, `,_jsx(_components.code,{children:`data`}),` (or `,_jsx(_components.code,{children:`calldata`}),`) and `,_jsx(_components.code,{children:`value`}),`, then add your buffer. Estimation usually fails until the approval confirms. If it still reverts once the approval has confirmed, don’t send: `,_jsx(_components.a,{href:`#check-that-the-calldata-executes`,children:`fall back to another route`}),`.`]})}),_jsx(Step,{title:`Send right away`,children:_jsxs(_components.p,{children:[`Send `,_jsx(_components.code,{children:`{to, data | calldata, value, gas}`}),` from `,_jsx(_components.code,{children:`account`}),` as soon as you have the estimate. If the approval took a while to confirm, call `,_jsx(_components.code,{children:`POST /swap`}),` again before you send.`]})}),_jsx(Step,{title:`Track the result`,children:_jsxs(_components.p,{children:[`Poll `,_jsx(_components.a,{href:`/api-reference/transactions/get-transaction`,children:_jsx(_components.code,{children:`GET /transactions/{hash}`})}),` with the chain ID until `,_jsx(_components.code,{children:`status`}),` is `,_jsx(_components.code,{children:`success`}),` or `,_jsx(_components.code,{children:`reverted`}),`, or read the receipt from your RPC. For a cross-chain transfer, then poll `,_jsx(_components.a,{href:`/api-reference/transactions/get-transaction-status`,children:_jsx(_components.code,{children:`POST /tx-status`})}),` with the source transaction hash, the source chain ID and `,_jsx(_components.code,{children:`dexHash`}),`.`]})})]}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`The calldata carries an on-chain expiry, 5 minutes on most routes. Routes with a market maker’s firm quote expire sooner, within seconds of the build. The calldata is also bound to `,_jsx(_components.code,{children:`account`}),`: another Olympex swap from the same account can invalidate calldata you built earlier. Call `,_jsx(_components.code,{children:`POST /swap`}),` right before the user signs, not when you first show the quote, and send at once.`]})}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.a,{href:`/guides/execute-a-swap`,children:`Execute a swap`}),` and `,_jsx(_components.a,{href:`/guides/cross-chain-swap-end-to-end`,children:`Cross-chain swap end-to-end`}),` cover the full flow, from quote to confirmed transaction.`]}),`\n`,_jsxs(_components.p,{children:[`Both `,_jsx(_components.code,{children:`200`}),` examples shorten the calldata with `,_jsx(_components.code,{children:`…`}),`: a real response carries the full hex string. The single-chain `,_jsx(_components.code,{children:`200`}),` example swaps 10 USDT to USDC on Polygon; the cross-chain `,_jsx(_components.code,{children:`200`}),` example goes from 10 USDT on Polygon to USDT on Ethereum. Estimate gas yourself for both: `,_jsx(_components.code,{children:`gasLimit`}),` and `,_jsx(_components.code,{children:`estimatedGas`}),` come from the source.`]}),`\n`,_jsxs(RequestExample,{children:[_jsx(CodeBlock,{filename:`cURL`,numberOfLines:`18`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`18`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Single-chain swap calldata: 10 USDT to USDC on Polygon, routed through the quote's dexHash.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Needs openssl, curl and OLYMPEX_API_KEY_ID, OLYMPEX_SECRET_KEY, OLYMPEX_PASSPHRASE.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`METHOD`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`POST`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`ENDPOINT`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`/swap`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`QUERY`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`''`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`BODY`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'{\"mode\":\"single-chain\",\"params\":{\"account\":\"0x1E67cb01969D79B2B895179e4A07D24a839dBb52\",\"amount\":\"10\",\"chainId\":137,\"dexHash\":\"0xd9bf0c0ec020d1a26ba6698a24db3a538215d8fbf30588bddde694887c4cb55e\",\"gasPrice\":\"35\",\"inTokenAddress\":\"0xc2132d05d31c914a87c6611c10748aeb04b58e8f\",\"outTokenAddress\":\"0x3c499c542cef5e3811e1192ce70d8cc03d5c3359\",\"slippage\":\"1\"}}'`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`TS`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:'\"${'}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`OLYMPEX_TIMESTAMP`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:-`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`$(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`date`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` +`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`%`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`s`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`)}\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`NONCE`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:'\"${'}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`OLYMPEX_NONCE`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:-`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`$(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`openssl`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` rand`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` -hex`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` 12`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`)}\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`BODY_HASH`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"$(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`printf`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '%s' \"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$BODY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\" `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`|`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:` openssl`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` dgst `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`-sha256`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -binary`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` |`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:` openssl`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` base64 `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`-A`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` |`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:` tr`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '+/' '-_' `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`|`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:` tr`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '=')\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`VALUE_INFO`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"$(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`printf`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '%s\\\\n%s\\\\n%s' \"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$TS`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\" \"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$NONCE`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\" \"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$BODY_HASH`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\")\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`MESSAGE`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"$(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`printf`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'OLPX-HMAC-SHA256-V2\\\\n%s\\\\n%s\\\\n%s\\\\n%s\\\\n%s\\\\n%s' \"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$TS`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\" \"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$NONCE`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\" \"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$METHOD`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\" \"/api/v1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$ENDPOINT`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\" \"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$QUERY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\" \"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$BODY_HASH`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\")\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -sS`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$METHOD`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://api-rest.olympex.io/api/v1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$ENDPOINT`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"${\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`QUERY`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`+?`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$QUERY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`}\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"content-type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"x-api-key-id: `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$OLYMPEX_API_KEY_ID`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"x-value-info: $(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`printf`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '%s' \"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$VALUE_INFO`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\" `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`|`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:` openssl`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` base64 `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`-A`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`)\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"x-passphrase: `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$OLYMPEX_PASSPHRASE`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"x-signature: $(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`printf`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '%s' \"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$MESSAGE`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\" `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`|`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:` openssl`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` dgst `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`-sha256`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -hmac`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$OLYMPEX_SECRET_KEY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\" `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`-binary`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` |`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:` od`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -An`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -v`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -tx1`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` |`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:` tr`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` ' \\\\n')\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --data-raw`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$BODY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`TypeScript`,numberOfLines:`27`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`27`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`olympexRequest`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"./sign-request.ts\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`; `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// /authentication/sign-requests`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`type`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` QuoteData`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`mode`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"single-chain\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`; `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`quote`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`dexHash`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` string`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`; `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`aggregatorOrder`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` string`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[]; `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`outAmount`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` string`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } };`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`type`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` SwapData`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` mode`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"single-chain\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` swap`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`to`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` string`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`; `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`data`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` string`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`; `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`value`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` string`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`; `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`contractToApprove`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` string`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`; `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`outAmount`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` string`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`; `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`minOutAmount`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` string`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` };`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`};`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` params`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` chainId:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 137`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` inTokenAddress:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"0xc2132d05d31c914a87c6611c10748aeb04b58e8f\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// USDT`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` outTokenAddress:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"0x3c499c542cef5e3811e1192ce70d8cc03d5c3359\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// USDC`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` amount:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"10\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` slippage:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"1\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` gasPrice:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"35\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`};`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`quote`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` olympexRequest`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`QuoteData`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`>(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"POST\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"/quotes\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`mode:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"single-chain\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`params`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` });`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`swap`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` olympexRequest`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`SwapData`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`>(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"POST\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"/swap\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` mode:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"single-chain\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` params:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`...`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`params`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`account:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"0x1E67cb01969D79B2B895179e4A07D24a839dBb52\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`dexHash:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` quote`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`dexHash`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:\"// Next: approve swap.contractToApprove for exactly 10 USDT, then run eth_estimateGas and send from `account` right away.\"})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// If the estimate reverts, build again with the next dexHash in quote.aggregatorOrder, and compare its outAmount.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` transaction`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`to:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` swap`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`to`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`data:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` swap`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`value:`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` BigInt`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`swap`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`value`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) };`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`console`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`transaction`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`swap`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`contractToApprove`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`swap`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`minOutAmount`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`Python`,numberOfLines:`21`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`21`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` sign_request `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` olympex_request `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# /authentication/sign-requests`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`params `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"chainId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`137`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"inTokenAddress\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"0xc2132d05d31c914a87c6611c10748aeb04b58e8f\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# USDT`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"outTokenAddress\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"0x3c499c542cef5e3811e1192ce70d8cc03d5c3359\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# USDC`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"amount\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"10\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"slippage\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"1\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"gasPrice\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"35\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`quote `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` olympex_request(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"POST\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"/quotes\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, {`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"mode\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"single-chain\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"params\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: params})[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"quote\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`swap `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` olympex_request(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"POST\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"/swap\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"mode\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"single-chain\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"params\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`**`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`params, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"account\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"0x1E67cb01969D79B2B895179e4A07D24a839dBb52\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"dexHash\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: quote[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"dexHash\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]},`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`})[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"swap\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:'# Next: approve swap[\"contractToApprove\"] for exactly 10 USDT, then run eth_estimateGas and send from `account` right away.'})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# If the estimate reverts, build again with the next dexHash in quote[\"aggregatorOrder\"], and compare its outAmount.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`transaction `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"to\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: swap[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"to\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`], `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"data\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: swap[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"data\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`], `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"value\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`int`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(swap[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"value\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`])}`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(transaction, swap[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"contractToApprove\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`], swap[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"minOutAmount\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`])`})]}),`\n`]})})})]}),`\n`,_jsxs(ResponseExample,{children:[_jsx(CodeBlock,{filename:`200 Single-chain`,numberOfLines:`22`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`22`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"success\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"data\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"mode\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"single-chain\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"swap\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"to\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"0xA91e13e8BfEbbC57ea008bfb2dE94AdD3F484E68\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"gasLimit\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"3000000\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"contractToApprove\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"0xa754451D6d32aB624111e5120409a474D29C2364\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"data\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"0x8ad0a76c0000000000000000000000000000000000000000000000000000000000000020…0000000000000000\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"minOutAmount\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"9899684\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"outAmount\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"9999833\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"value\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"0\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"estimatedGas\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"1500000\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"meta\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"requestId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"GD1TCjZeoAMES0g=\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"version\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"v1\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"accountType\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"integrator\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"apiKeyId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"00000000-0000-4000-8000-000000000000\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`200 Cross-chain`,numberOfLines:`21`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`21`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"success\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"data\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"mode\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"cross-chain\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"swap\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"to\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"0xA91e13e8BfEbbC57ea008bfb2dE94AdD3F484E68\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"gasLimit\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"900000\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"calldata\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"0x0044fcef0000000000000000000000000000000000000000000000000000000000000020…0000000000000000\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"value\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"0\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"estimatedGas\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"450000\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"contractToApprove\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"0x9f770bC130f57C2D1C7Bf9bb4965Ab7c79AdE22E\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"dexHash\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"0x2676e2ee99986d45baa8242aea50a63a90b996df49a22e8975ba756b3706279f\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"meta\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"requestId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"GD1T3h4IoAMESmw=\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"version\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"v1\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"accountType\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"integrator\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"apiKeyId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"00000000-0000-4000-8000-000000000000\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`400`,numberOfLines:`23`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`23`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"success\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`false`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"code\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"VALIDATION_ERROR\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Invalid request body\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"details\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"field\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"params.account\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Invalid input: expected string, received undefined\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"field\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"params.dexHash\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Invalid input: expected string, received undefined\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"meta\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"requestId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"GD2qmgFFIAMESEQ=\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"version\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"v1\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"accountType\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"integrator\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"apiKeyId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"00000000-0000-4000-8000-000000000000\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`400 Unknown dexHash`,numberOfLines:`14`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`14`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"success\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`false`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"code\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"VALIDATION_ERROR\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Unknown or disabled dexHash\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"details\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: []`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"meta\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"requestId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"GD1ThiWEoAMEaMg=\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"version\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"v1\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"accountType\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"integrator\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"apiKeyId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"00000000-0000-4000-8000-000000000000\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`403 Gateway`,numberOfLines:`3`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`3`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Forbidden\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`500`,numberOfLines:`18`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`18`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"success\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`false`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"code\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"SWAP_ERROR\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Error fetching single-chain swap\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"details\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Request failed with status code 400\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"meta\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"requestId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"E7egOiScoAMEZWw=\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"version\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"v1\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"accountType\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"integrator\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"apiKeyId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"00000000-0000-4000-8000-000000000000\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{ApiConsole,default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Build a swap","description":"Get unsigned transaction calldata for a quoted route, on one chain or across two chains.","openapi":"api-reference/openapi.json POST /swap","href":"/api-reference/swap/build-swap"}}}},"mdxExtracts":{"tableOfContents":[{"title":"Request body","slug":"request-body","depth":2,"children":[]},{"title":"Response fields","slug":"response-fields","depth":2,"children":[]},{"title":"Estimate gas yourself","slug":"estimate-gas-yourself","depth":2,"children":[]},{"title":"Check that the calldata executes","slug":"check-that-the-calldata-executes","depth":2,"children":[]},{"title":"Execute the transaction","slug":"execute-the-transaction","depth":2,"children":[]}],"codeExamples":{"request":{"type":"RequestExample","children":[{"filename":"cURL","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"shellscript\">\u003ccode language=\"shellscript\" numberOfLines=\"18\">\u003cspan class=\"line\">\u003cspan style=\"color:#6E7781;--shiki-dark:#6A9955\"># Single-chain swap calldata: 10 USDT to USDC on Polygon, routed through the quote's dexHash.\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#6E7781;--shiki-dark:#6A9955\"># Needs openssl, curl and OLYMPEX_API_KEY_ID, OLYMPEX_SECRET_KEY, OLYMPEX_PASSPHRASE.\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">METHOD\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">POST\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">ENDPOINT\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">/swap\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">QUERY\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">''\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">BODY\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">'{\"mode\":\"single-chain\",\"params\":{\"account\":\"0x1E67cb01969D79B2B895179e4A07D24a839dBb52\",\"amount\":\"10\",\"chainId\":137,\"dexHash\":\"0xd9bf0c0ec020d1a26ba6698a24db3a538215d8fbf30588bddde694887c4cb55e\",\"gasPrice\":\"35\",\"inTokenAddress\":\"0xc2132d05d31c914a87c6611c10748aeb04b58e8f\",\"outTokenAddress\":\"0x3c499c542cef5e3811e1192ce70d8cc03d5c3359\",\"slippage\":\"1\"}}'\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">TS\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"${\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">OLYMPEX_TIMESTAMP\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">:-\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">$(\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">date\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> +\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">%\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">s\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">)}\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">NONCE\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"${\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">OLYMPEX_NONCE\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">:-\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">$(\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">openssl\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> rand\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> -hex\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> 12\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">)}\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">BODY_HASH\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"$(\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#DCDCAA\">printf\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> '%s' \"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">$BODY\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\" \u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">|\u003c/span>\u003cspan style=\"color:#953800;--shiki-dark:#DCDCAA\"> openssl\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> dgst \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">-sha256\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -binary\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\"> |\u003c/span>\u003cspan style=\"color:#953800;--shiki-dark:#DCDCAA\"> openssl\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> base64 \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">-A\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\"> |\u003c/span>\u003cspan style=\"color:#953800;--shiki-dark:#DCDCAA\"> tr\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> '+/' '-_' \u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">|\u003c/span>\u003cspan style=\"color:#953800;--shiki-dark:#DCDCAA\"> tr\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -d\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> '=')\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">VALUE_INFO\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"$(\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#DCDCAA\">printf\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> '%s\\n%s\\n%s' \"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">$TS\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\" \"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">$NONCE\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\" \"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">$BODY_HASH\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\")\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">MESSAGE\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"$(\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#DCDCAA\">printf\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> 'OLPX-HMAC-SHA256-V2\\n%s\\n%s\\n%s\\n%s\\n%s\\n%s' \"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">$TS\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\" \"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">$NONCE\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\" \"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">$METHOD\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\" \"/api/v1\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">$ENDPOINT\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\" \"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">$QUERY\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\" \"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">$BODY_HASH\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\")\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#953800;--shiki-dark:#DCDCAA\">curl\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -sS\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -X\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">$METHOD\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"https://api-rest.olympex.io/api/v1\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">$ENDPOINT\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">${\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">QUERY\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">+?\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">$QUERY\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">}\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -H\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"content-type: application/json\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -H\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"x-api-key-id: \u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">$OLYMPEX_API_KEY_ID\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -H\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"x-value-info: $(\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#DCDCAA\">printf\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> '%s' \"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">$VALUE_INFO\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\" \u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">|\u003c/span>\u003cspan style=\"color:#953800;--shiki-dark:#DCDCAA\"> openssl\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> base64 \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">-A\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">)\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -H\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"x-passphrase: \u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">$OLYMPEX_PASSPHRASE\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -H\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"x-signature: $(\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#DCDCAA\">printf\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> '%s' \"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">$MESSAGE\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\" \u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">|\u003c/span>\u003cspan style=\"color:#953800;--shiki-dark:#DCDCAA\"> openssl\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> dgst \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">-sha256\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -hmac\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">$OLYMPEX_SECRET_KEY\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\" \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">-binary\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\"> |\u003c/span>\u003cspan style=\"color:#953800;--shiki-dark:#DCDCAA\"> od\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -An\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -v\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -tx1\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\"> |\u003c/span>\u003cspan style=\"color:#953800;--shiki-dark:#DCDCAA\"> tr\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -d\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> ' \\n')\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> --data-raw\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">$BODY\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"TypeScript","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"typescript\">\u003ccode language=\"typescript\" numberOfLines=\"27\">\u003cspan class=\"line\">\u003cspan style=\"color:#CF222E;--shiki-dark:#C586C0\">import\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> { \u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">olympexRequest\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> } \u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#C586C0\">from\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"./sign-request.ts\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">; \u003c/span>\u003cspan style=\"color:#6E7781;--shiki-dark:#6A9955\">// /authentication/sign-requests\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CF222E;--shiki-dark:#569CD6\">type\u003c/span>\u003cspan style=\"color:#953800;--shiki-dark:#4EC9B0\"> QuoteData\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\"> =\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> { \u003c/span>\u003cspan style=\"color:#953800;--shiki-dark:#9CDCFE\">mode\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"single-chain\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">; \u003c/span>\u003cspan style=\"color:#953800;--shiki-dark:#9CDCFE\">quote\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">:\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> { \u003c/span>\u003cspan style=\"color:#953800;--shiki-dark:#9CDCFE\">dexHash\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">:\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#4EC9B0\"> string\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">; \u003c/span>\u003cspan style=\"color:#953800;--shiki-dark:#9CDCFE\">aggregatorOrder\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">:\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#4EC9B0\"> string\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">[]; \u003c/span>\u003cspan style=\"color:#953800;--shiki-dark:#9CDCFE\">outAmount\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">:\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#4EC9B0\"> string\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> } };\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CF222E;--shiki-dark:#569CD6\">type\u003c/span>\u003cspan style=\"color:#953800;--shiki-dark:#4EC9B0\"> SwapData\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\"> =\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#953800;--shiki-dark:#9CDCFE\"> mode\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"single-chain\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">;\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#953800;--shiki-dark:#9CDCFE\"> swap\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">:\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> { \u003c/span>\u003cspan style=\"color:#953800;--shiki-dark:#9CDCFE\">to\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">:\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#4EC9B0\"> string\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">; \u003c/span>\u003cspan style=\"color:#953800;--shiki-dark:#9CDCFE\">data\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">:\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#4EC9B0\"> string\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">; \u003c/span>\u003cspan style=\"color:#953800;--shiki-dark:#9CDCFE\">value\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">:\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#4EC9B0\"> string\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">; \u003c/span>\u003cspan style=\"color:#953800;--shiki-dark:#9CDCFE\">contractToApprove\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">:\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#4EC9B0\"> string\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">; \u003c/span>\u003cspan style=\"color:#953800;--shiki-dark:#9CDCFE\">outAmount\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">:\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#4EC9B0\"> string\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">; \u003c/span>\u003cspan style=\"color:#953800;--shiki-dark:#9CDCFE\">minOutAmount\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">:\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#4EC9B0\"> string\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> };\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">};\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CF222E;--shiki-dark:#569CD6\">const\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#4FC1FF\"> params\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\"> =\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> chainId:\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\"> 137\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> inTokenAddress:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"0xc2132d05d31c914a87c6611c10748aeb04b58e8f\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">, \u003c/span>\u003cspan style=\"color:#6E7781;--shiki-dark:#6A9955\">// USDT\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> outTokenAddress:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"0x3c499c542cef5e3811e1192ce70d8cc03d5c3359\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">, \u003c/span>\u003cspan style=\"color:#6E7781;--shiki-dark:#6A9955\">// USDC\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> amount:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"10\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> slippage:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"1\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> gasPrice:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"35\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">};\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CF222E;--shiki-dark:#569CD6\">const\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> { \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#4FC1FF\">quote\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> } \u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#C586C0\"> await\u003c/span>\u003cspan style=\"color:#8250DF;--shiki-dark:#DCDCAA\"> olympexRequest\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">\u0026#x3C;\u003c/span>\u003cspan style=\"color:#953800;--shiki-dark:#4EC9B0\">QuoteData\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">>(\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"POST\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">, \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"/quotes\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">, { \u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">mode:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"single-chain\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">, \u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">params\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> });\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CF222E;--shiki-dark:#569CD6\">const\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> { \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#4FC1FF\">swap\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> } \u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#C586C0\"> await\u003c/span>\u003cspan style=\"color:#8250DF;--shiki-dark:#DCDCAA\"> olympexRequest\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">\u0026#x3C;\u003c/span>\u003cspan style=\"color:#953800;--shiki-dark:#4EC9B0\">SwapData\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">>(\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"POST\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">, \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"/swap\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">, {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> mode:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"single-chain\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> params:\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> { \u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">...\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">params\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">, \u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">account:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"0x1E67cb01969D79B2B895179e4A07D24a839dBb52\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">, \u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">dexHash:\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> quote\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">dexHash\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">});\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#6E7781;--shiki-dark:#6A9955\">// Next: approve swap.contractToApprove for exactly 10 USDT, then run eth_estimateGas and send from `account` right away.\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#6E7781;--shiki-dark:#6A9955\">// If the estimate reverts, build again with the next dexHash in quote.aggregatorOrder, and compare its outAmount.\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CF222E;--shiki-dark:#569CD6\">const\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#4FC1FF\"> transaction\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\"> =\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> { \u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">to:\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> swap\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">to\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">, \u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">data:\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> swap\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">data\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">, \u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">value:\u003c/span>\u003cspan style=\"color:#8250DF;--shiki-dark:#DCDCAA\"> BigInt\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">(\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">swap\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">value\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">) };\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">console\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#8250DF;--shiki-dark:#DCDCAA\">log\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">(\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">transaction\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">, \u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">swap\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">contractToApprove\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">, \u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">swap\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">minOutAmount\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">);\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"Python","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"python\">\u003ccode language=\"python\" numberOfLines=\"21\">\u003cspan class=\"line\">\u003cspan style=\"color:#CF222E;--shiki-dark:#C586C0\">from\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> sign_request \u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#C586C0\">import\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> olympex_request \u003c/span>\u003cspan style=\"color:#6E7781;--shiki-dark:#6A9955\"># /authentication/sign-requests\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">params \u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"chainId\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">137\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"inTokenAddress\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"0xc2132d05d31c914a87c6611c10748aeb04b58e8f\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">, \u003c/span>\u003cspan style=\"color:#6E7781;--shiki-dark:#6A9955\"># USDT\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"outTokenAddress\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"0x3c499c542cef5e3811e1192ce70d8cc03d5c3359\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">, \u003c/span>\u003cspan style=\"color:#6E7781;--shiki-dark:#6A9955\"># USDC\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"amount\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"10\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"slippage\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"1\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"gasPrice\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"35\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">quote \u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> olympex_request(\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"POST\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">, \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"/quotes\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">, {\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"mode\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"single-chain\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">, \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"params\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: params})[\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"quote\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">]\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">swap \u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> olympex_request(\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"POST\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">, \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"/swap\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">, {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"mode\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"single-chain\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"params\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: {\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">**\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">params, \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"account\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"0x1E67cb01969D79B2B895179e4A07D24a839dBb52\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">, \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"dexHash\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: quote[\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"dexHash\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">]},\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">})[\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"swap\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">]\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#6E7781;--shiki-dark:#6A9955\"># Next: approve swap[\"contractToApprove\"] for exactly 10 USDT, then run eth_estimateGas and send from `account` right away.\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#6E7781;--shiki-dark:#6A9955\"># If the estimate reverts, build again with the next dexHash in quote[\"aggregatorOrder\"], and compare its outAmount.\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">transaction \u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> {\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"to\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: swap[\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"to\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">], \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"data\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: swap[\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"data\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">], \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"value\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#4EC9B0\">int\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">(swap[\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"value\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">])}\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#DCDCAA\">print\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">(transaction, swap[\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"contractToApprove\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">], swap[\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"minOutAmount\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">])\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"}],"attributes":[]},"response":{"type":"ResponseExample","children":[{"filename":"200 Single-chain","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"22\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"success\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">true\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"data\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"mode\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"single-chain\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"swap\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"to\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"0xA91e13e8BfEbbC57ea008bfb2dE94AdD3F484E68\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"gasLimit\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"3000000\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"contractToApprove\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"0xa754451D6d32aB624111e5120409a474D29C2364\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"data\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"0x8ad0a76c0000000000000000000000000000000000000000000000000000000000000020…0000000000000000\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"minOutAmount\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"9899684\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"outAmount\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"9999833\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"value\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"0\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"estimatedGas\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"1500000\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"meta\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"requestId\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"GD1TCjZeoAMES0g=\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"version\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"v1\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"accountType\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"integrator\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"apiKeyId\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"00000000-0000-4000-8000-000000000000\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"200 Cross-chain","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"21\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"success\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">true\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"data\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"mode\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"cross-chain\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"swap\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"to\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"0xA91e13e8BfEbbC57ea008bfb2dE94AdD3F484E68\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"gasLimit\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"900000\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"calldata\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"0x0044fcef0000000000000000000000000000000000000000000000000000000000000020…0000000000000000\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"value\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"0\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"estimatedGas\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"450000\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"contractToApprove\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"0x9f770bC130f57C2D1C7Bf9bb4965Ab7c79AdE22E\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"dexHash\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"0x2676e2ee99986d45baa8242aea50a63a90b996df49a22e8975ba756b3706279f\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"meta\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"requestId\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"GD1T3h4IoAMESmw=\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"version\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"v1\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"accountType\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"integrator\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"apiKeyId\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"00000000-0000-4000-8000-000000000000\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"400","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"23\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"success\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">false\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"error\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"code\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"VALIDATION_ERROR\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"message\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Invalid request body\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"details\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: [\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"field\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"params.account\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"message\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Invalid input: expected string, received undefined\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"field\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"params.dexHash\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"message\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Invalid input: expected string, received undefined\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> ]\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"meta\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"requestId\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"GD2qmgFFIAMESEQ=\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"version\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"v1\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"accountType\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"integrator\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"apiKeyId\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"00000000-0000-4000-8000-000000000000\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"400 Unknown dexHash","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"14\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"success\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">false\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"error\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"code\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"VALIDATION_ERROR\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"message\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Unknown or disabled dexHash\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"details\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: []\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"meta\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"requestId\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"GD1ThiWEoAMEaMg=\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"version\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"v1\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"accountType\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"integrator\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"apiKeyId\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"00000000-0000-4000-8000-000000000000\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"403 Gateway","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"3\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"message\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Forbidden\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"500","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"18\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"success\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">false\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"error\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"code\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"SWAP_ERROR\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"message\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Error fetching single-chain swap\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"details\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: [\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"message\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Request failed with status code 400\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> ]\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"meta\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"requestId\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"E7egOiScoAMEZWw=\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"version\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"v1\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"accountType\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"integrator\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"apiKeyId\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"00000000-0000-4000-8000-000000000000\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"}],"attributes":[]}}},"jsLinks":[],"openApiReferenceData":{"operation":{"tags":["Swap"],"operationId":"buildSwap","summary":"Build a swap transaction","description":"Get unsigned transaction calldata for a quoted route, on one chain or across two chains.","security":["a116acee-ddb4-4279-946d-c91d009441ee"],"requestBody":"0ad9a1bc-2069-47f7-a039-e3eebf250c04","responses":{"200":"17b71afa-cb20-4081-b4c1-5c50b570c04d","400":"1098297b-4555-43d6-9c24-cda1cd2f61ab","401":"68e8493a-68f4-4197-a75f-82dd6f2b9ecb","403":"1cb050d4-631b-48c0-9a81-32edf616e26b","404":"bb756a7b-0ad4-41a7-97e5-5ea8607a849e","422":"f42f513a-1ec3-48f6-8763-13b71b41520e","429":"7b35c256-dca2-4563-94c0-1796b38e6b97","500":"21237d2b-93b5-4d88-8045-d5a932a7608e","503":"34e43310-f3c3-497f-b691-5bdaa4c818cd"},"method":"post","type":"path","servers":["8b3c2999-3a66-4bba-ba32-b89285456fb5"],"path":"/swap","baseUrlOptions":["https://api-rest.olympex.io/api/v1"],"title":"Build a swap transaction","codeSamples":[],"requiredOnlyExamples":false,"requestExamples":[{"dropdown":false,"language":"shellscript","code":{"type":"pre","key":null,"ref":null,"props":{"className":"shiki shiki-themes github-light-default dark-plus","style":{"backgroundColor":"#ffffff","--shiki-dark-bg":"#0B0C0E","color":"#1f2328","--shiki-dark":"#D4D4D4"},"language":"shellscript","children":{"type":"code","key":null,"ref":null,"props":{"language":"shellscript","numberOfLines":"18","children":[{"type":"span","key":"0","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#6E7781","--shiki-dark":"#6A9955"},"children":"# Single-chain swap calldata: 10 USDT to USDC on Polygon, routed through the quote's dexHash."}}}},"\n",{"type":"span","key":"2","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#6E7781","--shiki-dark":"#6A9955"},"children":"# Needs openssl, curl and OLYMPEX_API_KEY_ID, OLYMPEX_SECRET_KEY, OLYMPEX_PASSPHRASE."}}}},"\n",{"type":"span","key":"4","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":"METHOD"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#D4D4D4"},"children":"="}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"POST"}}]}},"\n",{"type":"span","key":"6","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":"ENDPOINT"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#D4D4D4"},"children":"="}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"/swap"}}]}},"\n",{"type":"span","key":"8","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":"QUERY"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#D4D4D4"},"children":"="}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"''"}}]}},"\n",{"type":"span","key":"10","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":"BODY"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#D4D4D4"},"children":"="}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"'{\"mode\":\"single-chain\",\"params\":{\"account\":\"0x1E67cb01969D79B2B895179e4A07D24a839dBb52\",\"amount\":\"10\",\"chainId\":137,\"dexHash\":\"0xd9bf0c0ec020d1a26ba6698a24db3a538215d8fbf30588bddde694887c4cb55e\",\"gasPrice\":\"35\",\"inTokenAddress\":\"0xc2132d05d31c914a87c6611c10748aeb04b58e8f\",\"outTokenAddress\":\"0x3c499c542cef5e3811e1192ce70d8cc03d5c3359\",\"slippage\":\"1\"}}'"}}]}},"\n",{"type":"span","key":"12","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":"TS"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#D4D4D4"},"children":"="}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"${"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":"OLYMPEX_TIMESTAMP"}},{"type":"span","key":"4","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#D4D4D4"},"children":":-"}},{"type":"span","key":"5","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"$("}},{"type":"span","key":"6","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":"date"}},{"type":"span","key":"7","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" +"}},{"type":"span","key":"8","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#D4D4D4"},"children":"%"}},{"type":"span","key":"9","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":"s"}},{"type":"span","key":"10","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":")}\""}}]}},"\n",{"type":"span","key":"14","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":"NONCE"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#D4D4D4"},"children":"="}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"${"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":"OLYMPEX_NONCE"}},{"type":"span","key":"4","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#D4D4D4"},"children":":-"}},{"type":"span","key":"5","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"$("}},{"type":"span","key":"6","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":"openssl"}},{"type":"span","key":"7","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":" rand"}},{"type":"span","key":"8","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":" -hex"}},{"type":"span","key":"9","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":" 12"}},{"type":"span","key":"10","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":")}\""}}]}},"\n",{"type":"span","key":"16","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":"BODY_HASH"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#D4D4D4"},"children":"="}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"$("}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#DCDCAA"},"children":"printf"}},{"type":"span","key":"4","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" '%s' \""}},{"type":"span","key":"5","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":"$BODY"}},{"type":"span","key":"6","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\" "}},{"type":"span","key":"7","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#D4D4D4"},"children":"|"}},{"type":"span","key":"8","ref":null,"props":{"style":{"color":"#953800","--shiki-dark":"#DCDCAA"},"children":" openssl"}},{"type":"span","key":"9","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" dgst "}},{"type":"span","key":"10","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#569CD6"},"children":"-sha256"}},{"type":"span","key":"11","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#569CD6"},"children":" -binary"}},{"type":"span","key":"12","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#D4D4D4"},"children":" |"}},{"type":"span","key":"13","ref":null,"props":{"style":{"color":"#953800","--shiki-dark":"#DCDCAA"},"children":" openssl"}},{"type":"span","key":"14","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" base64 "}},{"type":"span","key":"15","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#569CD6"},"children":"-A"}},{"type":"span","key":"16","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#D4D4D4"},"children":" |"}},{"type":"span","key":"17","ref":null,"props":{"style":{"color":"#953800","--shiki-dark":"#DCDCAA"},"children":" tr"}},{"type":"span","key":"18","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" '+/' '-_' "}},{"type":"span","key":"19","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#D4D4D4"},"children":"|"}},{"type":"span","key":"20","ref":null,"props":{"style":{"color":"#953800","--shiki-dark":"#DCDCAA"},"children":" tr"}},{"type":"span","key":"21","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#569CD6"},"children":" -d"}},{"type":"span","key":"22","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" '=')\""}}]}},"\n",{"type":"span","key":"18","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":"VALUE_INFO"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#D4D4D4"},"children":"="}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"$("}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#DCDCAA"},"children":"printf"}},{"type":"span","key":"4","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" '%s\\n%s\\n%s' \""}},{"type":"span","key":"5","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":"$TS"}},{"type":"span","key":"6","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\" \""}},{"type":"span","key":"7","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":"$NONCE"}},{"type":"span","key":"8","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\" \""}},{"type":"span","key":"9","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":"$BODY_HASH"}},{"type":"span","key":"10","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\")\""}}]}},"\n",{"type":"span","key":"20","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":"MESSAGE"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#D4D4D4"},"children":"="}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"$("}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#DCDCAA"},"children":"printf"}},{"type":"span","key":"4","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" 'OLPX-HMAC-SHA256-V2\\n%s\\n%s\\n%s\\n%s\\n%s\\n%s' \""}},{"type":"span","key":"5","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":"$TS"}},{"type":"span","key":"6","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\" \""}},{"type":"span","key":"7","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":"$NONCE"}},{"type":"span","key":"8","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\" \""}},{"type":"span","key":"9","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":"$METHOD"}},{"type":"span","key":"10","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\" \"/api/v1"}},{"type":"span","key":"11","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":"$ENDPOINT"}},{"type":"span","key":"12","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\" \""}},{"type":"span","key":"13","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":"$QUERY"}},{"type":"span","key":"14","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\" \""}},{"type":"span","key":"15","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":"$BODY_HASH"}},{"type":"span","key":"16","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\")\""}}]}},"\n",{"type":"span","key":"22","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#953800","--shiki-dark":"#DCDCAA"},"children":"curl"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#569CD6"},"children":" -sS"}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#569CD6"},"children":" -X"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" \""}},{"type":"span","key":"4","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":"$METHOD"}},{"type":"span","key":"5","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\""}},{"type":"span","key":"6","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" \"https://api-rest.olympex.io/api/v1"}},{"type":"span","key":"7","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":"$ENDPOINT"}},{"type":"span","key":"8","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"${"}},{"type":"span","key":"9","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":"QUERY"}},{"type":"span","key":"10","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#D4D4D4"},"children":":"}},{"type":"span","key":"11","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"+?"}},{"type":"span","key":"12","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":"$QUERY"}},{"type":"span","key":"13","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"}\""}},{"type":"span","key":"14","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#D7BA7D"},"children":" \\"}}]}},"\n",{"type":"span","key":"24","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#569CD6"},"children":" -H"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" \"content-type: application/json\""}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#D7BA7D"},"children":" \\"}}]}},"\n",{"type":"span","key":"26","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#569CD6"},"children":" -H"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" \"x-api-key-id: "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":"$OLYMPEX_API_KEY_ID"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\""}},{"type":"span","key":"4","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#D7BA7D"},"children":" \\"}}]}},"\n",{"type":"span","key":"28","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#569CD6"},"children":" -H"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" \"x-value-info: $("}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#DCDCAA"},"children":"printf"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" '%s' \""}},{"type":"span","key":"4","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":"$VALUE_INFO"}},{"type":"span","key":"5","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\" "}},{"type":"span","key":"6","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#D4D4D4"},"children":"|"}},{"type":"span","key":"7","ref":null,"props":{"style":{"color":"#953800","--shiki-dark":"#DCDCAA"},"children":" openssl"}},{"type":"span","key":"8","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" base64 "}},{"type":"span","key":"9","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#569CD6"},"children":"-A"}},{"type":"span","key":"10","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":")\""}},{"type":"span","key":"11","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#D7BA7D"},"children":" \\"}}]}},"\n",{"type":"span","key":"30","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#569CD6"},"children":" -H"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" \"x-passphrase: "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":"$OLYMPEX_PASSPHRASE"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\""}},{"type":"span","key":"4","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#D7BA7D"},"children":" \\"}}]}},"\n",{"type":"span","key":"32","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#569CD6"},"children":" -H"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" \"x-signature: $("}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#DCDCAA"},"children":"printf"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" '%s' \""}},{"type":"span","key":"4","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":"$MESSAGE"}},{"type":"span","key":"5","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\" "}},{"type":"span","key":"6","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#D4D4D4"},"children":"|"}},{"type":"span","key":"7","ref":null,"props":{"style":{"color":"#953800","--shiki-dark":"#DCDCAA"},"children":" openssl"}},{"type":"span","key":"8","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" dgst "}},{"type":"span","key":"9","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#569CD6"},"children":"-sha256"}},{"type":"span","key":"10","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#569CD6"},"children":" -hmac"}},{"type":"span","key":"11","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" \""}},{"type":"span","key":"12","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":"$OLYMPEX_SECRET_KEY"}},{"type":"span","key":"13","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\" "}},{"type":"span","key":"14","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#569CD6"},"children":"-binary"}},{"type":"span","key":"15","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#D4D4D4"},"children":" |"}},{"type":"span","key":"16","ref":null,"props":{"style":{"color":"#953800","--shiki-dark":"#DCDCAA"},"children":" od"}},{"type":"span","key":"17","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#569CD6"},"children":" -An"}},{"type":"span","key":"18","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#569CD6"},"children":" -v"}},{"type":"span","key":"19","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#569CD6"},"children":" -tx1"}},{"type":"span","key":"20","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#D4D4D4"},"children":" |"}},{"type":"span","key":"21","ref":null,"props":{"style":{"color":"#953800","--shiki-dark":"#DCDCAA"},"children":" tr"}},{"type":"span","key":"22","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#569CD6"},"children":" -d"}},{"type":"span","key":"23","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" ' \\n')\""}},{"type":"span","key":"24","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#D7BA7D"},"children":" \\"}}]}},"\n",{"type":"span","key":"34","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#569CD6"},"children":" --data-raw"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" \""}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":"$BODY"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\""}}]}},"\n"]}}}},"filename":"cURL"},{"dropdown":false,"language":"typescript","code":{"type":"pre","key":null,"ref":null,"props":{"className":"shiki shiki-themes github-light-default dark-plus","style":{"backgroundColor":"#ffffff","--shiki-dark-bg":"#0B0C0E","color":"#1f2328","--shiki-dark":"#D4D4D4"},"language":"typescript","children":{"type":"code","key":null,"ref":null,"props":{"language":"typescript","numberOfLines":"27","children":[{"type":"span","key":"0","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#C586C0"},"children":"import"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":" { "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":"olympexRequest"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":" } "}},{"type":"span","key":"4","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#C586C0"},"children":"from"}},{"type":"span","key":"5","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" \"./sign-request.ts\""}},{"type":"span","key":"6","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"; "}},{"type":"span","key":"7","ref":null,"props":{"style":{"color":"#6E7781","--shiki-dark":"#6A9955"},"children":"// /authentication/sign-requests"}}]}},"\n",{"type":"span","key":"2","ref":null,"props":{"className":"line","children":null}},"\n",{"type":"span","key":"4","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#569CD6"},"children":"type"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#953800","--shiki-dark":"#4EC9B0"},"children":" QuoteData"}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#D4D4D4"},"children":" ="}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":" { "}},{"type":"span","key":"4","ref":null,"props":{"style":{"color":"#953800","--shiki-dark":"#9CDCFE"},"children":"mode"}},{"type":"span","key":"5","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#D4D4D4"},"children":":"}},{"type":"span","key":"6","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" \"single-chain\""}},{"type":"span","key":"7","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"; "}},{"type":"span","key":"8","ref":null,"props":{"style":{"color":"#953800","--shiki-dark":"#9CDCFE"},"children":"quote"}},{"type":"span","key":"9","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#D4D4D4"},"children":":"}},{"type":"span","key":"10","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":" { "}},{"type":"span","key":"11","ref":null,"props":{"style":{"color":"#953800","--shiki-dark":"#9CDCFE"},"children":"dexHash"}},{"type":"span","key":"12","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#D4D4D4"},"children":":"}},{"type":"span","key":"13","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#4EC9B0"},"children":" string"}},{"type":"span","key":"14","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"; "}},{"type":"span","key":"15","ref":null,"props":{"style":{"color":"#953800","--shiki-dark":"#9CDCFE"},"children":"aggregatorOrder"}},{"type":"span","key":"16","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#D4D4D4"},"children":":"}},{"type":"span","key":"17","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#4EC9B0"},"children":" string"}},{"type":"span","key":"18","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"[]; "}},{"type":"span","key":"19","ref":null,"props":{"style":{"color":"#953800","--shiki-dark":"#9CDCFE"},"children":"outAmount"}},{"type":"span","key":"20","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#D4D4D4"},"children":":"}},{"type":"span","key":"21","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#4EC9B0"},"children":" string"}},{"type":"span","key":"22","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":" } };"}}]}},"\n",{"type":"span","key":"6","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#569CD6"},"children":"type"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#953800","--shiki-dark":"#4EC9B0"},"children":" SwapData"}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#D4D4D4"},"children":" ="}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":" {"}}]}},"\n",{"type":"span","key":"8","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#953800","--shiki-dark":"#9CDCFE"},"children":" mode"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#D4D4D4"},"children":":"}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" \"single-chain\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":";"}}]}},"\n",{"type":"span","key":"10","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#953800","--shiki-dark":"#9CDCFE"},"children":" swap"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#D4D4D4"},"children":":"}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":" { "}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#953800","--shiki-dark":"#9CDCFE"},"children":"to"}},{"type":"span","key":"4","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#D4D4D4"},"children":":"}},{"type":"span","key":"5","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#4EC9B0"},"children":" string"}},{"type":"span","key":"6","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"; "}},{"type":"span","key":"7","ref":null,"props":{"style":{"color":"#953800","--shiki-dark":"#9CDCFE"},"children":"data"}},{"type":"span","key":"8","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#D4D4D4"},"children":":"}},{"type":"span","key":"9","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#4EC9B0"},"children":" string"}},{"type":"span","key":"10","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"; "}},{"type":"span","key":"11","ref":null,"props":{"style":{"color":"#953800","--shiki-dark":"#9CDCFE"},"children":"value"}},{"type":"span","key":"12","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#D4D4D4"},"children":":"}},{"type":"span","key":"13","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#4EC9B0"},"children":" string"}},{"type":"span","key":"14","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"; "}},{"type":"span","key":"15","ref":null,"props":{"style":{"color":"#953800","--shiki-dark":"#9CDCFE"},"children":"contractToApprove"}},{"type":"span","key":"16","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#D4D4D4"},"children":":"}},{"type":"span","key":"17","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#4EC9B0"},"children":" string"}},{"type":"span","key":"18","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"; "}},{"type":"span","key":"19","ref":null,"props":{"style":{"color":"#953800","--shiki-dark":"#9CDCFE"},"children":"outAmount"}},{"type":"span","key":"20","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#D4D4D4"},"children":":"}},{"type":"span","key":"21","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#4EC9B0"},"children":" string"}},{"type":"span","key":"22","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"; "}},{"type":"span","key":"23","ref":null,"props":{"style":{"color":"#953800","--shiki-dark":"#9CDCFE"},"children":"minOutAmount"}},{"type":"span","key":"24","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#D4D4D4"},"children":":"}},{"type":"span","key":"25","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#4EC9B0"},"children":" string"}},{"type":"span","key":"26","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":" };"}}]}},"\n",{"type":"span","key":"12","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"};"}}}},"\n",{"type":"span","key":"14","ref":null,"props":{"className":"line","children":null}},"\n",{"type":"span","key":"16","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#569CD6"},"children":"const"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#4FC1FF"},"children":" params"}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#D4D4D4"},"children":" ="}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":" {"}}]}},"\n",{"type":"span","key":"18","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":" chainId:"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#B5CEA8"},"children":" 137"}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"20","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":" inTokenAddress:"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" \"0xc2132d05d31c914a87c6611c10748aeb04b58e8f\""}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":", "}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#6E7781","--shiki-dark":"#6A9955"},"children":"// USDT"}}]}},"\n",{"type":"span","key":"22","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":" outTokenAddress:"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" \"0x3c499c542cef5e3811e1192ce70d8cc03d5c3359\""}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":", "}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#6E7781","--shiki-dark":"#6A9955"},"children":"// USDC"}}]}},"\n",{"type":"span","key":"24","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":" amount:"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" \"10\""}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"26","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":" slippage:"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" \"1\""}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"28","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":" gasPrice:"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" \"35\""}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"30","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"};"}}}},"\n",{"type":"span","key":"32","ref":null,"props":{"className":"line","children":null}},"\n",{"type":"span","key":"34","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#569CD6"},"children":"const"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":" { "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#4FC1FF"},"children":"quote"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":" } "}},{"type":"span","key":"4","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#D4D4D4"},"children":"="}},{"type":"span","key":"5","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#C586C0"},"children":" await"}},{"type":"span","key":"6","ref":null,"props":{"style":{"color":"#8250DF","--shiki-dark":"#DCDCAA"},"children":" olympexRequest"}},{"type":"span","key":"7","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"\u003c"}},{"type":"span","key":"8","ref":null,"props":{"style":{"color":"#953800","--shiki-dark":"#4EC9B0"},"children":"QuoteData"}},{"type":"span","key":"9","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":">("}},{"type":"span","key":"10","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"POST\""}},{"type":"span","key":"11","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":", "}},{"type":"span","key":"12","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"/quotes\""}},{"type":"span","key":"13","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":", { "}},{"type":"span","key":"14","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":"mode:"}},{"type":"span","key":"15","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" \"single-chain\""}},{"type":"span","key":"16","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":", "}},{"type":"span","key":"17","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":"params"}},{"type":"span","key":"18","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":" });"}}]}},"\n",{"type":"span","key":"36","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#569CD6"},"children":"const"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":" { "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#4FC1FF"},"children":"swap"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":" } "}},{"type":"span","key":"4","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#D4D4D4"},"children":"="}},{"type":"span","key":"5","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#C586C0"},"children":" await"}},{"type":"span","key":"6","ref":null,"props":{"style":{"color":"#8250DF","--shiki-dark":"#DCDCAA"},"children":" olympexRequest"}},{"type":"span","key":"7","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"\u003c"}},{"type":"span","key":"8","ref":null,"props":{"style":{"color":"#953800","--shiki-dark":"#4EC9B0"},"children":"SwapData"}},{"type":"span","key":"9","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":">("}},{"type":"span","key":"10","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"POST\""}},{"type":"span","key":"11","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":", "}},{"type":"span","key":"12","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"/swap\""}},{"type":"span","key":"13","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":", {"}}]}},"\n",{"type":"span","key":"38","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":" mode:"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" \"single-chain\""}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"40","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":" params:"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":" { "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#D4D4D4"},"children":"..."}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":"params"}},{"type":"span","key":"4","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":", "}},{"type":"span","key":"5","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":"account:"}},{"type":"span","key":"6","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" \"0x1E67cb01969D79B2B895179e4A07D24a839dBb52\""}},{"type":"span","key":"7","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":", "}},{"type":"span","key":"8","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":"dexHash:"}},{"type":"span","key":"9","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":" quote"}},{"type":"span","key":"10","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"."}},{"type":"span","key":"11","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":"dexHash"}},{"type":"span","key":"12","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":" },"}}]}},"\n",{"type":"span","key":"42","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"});"}}}},"\n",{"type":"span","key":"44","ref":null,"props":{"className":"line","children":null}},"\n",{"type":"span","key":"46","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#6E7781","--shiki-dark":"#6A9955"},"children":"// Next: approve swap.contractToApprove for exactly 10 USDT, then run eth_estimateGas and send from `account` right away."}}}},"\n",{"type":"span","key":"48","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#6E7781","--shiki-dark":"#6A9955"},"children":"// If the estimate reverts, build again with the next dexHash in quote.aggregatorOrder, and compare its outAmount."}}}},"\n",{"type":"span","key":"50","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#569CD6"},"children":"const"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#4FC1FF"},"children":" transaction"}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#D4D4D4"},"children":" ="}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":" { "}},{"type":"span","key":"4","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":"to:"}},{"type":"span","key":"5","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":" swap"}},{"type":"span","key":"6","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"."}},{"type":"span","key":"7","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":"to"}},{"type":"span","key":"8","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":", "}},{"type":"span","key":"9","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":"data:"}},{"type":"span","key":"10","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":" swap"}},{"type":"span","key":"11","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"."}},{"type":"span","key":"12","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":"data"}},{"type":"span","key":"13","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":", "}},{"type":"span","key":"14","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":"value:"}},{"type":"span","key":"15","ref":null,"props":{"style":{"color":"#8250DF","--shiki-dark":"#DCDCAA"},"children":" BigInt"}},{"type":"span","key":"16","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"("}},{"type":"span","key":"17","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":"swap"}},{"type":"span","key":"18","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"."}},{"type":"span","key":"19","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":"value"}},{"type":"span","key":"20","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":") };"}}]}},"\n",{"type":"span","key":"52","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":"console"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"."}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#8250DF","--shiki-dark":"#DCDCAA"},"children":"log"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"("}},{"type":"span","key":"4","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":"transaction"}},{"type":"span","key":"5","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":", "}},{"type":"span","key":"6","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":"swap"}},{"type":"span","key":"7","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"."}},{"type":"span","key":"8","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":"contractToApprove"}},{"type":"span","key":"9","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":", "}},{"type":"span","key":"10","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":"swap"}},{"type":"span","key":"11","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"."}},{"type":"span","key":"12","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#9CDCFE"},"children":"minOutAmount"}},{"type":"span","key":"13","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":");"}}]}},"\n"]}}}},"filename":"TypeScript"},{"dropdown":false,"language":"python","code":{"type":"pre","key":null,"ref":null,"props":{"className":"shiki shiki-themes github-light-default dark-plus","style":{"backgroundColor":"#ffffff","--shiki-dark-bg":"#0B0C0E","color":"#1f2328","--shiki-dark":"#D4D4D4"},"language":"python","children":{"type":"code","key":null,"ref":null,"props":{"language":"python","numberOfLines":"21","children":[{"type":"span","key":"0","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#C586C0"},"children":"from"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":" sign_request "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#C586C0"},"children":"import"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":" olympex_request "}},{"type":"span","key":"4","ref":null,"props":{"style":{"color":"#6E7781","--shiki-dark":"#6A9955"},"children":"# /authentication/sign-requests"}}]}},"\n",{"type":"span","key":"2","ref":null,"props":{"className":"line","children":null}},"\n",{"type":"span","key":"4","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"params "}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#D4D4D4"},"children":"="}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":" {"}}]}},"\n",{"type":"span","key":"6","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" \"chainId\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#B5CEA8"},"children":"137"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"8","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" \"inTokenAddress\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"0xc2132d05d31c914a87c6611c10748aeb04b58e8f\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":", "}},{"type":"span","key":"4","ref":null,"props":{"style":{"color":"#6E7781","--shiki-dark":"#6A9955"},"children":"# USDT"}}]}},"\n",{"type":"span","key":"10","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" \"outTokenAddress\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"0x3c499c542cef5e3811e1192ce70d8cc03d5c3359\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":", "}},{"type":"span","key":"4","ref":null,"props":{"style":{"color":"#6E7781","--shiki-dark":"#6A9955"},"children":"# USDC"}}]}},"\n",{"type":"span","key":"12","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" \"amount\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"10\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"14","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" \"slippage\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"1\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"16","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" \"gasPrice\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"35\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"18","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"}"}}}},"\n",{"type":"span","key":"20","ref":null,"props":{"className":"line","children":null}},"\n",{"type":"span","key":"22","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"quote "}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#D4D4D4"},"children":"="}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":" olympex_request("}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"POST\""}},{"type":"span","key":"4","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":", "}},{"type":"span","key":"5","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"/quotes\""}},{"type":"span","key":"6","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":", {"}},{"type":"span","key":"7","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"mode\""}},{"type":"span","key":"8","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"9","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"single-chain\""}},{"type":"span","key":"10","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":", "}},{"type":"span","key":"11","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"params\""}},{"type":"span","key":"12","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": params})["}},{"type":"span","key":"13","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"quote\""}},{"type":"span","key":"14","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"]"}}]}},"\n",{"type":"span","key":"24","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"swap "}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#D4D4D4"},"children":"="}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":" olympex_request("}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"POST\""}},{"type":"span","key":"4","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":", "}},{"type":"span","key":"5","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"/swap\""}},{"type":"span","key":"6","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":", {"}}]}},"\n",{"type":"span","key":"26","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" \"mode\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"single-chain\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"28","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":" \"params\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": {"}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#D4D4D4"},"children":"**"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"params, "}},{"type":"span","key":"4","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"account\""}},{"type":"span","key":"5","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"6","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"0x1E67cb01969D79B2B895179e4A07D24a839dBb52\""}},{"type":"span","key":"7","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":", "}},{"type":"span","key":"8","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"dexHash\""}},{"type":"span","key":"9","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": quote["}},{"type":"span","key":"10","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"dexHash\""}},{"type":"span","key":"11","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"]},"}}]}},"\n",{"type":"span","key":"30","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"})["}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"swap\""}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"]"}}]}},"\n",{"type":"span","key":"32","ref":null,"props":{"className":"line","children":null}},"\n",{"type":"span","key":"34","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#6E7781","--shiki-dark":"#6A9955"},"children":"# Next: approve swap[\"contractToApprove\"] for exactly 10 USDT, then run eth_estimateGas and send from `account` right away."}}}},"\n",{"type":"span","key":"36","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#6E7781","--shiki-dark":"#6A9955"},"children":"# If the estimate reverts, build again with the next dexHash in quote[\"aggregatorOrder\"], and compare its outAmount."}}}},"\n",{"type":"span","key":"38","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"transaction "}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#CF222E","--shiki-dark":"#D4D4D4"},"children":"="}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":" {"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"to\""}},{"type":"span","key":"4","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": swap["}},{"type":"span","key":"5","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"to\""}},{"type":"span","key":"6","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"], "}},{"type":"span","key":"7","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"data\""}},{"type":"span","key":"8","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": swap["}},{"type":"span","key":"9","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"data\""}},{"type":"span","key":"10","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"], "}},{"type":"span","key":"11","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"value\""}},{"type":"span","key":"12","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"13","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#4EC9B0"},"children":"int"}},{"type":"span","key":"14","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"(swap["}},{"type":"span","key":"15","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"value\""}},{"type":"span","key":"16","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"])}"}}]}},"\n",{"type":"span","key":"40","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#DCDCAA"},"children":"print"}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"(transaction, swap["}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"contractToApprove\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"], swap["}},{"type":"span","key":"4","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"minOutAmount\""}},{"type":"span","key":"5","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"])"}}]}},"\n"]}}}},"filename":"Python"}],"requestExampleType":"mdx","responseExamples":[{"dropdown":false,"language":"json","code":{"type":"pre","key":null,"ref":null,"props":{"className":"shiki shiki-themes github-light-default dark-plus","style":{"backgroundColor":"#ffffff","--shiki-dark-bg":"#0B0C0E","color":"#1f2328","--shiki-dark":"#D4D4D4"},"language":"json","children":{"type":"code","key":null,"ref":null,"props":{"language":"json","numberOfLines":"22","children":[{"type":"span","key":"0","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"{"}}}},"\n",{"type":"span","key":"2","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"success\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#569CD6"},"children":"true"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"4","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"data\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": {"}}]}},"\n",{"type":"span","key":"6","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"mode\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"single-chain\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"8","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"swap\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": {"}}]}},"\n",{"type":"span","key":"10","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"to\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"0xA91e13e8BfEbbC57ea008bfb2dE94AdD3F484E68\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"12","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"gasLimit\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"3000000\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"14","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"contractToApprove\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"0xa754451D6d32aB624111e5120409a474D29C2364\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"16","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"data\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"0x8ad0a76c0000000000000000000000000000000000000000000000000000000000000020…0000000000000000\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"18","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"minOutAmount\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"9899684\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"20","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"outAmount\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"9999833\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"22","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"value\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"0\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"24","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"estimatedGas\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"1500000\""}}]}},"\n",{"type":"span","key":"26","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":" }"}}}},"\n",{"type":"span","key":"28","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":" },"}}}},"\n",{"type":"span","key":"30","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"meta\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": {"}}]}},"\n",{"type":"span","key":"32","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"requestId\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"GD1TCjZeoAMES0g=\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"34","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"version\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"v1\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"36","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"accountType\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"integrator\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"38","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"apiKeyId\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"00000000-0000-4000-8000-000000000000\""}}]}},"\n",{"type":"span","key":"40","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":" }"}}}},"\n",{"type":"span","key":"42","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"}"}}}},"\n"]}}}},"filename":"200 Single-chain"},{"dropdown":false,"language":"json","code":{"type":"pre","key":null,"ref":null,"props":{"className":"shiki shiki-themes github-light-default dark-plus","style":{"backgroundColor":"#ffffff","--shiki-dark-bg":"#0B0C0E","color":"#1f2328","--shiki-dark":"#D4D4D4"},"language":"json","children":{"type":"code","key":null,"ref":null,"props":{"language":"json","numberOfLines":"21","children":[{"type":"span","key":"0","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"{"}}}},"\n",{"type":"span","key":"2","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"success\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#569CD6"},"children":"true"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"4","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"data\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": {"}}]}},"\n",{"type":"span","key":"6","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"mode\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"cross-chain\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"8","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"swap\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": {"}}]}},"\n",{"type":"span","key":"10","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"to\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"0xA91e13e8BfEbbC57ea008bfb2dE94AdD3F484E68\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"12","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"gasLimit\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"900000\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"14","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"calldata\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"0x0044fcef0000000000000000000000000000000000000000000000000000000000000020…0000000000000000\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"16","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"value\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"0\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"18","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"estimatedGas\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"450000\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"20","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"contractToApprove\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"0x9f770bC130f57C2D1C7Bf9bb4965Ab7c79AdE22E\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"22","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"dexHash\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"0x2676e2ee99986d45baa8242aea50a63a90b996df49a22e8975ba756b3706279f\""}}]}},"\n",{"type":"span","key":"24","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":" }"}}}},"\n",{"type":"span","key":"26","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":" },"}}}},"\n",{"type":"span","key":"28","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"meta\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": {"}}]}},"\n",{"type":"span","key":"30","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"requestId\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"GD1T3h4IoAMESmw=\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"32","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"version\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"v1\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"34","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"accountType\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"integrator\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"36","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"apiKeyId\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"00000000-0000-4000-8000-000000000000\""}}]}},"\n",{"type":"span","key":"38","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":" }"}}}},"\n",{"type":"span","key":"40","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"}"}}}},"\n"]}}}},"filename":"200 Cross-chain"},{"dropdown":false,"language":"json","code":{"type":"pre","key":null,"ref":null,"props":{"className":"shiki shiki-themes github-light-default dark-plus","style":{"backgroundColor":"#ffffff","--shiki-dark-bg":"#0B0C0E","color":"#1f2328","--shiki-dark":"#D4D4D4"},"language":"json","children":{"type":"code","key":null,"ref":null,"props":{"language":"json","numberOfLines":"23","children":[{"type":"span","key":"0","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"{"}}}},"\n",{"type":"span","key":"2","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"success\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#569CD6"},"children":"false"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"4","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"error\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": {"}}]}},"\n",{"type":"span","key":"6","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"code\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"VALIDATION_ERROR\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"8","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"message\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"Invalid request body\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"10","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"details\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": ["}}]}},"\n",{"type":"span","key":"12","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":" {"}}}},"\n",{"type":"span","key":"14","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"field\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"params.account\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"16","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"message\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"Invalid input: expected string, received undefined\""}}]}},"\n",{"type":"span","key":"18","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":" },"}}}},"\n",{"type":"span","key":"20","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":" {"}}}},"\n",{"type":"span","key":"22","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"field\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"params.dexHash\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"24","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"message\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"Invalid input: expected string, received undefined\""}}]}},"\n",{"type":"span","key":"26","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":" }"}}}},"\n",{"type":"span","key":"28","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":" ]"}}}},"\n",{"type":"span","key":"30","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":" },"}}}},"\n",{"type":"span","key":"32","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"meta\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": {"}}]}},"\n",{"type":"span","key":"34","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"requestId\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"GD2qmgFFIAMESEQ=\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"36","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"version\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"v1\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"38","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"accountType\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"integrator\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"40","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"apiKeyId\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"00000000-0000-4000-8000-000000000000\""}}]}},"\n",{"type":"span","key":"42","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":" }"}}}},"\n",{"type":"span","key":"44","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"}"}}}},"\n"]}}}},"filename":"400"},{"dropdown":false,"language":"json","code":{"type":"pre","key":null,"ref":null,"props":{"className":"shiki shiki-themes github-light-default dark-plus","style":{"backgroundColor":"#ffffff","--shiki-dark-bg":"#0B0C0E","color":"#1f2328","--shiki-dark":"#D4D4D4"},"language":"json","children":{"type":"code","key":null,"ref":null,"props":{"language":"json","numberOfLines":"14","children":[{"type":"span","key":"0","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"{"}}}},"\n",{"type":"span","key":"2","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"success\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#569CD6"},"children":"false"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"4","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"error\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": {"}}]}},"\n",{"type":"span","key":"6","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"code\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"VALIDATION_ERROR\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"8","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"message\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"Unknown or disabled dexHash\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"10","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"details\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": []"}}]}},"\n",{"type":"span","key":"12","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":" },"}}}},"\n",{"type":"span","key":"14","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"meta\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": {"}}]}},"\n",{"type":"span","key":"16","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"requestId\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"GD1ThiWEoAMEaMg=\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"18","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"version\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"v1\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"20","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"accountType\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"integrator\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"22","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"apiKeyId\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"00000000-0000-4000-8000-000000000000\""}}]}},"\n",{"type":"span","key":"24","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":" }"}}}},"\n",{"type":"span","key":"26","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"}"}}}},"\n"]}}}},"filename":"400 Unknown dexHash"},{"dropdown":false,"language":"json","code":{"type":"pre","key":null,"ref":null,"props":{"className":"shiki shiki-themes github-light-default dark-plus","style":{"backgroundColor":"#ffffff","--shiki-dark-bg":"#0B0C0E","color":"#1f2328","--shiki-dark":"#D4D4D4"},"language":"json","children":{"type":"code","key":null,"ref":null,"props":{"language":"json","numberOfLines":"3","children":[{"type":"span","key":"0","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"{"}}}},"\n",{"type":"span","key":"2","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"message\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"Forbidden\""}}]}},"\n",{"type":"span","key":"4","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"}"}}}},"\n"]}}}},"filename":"403 Gateway"},{"dropdown":false,"language":"json","code":{"type":"pre","key":null,"ref":null,"props":{"className":"shiki shiki-themes github-light-default dark-plus","style":{"backgroundColor":"#ffffff","--shiki-dark-bg":"#0B0C0E","color":"#1f2328","--shiki-dark":"#D4D4D4"},"language":"json","children":{"type":"code","key":null,"ref":null,"props":{"language":"json","numberOfLines":"18","children":[{"type":"span","key":"0","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"{"}}}},"\n",{"type":"span","key":"2","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"success\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0550AE","--shiki-dark":"#569CD6"},"children":"false"}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"4","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"error\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": {"}}]}},"\n",{"type":"span","key":"6","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"code\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"SWAP_ERROR\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"8","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"message\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"Error fetching single-chain swap\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"10","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"details\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": ["}}]}},"\n",{"type":"span","key":"12","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":" {"}}}},"\n",{"type":"span","key":"14","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"message\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"Request failed with status code 400\""}}]}},"\n",{"type":"span","key":"16","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":" }"}}}},"\n",{"type":"span","key":"18","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":" ]"}}}},"\n",{"type":"span","key":"20","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":" },"}}}},"\n",{"type":"span","key":"22","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"meta\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": {"}}]}},"\n",{"type":"span","key":"24","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"requestId\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"E7egOiScoAMEZWw=\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"26","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"version\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"v1\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"28","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"accountType\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"integrator\""}},{"type":"span","key":"3","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":","}}]}},"\n",{"type":"span","key":"30","ref":null,"props":{"className":"line","children":[{"type":"span","key":"0","ref":null,"props":{"style":{"color":"#116329","--shiki-dark":"#9CDCFE"},"children":" \"apiKeyId\""}},{"type":"span","key":"1","ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":": "}},{"type":"span","key":"2","ref":null,"props":{"style":{"color":"#0A3069","--shiki-dark":"#CE9178"},"children":"\"00000000-0000-4000-8000-000000000000\""}}]}},"\n",{"type":"span","key":"32","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":" }"}}}},"\n",{"type":"span","key":"34","ref":null,"props":{"className":"line","children":{"type":"span","key":null,"ref":null,"props":{"style":{"color":"#1F2328","--shiki-dark":"#D4D4D4"},"children":"}"}}}},"\n"]}}}},"filename":"500"}],"responseExampleType":"mdx","urlDisplay":"full"},"dependencies":{"parameters":{},"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","title":"Single-chain","required":["mode","params"],"properties":{"mode":{"type":"string","enum":["single-chain"],"isRequired":true,"uniqueKey":"oneOf.0.mode","typeLabel":"enum\u003cstring>"},"params":{"type":"object","required":["chainId","inTokenAddress","outTokenAddress","account","amount","slippage","gasPrice","dexHash"],"properties":{"chainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991,"description":"EVM chain ID as an integer.","isRequired":true,"uniqueKey":"oneOf.0.params.chainId","typeLabel":"integer"},"inTokenAddress":{"type":"string","minLength":1,"description":"Token you sell. Use `0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE` for the native token. Any valid EVM address (lowercase or EIP-55 checksum).","isRequired":true,"uniqueKey":"oneOf.0.params.inTokenAddress","typeLabel":"string"},"outTokenAddress":{"type":"string","minLength":1,"description":"Token you buy. Any valid EVM address (lowercase or EIP-55 checksum).","isRequired":true,"uniqueKey":"oneOf.0.params.outTokenAddress","typeLabel":"string"},"account":{"type":"string","minLength":1,"description":"Wallet that sends the transaction and receives the output. The calldata is bound to it. Any valid EVM address (lowercase or EIP-55 checksum).","isRequired":true,"uniqueKey":"oneOf.0.params.account","typeLabel":"string"},"amount":{"type":"string","minLength":1,"description":"Amount of the input token as a decimal string in human-readable units, for example `\"1.5\"` for 1.5 USDC. Do not convert to base units.","example":"10","isRequired":true,"uniqueKey":"oneOf.0.params.amount","typeLabel":"string"},"slippage":{"type":"string","minLength":1,"description":"Maximum slippage as a percentage string. `\"1\"` means 1%.","example":"1","isRequired":true,"uniqueKey":"oneOf.0.params.slippage","typeLabel":"string"},"gasPrice":{"type":"string","minLength":1,"description":"Gas price hint in whole gwei as a string, for example `\"35\"`. Round up: some sources reject fractional gwei.","example":"35","isRequired":true,"uniqueKey":"oneOf.0.params.gasPrice","typeLabel":"string"},"dexHash":{"type":"string","pattern":"^0x[0-9a-f]{64}$","description":"Liquidity source to build the transaction with: the quote's `dexHash`, or another value from its `aggregatorOrder` for the same pair and amount. Lowercase `0x` and 64 hex digits.","example":"0xd9bf0c0ec020d1a26ba6698a24db3a538215d8fbf30588bddde694887c4cb55e","isRequired":true,"uniqueKey":"oneOf.0.params.dexHash","typeLabel":"string"}},"isRequired":true,"uniqueKey":"oneOf.0.params","typeLabel":"object"},"dryRun":{"type":"boolean","default":true,"description":"Accepted for compatibility and ignored: `POST /swap` never broadcasts, whatever the value.","uniqueKey":"oneOf.0.dryRun","typeLabel":"boolean"},"fees":{"type":"object","description":"Your integrator fee. It appears in `integratorFeeBreakdown.integratorMarginBps` and `integratorMarginAmount`. Olympex charges the fee in the signed request body: no fee is stored on the account. A child account of a partner can't call `POST /quotes` or `POST /swap`: it gets `403` `FORBIDDEN`, and the partner account signs quotes and swaps instead.","properties":{"feeBps":{"type":"integer","minimum":0,"maximum":100,"description":"Your fee in basis points, from 0 to 100 (1%).","example":25,"uniqueKey":"oneOf.0.fees.feeBps","typeLabel":"integer"},"feeRecipient":{"type":"string","minLength":1,"description":"EVM address that receives your fee. Required when `feeBps` is greater than 0; the zero address is rejected.","example":"0x1E67cb01969D79B2B895179e4A07D24a839dBb52","uniqueKey":"oneOf.0.fees.feeRecipient","typeLabel":"string"}},"uniqueKey":"oneOf.0.fees","typeLabel":"object"}},"uniqueKey":"oneOf.0","typeLabel":"Single-chain · object"},{"type":"object","title":"Cross-chain","required":["mode","params"],"properties":{"mode":{"type":"string","enum":["cross-chain"],"isRequired":true,"uniqueKey":"oneOf.1.mode","typeLabel":"enum\u003cstring>"},"params":{"type":"object","required":["account","inTokenAddress","outTokenAddress","fromChainId","toChainId","amount","slippage","dexHash"],"properties":{"account":{"type":"string","minLength":1,"description":"Wallet that sends the transaction on the source chain and receives funds on the destination chain. Any valid EVM address (lowercase or EIP-55 checksum).","isRequired":true,"uniqueKey":"oneOf.1.params.account","typeLabel":"string"},"inTokenAddress":{"type":"string","minLength":1,"description":"Token you send on the source chain. Any valid EVM address (lowercase or EIP-55 checksum).","isRequired":true,"uniqueKey":"oneOf.1.params.inTokenAddress","typeLabel":"string"},"outTokenAddress":{"type":"string","minLength":1,"description":"Token you receive on the destination chain. Any valid EVM address (lowercase or EIP-55 checksum).","isRequired":true,"uniqueKey":"oneOf.1.params.outTokenAddress","typeLabel":"string"},"fromChainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991,"description":"Source chain ID as an integer.","isRequired":true,"uniqueKey":"oneOf.1.params.fromChainId","typeLabel":"integer"},"toChainId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991,"description":"Destination chain ID as an integer.","isRequired":true,"uniqueKey":"oneOf.1.params.toChainId","typeLabel":"integer"},"amount":{"type":"string","minLength":1,"description":"Amount of the input token as a decimal string in human-readable units, for example `\"1.5\"` for 1.5 USDC. Do not convert to base units.","example":"10","isRequired":true,"uniqueKey":"oneOf.1.params.amount","typeLabel":"string"},"slippage":{"type":"string","minLength":1,"description":"Maximum slippage as a percentage string. `\"1\"` means 1%.","example":"1","isRequired":true,"uniqueKey":"oneOf.1.params.slippage","typeLabel":"string"},"dexHash":{"type":"string","pattern":"^0x[0-9a-f]{64}$","description":"Cross-chain provider to build the transaction with: the `dexHash` of your cross-chain quote. Lowercase `0x` and 64 hex digits.","example":"0x2676e2ee99986d45baa8242aea50a63a90b996df49a22e8975ba756b3706279f","isRequired":true,"uniqueKey":"oneOf.1.params.dexHash","typeLabel":"string"}},"isRequired":true,"uniqueKey":"oneOf.1.params","typeLabel":"object"},"fees":{"type":"object","description":"Your integrator fee. It appears in `integratorFeeBreakdown.integratorMarginBps` and `integratorMarginAmount`. Olympex charges the fee in the signed request body: no fee is stored on the account. A child account of a partner can't call `POST /quotes` or `POST /swap`: it gets `403` `FORBIDDEN`, and the partner account signs quotes and swaps instead.","properties":{"feeBps":{"type":"integer","minimum":0,"maximum":100,"description":"Your fee in basis points, from 0 to 100 (1%).","example":25,"uniqueKey":"oneOf.1.fees.feeBps","typeLabel":"integer"},"feeRecipient":{"type":"string","minLength":1,"description":"EVM address that receives your fee. Required when `feeBps` is greater than 0; the zero address is rejected.","example":"0x1E67cb01969D79B2B895179e4A07D24a839dBb52","uniqueKey":"oneOf.1.fees.feeRecipient","typeLabel":"string"}},"uniqueKey":"oneOf.1.fees","typeLabel":"object"}},"additionalProperties":false,"uniqueKey":"oneOf.1","typeLabel":"Cross-chain · object"}],"uniqueKey":"","typeLabel":"Single-chain · object | Cross-chain · object"},"examples":{"singleChain":{"title":"singleChain","summary":"Single-chain: 10 USDT to USDC on Polygon","value":{"mode":"single-chain","params":{"account":"0x1E67cb01969D79B2B895179e4A07D24a839dBb52","amount":"10","chainId":137,"dexHash":"0xd9bf0c0ec020d1a26ba6698a24db3a538215d8fbf30588bddde694887c4cb55e","gasPrice":"35","inTokenAddress":"0xc2132d05d31c914a87c6611c10748aeb04b58e8f","outTokenAddress":"0x3c499c542cef5e3811e1192ce70d8cc03d5c3359","slippage":"1"}}},"crossChain":{"title":"crossChain","summary":"Cross-chain: 10 USDT on Polygon to USDT on Ethereum","value":{"mode":"cross-chain","params":{"account":"0x1E67cb01969D79B2B895179e4A07D24a839dBb52","amount":"10","dexHash":"0x2676e2ee99986d45baa8242aea50a63a90b996df49a22e8975ba756b3706279f","fromChainId":137,"inTokenAddress":"0xc2132d05d31c914a87c6611c10748aeb04b58e8f","outTokenAddress":"0xdac17f958d2ee523a2206206994597c13d831ec7","slippage":"1","toChainId":1}}}},"exampleType":"examples"}},"exampleType":"examples"},"responses":{"17b71afa-cb20-4081-b4c1-5c50b570c04d":{"description":"Transaction calldata. `data.mode` matches the request.","content":{"application/json":{"schema":{"type":"object","required":["success","data","meta"],"properties":{"success":{"type":"boolean","enum":[true],"isRequired":true,"uniqueKey":"success","typeLabel":"enum\u003cboolean>"},"data":{"oneOf":[{"type":"object","title":"Single-chain","required":["mode","swap"],"properties":{"mode":{"type":"string","enum":["single-chain"],"isRequired":true,"uniqueKey":"data.oneOf.0.mode","typeLabel":"enum\u003cstring>"},"swap":{"type":"object","required":["to","gasLimit","data","outAmount","minOutAmount","value","contractToApprove"],"properties":{"to":{"type":"string","description":"Olympex aggregator contract on the chain. The transaction's `to`.","isRequired":true,"uniqueKey":"data.oneOf.0.swap.to","typeLabel":"string"},"data":{"type":"string","description":"Transaction calldata.","isRequired":true,"uniqueKey":"data.oneOf.0.swap.data","typeLabel":"string"},"value":{"type":"string","description":"Native token to send with the transaction, in wei. `\"0\"` for ERC-20 input.","isRequired":true,"uniqueKey":"data.oneOf.0.swap.value","typeLabel":"string"},"contractToApprove":{"type":"string","description":"Spender to approve for ERC-20 input before you send. Not needed for native-token input.","isRequired":true,"uniqueKey":"data.oneOf.0.swap.contractToApprove","typeLabel":"string"},"outAmount":{"type":"string","description":"Expected output in base units of `outTokenAddress`.","isRequired":true,"uniqueKey":"data.oneOf.0.swap.outAmount","typeLabel":"string"},"minOutAmount":{"type":"string","description":"Minimum output after slippage, in base units. The transaction reverts below it.","isRequired":true,"uniqueKey":"data.oneOf.0.swap.minOutAmount","typeLabel":"string"},"gasLimit":{"type":"string","description":"`estimatedGas × 2`. Not reliable for every source; estimate gas yourself (`eth_estimateGas` plus a buffer).","isRequired":true,"uniqueKey":"data.oneOf.0.swap.gasLimit","typeLabel":"string"},"estimatedGas":{"oneOf":[{"type":"string","description":"Source estimate in gas units. `\"1500000\"` is a placeholder used when the source gives none; `\"0\"` means unknown.","uniqueKey":"data.oneOf.0.swap.estimatedGas.oneOf.0","typeLabel":"string"},{"type":"null","description":"Source estimate in gas units. `\"1500000\"` is a placeholder used when the source gives none; `\"0\"` means unknown.","uniqueKey":"data.oneOf.0.swap.estimatedGas.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.oneOf.0.swap.estimatedGas","typeLabel":"string | null"}},"isRequired":true,"uniqueKey":"data.oneOf.0.swap","typeLabel":"object"}},"isRequired":true,"uniqueKey":"data.oneOf.0","typeLabel":"Single-chain · object"},{"type":"object","title":"Cross-chain","required":["mode","swap"],"properties":{"mode":{"type":"string","enum":["cross-chain"],"isRequired":true,"uniqueKey":"data.oneOf.1.mode","typeLabel":"enum\u003cstring>"},"swap":{"type":"object","required":["to","gasLimit","calldata","value","contractToApprove","dexHash"],"properties":{"to":{"type":"string","description":"Olympex aggregator contract on the source chain. The transaction's `to`.","isRequired":true,"uniqueKey":"data.oneOf.1.swap.to","typeLabel":"string"},"calldata":{"type":"string","description":"Transaction calldata. Cross-chain responses name it `calldata`, not `data`.","isRequired":true,"uniqueKey":"data.oneOf.1.swap.calldata","typeLabel":"string"},"value":{"type":"string","description":"Native token to send, in wei.","isRequired":true,"uniqueKey":"data.oneOf.1.swap.value","typeLabel":"string"},"contractToApprove":{"type":"string","description":"Spender to approve for ERC-20 input before you send.","isRequired":true,"uniqueKey":"data.oneOf.1.swap.contractToApprove","typeLabel":"string"},"dexHash":{"type":"string","description":"Identifies the provider. Pass it to `POST /tx-status` with the source transaction hash.","isRequired":true,"uniqueKey":"data.oneOf.1.swap.dexHash","typeLabel":"string"},"gasLimit":{"type":"string","description":"Derived from the provider's estimate, whose unit varies by provider. Estimate gas yourself.","isRequired":true,"uniqueKey":"data.oneOf.1.swap.gasLimit","typeLabel":"string"},"estimatedGas":{"oneOf":[{"type":"string","description":"Provider-reported estimate. Display only.","uniqueKey":"data.oneOf.1.swap.estimatedGas.oneOf.0","typeLabel":"string"},{"type":"null","description":"Provider-reported estimate. Display only.","uniqueKey":"data.oneOf.1.swap.estimatedGas.oneOf.1","typeLabel":"null"}],"uniqueKey":"data.oneOf.1.swap.estimatedGas","typeLabel":"string | null"}},"isRequired":true,"uniqueKey":"data.oneOf.1.swap","typeLabel":"object"}},"isRequired":true,"uniqueKey":"data.oneOf.1","typeLabel":"Cross-chain · object"}],"isRequired":true,"uniqueKey":"data","typeLabel":"Single-chain · object | Cross-chain · object"},"meta":{"type":"object","required":["requestId","version"],"properties":{"requestId":{"type":"string","description":"Unique ID for this request. Include it when you contact support.","isRequired":true,"uniqueKey":"meta.requestId","typeLabel":"string"},"version":{"type":"string","default":"v1","description":"API version that served the request.","isRequired":true,"uniqueKey":"meta.version","typeLabel":"string"},"accountType":{"type":"string","description":"Account type resolved by the signature check, for example `integrator`. Present when the request was authenticated; absent on the `404` for an unknown path or method.","uniqueKey":"meta.accountType","typeLabel":"string"},"apiKeyId":{"type":"string","format":"uuid","description":"The API key ID that signed the request. Present when the request was authenticated; absent on the `404` for an unknown path or method.","uniqueKey":"meta.apiKeyId","typeLabel":"string\u003cuuid>"}},"isRequired":true,"uniqueKey":"meta","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"singleChain":{"title":"singleChain","summary":"Single-chain (calldata shortened)","value":{"success":true,"data":{"mode":"single-chain","swap":{"to":"0xA91e13e8BfEbbC57ea008bfb2dE94AdD3F484E68","gasLimit":"3000000","contractToApprove":"0xa754451D6d32aB624111e5120409a474D29C2364","data":"0x8ad0a76c0000000000000000000000000000000000000000000000000000000000000020…0000000000000000","minOutAmount":"9899684","outAmount":"9999833","value":"0","estimatedGas":"1500000"}},"meta":{"requestId":"GD1TCjZeoAMES0g=","version":"v1","accountType":"integrator","apiKeyId":"00000000-0000-4000-8000-000000000000"}}},"crossChain":{"title":"crossChain","summary":"Cross-chain (calldata shortened); gasLimit here is not a gas amount: estimate gas yourself","value":{"success":true,"data":{"mode":"cross-chain","swap":{"to":"0xA91e13e8BfEbbC57ea008bfb2dE94AdD3F484E68","gasLimit":"900000","calldata":"0x0044fcef0000000000000000000000000000000000000000000000000000000000000020…0000000000000000","value":"0","estimatedGas":"450000","contractToApprove":"0x9f770bC130f57C2D1C7Bf9bb4965Ab7c79AdE22E","dexHash":"0x2676e2ee99986d45baa8242aea50a63a90b996df49a22e8975ba756b3706279f"}},"meta":{"requestId":"GD1T3h4IoAMESmw=","version":"v1","accountType":"integrator","apiKeyId":"00000000-0000-4000-8000-000000000000"}}}},"exampleType":"examples"}},"exampleType":"examples"},"1098297b-4555-43d6-9c24-cda1cd2f61ab":{"description":"The body failed validation (`VALIDATION_ERROR`). `error.details` lists each field and why it failed. A `dexHash` that isn't lowercase hex fails with the detail `\"dexHash must be a lowercase 32-byte hex value\"`; a well-formed hash that no source of this `mode` has returns `\"Unknown or disabled dexHash\"`, with empty `details`.","content":{"application/json":{"schema":{"type":"object","required":["success","error","meta"],"properties":{"success":{"type":"boolean","enum":[false],"isRequired":true,"uniqueKey":"success","typeLabel":"enum\u003cboolean>"},"error":{"type":"object","required":["code","message","details"],"properties":{"code":{"type":"string","description":"Machine-readable error code. `VALIDATION_ERROR` (400), `UNAUTHORIZED` (401), `FORBIDDEN` (403), `NOT_FOUND` (404, also for an unknown path or method), `CONFLICT` (409), `NO_ROUTE` (422), `RATE_LIMIT_EXCEEDED` (429), `SERVICE_UNAVAILABLE` (503, from key rotation and revocation), and for 500: `QUOTE_ERROR`, `CROSS_CHAIN_QUOTE_ERROR`, `SWAP_ERROR`, `CROSS_CHAIN_SWAP_ERROR`, `SUPPORT_CHAIN_ERROR`, `ENABLED_CHAINS_ERROR`, `TOKEN_LIST_ERROR`, `TX_STATUS_ERROR`, `INTERNAL_ERROR`. Olympex can add codes: handle an unknown code by its HTTP status.","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","description":"Human-readable summary. Don't parse it.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"details":{"type":"array","items":{"type":"object","additionalProperties":true,"description":"Validation errors carry `field` and `message`; other errors carry `message` only.","properties":{"field":{"type":"string","description":"Dot path of the invalid field, for example `params.chainId`. Empty for the top level.","uniqueKey":"error.details.items.[INDEX].field","typeLabel":"string"},"message":{"type":"string","uniqueKey":"error.details.items.[INDEX].message","typeLabel":"string"}},"uniqueKey":"error.details.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"error.details","typeLabel":"object[]"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"},"meta":{"type":"object","required":["requestId","version"],"properties":{"requestId":{"type":"string","description":"Unique ID for this request. Include it when you contact support.","isRequired":true,"uniqueKey":"meta.requestId","typeLabel":"string"},"version":{"type":"string","default":"v1","description":"API version that served the request.","isRequired":true,"uniqueKey":"meta.version","typeLabel":"string"},"accountType":{"type":"string","description":"Account type resolved by the signature check, for example `integrator`. Present when the request was authenticated; absent on the `404` for an unknown path or method.","uniqueKey":"meta.accountType","typeLabel":"string"},"apiKeyId":{"type":"string","format":"uuid","description":"The API key ID that signed the request. Present when the request was authenticated; absent on the `404` for an unknown path or method.","uniqueKey":"meta.apiKeyId","typeLabel":"string\u003cuuid>"}},"isRequired":true,"uniqueKey":"meta","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"missingDexHash":{"title":"missingDexHash","summary":"No dexHash, for example a body that still sends the retired aggregatorId","value":{"success":false,"error":{"code":"VALIDATION_ERROR","message":"Invalid request body","details":[{"field":"params.dexHash","message":"Invalid input: expected string, received undefined"}]},"meta":{"requestId":"GD1TfgLXIAMESMQ=","version":"v1","accountType":"integrator","apiKeyId":"00000000-0000-4000-8000-000000000000"}}},"unknownDexHash":{"title":"unknownDexHash","summary":"Unknown or disabled dexHash","value":{"success":false,"error":{"code":"VALIDATION_ERROR","message":"Unknown or disabled dexHash","details":[]},"meta":{"requestId":"GD1ThiWEoAMEaMg=","version":"v1","accountType":"integrator","apiKeyId":"00000000-0000-4000-8000-000000000000"}}}},"exampleType":"examples"}},"exampleType":"examples"},"68e8493a-68f4-4197-a75f-82dd6f2b9ecb":{"description":"A signing header is missing. The gateway answers with `{\"message\":\"Unauthorized\"}` before your request reaches Olympex; the handler answers with the `UNAUTHORIZED` envelope when the authorizer context is missing.","content":{"application/json":{"schema":{"oneOf":[{"type":"object","description":"Returned by the API gateway itself: `401` or `403` when the signed headers are missing or rejected, `429` when it throttles requests, and `500` or `503` when it can't get a response from Olympex in time. It has no `success`, `error` or `meta`.","required":["message"],"properties":{"message":{"type":"string","example":"Forbidden","isRequired":true,"uniqueKey":"oneOf.0.message","typeLabel":"string"}},"uniqueKey":"oneOf.0","typeLabel":"object"},{"type":"object","required":["success","error","meta"],"properties":{"success":{"type":"boolean","enum":[false],"isRequired":true,"uniqueKey":"oneOf.1.success","typeLabel":"enum\u003cboolean>"},"error":{"type":"object","required":["code","message","details"],"properties":{"code":{"type":"string","description":"Machine-readable error code. `VALIDATION_ERROR` (400), `UNAUTHORIZED` (401), `FORBIDDEN` (403), `NOT_FOUND` (404, also for an unknown path or method), `CONFLICT` (409), `NO_ROUTE` (422), `RATE_LIMIT_EXCEEDED` (429), `SERVICE_UNAVAILABLE` (503, from key rotation and revocation), and for 500: `QUOTE_ERROR`, `CROSS_CHAIN_QUOTE_ERROR`, `SWAP_ERROR`, `CROSS_CHAIN_SWAP_ERROR`, `SUPPORT_CHAIN_ERROR`, `ENABLED_CHAINS_ERROR`, `TOKEN_LIST_ERROR`, `TX_STATUS_ERROR`, `INTERNAL_ERROR`. Olympex can add codes: handle an unknown code by its HTTP status.","isRequired":true,"uniqueKey":"oneOf.1.error.code","typeLabel":"string"},"message":{"type":"string","description":"Human-readable summary. Don't parse it.","isRequired":true,"uniqueKey":"oneOf.1.error.message","typeLabel":"string"},"details":{"type":"array","items":{"type":"object","additionalProperties":true,"description":"Validation errors carry `field` and `message`; other errors carry `message` only.","properties":{"field":{"type":"string","description":"Dot path of the invalid field, for example `params.chainId`. Empty for the top level.","uniqueKey":"oneOf.1.error.details.items.[INDEX].field","typeLabel":"string"},"message":{"type":"string","uniqueKey":"oneOf.1.error.details.items.[INDEX].message","typeLabel":"string"}},"uniqueKey":"oneOf.1.error.details.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"oneOf.1.error.details","typeLabel":"object[]"}},"isRequired":true,"uniqueKey":"oneOf.1.error","typeLabel":"object"},"meta":{"type":"object","required":["requestId","version"],"properties":{"requestId":{"type":"string","description":"Unique ID for this request. Include it when you contact support.","isRequired":true,"uniqueKey":"oneOf.1.meta.requestId","typeLabel":"string"},"version":{"type":"string","default":"v1","description":"API version that served the request.","isRequired":true,"uniqueKey":"oneOf.1.meta.version","typeLabel":"string"},"accountType":{"type":"string","description":"Account type resolved by the signature check, for example `integrator`. Present when the request was authenticated; absent on the `404` for an unknown path or method.","uniqueKey":"oneOf.1.meta.accountType","typeLabel":"string"},"apiKeyId":{"type":"string","format":"uuid","description":"The API key ID that signed the request. Present when the request was authenticated; absent on the `404` for an unknown path or method.","uniqueKey":"oneOf.1.meta.apiKeyId","typeLabel":"string\u003cuuid>"}},"isRequired":true,"uniqueKey":"oneOf.1.meta","typeLabel":"object"}},"uniqueKey":"oneOf.1","typeLabel":"object"}],"uniqueKey":"","typeLabel":"object"},"example":{"message":"Unauthorized"},"examples":{"Example":{"title":"Example","value":{"message":"Unauthorized"}}},"exampleType":"examples"}},"exampleType":"examples"},"1cb050d4-631b-48c0-9a81-32edf616e26b":{"description":"Authentication failed: unknown key, wrong passphrase, invalid signature, timestamp outside the ±300 s window, reused nonce, or inactive account (gateway `{\"message\":\"Forbidden\"}`). The handler answers with the `FORBIDDEN` envelope when the body does not match the signed `bodyHash`. A child account of a partner gets `FORBIDDEN` too: only the partner account can call this endpoint.","content":{"application/json":{"schema":{"oneOf":[{"type":"object","description":"Returned by the API gateway itself: `401` or `403` when the signed headers are missing or rejected, `429` when it throttles requests, and `500` or `503` when it can't get a response from Olympex in time. It has no `success`, `error` or `meta`.","required":["message"],"properties":{"message":{"type":"string","example":"Forbidden","isRequired":true,"uniqueKey":"oneOf.0.message","typeLabel":"string"}},"uniqueKey":"oneOf.0","typeLabel":"object"},{"type":"object","required":["success","error","meta"],"properties":{"success":{"type":"boolean","enum":[false],"isRequired":true,"uniqueKey":"oneOf.1.success","typeLabel":"enum\u003cboolean>"},"error":{"type":"object","required":["code","message","details"],"properties":{"code":{"type":"string","description":"Machine-readable error code. `VALIDATION_ERROR` (400), `UNAUTHORIZED` (401), `FORBIDDEN` (403), `NOT_FOUND` (404, also for an unknown path or method), `CONFLICT` (409), `NO_ROUTE` (422), `RATE_LIMIT_EXCEEDED` (429), `SERVICE_UNAVAILABLE` (503, from key rotation and revocation), and for 500: `QUOTE_ERROR`, `CROSS_CHAIN_QUOTE_ERROR`, `SWAP_ERROR`, `CROSS_CHAIN_SWAP_ERROR`, `SUPPORT_CHAIN_ERROR`, `ENABLED_CHAINS_ERROR`, `TOKEN_LIST_ERROR`, `TX_STATUS_ERROR`, `INTERNAL_ERROR`. Olympex can add codes: handle an unknown code by its HTTP status.","isRequired":true,"uniqueKey":"oneOf.1.error.code","typeLabel":"string"},"message":{"type":"string","description":"Human-readable summary. Don't parse it.","isRequired":true,"uniqueKey":"oneOf.1.error.message","typeLabel":"string"},"details":{"type":"array","items":{"type":"object","additionalProperties":true,"description":"Validation errors carry `field` and `message`; other errors carry `message` only.","properties":{"field":{"type":"string","description":"Dot path of the invalid field, for example `params.chainId`. Empty for the top level.","uniqueKey":"oneOf.1.error.details.items.[INDEX].field","typeLabel":"string"},"message":{"type":"string","uniqueKey":"oneOf.1.error.details.items.[INDEX].message","typeLabel":"string"}},"uniqueKey":"oneOf.1.error.details.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"oneOf.1.error.details","typeLabel":"object[]"}},"isRequired":true,"uniqueKey":"oneOf.1.error","typeLabel":"object"},"meta":{"type":"object","required":["requestId","version"],"properties":{"requestId":{"type":"string","description":"Unique ID for this request. Include it when you contact support.","isRequired":true,"uniqueKey":"oneOf.1.meta.requestId","typeLabel":"string"},"version":{"type":"string","default":"v1","description":"API version that served the request.","isRequired":true,"uniqueKey":"oneOf.1.meta.version","typeLabel":"string"},"accountType":{"type":"string","description":"Account type resolved by the signature check, for example `integrator`. Present when the request was authenticated; absent on the `404` for an unknown path or method.","uniqueKey":"oneOf.1.meta.accountType","typeLabel":"string"},"apiKeyId":{"type":"string","format":"uuid","description":"The API key ID that signed the request. Present when the request was authenticated; absent on the `404` for an unknown path or method.","uniqueKey":"oneOf.1.meta.apiKeyId","typeLabel":"string\u003cuuid>"}},"isRequired":true,"uniqueKey":"oneOf.1.meta","typeLabel":"object"}},"uniqueKey":"oneOf.1","typeLabel":"object"}],"uniqueKey":"","typeLabel":"object"},"examples":{"gateway":{"title":"gateway","summary":"Signature rejected by the gateway","value":{"message":"Forbidden"}},"bodyHash":{"title":"bodyHash","summary":"Body does not match the signed hash","value":{"success":false,"error":{"code":"FORBIDDEN","message":"Invalid body hash","details":[]},"meta":{"requestId":"ENXGDhsXIAMEMEw=","version":"v1","accountType":"integrator","apiKeyId":"00000000-0000-4000-8000-000000000000"}}}},"exampleType":"examples"}},"exampleType":"examples"},"bb756a7b-0ad4-41a7-97e5-5ea8607a849e":{"description":"Unknown path or wrong method (`NOT_FOUND`). `error.message` names the method and path.","content":{"application/json":{"schema":{"type":"object","required":["success","error","meta"],"properties":{"success":{"type":"boolean","enum":[false],"isRequired":true,"uniqueKey":"success","typeLabel":"enum\u003cboolean>"},"error":{"type":"object","required":["code","message","details"],"properties":{"code":{"type":"string","description":"Machine-readable error code. `VALIDATION_ERROR` (400), `UNAUTHORIZED` (401), `FORBIDDEN` (403), `NOT_FOUND` (404, also for an unknown path or method), `CONFLICT` (409), `NO_ROUTE` (422), `RATE_LIMIT_EXCEEDED` (429), `SERVICE_UNAVAILABLE` (503, from key rotation and revocation), and for 500: `QUOTE_ERROR`, `CROSS_CHAIN_QUOTE_ERROR`, `SWAP_ERROR`, `CROSS_CHAIN_SWAP_ERROR`, `SUPPORT_CHAIN_ERROR`, `ENABLED_CHAINS_ERROR`, `TOKEN_LIST_ERROR`, `TX_STATUS_ERROR`, `INTERNAL_ERROR`. Olympex can add codes: handle an unknown code by its HTTP status.","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","description":"Human-readable summary. Don't parse it.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"details":{"type":"array","items":{"type":"object","additionalProperties":true,"description":"Validation errors carry `field` and `message`; other errors carry `message` only.","properties":{"field":{"type":"string","description":"Dot path of the invalid field, for example `params.chainId`. Empty for the top level.","uniqueKey":"error.details.items.[INDEX].field","typeLabel":"string"},"message":{"type":"string","uniqueKey":"error.details.items.[INDEX].message","typeLabel":"string"}},"uniqueKey":"error.details.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"error.details","typeLabel":"object[]"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"},"meta":{"type":"object","required":["requestId","version"],"properties":{"requestId":{"type":"string","description":"Unique ID for this request. Include it when you contact support.","isRequired":true,"uniqueKey":"meta.requestId","typeLabel":"string"},"version":{"type":"string","default":"v1","description":"API version that served the request.","isRequired":true,"uniqueKey":"meta.version","typeLabel":"string"},"accountType":{"type":"string","description":"Account type resolved by the signature check, for example `integrator`. Present when the request was authenticated; absent on the `404` for an unknown path or method.","uniqueKey":"meta.accountType","typeLabel":"string"},"apiKeyId":{"type":"string","format":"uuid","description":"The API key ID that signed the request. Present when the request was authenticated; absent on the `404` for an unknown path or method.","uniqueKey":"meta.apiKeyId","typeLabel":"string\u003cuuid>"}},"isRequired":true,"uniqueKey":"meta","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"example":{"success":false,"error":{"code":"NOT_FOUND","message":"No route for GET /api/v1/quote","details":[]},"meta":{"requestId":"E7edogG4IAMEPYA=","version":"v1"}},"examples":{"Example":{"title":"Example","value":{"success":false,"error":{"code":"NOT_FOUND","message":"No route for GET /api/v1/quote","details":[]},"meta":{"requestId":"E7edogG4IAMEPYA=","version":"v1"}}}},"exampleType":"examples"}},"exampleType":"examples"},"f42f513a-1ec3-48f6-8763-13b71b41520e":{"description":"`NO_ROUTE`: no liquidity source returned a usable route for this pair and amount. Olympex doesn't yet tell apart no liquidity, an unsupported pair or amount, and every source failing or timing out, so it's safe to retry later. On a single-chain swap, build with the next `dexHash` in the quote's `aggregatorOrder`; on a cross-chain swap, request a new quote.","content":{"application/json":{"schema":{"type":"object","required":["success","error","meta"],"properties":{"success":{"type":"boolean","enum":[false],"isRequired":true,"uniqueKey":"success","typeLabel":"enum\u003cboolean>"},"error":{"type":"object","required":["code","message","details"],"properties":{"code":{"type":"string","description":"Machine-readable error code. `VALIDATION_ERROR` (400), `UNAUTHORIZED` (401), `FORBIDDEN` (403), `NOT_FOUND` (404, also for an unknown path or method), `CONFLICT` (409), `NO_ROUTE` (422), `RATE_LIMIT_EXCEEDED` (429), `SERVICE_UNAVAILABLE` (503, from key rotation and revocation), and for 500: `QUOTE_ERROR`, `CROSS_CHAIN_QUOTE_ERROR`, `SWAP_ERROR`, `CROSS_CHAIN_SWAP_ERROR`, `SUPPORT_CHAIN_ERROR`, `ENABLED_CHAINS_ERROR`, `TOKEN_LIST_ERROR`, `TX_STATUS_ERROR`, `INTERNAL_ERROR`. Olympex can add codes: handle an unknown code by its HTTP status.","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","description":"Human-readable summary. Don't parse it.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"details":{"type":"array","items":{"type":"object","additionalProperties":true,"description":"Validation errors carry `field` and `message`; other errors carry `message` only.","properties":{"field":{"type":"string","description":"Dot path of the invalid field, for example `params.chainId`. Empty for the top level.","uniqueKey":"error.details.items.[INDEX].field","typeLabel":"string"},"message":{"type":"string","uniqueKey":"error.details.items.[INDEX].message","typeLabel":"string"}},"uniqueKey":"error.details.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"error.details","typeLabel":"object[]"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"},"meta":{"type":"object","required":["requestId","version"],"properties":{"requestId":{"type":"string","description":"Unique ID for this request. Include it when you contact support.","isRequired":true,"uniqueKey":"meta.requestId","typeLabel":"string"},"version":{"type":"string","default":"v1","description":"API version that served the request.","isRequired":true,"uniqueKey":"meta.version","typeLabel":"string"},"accountType":{"type":"string","description":"Account type resolved by the signature check, for example `integrator`. Present when the request was authenticated; absent on the `404` for an unknown path or method.","uniqueKey":"meta.accountType","typeLabel":"string"},"apiKeyId":{"type":"string","format":"uuid","description":"The API key ID that signed the request. Present when the request was authenticated; absent on the `404` for an unknown path or method.","uniqueKey":"meta.apiKeyId","typeLabel":"string\u003cuuid>"}},"isRequired":true,"uniqueKey":"meta","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"success":false,"error":{"code":"\u003cstring>","message":"\u003cstring>","details":[{"field":"\u003cstring>","message":"\u003cstring>"}]},"meta":{"requestId":"\u003cstring>","version":"v1","accountType":"\u003cstring>","apiKeyId":"3c90c3cc-0d44-4b50-8888-8dd25736052a"}}}},"exampleType":"generated"}},"exampleType":"generated"},"7b35c256-dca2-4563-94c0-1796b38e6b97":{"description":"The account went over this endpoint's rate limit (`RATE_LIMIT_EXCEEDED`): 60 requests per 60 seconds on the default plan. Every API key of the account counts toward it. The request didn't run: wait about a minute before you send it again. The gateway can also answer `429` with `{\"message\":\"Too Many Requests\"}`. See [Rate limits](/authentication/limits#rate-limits).","content":{"application/json":{"schema":{"oneOf":[{"type":"object","required":["success","error","meta"],"properties":{"success":{"type":"boolean","enum":[false],"isRequired":true,"uniqueKey":"oneOf.0.success","typeLabel":"enum\u003cboolean>"},"error":{"type":"object","required":["code","message","details"],"properties":{"code":{"type":"string","description":"Machine-readable error code. `VALIDATION_ERROR` (400), `UNAUTHORIZED` (401), `FORBIDDEN` (403), `NOT_FOUND` (404, also for an unknown path or method), `CONFLICT` (409), `NO_ROUTE` (422), `RATE_LIMIT_EXCEEDED` (429), `SERVICE_UNAVAILABLE` (503, from key rotation and revocation), and for 500: `QUOTE_ERROR`, `CROSS_CHAIN_QUOTE_ERROR`, `SWAP_ERROR`, `CROSS_CHAIN_SWAP_ERROR`, `SUPPORT_CHAIN_ERROR`, `ENABLED_CHAINS_ERROR`, `TOKEN_LIST_ERROR`, `TX_STATUS_ERROR`, `INTERNAL_ERROR`. Olympex can add codes: handle an unknown code by its HTTP status.","isRequired":true,"uniqueKey":"oneOf.0.error.code","typeLabel":"string"},"message":{"type":"string","description":"Human-readable summary. Don't parse it.","isRequired":true,"uniqueKey":"oneOf.0.error.message","typeLabel":"string"},"details":{"type":"array","items":{"type":"object","additionalProperties":true,"description":"Validation errors carry `field` and `message`; other errors carry `message` only.","properties":{"field":{"type":"string","description":"Dot path of the invalid field, for example `params.chainId`. Empty for the top level.","uniqueKey":"oneOf.0.error.details.items.[INDEX].field","typeLabel":"string"},"message":{"type":"string","uniqueKey":"oneOf.0.error.details.items.[INDEX].message","typeLabel":"string"}},"uniqueKey":"oneOf.0.error.details.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"oneOf.0.error.details","typeLabel":"object[]"}},"isRequired":true,"uniqueKey":"oneOf.0.error","typeLabel":"object"},"meta":{"type":"object","required":["requestId","version"],"properties":{"requestId":{"type":"string","description":"Unique ID for this request. Include it when you contact support.","isRequired":true,"uniqueKey":"oneOf.0.meta.requestId","typeLabel":"string"},"version":{"type":"string","default":"v1","description":"API version that served the request.","isRequired":true,"uniqueKey":"oneOf.0.meta.version","typeLabel":"string"},"accountType":{"type":"string","description":"Account type resolved by the signature check, for example `integrator`. Present when the request was authenticated; absent on the `404` for an unknown path or method.","uniqueKey":"oneOf.0.meta.accountType","typeLabel":"string"},"apiKeyId":{"type":"string","format":"uuid","description":"The API key ID that signed the request. Present when the request was authenticated; absent on the `404` for an unknown path or method.","uniqueKey":"oneOf.0.meta.apiKeyId","typeLabel":"string\u003cuuid>"}},"isRequired":true,"uniqueKey":"oneOf.0.meta","typeLabel":"object"}},"uniqueKey":"oneOf.0","typeLabel":"object"},{"type":"object","description":"Returned by the API gateway itself: `401` or `403` when the signed headers are missing or rejected, `429` when it throttles requests, and `500` or `503` when it can't get a response from Olympex in time. It has no `success`, `error` or `meta`.","required":["message"],"properties":{"message":{"type":"string","example":"Forbidden","isRequired":true,"uniqueKey":"oneOf.1.message","typeLabel":"string"}},"uniqueKey":"oneOf.1","typeLabel":"object"}],"uniqueKey":"","typeLabel":"object"},"example":{"success":false,"error":{"code":"RATE_LIMIT_EXCEEDED","message":"Too many requests for this account","details":[]},"meta":{"requestId":"GQ0M8jkooAMESoQ=","version":"v1","accountType":"integrator","apiKeyId":"00000000-0000-4000-8000-000000000000"}},"examples":{"Example":{"title":"Example","value":{"success":false,"error":{"code":"RATE_LIMIT_EXCEEDED","message":"Too many requests for this account","details":[]},"meta":{"requestId":"GQ0M8jkooAMESoQ=","version":"v1","accountType":"integrator","apiKeyId":"00000000-0000-4000-8000-000000000000"}}}},"exampleType":"examples"}},"exampleType":"examples"},"21237d2b-93b5-4d88-8045-d5a932a7608e":{"description":"Olympex could not build the swap (`SWAP_ERROR` or `CROSS_CHAIN_SWAP_ERROR`, with the source's message in `details`) or hit an unexpected error (`INTERNAL_ERROR`), or the gateway could not get a response (`{\"message\":\"Internal Server Error\"}`), for example after a timeout of about 30 seconds. Treat `SWAP_ERROR` like `422 NO_ROUTE`: build with the next `dexHash` in the quote's `aggregatorOrder`. On `CROSS_CHAIN_SWAP_ERROR`, request a new quote. Otherwise, retry with backoff.","content":{"application/json":{"schema":{"oneOf":[{"type":"object","required":["success","error","meta"],"properties":{"success":{"type":"boolean","enum":[false],"isRequired":true,"uniqueKey":"oneOf.0.success","typeLabel":"enum\u003cboolean>"},"error":{"type":"object","required":["code","message","details"],"properties":{"code":{"type":"string","description":"Machine-readable error code. `VALIDATION_ERROR` (400), `UNAUTHORIZED` (401), `FORBIDDEN` (403), `NOT_FOUND` (404, also for an unknown path or method), `CONFLICT` (409), `NO_ROUTE` (422), `RATE_LIMIT_EXCEEDED` (429), `SERVICE_UNAVAILABLE` (503, from key rotation and revocation), and for 500: `QUOTE_ERROR`, `CROSS_CHAIN_QUOTE_ERROR`, `SWAP_ERROR`, `CROSS_CHAIN_SWAP_ERROR`, `SUPPORT_CHAIN_ERROR`, `ENABLED_CHAINS_ERROR`, `TOKEN_LIST_ERROR`, `TX_STATUS_ERROR`, `INTERNAL_ERROR`. Olympex can add codes: handle an unknown code by its HTTP status.","isRequired":true,"uniqueKey":"oneOf.0.error.code","typeLabel":"string"},"message":{"type":"string","description":"Human-readable summary. Don't parse it.","isRequired":true,"uniqueKey":"oneOf.0.error.message","typeLabel":"string"},"details":{"type":"array","items":{"type":"object","additionalProperties":true,"description":"Validation errors carry `field` and `message`; other errors carry `message` only.","properties":{"field":{"type":"string","description":"Dot path of the invalid field, for example `params.chainId`. Empty for the top level.","uniqueKey":"oneOf.0.error.details.items.[INDEX].field","typeLabel":"string"},"message":{"type":"string","uniqueKey":"oneOf.0.error.details.items.[INDEX].message","typeLabel":"string"}},"uniqueKey":"oneOf.0.error.details.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"oneOf.0.error.details","typeLabel":"object[]"}},"isRequired":true,"uniqueKey":"oneOf.0.error","typeLabel":"object"},"meta":{"type":"object","required":["requestId","version"],"properties":{"requestId":{"type":"string","description":"Unique ID for this request. Include it when you contact support.","isRequired":true,"uniqueKey":"oneOf.0.meta.requestId","typeLabel":"string"},"version":{"type":"string","default":"v1","description":"API version that served the request.","isRequired":true,"uniqueKey":"oneOf.0.meta.version","typeLabel":"string"},"accountType":{"type":"string","description":"Account type resolved by the signature check, for example `integrator`. Present when the request was authenticated; absent on the `404` for an unknown path or method.","uniqueKey":"oneOf.0.meta.accountType","typeLabel":"string"},"apiKeyId":{"type":"string","format":"uuid","description":"The API key ID that signed the request. Present when the request was authenticated; absent on the `404` for an unknown path or method.","uniqueKey":"oneOf.0.meta.apiKeyId","typeLabel":"string\u003cuuid>"}},"isRequired":true,"uniqueKey":"oneOf.0.meta","typeLabel":"object"}},"uniqueKey":"oneOf.0","typeLabel":"object"},{"type":"object","description":"Returned by the API gateway itself: `401` or `403` when the signed headers are missing or rejected, `429` when it throttles requests, and `500` or `503` when it can't get a response from Olympex in time. It has no `success`, `error` or `meta`.","required":["message"],"properties":{"message":{"type":"string","example":"Forbidden","isRequired":true,"uniqueKey":"oneOf.1.message","typeLabel":"string"}},"uniqueKey":"oneOf.1","typeLabel":"object"}],"uniqueKey":"","typeLabel":"object"},"example":{"success":false,"error":{"code":"SWAP_ERROR","message":"Error fetching single-chain swap","details":[{"message":"Request failed with status code 400"}]},"meta":{"requestId":"E7egOiScoAMEZWw=","version":"v1","accountType":"integrator","apiKeyId":"00000000-0000-4000-8000-000000000000"}},"examples":{"Example":{"title":"Example","value":{"success":false,"error":{"code":"SWAP_ERROR","message":"Error fetching single-chain swap","details":[{"message":"Request failed with status code 400"}]},"meta":{"requestId":"E7egOiScoAMEZWw=","version":"v1","accountType":"integrator","apiKeyId":"00000000-0000-4000-8000-000000000000"}}}},"exampleType":"examples"}},"exampleType":"examples"},"34e43310-f3c3-497f-b691-5bdaa4c818cd":{"description":"The gateway could not get a response in time (the integration timeout is about 30 seconds) or the service is briefly unavailable. Returned by the gateway. Retry with backoff.","content":{"application/json":{"schema":{"type":"object","required":["message"],"description":"Returned by the API gateway itself: `401` or `403` when the signed headers are missing or rejected, `429` when it throttles requests, and `500` or `503` when it can't get a response from Olympex in time. It has no `success`, `error` or `meta`.","properties":{"message":{"type":"string","example":"Forbidden","isRequired":true,"uniqueKey":"message","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"example":{"message":"Service Unavailable"},"examples":{"Example":{"title":"Example","value":{"message":"Service Unavailable"}}},"exampleType":"examples"}},"exampleType":"examples"}},"security":{"a116acee-ddb4-4279-946d-c91d009441ee":{"ApiKeyId":{"type":"apiKey","in":"header","name":"x-api-key-id","description":"Your API key ID (UUID). See [Sign requests](https://docs.olympex.io/authentication/sign-requests).","scopes":[],"schemeName":"ApiKeyId"},"ValueInfo":{"type":"apiKey","in":"header","name":"x-value-info","description":"Base64 of `timestamp + \"\\n\" + nonce + \"\\n\" + bodyHash`, where `timestamp` is Unix seconds, `nonce` is 24 new hexadecimal characters and `bodyHash` is the unpadded base64url SHA-256 of the canonical body.","scopes":[],"schemeName":"ValueInfo"},"Passphrase":{"type":"apiKey","in":"header","name":"x-passphrase","description":"Your account passphrase. Treat it like the secret key.","scopes":[],"schemeName":"Passphrase"},"Signature":{"type":"apiKey","in":"header","name":"x-signature","description":"Lowercase hex HMAC-SHA256 (signature v2), keyed with your secret key string (UTF-8, not decoded), of seven lines joined with `\\n`, with no trailing newline: `OLPX-HMAC-SHA256-V2`, `timestamp`, `nonce`, the uppercase method, `path`, `canonicalQuery` and `bodyHash`. `path` is the request path including `/api/v1`, without the query string, for example `/api/v1/limit-order/\u003cid>`. `canonicalQuery` is the query parameters decoded (`+` is a space), sorted by key and then by value, re-encoded per RFC 3986 and joined with `\u0026`, or the empty string when there is no query. Headers signed for one request are rejected on any other. See [Sign requests](https://docs.olympex.io/authentication/sign-requests).","scopes":[],"schemeName":"Signature"}}},"servers":{"8b3c2999-3a66-4bba-ba32-b89285456fb5":{"url":"https://api-rest.olympex.io/api/v1","description":"Olympex REST API v1"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"apiKey","in":"header","name":"x-api-key-id","description":"Your API key ID (UUID). See [Sign requests](https://docs.olympex.io/authentication/sign-requests).","scopes":[],"schemeName":"ApiKeyId"},"schema":{"title":"x-api-key-id","type":"string","description":"Your API key ID (UUID). See [Sign requests](https://docs.olympex.io/authentication/sign-requests).","isRequired":true,"typeLabel":"string","deprecated":false},"schemeName":"ApiKeyId","name":"x-api-key-id"},{"scheme":{"type":"apiKey","in":"header","name":"x-value-info","description":"Base64 of `timestamp + \"\\n\" + nonce + \"\\n\" + bodyHash`, where `timestamp` is Unix seconds, `nonce` is 24 new hexadecimal characters and `bodyHash` is the unpadded base64url SHA-256 of the canonical body.","scopes":[],"schemeName":"ValueInfo"},"schema":{"title":"x-value-info","type":"string","description":"Base64 of `timestamp + \"\\n\" + nonce + \"\\n\" + bodyHash`, where `timestamp` is Unix seconds, `nonce` is 24 new hexadecimal characters and `bodyHash` is the unpadded base64url SHA-256 of the canonical body.","isRequired":true,"typeLabel":"string","deprecated":false},"schemeName":"ValueInfo","name":"x-value-info"},{"scheme":{"type":"apiKey","in":"header","name":"x-passphrase","description":"Your account passphrase. Treat it like the secret key.","scopes":[],"schemeName":"Passphrase"},"schema":{"title":"x-passphrase","type":"string","description":"Your account passphrase. Treat it like the secret key.","isRequired":true,"typeLabel":"string","deprecated":false},"schemeName":"Passphrase","name":"x-passphrase"},{"scheme":{"type":"apiKey","in":"header","name":"x-signature","description":"Lowercase hex HMAC-SHA256 (signature v2), keyed with your secret key string (UTF-8, not decoded), of seven lines joined with `\\n`, with no trailing newline: `OLPX-HMAC-SHA256-V2`, `timestamp`, `nonce`, the uppercase method, `path`, `canonicalQuery` and `bodyHash`. `path` is the request path including `/api/v1`, without the query string, for example `/api/v1/limit-order/\u003cid>`. `canonicalQuery` is the query parameters decoded (`+` is a space), sorted by key and then by value, re-encoded per RFC 3986 and joined with `\u0026`, or the empty string when there is no query. Headers signed for one request are rejected on any other. See [Sign requests](https://docs.olympex.io/authentication/sign-requests).","scopes":[],"schemeName":"Signature"},"schema":{"title":"x-signature","type":"string","description":"Lowercase hex HMAC-SHA256 (signature v2), keyed with your secret key string (UTF-8, not decoded), of seven lines joined with `\\n`, with no trailing newline: `OLPX-HMAC-SHA256-V2`, `timestamp`, `nonce`, the uppercase method, `path`, `canonicalQuery` and `bodyHash`. `path` is the request path including `/api/v1`, without the query string, for example `/api/v1/limit-order/\u003cid>`. `canonicalQuery` is the query parameters decoded (`+` is a space), sorted by key and then by value, re-encoded per RFC 3986 and joined with `\u0026`, or the empty string when there is no query. Headers signed for one request are rejected on any other. See [Sign requests](https://docs.olympex.io/authentication/sign-requests).","isRequired":true,"typeLabel":"string","deprecated":false},"schemeName":"Signature","name":"x-signature"}],"title":"ApiKeyId \u0026 ValueInfo \u0026 Passphrase \u0026 Signature"}]},"originalFileLocation":"api-reference/openapi.json"},"subdomain":"olympex","siteName":"Olympex","title":"Build a swap - Olympex","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-03T13:01:13.641Z","originalFileLocation":"api-reference/swap/build-swap.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"dark\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Get unsigned transaction calldata for a quoted route, on one chain or across two chains.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Olympex\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/olympex/MLztvLnpATuFCaEl/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/olympex/MLztvLnpATuFCaEl/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/olympex/MLztvLnpATuFCaEl/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/olympex/MLztvLnpATuFCaEl/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/olympex/MLztvLnpATuFCaEl/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/olympex/MLztvLnpATuFCaEl/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/olympex/MLztvLnpATuFCaEl/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/olympex/MLztvLnpATuFCaEl/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/olympex/MLztvLnpATuFCaEl/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Build a swap - Olympex\">\u003cmeta data-mint-head property=\"og:description\" content=\"Get unsigned transaction calldata for a quoted route, on one chain or across two chains.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Olympex API\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.olympex.io/api-reference/swap/build-swap\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://olympex.mintlify.site/images/og/default.png\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Build a swap - Olympex\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Get unsigned transaction calldata for a quoted route, on one chain or across two chains.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://olympex.mintlify.site/images/og/default.png\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/olympex/MLztvLnpATuFCaEl/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Olympex\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#7B5BE6\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.olympex.io/api-reference/swap/build-swap\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/swap/build-swap.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.olympex.io/#organization\",\"name\":\"Olympex\",\"url\":\"https://docs.olympex.io\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/olympex/mK1ALhELt9gq8bdx/logo/logo.png?fit=max\u0026auto=format\u0026n=mK1ALhELt9gq8bdx\u0026q=85\u0026s=f95957c16f612d372883edef72525107\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.olympex.io#website\",\"name\":\"Olympex\",\"url\":\"https://docs.olympex.io\",\"publisher\":{\"@id\":\"https://docs.olympex.io/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.olympex.io/api-reference/swap/build-swap#webpage\",\"url\":\"https://docs.olympex.io/api-reference/swap/build-swap\",\"name\":\"Build a swap\",\"description\":\"Get unsigned transaction calldata for a quoted route, on one chain or across two chains.\",\"dateModified\":\"2026-11-03T13:01:13.641Z\",\"isPartOf\":{\"@id\":\"https://docs.olympex.io#website\"},\"breadcrumb\":{\"@id\":\"https://docs.olympex.io/api-reference/swap/build-swap#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.olympex.io/api-reference/swap/build-swap#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Quotes and swaps\",\"item\":\"https://docs.olympex.io/api-reference/quotes/get-quote\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Build a swap\",\"item\":\"https://docs.olympex.io/api-reference/swap/build-swap\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.olympex.io/api-reference/swap/build-swap#apireference\",\"headline\":\"Build a swap\",\"name\":\"Build a swap\",\"description\":\"Get unsigned transaction calldata for a quoted route, on one chain or across two chains.\",\"url\":\"https://docs.olympex.io/api-reference/swap/build-swap\",\"mainEntityOfPage\":{\"@id\":\"https://docs.olympex.io/api-reference/swap/build-swap#webpage\"},\"image\":\"https://docs.olympex.io/images/og/default.png\",\"dateModified\":\"2026-11-03T13:01:13.641Z\",\"publisher\":{\"@id\":\"https://docs.olympex.io/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.olympex.io#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Olympex\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Olympex\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/swap/build-swap.md","siteName":"Olympex","nav":{"global":null,"tabs":[{"tab":"Documentation","pages":[{"title":"Documentation","href":"/get-started/introduction"}]},{"tab":"API reference","groups":[{"group":"Overview","pages":[{"title":"API reference overview","href":"/api-reference/overview"},{"title":"API console","href":"/api-reference/console"},{"title":"API conventions","href":"/api-reference/conventions"},{"title":"OpenAPI specification","href":"/api-reference/openapi-spec"}]},{"group":"Accounts and authentication","pages":[{"title":"Create an account","openapi":"api-reference/openapi.json POST /accounts","href":"/api-reference/accounts/create-account"},{"title":"List API keys","openapi":"api-reference/openapi.json GET /accounts/me/keys","href":"/api-reference/accounts/list-api-keys"},{"title":"Rotate an API key","openapi":"api-reference/openapi.json POST /accounts/me/keys/rotate","href":"/api-reference/accounts/rotate-api-key"},{"title":"Revoke an API key","openapi":"api-reference/openapi.json POST /accounts/me/keys/{apiKeyId}/revoke","href":"/api-reference/accounts/revoke-api-key"}]},{"group":"Quotes and swaps","pages":[{"title":"Get a quote","description":"Get the best aggregated route for a swap on one chain or across two chains.","openapi":"api-reference/openapi.json POST /quotes","href":"/api-reference/quotes/get-quote"},{"title":"Build a swap","openapi":"api-reference/openapi.json POST /swap","href":"/api-reference/swap/build-swap"},{"title":"Get cross-chain transfer status","description":"Track a cross-chain transfer from the source transaction to delivery on the destination chain.","openapi":"api-reference/openapi.json POST /tx-status","href":"/api-reference/transactions/get-transaction-status"},{"title":"Get on-chain transaction status","openapi":"api-reference/openapi.json GET /transactions/{hash}","href":"/api-reference/transactions/get-transaction"}]},{"group":"Chains and tokens","pages":[{"title":"List chains","openapi":"api-reference/openapi.json GET /chains","href":"/api-reference/chains/list-chains"},{"title":"List tokens","openapi":"api-reference/openapi.json GET /tokens","href":"/api-reference/tokens/list-tokens"},{"title":"Check chain support","openapi":"api-reference/openapi.json POST /support-chain","href":"/api-reference/chains/check-chain-support"}]},{"group":"Limit orders","pages":[{"title":"List limit orders","openapi":"api-reference/openapi.json GET /limit-order","href":"/api-reference/limit-orders/list-limit-orders"},{"title":"Create a limit order","openapi":"api-reference/openapi.json POST /limit-order","href":"/api-reference/limit-orders/create-limit-order"},{"title":"Get a limit order","openapi":"api-reference/openapi.json GET /limit-order/{id}","href":"/api-reference/limit-orders/get-limit-order"},{"title":"Update a limit order","openapi":"api-reference/openapi.json PATCH /limit-order/{id}","href":"/api-reference/limit-orders/update-limit-order"},{"title":"Cancel a limit order","openapi":"api-reference/openapi.json DELETE /limit-order/{id}","href":"/api-reference/limit-orders/cancel-limit-order"}]},{"group":"DCA","pages":[{"title":"List DCA strategies","openapi":"api-reference/openapi.json GET /dca-order/strategies","href":"/api-reference/dca/list-dca-strategies"},{"title":"Create a DCA strategy","openapi":"api-reference/openapi.json POST /dca-order/strategies","href":"/api-reference/dca/create-dca-strategy"},{"title":"Get a DCA strategy","openapi":"api-reference/openapi.json GET /dca-order/strategies/{id}","href":"/api-reference/dca/get-dca-strategy"},{"title":"Update a DCA strategy","openapi":"api-reference/openapi.json PATCH /dca-order/strategies/{id}","href":"/api-reference/dca/update-dca-strategy"},{"title":"List a strategy's orders","openapi":"api-reference/openapi.json GET /dca-order/strategies/{id}/orders","href":"/api-reference/dca/list-dca-strategy-orders"},{"title":"Get a DCA order","openapi":"api-reference/openapi.json GET /dca-order/orders/{id}","href":"/api-reference/dca/get-dca-order"}]}]},{"tab":"Resources","pages":[{"title":"Resources","href":"/resources/faq"}]}]},"basePath":"","title":"Build a swap - Olympex","deploymentId":"dpl_57NA6NKtrcUBhuxv6Tm2hAi21TK4","buildId":"dpl_57NA6NKtrcUBhuxv6Tm2hAi21TK4","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-CalkZbx8.js","snippetPresets-DtvvunBK.js","utils-Bn5byECU.js","style-to-object-BY3JEAdk.js","utils-DOTAoFcT.js","v4-DIgz8zy6.js","addUniqueKeysToSchema-CDauU9aU.js","conditional-requirements-CFM0id0Q.js","cloneDeep-k2aHAqp5.js","_Uint8Array-CQuRedKT.js","isObject-FP1Yky1u.js","ApiExamples-CSBS2nDe.js","usePlaygroundInputsStore-BkN7uKke.js","shallow-6IMgYiEa.js","isEqual-DicuCknl.js","CodeSnippets-C268fsRY.js","CodeSnippet-BBA8eWiP.js","getApiPlaygroundDisplay-DMK5GRGS.js","Page-Dz3zehSO.js","api-description-markdown-DwoksVHI.js","DynamicMarkdown-XsrWkK-b.js","SectionHeading-AR_EzDYe.js","MethodPill-CvOL8UTX.js","getPastedJson-BazkMjRw.js","Check2Icon-BL_xILK9.js","axios-CsQoIw0U.js","Markdown-CX8Sr5UZ.js","AssistantPageLink-B3VcLrB0.js","dist-WDJo6xkj.js","lib-DMeTj1gb.js","lib-B8HbPgcC.js","katex-Dbtb6Wk7.js","html-void-elements-mCSPHezU.js","marked.esm-CZWythHk.js"]}