- Per transaction: each sponsored transaction and wallet action step reports the gas credits charged for it.
- Across wallets: the
GET /v1/apps/gas_spendendpoint totals the gas credits charged across a set of wallets over a given time range.
Per transaction
Sponsored transactions includegas_credits_charged, the gas credits charged as a value and
currency pair. The field is returned by:
- Get transaction (
GET /v1/transactions/{transaction_id}), and lookups by reference ID. - Each step of a wallet action, when fetched with
?include=steps.
null on reads made immediately after confirmation. Its value is always "0"
on sponsored testnet transactions.
Response
Across wallets
The total covers both RPC transactions and wallet actions.Request
Send aGET request to https://api.privy.io/v1/apps/gas_spend with the following query parameters:
End of the time range in milliseconds (exclusive). The range between
start_timestamp and
end_timestamp must not exceed 30 days.Response
Example
Response

