TON API at a glance
Get your own node endpoint today
Start for free and get your app to production levels immediately. No credit card required.You can sign up with your GitHub, X, Google, or Microsoft account.What is the TON protocol
TON (The Open Network) is a fully decentralized layer-1 blockchain designed for fast transactions and scalability. It was originally designed by Telegram and later developed by the open TON Community. TON uses a unique sharding mechanism to achieve high throughput and low latency. TON employs a Proof-of-Stake consensus mechanism where validators stake TON coins to participate in block production and validation. Unlike EVM chains, TON has no single chain ID — it organizes state into workchains: the masterchain (workchain-1) coordinates the network and stores consensus data, and the basechain (workchain 0) carries most user accounts and smart contracts.
What is the TON API
The TON API lets developers build decentralized applications on TON. It provides methods to read blockchain data, send transactions, and interact with smart contracts, jettons, and NFTs. To communicate with the TON blockchain, an application connects to a managed Chainstack TON node. Chainstack exposes two API surfaces on the same endpoint, and both serve the same data:- TON API v2 — the node API. It serves real-time requests directly off a node and also accepts JSON-RPC through the
/jsonRPCenvelope. - TON API v3 — the indexer. It serves processed, indexed data through REST endpoints, which suits complex queries and stable historical reads.
ADNL protocol support on dedicated nodes
TON dedicated nodes on Chainstack support the ADNL protocol for secure, low-level network communication. This enables advanced use cases requiring direct interaction with the TON network layer.TON API surface
The two surfaces differ in how they serve data, not in what data they cover.Methods
Chainstack serves 62 TON methods across the two HTTP API surfaces, all on the same endpoint:
For the complete, per-method reference, see TON methods. Both surfaces are priced the same — see TON billing below.
What you can build
With a Chainstack TON endpoint you can:- Read account state and balances with
/v2/getAddressInformation,/v2/getWalletInformation, and the v3/v3/accountand/v3/walletendpoints. - Send transactions by submitting a serialized message with
/v2/sendBocor/v2/sendBocReturnHash, and estimate fees first with/v2/estimateFee. - Read blocks and the masterchain with
/v2/getMasterchainInfo,/v2/lookupBlock, and the v3/v3/blocksendpoint. - Work with jettons (TON fungible tokens) through
/v3/jetton/masters,/v3/jetton/wallets, and/v3/jetton/transfers. - Work with NFTs through
/v3/nft/collections,/v3/nft/items, and/v3/nft/transfers. - Call smart contract get-methods with
/v2/runGetMethodor/v3/runGetMethod. - Trace and analyze activity with the v3 indexer —
/v3/traces,/v3/actions, and/v3/events.
How to start using the TON API
To use the TON API, you need access to a TON node. Follow these steps to sign up on Chainstack, deploy a TON node, and find your endpoint credentials: Now you are ready to connect to the TON blockchain and use the TON API to build your decentralized applications.SDKs and tooling
You can call the TON API directly over HTTP, or use a maintained SDK in your language. Point any SDK at your Chainstack endpoint:- JavaScript — TonWeb (
npm install tonweb) and Ton.js (npm install ton). - Python — TONsdk, PyTONLib, and Pytoniq.
- Go — TonUtils and tongo.
- Rust — Tonlib-rs.
- .NET — TonSdk.NET.
npm create ton@latest) with FunC and the Sandbox local test environment. See TON tooling for setup snippets across every SDK, supported wallets, and IDEs.
Networks
Chainstack supports both TON mainnet and testnet. TON nodes run in archive mode, so all historical data is available on every node, and both surfaces are served on each.TON has no debug and trace namespace and no EVM-style WebSocket subscriptions. For analyzing activity, use the v3 indexer endpoints —
/v3/traces, /v3/actions, and /v3/events.Frequently asked questions
What is the difference between TON API v2 and v3?
v2 is the node API: it serves real-time requests directly off a node and also accepts JSON-RPC. v3 is the indexer: it serves processed, structured data through REST, which suits complex queries and stable historical reads. Both are priced the same and expose the same data on Chainstack. Use v2 for the freshest data and v3 for cleaned, indexed data. See choosing v2 or v3.Does TON have an EVM chain ID?
No. TON is not EVM-compatible, so it has no numeric chain ID. Instead, TON organizes state into workchains — the masterchain (-1) and the basechain (0) — and addresses accounts and contracts by workchain.
How many TON methods does Chainstack support?
62, all served directly on Chainstack nodes: 28 on the v2 node API and 34 on the v3 indexer. See the TON methods reference for the full per-method list.How do I send a transaction on TON?
Serialize your message as a bag of cells (BOC) and submit it with/v2/sendBoc, or use /v2/sendBocReturnHash to get the transaction hash back. Most SDKs build and sign the BOC for you.
What are jettons on TON?
Jettons are TON’s fungible token standard (TEP-74), the equivalent of ERC-20 on EVM chains. Read jetton data through the v3 indexer with/v3/jetton/masters, /v3/jetton/wallets, /v3/jetton/transfers, and /v3/jetton/burns. See how to develop jettons and how to interact with jettons.
How is TON usage billed on Chainstack?
By request unit. Most TON requests are full (1 RU). Archive requests (2 RUs) apply to history reads —getTransactions and getTransactionsStd are always archive, and block/seqno methods are archive when the requested block is 128 or more seqno behind the tip. v2 and v3 are priced the same. See request units — TON method scope.
Does Chainstack support the ADNL protocol?
Yes, on dedicated nodes. ADNL is TON’s low-level network protocol for secure, direct interaction with the network layer. The HTTP API v2 and v3 surfaces cover most use cases; ADNL is for advanced, low-level needs. See TON tooling.Related TON resources
- TON methods — complete per-method API reference
- TON: choosing v2 or v3 — pick the right API surface
- TON tooling — SDKs, wallets, IDEs, and Blueprint setup
- TON: wallet initialization with TonWeb — deploy a wallet contract end to end
- TON: how to develop fungible tokens (jettons) — build jetton minter and wallet contracts
- TON: how to customize fungible tokens (jettons) — extend jettons with capped supply and mint price
- TON: how to interact with jettons — read jetton metadata, balances, and history
- TON: how to develop non-fungible tokens (NFT) — build NFT item and collection contracts