If specified, the route will be built to get the specified output amount. If not specified, the route will be built to get the maximum output amount for the given input amount.
Defines the maximum number of independent paths (i.e., transactions) the route can split into. For v4 wallets, you can omit this or set it to 4; for v5 wallets, you can set it to 20 (this is our internal upper limit, and we may reduce it later to something like 10).
Defines the maximum length of each path in tokens. It accepts values from [2; 5]. If it's 2, only direct swaps A -> B without multihops are possible. If it's 3, there can be a maximum of 1 intermediate token, i.e., A -> X -> B. If it's 4/5, there can be 2/3 intermediate tokens. A value of 2 deprives you of more profitable exchanges by finding market inefficiencies and does not allow you to exchange tokens without a direct pair (since there can be no intermediate tokens). The higher the value, the more profitable routes can be built, but the higher the likelihood that the user ends up with an intermediate token (since our blockchain is asynchronous, and some swap in the middle of the route may fail due to slippage).
Configures the DEX pools that can appear in the generated route. By setting blockchains = ["ton"] inside it, you can remove the dexes field; max_volatility allows you to exclude pools whose volatility has been above a certain percentage in the last 15 minutes. This makes sense when you allow 2-3 intermediate tokens or a large number of splits to smooth out potential issues.
{"docsConfig":{"$schema":"https://mintlify.com/docs.json","theme":"mint","name":"swap.coffee","colors":{"primary":"#EA7A3B","light":"#EA7A3B","dark":"#EA7A3B"},"favicon":"https://mintcdn.com/swapcoffee/iLRr3RvbYe3VNL6H/logo/swap.svg?fit=max\u0026auto=format\u0026n=iLRr3RvbYe3VNL6H\u0026q=85\u0026s=0790d19aba1c2aea045850658d8af3db","logo":{"light":"https://mintcdn.com/swapcoffee/iLRr3RvbYe3VNL6H/logo/swap-logo.svg?fit=max\u0026auto=format\u0026n=iLRr3RvbYe3VNL6H\u0026q=85\u0026s=c6be548ca6ca8808eadb97a4a8981592","dark":"https://mintcdn.com/swapcoffee/iLRr3RvbYe3VNL6H/logo/swap-logo.svg?fit=max\u0026auto=format\u0026n=iLRr3RvbYe3VNL6H\u0026q=85\u0026s=c6be548ca6ca8808eadb97a4a8981592"},"navbar":{"links":[{"label":"Community","href":"https://t.me/addlist/tShqOXNZ89tmYTg8"}],"primary":{"type":"button","label":"App","href":"https://swap.coffee"}},"footer":{"socials":{"telegram":"https://t.me/addlist/tShqOXNZ89tmYTg8","x":"https://x.com/swap_coffee_ton","discord":"https://discord.gg/7wfjBH8pRu","github":"https://github.com/swapcoffee","youtube":"https://www.youtube.com/@swap.coffee"}},"styling":{"latex":true},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"swapcoffee","hasAudioNarration":false,"actualSubdomain":"swapcoffee","customDomains":["docs.swap.coffee"],"gitSource":{"type":"github","owner":"swapcoffee","repo":"documentation","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6a47099db75607cafede79c8","collectionId":"3a30c25e-ceb1-4b34-bd82-e23fe20fcd33","schemaVersion":"v2"},"feedback":{"edits":true,"issues":true,"agentFeedback":true},"entitlements":{},"buildId":"6a47099db75607cafede79c8:success","clientVersion":"0.0.3966","searchFilterCounts":[{"language":"default","tag":"Aggregator API","count":120},{"language":"default","tag":"Documentation","count":75},{"language":"default","tag":"Technical Documentation","count":29},{"language":"default","tag":"Technical Guides","count":29},{"language":"default","tag":"User Guides","count":26},{"language":"default","tag":"Entity","count":16},{"language":"default","tag":"RU Documentation","count":14},{"language":"default","tag":"Strategies","count":14},{"language":"default","tag":"TokensDB API","count":14},{"language":"default","tag":"DEX","count":11}]},"assistantConfig":{},"hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","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":"editor-v7-file-tree","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":"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":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"pause-universal-search-reconcile","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":"per-site-search-delta","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":"editor-private-page-search","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":"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":"editor-nav-generations","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":"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":"byok-sep-25","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":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-agent-model-picker","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","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}],"isAtlas":false,"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"technical-guides/aggregator-api-openapi/routing/returns-the-best-route-for-the-given-trade-pair","slug":"/technical-guides/aggregator-api-openapi/routing/returns-the-best-route-for-the-given-trade-pair","pageMetadata":{"title":"Returns the best route for the given trade pair","description":null,"deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi post /v1/route","href":"/technical-guides/aggregator-api-openapi/routing/returns-the-best-route-for-the-given-trade-pair","autogeneratedByOpenApi":true},"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":{"config":{},"pageMetadata":{"title":"Returns the best route for the given trade pair","description":null,"deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi post /v1/route","href":"/technical-guides/aggregator-api-openapi/routing/returns-the-best-route-for-the-given-trade-pair","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"tags":["Routing"],"summary":"Returns the best route for the given trade pair","operationId":"buildRoute","requestBody":"e19d5c1c-ba50-4acf-b007-2b6e88852368","responses":{"200":"fe7e5562-e7b7-4fb8-90cf-004b3579935f","default":"d1fe577e-3628-46ac-a87b-50f2b90808d6"},"method":"post","type":"path","servers":["5de74ff7-82f5-4abd-bceb-2d2591b2453a","a0425e4c-11c2-4c36-8455-2c88de1c40af"],"security":["1a421369-fe6a-4ba9-9594-0256aa1bee94","0a4625ff-b6c7-4ea7-a40b-a1224eee820f"],"path":"/v1/route","baseUrlOptions":["https://backend.swap.coffee/","http://localhost:8080/"],"title":"Returns the best route for the given trade pair","description":"","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["input_token","output_token"],"properties":{"input_token":{"type":"object","required":["blockchain","address"],"properties":{"blockchain":{"type":"string","example":"ton","isRequired":true,"uniqueKey":"input_token.blockchain","typeLabel":"string"},"address":{"type":"string","example":"native","isRequired":true,"uniqueKey":"input_token.address","typeLabel":"string"}},"isRequired":true,"uniqueKey":"input_token","typeLabel":"object"},"output_token":{"type":"object","required":["blockchain","address"],"properties":{"blockchain":{"type":"string","example":"ton","isRequired":true,"uniqueKey":"output_token.blockchain","typeLabel":"string"},"address":{"type":"string","example":"native","isRequired":true,"uniqueKey":"output_token.address","typeLabel":"string"}},"isRequired":true,"uniqueKey":"output_token","typeLabel":"object"},"input_amount":{"type":"number","format":"double","description":"Input amount in tokens (not nano!) to be swapped","minimum":0,"exclusiveMinimum":true,"uniqueKey":"input_amount","typeLabel":"number\u003cdouble>"},"output_amount":{"type":"number","description":"If specified, the route will be built to get the specified output amount. If not specified, the route will be built to get the maximum output amount for the given input amount.","format":"double","minimum":0,"exclusiveMinimum":true,"uniqueKey":"output_amount","typeLabel":"number\u003cdouble>"},"max_splits":{"type":"integer","format":"int32","description":"Defines the maximum number of independent paths (i.e., transactions) the route can split into. For v4 wallets, you can omit this or set it to 4; for v5 wallets, you can set it to 20 (this is our internal upper limit, and we may reduce it later to something like 10).","minimum":1,"maximum":20,"default":4,"uniqueKey":"max_splits","typeLabel":"integer\u003cint32>"},"max_length":{"type":"integer","format":"int32","description":"Defines the maximum length of each path in tokens. It accepts values from [2; 5]. If it's 2, only direct swaps A -> B without multihops are possible. If it's 3, there can be a maximum of 1 intermediate token, i.e., A -> X -> B. If it's 4/5, there can be 2/3 intermediate tokens. A value of 2 deprives you of more profitable exchanges by finding market inefficiencies and does not allow you to exchange tokens without a direct pair (since there can be no intermediate tokens). The higher the value, the more profitable routes can be built, but the higher the likelihood that the user ends up with an intermediate token (since our blockchain is asynchronous, and some swap in the middle of the route may fail due to slippage).","minimum":2,"maximum":5,"default":3,"uniqueKey":"max_length","typeLabel":"integer\u003cint32>"},"pool_selector":{"type":"object","description":"Configures the DEX pools that can appear in the generated route. By setting blockchains = [\"ton\"] inside it, you can remove the dexes field; max_volatility allows you to exclude pools whose volatility has been above a certain percentage in the last 15 minutes. This makes sense when you allow 2-3 intermediate tokens or a large number of splits to smooth out potential issues.","properties":{"blockchains":{"description":"If specified, only pools from given blockchains will be used for routing","type":"array","minItems":1,"items":{"type":"string","example":"ton","uniqueKey":"pool_selector.blockchains.items.[INDEX]","typeLabel":"string"},"uniqueKey":"pool_selector.blockchains","typeLabel":"string[]"},"dexes":{"description":"If specified, only pools from given dexes will be used for routing","type":"array","minItems":1,"items":{"type":"string","example":"dedust","uniqueKey":"pool_selector.dexes.items.[INDEX]","typeLabel":"string"},"uniqueKey":"pool_selector.dexes","typeLabel":"string[]"},"max_volatility":{"description":"If specified, only pools with volatility lower than given value will be used for routing","type":"number","format":"double","minimum":0,"uniqueKey":"pool_selector.max_volatility","typeLabel":"number\u003cdouble>"}},"uniqueKey":"pool_selector","typeLabel":"object"},"mev_protection":{"type":"boolean","description":"Whether a MEV protection should be enabled","example":true,"uniqueKey":"mev_protection","typeLabel":"boolean"},"additional_data":{"type":"object","properties":{"sender_address":{"type":"string","example":"UQCNTO0Nh0Z7QNyRW1BLWfk08f2dAOw4izrx9sO6OUPg4DoV","uniqueKey":"additional_data.sender_address","typeLabel":"string"},"referral_name":{"type":"string","example":"tonkeeper","uniqueKey":"additional_data.referral_name","typeLabel":"string"}},"uniqueKey":"additional_data","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"input_token":{"blockchain":"ton","address":"native"},"output_token":{"blockchain":"ton","address":"native"},"input_amount":1,"output_amount":1,"max_splits":4,"max_length":3,"pool_selector":{"blockchains":["ton"],"dexes":["dedust"],"max_volatility":1},"mev_protection":true,"additional_data":{"sender_address":"UQCNTO0Nh0Z7QNyRW1BLWfk08f2dAOw4izrx9sO6OUPg4DoV","referral_name":"tonkeeper"}}}},"exampleType":"generated"}},"exampleType":"generated"},"responses":{"fe7e5562-e7b7-4fb8-90cf-004b3579935f":{"description":"resulting route","content":{"application/json":{"schema":{"type":"object","required":["input_token","output_token","input_amount","output_amount","input_usd","output_usd","recommended_gas","price_impact","paths"],"properties":{"input_token":{"type":"object","required":["address","metadata"],"properties":{"address":{"type":"object","required":["blockchain","address"],"properties":{"blockchain":{"type":"string","example":"ton","isRequired":true,"uniqueKey":"input_token.address.blockchain","typeLabel":"string"},"address":{"type":"string","example":"native","isRequired":true,"uniqueKey":"input_token.address.address","typeLabel":"string"}},"isRequired":true,"uniqueKey":"input_token.address","typeLabel":"object"},"metadata":{"type":"object","required":["name","symbol","decimals","listed","verification"],"properties":{"name":{"type":"string","example":"ARBUZ","isRequired":true,"uniqueKey":"input_token.metadata.name","typeLabel":"string"},"symbol":{"type":"string","example":"ARBUZ","isRequired":true,"uniqueKey":"input_token.metadata.symbol","typeLabel":"string"},"decimals":{"type":"integer","format":"int32","isRequired":true,"uniqueKey":"input_token.metadata.decimals","typeLabel":"integer\u003cint32>"},"listed":{"type":"boolean","isRequired":true,"uniqueKey":"input_token.metadata.listed","typeLabel":"boolean"},"verification":{"type":"string","enum":["whitelisted","blacklisted","community","unknown"],"isRequired":true,"uniqueKey":"input_token.metadata.verification","typeLabel":"enum\u003cstring>"},"image_url":{"type":"string","uniqueKey":"input_token.metadata.image_url","typeLabel":"string"}},"isRequired":true,"uniqueKey":"input_token.metadata","typeLabel":"object"}},"isRequired":true,"uniqueKey":"input_token","typeLabel":"object"},"output_token":{"type":"object","required":["address","metadata"],"properties":{"address":{"type":"object","required":["blockchain","address"],"properties":{"blockchain":{"type":"string","example":"ton","isRequired":true,"uniqueKey":"output_token.address.blockchain","typeLabel":"string"},"address":{"type":"string","example":"native","isRequired":true,"uniqueKey":"output_token.address.address","typeLabel":"string"}},"isRequired":true,"uniqueKey":"output_token.address","typeLabel":"object"},"metadata":{"type":"object","required":["name","symbol","decimals","listed","verification"],"properties":{"name":{"type":"string","example":"ARBUZ","isRequired":true,"uniqueKey":"output_token.metadata.name","typeLabel":"string"},"symbol":{"type":"string","example":"ARBUZ","isRequired":true,"uniqueKey":"output_token.metadata.symbol","typeLabel":"string"},"decimals":{"type":"integer","format":"int32","isRequired":true,"uniqueKey":"output_token.metadata.decimals","typeLabel":"integer\u003cint32>"},"listed":{"type":"boolean","isRequired":true,"uniqueKey":"output_token.metadata.listed","typeLabel":"boolean"},"verification":{"type":"string","enum":["whitelisted","blacklisted","community","unknown"],"isRequired":true,"uniqueKey":"output_token.metadata.verification","typeLabel":"enum\u003cstring>"},"image_url":{"type":"string","uniqueKey":"output_token.metadata.image_url","typeLabel":"string"}},"isRequired":true,"uniqueKey":"output_token.metadata","typeLabel":"object"}},"isRequired":true,"uniqueKey":"output_token","typeLabel":"object"},"input_amount":{"type":"number","format":"double","isRequired":true,"uniqueKey":"input_amount","typeLabel":"number\u003cdouble>"},"output_amount":{"type":"number","format":"double","isRequired":true,"uniqueKey":"output_amount","typeLabel":"number\u003cdouble>"},"input_usd":{"type":"number","format":"double","isRequired":true,"uniqueKey":"input_usd","typeLabel":"number\u003cdouble>"},"output_usd":{"type":"number","format":"double","isRequired":true,"uniqueKey":"output_usd","typeLabel":"number\u003cdouble>"},"recommended_gas":{"type":"number","format":"double","isRequired":true,"uniqueKey":"recommended_gas","typeLabel":"number\u003cdouble>"},"price_impact":{"type":"number","format":"double","isRequired":true,"uniqueKey":"price_impact","typeLabel":"number\u003cdouble>"},"paths":{"type":"array","items":{"type":"object","required":["blockchain","dex","pool_address","input_token","output_token","swap","recommended_gas","average_gas"],"properties":{"blockchain":{"type":"string","example":"ton","isRequired":true,"uniqueKey":"paths.items.[INDEX].blockchain","typeLabel":"string"},"dex":{"type":"string","example":"stonfi","isRequired":true,"uniqueKey":"paths.items.[INDEX].dex","typeLabel":"string"},"pool_address":{"type":"string","isRequired":true,"uniqueKey":"paths.items.[INDEX].pool_address","typeLabel":"string"},"input_token":{"type":"object","required":["address","metadata"],"properties":{"address":{"type":"object","required":["blockchain","address"],"properties":{"blockchain":{"type":"string","example":"ton","isRequired":true,"uniqueKey":"paths.items.[INDEX].input_token.address.blockchain","typeLabel":"string"},"address":{"type":"string","example":"native","isRequired":true,"uniqueKey":"paths.items.[INDEX].input_token.address.address","typeLabel":"string"}},"isRequired":true,"uniqueKey":"paths.items.[INDEX].input_token.address","typeLabel":"object"},"metadata":{"type":"object","required":["name","symbol","decimals","listed","verification"],"properties":{"name":{"type":"string","example":"ARBUZ","isRequired":true,"uniqueKey":"paths.items.[INDEX].input_token.metadata.name","typeLabel":"string"},"symbol":{"type":"string","example":"ARBUZ","isRequired":true,"uniqueKey":"paths.items.[INDEX].input_token.metadata.symbol","typeLabel":"string"},"decimals":{"type":"integer","format":"int32","isRequired":true,"uniqueKey":"paths.items.[INDEX].input_token.metadata.decimals","typeLabel":"integer\u003cint32>"},"listed":{"type":"boolean","isRequired":true,"uniqueKey":"paths.items.[INDEX].input_token.metadata.listed","typeLabel":"boolean"},"verification":{"type":"string","enum":["whitelisted","blacklisted","community","unknown"],"isRequired":true,"uniqueKey":"paths.items.[INDEX].input_token.metadata.verification","typeLabel":"enum\u003cstring>"},"image_url":{"type":"string","uniqueKey":"paths.items.[INDEX].input_token.metadata.image_url","typeLabel":"string"}},"isRequired":true,"uniqueKey":"paths.items.[INDEX].input_token.metadata","typeLabel":"object"}},"isRequired":true,"uniqueKey":"paths.items.[INDEX].input_token","typeLabel":"object"},"output_token":{"type":"object","required":["address","metadata"],"properties":{"address":{"type":"object","required":["blockchain","address"],"properties":{"blockchain":{"type":"string","example":"ton","isRequired":true,"uniqueKey":"paths.items.[INDEX].output_token.address.blockchain","typeLabel":"string"},"address":{"type":"string","example":"native","isRequired":true,"uniqueKey":"paths.items.[INDEX].output_token.address.address","typeLabel":"string"}},"isRequired":true,"uniqueKey":"paths.items.[INDEX].output_token.address","typeLabel":"object"},"metadata":{"type":"object","required":["name","symbol","decimals","listed","verification"],"properties":{"name":{"type":"string","example":"ARBUZ","isRequired":true,"uniqueKey":"paths.items.[INDEX].output_token.metadata.name","typeLabel":"string"},"symbol":{"type":"string","example":"ARBUZ","isRequired":true,"uniqueKey":"paths.items.[INDEX].output_token.metadata.symbol","typeLabel":"string"},"decimals":{"type":"integer","format":"int32","isRequired":true,"uniqueKey":"paths.items.[INDEX].output_token.metadata.decimals","typeLabel":"integer\u003cint32>"},"listed":{"type":"boolean","isRequired":true,"uniqueKey":"paths.items.[INDEX].output_token.metadata.listed","typeLabel":"boolean"},"verification":{"type":"string","enum":["whitelisted","blacklisted","community","unknown"],"isRequired":true,"uniqueKey":"paths.items.[INDEX].output_token.metadata.verification","typeLabel":"enum\u003cstring>"},"image_url":{"type":"string","uniqueKey":"paths.items.[INDEX].output_token.metadata.image_url","typeLabel":"string"}},"isRequired":true,"uniqueKey":"paths.items.[INDEX].output_token.metadata","typeLabel":"object"}},"isRequired":true,"uniqueKey":"paths.items.[INDEX].output_token","typeLabel":"object"},"swap":{"type":"object","required":["result","input_amount","output_amount","before_reserves","after_reserves"],"properties":{"result":{"type":"string","description":"Result of the swap","enum":["fully_fulfilled","partially_fulfilled","unavailable"],"isRequired":true,"uniqueKey":"paths.items.[INDEX].swap.result","typeLabel":"enum\u003cstring>"},"input_amount":{"type":"number","format":"double","isRequired":true,"uniqueKey":"paths.items.[INDEX].swap.input_amount","typeLabel":"number\u003cdouble>"},"output_amount":{"type":"number","format":"double","isRequired":true,"uniqueKey":"paths.items.[INDEX].swap.output_amount","typeLabel":"number\u003cdouble>"},"before_reserves":{"type":"array","items":{"type":"number","format":"double","uniqueKey":"paths.items.[INDEX].swap.before_reserves.items.[INDEX]","typeLabel":"number\u003cdouble>"},"isRequired":true,"uniqueKey":"paths.items.[INDEX].swap.before_reserves","typeLabel":"number\u003cdouble>[]"},"after_reserves":{"type":"array","items":{"type":"number","format":"double","uniqueKey":"paths.items.[INDEX].swap.after_reserves.items.[INDEX]","typeLabel":"number\u003cdouble>"},"isRequired":true,"uniqueKey":"paths.items.[INDEX].swap.after_reserves","typeLabel":"number\u003cdouble>[]"},"reason":{"type":"string","uniqueKey":"paths.items.[INDEX].swap.reason","typeLabel":"string"},"left_amount":{"type":"number","format":"double","uniqueKey":"paths.items.[INDEX].swap.left_amount","typeLabel":"number\u003cdouble>"}},"isRequired":true,"uniqueKey":"paths.items.[INDEX].swap","typeLabel":"object"},"recommended_gas":{"type":"number","format":"double","isRequired":true,"uniqueKey":"paths.items.[INDEX].recommended_gas","typeLabel":"number\u003cdouble>"},"average_gas":{"type":"number","format":"double","isRequired":true,"uniqueKey":"paths.items.[INDEX].average_gas","typeLabel":"number\u003cdouble>"},"next":{"type":"array","items":{"$circularRef":"18d63c0b-34a5-48a9-92c1-2ae84fe46dde"},"uniqueKey":"paths.items.[INDEX].next","typeLabel":"array"}},"uniqueKey":"paths.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"paths","typeLabel":"object[]"},"savings":{"type":"number","format":"double","uniqueKey":"savings","typeLabel":"number\u003cdouble>"},"left_amount":{"type":"number","format":"double","uniqueKey":"left_amount","typeLabel":"number\u003cdouble>"},"estimated_cashback_usd":{"type":"number","format":"double","uniqueKey":"estimated_cashback_usd","typeLabel":"number\u003cdouble>"},"partner_commission_ton":{"type":"number","format":"double","uniqueKey":"partner_commission_ton","typeLabel":"number\u003cdouble>"},"mev_protection_fee":{"type":"number","description":"Fees for the usage of MEV protection.","format":"double","uniqueKey":"mev_protection_fee","typeLabel":"number\u003cdouble>"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"input_token":{"address":{"blockchain":"ton","address":"native"},"metadata":{"name":"ARBUZ","symbol":"ARBUZ","decimals":123,"listed":true,"verification":"whitelisted","image_url":"\u003cstring>"}},"output_token":{"address":{"blockchain":"ton","address":"native"},"metadata":{"name":"ARBUZ","symbol":"ARBUZ","decimals":123,"listed":true,"verification":"whitelisted","image_url":"\u003cstring>"}},"input_amount":123,"output_amount":123,"input_usd":123,"output_usd":123,"recommended_gas":123,"price_impact":123,"paths":[{"blockchain":"ton","dex":"stonfi","pool_address":"\u003cstring>","input_token":{"address":{"blockchain":"ton","address":"native"},"metadata":{"name":"ARBUZ","symbol":"ARBUZ","decimals":123,"listed":true,"verification":"whitelisted","image_url":"\u003cstring>"}},"output_token":{"address":{"blockchain":"ton","address":"native"},"metadata":{"name":"ARBUZ","symbol":"ARBUZ","decimals":123,"listed":true,"verification":"whitelisted","image_url":"\u003cstring>"}},"swap":{"result":"fully_fulfilled","input_amount":123,"output_amount":123,"before_reserves":[123],"after_reserves":[123],"reason":"\u003cstring>","left_amount":123},"recommended_gas":123,"average_gas":123,"next":"\u003carray>"}],"savings":123,"left_amount":123,"estimated_cashback_usd":123,"partner_commission_ton":123,"mev_protection_fee":123}}},"exampleType":"generated"}},"exampleType":"generated"},"d1fe577e-3628-46ac-a87b-50f2b90808d6":{"description":"Some error during request processing","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string","isRequired":true,"uniqueKey":"error","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{"1a421369-fe6a-4ba9-9594-0256aa1bee94":{},"0a4625ff-b6c7-4ea7-a40b-a1224eee820f":{"ApiKey":{"type":"apiKey","name":"X-Api-Key","in":"header","scopes":[]}}},"servers":{"5de74ff7-82f5-4abd-bceb-2d2591b2453a":{"url":"https://backend.swap.coffee/"},"a0425e4c-11c2-4c36-8455-2c88de1c40af":{"url":"http://localhost:8080/"}},"schemas":{"18d63c0b-34a5-48a9-92c1-2ae84fe46dde":{"type":"object","required":["blockchain","dex","pool_address","input_token","output_token","swap","recommended_gas","average_gas"],"properties":{"blockchain":{"type":"string","example":"ton","isRequired":true},"dex":{"type":"string","example":"stonfi","isRequired":true},"pool_address":{"type":"string","isRequired":true},"input_token":{"type":"object","required":["address","metadata"],"properties":{"address":{"type":"object","required":["blockchain","address"],"properties":{"blockchain":{"type":"string","example":"ton","isRequired":true},"address":{"type":"string","example":"native","isRequired":true}},"isRequired":true},"metadata":{"type":"object","required":["name","symbol","decimals","listed","verification"],"properties":{"name":{"type":"string","example":"ARBUZ","isRequired":true},"symbol":{"type":"string","example":"ARBUZ","isRequired":true},"decimals":{"type":"integer","format":"int32","isRequired":true},"listed":{"type":"boolean","isRequired":true},"verification":{"type":"string","enum":["whitelisted","blacklisted","community","unknown"],"isRequired":true},"image_url":{"type":"string"}},"isRequired":true}},"isRequired":true},"output_token":{"type":"object","required":["address","metadata"],"properties":{"address":{"type":"object","required":["blockchain","address"],"properties":{"blockchain":{"type":"string","example":"ton","isRequired":true},"address":{"type":"string","example":"native","isRequired":true}},"isRequired":true},"metadata":{"type":"object","required":["name","symbol","decimals","listed","verification"],"properties":{"name":{"type":"string","example":"ARBUZ","isRequired":true},"symbol":{"type":"string","example":"ARBUZ","isRequired":true},"decimals":{"type":"integer","format":"int32","isRequired":true},"listed":{"type":"boolean","isRequired":true},"verification":{"type":"string","enum":["whitelisted","blacklisted","community","unknown"],"isRequired":true},"image_url":{"type":"string"}},"isRequired":true}},"isRequired":true},"swap":{"type":"object","required":["result","input_amount","output_amount","before_reserves","after_reserves"],"properties":{"result":{"type":"string","description":"Result of the swap","enum":["fully_fulfilled","partially_fulfilled","unavailable"],"isRequired":true},"input_amount":{"type":"number","format":"double","isRequired":true},"output_amount":{"type":"number","format":"double","isRequired":true},"before_reserves":{"type":"array","items":{"type":"number","format":"double"},"isRequired":true},"after_reserves":{"type":"array","items":{"type":"number","format":"double"},"isRequired":true},"reason":{"type":"string"},"left_amount":{"type":"number","format":"double"}},"isRequired":true},"recommended_gas":{"type":"number","format":"double","isRequired":true},"average_gas":{"type":"number","format":"double","isRequired":true},"next":{"type":"array","items":{"$circularRef":"18d63c0b-34a5-48a9-92c1-2ae84fe46dde"}}}}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"apiKey","name":"X-Api-Key","in":"header","scopes":[]},"schema":{"title":"X-Api-Key","type":"string","isRequired":true,"typeLabel":"string","deprecated":false},"schemeName":"ApiKey","name":"X-Api-Key"}],"title":"ApiKey"}]},"originalFileLocation":"https://backend.swap.coffee/openapi"},"subdomain":"swapcoffee","siteName":"swap.coffee","title":"Returns the best route for the given trade pair - swap.coffee","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-07-03T01:00:27.231Z","originalFileLocation":"technical-guides/aggregator-api-openapi/routing/returns-the-best-route-for-the-given-trade-pair.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=\"system\"}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=\"application-name\" content=\"swap.coffee\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/swapcoffee/D1zy00u3Me7MzV8f/_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/swapcoffee/D1zy00u3Me7MzV8f/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/swapcoffee/D1zy00u3Me7MzV8f/_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/swapcoffee/D1zy00u3Me7MzV8f/_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/swapcoffee/D1zy00u3Me7MzV8f/_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/swapcoffee/D1zy00u3Me7MzV8f/_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/swapcoffee/D1zy00u3Me7MzV8f/_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/swapcoffee/D1zy00u3Me7MzV8f/_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/swapcoffee/D1zy00u3Me7MzV8f/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Returns the best route for the given trade pair - swap.coffee\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"swap.coffee\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.swap.coffee/technical-guides/aggregator-api-openapi/routing/returns-the-best-route-for-the-given-trade-pair\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://swapcoffee.mintlify.app/_mintlify/api/og/v2?division=Routing\u0026amp;title=Returns+the+best+route+for+the+given+trade+pair\u0026amp;theme=f765a920740df30f90912688\u0026amp;signature=b05b2b44788454055fc0c1088cbe1e97b5a68b8afa9b9b41df8aee82fadc1056\">\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=\"Returns the best route for the given trade pair - swap.coffee\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://swapcoffee.mintlify.app/_mintlify/api/og/v2?division=Routing\u0026amp;title=Returns+the+best+route+for+the+given+trade+pair\u0026amp;theme=f765a920740df30f90912688\u0026amp;signature=b05b2b44788454055fc0c1088cbe1e97b5a68b8afa9b9b41df8aee82fadc1056\">\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/swapcoffee/D1zy00u3Me7MzV8f/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"swap.coffee\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#EA7A3B\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.swap.coffee/technical-guides/aggregator-api-openapi/routing/returns-the-best-route-for-the-given-trade-pair\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/technical-guides/aggregator-api-openapi/routing/returns-the-best-route-for-the-given-trade-pair.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.swap.coffee/#organization\",\"name\":\"swap.coffee\",\"url\":\"https://docs.swap.coffee\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/swapcoffee/iLRr3RvbYe3VNL6H/logo/swap-logo.svg?fit=max\u0026auto=format\u0026n=iLRr3RvbYe3VNL6H\u0026q=85\u0026s=c6be548ca6ca8808eadb97a4a8981592\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.swap.coffee#website\",\"name\":\"swap.coffee\",\"url\":\"https://docs.swap.coffee\",\"publisher\":{\"@id\":\"https://docs.swap.coffee/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.swap.coffee/technical-guides/aggregator-api-openapi/routing/returns-the-best-route-for-the-given-trade-pair#webpage\",\"url\":\"https://docs.swap.coffee/technical-guides/aggregator-api-openapi/routing/returns-the-best-route-for-the-given-trade-pair\",\"name\":\"Returns the best route for the given trade pair\",\"dateModified\":\"2026-07-03T01:00:27.231Z\",\"isPartOf\":{\"@id\":\"https://docs.swap.coffee#website\"},\"breadcrumb\":{\"@id\":\"https://docs.swap.coffee/technical-guides/aggregator-api-openapi/routing/returns-the-best-route-for-the-given-trade-pair#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.swap.coffee/technical-guides/aggregator-api-openapi/routing/returns-the-best-route-for-the-given-trade-pair#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"swap.coffee\",\"item\":\"https://docs.swap.coffee\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Returns the best route for the given trade pair\",\"item\":\"https://docs.swap.coffee/technical-guides/aggregator-api-openapi/routing/returns-the-best-route-for-the-given-trade-pair\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.swap.coffee/technical-guides/aggregator-api-openapi/routing/returns-the-best-route-for-the-given-trade-pair#apireference\",\"headline\":\"Returns the best route for the given trade pair\",\"name\":\"Returns the best route for the given trade pair\",\"url\":\"https://docs.swap.coffee/technical-guides/aggregator-api-openapi/routing/returns-the-best-route-for-the-given-trade-pair\",\"mainEntityOfPage\":{\"@id\":\"https://docs.swap.coffee/technical-guides/aggregator-api-openapi/routing/returns-the-best-route-for-the-given-trade-pair#webpage\"},\"dateModified\":\"2026-07-03T01:00:27.231Z\",\"publisher\":{\"@id\":\"https://docs.swap.coffee/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.swap.coffee#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"swap.coffee\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"swap.coffee","nav":{"global":null,"anchors":[{"anchor":"Documentation","icon":"book-open","pages":[{"title":"Documentation","href":"/eng/user-guides/welcome"}]},{"anchor":"GitHub","href":"https://github.com/swapcoffee","icon":"github"},{"anchor":"Developer Chat","href":"https://t.me/swapcoffee_dev_chat","icon":"telegram"},{"anchor":"Developer Channel","href":"https://t.me/swapcoffee_dev","icon":"telegram"},{"anchor":"Token Listing","href":"https://swapcoffee.typeform.com/to/xFNfA6uA","icon":"shelves"},{"anchor":"Get API Key","href":"https://swapcoffee.typeform.com/to/Zx49Ho3y","icon":"key"},{"anchor":"Aggregator API","icon":"square-terminal","groups":[{"group":"Entity","pages":[{"title":"Get supported blockchains. Currently only TON is supported.","deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi get /v1/blockchains","href":"/technical-guides/aggregator-api-openapi/entity/get-supported-blockchains-currently-only-ton-is-supported"},{"title":"Returns list of supported decentralized exchanges supported by the service in the given blockchain","deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi get /v1/dexes","href":"/technical-guides/aggregator-api-openapi/entity/returns-list-of-supported-decentralized-exchanges-supported-by-the-service-in-the-given-blockchain"},{"title":"Returns information about the given decentralized exchange for the given blockchain","deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi get /v1/dex/{blockchain}/{name}","href":"/technical-guides/aggregator-api-openapi/entity/returns-information-about-the-given-decentralized-exchange-for-the-given-blockchain"},{"title":"Returns list of liquid staking pools","deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi get /v1/liquid_staking_pools","href":"/technical-guides/aggregator-api-openapi/entity/returns-list-of-liquid-staking-pools"},{"title":"Returns staking pool for given address","deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi get /v1/liquid_staking_pools/{address}","href":"/technical-guides/aggregator-api-openapi/entity/returns-staking-pool-for-given-address"},{"title":"Returns list of pools which correspond to the given params","deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi get /v1/pools","href":"/technical-guides/aggregator-api-openapi/entity/returns-list-of-pools-which-correspond-to-the-given-params"},{"title":"Clear pools metadata cache. For internal usage only","deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi delete /v1/pools","href":"/technical-guides/aggregator-api-openapi/entity/clear-pools-metadata-cache-for-internal-usage-only"},{"title":"Returns trading metrics for pools","deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi get /v1/pools/metrics","href":"/technical-guides/aggregator-api-openapi/entity/returns-trading-metrics-for-pools"},{"title":"Returns information about the given liquidity pool for the given blockchain","deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi get /v1/pool/{blockchain}/{address}","href":"/technical-guides/aggregator-api-openapi/entity/returns-information-about-the-given-liquidity-pool-for-the-given-blockchain"},{"title":"Updates pool's data. For internal usage only","deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi post /v1/pool/{blockchain}/{address}","href":"/technical-guides/aggregator-api-openapi/entity/updates-pools-data-for-internal-usage-only"},{"title":"Returns list of pools associated with given token","deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi get /v1/pool/{blockchain}/by-token/{address}","href":"/technical-guides/aggregator-api-openapi/entity/returns-list-of-pools-associated-with-given-token"},{"title":"Returns list of tokens supported by the service","deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi get /v1/tokens","href":"/technical-guides/aggregator-api-openapi/entity/returns-list-of-tokens-supported-by-the-service"},{"title":"Returns list of tokens supported by the service","deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi get /v2/tokens","href":"/technical-guides/aggregator-api-openapi/entity/returns-list-of-tokens-supported-by-the-service-1"},{"title":"Returns information about the given token for the given blockchain","deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi get /v1/token/{blockchain}/{address}","href":"/technical-guides/aggregator-api-openapi/entity/returns-information-about-the-given-token-for-the-given-blockchain"},{"title":"Returns information about the given token by its symbol for the given blockchain","deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi get /v1/token/{blockchain}/by-symbol/{symbol}","href":"/technical-guides/aggregator-api-openapi/entity/returns-information-about-the-given-token-by-its-symbol-for-the-given-blockchain"},{"title":"Returns prices for given tokens","description":null,"deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi post /v1/token/price","href":"/technical-guides/aggregator-api-openapi/entity/returns-prices-for-given-tokens"}]},{"group":"Routing","pages":[{"title":"Returns the best route for the given trade pair","deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi post /v1/route","href":"/technical-guides/aggregator-api-openapi/routing/returns-the-best-route-for-the-given-trade-pair"},{"title":"Returns the best route for the given list of input tokens and output token","description":null,"deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi post /v1/route/multi","href":"/technical-guides/aggregator-api-openapi/routing/returns-the-best-route-for-the-given-list-of-input-tokens-and-output-token"},{"title":"Returns the best route for the given trade pair using smart settings","deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi post /v1/route/smart","href":"/technical-guides/aggregator-api-openapi/routing/returns-the-best-route-for-the-given-trade-pair-using-smart-settings"},{"title":"Returns pre-built transactions for the given route. It is assumed that transactions will be signed and sent by the sender via wallet","deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi post /v2/route/transactions","href":"/technical-guides/aggregator-api-openapi/routing/returns-pre-built-transactions-for-the-given-route-it-is-assumed-that-transactions-will-be-signed-and-sent-by-the-sender-via-wallet"},{"title":"Returns pre-built transaction for the given unstake request. It is assumed that transaction will be signed and sent by the sender via wallet","deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi post /v2/unstake/ton/transaction","href":"/technical-guides/aggregator-api-openapi/routing/returns-pre-built-transaction-for-the-given-unstake-request-it-is-assumed-that-transaction-will-be-signed-and-sent-by-the-sender-via-wallet"},{"title":"Returns pre-built transaction for the given stake request. It is assumed that transaction will be signed and sent by the sender via wallet","deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi post /v2/stake/ton/transaction","href":"/technical-guides/aggregator-api-openapi/routing/returns-pre-built-transaction-for-the-given-stake-request-it-is-assumed-that-transaction-will-be-signed-and-sent-by-the-sender-via-wallet"},{"title":"Get route transactions execution result","deprecated":true,"version":null,"openapi":"https://backend.swap.coffee/openapi get /v1/route/result","href":"/technical-guides/aggregator-api-openapi/routing/get-route-transactions-execution-result"},{"title":"Get route transactions execution result","deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi get /v2/route/result","href":"/technical-guides/aggregator-api-openapi/routing/get-route-transactions-execution-result-1"}]},{"group":"Ton","pages":[{"title":"Returns wallet version and revision","deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi get /v1/ton/wallet/{address}/version","href":"/technical-guides/aggregator-api-openapi/ton/returns-wallet-version-and-revision"},{"title":"Get wallet balance in nanotons (1e-9 TON)","deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi get /v1/ton/wallet/{address}/balance","href":"/technical-guides/aggregator-api-openapi/ton/get-wallet-balance-in-nanotons-1e-9-ton"}]},{"group":"Profile","pages":[{"title":"Get historical account transactions on swap.coffee","deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi get /v1/profile/{address}/transactions","href":"/technical-guides/aggregator-api-openapi/profile/get-historical-account-transactions-on-swapcoffee"},{"title":"Validate TON proof for given account address","deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi post /v1/profile/{address}/proof","href":"/technical-guides/aggregator-api-openapi/profile/validate-ton-proof-for-given-account-address"},{"title":"Get account settings","deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi get /v1/profile/{address}/settings","href":"/technical-guides/aggregator-api-openapi/profile/get-account-settings"},{"title":"Update account settings","deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi post /v1/profile/{address}/settings","href":"/technical-guides/aggregator-api-openapi/profile/update-account-settings"}]},{"group":"Auth","pages":[{"title":"List existing auth tokens","deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi get /v1/auth","href":"/technical-guides/aggregator-api-openapi/auth/list-existing-auth-tokens"},{"title":"Create new auth token","deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi post /v1/auth","href":"/technical-guides/aggregator-api-openapi/auth/create-new-auth-token"},{"title":"Delete existing auth token","deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi delete /v1/auth","href":"/technical-guides/aggregator-api-openapi/auth/delete-existing-auth-token"},{"title":"Edit existing auth token","deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi patch /v1/auth","href":"/technical-guides/aggregator-api-openapi/auth/edit-existing-auth-token"}]},{"group":"Referral","pages":[{"title":"Get account's referral info","deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi get /v1/referral/{address}","href":"/technical-guides/aggregator-api-openapi/referral/get-accounts-referral-info"},{"title":"Bind new referral","deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi post /v1/referral/{address}","href":"/technical-guides/aggregator-api-openapi/referral/bind-new-referral"},{"title":"Unbind existing referral. For internal usage only.","deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi delete /v1/referral/{address}","href":"/technical-guides/aggregator-api-openapi/referral/unbind-existing-referral-for-internal-usage-only"},{"title":"Update referral's info. For internal usage only.","deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi patch /v1/referral/{address}","href":"/technical-guides/aggregator-api-openapi/referral/update-referrals-info-for-internal-usage-only"},{"title":"Get account's list of referrals","deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi get /v1/referral/{address}/list","href":"/technical-guides/aggregator-api-openapi/referral/get-accounts-list-of-referrals"},{"title":"Get address for alias","deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi get /v1/referral/alias/{alias}","href":"/technical-guides/aggregator-api-openapi/referral/get-address-for-alias"},{"title":"Set referral address alias","deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi post /v1/referral/alias/{alias}","href":"/technical-guides/aggregator-api-openapi/referral/set-referral-address-alias"},{"title":"Delete address alias","deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi delete /v1/referral/alias/{alias}","href":"/technical-guides/aggregator-api-openapi/referral/delete-address-alias"}]},{"group":"Claim","pages":[{"title":"Get account's claiming stats","deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi get /v1/claim/{address}","href":"/technical-guides/aggregator-api-openapi/claim/get-accounts-claiming-stats"},{"title":"Claim tokens","deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi post /v1/claim/{address}","href":"/technical-guides/aggregator-api-openapi/claim/claim-tokens"},{"title":"Get state of account claimings","deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi get /v1/claim/{address}/state","href":"/technical-guides/aggregator-api-openapi/claim/get-state-of-account-claimings"},{"title":"Get claiming transaction execution result","deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi get /v1/claim/result","href":"/technical-guides/aggregator-api-openapi/claim/get-claiming-transaction-execution-result"},{"title":"Transfer available in claim-center tokens from one account to another. For internal usage only","deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi post /v1/claim/transfer","href":"/technical-guides/aggregator-api-openapi/claim/transfer-available-in-claim-center-tokens-from-one-account-to-another-for-internal-usage-only"}]},{"group":"Cashback","pages":[{"title":"Get cashbacks info","deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi get /v1/cashback/","href":"/technical-guides/aggregator-api-openapi/cashback/get-cashbacks-info"},{"title":"Create new cashback distribution. For internal usage only","deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi post /v1/cashback/","href":"/technical-guides/aggregator-api-openapi/cashback/create-new-cashback-distribution-for-internal-usage-only"},{"title":"Get cashback info","deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi get /v1/cashback/{id}","href":"/technical-guides/aggregator-api-openapi/cashback/get-cashback-info"},{"title":"Update cashback information. For internal usage only","deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi patch /v1/cashback/{id}","href":"/technical-guides/aggregator-api-openapi/cashback/update-cashback-information-for-internal-usage-only"},{"title":"Get cashback total info for user","deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi get /v1/cashback/user/{address}","href":"/technical-guides/aggregator-api-openapi/cashback/get-cashback-total-info-for-user"},{"title":"Get cashback promos rewards for user","deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi get /v1/cashback/user/{address}/list","href":"/technical-guides/aggregator-api-openapi/cashback/get-cashback-promos-rewards-for-user"}]},{"group":"Contests","pages":[{"title":"Get contests","deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi get /v1/contests","href":"/technical-guides/aggregator-api-openapi/contests/get-contests"},{"title":"Create new contest. For internal usage only","deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi post /v1/contests","href":"/technical-guides/aggregator-api-openapi/contests/create-new-contest-for-internal-usage-only"},{"title":"Get contest","deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi get /v1/contests/{id}","href":"/technical-guides/aggregator-api-openapi/contests/get-contest"},{"title":"Update existing contest. For internal usage only","deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi patch /v1/contests/{id}","href":"/technical-guides/aggregator-api-openapi/contests/update-existing-contest-for-internal-usage-only"},{"title":"Get user stats for contest","deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi get /v1/contests/{id}/user/{address}","href":"/technical-guides/aggregator-api-openapi/contests/get-user-stats-for-contest"},{"title":"Get top users' stats for contest","deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi get /v1/contests/{id}/top","href":"/technical-guides/aggregator-api-openapi/contests/get-top-users-stats-for-contest"},{"title":"Payout rewards for this contest in token. For internal usage only","deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi post /v1/contests/{id}/payout/token","href":"/technical-guides/aggregator-api-openapi/contests/payout-rewards-for-this-contest-in-token-for-internal-usage-only"}]},{"group":"Strategies","pages":[{"title":"Check whether strategies wallet exists for given account address.","deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi get /v1/strategies/{address}/wallet","href":"/technical-guides/aggregator-api-openapi/strategies/check-whether-strategies-wallet-exists-for-given-account-address"},{"title":"Get pre-built transaction for strategies wallet creation.","deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi post /v1/strategies/{address}/wallet","href":"/technical-guides/aggregator-api-openapi/strategies/get-pre-built-transaction-for-strategies-wallet-creation"},{"title":"Checks whether user is eligible for using strategies","deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi get /v1/strategies/eligibility/user/{address}","href":"/technical-guides/aggregator-api-openapi/strategies/checks-whether-user-is-eligible-for-using-strategies"},{"title":"Get list of supported from-tokens for strategies","deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi get /v1/strategies/eligibility/from-tokens","href":"/technical-guides/aggregator-api-openapi/strategies/get-list-of-supported-from-tokens-for-strategies"},{"title":"Get list of supported to-tokens for strategies for given from-token","deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi get /v1/strategies/eligibility/to-tokens/{address}","href":"/technical-guides/aggregator-api-openapi/strategies/get-list-of-supported-to-tokens-for-strategies-for-given-from-token"},{"title":"Get strategy orders","deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi get /v1/strategies/{address}/orders","href":"/technical-guides/aggregator-api-openapi/strategies/get-strategy-orders"},{"title":"Get strategy order","deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi get /v1/strategies/{address}/order","href":"/technical-guides/aggregator-api-openapi/strategies/get-strategy-order"},{"title":"Get pre-built transaction for strategy order creation","deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi post /v1/strategies/{address}/order","href":"/technical-guides/aggregator-api-openapi/strategies/get-pre-built-transaction-for-strategy-order-creation"},{"title":"Get pre-built transaction for strategy order cancellation","deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi delete /v1/strategies/{address}/order","href":"/technical-guides/aggregator-api-openapi/strategies/get-pre-built-transaction-for-strategy-order-cancellation"},{"title":"Cancel strategy order by id. For internal usage only.","deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi delete /v1/strategies/cancel/by-id/{id}","href":"/technical-guides/aggregator-api-openapi/strategies/cancel-strategy-order-by-id-for-internal-usage-only"},{"title":"Cancel all strategy orders by proxy wallet. For internal usage only.","deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi delete /v1/strategies/cancel/by-wallet/{address}","href":"/technical-guides/aggregator-api-openapi/strategies/cancel-all-strategy-orders-by-proxy-wallet-for-internal-usage-only"},{"title":"Cancel all strategy orders by given token pair. For internal usage only.","deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi delete /v1/strategies/cancel/by-tokens/{first}/{second}","href":"/technical-guides/aggregator-api-openapi/strategies/cancel-all-strategy-orders-by-given-token-pair-for-internal-usage-only"},{"title":"Cancel all strategy orders. For internal usage only.","deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi delete /v1/strategies/cancel/all","href":"/technical-guides/aggregator-api-openapi/strategies/cancel-all-strategy-orders-for-internal-usage-only"},{"title":"Make a payout from strategy wallet to wallet's owner. For internal usage only.","deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi post /v1/strategies/wallet/payout","href":"/technical-guides/aggregator-api-openapi/strategies/make-a-payout-from-strategy-wallet-to-wallets-owner-for-internal-usage-only"}]},{"group":"Partnership","pages":[{"title":"Get raw transaction records with specified partner's referral address. Requires associated x-api-key.","deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi get /v1/partnership/{address}/transactions","href":"/technical-guides/aggregator-api-openapi/partnership/get-raw-transaction-records-with-specified-partners-referral-address-requires-associated-x-api-key"},{"title":"Get partner settings. For internal usage only","deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi get /v1/partnership/{address}/settings","href":"/technical-guides/aggregator-api-openapi/partnership/get-partner-settings-for-internal-usage-only"},{"title":"Set partner settings. For internal usage only","deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi post /v1/partnership/{address}/settings","href":"/technical-guides/aggregator-api-openapi/partnership/set-partner-settings-for-internal-usage-only"},{"title":"Delete partner settings. For internal usage only","deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi delete /v1/partnership/{address}/settings","href":"/technical-guides/aggregator-api-openapi/partnership/delete-partner-settings-for-internal-usage-only"},{"title":"Get token claiming global stats. Requires associated x-api-key.","deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi get /v1/partnership/claiming/stats/{token}","href":"/technical-guides/aggregator-api-openapi/partnership/get-token-claiming-global-stats-requires-associated-x-api-key"},{"title":"Get token claiming user stats. Requires associated x-api-key.","deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi get /v1/partnership/claiming/stats/{token}/{address}","href":"/technical-guides/aggregator-api-openapi/partnership/get-token-claiming-user-stats-requires-associated-x-api-key"},{"title":"Accrue token to claim center. Requires associated x-api-key.","deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi post /v1/partnership/claiming/accrue","href":"/technical-guides/aggregator-api-openapi/partnership/accrue-token-to-claim-center-requires-associated-x-api-key"},{"title":"Register new partner token for claiming center. For internal usage only.","deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi post /v1/partnership/claiming","href":"/technical-guides/aggregator-api-openapi/partnership/register-new-partner-token-for-claiming-center-for-internal-usage-only"},{"title":"Increase total amount of existing partner token within claiming center. For internal usage only.","deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi patch /v1/partnership/claiming","href":"/technical-guides/aggregator-api-openapi/partnership/increase-total-amount-of-existing-partner-token-within-claiming-center-for-internal-usage-only"},{"title":"Get aggregated information about staking for specific user. Requires associated x-api-key.","deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi get /v1/partnership/staking/{master_address}/{address}","href":"/technical-guides/aggregator-api-openapi/partnership/get-aggregated-information-about-staking-for-specific-user-requires-associated-x-api-key"}]},{"group":"Statistics","pages":[{"title":"Get generic statistic of dex aggregation.","deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi get /v1/statistics/generic","href":"/technical-guides/aggregator-api-openapi/statistics/get-generic-statistic-of-dex-aggregation"}]},{"group":"Staking","pages":[{"title":"Get all stakings","deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi get /v2/staking/list","href":"/technical-guides/aggregator-api-openapi/staking/get-all-stakings"},{"title":"Get staking transaction execution result","deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi get /v2/staking/result","href":"/technical-guides/aggregator-api-openapi/staking/get-staking-transaction-execution-result"},{"title":"Get aggregated information about staking","deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi get /v2/staking/{master_address}","href":"/technical-guides/aggregator-api-openapi/staking/get-aggregated-information-about-staking"},{"title":"Get aggregated information about staking for specific user","deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi get /v2/staking/{master_address}/{address}","href":"/technical-guides/aggregator-api-openapi/staking/get-aggregated-information-about-staking-for-specific-user"},{"title":"Get user's staking points","deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi get /v2/staking/{master_address}/{address}/points","href":"/technical-guides/aggregator-api-openapi/staking/get-users-staking-points"},{"title":"Get user's balances of staked tokens","deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi get /v2/staking/{master_address}/{address}/balances","href":"/technical-guides/aggregator-api-openapi/staking/get-users-balances-of-staked-tokens"},{"title":"Build transaction to create new staking position","deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi post /v2/staking/{master_address}/positions/{address}","href":"/technical-guides/aggregator-api-openapi/staking/build-transaction-to-create-new-staking-position"},{"title":"Build transaction to extend existing position","deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi post /v2/staking/{master_address}/positions/{address}/{id}","href":"/technical-guides/aggregator-api-openapi/staking/build-transaction-to-extend-existing-position"},{"title":"Build transaction to close position and withdraw all money","deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi delete /v2/staking/{master_address}/positions/{address}/{id}","href":"/technical-guides/aggregator-api-openapi/staking/build-transaction-to-close-position-and-withdraw-all-money"}]},{"group":"DEX","pages":[{"title":"Get address of the vault of the given asset","deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi get /v1/dex/vault/{asset}","href":"/technical-guides/aggregator-api-openapi/dex/get-address-of-the-vault-of-the-given-asset"},{"title":"Build transaction to create vault for the given asset","deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi post /v1/dex/vault/{asset}","href":"/technical-guides/aggregator-api-openapi/dex/build-transaction-to-create-vault-for-the-given-asset"},{"title":"Get dex pools by filter","deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi get /v1/dex/pools","href":"/technical-guides/aggregator-api-openapi/dex/get-dex-pools-by-filter"},{"title":"Build transactions to create pool of the given asset pair","deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi post /v1/dex/pool","href":"/technical-guides/aggregator-api-openapi/dex/build-transactions-to-create-pool-of-the-given-asset-pair"}]},{"group":"LiquidityProvisioning","pages":[{"title":"Return information about user's LP position in pool","deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi get /v1/liquidity/position/{pool_address}/{user_address}","href":"/technical-guides/aggregator-api-openapi/liquidityprovisioning/return-information-about-users-lp-position-in-pool"},{"title":"Build transactions to provide liquidity to the given pool","deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi post /v1/liquidity/provision/{address}","href":"/technical-guides/aggregator-api-openapi/liquidityprovisioning/build-transactions-to-provide-liquidity-to-the-given-pool"},{"title":"Build transaction to withdraw liquidity from the given pool","deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi delete /v1/liquidity/provision/{address}","href":"/technical-guides/aggregator-api-openapi/liquidityprovisioning/build-transaction-to-withdraw-liquidity-from-the-given-pool"},{"title":"Returns pools on Coffee DEX that correspond to the pools of provided addresses","deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi get /v1/liquidity/migration/corresponding-pools","href":"/technical-guides/aggregator-api-openapi/liquidityprovisioning/returns-pools-on-coffee-dex-that-correspond-to-the-pools-of-provided-addresses"},{"title":"Returns list of pools from which user may migrate tokens","deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi get /v1/liquidity/migration/{user_address}","href":"/technical-guides/aggregator-api-openapi/liquidityprovisioning/returns-list-of-pools-from-which-user-may-migrate-tokens"},{"title":"Build transaction to migrate LP to swap.coffee DEX","deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi post /v1/liquidity/migration/{user_address}","href":"/technical-guides/aggregator-api-openapi/liquidityprovisioning/build-transaction-to-migrate-lp-to-swapcoffee-dex"},{"title":"Returns list of pools that are possible for migration of LP.","deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi get /v1/liquidity/migration/pools/{source_pool_address}","href":"/technical-guides/aggregator-api-openapi/liquidityprovisioning/returns-list-of-pools-that-are-possible-for-migration-of-lp"},{"title":"Returns pool total supply","deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi get /v1/liquidity/{pool_address}/total-supply","href":"/technical-guides/aggregator-api-openapi/liquidityprovisioning/returns-pool-total-supply"},{"title":"Returns status of liquidity provisioning operation","deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi get /v1/liquidity/result","href":"/technical-guides/aggregator-api-openapi/liquidityprovisioning/returns-status-of-liquidity-provisioning-operation"}]},{"group":"Boosts","pages":[{"title":"Returns pool's aggregated APR","deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi get /v1/boost/{pool_address}/apr","href":"/technical-guides/aggregator-api-openapi/boosts/returns-pools-aggregated-apr"},{"title":"Returns list of boosts for the pool","deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi get /v1/boost/{pool_address}","href":"/technical-guides/aggregator-api-openapi/boosts/returns-list-of-boosts-for-the-pool"},{"title":"Returns user's earned boosts in given pool","deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi get /v1/boost/user/{pool_address}/{user_address}","href":"/technical-guides/aggregator-api-openapi/boosts/returns-users-earned-boosts-in-given-pool"},{"title":"Build transaction to create boost for pool in swap.coffee DEX","deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi post /v1/boost/{pool_address}/{address}","href":"/technical-guides/aggregator-api-openapi/boosts/build-transaction-to-create-boost-for-pool-in-swapcoffee-dex"},{"title":"Get detailed info about boost. Works for Coffee DEX pools only","deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi get /v1/boost/{boost_factory}/{boost_id}","href":"/technical-guides/aggregator-api-openapi/boosts/get-detailed-info-about-boost-works-for-coffee-dex-pools-only"},{"title":"Build transaction to create stonfi farm position","deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi post /v1/boost/stonfi/{pool_address}/{user_address}","href":"/technical-guides/aggregator-api-openapi/boosts/build-transaction-to-create-stonfi-farm-position"},{"title":"Build transaction to close farm position in stonfi","deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi delete /v1/boost/stonfi/{pool_address}/{position_address}/{user_address}","href":"/technical-guides/aggregator-api-openapi/boosts/build-transaction-to-close-farm-position-in-stonfi"},{"title":"Returns status of new boost creation operation. Works for Coffee DEX pools only","deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi get /v1/boost/result","href":"/technical-guides/aggregator-api-openapi/boosts/returns-status-of-new-boost-creation-operation-works-for-coffee-dex-pools-only"}]},{"group":"Yield","pages":[{"title":"Returns list of pools which correspond to the given params","deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi get /v1/yield/pools","href":"/technical-guides/aggregator-api-openapi/yield/returns-list-of-pools-which-correspond-to-the-given-params"},{"title":"Returns detailed information about requested pool","deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi get /v1/yield/pool/{pool_address}","href":"/technical-guides/aggregator-api-openapi/yield/returns-detailed-information-about-requested-pool"},{"title":"Returns detailed information about user's position in the pool","deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi get /v1/yield/pool/{pool_address}/{user_address}","href":"/technical-guides/aggregator-api-openapi/yield/returns-detailed-information-about-users-position-in-the-pool"},{"title":"Interact with yield pool","deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi post /v1/yield/pool/{pool_address}/{user_address}","href":"/technical-guides/aggregator-api-openapi/yield/interact-with-yield-pool"},{"title":"Returns status of interaction with yield pool operation","deprecated":null,"version":null,"openapi":"https://backend.swap.coffee/openapi get /v1/yield/result","href":"/technical-guides/aggregator-api-openapi/yield/returns-status-of-interaction-with-yield-pool-operation"}]}]},{"anchor":"TokensDB API","icon":"square-terminal","pages":[{"title":"TokensDB API","href":"/technical-guides/tokens-api-openapi/accounts/get-all-jettons-owned-by-the-account"}]}]},"title":"Returns the best route for the given trade pair - swap.coffee","buildId":"dpl_cadrRc5H9XQiJQbDFN5mcYRs2PAj","deploymentId":"dpl_cadrRc5H9XQiJQbDFN5mcYRs2PAj","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-DKJwRUt2.js","utils-CWD_VS3u.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-oFjciODD.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-C76WsxC3.js","snippetPresets-DvPMxpX_.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-CuNQfndH.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-BVFpVUoF.js","shallow-t59Jg5Kr.js","getApiPlaygroundDisplay-C_JZ4amX.js","CodeSnippet-CLRDnx_h.js","CodeSnippets-C2myU4kc.js","Page-7TwLLapg.js","getPastedJson-B-JaVXw7.js","icon-BA-iDhH3.js","MethodPill-D4qZABFp.js","DuplicateIcon-THIDKO1O.js","createIcon-CYYJwgFd.js","DynamicMarkdown-UGQuxDKp.js","SectionHeading-jYELb23h.js","axios-vUo_bRtp.js","Markdown-DKsLa3wy.js","clsx-CefdjKz2.js","lib--scc4DXi.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-BaREnp3o.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-sgx_0XzF.js"]}