We have three exciting additions to enhance your development experience with dfuse. Improve your dfuse Search queries with our new
NOT operator. Through our new API endpoints, you can perform a REST API call to retrieve a transaction’s lifecycle, or look up a block number or block ID from a timestamp.
Search Query Language Now Includes a “NOT” Operator
One of the most requested features to be added to the dfuse Search Query Language was a
NOT operator. We are excited to inform you that this is now available. Simply pass a
- sign in front of a field name or in front of a parenthesis group. For example:
This example returns everything the
eoscanadacom account has signed, that were inputs in the original transaction, with the exception of any
You can further refine your results by using the
OR operator and passing the
- flag in front of the group, to exclude multiple values from the results, as in this example:
Use a REST API Call to Retrieve a Transaction Lifecycle Response
We’ve also added a REST API call to enable you to retrieve the transaction lifecycle progress simply by passing the transaction ID. This will allow you to receive results even on deferred transactions. This is similar to using our WebSocket stream when passing
fetch: true, but allows you to do this with a REST call, as many of you have informed us that they would like to perform this call without having to handle a WebSocket connection.
You can find the documentation for this endpoint here, and we have written out an example of how to utilize it as well.
Easily Find a Block Number From a Timestamp
Many of you have requested a way to easily look up a block number for a given time over a REST call. This allows you to create date ranges for your queries, easily locate a transaction based upon your memory of approximately when it happened, or just to be able to speed up a query’s response by limiting the size of the chain you want to search through.
While this endpoint has been available for a bit already, we wanted to highlight it now that it has been fully documented. We wanted to ensure you were aware of it so that your development experience is as simple as possible.
Providing an ISO-8601 timestamp, you can now request the block number, block ID and exact timestamp to be returned. In your query, you will also need to specify a comparator:
GT– greater than
GTE– greater than, or equal to
LT– less than
LTE– less than, or equal to
EQ– equal to
If you are using our GraphQL endpoints, then the comparator is optional, defaulting to a value of
As always, we are happy to roll out features that you need in order to build the next generation of dapps. Let us know how we can continue to enhance our EOS API endpoints. And please don’t be shy to tell us what you’re building, we love to see all of your incredible projects. Join us in the dfuse Telegram channel and come say hi!