v1

latestOpenAPI 3.1.0GPL 3.02026-07-131857173.1 KB
Chain Data

Get blocks

Retrieve one or more blocks from the chain or local cache. Corresponds to the <a href="/chifra/chaindata/#chifra-blocks">chifra blocks</a> command line.

get/blocks

Query parameters

blocksstring[] required

a space-separated list of one or more block identifiers

hashesboolean

display only transaction hashes, default is to display full transaction detail

unclesboolean

display uncle blocks (if any) instead of the requested block

tracesboolean

export the traces from the block as opposed to the block data

uniqboolean

display a list of uniq address appearances per transaction

flow'from' | 'to' | 'reward'

for the --uniq option only, export only from or to (including trace from or to)

logsboolean

display only the logs found in the block(s)

emitterstring[]

for the --logs option only, filter logs to show only those logs emitted by the given address(es)

topicstring[]

for the --logs option only, filter logs to show only those with this topic(s)

withdrawalsboolean

export the withdrawals from the block as opposed to the block data

articulateboolean

for the --logs option only, articulate the retrieved data if ABIs can be found

countboolean

display only the count of appearances for --addrs or --uniq

cacheTxsboolean

force a write of the block's transactions to the cache (slow)

cacheTracesboolean

force a write of the block's traces to the cache (slower)

chainstring

the chain to use

noHeaderboolean

suppress the header in the output

cacheboolean

force the results of the query into the cache

decacheboolean

removes related items from the cache

etherboolean

export values in ether

fmtstring

export format, one of [ txt | csv | json ]

Response

returns the requested data

Example response

{
  "blockNumber": 3141592,
  "hash": "0x0b4c6fb75ded4b90218cf0346b0885e442878f104e1b60bf75d5b6860eeacd53",
  "...": "...",
  "transactions": []
}