Skip to content

Commit

Permalink
Merge pull request #100 from a-zorina/main
Browse files Browse the repository at this point in the history
add info about archive flag to monitoring guide
  • Loading branch information
rightjelkin authored Jul 18, 2023
2 parents 553fbf2 + 91da6a6 commit f6a7ce6
Showing 1 changed file with 28 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ npm run list-tr
blockchain {
transactions(
workchain: 0
archive: true
first: $count
after: $cursor
) {
Expand Down Expand Up @@ -94,6 +95,33 @@ main(client)
function sleep(ms: number) { return new Promise(r => setTimeout(r, ms)) }
```

**Note**:
With the next update coming in August 2023, Blockchain API used in this sample for pagination will provide only data from the past 7 days by default. To retrieve earlier data, make sure to use the `archive: true` flag in the filters of the query.

The flag is already supported by the API, but does not yet affect the query results. To avoid any interruptions when the update happens, you can already include it in your queries where needed.

The following query sample illustrates the usage of the `archive` flag.

```
query {
blockchain {
transactions(
workchain: 0
archive: true
) {
edges {
node {
id
balance_delta
account_addr
}
}
pageInfo { hasNextPage endCursor }
}
}
}
```

## Subscription

[Subscription](https://github.com/tonlabs/sdk-samples/tree/master/demo/subscribe-transactions) sample subscribes to new transactions of the listed accounts and lists them as they appear.
Expand Down

0 comments on commit f6a7ce6

Please sign in to comment.