Skip to main content

Estimate gas price

GET 

/estimate_gas_price

Gives an estimate of the gas unit price required to get a transaction on chain in a reasonable amount of time. The gas unit price is the amount that each transaction commits to pay for each unit of gas consumed in executing the transaction. The estimate is based on recent history: it gives the minimum gas that would have been required to get into recent blocks, for blocks that were full. (When blocks are not full, the estimate will match the minimum gas unit price.)

The estimation is given in three values: de-prioritized (low), regular, and prioritized (aggressive). Using a more aggressive value increases the likelihood that the transaction will make it into the next block; more aggressive values are computed with a larger history and higher percentile statistics. More details are in AIP-34.

Responses

Response Headers

  • X-APTOS-CHAIN-ID

    integer

    Chain ID of the current chain

  • X-APTOS-LEDGER-VERSION

    integer

    Current ledger version of the chain

  • X-APTOS-LEDGER-OLDEST-VERSION

    integer

    Oldest non-pruned ledger version of the chain

  • X-APTOS-LEDGER-TIMESTAMPUSEC

    integer

    Current timestamp of the chain

  • X-APTOS-EPOCH

    integer

    Current epoch of the chain

  • X-APTOS-BLOCK-HEIGHT

    integer

    Current block height of the chain

  • X-APTOS-OLDEST-BLOCK-HEIGHT

    integer

    Oldest non-pruned block height of the chain

  • X-APTOS-GAS-USED

    integer

    The cost of the call in terms of gas

  • X-APTOS-CURSOR

    string

    Cursor to be used for endpoints that support cursor-based pagination. Pass this to the start field of the endpoint on the next call to get the next page of results.

Schema

    deprioritized_gas_estimate uint64

    The deprioritized estimate for the gas unit price

    gas_estimate uint64required

    The current estimate for the gas unit price

    prioritized_gas_estimate uint64

    The prioritized estimate for the gas unit price

Loading...