get_coinbase_tx_sum - Monero

Example code for the get_coinbase_tx_sum JSON-RPC method. Complete guide on how to use get_coinbase_tx_sum JSON-RPC in GetBlock Web3 documentation.

This method returns the sum of coinbase transactions (block rewards) over a specified range of blocks. Useful for emission tracking and economic analysis.

Parameters

Parameter
Type
Required
Description

height

unsigned int

Yes

Starting block height for the sum

count

unsigned int

Yes

Number of blocks to include in the sum

Request Example

curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{
    "jsonrpc": "2.0",
    "method": "get_coinbase_tx_sum",
    "params": {
        "height": 1563078,
        "count": 2
    },
    "id": "getblock.io"
}'

Response Example

Response Parameters

Field
Type
Description

result.emission_amount

unsigned int

Cumulative coinbase emission over the range (atomic units)

result.fee_amount

unsigned int

Cumulative transaction fees over the range (atomic units)

result.wide_emission_amount

string

128-bit emission amount as hex (for ranges that overflow uint64)

result.wide_fee_amount

string

128-bit fee amount as hex

Use Cases

  • Tracking XMR emission over time

  • Economic and supply analytics

  • Tail-emission auditing post the main supply schedule

Error Handling

Status Code
Error Message
Cause

404

Not Found

Missing or invalid <ACCESS-TOKEN>

-32602

Invalid params

Request parameters are missing or malformed

429

Too Many Requests

Rate limit exceeded for your plan

SDK Integration

Last updated

Was this helpful?