Query TON blockchain data through the REST API. The SDK exposes resource groups as attributes onDocumentation Index
Fetch the complete documentation index at: https://tonapi.ness.su/llms.txt
Use this file to discover all available pages before exploring further.
TonapiRestClient.
API key is optional — without a key, requests are throttled to ~1 per 4 seconds. Get a key at tonconsole.com.
Quick Example
Resources
| Resource | Description |
|---|---|
tonapi.accounts | Account info, balances, events, traces, subscriptions. |
tonapi.blockchain | Blocks, transactions, validators, config, raw account. |
tonapi.connect | TON Connect payload and state init. |
tonapi.dns | Domain info, resolve, bids, auctions. |
tonapi.emulation | Message decoding and event/trace/wallet emulation. |
tonapi.events | Event lookup and emulation. |
tonapi.extra_currency | Extra currency info. |
tonapi.gasless | Gasless config, estimation, and sending. |
tonapi.jettons | Jetton info, holders, transfers, events. |
tonapi.lite_server | Direct lite server access (raw blockchain data). |
tonapi.multisig | Multisig accounts and orders. |
tonapi.nft | Collections, items, history. |
tonapi.purchases | Purchase history. |
tonapi.rates | Token rates, charts, markets. |
tonapi.staking | Nominator pools, staking info, history. |
tonapi.storage | Storage providers. |
tonapi.traces | Trace lookup and emulation. |
tonapi.utilities | OpenAPI spec, status, address parsing. |
tonapi.wallet | Wallet info, seqno, TON Connect proof, emulation. |
Endpoints
| Network | URL |
|---|---|
| Mainnet | https://tonapi.io |
| Testnet | https://testnet.tonapi.io |
| Tetra | https://tetra.tonapi.io |