Blocks
Get blocks returns real-time or historical blockchain block numbers and timestamps.
Get Blocks
GEThttps://api.adesic.com/v2/blocks
Provides a list of compatible blockchains for retrieving block numbers and timestamps in an array.
Query Parameters
| Name | Type | Description |
|---|---|---|
| apiKey* | string | Your Adesic API Key |
Get Blockchain Blocks
GEThttps://api.adesic.com/v2/blocks/{blockchain}
Returns an array of real-time or historical blockchain block numbers and timestamps.
Path Parameters
| Name | Type | Description |
|---|---|---|
| blockchain* | string | Blockchain for the block numbers. |
Query Parameters
| Name | Type | Description |
|---|---|---|
| apiKey* | string | Your Adesic API Key |
| limit | int | Number of results per request. Maximum 1,000 (default 100) |
| skip | int | Number of results to skip per request. |
| orderBy | string | Sort the returned data by any field in the API response, such as id, name, symbol, volumeUSD and more. |
| orderDirection | string | asc or desc return the results sorted by that field in either ascending or descending order. |
| block | int | The blockchain block number for historical data. |
| from | int | The start of the aggregate time window for historical data. Unix timestamp in milliseconds. |
| to | int | The end of the aggregate time window for historical data. Unix timestamp in milliseconds. |
200: OK Success
success-response.json
[
{
"number": "17017595",
"timestamp": "1681127183",
"size": "379123",
"gasLimit": "30000000",
"gasUsed": "21721808",
"totalDifficulty": "58750003716598352816469",
"author": "0x4838b106fce9647bdf1e7877bf73ce8b0bad5f97"
}
]Copy & Paste Code
cURL
curl-example.sh
curl -H "api-key: API KEY" https://api.adesic.com/v2/blocks/ethereum200: OK Success
blocks-response.json
[
{
"number": "17017595",
"timestamp": "1681127183",
"size": "379123",
"gasLimit": "30000000",
"gasUsed": "21721808",
"totalDifficulty": "58750003716598352816469",
"author": "0x4838b106fce9647bdf1e7877bf73ce8b0bad5f97"
}
]Response Object
Example URL: https://api.adesic.com/v2/blocks/ethereum
response-example.json
[
{
"number": "17017595",
"timestamp": "1681127183",
"size": "379123",
"gasLimit": "30000000",
"gasUsed": "21721808",
"totalDifficulty": "58750003716598352816469",
"author": "0x4838b106fce9647bdf1e7877bf73ce8b0bad5f97"
}
]Response Attributes
| Attribute Name | Data Type | Description |
|---|---|---|
| number | string | Blockchain block number |
| timestamp | string | Block number timestamp |
| size | string | Block size |
| gasLimit | string | Block gas limit |
| gasUsed | string | Block gas used |
| totalDifficulty | string | Block total difficulty |
| author | string | Block author |