get
https://api.syve.ai/v1/filter/blocks
This endpoint returns transaction data. Return the latest as well as historical transactions.
Method: GET
Endpoint: https://api.syve.ai/v1/filter/blocks
Request Parameters
| Name | Type(s) | Description |
|---|---|---|
filterby | string | The filterby parameter is used to retrieve a subset of the data. You can filter according to exact values (using eq) or between ranges (using lt, lte, gt and gte).All fields are accepted by filterby. For all available fields look at the "Response Fields" section below. |
size | integer | The size parameter controls how many records to return in the response. Default is 100. Maximum is 100,000. |
sort | boolean | If true sorts response according to timestamp in asc order. Default: false. |
eq | string, integer, double | The "equals to" operator. Used to retrieve records match a specific value of a field. Must be used in combination with the filterby |
lt, lte | integer, double | The "less than" and "less than or equal to" operators. Used in combination with filterby to retrieve records for which the values of a specific field are less than or equal to a specific number. |
gt, gte | integer, double | The "greater than" and "greater than or equal to" operators. Used in combination with filterby to retrieve records for which the values of a specific field are greater than or equal to a specific number. |
from_{block_number|timestamp} | integer | Return results whose block_number or timestamp are greater than or equal to the provided value. |
until_{block_number|timestamp} | integer | Return results whose block_number or timestamp are less than or equal to the provided value. |
Response Fields
| Field | Type | Description |
|---|---|---|
transaction_hash | string | The transaction hash of the event log. |
transaction_index | integer | The position of the transaction in a block of the log. |
block_number | integer | The block number (i.e. height) of the event log. |
block_hash | string | The hash of the block header of the current block. |
timestamp | integer | UNIX timestamp in seconds. The zero value corresponds to the 1st of January 1970 at UTC, called the Unix Epoch. |
parent_hash | string | The hash of the parent block. The parent block is the block from which a block was generated. |
mix_hash | string | The mix hash of the block used in the Proof of Work algorithm. |
nonce | string | The block nonce value used during mining to demonstrate proof of work for a block. |
sha3_uncles | string | The hash of the block's uncle blocks. |
difficulty | integer | Note: After Proof-of-Stake this is 0 |
total_difficulty | integer | Total difficulty of all blocks up until the block. |
size_bytes | integer | The block's size (in bytes). |
base_fee_per_gas_gwei | double | The minimum gas price (in Gwei) that can be paid for a transaction to be included in a block. The base fee was introduced with the London Hark Fork. |
gas_limit | integer | The maximum amount of gas that can be used in the block. |
gas_used | integer | The total amount of gas used by all transactions in the block. |
transactions_count | integer | The number of transactions in the block. |
miner_address | string | The address of the miner that mined the block. |
uncle_count | integer | The number of uncle blocks included in the block. The maximum that can be included is two for any given block. |
Live Example
Press Try It to make a request and see what the response looks like. Feel free to try different query parameters.
