nexus_getBlockByNumber
Get block by height.
Hex block number or “latest”
Include full transaction objects (default: false)
curl -X POST http://localhost:8545 \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"nexus_getBlockByNumber","params":["0x64", false],"id":1}'
{
"jsonrpc": "2.0",
"result": {
"height": 100,
"hash": "0x1234...",
"timestamp": 1704067200,
"txCount": 5,
"stateRoot": "0xabcd...",
"transactions": ["0x1111...", "0x2222..."]
},
"id": 1
}
nexus_getBlockByHash
Get block by hash.
Include full transaction objects (default: false)
curl -X POST http://localhost:8545 \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"nexus_getBlockByHash","params":["0x1234...", true],"id":1}'
nexus_getTransactionByHash
Get transaction by hash.
32-byte hex transaction hash
curl -X POST http://localhost:8545 \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"nexus_getTransactionByHash","params":["0x1234..."],"id":1}'
{
"jsonrpc": "2.0",
"result": {
"hash": "0x1234...",
"from": "0xabcd...",
"to": "0x5678...",
"value": "0x2710",
"gasLimit": "0x5208",
"gasPrice": "0x1",
"nonce": "0x5",
"blockHeight": 100,
"blockHash": "0x9999...",
"status": "success"
},
"id": 1
}
nexus_getTransactionReceipt
Get transaction receipt (execution result).
32-byte hex transaction hash
Receipt with status, gas used, logs
curl -X POST http://localhost:8545 \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"nexus_getTransactionReceipt","params":["0x1234..."],"id":1}'
{
"jsonrpc": "2.0",
"result": {
"transactionHash": "0x1234...",
"blockHeight": 100,
"blockHash": "0x9999...",
"status": "0x1",
"gasUsed": "0x5208",
"contractAddress": null,
"logs": [
{
"address": "0xabcd...",
"topics": ["0x1111..."],
"data": "0x2222..."
}
]
},
"id": 1
}
nexus_getTransactionsByAddress
Get all transactions for an address.
Bitcoin address or hex pubkey
curl -X POST http://localhost:8545 \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"nexus_getTransactionsByAddress","params":["bcrt1p..."],"id":1}'
nexus_listRecentTransactions
Get recent transactions across all addresses.
Max transactions to return (default: 50)
List of recent transactions
curl -X POST http://localhost:8545 \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"nexus_listRecentTransactions","params":[100],"id":1}'
nexus_getMempoolStats
Get mempool statistics.
curl -X POST http://localhost:8545 \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"nexus_getMempoolStats","params":[],"id":1}'
{
"jsonrpc": "2.0",
"result": {
"pending_count": 42,
"total_gas": 1000000,
"backpressure_active": false,
"oldest_tx_age_secs": 5
},
"id": 1
}
nexus_getFeeMarket
Get EIP-1559 style fee market state.
curl -X POST http://localhost:8545 \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"nexus_getFeeMarket","params":[],"id":1}'
{
"jsonrpc": "2.0",
"result": {
"base_fee": 1,
"utilization": 0.45,
"target_utilization": 0.5,
"min_base_fee": 1,
"max_base_fee": 1000
},
"id": 1
}
nexus_getFeeHistory
Get fee history for recent blocks.
Number of blocks (default: 10)
curl -X POST http://localhost:8545 \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"nexus_getFeeHistory","params":[10],"id":1}'