TON HTTP-based APIs
tip
There are different ways to connect to blockchain:
- RPC data provider or another API: in most cases, you have to rely on its stability and security.
- ADNL connection: you're connecting to a liteserver. They might be inaccessible, but with a certain level of validation (implemented in the library), cannot lie.
- Tonlib binary: you're connecting to liteserver as well, so all benefits and downsides apply, but your application also contains a dynamic-loading library compiled outside.
- Offchain-only. Such SDKs allow to create and serialize cells, which you can then send to APIs.
Pros & Cons
✅ Habitual and suitable for a quick start, this is perfect for every newcomer looking to play with TON.
✅ Web-oriented. Perfect to load data of TON smart contracts from Web, also allows to send messages there.
❌ Simplified. It's not possible to receive information where you need an indexed TON API.
❌ HTTP-Middleware. You can't fully trust server responses, unless server augments blockchain data with Merkle proofs to allow validation that it is genuine.
RPC Nodes
- GetBlock Nodes — connect and test your dApps using GetBlocks Nodes
- TON Access - HTTP API for The Open Network (TON).
- Toncenter — community-hosted project for Quick Start with API. (Get an API key @tonapibot)
- ton-node-docker - Docker Full Node and Toncenter API.
- toncenter/ton-http-api — run your own RPC node.
- nownodes.io — NOWNodes full Nodes and blockbook Explorers via API.
- Chainbase — Node API and data infrastructure for The Open Network.
Indexer
Toncenter TON Index
Indexers allow to list jetton wallets, NFTs, transactions by certain filters, not only retrieve specific ones.
- Public TON Index can be used: tests and development are for free, premium for production - toncenter.com/api/v3/.
- Run your own TON Index with Worker and TON Index API wrapper.
GraphQL Nodes
GraphQL nodes act as indexers as well.
- tvmlabs.io (for TON, testnet only at the moment of writing) - has wide variety of transaction/block data, ways to filter it, etc.
- dton.io - as well as providing contracts data augmented with parsed "is jetton", "is NFT" flags, allows emulating transactions and receiving execution traces.
Other APIs
- TonAPI - API that is designed to provide users with a streamlined experience, not worrying about low-level details of smart contracts.