Note: With GraphQL API 1.0 migration by default Blockchain API provides blocks, transactions and messages data only for the past 7 days. For use cases where earlier data is needed make sure to use the archive: true flag in blockchain query filters.
Get transaction info by hash
query{
blockchain{
transaction(hash:"b0e26c42164ec0137913fdcd754aa819323a6a4b9ef5188863b021c3801e7ae4"){
id
hash
balance_delta
aborted
lt
now
}
}
}
master_seq_no_range: BlockchainMasterSeqNoFilter - Everscale is sharded blockchain, you need paginate within masterchain seqNo range, where your workchain blocks were commited.
workchain: Int - optional, if you want to filter by workchain. If ommited, queries all workchains data.
max_balance_delta: String
min_balance_delta: String
allow_latest_inconsistent_data: Boolean - false by default. If you need to have less latency over consistency, you can get the latest data in realtime, but may miss some data. If you need reliable reads, then specify as false.
Pagination parameters
Use cursor, {first, after} or {last, before} filters for pagination.
How to paginate by time range
If you do not know the seq_no of masterchain blocks to create a range you can first obtain it by the time range, and then implement pagination the same way as described above.
To get the seq_no range by time rage do this query:
In the result you will get the required seq_no range.
Attention! Specifying timestamp range does not mean that there will be no blocks outside this range in the result set: this happens because some thread blocks that were generated outside this time range were committed to masterchain block generated within this time range. But anyway, this pagination allows us to get all blocks in a handy manner, these time deltas are very small and not significant and can be ignored.
Use startCursor and hasPreviousPage == true condition to paginate backwards like this:
query{
blockchain{
transactions(
before: "528cc96m05"
){
edges{
node{
id
now
}
cursor
}
pageInfo{
startCursor
hasPreviousPage
}
}
}
}