HTTP API
Last updated
Was this helpful?
Last updated
Was this helpful?
This documentation provides a comprehensive guide to using the TON HTTP API, including API endpoints, request and response formats, and error handling. Whether you're building a new application or integrating with an existing one, this documentation will help you get started with the TON HTTP API quickly and efficiently.
Similar to previous one but tries to parse additional information for known contract types. This method is based on tonlib's function getAccountState. For detecting wallets we recommend to use getWalletInformation.
/getExtendedAddressInformation
Identifier of target TON account in any form.
Retrieve wallet information. This method parses contract state and currently supports more wallet types than getExtendedAddressInformation: simple wallet, standart wallet, v3 wallet, v4 wallet.
/getWalletInformation
Identifier of target TON account in any form.
Get transaction history of a given address.
/getTransactions
Identifier of target TON account in any form.
Maximum number of transactions in response.
Logical time of transaction to start with, must be sent with hash.
Hash of transaction to start with, in base64 or hex encoding , must be sent with lt.
Logical time of transaction to finish with (to get tx from lt to to_lt).
By default getTransaction request is processed by any available liteserver. If archival=true only liteservers with full history are used.
Convert an address from raw to human-readable format.
/packAddress
Identifier of target TON account in raw form.
0:83DFD552E63729B472FCBCC8C45EBCC6691702558B68EC7527E1BA403A0F31A8
Convert an address from human-readable to raw format.
/unpackAddress
Identifier of target TON account in user-friendly form
EQCD39VS5jcptHL8vMjEXrzGaRcCVYto7HUn4bpAOg8xqB2N
Get merkle proof of shardchain block.
/getShardBlockProof
Block workchain id
Block shard id
Block seqno
Seqno of masterchain block starting from which proof is required. If not specified latest masterchain block is used.
Look up block by either seqno, lt or unixtime.
/lookupBlock
Workchain id to look up block in
Shard id to look up block in
Block's height
Block's logical time
Block's unixtime
Get transactions of the given block.
/getBlockTransactions
Same as previous. Locate outcoming transaction of destination address by incoming message
/tryLocateResultTx
Send query - unpacked external message. This method takes address, body and init-params (if any), packs it to external message and sends to network. All params should be boc-serialized.
/sendQuery
Address in any format
b64-encoded boc-serialized cell with message body
b64-encoded boc-serialized cell with init-code
b64-encoded boc-serialized cell with init-data
Estimate fees required for query processing. body, init-code and init-data accepted in serialized format (b64-encoded).
/estimateFee
Address in any format
b64-encoded cell with message body
b64-encoded cell with init-code
b64-encoded cell with init-data
If true during test query processing assume that all chksig operations return True
Run get method on smart contract.
/runGetMethod
Contract address
Method name or method id
Array of stack elements: [['num',3], ['cell', cell_object], ['slice', slice_object]]
All methods in the API are available through JSON-RPC protocol (spec).
/jsonRPC