API Endpoint
@host = https://eth-mainnet.unifra.io/v1/{your-api-key}/bundle-api
Please visit console.unifra.io to obtain an API KEY by creating an Ethereum Mainnet App.
API Description
Limitation
- Only support
Ethereum Mainnet
- Free Plan Only Allows Fetching Up to
3,000,000
Blocks
Fetch Blocks Data
This API can be used to fetch data related to specified blocks.
- New block: Returns data for the specified block.
- Old block: Returns approximately 1MB of data for multiple blocks (including the specified block).
Request
GET {{host}}/blocks/{block_number}
Parameters
Parameter | Type | Description |
---|---|---|
block_number | int | Block number |
Response
{
"type": "blocks",
"range": "{start_number}-{end_number}",
"download_link": "{download_link}"
}
Parameter | Type | Description |
---|---|---|
type | string | Type of data to be returned |
range | string | Block range of data to be returned |
download_link | string | Link to download the data |
Example
# GET {{host}}/blocks/1000000 HTTP/1.1
{
"type": "blocks",
"range": "999775-1000495",
"download_link": "https://cachebundle.unifra.io/blocks/999775-1000495.json.gz"
}
-
Download File Example
# GET https://cachebundle.unifra.io/blocks/999775-1000495.json.gz # Authorization: Bearer {your-api-key} [ { "difficulty": "0xb5ffa3a5853", "extraData": "0xd983010302844765746887676f312e342e328777696e646f7773", "gasLimit": "0x2fefd8", "gasUsed": "0x3d860", "hash": "0x7b7915a921d085dee89d832f470203dbe33d2f920e816c2308315927c89a3721", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "miner": "0xf8b483dba2c3b7176a3da549ad41a48bb3121069", "mixHash": "0x21d88745d420bb346dcebb231e10d0c67cdf0bfafd246c01cde47b6d1f02d3c4", "nonce": "0x2ddc139d711fd212", "number": "0xf415f", "parentHash": "0xdaa30c76c5860be2b74f56bdeb781e2c5f9eb59cbcfbb769cae5d68225db1d87", "receiptsRoot": "0x39e14d2391f24b72f3e0f20ee0cf0c8da804822c9f2b1daedba3e99a27b5709b", "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", "size": "0x763", "stateRoot": "0xaa8e03ee0372d3d9ea0394c8d946a9f64db99902d374918d10f78116ab1c9ee6", "timestamp": "0x56bfa4d6", "totalDifficulty": "0x62fb50e403b34275", "transactions": [ { "blockHash": "0x7b7915a921d085dee89d832f470203dbe33d2f920e816c2308315927c89a3721", "blockNumber": "0xf415f", "from": "0x211d45933ef88c3d7ad0120942cf50ab506e618f", "gas": "0x5208", "gasPrice": "0xdf8475800", "hash": "0x619d693702c7577ecd058c0d3c34a179621e433ca470a4502971a7c85ff8a3f3", "input": "0x", "nonce": "0x2a6", "r": "0x84b5882fc42ce7590abcc8e69b0ff9d785f12fc2f8bdf2a149b5276c0fe88a32", "s": "0x6d9f3daf740a7af703813dacde9674f36b5d73f0ddf3074d69220969e1dc1854", "to": "0x32be343b94f860124dc4fee278fdcbd38c102d88", "transactionIndex": "0x0", "type": "0x0", "v": "0x1c", "value": "0x10efddc923d4b000" }, ... ]
Fetch Transactions Data
This API can be used to retrieve transaction data contained in a specified block.
- New block: Returns transaction data for the specified block
- Old block: Returns approximately 1MB of transaction data for multiple blocks (including the requested block)
Request
GET {{host}}/transactions/{block_number}
Parameters
Parameter | Type | Description |
---|---|---|
block_number | int | Block number |
Response
{
"type": "transactions",
"range": "{start_number}-{end_number}",
"download_link": "{download_link}"
}
Parameter | Type | Description |
---|---|---|
type | string | Type of data to be returned |
range | string | Block range of the data to be returned |
download_link | string | Link to download the data |
Example
# GET {{host}}/transactions/10000000 HTTP/1.1
{
"type": "transactions",
"range": "9999976-10000013",
"download_link": "https://cachebundle.unifra.io/transactions/9999976-10000013.json.gz"
}
-
Download File Example
# GET https://cachebundle.unifra.io/transactions/9999976-10000013.json.gz # Authorization: Bearer {your-api-key} [ [ { "blockHash": "0xa8f5439f2ea47ce93cee1e3c8d07f7f9b4580a350b8a387af4a4b40e98fd6b3f", "blockNumber": "0x989668", "chainId": "0x1", "from": "0xfdb16996831753d5331ff813c29a93c76834a0ad", "gas": "0x222e0", "gasPrice": "0xbdfd63e00", "hash": "0x30c17c482309fbb8d8daa00cbff76fceffa20bacf8c426755da3cd67abc30d40", "input": "0xa9059cbb000000000000000000000000524b343fdb2f260a5a953b120c7f5c82faec792d00000000000000000000000000000000000000000000000000000000068e7780", "nonce": "0x96963", "r": "0x76a83497b766fbe1d10674e6f3b1af76bf846b6239550d33faf535bb89612870", "s": "0x5351dcdb77c70b15d34c22a429d5e3a55cbb0ed10c47587dfe8d92bfaad8206a", "to": "0xdac17f958d2ee523a2206206994597c13d831ec7", "transactionIndex": "0x0", "type": "0x0", "v": "0x26", "value": "0x0" }, { "blockHash": "0xa8f5439f2ea47ce93cee1e3c8d07f7f9b4580a350b8a387af4a4b40e98fd6b3f", "blockNumber": "0x989668", "chainId": "0x1", "from": "0xfdb16996831753d5331ff813c29a93c76834a0ad", "gas": "0x222e0", "gasPrice": "0xbdfd63e00", "hash": "0xf28ba0daa3e684bb5eb0b7add76a2a59b2893a3b7276660577a9f63877edf5ee", "input": "0xa9059cbb0000000000000000000000006b7e1abb17255129f51552b7d05e27d2825558f300000000000000000000000000000000000000000000000000000000030a32c0", "nonce": "0x96964", "r": "0x2ae8779e89b487e19eeb88374e97631e0da46ddaa9ab7856d9022dc88214dc34", "s": "0x75984f2b3f17fea0760543eb42c183f620470049d9b2ffe3b83c9ec86ccb078c", "to": "0xdac17f958d2ee523a2206206994597c13d831ec7", "transactionIndex": "0x1", "type": "0x0", "v": "0x26", "value": "0x0" }, ... ]
Fetch Receipts Data
Using this API, you can get the transaction receipt data contained in a specified block.
- New block: Returns the transaction receipt data of the specified block.
- Old block: Returns transaction receipt data of multiple blocks (including the requested block), with a size of about 1M.
Request
GET {{host}}/receipts/{block_number}
Parameters
Parameter | Type | Description |
---|---|---|
block_number | int | Block number |
Response
{
"type": "receipts",
"range": "{start_number}-{end_number}",
"download_link": "{download_link}"
}
Parameter | Type | Description |
---|---|---|
type | string | Type of data to be returned |
range | string | Range of data to be returned |
download_link | string | Link to download the data |
Example
# GET {{host}}/receipts/1000000 HTTP/1.1
{
"type": "receipts",
"range": "999295-1001116",
"download_link": "https://cachebundle.unifra.io/receipts/999295-1001116.json.gz"
}
-
Download File Example
# GET https://cachebundle.unifra.io/receipts/999295-1001116.json.gz # Authorization: Bearer {your-api-key} [ [ { "blockHash": "0xd77ba5ea3b37cae1372b24805e89211c8b6feb3e318233870aba5ee9945cb2e3", "blockNumber": "0xf3f7f", "contractAddress": null, "cumulativeGasUsed": "0x5208", "effectiveGasPrice": "0xba43b7400", "from": "0xf8b483dba2c3b7176a3da549ad41a48bb3121069", "gasUsed": "0x5208", "logs": [], "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "status": "0x1", "to": "0x4ec3c2a5775fbf9a1b95b594211a0dc63f45d5be", "transactionHash": "0x73af1241330d38f288d9f2bbb055ed4d01c3d846c646dd2726ae1f4ea7678b11", "transactionIndex": "0x0", "type": "0x0" }, ... ]
Fetch Logs Data
This API can be used to obtain the log data contained in a specified block.
- New block: returns the log data of the specified block
- Old block: returns approximately 1MB of log data from multiple blocks (including the requested block)
Request
GET {{host}}/logs/{block_number}
Parameters
Parameter | Type | Description |
---|---|---|
block_number | int | Block number |
Response
{
"type": "logs",
"range": "{start_number}-{end_number}",
"download_link": "{download_link}"
}
Parameter | Type | Description |
---|---|---|
type | string | Type of data to be returned |
range | string | Block range of the returned data |
download_link | string | Link to download the data |
Example
# GET {{host}}/logs/1000000 HTTP/1.1
{
"type": "logs",
"range": "998017-1009898",
"download_link": "https://cachebundle.unifra.io/logs/998017-1009898.json.gz"
}
-
Download File Example
# GET https://cachebundle.unifra.io/logs/998017-1009898.json.gz # Authorization: Bearer {your-api-key} [ [ { "address": "0x276c5c6ca8507ed7bac085fc9b9521f4f54b58d3", "blockHash": "0xeabe5a03b506de08ea1c55140d184de5fea1fd643f5b537234caab6c8968e14b", "blockNumber": "0xf3a88", "data": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000510ff40", "logIndex": "0x0", "removed": false, "topics": [ "0xea0f544916910bb1ff33390cbe54a3f5d36d298328578399311cde3c9a750686", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000006a3ddf2da8b2b4f25da53695052f833cd4120fdb", "0x0000000000000000000000000000000000000000000000000000000000000000" ], "transactionHash": "0x7ce38248f34207b80a2565e16ed22c7ed4878abb33f680c88008e4fde94e66ee", "transactionIndex": "0x0" }, ... ]
Fetch Traces Data
This API can be used to get the trace data included in a specified block.
- New block: Returns the trace data for the specified block
- Old block: Returns the trace data for multiple blocks (including the requested block) with a size of approximately 1M
Request
GET {{host}}/traces/{block_number}
Parameters
Parameter | Type | Description |
---|---|---|
block_number | int | Block number |
Response
{
"type": "traces",
"range": "{start_number}-{end_number}",
"download_link": "{download_link}"
}
Parameter Name | Type | Description |
---|---|---|
type | string | Type of data to be returned |
range | string | Range of blocks for the data to be returned |
download_link | string | Link to download the data |
Example
# GET {{host}}/traces/1000000 HTTP/1.1
{
"type": "traces",
"range": "999961-1001450",
"download_link": "<https://cachebundle.unifra.io/traces/999961-1001450.json.gz>"
}
-
Download File Example
# GET https://cachebundle.unifra.io/traces/999961-1001450.json.gz # Authorization: Bearer {your-api-key} [ [ { "action": { "callType": "call", "from": "0x0127c36680f1a6145aa2bc185b34d745be16cbe3", "gas": "0x0", "input": "0x", "to": "0x32be343b94f860124dc4fee278fdcbd38c102d88", "value": "0x308eb7d8444a6800" }, "blockHash": "0xd53af7ff6628b1938fc1aab8f3977adb7b9adc7c6ecf7ca96a818ff60955ad21", "blockNumber": 999961, "result": { "gasUsed": "0x0", "output": "0x" }, "subtraces": 0, "traceAddress": [], "transactionHash": "0x75480653dad864c55fedc33373c76bf3261e703eb9c51b1806f7e079c33a264b", "transactionPosition": 0, "type": "call" }, ... ]