What a swap gives now, and what it costs. Across chains the best solver prices it; on one chain the DEX
aggregators route it; with privacy: "shielded" it is a private swap from Starknet’s privacy pool. A price
creates nothing and commits no one: ask POST /v1/quotes for a firm quote to fund.
With sender, sourceGas counts only the approvals that account still needs.
The account that would send: sourceGas then counts only the approvals it still needs.
Example:
"0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266"
slippageBps
integer<int32>
How far under the expected output the user accepts, in basis points. The server picks a default without it.
Required range: x >= 0
Example:
50
privacy
string
shielded: a private swap on Starknet, from the user's shielded balance. It names no sender.
Allowed value: "shielded"
Response
The best price
POST /v1/price: what a swap gives now, and what it costs. A price only: it commits no one.
from
object
required
What is sold.
Show child attributes
to
object
required
What the best solver or route delivers.
Show child attributes
expiresAt
integer<int64>
required
Unix seconds the price is good until.
Required range: x >= 0
Example:
1793084230
route
escrow · stringswap · string
How a quote settles.
Allowed value: "escrow"
fees
object
The fees, when known.
Show child attributes
priceImpactBps
integer<int64>
What the route loses against market price, router fees included, in basis points of from.usd, when known.
Required range: x >= 0
Example:
2
costBps
integer<int64>
The fees' total in basis points of from.usd: from.usd − to.usd, plus the sender's own gas on the source
chain when network includes it. Everything the user gives up, when known.
Required range: x >= 0
Example:
13
etaSecs
integer<int64>
Seconds from the deposit (or the swap) being seen until the recipient is paid, estimated.
Required range: x >= 0
Example:
40
sourceGas
object
What the sender's wallet pays in gas on the source chain, when known. With a sender it counts only the
approvals that sender still needs; without one it counts the approval a token needs at most. A private swap's
is the relayer's fee in STRK, which the shielded balance pays instead of a wallet.
Show child attributes
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Tern","description":"Cross-chain and same-chain swaps on any supported chain. Every swap completes or refunds.","colors":{"primary":"#212121","light":"#F4F4F4","dark":"#212121"},"logo":{"light":"/logo/ink.svg","dark":"/logo/paper.svg","href":"https://ternswap.xyz"},"favicon":"/favicon.svg","api":{"openapi":"api-reference/openapi.json","playground":{"display":"interactive"}},"appearance":{"default":"light","strict":true},"background":{"color":{"light":"#EBEBEB","dark":"#EBEBEB"}},"navbar":{"links":[{"href":"mailto:[email protected]","label":"Contact"},{"href":"https://ternswap.xyz","label":"ternswap.xyz"}],"primary":{"type":"button","label":"Launch app","href":"https://app.ternswap.xyz"}},"seo":{"metatags":{"og:image":"/images/og.png","twitter:card":"summary_large_image"}},"fonts":{"heading":{"family":"Satoshi","weight":700,"source":"fonts/Satoshi-Variable.woff2","format":"woff2"},"body":{"family":"Intrade","weight":400,"source":"fonts/Intrade-Regular.woff2","format":"woff2"}},"styling":{"codeblocks":"system"},"integrations":{"telemetry":{"enabled":false}},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"hasAudioNarration":false,"customDomains":[],"gitSource":{"type":"github","owner":"local","repo":"local","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":"local","isBase":true},"buildId":"local","clientVersion":"0.0.4347"},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[],"googleFontsInlined":false,"isLoggedInCli":false,"mintExport":{}},"customCss":[{"filePath":"style.css","content":"@font-face{font-family:\"Geist Mono\";src:url(\"/fonts/GeistMono-Variable.woff2\") format(\"woff2\");font-weight:100 900;font-display:swap}@font-face{font-family:\"Satoshi\";src:url(\"/fonts/Satoshi-Variable.woff2\") format(\"woff2\");font-weight:300 900;font-display:swap}:root{--tern-ink: #212121;--tern-paper: #f4f4f4;--tern-surface: #ffffff;--tern-hairline: rgb(33 33 33 / 0.08);--tern-hairline-strong: rgb(33 33 33 / 0.16);--tern-track: rgb(33 33 33 / 0.06)}*,*::before,*::after{box-shadow:none!important;text-shadow:none!important}:focus-visible{outline:1.5px solid var(--tern-ink);outline-offset:2px}code,pre,kbd,samp,.font-mono{font-family:\"Geist Mono\", ui-monospace, SFMono-Regular, Menlo, monospace!important}h1,h2,h3,h4{font-family:\"Satoshi\", ui-sans-serif, system-ui, sans-serif;letter-spacing:-0.01em}h1{font-weight:700}h2,h3,h4{font-weight:600}#search-bar-entry{background:var(--tern-surface)!important;border:1px solid var(--tern-hairline)!important}#sidebar a[aria-current=\"page\"],#sidebar li[data-active=\"true\"]>a{background:var(--tern-surface)!important;color:var(--tern-ink)!important;border:1px solid var(--tern-hairline)}[data-callout-type]{background:var(--tern-surface)!important;border:1px solid var(--tern-hairline)!important}[data-callout-type],[data-callout-type] *{color:var(--tern-ink)!important}[data-callout-type] svg{color:var(--tern-ink)!important;fill:currentColor}[data-callout-type=\"warning\"],[data-callout-type=\"danger\"]{border:1.5px solid var(--tern-ink)!important}pre,[data-component-part=\"code-block-root\"],.code-block,.card,[data-component-part=\"card\"]{border-color:var(--tern-hairline)!important}.method-pill,[class*=\"bg-green-400/20\"],[class*=\"bg-blue-400/20\"],[class*=\"bg-yellow-400/20\"],[class*=\"bg-orange-400/20\"],[class*=\"bg-red-400/20\"],[class*=\"bg-[#3064E3]\"]{color:var(--tern-ink)!important;border:1px solid transparent}[class*=\"bg-green-400/20\"]{background:var(--tern-surface)!important;border-color:var(--tern-hairline-strong)!important}[class*=\"bg-blue-400/20\"],[class*=\"bg-[#3064E3]\"]{background:var(--tern-ink)!important;color:var(--tern-paper)!important}[class*=\"bg-yellow-400/20\"],[class*=\"bg-orange-400/20\"]{background:var(--tern-track)!important}[class*=\"bg-red-400/20\"]{background:transparent!important;border:1px dashed var(--tern-ink)!important}.tryit-button{background:var(--tern-ink)!important;color:var(--tern-paper)!important}[data-component-part=\"field-required-pill\"]{background:var(--tern-track)!important;color:var(--tern-ink)!important}pre code,pre [class*=\"font-mono\"]{filter:grayscale(1)}html.lenis,html.lenis body{height:auto}.lenis:not(.lenis-autoToggle).lenis-stopped{overflow:clip}.lenis [data-lenis-prevent],.lenis [data-lenis-prevent-wheel],.lenis [data-lenis-prevent-touch],.lenis [data-lenis-prevent-vertical],.lenis [data-lenis-prevent-horizontal]{overscroll-behavior:contain}.lenis.lenis-smooth iframe{pointer-events:none}.lenis.lenis-autoToggle{transition-property:overflow;transition-duration:1ms;transition-behavior:allow-discrete}code[id]{scroll-margin-top:7rem}"}]}
{"page":{"pagePath":"api-reference/quotes/get-a-price","slug":"/api-reference/quotes/get-a-price","pageMetadata":{"openapi":"/api-reference/openapi.json POST /v1/price","description":"What a swap gives now, and what it costs. Across chains the best solver prices it; on one chain the DEX\naggregators route it; with `privacy: \"shielded\"` it is a private swap from Starknet's privacy pool. A price\ncreates nothing and commits no one: ask `POST /v1/quotes` for a firm quote to fund.\n\nWith `sender`, `sourceGas` counts only the approvals that account still needs.","href":"/api-reference/quotes/get-a-price","title":"Get a price"},"description":{"compiledSource":"\"use strict\";\nconst {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n code: \"code\",\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_Fragment, {\n children: [_jsxs(_components.p, {\n children: [\"What a swap gives now, and what it costs. Across chains the best solver prices it; on one chain the DEX\\naggregators route it; with \", _jsx(_components.code, {\n children: \"privacy: \\\"shielded\\\"\"\n }), \" it is a private swap from Starknet’s privacy pool. A price\\ncreates nothing and commits no one: ask \", _jsx(_components.code, {\n children: \"POST /v1/quotes\"\n }), \" for a firm quote to fund.\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"With \", _jsx(_components.code, {\n children: \"sender\"\n }), \", \", _jsx(_components.code, {\n children: \"sourceGas\"\n }), \" counts only the approvals that account still needs.\"]\n })]\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}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"codeStyling":"system","config":{},"pageMetadata":{"openapi":"/api-reference/openapi.json POST /v1/price","description":"What a swap gives now, and what it costs. Across chains the best solver prices it; on one chain the DEX\naggregators route it; with `privacy: \"shielded\"` it is a private swap from Starknet's privacy pool. A price\ncreates nothing and commits no one: ask `POST /v1/quotes` for a firm quote to fund.\n\nWith `sender`, `sourceGas` counts only the approvals that account still needs.","href":"/api-reference/quotes/get-a-price","title":"Get a price"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":["/_mintlify/custom/localhost/095442d7f85c8988/smooth-scroll.js"],"openApiReferenceData":{"operation":{"tags":["quotes"],"summary":"Get a price","description":"What a swap gives now, and what it costs. Across chains the best solver prices it; on one chain the DEX\naggregators route it; with `privacy: \"shielded\"` it is a private swap from Starknet's privacy pool. A price\ncreates nothing and commits no one: ask `POST /v1/quotes` for a firm quote to fund.\n\nWith `sender`, `sourceGas` counts only the approvals that account still needs.","operationId":"getPrice","requestBody":"2d961114-198c-4a12-b296-51db2b1fdb09","responses":{"200":"352828d1-0fd8-4444-9d2e-26f6133a82d9","400":"c19b8867-5b90-4286-8039-24e94a430fd8","401":"bcf3d8b5-c410-4edf-84a1-91144da5c31d","422":"e067a6f2-cbd5-493a-be0b-c73c54ebf473","429":"8d6675d5-b829-440d-9abd-7792f7f708ea","500":"392ca0e4-5def-4b89-9c27-067a777bdf9e","503":"67e1c4be-3801-4d8d-b859-1968b0a59bec"},"security":["4069fb79-7b2d-4c5e-91b7-fa3de28fa0e9","25427650-1e8b-4e9c-ab38-b6c926804d63"],"method":"post","type":"path","servers":["dcc009e5-1baa-48c7-9034-7812755d1b19"],"path":"/v1/price","baseUrlOptions":["https://api.ternswap.xyz"],"title":"Get a price","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{},"requestBody":{"content":{"application/json":{"schema":{"type":"object","description":"The body of `POST /v1/price`: what a swap would give now. It creates nothing.","required":["fromChain","fromAsset","fromAmount","toChain","toAsset"],"properties":{"fromChain":{"type":"string","description":"The source chain's slug.","example":"base","isRequired":true,"uniqueKey":"fromChain","typeLabel":"string"},"fromAsset":{"type":"string","description":"The token sold: an address, or `native` for an EVM chain's native coin.","example":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","isRequired":true,"uniqueKey":"fromAsset","typeLabel":"string"},"fromAmount":{"type":"string","description":"How much is sold, in the token's base units, base 10.","example":"1000000","pattern":"^[0-9]+$","isRequired":true,"uniqueKey":"fromAmount","typeLabel":"string"},"toChain":{"type":"string","description":"The destination chain's slug: the source chain's for a same-chain swap.","example":"starknet","isRequired":true,"uniqueKey":"toChain","typeLabel":"string"},"toAsset":{"type":"string","description":"The token bought: an address, or `native`.","example":"0x053c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8","isRequired":true,"uniqueKey":"toAsset","typeLabel":"string"},"sender":{"type":"string","description":"The account that would send: `sourceGas` then counts only the approvals it still needs.","example":"0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266","uniqueKey":"sender","typeLabel":"string"},"slippageBps":{"type":"integer","format":"int32","description":"How far under the expected output the user accepts, in basis points. The server picks a default without it.","example":50,"minimum":0,"uniqueKey":"slippageBps","typeLabel":"integer\u003cint32>"},"privacy":{"type":"string","title":"shielded","description":"`shielded`: a private swap on Starknet, from the user's shielded balance. It names no `sender`.","const":"shielded","uniqueKey":"privacy","typeLabel":"string"}},"additionalProperties":false,"uniqueKey":"","typeLabel":"object"},"examples":{"Across chains":{"title":"Across chains","summary":"USDC on Base to USDC on Starknet","value":{"fromChain":"base","fromAsset":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","fromAmount":"100000000","toChain":"starknet","toAsset":"0x053c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8"}},"Same chain":{"title":"Same chain","summary":"ETH to USDC on Base","value":{"fromChain":"base","fromAsset":"native","fromAmount":"10000000000000000","toChain":"base","toAsset":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","sender":"0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266","slippageBps":50}}},"exampleType":"examples"}},"required":true,"exampleType":"examples"},"responses":{"352828d1-0fd8-4444-9d2e-26f6133a82d9":{"description":"The best price","content":{"application/json":{"schema":{"type":"object","description":"`POST /v1/price`: what a swap gives now, and what it costs. A price only: it commits no one.","required":["from","to","expiresAt"],"properties":{"from":{"type":"object","description":"What is sold.","required":["chain","asset","amount"],"properties":{"chain":{"type":"string","description":"The chain's slug.","example":"base","isRequired":true,"uniqueKey":"from.chain","typeLabel":"string"},"asset":{"type":"string","description":"A token address, or `native`.","example":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","isRequired":true,"uniqueKey":"from.asset","typeLabel":"string"},"amount":{"type":"string","description":"Base units, base 10: what is sold, or what the route is expected to deliver.","example":"1000000","pattern":"^[0-9]+$","isRequired":true,"uniqueKey":"from.amount","typeLabel":"string"},"minAmount":{"type":"string","description":"The `to` side's least: what a swap delivers without reverting, or what a cross-chain solver would sign for (it\ndelivers everything its purchase yields, `amount` being the expectation).","example":"995000","pattern":"^[0-9]+$","uniqueKey":"from.minAmount","typeLabel":"string"},"usd":{"type":"string","description":"US dollars, two decimals, when known.","example":"1.00","pattern":"^[0-9]+\\.[0-9]{2}$","uniqueKey":"from.usd","typeLabel":"string"}},"isRequired":true,"uniqueKey":"from","typeLabel":"object"},"to":{"type":"object","description":"What the best solver or route delivers.","required":["chain","asset","amount"],"properties":{"chain":{"type":"string","description":"The chain's slug.","example":"base","isRequired":true,"uniqueKey":"to.chain","typeLabel":"string"},"asset":{"type":"string","description":"A token address, or `native`.","example":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","isRequired":true,"uniqueKey":"to.asset","typeLabel":"string"},"amount":{"type":"string","description":"Base units, base 10: what is sold, or what the route is expected to deliver.","example":"1000000","pattern":"^[0-9]+$","isRequired":true,"uniqueKey":"to.amount","typeLabel":"string"},"minAmount":{"type":"string","description":"The `to` side's least: what a swap delivers without reverting, or what a cross-chain solver would sign for (it\ndelivers everything its purchase yields, `amount` being the expectation).","example":"995000","pattern":"^[0-9]+$","uniqueKey":"to.minAmount","typeLabel":"string"},"usd":{"type":"string","description":"US dollars, two decimals, when known.","example":"1.00","pattern":"^[0-9]+\\.[0-9]{2}$","uniqueKey":"to.usd","typeLabel":"string"}},"isRequired":true,"uniqueKey":"to","typeLabel":"object"},"expiresAt":{"type":"integer","format":"int64","description":"Unix seconds the price is good until.","example":1793084230,"minimum":0,"isRequired":true,"uniqueKey":"expiresAt","typeLabel":"integer\u003cint64>"},"route":{"oneOf":[{"type":"string","title":"escrow","description":"How a quote settles.","const":"escrow","uniqueKey":"route.oneOf.0","typeLabel":"string"},{"type":"string","title":"swap","description":"How a quote settles.","const":"swap","uniqueKey":"route.oneOf.1","typeLabel":"string"}],"uniqueKey":"route","typeLabel":"string"},"fees":{"type":"object","description":"The fees, when known.","required":["totalUsd","items"],"properties":{"totalUsd":{"type":"string","description":"The sum of `items`, in US dollars.","example":"1.50","pattern":"^[0-9]+\\.[0-9]{2}$","isRequired":true,"uniqueKey":"fees.totalUsd","typeLabel":"string"},"items":{"type":"array","items":{"type":"object","description":"One fee, in US dollars.","required":["kind","usd"],"properties":{"kind":{"oneOf":[{"type":"string","title":"solver","description":"What a fee pays for. New kinds may appear: show them by their `usd`.","const":"solver","isRequired":true,"uniqueKey":"fees.\\items.items.[INDEX].kind.oneOf.0","typeLabel":"string"},{"type":"string","title":"network","description":"What a fee pays for. New kinds may appear: show them by their `usd`.","const":"network","isRequired":true,"uniqueKey":"fees.\\items.items.[INDEX].kind.oneOf.1","typeLabel":"string"},{"type":"string","title":"partner","description":"What a fee pays for. New kinds may appear: show them by their `usd`.","const":"partner","isRequired":true,"uniqueKey":"fees.\\items.items.[INDEX].kind.oneOf.2","typeLabel":"string"},{"type":"string","title":"protocol","description":"What a fee pays for. New kinds may appear: show them by their `usd`.","const":"protocol","isRequired":true,"uniqueKey":"fees.\\items.items.[INDEX].kind.oneOf.3","typeLabel":"string"},{"type":"string","title":"privacy","description":"What a fee pays for. New kinds may appear: show them by their `usd`.","const":"privacy","isRequired":true,"uniqueKey":"fees.\\items.items.[INDEX].kind.oneOf.4","typeLabel":"string"}],"isRequired":true,"uniqueKey":"fees.\\items.items.[INDEX].kind","typeLabel":"string"},"usd":{"type":"string","description":"US dollars, two decimals, rounded down.","example":"0.71","pattern":"^[0-9]+\\.[0-9]{2}$","isRequired":true,"uniqueKey":"fees.\\items.items.[INDEX].usd","typeLabel":"string"}},"uniqueKey":"fees.\\items.items.[INDEX]","typeLabel":"object"},"description":"Each fee, by what it pays for.","isRequired":true,"uniqueKey":"fees.\\items","typeLabel":"object[]"}},"uniqueKey":"fees","typeLabel":"object"},"priceImpactBps":{"type":"integer","format":"int64","description":"What the route loses against market price, router fees included, in basis points of `from.usd`, when known.","example":2,"minimum":0,"uniqueKey":"priceImpactBps","typeLabel":"integer\u003cint64>"},"costBps":{"type":"integer","format":"int64","description":"The fees' total in basis points of `from.usd`: `from.usd − to.usd`, plus the sender's own gas on the source\nchain when `network` includes it. Everything the user gives up, when known.","example":13,"minimum":0,"uniqueKey":"costBps","typeLabel":"integer\u003cint64>"},"etaSecs":{"type":"integer","format":"int64","description":"Seconds from the deposit (or the swap) being seen until the recipient is paid, estimated.","example":40,"minimum":0,"uniqueKey":"etaSecs","typeLabel":"integer\u003cint64>"},"sourceGas":{"type":"object","description":"What the sender's wallet pays in gas on the source chain, when known. With a `sender` it counts only the\napprovals that sender still needs; without one it counts the approval a token needs at most. A private swap's\nis the relayer's fee in STRK, which the shielded balance pays instead of a wallet.","required":["amount"],"properties":{"amount":{"type":"string","description":"Base units of the coin gas is paid in (wei, or fri on Starknet).","example":"3460000000000","pattern":"^[0-9]+$","isRequired":true,"uniqueKey":"sourceGas.amount","typeLabel":"string"},"usd":{"type":"string","description":"The same in US dollars, when known.","example":"0.01","pattern":"^[0-9]+\\.[0-9]{2}$","uniqueKey":"sourceGas.usd","typeLabel":"string"}},"uniqueKey":"sourceGas","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Across chains":{"title":"Across chains","value":{"route":"escrow","from":{"chain":"base","asset":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","amount":"100000000","usd":"100.00"},"to":{"chain":"starknet","asset":"0x053c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8","amount":"99880000","usd":"99.88"},"expiresAt":1793084230,"fees":{"totalUsd":"0.13","items":[{"kind":"network","usd":"0.06"},{"kind":"solver","usd":"0.07"}]},"priceImpactBps":2,"costBps":13,"etaSecs":40,"sourceGas":{"amount":"3460000000000","usd":"0.01"}}},"Same chain":{"title":"Same chain","value":{"route":"swap","from":{"chain":"base","asset":"native","amount":"10000000000000000","usd":"23.10"},"to":{"chain":"base","asset":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","amount":"23046638","minAmount":"22931404","usd":"23.04"},"expiresAt":1793084290,"fees":{"totalUsd":"0.02","items":[{"kind":"protocol","usd":"0.02"}]},"priceImpactBps":5,"costBps":30,"etaSecs":4,"sourceGas":{"amount":"1730000000000","usd":"0.01"}}}},"exampleType":"examples"}},"headers":{"x-request-id":{"description":"The request's ID: the client's `x-request-id` when it is 1 to 64 characters of `[A-Za-z0-9._-]`, otherwise one the server assigns. Problems repeat it as `requestId`.","schema":{"type":"string"}}},"exampleType":"examples"},"c19b8867-5b90-4286-8039-24e94a430fd8":{"description":"Invalid request, unsupported chain or asset","content":{"application/problem+json":{"schema":{"type":"object","description":"The body of every error response: RFC 9457 problem details, with a stable `code`.","required":["type","title","status","code","detail"],"properties":{"type":{"type":"string","description":"The error type's URI: `https://docs.ternswap.xyz/api-reference/errors#\u003ccode>`, which explains it.","example":"https://docs.ternswap.xyz/api-reference/errors#no_route","isRequired":true,"uniqueKey":"type","typeLabel":"string"},"title":{"type":"string","description":"The error type's fixed summary.","example":"No route","isRequired":true,"uniqueKey":"title","typeLabel":"string"},"status":{"type":"integer","format":"int32","description":"The HTTP status.","example":422,"minimum":0,"isRequired":true,"uniqueKey":"status","typeLabel":"integer\u003cint32>"},"code":{"oneOf":[{"type":"string","title":"invalid_request","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"invalid_request","isRequired":true,"uniqueKey":"code.oneOf.0","typeLabel":"string"},{"type":"string","title":"unauthorized","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"unauthorized","isRequired":true,"uniqueKey":"code.oneOf.1","typeLabel":"string"},{"type":"string","title":"not_found","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"not_found","isRequired":true,"uniqueKey":"code.oneOf.2","typeLabel":"string"},{"type":"string","title":"method_not_allowed","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"method_not_allowed","isRequired":true,"uniqueKey":"code.oneOf.3","typeLabel":"string"},{"type":"string","title":"rate_limited","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"rate_limited","isRequired":true,"uniqueKey":"code.oneOf.4","typeLabel":"string"},{"type":"string","title":"unsupported_chain","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"unsupported_chain","isRequired":true,"uniqueKey":"code.oneOf.5","typeLabel":"string"},{"type":"string","title":"unsupported_asset","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"unsupported_asset","isRequired":true,"uniqueKey":"code.oneOf.6","typeLabel":"string"},{"type":"string","title":"amount_too_small","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"amount_too_small","isRequired":true,"uniqueKey":"code.oneOf.7","typeLabel":"string"},{"type":"string","title":"amount_too_large","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"amount_too_large","isRequired":true,"uniqueKey":"code.oneOf.8","typeLabel":"string"},{"type":"string","title":"no_route","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"no_route","isRequired":true,"uniqueKey":"code.oneOf.9","typeLabel":"string"},{"type":"string","title":"condition_reused","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"condition_reused","isRequired":true,"uniqueKey":"code.oneOf.10","typeLabel":"string"},{"type":"string","title":"quote_not_found","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"quote_not_found","isRequired":true,"uniqueKey":"code.oneOf.11","typeLabel":"string"},{"type":"string","title":"quote_expired","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"quote_expired","isRequired":true,"uniqueKey":"code.oneOf.12","typeLabel":"string"},{"type":"string","title":"invalid_fulfillment","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"invalid_fulfillment","isRequired":true,"uniqueKey":"code.oneOf.13","typeLabel":"string"},{"type":"string","title":"destination_not_ready","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"destination_not_ready","isRequired":true,"uniqueKey":"code.oneOf.14","typeLabel":"string"},{"type":"string","title":"invalid_private_transaction","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"invalid_private_transaction","isRequired":true,"uniqueKey":"code.oneOf.15","typeLabel":"string"},{"type":"string","title":"already_submitted","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"already_submitted","isRequired":true,"uniqueKey":"code.oneOf.16","typeLabel":"string"},{"type":"string","title":"idempotency_key_reused","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"idempotency_key_reused","isRequired":true,"uniqueKey":"code.oneOf.17","typeLabel":"string"},{"type":"string","title":"idempotency_key_in_progress","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"idempotency_key_in_progress","isRequired":true,"uniqueKey":"code.oneOf.18","typeLabel":"string"},{"type":"string","title":"payload_too_large","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"payload_too_large","isRequired":true,"uniqueKey":"code.oneOf.19","typeLabel":"string"},{"type":"string","title":"timeout","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"timeout","isRequired":true,"uniqueKey":"code.oneOf.20","typeLabel":"string"},{"type":"string","title":"internal","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"internal","isRequired":true,"uniqueKey":"code.oneOf.21","typeLabel":"string"}],"isRequired":true,"uniqueKey":"code","typeLabel":"string"},"detail":{"type":"string","description":"A human-readable explanation of this occurrence.","example":"no solver quoted this route","isRequired":true,"uniqueKey":"detail","typeLabel":"string"},"requestId":{"type":"string","description":"The request's `x-request-id`: quote it when asking for support.","example":"01JC2W6Q0Z8V5K3M7N1P4R9T2X","uniqueKey":"requestId","typeLabel":"string"},"errors":{"type":"array","items":{"type":"object","description":"A field of the request body at fault.","required":["pointer","detail"],"properties":{"pointer":{"type":"string","description":"A JSON Pointer to the field in the request body, as a URI fragment.","example":"#/fromAmount","isRequired":true,"uniqueKey":"errors.items.[INDEX].pointer","typeLabel":"string"},"detail":{"type":"string","description":"What is wrong with it.","example":"must be a positive base-10 integer","isRequired":true,"uniqueKey":"errors.items.[INDEX].detail","typeLabel":"string"}},"uniqueKey":"errors.items.[INDEX]","typeLabel":"object"},"description":"`invalid_request`: the body's fields at fault.","uniqueKey":"errors","typeLabel":"object[]"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"type":"https://docs.ternswap.xyz/api-reference/errors#no_route","title":"No route","status":422,"code":"invalid_request","detail":"no solver quoted this route","requestId":"01JC2W6Q0Z8V5K3M7N1P4R9T2X","errors":[{"pointer":"#/fromAmount","detail":"must be a positive base-10 integer"}]}}},"exampleType":"generated"}},"headers":{"x-request-id":{"description":"The request's ID: the client's `x-request-id` when it is 1 to 64 characters of `[A-Za-z0-9._-]`, otherwise one the server assigns. Problems repeat it as `requestId`.","schema":{"type":"string"}}},"exampleType":"generated"},"bcf3d8b5-c410-4edf-84a1-91144da5c31d":{"description":"x-api-key is not a valid API key","content":{"application/problem+json":{"schema":{"type":"object","description":"The body of every error response: RFC 9457 problem details, with a stable `code`.","required":["type","title","status","code","detail"],"properties":{"type":{"type":"string","description":"The error type's URI: `https://docs.ternswap.xyz/api-reference/errors#\u003ccode>`, which explains it.","example":"https://docs.ternswap.xyz/api-reference/errors#no_route","isRequired":true,"uniqueKey":"type","typeLabel":"string"},"title":{"type":"string","description":"The error type's fixed summary.","example":"No route","isRequired":true,"uniqueKey":"title","typeLabel":"string"},"status":{"type":"integer","format":"int32","description":"The HTTP status.","example":422,"minimum":0,"isRequired":true,"uniqueKey":"status","typeLabel":"integer\u003cint32>"},"code":{"oneOf":[{"type":"string","title":"invalid_request","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"invalid_request","isRequired":true,"uniqueKey":"code.oneOf.0","typeLabel":"string"},{"type":"string","title":"unauthorized","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"unauthorized","isRequired":true,"uniqueKey":"code.oneOf.1","typeLabel":"string"},{"type":"string","title":"not_found","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"not_found","isRequired":true,"uniqueKey":"code.oneOf.2","typeLabel":"string"},{"type":"string","title":"method_not_allowed","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"method_not_allowed","isRequired":true,"uniqueKey":"code.oneOf.3","typeLabel":"string"},{"type":"string","title":"rate_limited","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"rate_limited","isRequired":true,"uniqueKey":"code.oneOf.4","typeLabel":"string"},{"type":"string","title":"unsupported_chain","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"unsupported_chain","isRequired":true,"uniqueKey":"code.oneOf.5","typeLabel":"string"},{"type":"string","title":"unsupported_asset","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"unsupported_asset","isRequired":true,"uniqueKey":"code.oneOf.6","typeLabel":"string"},{"type":"string","title":"amount_too_small","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"amount_too_small","isRequired":true,"uniqueKey":"code.oneOf.7","typeLabel":"string"},{"type":"string","title":"amount_too_large","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"amount_too_large","isRequired":true,"uniqueKey":"code.oneOf.8","typeLabel":"string"},{"type":"string","title":"no_route","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"no_route","isRequired":true,"uniqueKey":"code.oneOf.9","typeLabel":"string"},{"type":"string","title":"condition_reused","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"condition_reused","isRequired":true,"uniqueKey":"code.oneOf.10","typeLabel":"string"},{"type":"string","title":"quote_not_found","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"quote_not_found","isRequired":true,"uniqueKey":"code.oneOf.11","typeLabel":"string"},{"type":"string","title":"quote_expired","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"quote_expired","isRequired":true,"uniqueKey":"code.oneOf.12","typeLabel":"string"},{"type":"string","title":"invalid_fulfillment","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"invalid_fulfillment","isRequired":true,"uniqueKey":"code.oneOf.13","typeLabel":"string"},{"type":"string","title":"destination_not_ready","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"destination_not_ready","isRequired":true,"uniqueKey":"code.oneOf.14","typeLabel":"string"},{"type":"string","title":"invalid_private_transaction","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"invalid_private_transaction","isRequired":true,"uniqueKey":"code.oneOf.15","typeLabel":"string"},{"type":"string","title":"already_submitted","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"already_submitted","isRequired":true,"uniqueKey":"code.oneOf.16","typeLabel":"string"},{"type":"string","title":"idempotency_key_reused","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"idempotency_key_reused","isRequired":true,"uniqueKey":"code.oneOf.17","typeLabel":"string"},{"type":"string","title":"idempotency_key_in_progress","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"idempotency_key_in_progress","isRequired":true,"uniqueKey":"code.oneOf.18","typeLabel":"string"},{"type":"string","title":"payload_too_large","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"payload_too_large","isRequired":true,"uniqueKey":"code.oneOf.19","typeLabel":"string"},{"type":"string","title":"timeout","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"timeout","isRequired":true,"uniqueKey":"code.oneOf.20","typeLabel":"string"},{"type":"string","title":"internal","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"internal","isRequired":true,"uniqueKey":"code.oneOf.21","typeLabel":"string"}],"isRequired":true,"uniqueKey":"code","typeLabel":"string"},"detail":{"type":"string","description":"A human-readable explanation of this occurrence.","example":"no solver quoted this route","isRequired":true,"uniqueKey":"detail","typeLabel":"string"},"requestId":{"type":"string","description":"The request's `x-request-id`: quote it when asking for support.","example":"01JC2W6Q0Z8V5K3M7N1P4R9T2X","uniqueKey":"requestId","typeLabel":"string"},"errors":{"type":"array","items":{"type":"object","description":"A field of the request body at fault.","required":["pointer","detail"],"properties":{"pointer":{"type":"string","description":"A JSON Pointer to the field in the request body, as a URI fragment.","example":"#/fromAmount","isRequired":true,"uniqueKey":"errors.items.[INDEX].pointer","typeLabel":"string"},"detail":{"type":"string","description":"What is wrong with it.","example":"must be a positive base-10 integer","isRequired":true,"uniqueKey":"errors.items.[INDEX].detail","typeLabel":"string"}},"uniqueKey":"errors.items.[INDEX]","typeLabel":"object"},"description":"`invalid_request`: the body's fields at fault.","uniqueKey":"errors","typeLabel":"object[]"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"type":"https://docs.ternswap.xyz/api-reference/errors#no_route","title":"No route","status":422,"code":"invalid_request","detail":"no solver quoted this route","requestId":"01JC2W6Q0Z8V5K3M7N1P4R9T2X","errors":[{"pointer":"#/fromAmount","detail":"must be a positive base-10 integer"}]}}},"exampleType":"generated"}},"headers":{"x-request-id":{"description":"The request's ID: the client's `x-request-id` when it is 1 to 64 characters of `[A-Za-z0-9._-]`, otherwise one the server assigns. Problems repeat it as `requestId`.","schema":{"type":"string"}}},"exampleType":"generated"},"e067a6f2-cbd5-493a-be0b-c73c54ebf473":{"description":"No solver or aggregator quoted this route","content":{"application/problem+json":{"schema":{"type":"object","description":"The body of every error response: RFC 9457 problem details, with a stable `code`.","required":["type","title","status","code","detail"],"properties":{"type":{"type":"string","description":"The error type's URI: `https://docs.ternswap.xyz/api-reference/errors#\u003ccode>`, which explains it.","example":"https://docs.ternswap.xyz/api-reference/errors#no_route","isRequired":true,"uniqueKey":"type","typeLabel":"string"},"title":{"type":"string","description":"The error type's fixed summary.","example":"No route","isRequired":true,"uniqueKey":"title","typeLabel":"string"},"status":{"type":"integer","format":"int32","description":"The HTTP status.","example":422,"minimum":0,"isRequired":true,"uniqueKey":"status","typeLabel":"integer\u003cint32>"},"code":{"oneOf":[{"type":"string","title":"invalid_request","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"invalid_request","isRequired":true,"uniqueKey":"code.oneOf.0","typeLabel":"string"},{"type":"string","title":"unauthorized","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"unauthorized","isRequired":true,"uniqueKey":"code.oneOf.1","typeLabel":"string"},{"type":"string","title":"not_found","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"not_found","isRequired":true,"uniqueKey":"code.oneOf.2","typeLabel":"string"},{"type":"string","title":"method_not_allowed","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"method_not_allowed","isRequired":true,"uniqueKey":"code.oneOf.3","typeLabel":"string"},{"type":"string","title":"rate_limited","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"rate_limited","isRequired":true,"uniqueKey":"code.oneOf.4","typeLabel":"string"},{"type":"string","title":"unsupported_chain","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"unsupported_chain","isRequired":true,"uniqueKey":"code.oneOf.5","typeLabel":"string"},{"type":"string","title":"unsupported_asset","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"unsupported_asset","isRequired":true,"uniqueKey":"code.oneOf.6","typeLabel":"string"},{"type":"string","title":"amount_too_small","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"amount_too_small","isRequired":true,"uniqueKey":"code.oneOf.7","typeLabel":"string"},{"type":"string","title":"amount_too_large","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"amount_too_large","isRequired":true,"uniqueKey":"code.oneOf.8","typeLabel":"string"},{"type":"string","title":"no_route","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"no_route","isRequired":true,"uniqueKey":"code.oneOf.9","typeLabel":"string"},{"type":"string","title":"condition_reused","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"condition_reused","isRequired":true,"uniqueKey":"code.oneOf.10","typeLabel":"string"},{"type":"string","title":"quote_not_found","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"quote_not_found","isRequired":true,"uniqueKey":"code.oneOf.11","typeLabel":"string"},{"type":"string","title":"quote_expired","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"quote_expired","isRequired":true,"uniqueKey":"code.oneOf.12","typeLabel":"string"},{"type":"string","title":"invalid_fulfillment","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"invalid_fulfillment","isRequired":true,"uniqueKey":"code.oneOf.13","typeLabel":"string"},{"type":"string","title":"destination_not_ready","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"destination_not_ready","isRequired":true,"uniqueKey":"code.oneOf.14","typeLabel":"string"},{"type":"string","title":"invalid_private_transaction","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"invalid_private_transaction","isRequired":true,"uniqueKey":"code.oneOf.15","typeLabel":"string"},{"type":"string","title":"already_submitted","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"already_submitted","isRequired":true,"uniqueKey":"code.oneOf.16","typeLabel":"string"},{"type":"string","title":"idempotency_key_reused","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"idempotency_key_reused","isRequired":true,"uniqueKey":"code.oneOf.17","typeLabel":"string"},{"type":"string","title":"idempotency_key_in_progress","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"idempotency_key_in_progress","isRequired":true,"uniqueKey":"code.oneOf.18","typeLabel":"string"},{"type":"string","title":"payload_too_large","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"payload_too_large","isRequired":true,"uniqueKey":"code.oneOf.19","typeLabel":"string"},{"type":"string","title":"timeout","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"timeout","isRequired":true,"uniqueKey":"code.oneOf.20","typeLabel":"string"},{"type":"string","title":"internal","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"internal","isRequired":true,"uniqueKey":"code.oneOf.21","typeLabel":"string"}],"isRequired":true,"uniqueKey":"code","typeLabel":"string"},"detail":{"type":"string","description":"A human-readable explanation of this occurrence.","example":"no solver quoted this route","isRequired":true,"uniqueKey":"detail","typeLabel":"string"},"requestId":{"type":"string","description":"The request's `x-request-id`: quote it when asking for support.","example":"01JC2W6Q0Z8V5K3M7N1P4R9T2X","uniqueKey":"requestId","typeLabel":"string"},"errors":{"type":"array","items":{"type":"object","description":"A field of the request body at fault.","required":["pointer","detail"],"properties":{"pointer":{"type":"string","description":"A JSON Pointer to the field in the request body, as a URI fragment.","example":"#/fromAmount","isRequired":true,"uniqueKey":"errors.items.[INDEX].pointer","typeLabel":"string"},"detail":{"type":"string","description":"What is wrong with it.","example":"must be a positive base-10 integer","isRequired":true,"uniqueKey":"errors.items.[INDEX].detail","typeLabel":"string"}},"uniqueKey":"errors.items.[INDEX]","typeLabel":"object"},"description":"`invalid_request`: the body's fields at fault.","uniqueKey":"errors","typeLabel":"object[]"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"type":"https://docs.ternswap.xyz/api-reference/errors#no_route","title":"No route","status":422,"code":"invalid_request","detail":"no solver quoted this route","requestId":"01JC2W6Q0Z8V5K3M7N1P4R9T2X","errors":[{"pointer":"#/fromAmount","detail":"must be a positive base-10 integer"}]}}},"exampleType":"generated"}},"headers":{"x-request-id":{"description":"The request's ID: the client's `x-request-id` when it is 1 to 64 characters of `[A-Za-z0-9._-]`, otherwise one the server assigns. Problems repeat it as `requestId`.","schema":{"type":"string"}}},"exampleType":"generated"},"8d6675d5-b829-440d-9abd-7792f7f708ea":{"description":"Too many requests from this partner, or from this address without an API key","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds until a request is accepted again"},"x-request-id":{"description":"The request's ID: the client's `x-request-id` when it is 1 to 64 characters of `[A-Za-z0-9._-]`, otherwise one the server assigns. Problems repeat it as `requestId`.","schema":{"type":"string"}}},"content":{"application/problem+json":{"schema":{"type":"object","description":"The body of every error response: RFC 9457 problem details, with a stable `code`.","required":["type","title","status","code","detail"],"properties":{"type":{"type":"string","description":"The error type's URI: `https://docs.ternswap.xyz/api-reference/errors#\u003ccode>`, which explains it.","example":"https://docs.ternswap.xyz/api-reference/errors#no_route","isRequired":true,"uniqueKey":"type","typeLabel":"string"},"title":{"type":"string","description":"The error type's fixed summary.","example":"No route","isRequired":true,"uniqueKey":"title","typeLabel":"string"},"status":{"type":"integer","format":"int32","description":"The HTTP status.","example":422,"minimum":0,"isRequired":true,"uniqueKey":"status","typeLabel":"integer\u003cint32>"},"code":{"oneOf":[{"type":"string","title":"invalid_request","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"invalid_request","isRequired":true,"uniqueKey":"code.oneOf.0","typeLabel":"string"},{"type":"string","title":"unauthorized","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"unauthorized","isRequired":true,"uniqueKey":"code.oneOf.1","typeLabel":"string"},{"type":"string","title":"not_found","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"not_found","isRequired":true,"uniqueKey":"code.oneOf.2","typeLabel":"string"},{"type":"string","title":"method_not_allowed","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"method_not_allowed","isRequired":true,"uniqueKey":"code.oneOf.3","typeLabel":"string"},{"type":"string","title":"rate_limited","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"rate_limited","isRequired":true,"uniqueKey":"code.oneOf.4","typeLabel":"string"},{"type":"string","title":"unsupported_chain","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"unsupported_chain","isRequired":true,"uniqueKey":"code.oneOf.5","typeLabel":"string"},{"type":"string","title":"unsupported_asset","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"unsupported_asset","isRequired":true,"uniqueKey":"code.oneOf.6","typeLabel":"string"},{"type":"string","title":"amount_too_small","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"amount_too_small","isRequired":true,"uniqueKey":"code.oneOf.7","typeLabel":"string"},{"type":"string","title":"amount_too_large","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"amount_too_large","isRequired":true,"uniqueKey":"code.oneOf.8","typeLabel":"string"},{"type":"string","title":"no_route","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"no_route","isRequired":true,"uniqueKey":"code.oneOf.9","typeLabel":"string"},{"type":"string","title":"condition_reused","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"condition_reused","isRequired":true,"uniqueKey":"code.oneOf.10","typeLabel":"string"},{"type":"string","title":"quote_not_found","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"quote_not_found","isRequired":true,"uniqueKey":"code.oneOf.11","typeLabel":"string"},{"type":"string","title":"quote_expired","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"quote_expired","isRequired":true,"uniqueKey":"code.oneOf.12","typeLabel":"string"},{"type":"string","title":"invalid_fulfillment","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"invalid_fulfillment","isRequired":true,"uniqueKey":"code.oneOf.13","typeLabel":"string"},{"type":"string","title":"destination_not_ready","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"destination_not_ready","isRequired":true,"uniqueKey":"code.oneOf.14","typeLabel":"string"},{"type":"string","title":"invalid_private_transaction","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"invalid_private_transaction","isRequired":true,"uniqueKey":"code.oneOf.15","typeLabel":"string"},{"type":"string","title":"already_submitted","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"already_submitted","isRequired":true,"uniqueKey":"code.oneOf.16","typeLabel":"string"},{"type":"string","title":"idempotency_key_reused","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"idempotency_key_reused","isRequired":true,"uniqueKey":"code.oneOf.17","typeLabel":"string"},{"type":"string","title":"idempotency_key_in_progress","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"idempotency_key_in_progress","isRequired":true,"uniqueKey":"code.oneOf.18","typeLabel":"string"},{"type":"string","title":"payload_too_large","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"payload_too_large","isRequired":true,"uniqueKey":"code.oneOf.19","typeLabel":"string"},{"type":"string","title":"timeout","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"timeout","isRequired":true,"uniqueKey":"code.oneOf.20","typeLabel":"string"},{"type":"string","title":"internal","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"internal","isRequired":true,"uniqueKey":"code.oneOf.21","typeLabel":"string"}],"isRequired":true,"uniqueKey":"code","typeLabel":"string"},"detail":{"type":"string","description":"A human-readable explanation of this occurrence.","example":"no solver quoted this route","isRequired":true,"uniqueKey":"detail","typeLabel":"string"},"requestId":{"type":"string","description":"The request's `x-request-id`: quote it when asking for support.","example":"01JC2W6Q0Z8V5K3M7N1P4R9T2X","uniqueKey":"requestId","typeLabel":"string"},"errors":{"type":"array","items":{"type":"object","description":"A field of the request body at fault.","required":["pointer","detail"],"properties":{"pointer":{"type":"string","description":"A JSON Pointer to the field in the request body, as a URI fragment.","example":"#/fromAmount","isRequired":true,"uniqueKey":"errors.items.[INDEX].pointer","typeLabel":"string"},"detail":{"type":"string","description":"What is wrong with it.","example":"must be a positive base-10 integer","isRequired":true,"uniqueKey":"errors.items.[INDEX].detail","typeLabel":"string"}},"uniqueKey":"errors.items.[INDEX]","typeLabel":"object"},"description":"`invalid_request`: the body's fields at fault.","uniqueKey":"errors","typeLabel":"object[]"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"type":"https://docs.ternswap.xyz/api-reference/errors#no_route","title":"No route","status":422,"code":"invalid_request","detail":"no solver quoted this route","requestId":"01JC2W6Q0Z8V5K3M7N1P4R9T2X","errors":[{"pointer":"#/fromAmount","detail":"must be a positive base-10 integer"}]}}},"exampleType":"generated"}},"exampleType":"generated"},"392ca0e4-5def-4b89-9c27-067a777bdf9e":{"description":"Internal error","content":{"application/problem+json":{"schema":{"type":"object","description":"The body of every error response: RFC 9457 problem details, with a stable `code`.","required":["type","title","status","code","detail"],"properties":{"type":{"type":"string","description":"The error type's URI: `https://docs.ternswap.xyz/api-reference/errors#\u003ccode>`, which explains it.","example":"https://docs.ternswap.xyz/api-reference/errors#no_route","isRequired":true,"uniqueKey":"type","typeLabel":"string"},"title":{"type":"string","description":"The error type's fixed summary.","example":"No route","isRequired":true,"uniqueKey":"title","typeLabel":"string"},"status":{"type":"integer","format":"int32","description":"The HTTP status.","example":422,"minimum":0,"isRequired":true,"uniqueKey":"status","typeLabel":"integer\u003cint32>"},"code":{"oneOf":[{"type":"string","title":"invalid_request","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"invalid_request","isRequired":true,"uniqueKey":"code.oneOf.0","typeLabel":"string"},{"type":"string","title":"unauthorized","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"unauthorized","isRequired":true,"uniqueKey":"code.oneOf.1","typeLabel":"string"},{"type":"string","title":"not_found","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"not_found","isRequired":true,"uniqueKey":"code.oneOf.2","typeLabel":"string"},{"type":"string","title":"method_not_allowed","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"method_not_allowed","isRequired":true,"uniqueKey":"code.oneOf.3","typeLabel":"string"},{"type":"string","title":"rate_limited","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"rate_limited","isRequired":true,"uniqueKey":"code.oneOf.4","typeLabel":"string"},{"type":"string","title":"unsupported_chain","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"unsupported_chain","isRequired":true,"uniqueKey":"code.oneOf.5","typeLabel":"string"},{"type":"string","title":"unsupported_asset","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"unsupported_asset","isRequired":true,"uniqueKey":"code.oneOf.6","typeLabel":"string"},{"type":"string","title":"amount_too_small","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"amount_too_small","isRequired":true,"uniqueKey":"code.oneOf.7","typeLabel":"string"},{"type":"string","title":"amount_too_large","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"amount_too_large","isRequired":true,"uniqueKey":"code.oneOf.8","typeLabel":"string"},{"type":"string","title":"no_route","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"no_route","isRequired":true,"uniqueKey":"code.oneOf.9","typeLabel":"string"},{"type":"string","title":"condition_reused","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"condition_reused","isRequired":true,"uniqueKey":"code.oneOf.10","typeLabel":"string"},{"type":"string","title":"quote_not_found","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"quote_not_found","isRequired":true,"uniqueKey":"code.oneOf.11","typeLabel":"string"},{"type":"string","title":"quote_expired","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"quote_expired","isRequired":true,"uniqueKey":"code.oneOf.12","typeLabel":"string"},{"type":"string","title":"invalid_fulfillment","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"invalid_fulfillment","isRequired":true,"uniqueKey":"code.oneOf.13","typeLabel":"string"},{"type":"string","title":"destination_not_ready","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"destination_not_ready","isRequired":true,"uniqueKey":"code.oneOf.14","typeLabel":"string"},{"type":"string","title":"invalid_private_transaction","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"invalid_private_transaction","isRequired":true,"uniqueKey":"code.oneOf.15","typeLabel":"string"},{"type":"string","title":"already_submitted","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"already_submitted","isRequired":true,"uniqueKey":"code.oneOf.16","typeLabel":"string"},{"type":"string","title":"idempotency_key_reused","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"idempotency_key_reused","isRequired":true,"uniqueKey":"code.oneOf.17","typeLabel":"string"},{"type":"string","title":"idempotency_key_in_progress","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"idempotency_key_in_progress","isRequired":true,"uniqueKey":"code.oneOf.18","typeLabel":"string"},{"type":"string","title":"payload_too_large","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"payload_too_large","isRequired":true,"uniqueKey":"code.oneOf.19","typeLabel":"string"},{"type":"string","title":"timeout","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"timeout","isRequired":true,"uniqueKey":"code.oneOf.20","typeLabel":"string"},{"type":"string","title":"internal","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"internal","isRequired":true,"uniqueKey":"code.oneOf.21","typeLabel":"string"}],"isRequired":true,"uniqueKey":"code","typeLabel":"string"},"detail":{"type":"string","description":"A human-readable explanation of this occurrence.","example":"no solver quoted this route","isRequired":true,"uniqueKey":"detail","typeLabel":"string"},"requestId":{"type":"string","description":"The request's `x-request-id`: quote it when asking for support.","example":"01JC2W6Q0Z8V5K3M7N1P4R9T2X","uniqueKey":"requestId","typeLabel":"string"},"errors":{"type":"array","items":{"type":"object","description":"A field of the request body at fault.","required":["pointer","detail"],"properties":{"pointer":{"type":"string","description":"A JSON Pointer to the field in the request body, as a URI fragment.","example":"#/fromAmount","isRequired":true,"uniqueKey":"errors.items.[INDEX].pointer","typeLabel":"string"},"detail":{"type":"string","description":"What is wrong with it.","example":"must be a positive base-10 integer","isRequired":true,"uniqueKey":"errors.items.[INDEX].detail","typeLabel":"string"}},"uniqueKey":"errors.items.[INDEX]","typeLabel":"object"},"description":"`invalid_request`: the body's fields at fault.","uniqueKey":"errors","typeLabel":"object[]"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"type":"https://docs.ternswap.xyz/api-reference/errors#no_route","title":"No route","status":422,"code":"invalid_request","detail":"no solver quoted this route","requestId":"01JC2W6Q0Z8V5K3M7N1P4R9T2X","errors":[{"pointer":"#/fromAmount","detail":"must be a positive base-10 integer"}]}}},"exampleType":"generated"}},"headers":{"x-request-id":{"description":"The request's ID: the client's `x-request-id` when it is 1 to 64 characters of `[A-Za-z0-9._-]`, otherwise one the server assigns. Problems repeat it as `requestId`.","schema":{"type":"string"}}},"exampleType":"generated"},"67e1c4be-3801-4d8d-b859-1968b0a59bec":{"description":"A chain read the price needs timed out; retry","content":{"application/problem+json":{"schema":{"type":"object","description":"The body of every error response: RFC 9457 problem details, with a stable `code`.","required":["type","title","status","code","detail"],"properties":{"type":{"type":"string","description":"The error type's URI: `https://docs.ternswap.xyz/api-reference/errors#\u003ccode>`, which explains it.","example":"https://docs.ternswap.xyz/api-reference/errors#no_route","isRequired":true,"uniqueKey":"type","typeLabel":"string"},"title":{"type":"string","description":"The error type's fixed summary.","example":"No route","isRequired":true,"uniqueKey":"title","typeLabel":"string"},"status":{"type":"integer","format":"int32","description":"The HTTP status.","example":422,"minimum":0,"isRequired":true,"uniqueKey":"status","typeLabel":"integer\u003cint32>"},"code":{"oneOf":[{"type":"string","title":"invalid_request","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"invalid_request","isRequired":true,"uniqueKey":"code.oneOf.0","typeLabel":"string"},{"type":"string","title":"unauthorized","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"unauthorized","isRequired":true,"uniqueKey":"code.oneOf.1","typeLabel":"string"},{"type":"string","title":"not_found","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"not_found","isRequired":true,"uniqueKey":"code.oneOf.2","typeLabel":"string"},{"type":"string","title":"method_not_allowed","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"method_not_allowed","isRequired":true,"uniqueKey":"code.oneOf.3","typeLabel":"string"},{"type":"string","title":"rate_limited","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"rate_limited","isRequired":true,"uniqueKey":"code.oneOf.4","typeLabel":"string"},{"type":"string","title":"unsupported_chain","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"unsupported_chain","isRequired":true,"uniqueKey":"code.oneOf.5","typeLabel":"string"},{"type":"string","title":"unsupported_asset","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"unsupported_asset","isRequired":true,"uniqueKey":"code.oneOf.6","typeLabel":"string"},{"type":"string","title":"amount_too_small","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"amount_too_small","isRequired":true,"uniqueKey":"code.oneOf.7","typeLabel":"string"},{"type":"string","title":"amount_too_large","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"amount_too_large","isRequired":true,"uniqueKey":"code.oneOf.8","typeLabel":"string"},{"type":"string","title":"no_route","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"no_route","isRequired":true,"uniqueKey":"code.oneOf.9","typeLabel":"string"},{"type":"string","title":"condition_reused","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"condition_reused","isRequired":true,"uniqueKey":"code.oneOf.10","typeLabel":"string"},{"type":"string","title":"quote_not_found","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"quote_not_found","isRequired":true,"uniqueKey":"code.oneOf.11","typeLabel":"string"},{"type":"string","title":"quote_expired","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"quote_expired","isRequired":true,"uniqueKey":"code.oneOf.12","typeLabel":"string"},{"type":"string","title":"invalid_fulfillment","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"invalid_fulfillment","isRequired":true,"uniqueKey":"code.oneOf.13","typeLabel":"string"},{"type":"string","title":"destination_not_ready","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"destination_not_ready","isRequired":true,"uniqueKey":"code.oneOf.14","typeLabel":"string"},{"type":"string","title":"invalid_private_transaction","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"invalid_private_transaction","isRequired":true,"uniqueKey":"code.oneOf.15","typeLabel":"string"},{"type":"string","title":"already_submitted","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"already_submitted","isRequired":true,"uniqueKey":"code.oneOf.16","typeLabel":"string"},{"type":"string","title":"idempotency_key_reused","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"idempotency_key_reused","isRequired":true,"uniqueKey":"code.oneOf.17","typeLabel":"string"},{"type":"string","title":"idempotency_key_in_progress","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"idempotency_key_in_progress","isRequired":true,"uniqueKey":"code.oneOf.18","typeLabel":"string"},{"type":"string","title":"payload_too_large","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"payload_too_large","isRequired":true,"uniqueKey":"code.oneOf.19","typeLabel":"string"},{"type":"string","title":"timeout","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"timeout","isRequired":true,"uniqueKey":"code.oneOf.20","typeLabel":"string"},{"type":"string","title":"internal","description":"A stable, machine-readable error code. Clients branch on this, never on `title` or `detail`; handle unknown codes by HTTP status.","const":"internal","isRequired":true,"uniqueKey":"code.oneOf.21","typeLabel":"string"}],"isRequired":true,"uniqueKey":"code","typeLabel":"string"},"detail":{"type":"string","description":"A human-readable explanation of this occurrence.","example":"no solver quoted this route","isRequired":true,"uniqueKey":"detail","typeLabel":"string"},"requestId":{"type":"string","description":"The request's `x-request-id`: quote it when asking for support.","example":"01JC2W6Q0Z8V5K3M7N1P4R9T2X","uniqueKey":"requestId","typeLabel":"string"},"errors":{"type":"array","items":{"type":"object","description":"A field of the request body at fault.","required":["pointer","detail"],"properties":{"pointer":{"type":"string","description":"A JSON Pointer to the field in the request body, as a URI fragment.","example":"#/fromAmount","isRequired":true,"uniqueKey":"errors.items.[INDEX].pointer","typeLabel":"string"},"detail":{"type":"string","description":"What is wrong with it.","example":"must be a positive base-10 integer","isRequired":true,"uniqueKey":"errors.items.[INDEX].detail","typeLabel":"string"}},"uniqueKey":"errors.items.[INDEX]","typeLabel":"object"},"description":"`invalid_request`: the body's fields at fault.","uniqueKey":"errors","typeLabel":"object[]"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"type":"https://docs.ternswap.xyz/api-reference/errors#no_route","title":"No route","status":422,"code":"invalid_request","detail":"no solver quoted this route","requestId":"01JC2W6Q0Z8V5K3M7N1P4R9T2X","errors":[{"pointer":"#/fromAmount","detail":"must be a positive base-10 integer"}]}}},"exampleType":"generated"}},"headers":{"x-request-id":{"description":"The request's ID: the client's `x-request-id` when it is 1 to 64 characters of `[A-Za-z0-9._-]`, otherwise one the server assigns. Problems repeat it as `requestId`.","schema":{"type":"string"}}},"exampleType":"generated"}},"security":{"4069fb79-7b2d-4c5e-91b7-fa3de28fa0e9":{},"25427650-1e8b-4e9c-ab38-b6c926804d63":{"api_key":{"type":"apiKey","in":"header","name":"x-api-key","description":"A partner's API key. Optional: without it a request is anonymous. An invalid key is `401 unauthorized`.","scopes":[],"schemeName":"api_key"}}},"servers":{"dcc009e5-1baa-48c7-9034-7812755d1b19":{"url":"https://api.ternswap.xyz","description":"Production"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"apiKey","in":"header","name":"x-api-key","description":"A partner's API key. Optional: without it a request is anonymous. An invalid key is `401 unauthorized`.","scopes":[],"schemeName":"api_key"},"schema":{"title":"x-api-key","type":"string","description":"A partner's API key. Optional: without it a request is anonymous. An invalid key is `401 unauthorized`.","isRequired":true,"typeLabel":"string","deprecated":false},"schemeName":"api_key","name":"x-api-key"}],"title":"api_key"}]},"originalFileLocation":"api-reference/openapi.json"},"subdomain":"localhost","siteName":"Tern","title":"Get a price - Tern","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"originalFileLocation":"api-reference/quotes/get-a-price.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=\"light\";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=\"light\"}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=\"What a swap gives now, and what it costs. Across chains the best solver prices it; on one chain the DEX aggregators route it; with privacy: \u0026quot;shielded\u0026quot; it is a private swap from Starknet\u0026#x27;s privacy pool. A price creates nothing and commits no one: ask POST /v1/quotes for a firm quote to fund. With sender, sourceGas counts only the approvals that account still needs.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Tern\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/favicons/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/favicons/favicon-32x32.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/favicons/favicon-16x16.png\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/favicons/favicon.ico\">\u003cmeta data-mint-head property=\"og:title\" content=\"Get a price - Tern\">\u003cmeta data-mint-head property=\"og:description\" content=\"What a swap gives now, and what it costs. Across chains the best solver prices it; on one chain the DEX aggregators route it; with privacy: \u0026quot;shielded\u0026quot; it is a private swap from Starknet\u0026#x27;s privacy pool. A price creates nothing and commits no one: ask POST /v1/quotes for a firm quote to fund. With sender, sourceGas counts only the approvals that account still needs.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Tern\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://local./api-reference/quotes/get-a-price\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://local.mintlify.site/images/og.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=\"Get a price - Tern\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"What a swap gives now, and what it costs. Across chains the best solver prices it; on one chain the DEX aggregators route it; with privacy: \u0026quot;shielded\u0026quot; it is a private swap from Starknet\u0026#x27;s privacy pool. A price creates nothing and commits no one: ask POST /v1/quotes for a firm quote to fund. With sender, sourceGas counts only the approvals that account still needs.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://local.mintlify.site/images/og.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=\"/favicons/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Tern\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#212121\">\u003clink data-mint-head rel=\"canonical\" href=\"https://local./api-reference/quotes/get-a-price\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/quotes/get-a-price.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Tern\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Tern\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/quotes/get-a-price.md","siteName":"Tern","nav":{"tabs":[{"tab":"Docs","pages":[{"title":"Docs","href":""}]},{"tab":"API reference","groups":[{"group":"Overview","pages":[{"title":"Introduction","href":"/api-reference/introduction"},{"title":"Authentication and limits","href":"/api-reference/authentication"},{"title":"Idempotency","href":"/api-reference/idempotency"},{"title":"Errors","description":"What every error means, and how to handle it.","href":"/api-reference/errors"}]},{"group":"Quotes","pages":[{"title":"Get a price","openapi":"/api-reference/openapi.json POST /v1/price","href":"/api-reference/quotes/get-a-price"},{"title":"Create a quote","description":"A firm quote, ready to fund. Across chains a solver commits to it, and it settles through two escrows: the body\nneeds `sender` (the refund address), `recipient` and `executionCondition`, the SHA-256 of a 32-byte fulfillment the\nclient generates and keeps. On one chain it is a swap in one transaction through a DEX aggregator: it needs\n`sender` and `recipient`. A private swap (`privacy: \"shielded\"`) names none of them.\n\n`execute.steps` lists what to send, in order: each step's `kind` (`approve`, `deposit`, `swap`) and its EVM `tx`\n(send them one after another), its Starknet `call` (all in one invoke), or a Solana swap's `solana` transaction. A\nprivate swap has `strk20` actions to prove and submit instead. An escrow quote also has a\n`depositAddress`, to which the exact `from.amount` can be sent from any wallet instead.","openapi":"/api-reference/openapi.json POST /v1/quotes","href":"/api-reference/quotes/create-a-quote"},{"title":"Get a quote","openapi":"/api-reference/openapi.json GET /v1/quotes/{id}","href":"/api-reference/quotes/get-a-quote"},{"title":"Search quotes","openapi":"/api-reference/openapi.json GET /v1/quotes","href":"/api-reference/quotes/search-quotes"},{"title":"Reveal the fulfillment","openapi":"/api-reference/openapi.json POST /v1/quotes/{id}/fulfill","href":"/api-reference/quotes/reveal-the-fulfillment"},{"title":"Submit a private swap","openapi":"/api-reference/openapi.json POST /v1/quotes/{id}/submit","href":"/api-reference/quotes/submit-a-private-swap"}]},{"group":"Chains","pages":[{"title":"List chains","openapi":"/api-reference/openapi.json GET /v1/chains","href":"/api-reference/chains/list-chains"}]},{"group":"Indexing","pages":[{"title":"Index a transaction now","openapi":"/api-reference/openapi.json POST /v1/index","href":"/api-reference/index/index-a-transaction-now"}]}]}]},"basePath":"","title":"Get a price - Tern","buildId":"0877d4c2a8de","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-Cpf_Pav_.js","snippetPresets-DqYVQZPB.js","utils-B6fa-YJH.js","style-to-object-BY3JEAdk.js","utils-BGOtpluc.js","v4-DIgz8zy6.js","addTypeLabelsToSchema-BX_y08hJ.js","conditional-requirements-CFM0id0Q.js","cloneDeep-BaiIuF4F.js","_Uint8Array-C3lkX7eq.js","isObject-FP1Yky1u.js","ApiExamples-BkaU7WHo.js","usePlaygroundInputsStore-DiIJYwXr.js","shallow-B7__N5wH.js","isEqual-COF04FiJ.js","CodeSnippets-Cmmm9Kmv.js","CodeSnippet-BWa-zCPG.js","use-playground-group-access-g56RwLg_.js","Page-DELY1DxO.js","api-description-markdown-Gt9LaO9o.js","DynamicMarkdown-kaGhkvrK.js","SectionHeading-CbCtiho9.js","MethodPill-DY2BNaHZ.js","getPastedJson-QzBSQ0Ex.js","Check2Icon-D47f8xAM.js","axios-CsQoIw0U.js","Markdown-CB6nCLSa.js","AssistantPageLink-CWP0PNAs.js","dist-DkpSMB3U.js","lib-DMeTj1gb.js","lib-B8HbPgcC.js","katex-Dbtb6Wk7.js","html-void-elements-mCSPHezU.js","marked.esm-CZWythHk.js"]}