Skip to main content

API V2

Direct liteserver for balances, sending transactions, contract queries.

API V3

Indexed database for traces, Jettons, NFTs, and historical queries.

Streaming

Real-time blockchain events over SSE and WebSocket.

Claude Code Plugin

Install the AI plugin to query TON blockchain via Claude Code.

Quick start

import asyncio

from toncenter.rest import ToncenterRestClient
from toncenter.types import Network


async def main() -> None:
    async with ToncenterRestClient(network=Network.MAINNET) as client:
        info = await client.v2.accounts.get_address_information(
            "EQDtFpEwcFAEcRe5mLVh2N6C0x-_hJEM7W61_JLnSF74p4q2"
        )
        print(info.balance)


if __name__ == "__main__":
    asyncio.run(main())

Installation

pip install toncenter
Requires Python 3.10+. Dependencies: aiohttp 3.9+, pydantic 2.4+.

Networks

NetworkEnum valueBase URL
MainnetNetwork.MAINNEThttps://toncenter.com
TestnetNetwork.TESTNEThttps://testnet.toncenter.com

API Key

An API key is optional for REST — requests without a key are throttled to ~1 RPS. It is required for streaming (SSE/WebSocket). A key unlocks higher rate limits for production use. Get a key from the @toncenter Telegram bot.
PlanRPSKeys / networkPrice
Free101Free
Plus2532.5 TON/mo
Advanced1001025 TON/mo
EnterpriseContact support