From e1a3d7e3d5ba4eb6d3faa8c330c704f7dc434ba1 Mon Sep 17 00:00:00 2001 From: laviniat1996 Date: Thu, 19 Feb 2026 16:06:01 +0200 Subject: [PATCH 1/6] add pagination info for v3 api --- docs.json | 3 +- ecosystem/api/toncenter/v3-pagination.mdx | 239 ++++++++++++++++++++++ 2 files changed, 241 insertions(+), 1 deletion(-) create mode 100644 ecosystem/api/toncenter/v3-pagination.mdx diff --git a/docs.json b/docs.json index f0734b37b..fb0cb3670 100644 --- a/docs.json +++ b/docs.json @@ -94,7 +94,8 @@ "pages": [ "ecosystem/api/toncenter/v3/overview", "ecosystem/api/toncenter/v3-errors", - "ecosystem/api/toncenter/v3-authentication" + "ecosystem/api/toncenter/v3-authentication", + "ecosystem/api/toncenter/v3-pagination" ], "openapi": { "source": "ecosystem/api/toncenter/v3.yaml", diff --git a/ecosystem/api/toncenter/v3-pagination.mdx b/ecosystem/api/toncenter/v3-pagination.mdx new file mode 100644 index 000000000..9fb8842fe --- /dev/null +++ b/ecosystem/api/toncenter/v3-pagination.mdx @@ -0,0 +1,239 @@ +--- +title: "Pagination" +sidebarTitle: "Pagination" +--- + +import { Aside } from '/snippets/aside.jsx'; + +The v3 API uses offset-based pagination. Each paginated endpoint accepts `limit` and `offset` parameters. `limit` controls how many results to return per request, and `offset` skips a number of rows from the beginning of the result set. To retrieve the next page, increment `offset` by the value of `limit`. + +The following endpoints support pagination: + +| Endpoint | Default limit | Max limit | Sortable | +|----------|:------------:|:---------:|:--------:| +| [`transactions`](/ecosystem/api/toncenter/v3/blockchain-data/get-transactions) | 10 | 1000 | Yes | +| [`actions`](/ecosystem/api/toncenter/v3/actions-and-traces/get-actions) | 10 | 1000 | Yes | +| [`blocks`](/ecosystem/api/toncenter/v3/blockchain-data/get-blocks) | 10 | 1000 | Yes | +| [`messages`](/ecosystem/api/toncenter/v3/blockchain-data/get-messages) | 10 | 1000 | Yes | +| [`traces`](/ecosystem/api/toncenter/v3/actions-and-traces/get-traces) | 10 | 1000 | Yes | +| [`jetton/burns`](/ecosystem/api/toncenter/v3/jettons/get-jetton-burns) | 10 | 1000 | Yes | +| [`jetton/transfers`](/ecosystem/api/toncenter/v3/jettons/get-jetton-transfers) | 10 | 1000 | Yes | +| [`jetton/wallets`](/ecosystem/api/toncenter/v3/jettons/get-jetton-wallets) | 10 | 1000 | Yes | +| [`nft/items`](/ecosystem/api/toncenter/v3/nfts/get-nft-items) | 10 | 1000 | Yes | +| [`nft/transfers`](/ecosystem/api/toncenter/v3/nfts/get-nft-transfers) | 10 | 1000 | Yes | +| [`multisig/orders`](/ecosystem/api/toncenter/v3/multisig/get-multisig-orders) | 10 | 1000 | Yes | +| [`multisig/wallets`](/ecosystem/api/toncenter/v3/multisig/get-multisig-wallets) | 10 | 1000 | Yes | +| [`transactionsByMasterchainBlock`](/ecosystem/api/toncenter/v3/blockchain-data/get-transactions-by-masterchain-block) | 10 | 1000 | Yes | +| [`jetton/masters`](/ecosystem/api/toncenter/v3/jettons/get-jetton-masters) | 10 | 1000 | No | +| [`nft/collections`](/ecosystem/api/toncenter/v3/nfts/get-nft-collections) | 10 | 1000 | No | +| [`dns/records`](/ecosystem/api/toncenter/v3/dns/get-dns-records) | 100 | 1000 | No | +| [`masterchainBlockShards`](/ecosystem/api/toncenter/v3/blockchain-data/get-masterchain-block-shard-state-1) | 10 | 1000 | No | +| [`topAccountsByBalance`](/ecosystem/api/toncenter/v3/stats/get-top-accounts-by-balance) | 10 | 1024 | No | +| [`transactionsByMessage`](/ecosystem/api/toncenter/v3/blockchain-data/get-transactions-by-message) | 10 | 1000 | No | +| [`vesting`](/ecosystem/api/toncenter/v3/vesting/get-vesting-contracts) | 10 | 1000 | No | + +All other v3 endpoints return single objects or fixed results and do not support pagination. + +### Parameters + +These parameters are shared across all paginated endpoints. + +| Parameter | Type | Required | Description | +|-----------|------|:--------:|-------------| +| `limit` | integer | | Maximum number of rows to return. Defaults vary by endpoint (see table above). | +| `offset` | integer | | Number of rows to skip from the beginning of the result set. Default is `0`. | +| `sort` | string | | Sort order: `desc` (default, newest first) or `asc` (oldest first). Only available on sortable endpoints. | + +## Pagination example + +This example uses the `transactions` endpoint, but the same `limit` and `offset` pattern applies to all paginated endpoints. + + + + + +Send a request with `account` and `limit`. No `offset` is needed for the first page (it defaults to `0`). + +```bash +curl "https://toncenter.com/api/v3/transactions?account=EQDtFpEwcFAEcRe5mLVh2N6C0x-_hJEM7W61_JLnSF74p4q2&limit=3" +``` + +Response (abbreviated): +```json +{ + "transactions": [ + { + "account": "0:ED1691307050047117B998B561D8DE82D31FBF84910CED6EB5FC92E7485EF8A7", + "hash": "KkpVTX9RwiZcug8KQuOFUF8+eNoxuHVuIFpGQqufCWU=", + "lt": "67064337000004", + "now": 1771410670 + }, + { + "account": "0:ED1691307050047117B998B561D8DE82D31FBF84910CED6EB5FC92E7485EF8A7", + "hash": "b5fhFby+j8gg936W+XEsAEhboQW0zPcOHOHgyqXkTwI=", + "lt": "67011337000003", + "now": 1771286044 + }, + { + "account": "0:ED1691307050047117B998B561D8DE82D31FBF84910CED6EB5FC92E7485EF8A7", + "hash": "lT/wWTiJIdEF8A2Rox9CRdQRzlUgnIDGeUfEHQ8jGZQ=", + "lt": "66986300000006", + "now": 1771226782 + } + ], + "address_book": { ... } +} +``` + +Three transactions returned, sorted by logical time in descending order (newest first). + + + + + +Set `offset=3` to skip the first 3 results and get the next batch. + +```bash +curl "https://toncenter.com/api/v3/transactions?account=EQDtFpEwcFAEcRe5mLVh2N6C0x-_hJEM7W61_JLnSF74p4q2&limit=3&offset=3" +``` + +Response (abbreviated): +```json +{ + "transactions": [ + { + "account": "0:ED1691307050047117B998B561D8DE82D31FBF84910CED6EB5FC92E7485EF8A7", + "hash": "07QaeBRRA62+RJPgetgSraYLH5i9G5QhC2dUvKAsAiI=", + "lt": "66927779000007", + "now": 1771088713 + }, + { + "account": "0:ED1691307050047117B998B561D8DE82D31FBF84910CED6EB5FC92E7485EF8A7", + "hash": "8d7sSor1NqbGNdX1JEGl1d4rX3lb7CeC3DZjhe7V7z4=", + "lt": "66927779000003", + "now": 1771088713 + }, + { + "account": "0:ED1691307050047117B998B561D8DE82D31FBF84910CED6EB5FC92E7485EF8A7", + "hash": "szM1I5/MU1uJGgeScS7uxNF6V/FsLkokCpul88ZEau8=", + "lt": "66926353000007", + "now": 1771085323 + } + ], + "address_book": { ... } +} +``` + +No overlap with the previous page. Offset pagination does not produce duplicates. + + + + + +Continue incrementing `offset` by the `limit` value on each request (`offset=6`, `offset=9`, ...). When the response returns fewer transactions than the `limit`, all results have been retrieved. + + + + + + + ```javascript + const address = "EQDtFpEwcFAEcRe5mLVh2N6C0x-_hJEM7W61_JLnSF74p4q2"; + + async function main() { + let allTransactions = []; + let offset = 0; + const limit = 3; + let page = 0; + + while (true) { + page++; + const params = new URLSearchParams({ + account: address, + limit: String(limit), + offset: String(offset), + }); + + const res = await fetch( + `https://toncenter.com/api/v3/transactions?${params}` + ); + const data = await res.json(); + const transactions = data.transactions || []; + + console.log(`\n--- Page ${page} (offset=${offset}) ---`); + + for (const tx of transactions) { + console.log(` lt: ${tx.lt} hash: ${tx.hash}`); + } + + allTransactions.push(...transactions); + + if (transactions.length < limit) break; + + offset += limit; + } + + console.log(`\nTotal transactions: ${allTransactions.length}`); + } + + main(); + ``` + + Output: + ``` + --- Page 1 (offset=0) --- + lt: 67064337000004 hash: KkpVTX9RwiZcug8KQuOFUF8+eNoxuHVuIFpGQqufCWU= + lt: 67011337000003 hash: b5fhFby+j8gg936W+XEsAEhboQW0zPcOHOHgyqXkTwI= + lt: 66986300000006 hash: lT/wWTiJIdEF8A2Rox9CRdQRzlUgnIDGeUfEHQ8jGZQ= + + --- Page 2 (offset=3) --- + lt: 66927779000007 hash: 07QaeBRRA62+RJPgetgSraYLH5i9G5QhC2dUvKAsAiI= + lt: 66927779000003 hash: 8d7sSor1NqbGNdX1JEGl1d4rX3lb7CeC3DZjhe7V7z4= + lt: 66926353000007 hash: szM1I5/MU1uJGgeScS7uxNF6V/FsLkokCpul88ZEau8= + + --- Page 3 (offset=6) --- + + Total transactions: 6 + ``` + + +## Sorting + +Sortable endpoints accept a `sort` parameter with two values: + +- `desc` (default): newest results first, sorted by logical time (or UTC timestamp for `blocks`). +- `asc`: oldest results first. + +```bash +curl "https://toncenter.com/api/v3/transactions?account=EQDtFpEwcFAEcRe5mLVh2N6C0x-_hJEM7W61_JLnSF74p4q2&limit=3&sort=asc" +``` + +Response (abbreviated): +```json +{ + "transactions": [ + { + "hash": "3ziyP0yvGklMTNWWXDplmlBcPH0P7MJtusoVthNu8e0=", + "lt": "39547833000003", + "now": 1690204554 + }, + { + "hash": "lYXDtLL53JkKa35vP05gbwTyd6Lq4335TwlZeUebxZ8=", + "lt": "39547876000003", + "now": 1690204686 + }, + { + "hash": "DSz0P/wmE0EkdfaxFl2R36Eie+Lw4paLa1sAHHUliJA=", + "lt": "39548648000003", + "now": 1690207175 + } + ], + "address_book": { ... } +} +``` + +With `sort=asc`, the earliest transactions are returned first (from July 2023 for this account). + + \ No newline at end of file From 931836f2027712448787e84a56a37efd8a847a78 Mon Sep 17 00:00:00 2001 From: laviniat1996 Date: Thu, 19 Feb 2026 16:10:28 +0200 Subject: [PATCH 2/6] fix linting --- ecosystem/api/toncenter/v3-pagination.mdx | 211 +++++++++++----------- 1 file changed, 109 insertions(+), 102 deletions(-) diff --git a/ecosystem/api/toncenter/v3-pagination.mdx b/ecosystem/api/toncenter/v3-pagination.mdx index 9fb8842fe..76a8f52b1 100644 --- a/ecosystem/api/toncenter/v3-pagination.mdx +++ b/ecosystem/api/toncenter/v3-pagination.mdx @@ -9,28 +9,28 @@ The v3 API uses offset-based pagination. Each paginated endpoint accepts `limit` The following endpoints support pagination: -| Endpoint | Default limit | Max limit | Sortable | -|----------|:------------:|:---------:|:--------:| -| [`transactions`](/ecosystem/api/toncenter/v3/blockchain-data/get-transactions) | 10 | 1000 | Yes | -| [`actions`](/ecosystem/api/toncenter/v3/actions-and-traces/get-actions) | 10 | 1000 | Yes | -| [`blocks`](/ecosystem/api/toncenter/v3/blockchain-data/get-blocks) | 10 | 1000 | Yes | -| [`messages`](/ecosystem/api/toncenter/v3/blockchain-data/get-messages) | 10 | 1000 | Yes | -| [`traces`](/ecosystem/api/toncenter/v3/actions-and-traces/get-traces) | 10 | 1000 | Yes | -| [`jetton/burns`](/ecosystem/api/toncenter/v3/jettons/get-jetton-burns) | 10 | 1000 | Yes | -| [`jetton/transfers`](/ecosystem/api/toncenter/v3/jettons/get-jetton-transfers) | 10 | 1000 | Yes | -| [`jetton/wallets`](/ecosystem/api/toncenter/v3/jettons/get-jetton-wallets) | 10 | 1000 | Yes | -| [`nft/items`](/ecosystem/api/toncenter/v3/nfts/get-nft-items) | 10 | 1000 | Yes | -| [`nft/transfers`](/ecosystem/api/toncenter/v3/nfts/get-nft-transfers) | 10 | 1000 | Yes | -| [`multisig/orders`](/ecosystem/api/toncenter/v3/multisig/get-multisig-orders) | 10 | 1000 | Yes | -| [`multisig/wallets`](/ecosystem/api/toncenter/v3/multisig/get-multisig-wallets) | 10 | 1000 | Yes | -| [`transactionsByMasterchainBlock`](/ecosystem/api/toncenter/v3/blockchain-data/get-transactions-by-masterchain-block) | 10 | 1000 | Yes | -| [`jetton/masters`](/ecosystem/api/toncenter/v3/jettons/get-jetton-masters) | 10 | 1000 | No | -| [`nft/collections`](/ecosystem/api/toncenter/v3/nfts/get-nft-collections) | 10 | 1000 | No | -| [`dns/records`](/ecosystem/api/toncenter/v3/dns/get-dns-records) | 100 | 1000 | No | -| [`masterchainBlockShards`](/ecosystem/api/toncenter/v3/blockchain-data/get-masterchain-block-shard-state-1) | 10 | 1000 | No | -| [`topAccountsByBalance`](/ecosystem/api/toncenter/v3/stats/get-top-accounts-by-balance) | 10 | 1024 | No | -| [`transactionsByMessage`](/ecosystem/api/toncenter/v3/blockchain-data/get-transactions-by-message) | 10 | 1000 | No | -| [`vesting`](/ecosystem/api/toncenter/v3/vesting/get-vesting-contracts) | 10 | 1000 | No | +| Endpoint | Default limit | Max limit | Sortable | +| --------------------------------------------------------------------------------------------------------------------- | :-----------: | :-------: | :------: | +| [`transactions`](/ecosystem/api/toncenter/v3/blockchain-data/get-transactions) | 10 | 1000 | Yes | +| [`actions`](/ecosystem/api/toncenter/v3/actions-and-traces/get-actions) | 10 | 1000 | Yes | +| [`blocks`](/ecosystem/api/toncenter/v3/blockchain-data/get-blocks) | 10 | 1000 | Yes | +| [`messages`](/ecosystem/api/toncenter/v3/blockchain-data/get-messages) | 10 | 1000 | Yes | +| [`traces`](/ecosystem/api/toncenter/v3/actions-and-traces/get-traces) | 10 | 1000 | Yes | +| [`jetton/burns`](/ecosystem/api/toncenter/v3/jettons/get-jetton-burns) | 10 | 1000 | Yes | +| [`jetton/transfers`](/ecosystem/api/toncenter/v3/jettons/get-jetton-transfers) | 10 | 1000 | Yes | +| [`jetton/wallets`](/ecosystem/api/toncenter/v3/jettons/get-jetton-wallets) | 10 | 1000 | Yes | +| [`nft/items`](/ecosystem/api/toncenter/v3/nfts/get-nft-items) | 10 | 1000 | Yes | +| [`nft/transfers`](/ecosystem/api/toncenter/v3/nfts/get-nft-transfers) | 10 | 1000 | Yes | +| [`multisig/orders`](/ecosystem/api/toncenter/v3/multisig/get-multisig-orders) | 10 | 1000 | Yes | +| [`multisig/wallets`](/ecosystem/api/toncenter/v3/multisig/get-multisig-wallets) | 10 | 1000 | Yes | +| [`transactionsByMasterchainBlock`](/ecosystem/api/toncenter/v3/blockchain-data/get-transactions-by-masterchain-block) | 10 | 1000 | Yes | +| [`jetton/masters`](/ecosystem/api/toncenter/v3/jettons/get-jetton-masters) | 10 | 1000 | No | +| [`nft/collections`](/ecosystem/api/toncenter/v3/nfts/get-nft-collections) | 10 | 1000 | No | +| [`dns/records`](/ecosystem/api/toncenter/v3/dns/get-dns-records) | 100 | 1000 | No | +| [`masterchainBlockShards`](/ecosystem/api/toncenter/v3/blockchain-data/get-masterchain-block-shard-state-1) | 10 | 1000 | No | +| [`topAccountsByBalance`](/ecosystem/api/toncenter/v3/stats/get-top-accounts-by-balance) | 10 | 1024 | No | +| [`transactionsByMessage`](/ecosystem/api/toncenter/v3/blockchain-data/get-transactions-by-message) | 10 | 1000 | No | +| [`vesting`](/ecosystem/api/toncenter/v3/vesting/get-vesting-contracts) | 10 | 1000 | No | All other v3 endpoints return single objects or fixed results and do not support pagination. @@ -38,105 +38,107 @@ All other v3 endpoints return single objects or fixed results and do not support These parameters are shared across all paginated endpoints. -| Parameter | Type | Required | Description | -|-----------|------|:--------:|-------------| -| `limit` | integer | | Maximum number of rows to return. Defaults vary by endpoint (see table above). | -| `offset` | integer | | Number of rows to skip from the beginning of the result set. Default is `0`. | -| `sort` | string | | Sort order: `desc` (default, newest first) or `asc` (oldest first). Only available on sortable endpoints. | +| Parameter | Type | Required | Description | +| --------- | ------- | :------: | --------------------------------------------------------------------------------------------------------- | +| `limit` | integer | | Maximum number of rows to return. Defaults vary by endpoint (see table above). | +| `offset` | integer | | Number of rows to skip from the beginning of the result set. Default is `0`. | +| `sort` | string | | Sort order: `desc` (default, newest first) or `asc` (oldest first). Only available on sortable endpoints. | ## Pagination example This example uses the `transactions` endpoint, but the same `limit` and `offset` pattern applies to all paginated endpoints. + + Send a request with `account` and `limit`. No `offset` is needed for the first page (it defaults to `0`). - + ```bash + curl "https://toncenter.com/api/v3/transactions?account=EQDtFpEwcFAEcRe5mLVh2N6C0x-_hJEM7W61_JLnSF74p4q2&limit=3" + ``` -Send a request with `account` and `limit`. No `offset` is needed for the first page (it defaults to `0`). + Response (abbreviated): -```bash -curl "https://toncenter.com/api/v3/transactions?account=EQDtFpEwcFAEcRe5mLVh2N6C0x-_hJEM7W61_JLnSF74p4q2&limit=3" -``` - -Response (abbreviated): -```json -{ - "transactions": [ - { - "account": "0:ED1691307050047117B998B561D8DE82D31FBF84910CED6EB5FC92E7485EF8A7", - "hash": "KkpVTX9RwiZcug8KQuOFUF8+eNoxuHVuIFpGQqufCWU=", - "lt": "67064337000004", - "now": 1771410670 - }, + ```json { - "account": "0:ED1691307050047117B998B561D8DE82D31FBF84910CED6EB5FC92E7485EF8A7", - "hash": "b5fhFby+j8gg936W+XEsAEhboQW0zPcOHOHgyqXkTwI=", - "lt": "67011337000003", - "now": 1771286044 - }, - { - "account": "0:ED1691307050047117B998B561D8DE82D31FBF84910CED6EB5FC92E7485EF8A7", - "hash": "lT/wWTiJIdEF8A2Rox9CRdQRzlUgnIDGeUfEHQ8jGZQ=", - "lt": "66986300000006", - "now": 1771226782 + "transactions": [ + { + "account": "0:ED1691307050047117B998B561D8DE82D31FBF84910CED6EB5FC92E7485EF8A7", + "hash": "KkpVTX9RwiZcug8KQuOFUF8+eNoxuHVuIFpGQqufCWU=", + "lt": "67064337000004", + "now": 1771410670 + }, + { + "account": "0:ED1691307050047117B998B561D8DE82D31FBF84910CED6EB5FC92E7485EF8A7", + "hash": "b5fhFby+j8gg936W+XEsAEhboQW0zPcOHOHgyqXkTwI=", + "lt": "67011337000003", + "now": 1771286044 + }, + { + "account": "0:ED1691307050047117B998B561D8DE82D31FBF84910CED6EB5FC92E7485EF8A7", + "hash": "lT/wWTiJIdEF8A2Rox9CRdQRzlUgnIDGeUfEHQ8jGZQ=", + "lt": "66986300000006", + "now": 1771226782 + } + ], + "address_book": { ... } } - ], - "address_book": { ... } -} -``` - -Three transactions returned, sorted by logical time in descending order (newest first). + ``` - + Three transactions returned, sorted by logical time in descending order (newest first). + - + + Set `offset=3` to skip the first 3 results and get the next batch. -Set `offset=3` to skip the first 3 results and get the next batch. + ```bash + curl "https://toncenter.com/api/v3/transactions?account=EQDtFpEwcFAEcRe5mLVh2N6C0x-_hJEM7W61_JLnSF74p4q2&limit=3&offset=3" + ``` -```bash -curl "https://toncenter.com/api/v3/transactions?account=EQDtFpEwcFAEcRe5mLVh2N6C0x-_hJEM7W61_JLnSF74p4q2&limit=3&offset=3" -``` + Response (abbreviated): -Response (abbreviated): -```json -{ - "transactions": [ + ```json { - "account": "0:ED1691307050047117B998B561D8DE82D31FBF84910CED6EB5FC92E7485EF8A7", - "hash": "07QaeBRRA62+RJPgetgSraYLH5i9G5QhC2dUvKAsAiI=", - "lt": "66927779000007", - "now": 1771088713 - }, - { - "account": "0:ED1691307050047117B998B561D8DE82D31FBF84910CED6EB5FC92E7485EF8A7", - "hash": "8d7sSor1NqbGNdX1JEGl1d4rX3lb7CeC3DZjhe7V7z4=", - "lt": "66927779000003", - "now": 1771088713 - }, - { - "account": "0:ED1691307050047117B998B561D8DE82D31FBF84910CED6EB5FC92E7485EF8A7", - "hash": "szM1I5/MU1uJGgeScS7uxNF6V/FsLkokCpul88ZEau8=", - "lt": "66926353000007", - "now": 1771085323 + "transactions": [ + { + "account": "0:ED1691307050047117B998B561D8DE82D31FBF84910CED6EB5FC92E7485EF8A7", + "hash": "07QaeBRRA62+RJPgetgSraYLH5i9G5QhC2dUvKAsAiI=", + "lt": "66927779000007", + "now": 1771088713 + }, + { + "account": "0:ED1691307050047117B998B561D8DE82D31FBF84910CED6EB5FC92E7485EF8A7", + "hash": "8d7sSor1NqbGNdX1JEGl1d4rX3lb7CeC3DZjhe7V7z4=", + "lt": "66927779000003", + "now": 1771088713 + }, + { + "account": "0:ED1691307050047117B998B561D8DE82D31FBF84910CED6EB5FC92E7485EF8A7", + "hash": "szM1I5/MU1uJGgeScS7uxNF6V/FsLkokCpul88ZEau8=", + "lt": "66926353000007", + "now": 1771085323 + } + ], + "address_book": { ... } } - ], - "address_book": { ... } -} -``` - -No overlap with the previous page. Offset pagination does not produce duplicates. - - + ``` - - -Continue incrementing `offset` by the `limit` value on each request (`offset=6`, `offset=9`, ...). When the response returns fewer transactions than the `limit`, all results have been retrieved. - - + No overlap with the previous page. Offset pagination does not produce duplicates. + + + Continue incrementing `offset` by the `limit` value on each request (`offset=6`, `offset=9`, ...). When the response returns fewer transactions than the `limit`, all results have been retrieved. + - + ```javascript const address = "EQDtFpEwcFAEcRe5mLVh2N6C0x-_hJEM7W61_JLnSF74p4q2"; @@ -180,6 +182,7 @@ Continue incrementing `offset` by the `limit` value on each request (`offset=6`, ``` Output: + ``` --- Page 1 (offset=0) --- lt: 67064337000004 hash: KkpVTX9RwiZcug8KQuOFUF8+eNoxuHVuIFpGQqufCWU= @@ -209,6 +212,7 @@ curl "https://toncenter.com/api/v3/transactions?account=EQDtFpEwcFAEcRe5mLVh2N6C ``` Response (abbreviated): + ```json { "transactions": [ @@ -234,6 +238,9 @@ Response (abbreviated): With `sort=asc`, the earliest transactions are returned first (from July 2023 for this account). - \ No newline at end of file + From b0aa4757611957e51a6bad189d84eadeca140256 Mon Sep 17 00:00:00 2001 From: laviniat1996 Date: Tue, 10 Mar 2026 09:34:53 +0200 Subject: [PATCH 3/6] fix numeric columns --- ecosystem/api/toncenter/v3-pagination.mdx | 42 +++++++++++------------ 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/ecosystem/api/toncenter/v3-pagination.mdx b/ecosystem/api/toncenter/v3-pagination.mdx index 76a8f52b1..5f14c8647 100644 --- a/ecosystem/api/toncenter/v3-pagination.mdx +++ b/ecosystem/api/toncenter/v3-pagination.mdx @@ -10,27 +10,27 @@ The v3 API uses offset-based pagination. Each paginated endpoint accepts `limit` The following endpoints support pagination: | Endpoint | Default limit | Max limit | Sortable | -| --------------------------------------------------------------------------------------------------------------------- | :-----------: | :-------: | :------: | -| [`transactions`](/ecosystem/api/toncenter/v3/blockchain-data/get-transactions) | 10 | 1000 | Yes | -| [`actions`](/ecosystem/api/toncenter/v3/actions-and-traces/get-actions) | 10 | 1000 | Yes | -| [`blocks`](/ecosystem/api/toncenter/v3/blockchain-data/get-blocks) | 10 | 1000 | Yes | -| [`messages`](/ecosystem/api/toncenter/v3/blockchain-data/get-messages) | 10 | 1000 | Yes | -| [`traces`](/ecosystem/api/toncenter/v3/actions-and-traces/get-traces) | 10 | 1000 | Yes | -| [`jetton/burns`](/ecosystem/api/toncenter/v3/jettons/get-jetton-burns) | 10 | 1000 | Yes | -| [`jetton/transfers`](/ecosystem/api/toncenter/v3/jettons/get-jetton-transfers) | 10 | 1000 | Yes | -| [`jetton/wallets`](/ecosystem/api/toncenter/v3/jettons/get-jetton-wallets) | 10 | 1000 | Yes | -| [`nft/items`](/ecosystem/api/toncenter/v3/nfts/get-nft-items) | 10 | 1000 | Yes | -| [`nft/transfers`](/ecosystem/api/toncenter/v3/nfts/get-nft-transfers) | 10 | 1000 | Yes | -| [`multisig/orders`](/ecosystem/api/toncenter/v3/multisig/get-multisig-orders) | 10 | 1000 | Yes | -| [`multisig/wallets`](/ecosystem/api/toncenter/v3/multisig/get-multisig-wallets) | 10 | 1000 | Yes | -| [`transactionsByMasterchainBlock`](/ecosystem/api/toncenter/v3/blockchain-data/get-transactions-by-masterchain-block) | 10 | 1000 | Yes | -| [`jetton/masters`](/ecosystem/api/toncenter/v3/jettons/get-jetton-masters) | 10 | 1000 | No | -| [`nft/collections`](/ecosystem/api/toncenter/v3/nfts/get-nft-collections) | 10 | 1000 | No | -| [`dns/records`](/ecosystem/api/toncenter/v3/dns/get-dns-records) | 100 | 1000 | No | -| [`masterchainBlockShards`](/ecosystem/api/toncenter/v3/blockchain-data/get-masterchain-block-shard-state-1) | 10 | 1000 | No | -| [`topAccountsByBalance`](/ecosystem/api/toncenter/v3/stats/get-top-accounts-by-balance) | 10 | 1024 | No | -| [`transactionsByMessage`](/ecosystem/api/toncenter/v3/blockchain-data/get-transactions-by-message) | 10 | 1000 | No | -| [`vesting`](/ecosystem/api/toncenter/v3/vesting/get-vesting-contracts) | 10 | 1000 | No | +| --------------------------------------------------------------------------------------------------------------------- | ------------: | --------: | -------: | +| [`transactions`](/ecosystem/api/toncenter/v3/blockchain-data/get-transactions) | 10 | 1000 | Yes | +| [`actions`](/ecosystem/api/toncenter/v3/actions-and-traces/get-actions) | 10 | 1000 | Yes | +| [`blocks`](/ecosystem/api/toncenter/v3/blockchain-data/get-blocks) | 10 | 1000 | Yes | +| [`messages`](/ecosystem/api/toncenter/v3/blockchain-data/get-messages) | 10 | 1000 | Yes | +| [`traces`](/ecosystem/api/toncenter/v3/actions-and-traces/get-traces) | 10 | 1000 | Yes | +| [`jetton/burns`](/ecosystem/api/toncenter/v3/jettons/get-jetton-burns) | 10 | 1000 | Yes | +| [`jetton/transfers`](/ecosystem/api/toncenter/v3/jettons/get-jetton-transfers) | 10 | 1000 | Yes | +| [`jetton/wallets`](/ecosystem/api/toncenter/v3/jettons/get-jetton-wallets) | 10 | 1000 | Yes | +| [`nft/items`](/ecosystem/api/toncenter/v3/nfts/get-nft-items) | 10 | 1000 | Yes | +| [`nft/transfers`](/ecosystem/api/toncenter/v3/nfts/get-nft-transfers) | 10 | 1000 | Yes | +| [`multisig/orders`](/ecosystem/api/toncenter/v3/multisig/get-multisig-orders) | 10 | 1000 | Yes | +| [`multisig/wallets`](/ecosystem/api/toncenter/v3/multisig/get-multisig-wallets) | 10 | 1000 | Yes | +| [`transactionsByMasterchainBlock`](/ecosystem/api/toncenter/v3/blockchain-data/get-transactions-by-masterchain-block) | 10 | 1000 | Yes | +| [`jetton/masters`](/ecosystem/api/toncenter/v3/jettons/get-jetton-masters) | 10 | 1000 | No | +| [`nft/collections`](/ecosystem/api/toncenter/v3/nfts/get-nft-collections) | 10 | 1000 | No | +| [`dns/records`](/ecosystem/api/toncenter/v3/dns/get-dns-records) | 100 | 1000 | No | +| [`masterchainBlockShards`](/ecosystem/api/toncenter/v3/blockchain-data/get-masterchain-block-shard-state-1) | 10 | 1000 | No | +| [`topAccountsByBalance`](/ecosystem/api/toncenter/v3/stats/get-top-accounts-by-balance) | 10 | 1024 | No | +| [`transactionsByMessage`](/ecosystem/api/toncenter/v3/blockchain-data/get-transactions-by-message) | 10 | 1000 | No | +| [`vesting`](/ecosystem/api/toncenter/v3/vesting/get-vesting-contracts) | 10 | 1000 | No | All other v3 endpoints return single objects or fixed results and do not support pagination. From 66deb711475724aed61419834a2dc5cc75ae1755 Mon Sep 17 00:00:00 2001 From: aigerimu <89766357+aigerimu@users.noreply.github.com> Date: Wed, 18 Mar 2026 23:43:26 +0700 Subject: [PATCH 4/6] editing --- ecosystem/api/toncenter/v3-pagination.mdx | 57 +++++++++++------------ 1 file changed, 28 insertions(+), 29 deletions(-) diff --git a/ecosystem/api/toncenter/v3-pagination.mdx b/ecosystem/api/toncenter/v3-pagination.mdx index 5f14c8647..23f476bf5 100644 --- a/ecosystem/api/toncenter/v3-pagination.mdx +++ b/ecosystem/api/toncenter/v3-pagination.mdx @@ -1,6 +1,5 @@ --- title: "Pagination" -sidebarTitle: "Pagination" --- import { Aside } from '/snippets/aside.jsx'; @@ -10,27 +9,27 @@ The v3 API uses offset-based pagination. Each paginated endpoint accepts `limit` The following endpoints support pagination: | Endpoint | Default limit | Max limit | Sortable | -| --------------------------------------------------------------------------------------------------------------------- | ------------: | --------: | -------: | -| [`transactions`](/ecosystem/api/toncenter/v3/blockchain-data/get-transactions) | 10 | 1000 | Yes | -| [`actions`](/ecosystem/api/toncenter/v3/actions-and-traces/get-actions) | 10 | 1000 | Yes | -| [`blocks`](/ecosystem/api/toncenter/v3/blockchain-data/get-blocks) | 10 | 1000 | Yes | -| [`messages`](/ecosystem/api/toncenter/v3/blockchain-data/get-messages) | 10 | 1000 | Yes | -| [`traces`](/ecosystem/api/toncenter/v3/actions-and-traces/get-traces) | 10 | 1000 | Yes | -| [`jetton/burns`](/ecosystem/api/toncenter/v3/jettons/get-jetton-burns) | 10 | 1000 | Yes | -| [`jetton/transfers`](/ecosystem/api/toncenter/v3/jettons/get-jetton-transfers) | 10 | 1000 | Yes | -| [`jetton/wallets`](/ecosystem/api/toncenter/v3/jettons/get-jetton-wallets) | 10 | 1000 | Yes | -| [`nft/items`](/ecosystem/api/toncenter/v3/nfts/get-nft-items) | 10 | 1000 | Yes | -| [`nft/transfers`](/ecosystem/api/toncenter/v3/nfts/get-nft-transfers) | 10 | 1000 | Yes | -| [`multisig/orders`](/ecosystem/api/toncenter/v3/multisig/get-multisig-orders) | 10 | 1000 | Yes | -| [`multisig/wallets`](/ecosystem/api/toncenter/v3/multisig/get-multisig-wallets) | 10 | 1000 | Yes | -| [`transactionsByMasterchainBlock`](/ecosystem/api/toncenter/v3/blockchain-data/get-transactions-by-masterchain-block) | 10 | 1000 | Yes | -| [`jetton/masters`](/ecosystem/api/toncenter/v3/jettons/get-jetton-masters) | 10 | 1000 | No | -| [`nft/collections`](/ecosystem/api/toncenter/v3/nfts/get-nft-collections) | 10 | 1000 | No | -| [`dns/records`](/ecosystem/api/toncenter/v3/dns/get-dns-records) | 100 | 1000 | No | -| [`masterchainBlockShards`](/ecosystem/api/toncenter/v3/blockchain-data/get-masterchain-block-shard-state-1) | 10 | 1000 | No | -| [`topAccountsByBalance`](/ecosystem/api/toncenter/v3/stats/get-top-accounts-by-balance) | 10 | 1024 | No | -| [`transactionsByMessage`](/ecosystem/api/toncenter/v3/blockchain-data/get-transactions-by-message) | 10 | 1000 | No | -| [`vesting`](/ecosystem/api/toncenter/v3/vesting/get-vesting-contracts) | 10 | 1000 | No | +| --------------------------------------------------------------------------------------------------------------------- | :-----------: | :-------: | :------: | +| [`transactions`](/ecosystem/api/toncenter/v3/blockchain-data/get-transactions) | 10 | 1000 | Yes | +| [`actions`](/ecosystem/api/toncenter/v3/actions-and-traces/get-actions) | 10 | 1000 | Yes | +| [`blocks`](/ecosystem/api/toncenter/v3/blockchain-data/get-blocks) | 10 | 1000 | Yes | +| [`messages`](/ecosystem/api/toncenter/v3/blockchain-data/get-messages) | 10 | 1000 | Yes | +| [`traces`](/ecosystem/api/toncenter/v3/actions-and-traces/get-traces) | 10 | 1000 | Yes | +| [`jetton/burns`](/ecosystem/api/toncenter/v3/jettons/get-jetton-burns) | 10 | 1000 | Yes | +| [`jetton/transfers`](/ecosystem/api/toncenter/v3/jettons/get-jetton-transfers) | 10 | 1000 | Yes | +| [`jetton/wallets`](/ecosystem/api/toncenter/v3/jettons/get-jetton-wallets) | 10 | 1000 | Yes | +| [`nft/items`](/ecosystem/api/toncenter/v3/nfts/get-nft-items) | 10 | 1000 | Yes | +| [`nft/transfers`](/ecosystem/api/toncenter/v3/nfts/get-nft-transfers) | 10 | 1000 | Yes | +| [`multisig/orders`](/ecosystem/api/toncenter/v3/multisig/get-multisig-orders) | 10 | 1000 | Yes | +| [`multisig/wallets`](/ecosystem/api/toncenter/v3/multisig/get-multisig-wallets) | 10 | 1000 | Yes | +| [`transactionsByMasterchainBlock`](/ecosystem/api/toncenter/v3/blockchain-data/get-transactions-by-masterchain-block) | 10 | 1000 | Yes | +| [`jetton/masters`](/ecosystem/api/toncenter/v3/jettons/get-jetton-masters) | 10 | 1000 | No | +| [`nft/collections`](/ecosystem/api/toncenter/v3/nfts/get-nft-collections) | 10 | 1000 | No | +| [`dns/records`](/ecosystem/api/toncenter/v3/dns/get-dns-records) | 100 | 1000 | No | +| [`masterchainBlockShards`](/ecosystem/api/toncenter/v3/blockchain-data/get-masterchain-block-shard-state-1) | 10 | 1000 | No | +| [`topAccountsByBalance`](/ecosystem/api/toncenter/v3/stats/get-top-accounts-by-balance) | 10 | 1024 | No | +| [`transactionsByMessage`](/ecosystem/api/toncenter/v3/blockchain-data/get-transactions-by-message) | 10 | 1000 | No | +| [`vesting`](/ecosystem/api/toncenter/v3/vesting/get-vesting-contracts) | 10 | 1000 | No | All other v3 endpoints return single objects or fixed results and do not support pagination. @@ -38,11 +37,11 @@ All other v3 endpoints return single objects or fixed results and do not support These parameters are shared across all paginated endpoints. -| Parameter | Type | Required | Description | -| --------- | ------- | :------: | --------------------------------------------------------------------------------------------------------- | -| `limit` | integer | | Maximum number of rows to return. Defaults vary by endpoint (see table above). | -| `offset` | integer | | Number of rows to skip from the beginning of the result set. Default is `0`. | -| `sort` | string | | Sort order: `desc` (default, newest first) or `asc` (oldest first). Only available on sortable endpoints. | +| Parameter | Type | Description | +| --------- | ------- | --------------------------------------------------------------------------------------------------------- | +| `limit` | integer | Maximum number of rows to return. Defaults vary by endpoint; see table above. | +| `offset` | integer | Number of rows to skip from the beginning of the result set. Default is `0`. | +| `sort` | string | Sort order: `desc` (default, newest first) or `asc` (oldest first). Available only on sortable endpoints. | ## Pagination example @@ -52,7 +51,7 @@ This example uses the `transactions` endpoint, but the same `limit` and `offset` - Send a request with `account` and `limit`. No `offset` is needed for the first page (it defaults to `0`). + Send a request with `account` and `limit`. `offset` defaults to `0` for the first page. ```bash curl "https://toncenter.com/api/v3/transactions?account=EQDtFpEwcFAEcRe5mLVh2N6C0x-_hJEM7W61_JLnSF74p4q2&limit=3" @@ -236,7 +235,7 @@ Response (abbreviated): } ``` -With `sort=asc`, the earliest transactions are returned first (from July 2023 for this account). +With `sort=asc`, the earliest transactions are returned first, starting from 2023-07 for this account. From d51d9c223e9ee61c9e63cc0c82ea21cc53928299 Mon Sep 17 00:00:00 2001 From: aigerimu <89766357+aigerimu@users.noreply.github.com> Date: Thu, 19 Mar 2026 00:13:01 +0700 Subject: [PATCH 6/6] ai --- ecosystem/api/toncenter/v3-pagination.mdx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ecosystem/api/toncenter/v3-pagination.mdx b/ecosystem/api/toncenter/v3-pagination.mdx index da7cbbb2c..51aa3ba60 100644 --- a/ecosystem/api/toncenter/v3-pagination.mdx +++ b/ecosystem/api/toncenter/v3-pagination.mdx @@ -33,7 +33,7 @@ The following endpoints support pagination: All other v3 endpoints return single objects or fixed results and do not support pagination. -### Parameters +## Parameters These parameters are shared across all paginated endpoints. @@ -182,7 +182,7 @@ This example uses the `transactions` endpoint, but the same `limit` and `offset` Output: - ``` + ```bash --- Page 1 (offset=0) --- lt: 67064337000004 hash: KkpVTX9RwiZcug8KQuOFUF8+eNoxuHVuIFpGQqufCWU= lt: 67011337000003 hash: b5fhFby+j8gg936W+XEsAEhboQW0zPcOHOHgyqXkTwI= @@ -199,7 +199,7 @@ This example uses the `transactions` endpoint, but the same `limit` and `offset` ``` -## Sorting +## Sorting options Sortable endpoints accept a `sort` parameter with two values: