Documentation Index
Fetch the complete documentation index at: https://companyname-a7d5b98e-vanity-edits.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
The TON Center API v2 provides developer access to TON Blockchain through REST and 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.
Applications interact with the TON blockchain by connecting to a TON node. Since nodes communicate through the binary ADNL protocol, an intermediate layer is needed for web-based access. API v2 provides this bridge by using tonlib to query data from liteservers and exposes it through a standard REST interface.
Base URLs
| API | Mainnet | Testnet |
|---|
| 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. |
Typical use cases
- Query account balances and state
- Run get-methods on smart contracts
- Send or broadcast messages
- Retrieve latest transactions and block information
Endpoints
| Category | Method | Description |
|---|
| Accounts | GET /getAddressInformation | Get address information |
| Accounts | GET /getExtendedAddressInformation | Get extended address information |
| Accounts | GET /getWalletInformation | Get wallet information |
| Accounts | GET /getAddressBalance | Get address balance |
| Accounts | GET /getAddressState | Get address state |
| Accounts | GET /getTokenData | Get token data |
| Blocks | GET /getMasterchainInfo | Get masterchain info |
| Blocks | GET /getMasterchainBlockSignatures | Get masterchain block signatures |
| Blocks | GET /getShardBlockProof | Get shard block proof |
| Blocks | GET /getConsensusBlock | Get consensus block |
| Blocks | GET /lookupBlock | Lookup block |
| Blocks | GET /getShards | Get shards |
| Blocks | GET /getBlockHeader | Get block header |
| Blocks | GET /getOutMsgQueueSize | Get outbound message queue size |
| Transactions | GET /getBlockTransactions | Get block transactions |
| Transactions | GET /getBlockTransactionsExt | Get block transactions (extended) |
| Transactions | GET /getTransactions | Get transactions |
| Transactions | GET /getTransactionsStd | Get transactions (standard) |
| Transactions | GET /tryLocateTx | Try locate transaction |
| Transactions | GET /tryLocateResultTx | Try locate result transaction |
| Transactions | GET /tryLocateSourceTx | Try locate source transaction |
| Send | POST /sendBoc | Send BoC |
| Send | POST /sendBocReturnHash | Send BoC (return hash) |
| Send | POST /estimateFee | Estimate fee |
| Run method | POST /runGetMethod | Run get method |
| Run method | POST /runGetMethodStd | Run get method (standard) |
| Utils | GET /detectAddress | Detect address |
| Utils | GET /detectHash | Detect hash |
| Utils | GET /packAddress | Pack address |
| Utils | GET /unpackAddress | Unpack address |
| Configuration | GET /getConfigParam | Get config parameter |
| Configuration | GET /getConfigAll | Get all config parameters |
| Configuration | GET /getLibraries | Get libraries |
| RPC | POST /jsonRPC | JSON-RPC endpoint |
How to access the API
Developers can access API v2 either through hosted infrastructure managed by TON Center or by running a self-hosted instance.
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.
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 and choose a plan.
Self-hosted service
Run a self-hosted TON Center API v2 infrastructure for full control over performance and data retention. See the API v2 repository for setup instructions.