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

      Transaction allowance

      GET
      https://api.entrswap.io/v1/{chainID}/transaction/allowance
      Checks how many of the user's tokens the exchange smart contract has access to.

      Request

      Authorization
      Add parameter in header
      X-API-Key
      Example:
      X-API-Key: ********************
      Path Params
      chainID
      enum<integer> 
      required
      The blockchain ID.
      (Supported list: v1/platforms)
      Allowed values:
      110561372504216143114
      Default:
      1
      Example:
      1
      Query Params
      tokenAddress
      string 
      required
      Smart contract address of the token for which access is being checked.
      Default:
      0xdAC17F958D2ee523a2206206994597C13D831ec7
      walletAddress
      string 
      required
      Wallet of the user for which access is being checked.
      Default:
      0x06723241Ed93A57a0227207c5ACd8EcAafc6735c

      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/v1/1/transaction/allowance?tokenAddress&walletAddress' \
      --header 'X-API-Key;'

      Responses

      🟢200OK
      application/json
      Body
      remaining
      string 
      optional
      The number of tokens in decimals of the token the smart contract has access to.
      Example:
      123
      Example
      {
          "remaining": "123"
      }
      Modified at 2024-05-21 13:56:22
      Previous
      Get price for pair
      Next
      Transaction approve