{"repo":"ton-community/ton-api-v4","free":true,"listed":false,"github":"https://github.com/ton-community/ton-api-v4","clone":"git clone https://github.com/ton-community/ton-api-v4.git","description":"TON HTTP API v4","language":"TypeScript","stars":110,"topics":["api","ton"],"license":"MIT","category":"api-integrations-sdks","readme_excerpt":"TON API v4 Scallable and CDN-friendly HTTP API for TON blockchain. API Endpoints There are two public endpoints for this API: mainnet - https://mainnet-v4.tonhubapi.com sandbox - https://sandbox-v4.tonhubapi.com Selfhosting Easiest way to selfhost is to use docker: Methods Get latest block Example Get full block Example Get block by unix time Example Get account state at block Example Active Example Uninitialized Example Frozen Detect if account was changed Example Run get method of account at block NOTE: To pass arguments you need to serialize them into url-safe base64 serialization of BOC with stack. You can find implementation in ton library. Example Watch for new blocks Open a WebSocket connection to /block/watch . And you will get notifications about current seqno , block time and server time. Server immediatelly sends current known block after opening a connection. NOTE: This API doesn't guarantee that seqno always sequental. There are could be holes in sequences and apps have to adjust for them. Example: Watch for new blocks (extended) Open a WebSocket connection to /block/watch/changed to get stream of new blocks. This endpoint behaves same way as a previous one. Example: Get config at block NOTE: you need to manually parse cell into dict with 32 bit integer keys. Example Get account transactions NOTE: This method always returns at most 20 results. Example License MIT","default_branch":null,"files":null,"tree":[],"storefront":"/r/ton-community","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/ton-community/ton-api-v4/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}