Skip to main content

TON HTTP-based APIs

tip

There are different ways to connect to blockchain:

  1. RPC data provider or another API: in most cases, you have to rely on its stability and security.
  2. 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.
  3. 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.
  4. 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

Indexer

Toncenter TON Index

Indexers allow to list jetton wallets, NFTs, transactions by certain filters, not only retrieve specific ones.

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.