/stream
and you shall receive a stream of newline-separated JSON objects that package your data by block. For example
MoonCVV...Trg
program, with a bare minimum of fields. One such record was found for block 325000000. There were no records of such instructions being executed in block 325000001, but the block was included anyway to indicate the range boundary.
By using this general approach, you can
toBlock
field in the request and youâll get the latest data.
fromBlock
and the optional parentBlockHash
fields of its request and send the request to the API again.
Note that that does mean that our example theoretically could have taken two requests instead of one.
If your request specifies a toBlock
you can tell that itâs done when you get either a block with this slot number or an empty HTTP 200 response.
If the range of your request is entirely above the range of available blocks youâll get an HTTP 204 (No Content).
/finalized-stream
endpoint; otherwise read on.
Some of the shared code for pipes and the Squid SDK will deal with unfinalized blocks for you under the hood.
/head
by some thousands of slots.