TonAPI — Direct API Endpoints
TonAPI provides 92 unique direct API endpoints across the following categories:- DeFi (6 endpoints)
- Market Data (2 endpoints)
- NFT (8 endpoints)
- Scan (60 endpoints)
- Token (3 endpoints)
- Transaction (15 endpoints)
- Wallets (8 endpoints)
Learn more: TonAPI Documentation
Prefix and Example
Prefix: No prefix is required for TonAPI, an example URL will therefore look like:https://api.uniblock.dev/direct/v1/TonAPI + /[TonAPI_endpoint].
Example Request:
DeFi
GET
| Path | Est. CU | Description |
|---|---|---|
| direct/v1/TonAPI/v2/staking/nominator /{account_id}/pools | 20 | All pools where account participates |
| direct/v1/TonAPI/v2/rates/chart | 20 | Get chart by token |
| direct/v1/TonAPI/v2/rates | 20 | Get the token price to the currency |
| direct/v1/TonAPI/v2/staking/pool/{account_id} /history | 20 | Pool history |
| direct/v1/TonAPI/v2/staking/pool/{account_id} | 20 | Stacking pool info |
| direct/v1/TonAPI/v2/staking/pools | 20 | All pools available in network |
Market Data
GET
| Path | Est. CU | Description |
|---|---|---|
| direct/v1/TonAPI/v2/rates/markets | 20 | Get the TON price from markets |
| direct/v1/TonAPI/v2/rates | 20 | Get the token price to the currency |
NFT
GET
| Path | Est. CU | Description |
|---|---|---|
| direct/v1/TonAPI/v2/accounts/{account_id}/nfts /history | 20 | Get the transfer nft history |
| direct/v1/TonAPI/v2/accounts/{account_id}/nfts | 20 | Get all NFT items by owner address |
| direct/v1/TonAPI/v2/nfts/collections /{account_id}/items | 20 | Get NFT items from collection by collection address |
| direct/v1/TonAPI/v2/nfts/collections /{account_id} | 20 | Get NFT collection by collection address |
| direct/v1/TonAPI/v2/nfts/collections | 20 | Get NFT collections |
| direct/v1/TonAPI/v2/nfts/{account_id}/history | 20 | Get the transfer nfts history for account |
| direct/v1/TonAPI/v2/nfts/{account_id} | 20 | Get NFT item by its address |
POST
| Path | Est. CU | Description |
|---|---|---|
| direct/v1/TonAPI/v2/nfts/_bulk | 20 | Get NFT items by their addresses |
Scan
GET
| Path | Est. CU | Description |
|---|---|---|
| direct/v1/TonAPI/v2/accounts/{account_id} | 20 | Get human-friendly information about an account without low-level details. |
| direct/v1/TonAPI/v2/accounts/{account_id}/diff | 20 | Get account’s balance change |
| direct/v1/TonAPI/v2/accounts/{account_id}/dns /backresolve | 20 | Get account’s domains |
| direct/v1/TonAPI/v2/accounts/{account_id}/dns /expiring | 20 | Get expiring account .ton dns |
| direct/v1/TonAPI/v2/accounts/{account_id}/events /{event_id} | 20 | Get event for an account by event_id |
| direct/v1/TonAPI/v2/accounts/{account_id}/events | 20 | Get events for an account. Each event is built on top of a trace which is a series of transactions caused by one inbound message. TonAPI looks for known patterns inside the trace and splits the trace into actions, where a single action represents a meaningful high-level operation like a Jetton Transfer or an NFT Purchase. Actions are expected to be shown to users. It is advised not to build any logic on top of actions because actions can be changed at any time. |
| direct/v1/TonAPI/v2/experimental/accounts /{account_id}/inscriptions | 20 | Get all inscriptions by owner address. It’s experimental API and can be dropped in the future. |
| direct/v1/TonAPI/v2/experimental/accounts /{account_id}/inscriptions/history | 20 | Get the transfer inscriptions history for account. It’s experimental API and can be dropped in the future. |
| direct/v1/TonAPI/v2/experimental/accounts /{account_id}/inscriptions/{ticker}/history | 20 | Get the transfer inscriptions history for account. It’s experimental API and can be dropped in the future. |
| direct/v1/TonAPI/v2/accounts/{account_id} /jettons/{jetton_id}/history | 20 | Get the transfer jetton history for account and jetton |
| direct/v1/TonAPI/v2/accounts/{account_id} /jettons | 20 | Get all Jettons balances by owner address |
| direct/v1/TonAPI/v2/accounts/{account_id} /publickey | 20 | Get public key by account id |
| direct/v1/TonAPI/v2/accounts/{account_id} /subscriptions | 20 | Get all subscriptions by wallet address |
| direct/v1/TonAPI/v2/address/{account_id}/parse | 20 | parse address and display in all formats |
| direct/v1/TonAPI/v2/liteserver /get_all_shards_info/{block_id} | 20 | Get all raw shards info |
| direct/v1/TonAPI/v2/blockchain/accounts /{account_id}/inspect | 20 | Blockchain account inspect |
| direct/v1/TonAPI/v2/blockchain/blocks/{block_id} | 20 | Get blockchain block data |
| direct/v1/TonAPI/v2/blockchain/config | 20 | Get blockchain config |
| direct/v1/TonAPI/v2/blockchain/masterchain /{masterchain_seqno}/config | 20 | Get blockchain config from a specific block, if present. |
| direct/v1/TonAPI/v2/blockchain/masterchain /{masterchain_seqno}/blocks | 20 | Get all blocks in all shards and workchains between target and previous masterchain block according to shards last blocks snapshot in masterchain. We don’t recommend to build your app around this method because it has problem with scalability and will work very slow in the future. |
| direct/v1/TonAPI/v2/blockchain/masterchain-head | 20 | Get last known masterchain block |
| direct/v1/TonAPI/v2/blockchain/masterchain /{masterchain_seqno}/shards | 20 | Get blockchain block shards |
| direct/v1/TonAPI/v2/blockchain/accounts /{account_id} | 20 | Get low-level information about an account taken directly from the blockchain. |
| direct/v1/TonAPI/v2/blockchain/validators | 20 | Get blockchain validators |
| direct/v1/TonAPI/v2/dns/auctions | 20 | Get all auctions |
| direct/v1/TonAPI/v2/dns/{domain_name} | 20 | Get full information about domain name |
| direct/v1/TonAPI/v2/dns/{domain_name}/resolve | 20 | DNS resolve for domain name |
| direct/v1/TonAPI/v2/dns/{domain_name}/bids | 20 | Get domain bids |
| direct/v1/TonAPI/v2/events/{event_id} | 20 | Get an event either by event ID or a hash of any transaction in a trace. An event is built on top of a trace which is a series of transactions caused by one inbound message. TonAPI looks for known patterns inside the trace and splits the trace into actions, where a single action represents a meaningful high-level operation like a Jetton Transfer or an NFT Purchase. Actions are expected to be shown to users. It is advised not to build any logic on top of actions because actions can be changed at any time. |
| direct/v1/TonAPI/v2/blockchain/accounts /{account_id}/methods/{method_name} | 20 | Execute get method for account |
| direct/v1/TonAPI/v2/experimental/inscriptions /op-template | 20 | return comment for making operation with inscription. please don’t use it if you don’t know what you are doing |
| direct/v1/TonAPI/v2/jettons/{account_id}/holders | 20 | Get jetton’s holders |
| direct/v1/TonAPI/v2/jettons/{account_id} | 20 | Get jetton metadata by jetton master address |
| direct/v1/TonAPI/v2/jettons | 20 | Get a list of all indexed jetton masters in the blockchain. |
| direct/v1/TonAPI/v2/events/{event_id}/jettons | 20 | Get only jetton transfers in the event |
| direct/v1/TonAPI/v2/liteserver /get_out_msg_queue_sizes | 20 | Get out msg queue sizes |
| direct/v1/TonAPI/v2/liteserver/get_account_state /{account_id} | 20 | Get raw account state |
| direct/v1/TonAPI/v2/liteserver/get_block /{block_id} | 20 | Get raw blockchain block |
| direct/v1/TonAPI/v2/liteserver/get_block_header /{block_id} | 20 | Get raw blockchain block header |
| direct/v1/TonAPI/v2/liteserver/get_state /{block_id} | 20 | Get raw blockchain block state |
| direct/v1/TonAPI/v2/blockchain/config/raw | 20 | Get raw blockchain config |
| direct/v1/TonAPI/v2/blockchain/masterchain /{masterchain_seqno}/config/raw | 20 | Get raw blockchain config from a specific block, if present. |
| direct/v1/TonAPI/v2/liteserver/get_block_proof | 20 | Get raw block proof |
| direct/v1/TonAPI/v2/liteserver/get_config_all /{block_id} | 20 | Get raw config |
| direct/v1/TonAPI/v2/liteserver /get_masterchain_info | 20 | Get raw masterchain info |
| direct/v1/TonAPI/v2/liteserver /get_masterchain_info_ext | 20 | Get raw masterchain info ext |
| direct/v1/TonAPI/v2/liteserver /get_shard_block_proof/{block_id} | 20 | Get raw shard block proof |
| direct/v1/TonAPI/v2/liteserver/get_shard_info /{block_id} | 20 | Get raw shard info |
| direct/v1/TonAPI/v2/liteserver/get_time | 20 | Get raw time |
| direct/v1/TonAPI/v2/accounts/search | 20 | Search by account domain name |
| direct/v1/TonAPI/v2/storage/providers | 20 | Get TON storage providers deployed to the blockchain. |
| direct/v1/TonAPI/v2/tonconnect/payload | 20 | Get a payload for further token receipt |
POST
| Path | Est. CU | Description |
|---|---|---|
| direct/v1/TonAPI/v2/tonconnect/stateinit | 20 | Get account info by state init |
| direct/v1/TonAPI/v2/message/decode | 20 | Decode a given message. Only external incoming messages can be decoded currently. |
| direct/v1/TonAPI/v2/accounts/{account_id}/events /emulate | 20 | Emulate sending message to blockchain |
| direct/v1/TonAPI/v2/events/emulate | 20 | Emulate sending message to blockchain |
| direct/v1/TonAPI/v2/accounts/_bulk | 20 | Get human-friendly information about several accounts without low-level details. |
| direct/v1/TonAPI/v2/accounts/{account_id} /reindex | 20 | Update internal cache for a particular account |
| direct/v1/TonAPI/v2/blockchain/message | 20 | Send message to blockchain |
| direct/v1/TonAPI/v2/liteserver/send_message | 20 | Send raw message to blockchain |
Token
GET
| Path | Est. CU | Description |
|---|---|---|
| direct/v1/TonAPI/v2/address/{account_id}/parse | 20 | parse address and display in all formats |
| direct/v1/TonAPI/v2/blockchain/blocks/{block_id} | 20 | Get blockchain block data |
| direct/v1/TonAPI/v2/status | 20 | Status |
Transaction
GET
| Path | Est. CU | Description |
|---|---|---|
| direct/v1/TonAPI/v2/accounts/{account_id} /jettons/history | 20 | Get the transfer jettons history for account |
| direct/v1/TonAPI/v2/accounts/{account_id}/nfts /history | 20 | Get the transfer nft history |
| direct/v1/TonAPI/v2/accounts/{account_id}/traces | 20 | Get traces for account |
| direct/v1/TonAPI/v2/blockchain/accounts /{account_id}/transactions | 20 | Get account transactions |
| direct/v1/TonAPI/v2/blockchain/blocks/{block_id} | 20 | Get blockchain block data |
| direct/v1/TonAPI/v2/blockchain/blocks/{block_id} /transactions | 20 | Get transactions from block |
| direct/v1/TonAPI/v2/blockchain/masterchain /{masterchain_seqno}/transactions | 20 | Get all transactions in all shards and workchains between target and previous masterchain block according to shards last blocks snapshot in masterchain. We don’t recommend to build your app around this method because it has problem with scalability and will work very slow in the future. |
| direct/v1/TonAPI/v2/blockchain/transactions /{transaction_id} | 20 | Get transaction data |
| direct/v1/TonAPI/v2/blockchain/messages/{msg_id} /transaction | 20 | Get transaction data by message hash |
| direct/v1/TonAPI/v2/events/{event_id} | 20 | Get an event either by event ID or a hash of any transaction in a trace. An event is built on top of a trace which is a series of transactions caused by one inbound message. TonAPI looks for known patterns inside the trace and splits the trace into actions, where a single action represents a meaningful high-level operation like a Jetton Transfer or an NFT Purchase. Actions are expected to be shown to users. It is advised not to build any logic on top of actions because actions can be changed at any time. |
| direct/v1/TonAPI/v2/nfts/{account_id}/history | 20 | Get the transfer nfts history for account |
| direct/v1/TonAPI/v2/liteserver /list_block_transactions/{block_id} | 20 | Get raw list block transactions |
| direct/v1/TonAPI/v2/liteserver/get_transactions /{account_id} | 20 | Get raw transactions |
| direct/v1/TonAPI/v2/traces/{trace_id} | 20 | Get the trace by trace ID or hash of any transaction in trace |
POST
| Path | Est. CU | Description |
|---|---|---|
| direct/v1/TonAPI/v2/traces/emulate | 20 | Emulate sending message to blockchain |
Wallets
GET
| Path | Est. CU | Description |
|---|---|---|
| direct/v1/TonAPI/v2/wallet/{account_id}/seqno | 20 | Get account seqno |
| direct/v1/TonAPI/v2/blockchain/accounts /{account_id} | 20 | Get low-level information about an account taken directly from the blockchain. |
| direct/v1/TonAPI/v2/liteserver/get_account_state /{account_id} | 20 | Get raw account state |
| direct/v1/TonAPI/v2/liteserver/get_transactions /{account_id} | 20 | Get raw transactions |
| direct/v1/TonAPI/v2/pubkeys/{public_key}/wallets | 20 | Get wallets by public key |
POST
| Path | Est. CU | Description |
|---|---|---|
| direct/v1/TonAPI/v2/wallet/emulate | 20 | Emulate sending message to blockchain |
| direct/v1/TonAPI/v2/wallet/auth/proof | 20 | Account verification and token issuance |
PUT
| Path | Est. CU | Description |
|---|---|---|
| direct/v1/TonAPI/v2/wallet/backup | 20 | Set backup info |