For the complete documentation index, see llms.txt. This page is also available as Markdown.

gettokendata - TON

Example code for the gettokendata JSON-RPC method. Сomplete guide on how to use gettokendata JSON-RPC in GetBlock.io Web3 documentation.

This method returns Jetton (TIP-3) or NFT (TIP-4) metadata read directly from the token's smart contract. It detects the standard automatically and returns either Jetton master / wallet data or NFT collection / item data.

Parameters

Parameter
Type
Required
Description

address

string

Yes

Address of the Jetton master, Jetton wallet, NFT collection, or NFT item

Request Example

REST (GET):

curl --location --request GET 'https://go.getblock.io/<ACCESS-TOKEN>/getTokenData?address=EQDtFpEwcFAEcRe5mLVh2N6C0x-_hJEM7W61_JLnSF74p4q2' \
--header 'Content-Type: application/json'

JSON-RPC (POST):

curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "jsonrpc": "2.0",
    "method": "getTokenData",
    "params": {
        "address": "EQDtFpEwcFAEcRe5mLVh2N6C0x-_hJEM7W61_JLnSF74p4q2"
    },
    "id": "getblock.io"
}'

Response Example

Response Parameters

Field
Type
Description

result.contract_type

string

Detected token type: jetton_master, jetton_wallet, nft_collection, or nft_item

result.total_supply

string

Total supply for Jetton masters (in the token's smallest unit)

result.mintable

boolean

Whether the Jetton supply can be increased

result.admin_address

string

Admin address of the Jetton master, if any

result.jetton_content

object

Token metadata, either onchain or offchain with a URI

result.jetton_wallet_code

string

BOC of the wallet contract code (Jetton master only)

Use Cases

  • Reading Jetton symbol, decimals, and supply for wallet UX

  • Fetching NFT collection or item metadata

  • Building token explorers and DEX listings

  • Validating a token contract is well-formed before listing

Error Handling

Status Code
Error Message
Cause

403

Forbidden

Missing or invalid <ACCESS-TOKEN>

422

Validation Error

Request parameters are missing or malformed

429

Too Many Requests

Rate limit exceeded for your plan

504

Lite Server Timeout

Upstream TON liteserver timed out

409

Smart contract is not a Jetton or NFT

The address does not implement TIP-3 or TIP-4

SDK Integration

Last updated

Was this helpful?