Skip to main content

Get the current gas price

GET 

/:network/chain/gas-price

Get the current gas price

Request

Path Parameters

    network stringrequired

    Blockchain network name or chain id

Query Parameters

    type string

    Possible values: [native_transfer, erc20_transfer, swap]

    Type of transaction: native token transfer, ERC20 transfer, or swap.

    transaction_from string

    From address for the transaction

    transaction_to string

    To address for the transaction

    transaction_amount string

    Amount to transfer

    transaction_data string

    Transaction data

    transaction string

    RLP encoded transaction with hex prefix

    gasLimit number

    Custom gas limit for the transaction

    block_height number

    Optional block number for which the balance is requested. Provide only block height or timestamp you want to check for.

    date string

    Optional Date timestamp for which the balance is requested (ISO 8601 format). Provide only block height or timestamp you want to check for.

    projectId stringrequired

    The id of your project. Can be found in your Histori dashboard.

Responses

The current gas price object.

Schema

    network_name stringrequired

    Blockchain network name For the requested query

    chain_id numberrequired

    The chain ID of the network.

    block_height numberrequired

    The block height (block number).

    event_type stringrequired

    The type of transaction (e.g., native_transfer, erc20_transfer, swap).

    gas_required stringrequired

    The amount of gas required for the transaction.

    gas_cost_wei stringrequired

    The gas price in wei.

    gas_cost_gwei stringrequired

    The gas price in gwei.

    gas_cost_eth stringrequired

    The gas price in ETH.

    fee_wei string

    The fee cost in wei.

    fee_gwei string

    The fee cost in gwei.

    fee_eth string

    The fee cost in ETH.

    tip_wei string

    The tip cost in wei.

    tip_gwei string

    The tip cost in gwei.

    tip_eth string

    The tip cost in ETH.

    currency string

    The currency used (e.g., USD).

    fee_cost string

    The fee cost in traditional currency. This goes to the miner/proposer of the block for the network.

    tip_cost string

    The tip cost in traditional currency. This is paid as priority fee to builders for faster transaction inclusions.

    gas_cost string

    The cost for single compute unit (gas) in traditional currency.

    execution_cost string

    The cost for the whole execution of the logic on the specified network in traditional currency.

    total_cost string

    The total cost for execution in traditional currency.

Loading...