TON Api
Introduction

About

This API is designed to provide users with a simple and streamlined experience, eliminating the complexity of the TON blockchain. For instance, you don't need to worry about supporting all wallet standards, performing verifications, or decoding raw bits and bytes. We aim to streamline the process for you, so you can focus on utilizing the functionality of the API without getting bogged down by technical details.

To prevent confusion, some data is hidden. However, if you require raw blockchain data, you can use our http-to-adnl proxy methods to fetch raw data from a light server.

Authorization

All methods are available without authentication, but with a rate limit of 1 request per 4 seconds (0.24 rps).

To authorize your request, you will need a token, which you can obtain from https://tonconsole.com/ (opens in a new tab). Here is an example of a token: AGZVOXZ3SLHOAA4TRVL4DWQ5DUZK25MSEIGXAFHZ43TMPGXQ6NZZXEWROYSJHCONGSFITLI.

To pass the token in your request, please add the Authorization HTTP header with the "Bearer scheme." Here is an example:

curl \
 -H 'Authorization: Bearer AGZVOXZ3SLHOAA4TRVL4DWQ5DUZK25MSEIGXAFHZ43TMPGXQ6NZZXEWROYSJHCONGSFITLI' \
 'https://tonapi.io/v2/blockchain/masterchain-head'

Limits

The rate limits for all of your issued tokens are the same and match the plan you have. The rate limits are the same for both the testnet and mainnet (if you're paying for a 10 rps plan, you'll get 10 rps in the testnet and 10 rps in the mainnet).

Learn more about tiers and limit on TonConsole (opens in a new tab)

launch you own TonAPI node

There is a separate limited open-source version of TonAPI available at https://github.com/tonkeeper/opentonapi (opens in a new tab). This version does not require a full blockchain index.

Some data that requires full node sync, such as (jettons, NFTs, and full account information), may not be visible through this version of TonAPI, but all of the basic functionality is in place.

Opentonapi can also work on private light server nodes as well as public ones.

FAQ

What is happening with the current TonAPI version?

The current TonAPI v1 will remain free to use. We are launching a new v2 version of TonAPI, which is a paid version with rate limits.

What will happen with the old v1 version?

Support for the old v1 version will continue for several months, after which support will be discontinued. However, v1 will still be accessible.

Why do you need a paid TonAPI if there is toncenter/v4/orbs?

All of them have their own limitations. TonAPI is designed for high-load use, so it has to be paid to cover the cost of infrastructure and scale. We built our API with usability and the comfort of developers in mind. Our goal is to build the most user-friendly, easy-to-use, robust, and powerful API for the TON blockchain, but the choice is ultimately yours.