diff --git a/ecosystem/api/toncenter/v2-authentication.mdx b/ecosystem/api/toncenter/v2-authentication.mdx index bc293d5a0..6c262a0a2 100644 --- a/ecosystem/api/toncenter/v2-authentication.mdx +++ b/ecosystem/api/toncenter/v2-authentication.mdx @@ -85,8 +85,8 @@ curl "https://testnet.toncenter.com/api/v2/jsonRPC?api_key=" \ ## API key error codes -| Status | Error | Meaning | -| -----: | ------------------------ | ----------------------------------------------------------------------------------------------------------------- | -| `401` | `API key does not exist` | The provided key is invalid. Check for typos or generate a new key. | -| `403` | `Network not allowed` | The key was issued for a different network (e.g., testnet key on mainnet). Use a key matching the target network. | -| `429` | `Ratelimit exceeded` | Too many requests. Back off and retry, or use an API key for higher limits. | +| Status | Error | Meaning | +| ------ | ------------------------ | ---------------------------------------------------------------------------------------------------------------- | +| `401` | `API key does not exist` | The provided key is invalid. Check for typos or generate a new key. | +| `403` | `Network not allowed` | The key was issued for a different network; e.g., testnet key on mainnet. Use a key matching the target network. | +| `429` | `Ratelimit exceeded` | Too many requests. Back off and retry, or use an API key for higher limits. | diff --git a/ecosystem/api/toncenter/v2/overview.mdx b/ecosystem/api/toncenter/v2/overview.mdx index 9c202e287..461554da0 100644 --- a/ecosystem/api/toncenter/v2/overview.mdx +++ b/ecosystem/api/toncenter/v2/overview.mdx @@ -5,7 +5,7 @@ sidebarTitle: Overview import { Aside } from '/snippets/aside.jsx'; -The TON Center **API v2** provides developer access to TON Blockchain through [REST](https://en.wikipedia.org/wiki/REST) and [JSON-RPC](https://en.wikipedia.org/wiki/JSON-RPC) endpoints. It allows applications to read blockchain data, run smart contract methods, and send transactions. +The TON Center API v2 provides developer access to the TON blockchain through [REST](https://en.wikipedia.org/wiki/REST) and [JSON-RPC](https://en.wikipedia.org/wiki/JSON-RPC) endpoints. It allows applications to read blockchain data, run smart contract methods, and send transactions. API v2 serves as the non-indexed access layer. @@ -19,17 +19,17 @@ Applications interact with the TON blockchain by connecting to a TON node. Since | API | Mainnet | Testnet | | ---------- | ------------------------------ | -------------------------------------- | -| **API v2** | `https://toncenter.com/api/v2` | `https://testnet.toncenter.com/api/v2` | +| API v2 | `https://toncenter.com/api/v2` | `https://testnet.toncenter.com/api/v2` | ## Versioning API v2 uses semantic versioning in the format `a.b.c` (for example, `2.1.1`): -| Segment | Example | Meaning | -| --------- | ------- | ------------------------------------------------------------------- | -| **Major** | `2.x.x` | Fixed at `2` to avoid confusion ("API v2 v3.x.x"). Will not change. | -| **Minor** | `2.1.x` | Implementation variant: `0` = Python version, `1` = C++ version. | -| **Patch** | `2.1.1` | Bumped with every release on GitHub. | +| Segment | Example | Meaning | +| ------- | ------- | ------- | +| Major | `2.x.x` | Fixed at `2` to avoid confusion ("API v2 v3.x.x"). Will not change. | +| Minor | `2.1.x` | Implementation variant: `0` = Python version, `1` = C++ version. | +| Patch | `2.1.1` | Bumped with every release on GitHub. | ## Typical use cases @@ -85,8 +85,7 @@ Developers can access API v2 either through hosted infrastructure managed by TON ### Managed service -Hosted access uses TON Center's managed infrastructure instead of running a personal node. This approach enables -immediate network access without setup or maintenance. +Hosted access uses TON Center’s managed infrastructure instead of running a personal node. This approach enables immediate network access without setup or maintenance. Requests without an API key are limited to a default rate of 1 request per second. To increase this limit or access private liteservers, generate an [API key](/ecosystem/api/toncenter/get-api-key) and [choose a plan](/ecosystem/api/toncenter/rate-limit). diff --git a/ecosystem/api/toncenter/v3-authentication.mdx b/ecosystem/api/toncenter/v3-authentication.mdx index 803d5fa55..01b9af0a4 100644 --- a/ecosystem/api/toncenter/v3-authentication.mdx +++ b/ecosystem/api/toncenter/v3-authentication.mdx @@ -55,7 +55,7 @@ Both forms are equivalent. ## API key error codes | Status | Error | Meaning | -| -----: | ------------------------ | ----------------------------------------------------------------------------------------------------------------- | -| `401` | `API key does not exist` | The provided key is invalid. Check for typos or generate a new key. | -| `403` | `Network not allowed` | The key was issued for a different network (e.g., testnet key on mainnet). Use a key matching the target network. | -| `429` | `Ratelimit exceeded` | Too many requests. Back off and retry, or use an API key for higher limits. | +| ------ | ------------------------ | ----------------------------------------------------------------------------------------------------------------- | +| `401` | `API key does not exist` | The provided key is invalid. Check for typos or generate a new key. | +| `403` | `Network not allowed` | The key was issued for a different network (e.g., testnet key on mainnet). Use a key matching the target network. | +| `429` | `Ratelimit exceeded` | Too many requests. Back off and retry, or use an API key for higher limits. | diff --git a/ecosystem/api/toncenter/v3/overview.mdx b/ecosystem/api/toncenter/v3/overview.mdx index 57a6c40b9..78527ba09 100644 --- a/ecosystem/api/toncenter/v3/overview.mdx +++ b/ecosystem/api/toncenter/v3/overview.mdx @@ -19,7 +19,7 @@ It reads raw data from a node's RocksDB storage, parses and decodes it, and stor | API | Mainnet | Testnet | | ---------- | ------------------------------ | -------------------------------------- | -| **API v3** | `https://toncenter.com/api/v3` | `https://testnet.toncenter.com/api/v3` | +| API v3 | `https://toncenter.com/api/v3` | `https://testnet.toncenter.com/api/v3` | ## Typical use cases @@ -33,42 +33,42 @@ It reads raw data from a node's RocksDB storage, parses and decodes it, and stor {/* BEGIN_AUTO_GENERATED: API_V3_ENDPOINTS */} | Category | Method | Description | | -------- | ------ | ----------- | -| **Accounts** | [`GET /accountStates`](/ecosystem/api/toncenter/v3/accounts/get-account-states) | Get Account States | -| **Accounts** | [`GET /addressBook`](/ecosystem/api/toncenter/v3/accounts/address-book) | Address Book | -| **Accounts** | [`GET /metadata`](/ecosystem/api/toncenter/v3/accounts/metadata) | Metadata | -| **Accounts** | [`GET /walletStates`](/ecosystem/api/toncenter/v3/accounts/get-wallet-states) | Get Wallet States | -| **Actions and traces** | [`GET /actions`](/ecosystem/api/toncenter/v3/actions-and-traces/get-actions) | Get Actions | -| **Actions and traces** | [`GET /pendingActions`](/ecosystem/api/toncenter/v3/actions-and-traces/get-pending-actions) | Get Pending Actions | -| **Actions and traces** | [`GET /pendingTraces`](/ecosystem/api/toncenter/v3/actions-and-traces/get-pending-traces) | Get Pending Traces | -| **Actions and traces** | [`GET /traces`](/ecosystem/api/toncenter/v3/actions-and-traces/get-traces) | Get Traces | -| **Blockchain Data** | [`GET /adjacentTransactions`](/ecosystem/api/toncenter/v3/blockchain-data/get-adjacent-transactions) | Get Adjacent Transactions | -| **Blockchain Data** | [`GET /blocks`](/ecosystem/api/toncenter/v3/blockchain-data/get-blocks) | Get blocks | -| **Blockchain Data** | [`GET /masterchainBlockShardState`](/ecosystem/api/toncenter/v3/blockchain-data/get-masterchain-block-shard-state) | Get masterchain block shard state | -| **Blockchain Data** | [`GET /masterchainBlockShards`](/ecosystem/api/toncenter/v3/blockchain-data/get-masterchain-block-shard-state) | Get masterchain block shard state | -| **Blockchain Data** | [`GET /masterchainInfo`](/ecosystem/api/toncenter/v3/blockchain-data/get-masterchain-info) | Get Masterchain Info | -| **Blockchain Data** | [`GET /messages`](/ecosystem/api/toncenter/v3/blockchain-data/get-messages) | Get messages | -| **Blockchain Data** | [`GET /pendingTransactions`](/ecosystem/api/toncenter/v3/blockchain-data/get-pending-transactions) | Get pending transactions | -| **Blockchain Data** | [`GET /transactions`](/ecosystem/api/toncenter/v3/blockchain-data/get-transactions) | Get transactions | -| **Blockchain Data** | [`GET /transactionsByMasterchainBlock`](/ecosystem/api/toncenter/v3/blockchain-data/get-transactions-by-masterchain-block) | Get transactions by Masterchain block | -| **Blockchain Data** | [`GET /transactionsByMessage`](/ecosystem/api/toncenter/v3/blockchain-data/get-transactions-by-message) | Get transactions by message | -| **Jettons** | [`GET /jetton/burns`](/ecosystem/api/toncenter/v3/jettons/get-jetton-burns) | Get Jetton Burns | -| **Jettons** | [`GET /jetton/masters`](/ecosystem/api/toncenter/v3/jettons/get-jetton-masters) | Get Jetton Masters | -| **Jettons** | [`GET /jetton/transfers`](/ecosystem/api/toncenter/v3/jettons/get-jetton-transfers) | Get Jetton Transfers | -| **Jettons** | [`GET /jetton/wallets`](/ecosystem/api/toncenter/v3/jettons/get-jetton-wallets) | Get Jetton Wallets | -| **NFTs** | [`GET /nft/collections`](/ecosystem/api/toncenter/v3/nfts/get-nft-collections) | Get NFT collections | -| **NFTs** | [`GET /nft/items`](/ecosystem/api/toncenter/v3/nfts/get-nft-items) | Get NFT items | -| **NFTs** | [`GET /nft/transfers`](/ecosystem/api/toncenter/v3/nfts/get-nft-transfers) | Get NFT Transfers | -| **Dns** | [`GET /dns/records`](/ecosystem/api/toncenter/v3/dns/get-dns-records) | Get DNS Records | -| **Multisig** | [`GET /multisig/orders`](/ecosystem/api/toncenter/v3/multisig/get-multisig-orders) | Get Multisig Orders | -| **Multisig** | [`GET /multisig/wallets`](/ecosystem/api/toncenter/v3/multisig/get-multisig-wallets) | Get Multisig Wallets | -| **Vesting** | [`GET /vesting`](/ecosystem/api/toncenter/v3/vesting/get-vesting-contracts) | Get Vesting Contracts | -| **Stats** | [`GET /topAccountsByBalance`](/ecosystem/api/toncenter/v3/stats/get-top-accounts-by-balance) | Get Top Accounts By Balance | -| **Utils** | [`GET /decode`](/ecosystem/api/toncenter/v3/utils/decode-opcodes-and-bodies) | Decode Opcodes and Bodies | -| **Legacy (v2)** | [`GET /addressInformation`](/ecosystem/api/toncenter/v3/apiv2/get-address-information) | Get Address Information | -| **Legacy (v2)** | [`POST /estimateFee`](/ecosystem/api/toncenter/v3/apiv2/estimate-fee) | Estimate Fee | -| **Legacy (v2)** | [`POST /message`](/ecosystem/api/toncenter/v3/apiv2/send-message) | Send Message | -| **Legacy (v2)** | [`POST /runGetMethod`](/ecosystem/api/toncenter/v3/apiv2/run-get-method) | Run Get-Method | -| **Legacy (v2)** | [`GET /walletInformation`](/ecosystem/api/toncenter/v3/apiv2/get-wallet-information) | Get Wallet Information | +| Accounts | [`GET /accountStates`](/ecosystem/api/toncenter/v3/accounts/get-account-states) | Get Account States | +| Accounts | [`GET /addressBook`](/ecosystem/api/toncenter/v3/accounts/address-book) | Address Book | +| Accounts | [`GET /metadata`](/ecosystem/api/toncenter/v3/accounts/metadata) | Metadata | +| Accounts | [`GET /walletStates`](/ecosystem/api/toncenter/v3/accounts/get-wallet-states) | Get Wallet States | +| Actions and traces | [`GET /actions`](/ecosystem/api/toncenter/v3/actions-and-traces/get-actions) | Get Actions | +| Actions and traces | [`GET /pendingActions`](/ecosystem/api/toncenter/v3/actions-and-traces/get-pending-actions) | Get Pending Actions | +| Actions and traces | [`GET /pendingTraces`](/ecosystem/api/toncenter/v3/actions-and-traces/get-pending-traces) | Get Pending Traces | +| Actions and traces | [`GET /traces`](/ecosystem/api/toncenter/v3/actions-and-traces/get-traces) | Get Traces | +| Blockchain data | [`GET /adjacentTransactions`](/ecosystem/api/toncenter/v3/blockchain-data/get-adjacent-transactions) | Get Adjacent Transactions | +| Blockchain data | [`GET /blocks`](/ecosystem/api/toncenter/v3/blockchain-data/get-blocks) | Get blocks | +| Blockchain data | [`GET /masterchainBlockShardState`](/ecosystem/api/toncenter/v3/blockchain-data/get-masterchain-block-shard-state) | Get masterchain block shard state | +| Blockchain data | [`GET /masterchainBlockShards`](/ecosystem/api/toncenter/v3/blockchain-data/get-masterchain-block-shard-state) | Get masterchain block shard state | +| Blockchain data | [`GET /masterchainInfo`](/ecosystem/api/toncenter/v3/blockchain-data/get-masterchain-info) | Get Masterchain Info | +| Blockchain data | [`GET /messages`](/ecosystem/api/toncenter/v3/blockchain-data/get-messages) | Get messages | +| Blockchain data | [`GET /pendingTransactions`](/ecosystem/api/toncenter/v3/blockchain-data/get-pending-transactions) | Get pending transactions | +| Blockchain data | [`GET /transactions`](/ecosystem/api/toncenter/v3/blockchain-data/get-transactions) | Get transactions | +| Blockchain data | [`GET /transactionsByMasterchainBlock`](/ecosystem/api/toncenter/v3/blockchain-data/get-transactions-by-masterchain-block) | Get transactions by Masterchain block | +| Blockchain data | [`GET /transactionsByMessage`](/ecosystem/api/toncenter/v3/blockchain-data/get-transactions-by-message) | Get transactions by message | +| Jettons | [`GET /jetton/burns`](/ecosystem/api/toncenter/v3/jettons/get-jetton-burns) | Get Jetton Burns | +| Jettons | [`GET /jetton/masters`](/ecosystem/api/toncenter/v3/jettons/get-jetton-masters) | Get Jetton Masters | +| Jettons | [`GET /jetton/transfers`](/ecosystem/api/toncenter/v3/jettons/get-jetton-transfers) | Get Jetton Transfers | +| Jettons | [`GET /jetton/wallets`](/ecosystem/api/toncenter/v3/jettons/get-jetton-wallets) | Get Jetton Wallets | +| NFTs | [`GET /nft/collections`](/ecosystem/api/toncenter/v3/nfts/get-nft-collections) | Get NFT collections | +| NFTs | [`GET /nft/items`](/ecosystem/api/toncenter/v3/nfts/get-nft-items) | Get NFT items | +| NFTs | [`GET /nft/transfers`](/ecosystem/api/toncenter/v3/nfts/get-nft-transfers) | Get NFT Transfers | +| Dns | [`GET /dns/records`](/ecosystem/api/toncenter/v3/dns/get-dns-records) | Get DNS Records | +| Multisig | [`GET /multisig/orders`](/ecosystem/api/toncenter/v3/multisig/get-multisig-orders) | Get Multisig Orders | +| Multisig | [`GET /multisig/wallets`](/ecosystem/api/toncenter/v3/multisig/get-multisig-wallets) | Get Multisig Wallets | +| Vesting | [`GET /vesting`](/ecosystem/api/toncenter/v3/vesting/get-vesting-contracts) | Get Vesting Contracts | +| Stats | [`GET /topAccountsByBalance`](/ecosystem/api/toncenter/v3/stats/get-top-accounts-by-balance) | Get Top Accounts By Balance | +| Utils | [`GET /decode`](/ecosystem/api/toncenter/v3/utils/decode-opcodes-and-bodies) | Decode Opcodes and Bodies | +| Legacy (v2) | [`GET /addressInformation`](/ecosystem/api/toncenter/v3/apiv2/get-address-information) | Get Address Information | +| Legacy (v2) | [`POST /estimateFee`](/ecosystem/api/toncenter/v3/apiv2/estimate-fee) | Estimate Fee | +| Legacy (v2) | [`POST /message`](/ecosystem/api/toncenter/v3/apiv2/send-message) | Send Message | +| Legacy (v2) | [`POST /runGetMethod`](/ecosystem/api/toncenter/v3/apiv2/run-get-method) | Run Get-Method | +| Legacy (v2) | [`GET /walletInformation`](/ecosystem/api/toncenter/v3/apiv2/get-wallet-information) | Get Wallet Information | {/* END_AUTO_GENERATED: API_V3_ENDPOINTS */} ## How to access the API @@ -77,12 +77,10 @@ Developers can access TON Center API v3 either through hosted infrastructure or ### Managed service -Hosted access uses TON Center’s indexed infrastructure. -Requests without an API key are rate-limited to a default value. +Hosted access uses TON Center’s indexed infrastructure. Requests without an API key are rate-limited to a default value. To increase limits, generate an [API key](/ecosystem/api/toncenter/get-api-key) and select a [plan](/ecosystem/api/toncenter/rate-limit). ### Self-hosted service -Run a self-hosted API v3 setup for full control over performance and data retention. -See the [ton-indexer](https://github.com/toncenter/ton-indexer) repository for setup instructions. +Run a self-hosted API v3 setup for full control over performance and data retention. For setup instructions, use the [ton-indexer](https://github.com/toncenter/ton-indexer) repository.