Never Missing a Beat
Sometimes, disconnections happen. Indeed, you will want to plan for disconnections.
Thankfully, the dfuse API has you covered, with the following WebSocket parameters:
with_progress: allowing you to keep tabs on what you have seen up to the second
start_block: allowing you to restart from where you left off
When you specify
with_progress as part of the
request message, you will start
receiving messages of type
progress when blocks arrive. The value
you pass is interval of blocks you want to get that message, or the
precision. A value of
5 means you will receive one
message each 5 blocks. Set it to
1 to receive a message for each
For a given
req_id stream, you are guaranteed to see the
message after you have received any matching data within that
Also, you will receive one notification each 250 milliseconds at
maximum. This means you will not get one
progress message per block
when doing massive historical reprocessing.
WarningEven with a value of
1, it is possible that you do not get a message for each block, if there is a slight network congestion which brings two blocks within 250ms of propagation.
start_block, you can request that the stream of events
starts in the past. You might need API keys that allow such
reprocessing (until we have a self-serve portal, contact us if such is
A negative value will start you in the past, relative to the current head block of the chain. Ex:
-50would start at block
25000100if the head block was
A value of
0means to start streaming at the head block, feeding real-time data through the socket.
A positive value will start at the given block. Ex:
10000will start feeding (almost) the whole chain history into your socket. Contact us for keys with that feature enabled.
Standard keys can process
3600 blocks in the past by default.