Toncenter API
812 subscribers
6 photos
40 links
Updates and announcements of https://toncenter.com — fast and reliable HTTP API for TON (The Open Network).

Bot @toncenter.

API is developed by the TON Core team @toncore.
Download Telegram
Channel created
Migration required for early adopters of Toncenter V3

In anticipation of the public release of Toncenter V3, we have made final edits to the V3 API:

— hashes are now in base64 instead of hex;

— methods that returns an array (e.g. /transactions) now return an object with an array {transactions: []};

_friendly address fields in each object replaced by address_book hashmap;

transaction.account_state_after_hash and transaction.account_state_before_hash removed;

This latest version of V3 is now on stage.toncenter.com/api/v3 and stage-testnet.toncenter.com/api/v3.

Next week on Monday, Feb 19, 2024, toncenter.com/api/v3 and testnet.toncenter.com/api/v3 will be replaced on this new V3 version. The stage will also remain available.

The current V3 version is backed up at migrate.toncenter.com/api/v3 and migrate-testnet.toncenter.com/api/v3 and will be available for a month.

Required actions

If you are an early adopter of toncenter.com/api/v3 please:

— switch your product to migrate endpoint;

— then migrate your product to new V3 API format located on stage;

If you are not yet a V3 user - we are happy to invite you to try it next week after the public release.

No action is required from V2 API users.
👌8👍65🔥4
Meet the Toncenter API V3

It's an Indexer TON API, and we also call it "Turbo Indexer" because it's really fast: the indexer written in C++ works directly with the node database.

We started developing it while preparing for the world TPS record, when it became clear that the TON blockchain was holding a lot of load, but the supporting infrastructure wasn't always keeping up.

Key Features:

— Unprecedented indexing performance;

— Accounts, transactions, messages and blocks API. More methods and data than API V2;

— Jettons and NFTs API;

— Address Reform API;

— The naming of fields and structures is the same or close to the naming in the node;

— Fully open source, GPL-3.0 license;

— You can run your instance (archive node required);

In the next step, we plan to expand the V3 functionality even further.

We will also continue to support API V2, which makes queries directly to node and is indispensable for some tasks.

Mainnet API V3 - https://toncenter.com/api/v3/

Testnet API V3 - https://testnet.toncenter.com/api/v3/

API Keys - @tonapibot

Sources - https://github.com/toncenter/ton-indexer
🔥9👍6🍾41
Address Reform API

/transactions

The response of the /api/v3/transactions method contains the address_book hashmap.

The key is the address in raw form, and the value is the user-friendly form of that address in clear accordance with the address reform.

The address_book hashmap contains all addresses that are contained in the transactions array (in the source, destination, and any other fields).

Please use this for displaying addresses in the UI of your services - for example, in the wallet transaction history or on the account or transaction page in explorer.

address_to_display_in_ui = response.address_book[raw_address]

/wallet

If you need to determine how to display one specific address, use the /api/v3/wallet method.

If "status" is "uninit" or "wallet_type" starts with "wallet" then use non-bounceable form, in all other cases, use bounceable form.

Testnet

Testnet v3 API returns addresses with testnet flag.

Summary

We've done it all for you, just use address_book.
👍9🔥2
Toncenter extended plans

We have done extensive work on upgrading the Toncenter infrastructure and are happy to note that now more than 100 servers are running on our system. In addition, we have implemented the ability to dynamically add new ton-http-api instances in runtime.

In order to be able to provide you with the expected level of performance we are introducing extended plans:

Free: 1 API Key, 10 RPS;

Plus: 3 API Keys, 25 RPS, Privately hosted Liteservers, 5.9 TON / month;

Advanced: 10 API Keys, 100 RPS, Privately hosted Liteservers, 59 TON / month;

Free open source code is still available, so you can run a fully functional api yourself.

We guarantee that a free plan will always exist at toncenter.com, for a quick start for developers. However, if you are developing a popular service or a service that needs high uptime, we recommend that you consider an extended plan.

You can check out the plans in our bot @tonapibot.
👍124🔥4😁2
Toncenter API v3 updates

— Method /api/v3/transactions now supports querying transactions for multiple account using parameter "account".

— Method /api/v3/nft/items can find NFT in collection by it's index.
Prices for extended plans have been reduced to 2.5 TON and 25 TON.
🫡15
ton-http-api 2.0.42 is released!

For correct work with jettons developers, services and exchanges should always make all checks described here.

For your convenience, we added check #3 from list above directly to getTokenData endpoint of ton-http-api version 2.0.42.

Now correspondence between jetton wallet and it's jetton master is checked both in toncenter v2 and toncenter v3 API endpoints (in v3 such a check existed from beginning).

If you are using local ton-http-api please update!

https://github.com/toncenter/ton-http-api/releases/tag/v2.0.42
👍7
Maintenance of TON Center

In next couple hours we have to restart all Lite Servers, so toncenter.com/api/v2 and toncenter.com/api/v3 will by out of sync for 5-10 minutes during this period of time.
3👍2👏1
The maintenance is finished. Total out of sync time is 10,5 minutes.
👍9
Old /index API is deprecated

Old Toncenter Index API https://toncenter.com/api/index/ is deprecated and will stop working on December 31, 2024.

Please switch your products to the Toncenter Index V3 API https://toncenter.com/api/v3, which is much faster and more functional.