Skip to main content
POST
starknet_estimateFee
Starknet OpenRPC specFor the latest version of the publicly maintained OpenRPC spec, see the Starknet specs GitHub repo.
Starknet API method that returns an estimate of the fee for Starknet transactions. It estimates the resources required by transactions when applied on a given state. A client or wallet can use this estimate to determine the appropriate amount of fee to include in a transaction to ensure that the network processes it.
Get your own node endpoint todayStart for free and get your app to production levels immediately. No credit card required.You can sign up with your GitHub, X, Google, or Microsoft account.

Parameters

  • request — the list of transactions to estimate. Each transaction runs on the state left by the previous ones. JSON-RPC API version 0.9 accepts only version 3 transactions ("version": "0x3"), which set fee limits in resource_bounds and pay in FRI.
  • simulation_flags — required; an empty list, or ["SKIP_VALIDATE"] to skip the account’s signature validation, for example to estimate a transaction before signing it. With SKIP_VALIDATE, the estimate leaves out the gas that validation uses.
  • block_id — the hash of the requested block, or number (height) of the requested block, or a block tag, for the block referencing the state or call the transaction on.

Response

  • result — a list of fee estimates, one for each transaction in request:
    • l1_gas_consumed and l1_gas_price — the Ethereum gas the transaction uses and its price.
    • l1_data_gas_consumed and l1_data_gas_price — the Ethereum data gas the transaction uses and its price.
    • l2_gas_consumed and l2_gas_price — the Starknet gas the transaction uses and its price.
    • overall_fee — the total fee: the sum of each gas amount multiplied by its price.
    • unit — the fee unit, FRI.

Use case

A practical use case for starknet_estimateFee is to calculate the fee required for a transaction that interacts with a contract on Starknet. The fee is an important factor in transactions, as it determines the amount of fees that need to be paid by the sender to the network for processing the transaction.

Body

application/json
id
integer
jsonrpc
string
method
string
params
object

Response

200

Successful response

Last modified on November 13, 2026