Skip to content
Development
Skill

/tonapi

Work with TON blockchain via the tonapi Python SDK — query accounts, transactions, jettons, NFTs, staking, validator rewards, DNS, prepare wallet migration, emulate messages, subscribe to real-time events, and manage webhooks. Use this skill whenever the user mentions TONAPI,

From plugin
tonapi
1861 skill

Claude Code

$ npx -y skills add nessshon/tonapi --skill tonapi --agent claude-code

SKILL.md

tonapi.SKILL.md
name: tonapi
description: >
  Work with TON blockchain via the tonapi Python SDK — query accounts,
  transactions, jettons, NFTs, staking, validator rewards, DNS, prepare wallet
  migration, emulate messages, subscribe to real-time events, and manage
  webhooks. Use this skill whenever the user mentions TONAPI, tonapi.io, TON
  blockchain data, wallet balance, jetton transfers, NFT collections, or wants
  to interact with TON via TONAPI. Also use when the user works with code that
  imports from pytonapi.rest, pytonapi.streaming, pytonapi.webhook, or
  pytonapi.types, or asks about TONAPI endpoints, even if they don't
  explicitly mention "pytonapi".

Python SDK for querying TON blockchain via TONAPI. Covers REST API, streaming (SSE/WebSocket), and webhooks with event dispatcher. Read the relevant reference file, then either execute via runner or generate SDK code.

API Key

Optional — without a key, REST requests are throttled to ~1 per 4 seconds. A key unlocks higher rate limits for production use. Get one at [tonconsole.com](https://tonconsole.com/).

Networks

| Network | Enum | Base URL | |---------|-------------------|-----------------------------| | Mainnet | `Network.MAINNET` | `https://tonapi.io` | | Testnet | `Network.TESTNET` | `https://testnet.tonapi.io` | | Tetra | `Network.TETRA` | `https://tetra.tonapi.io` |

Routing Table

| User intent | Reference | Runner example | |------------------------------------------------|--------------------------------|-----------------------------------------------------| | Installation, setup, first request | `references/quickstart.md` | — | | SDK version | — | `pytonapi -v` | | Account info, balance, jetton balances, events | `references/accounts.md` | `accounts get_account --account-id EQ...` | | Blocks, transactions, validators, config | `references/blockchain.md` | `blockchain get_masterchain_head` | | TonConnect payload, state init | `references/connect.md` | `connect get_ton_connect_payload` | | DNS domains, auctions, bids | `references/dns.md` | `dns get_info --domain-name ton` | | Message decoding, emulation | `references/emulation.md` | `emulation decode_message --body {...}` | | Events by ID | `references/events.md` | `events get_event --event-id ...` | | Extra currency info | `references/extra_currency.md` | `extra_currency get_info --id 1` | | Gasless transfers | `references/gasless.md` | `gasless config` | | Jetton info, holders, transfers | `references/jettons.md` | `jettons get_jetton_info --account-id EQ...` | | Raw liteserver operations | `references/lite_server.md` | `lite_server get_raw_masterchain_info` | | Wallet migration, migratable assets | `references/migration.md` | `migration get_wallets --body {...}` | | Multisig wallets, orders | `references/multisig.md` | `multisig get_account --account-id EQ...` | | NFT collections, items, history | `references/nft.md` | `nft get_collection --account-id EQ...` | | Purchase history | `references/purchases.md` | `purchases get_purchase_history --account-id EQ...` | | Token prices, charts, markets | `references/rates.md` | `rates get_rates --tokens ton --currencies usd` | | Validators, validation rounds, rewards, APY | `references/rewards.md` | `rewards get_apy` | | Staking pools, nominators | `references/staking.md` | `staking get_pools` | | TON storage providers | `references/storage.md` | `storage get_providers` | | Execution traces | `references/traces.md` | `traces get_trace --trace-id ...` | | API status, address parsing | `references/utilities.md` | `utilities status` | | Wallet info, seqno, auth | `references/wallet.md` | `wallet get_info --account-id EQ...` | | Real-time events (SSE/WebSocket) | `references/streaming.md` | `streaming sse --types transactions` | | Webhooks (push notifications) | `references/webhooks.md` | — (generate code) |

Runner

Always run the runner from the **user's working directory**, not from the skill directory. Use `${CLAUDE_SKILL_DIR}` to reference the script path:

python3 ${CLAUDE_SKILL_DIR}/scripts/run.py <resource> <method> [--param value ...]
python3 ${CLAUDE_SKILL_DIR}/scripts/run.py streaming <transport> [--types type ...]

Requires `pytonapi` package installed (`pip install pytonapi`).

Configuration priority: CLI flags > environment variables > defaults.

| Source | API Key | Network | Base URL | RPS Limit | RPS Period | |---------|------------------|-------------------------------------|-------------------|--------------------|---------------------| | CLI | `--api-key KEY` | `--network mainnet\|testnet\|tetra` | `--base-url URL` | `--rps-limit N` | `--r

Read more
Stats
186
Stars
41
Forks
Maintained
Maintenance
Python
Language
MIT
License
Last commit
Created

Repo: nessshon/tonapi

@nessshon
Ships withtonapi

Python SDK for TONAPI — REST API, streaming, and webhooks for TON blockchain.

Stars on GitHub

Momentum

stars in total
186
Star history of nessshon/tonapi on GitHub, a chart by star-history.com

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills2w309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc2w293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react5d252k
@facebook@facebookInstall Skill

Questions about tonapi.

Which coding agents can use tonapi?
tonapi installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.