Get DEX Quote API

Returns an estimated swap value, including minimum and maximum limits. This information is useful for applications facilitating token swaps.

Endpoint: GET/dexQuote

Response: A JSON object containing dexQuote details.

Parameters:

Field
Type
Description

amount

string

Id of the token from which the swap is initiated (Example: 100)

tokenIdFrom

string

Id of the token from which the swap is initiated (Example: 6689b73ec90e45f3b3e51553)

tokenIdTo

string

Id of the token to which the swap is directed (Example: 6689b73ec90e45f3b3e51558)

Example Request:

GET/dexQuote?amount=100&tokenIdFrom=6689b73ec90e45f3b3e51553&tokenIdTo=6689b73ec90e45f3b3e51558

Example Response:

[
  {
    "swap": "sw",
    "quoteId": "66fa78f90bf604337992cba9",
    "amountOut": 16.76282693,
    "amountOutUsd": 2589.019,
    "duration": 1,
    "gas": 5978057870193888,
    "feeUsd": 4.853,
    "path": [
      "debridge"
    ],
    "raw": {
      "duration": 1,
      "gas": "5978057870193888",
      "quote": {
        "integration": "debridge",
        "type": "swap",
        "bridgeFee": "31425535",
        "bridgeFeeInNativeToken": "1000000000000000",
        "amount": "16762826930",
        "decimals": 9,
        "amountUSD": "2589.019",
        "bridgeFeeUSD": "4.853",
        "bridgeFeeInNativeTokenUSD": "2.606",
        "fees": [
          {
            "type": "bridge",
            "amount": "31425535",
            "amountUSD": "4.853",
            "chainSlug": "solana",
            "tokenSymbol": "SOL",
            "tokenAddress": "11111111111111111111111111111111",
            "decimals": 9,
            "deductedFromSourceToken": true
          },
          {
            "type": "bridge",
            "amount": "1000000000000000",
            "amountUSD": "2.606",
            "chainSlug": "ethereum",
            "tokenSymbol": "ETH",
            "tokenAddress": "0x0000000000000000000000000000000000000000",
            "decimals": 18,
            "deductedFromSourceToken": false
          },
          {
            "type": "gas",
            "amount": "5978057870193888",
            "amountUSD": "15.582",
            "chainSlug": "ethereum",
            "tokenSymbol": "ETH",
            "tokenAddress": "0x0000000000000000000000000000000000000000",
            "decimals": 18,
            "deductedFromSourceToken": false
          },
          {
            "type": "partner",
            "amount": "2000000000000000",
            "amountUSD": "5.213",
            "chainSlug": "ethereum",
            "tokenSymbol": "ETH",
            "tokenAddress": "0x0000000000000000000000000000000000000000",
            "decimals": 18,
            "deductedFromSourceToken": true
          }
        ]
      },
      "route": [
        {
          "bridge": "debridge",
          "bridgeTokenAddress": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
          "steps": [
            "allowance",
            "approve",
            "send"
          ],
          "name": "USDC",
          "part": 100
        }
      ],
      "distribution": {
        "debridge": 1
      },
      "gasUSD": "15.582"
    }
  }
]

Response Fields:

Field
Type
Description

swap

string

Swap identifier

quoteId

string

Unique identifier for the quote

amountOut

number

Quoted amount out

amountOutUsd

number

Quoted amount out in USD

duration

number

Estimated duration of the swap in minutes

gas

number

Gas fee for the swap transaction

feeUsd

number

Fee amount in USD

path

array

Path taken for the swap

raw

object

Raw transaction data including gas and duration. See RouteDTO

Last updated