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 account state and balance
AccountsGET /getExtendedAddressInformationGet detailed account state (extended)
AccountsGET /getWalletInformationGet wallet information
AccountsGET /getTransactionsList account transactions
AccountsGET /getAddressBalanceGet account balance only
AccountsGET /getAddressStateGet account lifecycle state
AccountsGET /packAddressConvert raw address to user-friendly format
AccountsGET /unpackAddressConvert user-friendly address to raw format
AccountsGET /getTokenDataGet NFT or Jetton metadata
AccountsGET /detectAddressDetect all address formats
BlocksGET /getMasterchainInfoGet latest masterchain info
BlocksGET /getMasterchainBlockSignaturesGet masterchain block signatures
BlocksGET /getShardBlockProofGet shard block proof
BlocksGET /getConsensusBlockGet latest consensus block
BlocksGET /lookupBlockLook up block by height, LT, or timestamp
BlocksGET /shardsGet shards at masterchain seqno
BlocksGET /getBlockTransactionsList block transactions
BlocksGET /getBlockTransactionsExtList block transactions (extended details)
BlocksGET /getBlockHeaderGet block header metadata
BlocksGET /getLibrariesGet smart contract libraries
BlocksGET /getOutMsgQueueSizesGet outgoing message queue sizes
TransactionsGET /tryLocateTxLocate transaction by incoming message
TransactionsGET /tryLocateResultTxLocate result transaction by incoming message
TransactionsGET /tryLocateSourceTxLocate source transaction by outgoing message
JSON-RPCPOST /jsonRPCJSON-RPC handler
ConfigGET /getConfigParamGet single config parameter
ConfigGET /getConfigAllGet all config parameters
Messages and transactionsPOST /sendBocSend external message (BoC)
Messages and transactionsPOST /sendBocReturnHashSend external message and return hash
Messages and transactionsPOST /sendQuerySend unpacked external query
Messages and transactionsPOST /estimateFeeEstimate transaction fees
Smart contractsPOST /runGetMethodRun get-method on contract

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.