Odos Smart Order Routing API

Swap tokens

Operations 6

POST /sor/swap/v3 Generate Odos Quote V3 + Assembly #
POST /sor/quote/v3 Generate Odos Quote #
POST /sor/quote/v3/zap Generate Odos Zap Quote #
POST /sor/quote/v2 Generate Odos Quote #
POST /sor/quote/v2/zap Generate Odos Zap Quote #
POST /sor/assemble Assemble Odos quote into transaction #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/odos-smart-order-routing-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

odos-smart-order-routing-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Odos Information Smart Order Routing API
  description: "<!-- ## Documentation\n\nFor more detailed documentation, visit [https://docs.odos.xyz](https://docs.odos.xyz)\n\n## Status\n\nService availability can be found on our status page: [https://status.odos.xyz](https://status.odos.xyz)\n -->"
  version: 3.0.0
  x-logo:
    url: https://assets.odos.xyz/logo_orange_transparent.png
  termsOfService: https://docs.odos.xyz/policy/terms-of-use/
servers:
- url: https://api.odos.xyz
  description: Base URL declared by the provider in apis.yml (roadmap#122).
tags:
- name: Smart Order Routing
  description: Swap tokens
  externalDocs:
    description: Quick Start Guide
    url: https://docs.odos.xyz/api/quickstart/sor
paths:
  /sor/swap/v3:
    post:
      tags:
      - Smart Order Routing
      summary: Generate Odos Quote V3 + Assembly
      description: "Quote a path for swapping between assets atomically. This can be used programmatically to check for a quoted price of a given trade without needing to wait for an assembled transaction to be created and provided. It can also be used to anonymously check quotes.\n\n## Request Body\n\n| Parameter | Description | Required |\n| --- | ------------- | --- |\n| `chainId` | Chain ID to use for quote generation. A list of valid chains can be retrieved from [`info/chains`](#/Info/get_chain_ids_info_chains_get). | Yes |\n| `inputTokens` | Input tokens and amounts for quote | Yes |\n| `outputTokens`| Output tokens and proportions for quote | Yes |\n| `gasPrice` | Gas price to use for path generation. This price directly affects the path computation. If no gas price is provided, our default price from our frontend will be used. | No |\n| `userAddr` | Address of the wallet executing the swap. If no wallet is provided, the quote cannot be turned into a path. This can be viewed as informational only. | No |\n| `slippageLimitPercent` | Slippage percent to use for checking if the path is valid. Float. Example: to set slippage to 0.5% send `0.5`. If 1% is desired, send `1`. If not provided, slippage will be set `0.3`.  | No |\n| `sourceBlacklist` | List of liquidity providers that are not to be used for the swap path. A list of all liquidity providers for a given chain can be retrieved from [`info/liquidity-sources/{chain_id}`](#/Info/liquidity_sources_info_liquidity_sources__chain_id__get) | No |\n| `sourceWhitelist` | List of liquidity providers to exclusively use for the swap path. A list of all liquidity providers for a given chain can be retrieved from [`info/liquidity-sources/{chain_id}`](#/Info/liquidity_sources_info_liquidity_sources__chain_id__get) | No |\n| `poolBlacklist` | List of pool ids that are not to be used for the swap path | No |\n| `pathVizImage` | Return a Base64 encoded SVG of path visualization image for display on web frontends | No |\n| `pathVizImageConfig` | Optional customization parameters for generated path viz image | No |\n| `disableRFQs` | Disable all exchanges that qualify as RFQs with centralized API dependencies and time-sensitive quotes or potential user address restrictions. Default is true. | No |\n| `referralCode` | Code for registering your usage with Odos and receiving partner specific benefits. [Referral Code Documentation](https://docs.odos.xyz/product/sor/v2/referral-code) | No |\n| `compact` | Use Odos V2 compact call data for transaction, defaults to `true` | No |\n| `likeAsset` | If input and output tokens are all the same asset type (ex: USD stable coins), only route through like assets for decreased slippage. Defaults to `false` | No |\n| `simple` | If a less complicated quote and/or a quicker response time is desired, this flag can be set. Defaults to `false` | No |\n\n### inputTokens\n\n| Parameter | Description | Required |\n| --- | --- | --- |\n| `tokenAddress` | Address of the token to swap from. This should be a [checksummed address](https://eips.ethereum.org/EIPS/eip-55). | Yes |\n| `amount` | Amount of the token in fixed precision. String | Yes |\n\n\n### outputTokens\n\n| Parameter | Description | Required |\n| --- | --- | --- |\n| `tokenAddress` | Address of the token to swap to. This should be a [checksummed address](https://eips.ethereum.org/EIPS/eip-55). | Yes |\n| `proportion` | Percent of token to output. For a single swap, this is set to 1. Float. | Yes |\n\n### pathVizImageConfig\n\n| Parameter | Description | Required |\n| --- | ------------- | --- |\n| `linkColors` | List of hex codes to generate color spectrum for liquidity sources in path visualization | No |\n| `nodeColor` | Hex code for setting the color of token nodes in path visualization | No |\n| `nodeTextColor` | Hex code to set the color of token symbol text on token nodes | No |\n| `legendTextColor` | Hex code to set the color of the visualization legend text | No |\n| `width` | Set a custom width proportion for the visualization | No |\n| `height` | Set a custom height proportion for the visualization | No |\n\n#### Example Full Config Response:\n\n```json\n{\n  \"linkColors\": [\"#123456\"],\n  \"nodeColor\": \"#1BEEF1\",\n  \"nodeTextColor\": \"#FFFFFF\",\n  \"legendTextColor\": \"#000000\",\n  \"width\": 1200,\n  \"height\": 800\n}\n```\n\n#### Basic integration:\n\nSet the `src` attribute of an `<img />` HTML tag to the `pathVizImage` text field of the quote response\n\n\n## Response Body\n\n| Parameter | Description |\n| --- | --- |\n| `deprecated` | If the endpoint or any part of the request is deprecated, this field will be populated with a message. This field is omitted if there is nothing to notify on. |\n| `pathId` | ID of the path used for asking for an assembled quote |\n| `blockNumber` | Block number the quote was generated for |\n| `gasEstimate` | A very naive gas estimate |\n| `gasEstimateValue` | USD Value of the `gasEstimate` |\n| `dataGasEstimate` | Used for Layer 2 chains |\n| `gweiPerGas` | Amount of gWei per gas unit |\n| `inTokens` | A list of token addresses and amounts |\n| `inAmounts` | A list of input token amounts |\n| `outTokens` | A list of token addresses and amounts |\n| `outAmounts` | A list of output token amounts |\n| `netOutValue` | USD value of the sum of the output tokens after gas |\n| `outValues` | A list of the output values of the given output tokens. In the same order as the `outputTokens` list |\n| `priceImpact` | Percent decrease in the realized price of the path from the initial price of the path before the swap is executed. |\n| `percentDiff` | Percent difference between the value of all input tokens and the value of all output tokens (as determined by the Odos pricing service) |\n| `partnerFeePercent` | Percent fee taken by partner referral code given. Fee is already deducted from quote |\n| `pathVizImage` | Base64 encoded image ready to be used within a UI |"
      operationId: swap_v3_sor_swap_v3_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SwapRequestV3'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SwapResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /sor/quote/v3:
    post:
      tags:
      - Smart Order Routing
      summary: Generate Odos Quote
      description: "Quote a path for swapping between assets atomically. This can be used programmatically to check for a quoted price of a given trade without needing to wait for an assembled transaction to be created and provided. It can also be used to anonymously check quotes.\n\n## Request Body\n\n| Parameter | Description | Required |\n| --- | ------------- | --- |\n| `chainId` | Chain ID to use for quote generation. A list of valid chains can be retrieved from [`info/chains`](#/Info/get_chain_ids_info_chains_get). | Yes |\n| `inputTokens` | Input tokens and amounts for quote | Yes |\n| `outputTokens`| Output tokens and proportions for quote | Yes |\n| `gasPrice` | Gas price to use for path generation. This price directly affects the path computation. If no gas price is provided, our default price from our frontend will be used. | No |\n| `userAddr` | Address of the wallet executing the swap. If no wallet is provided, the quote cannot be turned into a path. This can be viewed as informational only. | No |\n| `slippageLimitPercent` | Slippage percent to use for checking if the path is valid. Float. Example: to set slippage to 0.5% send `0.5`. If 1% is desired, send `1`. If not provided, slippage will be set `0.3`.  | No |\n| `sourceBlacklist` | List of liquidity providers that are not to be used for the swap path. A list of all liquidity providers for a given chain can be retrieved from [`info/liquidity-sources/{chain_id}`](#/Info/liquidity_sources_info_liquidity_sources__chain_id__get) | No |\n| `sourceWhitelist` | List of liquidity providers to exclusively use for the swap path. A list of all liquidity providers for a given chain can be retrieved from [`info/liquidity-sources/{chain_id}`](#/Info/liquidity_sources_info_liquidity_sources__chain_id__get) | No |\n| `poolBlacklist` | List of pool ids that are not to be used for the swap path | No |\n| `pathVizImage` | Return a Base64 encoded SVG of path visualization image for display on web frontends | No |\n| `pathVizImageConfig` | Optional customization parameters for generated path viz image | No |\n| `disableRFQs` | Disable all exchanges that qualify as RFQs with centralized API dependencies and time-sensitive quotes or potential user address restrictions. Default is true. | No |\n| `referralCode` | Code for registering your usage with Odos and receiving partner specific benefits. [Referral Code Documentation](https://docs.odos.xyz/product/sor/v2/referral-code) | No |\n| `compact` | Use Odos V2 compact call data for transaction, defaults to `true` | No |\n| `likeAsset` | If input and output tokens are all the same asset type (ex: USD stable coins), only route through like assets for decreased slippage. Defaults to `false` | No |\n| `simple` | If a less complicated quote and/or a quicker response time is desired, this flag can be set. Defaults to `false` | No |\n\n### inputTokens\n\n| Parameter | Description | Required |\n| --- | --- | --- |\n| `tokenAddress` | Address of the token to swap from. This should be a [checksummed address](https://eips.ethereum.org/EIPS/eip-55). | Yes |\n| `amount` | Amount of the token in fixed precision. String | Yes |\n\n\n### outputTokens\n\n| Parameter | Description | Required |\n| --- | --- | --- |\n| `tokenAddress` | Address of the token to swap to. This should be a [checksummed address](https://eips.ethereum.org/EIPS/eip-55). | Yes |\n| `proportion` | Percent of token to output. For a single swap, this is set to 1. Float. | Yes |\n\n### pathVizImageConfig\n\n| Parameter | Description | Required |\n| --- | ------------- | --- |\n| `linkColors` | List of hex codes to generate color spectrum for liquidity sources in path visualization | No |\n| `nodeColor` | Hex code for setting the color of token nodes in path visualization | No |\n| `nodeTextColor` | Hex code to set the color of token symbol text on token nodes | No |\n| `legendTextColor` | Hex code to set the color of the visualization legend text | No |\n| `width` | Set a custom width proportion for the visualization | No |\n| `height` | Set a custom height proportion for the visualization | No |\n\n#### Example Full Config Response:\n\n```json\n{\n  \"linkColors\": [\"#123456\"],\n  \"nodeColor\": \"#1BEEF1\",\n  \"nodeTextColor\": \"#FFFFFF\",\n  \"legendTextColor\": \"#000000\",\n  \"width\": 1200,\n  \"height\": 800\n}\n```\n\n#### Basic integration:\n\nSet the `src` attribute of an `<img />` HTML tag to the `pathVizImage` text field of the quote response\n\n\n## Response Body\n\n| Parameter | Description |\n| --- | --- |\n| `deprecated` | If the endpoint or any part of the request is deprecated, this field will be populated with a message. This field is omitted if there is nothing to notify on. |\n| `pathId` | ID of the path used for asking for an assembled quote |\n| `blockNumber` | Block number the quote was generated for |\n| `gasEstimate` | A very naive gas estimate |\n| `gasEstimateValue` | USD Value of the `gasEstimate` |\n| `dataGasEstimate` | Used for Layer 2 chains |\n| `gweiPerGas` | Amount of gWei per gas unit |\n| `inTokens` | A list of token addresses and amounts |\n| `inAmounts` | A list of input token amounts |\n| `outTokens` | A list of token addresses and amounts |\n| `outAmounts` | A list of output token amounts |\n| `netOutValue` | USD value of the sum of the output tokens after gas |\n| `outValues` | A list of the output values of the given output tokens. In the same order as the `outputTokens` list |\n| `priceImpact` | Percent decrease in the realized price of the path from the initial price of the path before the swap is executed. |\n| `percentDiff` | Percent difference between the value of all input tokens and the value of all output tokens (as determined by the Odos pricing service) |\n| `partnerFeePercent` | Percent fee taken by partner referral code given. Fee is already deducted from quote |\n| `pathVizImage` | Base64 encoded image ready to be used within a UI |"
      operationId: quote_v3_sor_quote_v3_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PathRequestV3'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QuoteResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /sor/quote/v3/zap:
    post:
      tags:
      - Smart Order Routing
      summary: Generate Odos Zap Quote
      description: "Quote a path for zapping into or out of liquidity positions atomically. Input tokens can be both regular ERC-20 tokens and liquidity pool tokens. Outputs can be regular ERC-20 tokens or liquidity pool tokens.\n\n## Request Body\n\n| Parameter | Description | Required |\n| --- | ------------- | --- |\n| `chainId` | Chain ID to use for quote generation. A list of valid chains can be retrieved from [`info/chains`](#/Info/get_chain_ids_info_chains_get). | Yes |\n| `inputTokens` | Input tokens and amounts for quote | Yes |\n| `outputTokens`| Output tokens and proportions for quote | Yes |\n| `gasPrice` | Gas price to use for path generation. This price directly affects the path computation. If no gas price is provided, our default price from our frontend will be used. | No |\n| `userAddr` | Address of the wallet executing the swap. If no wallet is provided, the quote cannot be turned into a path. This can be viewed as informational only. | No |\n| `slippageLimitPercent` | Slippage percent to use for checking if the path is valid. Float. Example: to set slippage to 0.5% send `0.5`. If 1% is desired, send `1`. If not provided, slippage will be set `0.3`.  | No |\n| `sourceBlacklist` | List of liquidity providers that are not to be used for the swap path. A list of all liquidity providers for a given chain can be retrieved from [`info/liquidity-sources/{chain_id}`](#/Info/liquidity_sources_info_liquidity_sources__chain_id__get) | No |\n| `sourceWhitelist` | List of liquidity providers to exclusively use for the swap path. A list of all liquidity providers for a given chain can be retrieved from [`info/liquidity-sources/{chain_id}`](#/Info/liquidity_sources_info_liquidity_sources__chain_id__get) | No |\n| `poolBlacklist` | List of pool ids that are not to be used for the swap path | No |\n| `pathVizImage` | Return a Base64 encoded SVG of path visualization image for display on web frontends | No |\n| `pathVizImageConfig` | Optional customization parameters for generated path viz image | No |\n| `disableRFQs` | Disable all exchanges that qualify as RFQs with centralized API dependencies and time-sensitive quotes or potential user address restrictions. Default is true. | No |\n| `referralCode` | Code for registering your usage with Odos and receiving partner specific benefits. [Referral Code Documentation](https://docs.odos.xyz/product/sor/v2/referral-code) | No |\n| `compact` | Use Odos V2 compact call data for transaction, defaults to `true` | No |\n| `likeAsset` | If input and output tokens are all the same asset type (ex: USD stable coins), only route through like assets for decreased slippage. Defaults to `false` | No |\n| `simple` | If a less complicated quote and/or a quicker response time is desired, this flag can be set. Defaults to `false` | No |\n\n### inputTokens\n\n| Parameter | Description | Required |\n| --- | --- | --- |\n| `tokenAddress` | Address of the token to swap from. This should be a [checksummed address](https://eips.ethereum.org/EIPS/eip-55). | Yes |\n| `amount` | Amount of the token in fixed precision. String | Yes |\n\n\n### outputTokens\n\n| Parameter | Description | Required |\n| --- | --- | --- |\n| `tokenAddress` | Address of the token to swap to. This should be a [checksummed address](https://eips.ethereum.org/EIPS/eip-55). | Yes |\n| `proportion` | Percent of token to output. For a single swap, this is set to 1. Float. | Yes |\n\n### pathVizImageConfig\n\n| Parameter | Description | Required |\n| --- | ------------- | --- |\n| `linkColors` | List of hex codes to generate color spectrum for liquidity sources in path visualization | No |\n| `nodeColor` | Hex code for setting the color of token nodes in path visualization | No |\n| `nodeTextColor` | Hex code to set the color of token symbol text on token nodes | No |\n| `legendTextColor` | Hex code to set the color of the visualization legend text | No |\n| `width` | Set a custom width proportion for the visualization | No |\n| `height` | Set a custom height proportion for the visualization | No |\n\n#### Example Full Config Response:\n\n```json\n{\n  \"linkColors\": [\"#123456\"],\n  \"nodeColor\": \"#1BEEF1\",\n  \"nodeTextColor\": \"#FFFFFF\",\n  \"legendTextColor\": \"#000000\",\n  \"width\": 1200,\n  \"height\": 800\n}\n```\n\n#### Basic integration:\n\nSet the `src` attribute of an `<img />` HTML tag to the `pathVizImage` text field of the quote response\n\n\n## Response Body\n\n| Parameter | Description |\n| --- | --- |\n| `deprecated` | If the endpoint or any part of the request is deprecated, this field will be populated with a message. This field is omitted if there is nothing to notify on. |\n| `pathId` | ID of the path used for asking for an assembled quote |\n| `blockNumber` | Block number the quote was generated for |\n| `gasEstimate` | A very naive gas estimate |\n| `gasEstimateValue` | USD Value of the `gasEstimate` |\n| `dataGasEstimate` | Used for Layer 2 chains |\n| `gweiPerGas` | Amount of gWei per gas unit |\n| `inTokens` | A list of token addresses and amounts |\n| `inAmounts` | A list of input token amounts |\n| `outTokens` | A list of token addresses and amounts |\n| `outAmounts` | A list of output token amounts |\n| `netOutValue` | USD value of the sum of the output tokens after gas |\n| `outValues` | A list of the output values of the given output tokens. In the same order as the `outputTokens` list |\n| `priceImpact` | Percent decrease in the realized price of the path from the initial price of the path before the swap is executed. |\n| `percentDiff` | Percent difference between the value of all input tokens and the value of all output tokens (as determined by the Odos pricing service) |\n| `partnerFeePercent` | Percent fee taken by partner referral code given. Fee is already deducted from quote |\n| `pathVizImage` | Base64 encoded image ready to be used within a UI |"
      operationId: quote_zap_v3_sor_quote_v3_zap_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PathRequestV3'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QuoteResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /sor/quote/v2:
    post:
      tags:
      - Smart Order Routing
      summary: Generate Odos Quote
      description: "Quote a path for swapping between assets atomically. This can be used programmatically to check for a quoted price of a given trade without needing to wait for an assembled transaction to be created and provided. It can also be used to anonymously check quotes.\n\n## Request Body\n\n| Parameter | Description | Required |\n| --- | ------------- | --- |\n| `chainId` | Chain ID to use for quote generation. A list of valid chains can be retrieved from [`info/chains`](#/Info/get_chain_ids_info_chains_get). | Yes |\n| `inputTokens` | Input tokens and amounts for quote | Yes |\n| `outputTokens`| Output tokens and proportions for quote | Yes |\n| `gasPrice` | Gas price to use for path generation. This price directly affects the path computation. If no gas price is provided, our default price from our frontend will be used. | No |\n| `userAddr` | Address of the wallet executing the swap. If no wallet is provided, the quote cannot be turned into a path. This can be viewed as informational only. | No |\n| `slippageLimitPercent` | Slippage percent to use for checking if the path is valid. Float. Example: to set slippage to 0.5% send `0.5`. If 1% is desired, send `1`. If not provided, slippage will be set `0.3`.  | No |\n| `sourceBlacklist` | List of liquidity providers that are not to be used for the swap path. A list of all liquidity providers for a given chain can be retrieved from [`info/liquidity-sources/{chain_id}`](#/Info/liquidity_sources_info_liquidity_sources__chain_id__get) | No |\n| `sourceWhitelist` | List of liquidity providers to exclusively use for the swap path. A list of all liquidity providers for a given chain can be retrieved from [`info/liquidity-sources/{chain_id}`](#/Info/liquidity_sources_info_liquidity_sources__chain_id__get) | No |\n| `poolBlacklist` | List of pool ids that are not to be used for the swap path | No |\n| `pathVizImage` | Return a Base64 encoded SVG of path visualization image for display on web frontends | No |\n| `pathVizImageConfig` | Optional customization parameters for generated path viz image | No |\n| `disableRFQs` | Disable all exchanges that qualify as RFQs with centralized API dependencies and time-sensitive quotes or potential user address restrictions. Default is true. | No |\n| `referralCode` | Code for registering your usage with Odos and receiving partner specific benefits. [Referral Code Documentation](https://docs.odos.xyz/product/sor/v2/referral-code) | No |\n| `compact` | Use Odos V2 compact call data for transaction, defaults to `true` | No |\n| `likeAsset` | If input and output tokens are all the same asset type (ex: USD stable coins), only route through like assets for decreased slippage. Defaults to `false` | No |\n| `simple` | If a less complicated quote and/or a quicker response time is desired, this flag can be set. Defaults to `false` | No |\n\n### inputTokens\n\n| Parameter | Description | Required |\n| --- | --- | --- |\n| `tokenAddress` | Address of the token to swap from. This should be a [checksummed address](https://eips.ethereum.org/EIPS/eip-55). | Yes |\n| `amount` | Amount of the token in fixed precision. String | Yes |\n\n\n### outputTokens\n\n| Parameter | Description | Required |\n| --- | --- | --- |\n| `tokenAddress` | Address of the token to swap to. This should be a [checksummed address](https://eips.ethereum.org/EIPS/eip-55). | Yes |\n| `proportion` | Percent of token to output. For a single swap, this is set to 1. Float. | Yes |\n\n### pathVizImageConfig\n\n| Parameter | Description | Required |\n| --- | ------------- | --- |\n| `linkColors` | List of hex codes to generate color spectrum for liquidity sources in path visualization | No |\n| `nodeColor` | Hex code for setting the color of token nodes in path visualization | No |\n| `nodeTextColor` | Hex code to set the color of token symbol text on token nodes | No |\n| `legendTextColor` | Hex code to set the color of the visualization legend text | No |\n| `width` | Set a custom width proportion for the visualization | No |\n| `height` | Set a custom height proportion for the visualization | No |\n\n#### Example Full Config Response:\n\n```json\n{\n  \"linkColors\": [\"#123456\"],\n  \"nodeColor\": \"#1BEEF1\",\n  \"nodeTextColor\": \"#FFFFFF\",\n  \"legendTextColor\": \"#000000\",\n  \"width\": 1200,\n  \"height\": 800\n}\n```\n\n#### Basic integration:\n\nSet the `src` attribute of an `<img />` HTML tag to the `pathVizImage` text field of the quote response\n\n\n## Response Body\n\n| Parameter | Description |\n| --- | --- |\n| `deprecated` | If the endpoint or any part of the request is deprecated, this field will be populated with a message. This field is omitted if there is nothing to notify on. |\n| `pathId` | ID of the path used for asking for an assembled quote |\n| `blockNumber` | Block number the quote was generated for |\n| `gasEstimate` | A very naive gas estimate |\n| `gasEstimateValue` | USD Value of the `gasEstimate` |\n| `dataGasEstimate` | Used for Layer 2 chains |\n| `gweiPerGas` | Amount of gWei per gas unit |\n| `inTokens` | A list of token addresses and amounts |\n| `inAmounts` | A list of input token amounts |\n| `outTokens` | A list of token addresses and amounts |\n| `outAmounts` | A list of output token amounts |\n| `netOutValue` | USD value of the sum of the output tokens after gas |\n| `outValues` | A list of the output values of the given output tokens. In the same order as the `outputTokens` list |\n| `priceImpact` | Percent decrease in the realized price of the path from the initial price of the path before the swap is executed. |\n| `percentDiff` | Percent difference between the value of all input tokens and the value of all output tokens (as determined by the Odos pricing service) |\n| `partnerFeePercent` | Percent fee taken by partner referral code given. Fee is already deducted from quote |\n| `pathVizImage` | Base64 encoded image ready to be used within a UI |"
      operationId: quote_sor_quote_v2_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PathRequestV2'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QuoteResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /sor/quote/v2/zap:
    post:
      tags:
      - Smart Order Routing
      summary: Generate Odos Zap Quote
      description: "Quote a path for zapping into or out of liquidity positions atomically. Input tokens can be both regular ERC-20 tokens and liquidity pool tokens. Outputs can be regular ERC-20 tokens or liquidity pool tokens.\n\n## Request Body\n\n| Parameter | Description | Required |\n| --- | ------------- | --- |\n| `chainId` | Chain ID to use for quote generation. A list of valid chains can be retrieved from [`info/chains`](#/Info/get_chain_ids_info_chains_get). | Yes |\n| `inputTokens` | Input tokens and amounts for quote | Yes |\n| `outputTokens`| Output tokens and proportions for quote | Yes |\n| `gasPrice` | Gas price to use for path generation. This price directly affects the path computation. If no gas price is provided, our default price from our frontend will be used. | No |\n| `userAddr` | Address of the wallet executing the swap. If no wallet is provided, the quote cannot be turned into a path. This can be viewed as informational only. | No |\n| `slippageLimitPercent` | Slippage percent to use for checking if the path is valid. Float. Example: to set slippage to 0.5% send `0.5`. If 1% is desired, send `1`. If not provided, slippage will be set `0.3`.  | No |\n| `sourceBlacklist` | List of liquidity providers that are not to be used for the swap path. A list of all liquidity providers for a given chain can be retrieved from [`info/liquidity-sources/{chain_id}`](#/Info/liquidity_sources_info_liquidity_sources__chain_id__get) | No |\n| `sourceWhitelist` | List of liquidity providers to exclusively use for the swap path. A list of all liquidity providers for a given chain can be retrieved from [`info/liquidity-sources/{chain_id}`](#/Info/liquidity_sources_info_liquidity_sources__chain_id__get) | No |\n| `poolBlacklist` | List of pool ids that are not to be used for the swap path | No |\n| `pathVizImage` | Return a Base64 encoded SVG of path visualization image for display on web frontends | No |\n| `pathVizImageConfig` | Optional customization parameters for generated path viz image | No |\n| `disableRFQs` | Disable all exchanges that qualify as RFQs with centralized API dependencies and time-sensitive quotes or potential user address restrictions. Default is true. | No |\n| `referralCode` | Code for registering your usage with Odos and receiving partner specific benefits. [Referral Code Documentation](https://docs.odos.xyz/product/sor/v2/referral-code) | No |\n| `compact` | Use Odos V2 compact call data for transaction, defaults to `true` | No |\n| `likeAsset` | If input and output tokens are all the same asset type (ex: USD stable coins), only route through like assets for decreased slippage. Defaults to `false` | No |\n| `simple` | If a less complicated quote and/or a quicker response time is desired, this flag can be set. Defaults to `false` | No |\n\n### inputTokens\n\n| Parameter | Description | Required |\n| --- | --- | --- |\n| `tokenAddress` | Address of the token to swap from. This should be a [checksummed address](https://eips.ethereum.org/EIPS/eip-55). | Yes |\n| `amount` | Amount of the token in fixed precision. String | Yes |\n\n\n### outputTokens\n\n| Parameter | Description | Required |\n| --- | --- | --- |\n| `tokenAddress` | Address of the token to swap to. This should be a [checksummed address](https://eips.ethereum.org/EIPS/eip-55). | Yes |\n| `proportion` | Percent of token to output. For a single swap, this is set to 1. Float. | Yes |\n\n### pathVizImageConfig\n\n| Parameter | Description | Required |\n| --- | ------------- | --- |\n| `linkColors` | List of hex codes to generate color spectrum for liquidity sources in path visualization | No |\n| `nodeColor` | Hex code for setting the color of token nodes in path visualization | No |\n| `nodeTextColor` | Hex code to set the color of token symbol text on token nodes | No |\n| `legendTextColor` | Hex code to set the color of the visualization legend text | No |\n| `width` | Set a custom width proportion for the visualization | No |\n| `height` | Set a custom height proportion for the visualization | No |\n\n#### Example Full Config Response:\n\n```json\n{\n  \"linkColors\": [\"#123456\"],\n  \"nodeColor\": \"#1BEEF1\",\n  \"nodeTextColor\": \"#FFFFFF\",\n  \"legendTextColor\": \"#000000\",\n  \"width\": 1200,\n  \"height\": 800\n}\n```\n\n#### Basic integration:\n\nSet the `src` attribute of an `<img />` HTML tag to the `pathVizImage` text field of the quote response\n\n\n## Response Body\n\n| Parameter | Description |\n| --- | --- |\n| `deprecated` | If the endpoint or any part of the request is deprecated, this field will be populated with a message. This field is omitted if there is nothing to notify on. |\n| `pathId` | ID of the path used for asking for an assembled quote |\n| `blockNumber` | Block number the quote was generated for |\n| `gasEstimate` | A very naive gas estimate |\n| `gasEstimateValue` | USD Value of the `gasEstimate` |\n| `dataGasEstimate` | Used for Layer 2 chains |\n| `gweiPerGas` | Amount of gWei per gas unit |\n| `inTokens` | A list of token addresses and amounts |\n| `inAmounts` | A list of input token amounts |\n| `outTokens` | A list of token addresses and amounts |\n| `outAmounts` | A list of output token amounts |\n| `netOutValue` | USD value of the sum of the output tokens after gas |\n| `o

# --- truncated at 32 KB (65 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/odos/refs/heads/main/openapi/odos-smart-order-routing-api-openapi.yml