Skip to main content
The TON Center API v2 provides developer access to the 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 a 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

APIMainnetTestnet
API v2https://toncenter.com/api/v2https://testnet.toncenter.com/api/v2

Versioning

API v2 uses semantic versioning in the format a.b.c (for example, 2.1.1):
SegmentExampleMeaning
Major2.x.xFixed at 2 to avoid confusion (“API v2 v3.x.x”). Will not change.
Minor2.1.xImplementation variant: 0 = Python version, 1 = C++ version.
Patch2.1.1Bumped 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

CategoryMethodDescription
AccountsGET /getAddressInformationGet address information
AccountsGET /getExtendedAddressInformationGet extended address information
AccountsGET /getWalletInformationGet wallet information
AccountsGET /getAddressBalanceGet address balance
AccountsGET /getAddressStateGet address state
AccountsGET /getTokenDataGet token data
BlocksGET /getMasterchainInfoGet masterchain info
BlocksGET /getMasterchainBlockSignaturesGet masterchain block signatures
BlocksGET /getShardBlockProofGet shard block proof
BlocksGET /getConsensusBlockGet consensus block
BlocksGET /lookupBlockLookup block
BlocksGET /getShardsGet shards
BlocksGET /getBlockHeaderGet block header
BlocksGET /getOutMsgQueueSizeGet outbound message queue size
TransactionsGET /getBlockTransactionsGet block transactions
TransactionsGET /getBlockTransactionsExtGet block transactions (extended)
TransactionsGET /getTransactionsGet transactions
TransactionsGET /getTransactionsStdGet transactions (standard)
TransactionsGET /tryLocateTxTry locate transaction
TransactionsGET /tryLocateResultTxTry locate result transaction
TransactionsGET /tryLocateSourceTxTry locate source transaction
SendPOST /sendBocSend BoC
SendPOST /sendBocReturnHashSend BoC (return hash)
SendPOST /estimateFeeEstimate fee
Run methodPOST /runGetMethodRun get method
Run methodPOST /runGetMethodStdRun get method (standard)
UtilsGET /detectAddressDetect address
UtilsGET /detectHashDetect hash
UtilsGET /packAddressPack address
UtilsGET /unpackAddressUnpack address
ConfigurationGET /getConfigParamGet config parameter
ConfigurationGET /getConfigAllGet all config parameters
ConfigurationGET /getLibrariesGet libraries
RPCPOST /jsonRPCJSON-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.