---
updatedAt: 2026-05-14T11:27:34.000Z
---

Fetch the complete documentation index at: https://docs.blockdaemon.com/llms.txt. Use this file to discover all available pages before exploring further. Append .md to any documentation page URL to get its markdown version.

# Get DEX Swap Price

Retrieves a swap quotation for a given token pair or a series of tokens along a specified path. By providing an input amount (amountIn), the endpoint calculates and returns the estimated output amounts for each token in the swap path. This allows users to accurately gauge current market pricing and estimate the value of potential swaps on a decentralized exchange, facilitating more informed trading decisions.

> 💡 
**Compute Unit Value:** `70` (Fixed)

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "contact": {
      "name": "Blockdaemon",
      "email": "info@blockdaemon.com"
    },
    "description": "The Blockdaemon DeFi API provides a single interface to a multitude of DeFi projects and blockchains",
    "title": "Blockdaemon DeFi API",
    "version": "1.0.0",
    "x-logo": {
      "altText": "Blockdaemon logo",
      "backgroundColor": "#fafafa",
      "url": "https://storage.googleapis.com/blockdaemon-app-static-images/marketing/PNG/dark-logo.png"
    }
  },
  "externalDocs": {
    "description": "Blockdaemon DeFi documentation",
    "url": "http://www.blockdaemon.com/api/defi"
  },
  "servers": [
    {
      "url": "https://svc.blockdaemon.com"
    }
  ],
  "components": {
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-Key",
        "description": "`X-API-Key: <Token>` header must be set to authenticate API requests.You can create tokens in the \"Configure\" tab of your API access area at https://app.blockdaemon.com."
      }
    }
  },
  "tags": [
    {
      "name": "dex",
      "description": "API endpoints for operations related to decentralized exchange"
    }
  ],
  "security": [
    {
      "ApiKeyAuth": []
    }
  ],
  "paths": {
    "/defi/v1/dex/price": {
      "get": {
        "tags": [
          "dex"
        ],
        "summary": "Get DEX Swap Price",
        "description": "Retrieves a swap quotation for a given token pair or a series of tokens along a specified path. By providing an input amount (amountIn), the endpoint calculates and returns the estimated output amounts for each token in the swap path. This allows users to accurately gauge current market pricing and estimate the value of potential swaps on a decentralized exchange, facilitating more informed trading decisions.\n\n> 💡 \n**Compute Unit Value:** `70` (Fixed)",
        "operationId": "dexPrice",
        "parameters": [
          {
            "name": "dexId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "The unique ID to specify the decentralized exchange (DEX) within a particular blockchain. Find more [here](https://docs.blockdaemon.com/docs/defi-api-supported-protocols#supported-dexs-protocols).",
              "enum": [
                "1000",
                "1001",
                "1300",
                "1301",
                "1305",
                "1306",
                "1307",
                "1308",
                "1309",
                "1310",
                "1100",
                "1101",
                "1200",
                "1201",
                "2900",
                "2901",
                "2800",
                "2808",
                "2809",
                "1500",
                "1400",
                "1402",
                "2300",
                "2100",
                "2101",
                "2500",
                "2501",
                "2700",
                "2600",
                "2400",
                "2401",
                "1600",
                "1602",
                "1604",
                "1605",
                "1607",
                "1608",
                "1700",
                "1701",
                "1702",
                "1703",
                "1704",
                "1706",
                "1707",
                "2200",
                "2201",
                "2202",
                "2203",
                "2204",
                "2205",
                "2206",
                "3000",
                "3001",
                "3100",
                "3300",
                "3301",
                "3500",
                "3501",
                "3400",
                "3401",
                "3600",
                "3800",
                "3700"
              ],
              "example": "1000"
            },
            "description": "The unique ID to specify the decentralized exchange (DEX) within a particular blockchain. Find more [here](https://docs.blockdaemon.com/docs/defi-api-supported-protocols#supported-dexs-protocols)."
          },
          {
            "name": "path",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Ordered sequence of token contract addresses defining the swap route, provided as a comma-separated string. For a direct swap from token A to B: 'tokenInAddress,tokenOutAddress'. Example (WETH→USDC on Ethereum): '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2,0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48'.",
              "example": "0x514910771AF9Ca656af840dff83E8264EcF986CA,0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"
            },
            "description": "Ordered sequence of token contract addresses defining the swap route, provided as a comma-separated string. For a direct swap from token A to B: 'tokenInAddress,tokenOutAddress'. Example (WETH→USDC on Ethereum): '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2,0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48'."
          },
          {
            "name": "amountIn",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Amount of the input token to provide, specified in the token's smallest denomination (base units). Do not send human-readable decimal values. Examples: to swap 1 WETH (18 decimals), use \"1000000000000000000\"; to swap 1 USDC (6 decimals), use \"1000000\".",
              "example": "1000000000000000000"
            },
            "description": "Amount of the input token to provide, specified in the token's smallest denomination (base units). Do not send human-readable decimal values. Examples: to swap 1 WETH (18 decimals), use \"1000000000000000000\"; to swap 1 USDC (6 decimals), use \"1000000\"."
          },
          {
            "name": "vsCurrencies",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "A comma-separated list of currency symbols to convert the amount into, such as 'USD,EUR'. This parameter is optional and allows retrieving values in multiple fiat currencies.",
              "example": "usd,eur,gbp"
            },
            "description": "A comma-separated list of currency symbols to convert the amount into, such as 'USD,EUR'. This parameter is optional and allows retrieving values in multiple fiat currencies."
          },
          {
            "name": "poolFees",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Fee tier of the target liquidity pool in basis points (1 bp = 0.01%). Common values for Uniswap V3-style AMMs: 100 (0.01%), 500 (0.05%), 3000 (0.3%), 10000 (1%). If omitted, the pool yielding the highest output amount is selected automatically.",
              "example": "3000"
            },
            "description": "Fee tier of the target liquidity pool in basis points (1 bp = 0.01%). Common values for Uniswap V3-style AMMs: 100 (0.01%), 500 (0.05%), 3000 (0.3%), 10000 (1%). If omitted, the pool yielding the highest output amount is selected automatically."
          },
          {
            "name": "slippage",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Maximum acceptable slippage as a percentage of the swap value. Valid range: 0 to 100 (e.g., 1 = up to 1% slippage). Defaults to 1. The transaction reverts if the output deviates more than this percentage from the quoted price.",
              "example": "10"
            },
            "description": "Maximum acceptable slippage as a percentage of the swap value. Valid range: 0 to 100 (e.g., 1 = up to 1% slippage). Defaults to 1. The transaction reverts if the output deviates more than this percentage from the quoted price."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "number",
                      "description": "Numeric status code indicating success or failure of the API call",
                      "example": 200
                    },
                    "msg": {
                      "type": "string",
                      "description": "Human-readable message describing the API result or error"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "amountIn": {
                          "type": "string",
                          "description": "Amount of input token in a swap",
                          "example": "10000"
                        },
                        "path": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "Array of token addresses representing a swap route",
                          "example": [
                            "0x514910771AF9Ca656af840dff83E8264EcF986CA,0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"
                          ]
                        },
                        "amountsOut": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "Expected output amounts from swaps or conversions"
                        },
                        "priceImpact": {
                          "type": "object",
                          "description": "Price impact details for the swap",
                          "properties": {
                            "percentage": {
                              "type": "string",
                              "description": "Price impact as a percentage (negative indicates unfavorable slippage)",
                              "example": "-0.1368"
                            },
                            "value": {
                              "type": "string",
                              "description": "Price impact value in USD",
                              "example": "-0.116555"
                            }
                          }
                        }
                      },
                      "additionalProperties": true
                    }
                  },
                  "example": {
                    "status": 200,
                    "msg": "success",
                    "data": {
                      "amountIn": "100000000000000000",
                      "path": [
                        "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1",
                        "0xaf88d065e77c8cC2239327C5EDb3A432268e5831"
                      ],
                      "amountsOut": [
                        "100000000000000000",
                        "212386733"
                      ],
                      "prices": {
                        "usd": [
                          {
                            "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1": "2125.29"
                          },
                          {
                            "0xaf88d065e77c8cC2239327C5EDb3A432268e5831": "0.999664134155166"
                          }
                        ]
                      },
                      "priceImpact": {
                        "percentage": "0.0214",
                        "value": "0.045422"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-bd-cu": "70",
        "x-bd-cu-type": "fixed",
        "x-internal": false
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  }
}
```