YAD
SiteDocs
SiteDocs
    • Introduction
    • Blockchains
      GET
    • List tokens
      POST
    • Liquidity sources
      GET
    • Gas prices
      GET
    • Get price for pair
      GET
    • Transaction allowance
      GET
    • Transaction approve
      GET
    • Get quote for pair
      GET
    • Get Bridge Price
      GET
    • Get Bridge Quote
      GET
    • Get Bridge Tokens
      POST

      Get Bridge Quote

      Developing
      GET
      https://api.entrswap.io/v2/bridge/quote
      Provides a quote for bridging assets between chains.

      Request

      Authorization
      Add parameter in header
      X-API-Key
      Example:
      X-API-Key: ********************
      Query Params
      fromChainId
      integer 
      required
      Source Chain ID.
      Example:
      1
      fromTokenAddress
      string 
      required
      Source Token Address.
      Example:
      0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48
      toChainId
      integer 
      required
      Destination Chain ID.
      Example:
      137
      toTokenAddress
      string 
      required
      Destination Token Address.
      Example:
      0xc2132D05D31c914a87C6611C10748AEb04B58e8F
      amount
      string 
      required
      Amount to bridge (in smallest units, e.g., Wei for ETH).
      Example:
      100000000
      takerAddress
      string 
      required
      Recipient Address.
      gasPrice
      string 
      optional
      Custom Gas Price (in smallest units).
      slippage
      integer 
      optional
      Allowed slippage (in basis points, 1-500).
      feeRecipient
      string 
      optional
      Address to receive the fee.
      sellTokenPercentageFee
      string 
      optional
      Sell token percentage fee (in basis points, max 500).
      skipValidation
      boolean 
      optional
      Skip request validation.
      Example:
      false

      Request samples

      Shell
      JavaScript
      Java
      Swift
      Go
      PHP
      Python
      HTTP
      C
      C#
      Objective-C
      Ruby
      OCaml
      Dart
      R
      Request Request Example
      Shell
      JavaScript
      Java
      Swift
      curl --location --request GET 'https://api.entrswap.io/v2/bridge/quote?fromChainId=1&fromTokenAddress=0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48&toChainId=137&toTokenAddress=0xc2132D05D31c914a87C6611C10748AEb04B58e8F&amount=100000000&takerAddress=' \
      --header 'X-API-Key;'

      Responses

      🟢200Success
      application/json
      Body
      amount_out_total
      string 
      optional
      The amount of purchase tokens in decimals of the token.
      bridge_fee
      string 
      optional
      Bridge protocol fee.
      calldata
      string 
      optional
      One of the input parameters for processing a transaction for tokens exchange.
      calldata_error
      string 
      optional
      Validation error description.
      estimate_gas_total
      string 
      optional
      The estimated amount of gas that will be used during the transaction.
      fee_percent
      number 
      optional
      Fee percentage specified in the request.
      fee_recipient
      string 
      optional
      Address to receive the fee.
      fee_amount
      string 
      optional
      The amount of sell tokens in decimals of the token, which will be taken in favor of feeRecipient. The value will be 0 if feeRecipient and sellTokenPercentageFee fields are not specified.
      from_chain_id
      integer 
      optional
      Source Token Address.
      to_chain_id
      integer 
      optional
      Destination Chain ID.
      gas_price
      string 
      optional
      Gas price value for a transaction in WEI (nAVAX for Avalanche).
      recipient
      string 
      optional
      Wallet address for receiving purchase tokens.
      token_in
      string 
      optional
      Source Token Address.
      token_out
      string 
      optional
      Destination Token Address.
      to
      string 
      optional
      Smart contract address where input parameters should be sent to.
      routes
      object (QuoteDto) 
      optional
      amount_in
      string 
      optional
      Amount of token to exchange.
      amount_out
      string 
      optional
      Expected amount of token out.
      percent
      number 
      optional
      Part of sell amount, which pass through this route.
      protocol_name
      string 
      optional
      Protocol name of the pool.
      type
      string 
      optional
      Liquidity source type.
      Example
      {
          "amount_out_total": "string",
          "bridge_fee": "string",
          "calldata": "string",
          "calldata_error": "string",
          "estimate_gas_total": "string",
          "fee_percent": 0,
          "fee_recipient": "string",
          "fee_amount": "string",
          "from_chain_id": 0,
          "to_chain_id": 0,
          "gas_price": "string",
          "recipient": "string",
          "token_in": "string",
          "token_out": "string",
          "to": "string",
          "routes": {
              "amount_in": "string",
              "amount_out": "string",
              "percent": 0,
              "protocol_name": "string",
              "type": "string"
          }
      }
      Modified at 2025-02-24 14:11:28
      Previous
      Get Bridge Price
      Next
      Get Bridge Tokens