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

      Gas prices

      GET
      https://api.entrswap.io/v1/{chainID}/gasprices
      Provides calculated gas price values in GWEI (nAVAX for Avalanche).
      Returns all necessary parameters for transactions with gas calculation according to the EIP-1559 model, as well as for transactions with gas calculation according to the legacy model.

      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

      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/gasprices' \
      --header 'X-API-Key;'

      Responses

      🟢200OK
      application/json
      Body
      baseFee
      string 
      optional
      Base fee for the next block in blockchain.
      (The parameter for transactions with gas calculation according to the EIP-1559.)
      Example:
      20.05
      low
      string 
      optional
      The gas price at which the transaction is most likely to be accepted not earlier than after block 5. There is a risk of a long transaction confirmation.
      (The parameter for transactions with gas calculation according to the legacy model.)
      Example:
      21.01
      lowInfo
      object (api.GasPriceInfoAPIWrapped) 
      optional
      price
      string 
      optional
      The gas price. (The parameter for transactions with gas calculation according to the legacy model.)
      Example:
      21.01
      maxPriorityFeePerGas
      string 
      optional
      Max Priority Fee Per Gas — tips for miners. (The parameter for transactions with gas calculation according to the EIP-1559.)"
      Example:
      0.1
      maxFeePerGas
      string 
      optional
      Max Fee Per Gas. (The parameter for transactions with gas calculation according to the EIP-1559.)
      Example:
      22.01
      medium
      string 
      optional
      The gas price at which the transaction is most likely to be accepted in the next 2-3 block.
      (The parameter for transactions with gas calculation according to the legacy model.)
      Example:
      22.02
      mediumInfo
      object (api.GasPriceInfoAPIWrapped) 
      optional
      high
      string 
      optional
      The gas price at which the transaction is most likely to be accepted in the next block.
      (The parameter for transactions with gas calculation according to the legacy model.)
      Example:
      23.03
      highInfo
      object (api.GasPriceInfoAPIWrapped) 
      optional
      Example
      {
          "baseFee": "20.05",
          "low": "21.01",
          "lowInfo": {
              "price": "21.01",
              "maxPriorityFeePerGas": "0.1",
              "maxFeePerGas": "22.01"
          },
          "medium": "22.02",
          "mediumInfo": {
              "price": "21.01",
              "maxPriorityFeePerGas": "0.1",
              "maxFeePerGas": "22.01"
          },
          "high": "23.03",
          "highInfo": {
              "price": "21.01",
              "maxPriorityFeePerGas": "0.1",
              "maxFeePerGas": "22.01"
          }
      }
      🟠400Bad Request
      🔴500Internal Server Error
      Modified at 2024-05-17 18:47:57
      Previous
      Liquidity sources
      Next
      Get price for pair