This guide outlines Blockdaemon's Ethereum JSON-RPC APIs for retrieving transaction and transfer data. One of the key capabilities is retrieving transaction hashes associated with a specific address.
Ethereum custom methods support the following networks:
mainnet
holesky
sepolia
hoodi
See the Ethereum RPC API connection guide.
Account API
bd_getTransactionHashesByAddress
bd_getTransactionHashesByAddress
Returns transaction hashes by address. Use this method to track transactions associated with a specific address.
Compute Unit Value: 50 CU
Request Example
{
"jsonrpc": "2.0",
"method": "bd_getTransactionHashesByAddress",
"id": 1,
"params": [
"0x388C818CA8B9251b393131C08a736A67ccB19297"
]
}
{
"jsonrpc": "2.0",
"method": "bd_getTransactionHashesByAddress",
"id": 1,
"params": [
"0x388C818CA8B9251b393131C08a736A67ccB19297",
{
"blockStart": "0x10D4F",
"blockEnd": "0x10FFFF",
"order": "asc",
"pageSize": 50,
}
]
}
Request Parameters
Type | Description |
---|---|
params : Hex-encoded EVM address | (required) The main account address. |
params : Filter Object | (optional) An object with filters. See the table below. |
Filter Object
Argument | Type | Description |
---|---|---|
blockStart | Unsigned integer or hex-encoded number | (optional) Only return hashes higher than or equal to this block number. |
blockEnd | Unsigned integer or hex-encoded number | (optional) Only return hashes lower than this block number. |
order | Enum (desc|asc) | (optional) Return hashes by block number in ascending or descending order. The default is descending. |
pageToken | String | (optional) Token for pagination. |
pageSize | Unsigned integer or hex-encoded number | (optional) Max results per page (1-100). Default is 100. |
contract | Comma-separated string of hex-encoded EVM addresses | (optional) Only return hashes where the specified contract address was invoked. Multiple addresses are treated as an OR filter. |
Info:The
pageToken
should be used in combination with prior filter arguments to work properly.
Response Example
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"transactions": [
"0xf717bf9b76338c275373bf25b48692d4aad2f88b72b8677a5cae00a6c9e60157",
"0x82d97cb65e4bd8c2f76e45d90f8f09550317b52a95d8c5d6b92a662fe72cac60",
"0xdebb7de86c2f09f94e23c12c4a09f9abab4391b274febfeef1505b096cd1ad84",
...
]
}
}
Response Object
Field | Type | Description |
---|---|---|
transactions | List of hashes | (required) List of matching transaction hashes. |
pageToken | String | (optional) Token for fetching the next page of results. Add the token in the request payload. |
Blocks API
bd_getBlockHeaderByDate
bd_getBlockHeaderByDate
Returns a block header for the given date (Unix timestamp). If no exact match is found, returns the nearest block.
Compute Unit Value: 50 CU
Request Example
{
"jsonrpc": "2.0",
"method": "bd_getBlockHeaderByDate",
"id": 1,
"params": [1728476495]
}
Request Parameter
Field | Type | Description |
---|---|---|
params : Timestamp | timestamp | (required) The timestamp in Unix seconds can be provided as either a number or a hex-encoded number. |
Response Example
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"time": "0x6706754f",
"height": "0x13f55fe",
"hash": "0xead6af5739422ca8e99fba58943e138c718e5a093c437513973d9945ef89472b"
}
}
Response Object
Field | Type | Description |
---|---|---|
time | Hex-encoded number | (required) The block time in Unix timestamp. |
height | Hex-encoded number | (required) The block number. |
hash | String | (required) The block hash. |
Tokens API
bd_getTokenBalance
bd_getTokenBalance
Returns the token balance of a given address for a specific ERC-20 token contract.
InfoHistorical queries only supported on Ethereum mainnet.
Compute Unit Value: 5 CU
Request Example
{
"jsonrpc": "2.0",
"id": 1,
"method": "bd_getTokenBalance",
"params": [
{
"contractAddress": "0x95aD61b0a150d79219dCF64E1E6Cc01f0B64C4cE",
"ownerAddress": "0xb8aFF7b6ddbecaF1e094C5a628845fC13e93d7f2",
"blockNumber": "0x14EC0C9"
}
]
}
{
"jsonrpc": "2.0",
"id": 1,
"method": "bd_getTokenBalance",
"params": [
{
"contractAddress": "0x95aD61b0a150d79219dCF64E1E6Cc01f0B64C4cE",
"ownerAddress": "0xb8aFF7b6ddbecaF1e094C5a628845fC13e93d7f2",
"date": "0x67c07b8f"
}
]
}
Request Parameters
Field | Type | Description |
---|---|---|
contractAddress | String | (required) The token contract address for which the balance is being queried |
ownerAddress | String | (required) The account address whose token balance you want to retrieve |
date | String/Int (hex/int) | (optional) Timestamp to fetch historical balance |
blockNumber | String/Int (hex/int) | (optional) Block number to fetch historical balance |
Response Example
{
"jsonrpc": "2.0",
"id": 1,
"result": 0x659abc0a1818f23843ff59b3
}
bd_getTokenMetadata
bd_getTokenMetadata
Returns token metadata, such as symbol, name, decimals, and total supply.
Compute Unit Value: 5 CU
Request Example
{
"jsonrpc": "2.0",
"id": 1,
"method": "bd_getTokenMetadata",
"params": [
"0x95aD61b0a150d79219dCF64E1E6Cc01f0B64C4cE"
]
}
Request Parameter
Field | Type | Description |
---|---|---|
params : Token Address | String | (required) Token contract address. |
Response Example
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"decimals": "0x12",
"totalSupply": "0x314d8d3733f32fa376f039a13d46",
"name": "SHIBA INU",
"symbol": "SHIB"
}
}
Response Object
Field | Type | Description |
---|---|---|
decimals | Hex encoded number | (required) The decimal places the token uses. |
totalSupply | Hex encoded number | (required) The number of a specific token that can currently exist. |
name | String | (required) The token name. |
symbol | String | (required) The token symbol. |
bd_getContractAbiByAddress
bd_getContractAbiByAddress
InfoThis method is available only for the mainnet.
This method returns the ABI (Application Binary Interface) for a given contract address. It is not limited to token addresses but applies to any contract address. The ABI is required to interact with the contract.
Compute Unit Value: 10 CU
Request Example
{
"jsonrpc": "2.0",
"id": 1,
"method": "bd_getContractAbiByAddress",
"params": [
"0x0e5dDA855EB1De2a212cD1F62b2a3EE49D20c444"
]
}
Request Parameter
Filed | Type | Description |
---|---|---|
params : Contract Address | String | (required) The contract address for which you want to retrieve the ABI. |
Response Example
{
"jsonrpc": "2.0",
"id": 1,
"result": [
{
"inputs": [
{
"internalType": "address",
"name": "beacon",
"type": "address"
},
{
"internalType": "bytes",
"name": "data",
"type": "bytes"
}
],
"stateMutability": "payable",
"type": "constructor"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "address",
"name": "previousAdmin",
"type": "address"
},
{
"indexed": false,
"internalType": "address",
"name": "newAdmin",
"type": "address"
}
],
"name": "AdminChanged",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "beacon",
"type": "address"
}
],
"name": "BeaconUpgraded",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "implementation",
"type": "address"
}
],
"name": "Upgraded",
"type": "event"
},
{
"stateMutability": "payable",
"type": "fallback"
},
{
"stateMutability": "payable",
"type": "receive"
}
]
}
Response Object
Field | Type | Description |
---|---|---|
inputs | Array | An array of input parameters. Each item includes name , type , and internalType . |
indexed | Boolean | Indicates whether the event parameter is indexed. Only present for event ABI items. |
internalType | String | The type used internally, e.g., address . |
name | String | Name of the function or event. |
type | String | Type of the ABI item. Can be constructor , function , event , fallback , or receive . |
anonymous | Boolean | Indicates if the event is anonymous. Only present for event types. |
stateMutability | String | The state mutability of the function, e.g., payable . |
Fees API
bd_estimateFee
bd_estimateFee
Estimates the required fee to confirm your transaction on the network.
Compute Unit Value: 50 CU
Request Example
{
"jsonrpc": "2.0",
"id": 1,
"method": "bd_estimateFee"
}
Response Example
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"estimatedFees": {
"fast": {
"maxPriorityFee": "0x1e21cfcbe",
"maxTotalFee": "0x4435d69a7"
},
"medium": {
"maxPriorityFee": "0x47868c00",
"maxTotalFee": "0x23a8b4df1"
},
"slow": {
"maxPriorityFee": "0x3b9aca00",
"maxTotalFee": "0x21d2c9e30"
}
},
"mostRecentBlock": "0x13f1c5b"
}
}
Response Object
Field | Type | Description |
---|---|---|
estimatedFees | Object | Contains fee estimates grouped by speed category. |
estimatedFees : fast | Object | Fee values for the fastest confirmation. |
estimatedFees : medium | Object | Fee values for average confirmation time. |
estimatedFees : slow | Object | Fee values for lowest-cost confirmation. |
maxPriorityFee | String | Max priority fee per gas in hexadecimal (in wei). |
maxTotalFee | String | Max total fee (base fee + priority fee) per gas in hexadecimal (in wei). |
mostRecentBlock | String | Latest block number (in hexadecimal) used to generate the fee estimates. |
Transaction API
bd_createTokenTransferTransaction
bd_createTokenTransferTransaction
Creates a token transfer transaction. Abstract away contract calls required to create a token transfer transaction.
Compute Unit Value: 10 CU
Request Example
{
"jsonrpc": "2.0",
"id": 1,
"method": "bd_createTokenTransferTransaction",
"params": [
{
"contractAddress": "0x95aD61b0a150d79219dCF64E1E6Cc01f0B64C4cE",
"from": "0xb8aFF7b6ddbecaF1e094C5a628845fC13e93d7f2",
"to": "0xa96cce846638dc72885dfb93ac28961a09ae4b0a",
"value": 1000,
"gas": 250,
"maxFeePerGas": 300,
"maxPriorityFeePerGas": 100,
"nonce": 203
}
]
}
Request Parameters
Field | Type | Description |
---|---|---|
contractAddress | String | (required) The token contract address you want to interact with. Must be a valid hex-encoded EVM address. |
from | String | (required) The sender's address. Must be a valid hex-encoded EVM address. |
to | String | (required) The recipient's address. Must be a valid hex-encoded EVM address. |
value | Integer | (required) Amount of tokens to transfer, in token’s smallest unit. |
gas | Integer | (optional) The gas limit for the transaction. If omitted, a default or estimated value will be used. |
maxFeePerGas | Integer | (optional) Maximum total fee (base fee + priority fee) per gas unit in wei. |
maxPriorityFeePerGas | Integer | (optional) Maximum priority fee per gas unit (tip for miners) in wei. |
nonce | Integer | (optional) The nonce for the from address. If not provided, the next available nonce will be used. |
Response Example
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"id": "0x9db934eed7f5008a9188da2ba501fc7bc54c0e6f3ba7635ec1cb28ab4f3f72b3",
"unsignedTx": "02f871820fa20884018e35688478c3c9688286f794076488d244a73da4fa843f5a8cd91f655ca81a1e80b844a9059cbb000000000000000000000000a96cce846638dc72885dfb93ac28961a09ae4b0a00000000000000000000000000000000000000000000000000000000000003e8c0808080"
}
}
Response Object
Field | Type | Description |
---|---|---|
id | String | A unique transaction ID. |
unsignedTx | String | Unsigned raw transaction in hexadecimal format, ready to be signed and sent to the blockchain. |
bd_compileTransaction
bd_compileTransaction
Compiles the signature and public key with an unsigned transaction to create a signed transaction ready for broadcasting over the network.
Compute Unit Value: 5 CU
Request Example
{
"jsonrpc": "2.0",
"id": 1,
"method": "bd_compileTransaction",
"params": [
{
"unsignedTx": "02ed82426880840c1a97ac847e881fdc82520894057cbbc4d1568530991088108ee48fd8b949167f843b9aca0080c0",
"signature": "3045022100abf81d41de58ed9bc92f5244fe0b2b5af0f83a71d1e1a7a317bde66146ed0b0f022043375062398819c5ff3cd859b4f861d96835cfda24cde435d681792a706b4d78",
"publicKey": "037dbdaabd7fecb262b75874b16d0b2cf66a5a452bcc7f361cdf6955c0c581c727"
}
]
}
Request Parameters
Field | Type | Description |
---|---|---|
unsignedTx | String | required The unsigned transaction to be compiled |
signature | String | required The signature used to sign the unsigned transaction |
publicKey | String | required The public key associated with the signer of the transaction |
Response Example
{
"jsonrpc": "2.0",
"id": 1,
"result": "02f86e820fa20784017f87988478b51b9882520894a96cce846638dc72885dfb93ac28961a09ae4b0a8203e880c001a08a62fd0d7d2bdea0a7e2c276df8a92112aabb9a66f3ce309455bd70b18604e18a05f5c7af8e9d062eeb5b25f2b88c5e61f454edd2e1701dfce1c5314b8d8ce20ad"
}
👋 Need Help?
Contact us through email or our support page for any issues, bugs, or assistance you may need.