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
    • Schemas
      • Schemas
        • types.Protocols
        • sources.Source
        • api.BridgedToken
        • BridgeRoutes
        • api.TokensResponse
        • api.TokenFilter
        • api.Token
        • api.SourcesAPIWrapped
        • api.SourceFilter
        • api.PlatformsAPIWrapped
        • api.PlatformsAPI
        • api.OnChainQuoteResponseAPI
        • api.OnChainPriceResponseAPI
        • api.ListTokenRequest
        • api.GasPriceInfoAPIWrapped
        • api.GasPriceAPIWrapped
        • api.FeeResp
        • api.ApproveResponse
        • api.AllowanceResponse
        • BridgePrice
        • BridgeQuote
        • QuoteDto
    SiteDocs
    SiteDocs

      Transaction approve

      GET
      https://api.entrswap.io/v1/{chainID}/transaction/approve
      Generates transaction input parameters to provide access to the user's tokens for the exchange smart contract.

      Request

      Authorization
      Add parameter in header
      X-API-Key
      Example:
      X-API-Key: ********************
      Path Params

      Query Params

      Request Code 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/approve?tokenAddress=0xdAC17F958D2ee523a2206206994597C13D831ec7' \
      --header 'X-API-Key: <api-key>'

      Responses

      🟢200OK
      application/json
      Body

      Example
      {
          "calldata": "0x095ea7b30000000000000000000000001aaad07998466cd3eb8140827dddb37570be1e63000000000000000000000000000000000000000000000000000000174876e800",
          "gas_price": "123",
          "to": "0x1aaad07998466cd3eb8140827dddb37570be1e63",
          "estimate_gas": "123"
      }
      🟠400Bad Request
      🔴500Internal Server Error
      Modified at 2024-05-21 13:57:12
      Previous
      Transaction allowance
      Next
      Get quote for pair