The Open Network (TON)

The Open Network (TON) is a high-performance, decentralized Layer 1 blockchain originally designed by Telegram developers Nikolai and Pavel Durov and now maintained by the independent TON Foundation and community. Built around a sharded multi-blockchain architecture and Byzantine Fault Tolerant Proof-of-Stake consensus, TON is designed to scale horizontally through dynamic sharding while maintaining ~5-second block times on its masterchain. The network is natively integrated with Telegram’s 800M+ user base and powers payments, DeFi, NFTs, and decentralized services such as TON DNS, TON Sites, and TON Storage.

Key Features

  • Dynamic Sharding: Masterchain coordinates a configurable set of workchains, each of which can split into shardchains as load increases — enabling horizontal scalability
  • High Throughput: Architecture designed for parallel transaction processing across shards, with documented benchmarks above 100,000 TPS
  • Fast Finality: ~5 second masterchain block times with deterministic finality
  • BFT Proof-of-Stake: Validators are elected from stakers and rotate every election cycle
  • TON Virtual Machine (TVM): Stack-based VM that runs smart contracts compiled from FunC, Tact, or Tolk — not EVM-compatible
  • Native Token Standards: Jettons (TIP-3 fungible tokens) and NFTs (TIP-4 non-fungible tokens)
  • Toncoin (TON): Native gas and staking token, 9 decimals (1 TON = 1,000,000,000 nanotons)
  • Telegram Integration: First-class integration with the Telegram Mini Apps platform and TON Connect wallet protocol
  • Low Fees: Sub-cent transaction fees for typical wallet and contract operations
  • Decentralized Services: TON DNS, TON Sites, TON Storage, and TON Proxy for fully on-chain web infrastructure

TECHNICAL DISCLAIMER: AUTHORITATIVE TON HTTP API SPECIFICATION

GetBlock’s TON API reference documentation is provided exclusively for informational purposes and to optimize the developer experience. The canonical and normative specification for the TON HTTP API (v2) is maintained by TON Foundation and published at toncenter.com/api/v2/ with the upstream source at github.com/toncenter/ton-http-api. For underlying protocol details, consult the official TON documentation at docs.ton.org.

Network Information

PropertyValue
Network NameTON Mainnet
Native CurrencyToncoin (TON)
Decimals9 (1 TON = 1,000,000,000 nanotons)
Block Time~5 seconds (masterchain)
ConsensusByzantine Fault Tolerant Proof-of-Stake
ArchitectureSharded — masterchain (workchain -1) + workchains
Smart Contract VMTVM (TON Virtual Machine)
EVM CompatibleNo
Address FormatUser-friendly (EQ… / UQ…) or raw (workchain:hex)

Base URL

bashhttps://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/

The TON HTTP API exposes every method on two parallel transports behind your endpoint:

  • REST (GET): GET https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/<method>?<query-params>
  • JSON-RPC (POST): POST https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/jsonRPC with a standard JSON-RPC 2.0 body

A handful of state-mutating methods (sendBoc, sendBocReturnHash, runGetMethod, runGetMethodStd, estimateFee) are POST-only.

Supported Networks

NetworkJSON-RPCREST (HTTP API (v4) )JSON-RPC (v3)Frankfurt, Germany
Mainnet✅✅✅✅

Quickstart

In this section, you will learn how to make your first call with either:

  • Axios (JavaScript / Node.js)
  • Python (Requests library)

Before you begin, you must have already installed npm or yarn on your local machine (for the Axios example) or Python and pip (for the Python example).

  1. Setup project

    Create and initialize a new project:

    bashmkdir ton-api-quickstart
    cd ton-api-quickstart
    npm init --yes
  2. Install Axios

    bashnpm install axios
  3. Create file

    Create a new file named index.js. This is where you will make your first call.

  4. Set ES module type

    Set the ES module "type": "module" in your package.json.

  5. Add code

    Add the following code to index.js:

    index.js

    javascriptimport axios from 'axios';
    const config = {
        method: 'post',
        url: 'https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/getMasterchainInfo',
        headers: {
            'Content-Type': 'application/json'
        },
        data: data
    };
    
    axios(config)
        .then(response => console.log(JSON.stringify(response.data, null, 2)))
        .catch(error => console.log(error));

    Replace <ACCESS-TOKEN> with your actual access token from GetBlock.

  6. Run the script

    bashnode index.js

    Expected output (example):

    json{
        "ok": true,
        "result": {
            "@type": "blocks.masterchainInfo",
            "last": {
                "@type": "ton.blockIdExt",
                "workchain": -1,
                "shard": "-9223372036854775808",
                "seqno": 66745702,
                "root_hash": "xO7AlBfHBD18HQxua03QQKb1BMZIOJjPtVVj7rRyxPk=",
                "file_hash": "nzRCfV2w6GKyA6DW61muIVTdLkbkSwozhYDWERj1hmw="
            },
            "state_root_hash": "p58IFlKiohPOi/aiqSW9M8o2AXcc6ZUwANhJlEE5cVw=",
            "init": {
                "@type": "ton.blockIdExt",
                "workchain": -1,
                "shard": "0",
                "seqno": 0,
                "root_hash": "F6OpKZKqvqeFp6CQmFomXNMfMj2EnaUSOXN+Mh+wVWk=",
                "file_hash": "XplPz01CXAps5qeSWUtxcyBfdAo5zVb1N979KLSKD24="
            },
            "@extra": "1778774352.215111:0:0.6613766254069332"
        }
    }
  1. Setup the project directory

    bashmkdir ton-api-quickstart
    cd ton-api-quickstart
  2. Create and activate a virtual environment

    bashpython -m venv venv
    source venv/bin/activate
    
    # On Windows, use:
    venv\Scripts\activate
  3. Install requests

    bashpip install requests
  4. Create script

    Create a file called main.py with the following content:

    main.py

    pythonimport requests
    import json
    
    url = "https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/getMasterchainInfo"
    headers = {
        'Content-Type': 'application/json'
    }
    response = requests.post(url, headers=headers)
    print(response.text)

    Replace <ACCESS-TOKEN> with your actual access token from GetBlock.

  5. Run the script

    bashpython main.py

Available API Methods

GetBlock provides access to the full TON HTTP API v2 surface — every method is available both as a REST GET and as a JSON-RPC POST to /jsonRPC, except for the POST-only methods marked below.

Account Methods

MethodDescription
getAddressInformationGet basic information about an address
getExtendedAddressInformationGet extended information about an address
getWalletInformationGet wallet-specific information about an address
getAddressBalanceGet address balance in nanotons
getAddressStateGet address state (active, uninitialized, or frozen)
getShardAccountCellGet the raw TVM cell representing the shard account
getTokenDataGet Jetton or NFT metadata from a token smart contract

Block Methods

MethodDescription
getMasterchainInfoGet up-to-date masterchain state
getMasterchainBlockSignaturesGet validator signatures for a masterchain block
getShardBlockProofGet the Merkle proof of a shardchain block
getConsensusBlockGet the block confirmed by consensus
lookupBlockLook up a block by seqno, shard, and workchain
getShardsGet shards info by masterchain block seqno
getBlockHeaderGet block header information
getOutMsgQueueSizeGet the size of the outbound message queue

Transaction Methods

MethodDescription
getTransactionsGet transactions for a specified address
getTransactionsStdStandardized version of getTransactions
getBlockTransactionsGet transactions in a specified block
getBlockTransactionsExtGet transactions in a block with extended information
tryLocateTxLocate the outgoing transaction at the destination by inbound message
tryLocateResultTxSame as tryLocateTx — locate the outgoing transaction
tryLocateSourceTxLocate the source transaction by destination transaction parameters

Configuration Methods

MethodDescription
getConfigParamGet a single blockchain configuration parameter
getConfigAllGet all blockchain configuration parameters
getLibrariesGet library code by their hashes

Run-Method (POST only)

MethodDescription
runGetMethodRun a get-method of a smart contract
runGetMethodStdStandardized version of runGetMethod

Send Methods (POST only)

MethodDescription
sendBocSend a Bag of Cells (signed message) to the chain
sendBocReturnHashSend a BoC and return its hash for tracking
estimateFeeEstimate fees for a given message

Utility Methods

MethodDescription
detectAddressGet all possible forms of a TON address
detectHashGet all possible forms of a 256-bit hash
packAddressPack an address into base64 form
unpackAddressUnpack an address from base64 form

JSON-RPC Endpoint

MethodDescription
jsonRPCGeneric JSON-RPC 2.0 entrypoint — all of the methods above are callable here

Support

For technical support and questions:

See Also