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
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🍾4❤1
Address Reform API
/transactions
The response of the /api/v3/transactions method contains the
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
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.
/wallet
If you need to determine how to display one specific address, use the /api/v3/wallet method.
If
Testnet
Testnet v3 API returns addresses with testnet flag.
Summary
We've done it all for you, just use
/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.
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.
👍12❤4🔥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.
— 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.
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
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.
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
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.
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.
Toncenter Technical Support
If you find a bug or issue in Toncenter, you can report it to @toncenter_support. Messages are processed in order of priority.
If you find a bug or issue in Toncenter, you can report it to @toncenter_support. Messages are processed in order of priority.
👍3
Mintless jettons support
Toncenter supports mintless jettons, check on preview.toncenter.com!
Now for jettons that allow mintless claim v3/jetton/wallets API returns additional field:
How to support mintless jettons in your dapp?
— To show balance with mintless, use
— To autoclaim on transaction, when your dapp asks user to send outgoing jetton transfer via TonConnect, check if
— That's it. Now you support mintless jettons!
P.S. Note that now
Toncenter supports mintless jettons, check on preview.toncenter.com!
Now for jettons that allow mintless claim v3/jetton/wallets API returns additional field:
"mintless_info": {
"amount": "<amount-as-string>",
"start_from": <unix-timestamp>,
"expire_at": <unix-timestamp>
}
How to support mintless jettons in your dapp?
— To show balance with mintless, use
data["balance"] + data["mintless_info"]["amount"]— To autoclaim on transaction, when your dapp asks user to send outgoing jetton transfer via TonConnect, check if
data["mintless_info"] is present and retrieve from mintless jetton claim api custom_payload and init_data to fill them in to transfer. — That's it. Now you support mintless jettons!
P.S. Note that now
code_hash and data_hash fields can be null for not yet deployed jettons wallets.👍12❤11👎2🔥2
Partial out of sync for API v3
We've faced out of sync for some of our indexer databases from 5:45utc to 8:15utc. Now the issue is fixed.
We've faced out of sync for some of our indexer databases from 5:45utc to 8:15utc. Now the issue is fixed.
👎4❤3
We are pleased to announce that the mainnet API key bot is available at the new short username @toncenter.
🔥4👍3❤1
Due to network issues the API v3 was out of sync from 13:48UTC to 13:54UTC. Now, the API v3 is fully operational.
🤮5🤔2
Introducing the Domain API
Now the /accountStates method returns the .ton/.t.me domain bound to the specified account in the
In other methods, such as transaction list, you will also find domains in
In case there are several domains bound to an account, the shortest one is returned.
Mainnet API
Now the /accountStates method returns the .ton/.t.me domain bound to the specified account in the
address_book field.In other methods, such as transaction list, you will also find domains in
address_book.In case there are several domains bound to an account, the shortest one is returned.
Mainnet API
❤4
Introducing the Action API
The Toncenter Indexer now recognizes user-friendly actions among transaction series, such as staking, exchanging Jettons on DeDust DEX, or sending NFTs. A set of filters is available.
Supported Actions:
Basic
— Toncoin transfer
— Call contract
— Contract deploy
System
— Deposit stake to elector
— Recover stake to elector
— Tick-tock
Jettons
— Transfer
— Burn
— Mint
NFT
— Transfer
— Mint
Nominator Pool
— Deposit
— Withdraw
@stakee/TonStakers
— Deposit
— Withdraw
DeDust DEX
— Swap
— Add liquidity
— Withdraw liquidity
Ston-fi DEX
— Swaps v1
— Swaps v2
— Add liquidity v2
— Withdraw liquidity v2
NFT Auctions
— Bidding (Fragment, ton.diamonds, Getgems)
TON DNS
— Renew domain
— Change DNS record
— Delete DNS record
W4R2 Toncoin Subscriptions
— Subscribe
— Unsubscribe
The Toncenter team will continue to work and will be adding new action types in the next versions.
Also the /trace method now supports the
Mainnet API
Testnet API
The Toncenter Indexer now recognizes user-friendly actions among transaction series, such as staking, exchanging Jettons on DeDust DEX, or sending NFTs. A set of filters is available.
Supported Actions:
Basic
— Toncoin transfer
— Call contract
— Contract deploy
System
— Deposit stake to elector
— Recover stake to elector
— Tick-tock
Jettons
— Transfer
— Burn
— Mint
NFT
— Transfer
— Mint
Nominator Pool
— Deposit
— Withdraw
@stakee/TonStakers
— Deposit
— Withdraw
DeDust DEX
— Swap
— Add liquidity
— Withdraw liquidity
Ston-fi DEX
— Swaps v1
— Swaps v2
— Add liquidity v2
— Withdraw liquidity v2
NFT Auctions
— Bidding (Fragment, ton.diamonds, Getgems)
TON DNS
— Renew domain
— Change DNS record
— Delete DNS record
W4R2 Toncoin Subscriptions
— Subscribe
— Unsubscribe
The Toncenter team will continue to work and will be adding new action types in the next versions.
Also the /trace method now supports the
incude_actions=true parameter, which will also return a list of actions related to this transaction series.Mainnet API
Testnet API
❤4🔥4
Introducing the Emulation API
Using this API you can simulate the result of sending a message to the blockchain, before sending it.
The API predicts not only raw transactions, but also recognizes known user-friendly actions among them.
This will allow the user to see what happens if they sign the send, as well as estimate the total fees.
Mainnet API
Testnet API
Using this API you can simulate the result of sending a message to the blockchain, before sending it.
The API predicts not only raw transactions, but also recognizes known user-friendly actions among them.
This will allow the user to see what happens if they sign the send, as well as estimate the total fees.
Mainnet API
Testnet API
❤3
Support for extra-currencies in local ton-http-api
In ton-http-api v2.0.53, which you can install by yourself on your server, support for extra-currencies and a number of other improvements have been made.
Recall that earlier support for extra-currencies was made in the public Toncenter V2 and Toncenter V3 APIs.
https://github.com/toncenter/ton-http-api/releases/tag/v2.0.53
In ton-http-api v2.0.53, which you can install by yourself on your server, support for extra-currencies and a number of other improvements have been made.
Recall that earlier support for extra-currencies was made in the public Toncenter V2 and Toncenter V3 APIs.
https://github.com/toncenter/ton-http-api/releases/tag/v2.0.53
❤4
Improved Metadata API
Last month we started providing metadata for Jettons and NFTs in the V3 API.
We are pleased to report a number of improvements:
— The metadata now enters the API in advance as soon as the token appears on the network. In the previous implementation, the metadata was indexed the first time the token was requested.
— Images and JSON are now proxied via toncenter.com. 3 image sizes are available, as well as original non-proxied urls for JSON and images. IPFS is supported.
Using a proxy increases security (you don't make requests to third-party hosting) and speed of downloading resources.
Last month we started providing metadata for Jettons and NFTs in the V3 API.
We are pleased to report a number of improvements:
— The metadata now enters the API in advance as soon as the token appears on the network. In the previous implementation, the metadata was indexed the first time the token was requested.
— Images and JSON are now proxied via toncenter.com. 3 image sizes are available, as well as original non-proxied urls for JSON and images. IPFS is supported.
Using a proxy increases security (you don't make requests to third-party hosting) and speed of downloading resources.
👍9❤5
Now you can get all .ton and .t.me domains bound to a specific wallet using the new
https://toncenter.com/api/v3/index.html#/dns/api_v3_get_dns_records
/dns/records method.https://toncenter.com/api/v3/index.html#/dns/api_v3_get_dns_records
👍6❤1
Now /api/v3/jetton/wallets supports the
You can request selected user jettons or NFTs, for example to display the most popular ones.
jetton_address array[string] field and /api/v3/nft/items supports the collection_address array[string] field.You can request selected user jettons or NFTs, for example to display the most popular ones.