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

    Introduction

    Entr DEX API#

    Key features#

    7 supported blockchains
    Ethereum;
    Optimistic Ethereum;
    BNB Smart Chain;
    Polygon;
    Fantom;
    Avalanche;
    Arbitrum.
    Over 100 connected liquidity sources and 3600 tokens available for exchange.
    Full cycle of preparing a transaction for tokens exchange in the network.

    Getting Started#

    1.
    URL for API: https://api.entrswap.io/.
    2.
    Kindly note that without an API access key, the number of requests per second is limited, it is suitable for testing and development, but not for production capacity.
    3.
    To obtain the key, please get in touch with info@entrswap.io.
    4.
    The given key must be added to the header of each request, parameter {X-API-Key: key}.

    Flow Example#

    1.
    API — provides a list of supported blockchains upon v1/platforms request.
    2.
    GUI — the user selects a network the exchange is made within. For example, Ethereum, ChainID=1.
    3.
    API — provides a list of blockchain tokens upon request /v2/tokens/list.
    4.
    API (optional) – provides calculated gas price values in GWEI (nAVAX for Avalanche) upon /v1/{chainID}/gasprices request. The gas price values are returned for fast, medium and low transaction time.
    5.
    GUI — the user selects the exchange tokens and the sale amount. For example, 1000 USDT to WBTC.
    6.
    GUI — the user sets the slippage tolerance value as a percentage. The recommended value is 1%.
    7.
    GUI (optional) — the user selects the gas price value from pt 4.
    8.
    API — endpoint /v1/{chainID}/price provides the number of tokens that the user will receive for the purchase.
    9.
    GUI — the user connects the wallet.
    10.
    API — endpoint /v1/{chainID}/transaction/allowance returns the amount of tokens that the exchange smart contract has access to (not required for native coins).
    11.
    GUI — if the value of the sale is greater than the value from pt 10, the user is prompted to provide access for the tokens exchange (otherwise the exchange transaction will not be processed).
    12.
    API — endpoint /v1/{chainID}/transaction/approve returns the input parameters (calldata) for a transaction to provide access to tokens, and the address of the contract where the transaction should be sent to.
    13.
    GUI — generates an unsigned transaction based on the data from pt 12 and sends it to the user's connected wallet.
    14.
    WALLET — the user confirms the operation in the wallet, and the wallet then signs the transaction and sends it to the blockchain.
    15.
    GUI — after successful confirmation of the transaction from pt 14, the user is offered a button to exchange the selected tokens.
    16.
    API — endpoint /v1/{chainID}/quote provides the number of the tokens purchased and transaction input parameters.
    17.
    GUI — generates an unsigned transaction based on the data from pt 16 and sends it to the user's connected wallet.
    18.
    WALLET — the user confirms the operation in the wallet, and the wallet then signs the transaction and sends it to the blockchain.
    Modified at 2024-06-01 08:50:15
    Next
    Blockchains