TON HTTP API
v2.0.0https://ton.nownodes.ioThis API enables HTTP access to TON blockchain - getting accounts and wallets information, looking up blocks and transactions, sending messages to the blockchain, calling get methods of smart contracts, and more.
In addition to REST API, all methods are available through JSON-RPC endpoint with method equal to method name and params passed as a dictionary.
The response contains a JSON object, which always has a boolean field ok and either error or result. If ok equals true, the request was successful and the result of the query can be found in the result field. In case of an unsuccessful request, ok equals false and the error is explained in the error.
API Key should be sent either as api_key query parameter or X-API-Key header.
Authentication
api-keyAuthapiKeyAPI Key: api-key in header
TON HTTP API
API V1 Reference
Get Address Information
Authorizations
ApiKeyAuthApiKeyAuthapi-key string
NOWNodes API key passed in the api-key header.
Get basic information about the address: balance, code, data, last_transaction_id.
Parameters
addressstringrequiredqueryIdentifier of target TON account in any form.
Response
Successful Response
Validation Error
Lite Server Timeout
Get Extended Address Information
Authorizations
ApiKeyAuthApiKeyAuthapi-key string
NOWNodes API key passed in the api-key header.
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.
Parameters
addressstringrequiredqueryIdentifier of target TON account in any form.
Response
Successful Response
Validation Error
Lite Server Timeout
Get Wallet Information
Authorizations
ApiKeyAuthApiKeyAuthapi-key string
NOWNodes API key passed in the api-key header.
Retrieve wallet information. This method parses contract state and currently supports more wallet types than getExtendedAddressInformation: simple wallet, standart wallet, v3 wallet, v4 wallet.
Parameters
addressstringrequiredqueryIdentifier of target TON account in any form.
Response
Successful Response
Validation Error
Lite Server Timeout
Get Transactions
Authorizations
ApiKeyAuthApiKeyAuthapi-key string
NOWNodes API key passed in the api-key header.
Get transaction history of a given address.
Parameters
addressstringrequiredqueryIdentifier of target TON account in any form.
limitinteger<= 10010queryMaximum number of transactions in response.
ltintegerqueryLogical time of transaction to start with, must be sent with hash.
hashstringqueryHash of transaction to start with, in base64 or hex encoding , must be sent with lt.
to_ltinteger0queryLogical time of transaction to finish with (to get tx from lt to to_lt).
archivalbooleanfalsequeryBy default getTransaction request is processed by any available liteserver. If archival=true only liteservers with full history are used.
Response
Successful Response
Validation Error
Lite Server Timeout
Get Address Balance
Authorizations
ApiKeyAuthApiKeyAuthapi-key string
NOWNodes API key passed in the api-key header.
Get balance (in nanotons) of a given address.
Parameters
addressstringrequiredqueryIdentifier of target TON account in any form.
Response
Successful Response
Validation Error
Lite Server Timeout
Get Address
Authorizations
ApiKeyAuthApiKeyAuthapi-key string
NOWNodes API key passed in the api-key header.
Get state of a given address. State can be either unitialized, active or frozen.
Parameters
addressstringrequiredqueryIdentifier of target TON account in any form.
Response
Successful Response
Validation Error
Lite Server Timeout
Pack Address
Authorizations
ApiKeyAuthApiKeyAuthapi-key string
NOWNodes API key passed in the api-key header.
Convert an address from raw to human-readable format.
Parameters
addressstringrequiredqueryIdentifier of target TON account in raw form.
Response
Successful Response
Validation Error
Lite Server Timeout
Unpack Address
Authorizations
ApiKeyAuthApiKeyAuthapi-key string
NOWNodes API key passed in the api-key header.
Convert an address from human-readable to raw format.
Parameters
addressstringrequiredqueryIdentifier of target TON account in user-friendly form
Response
Successful Response
Validation Error
Lite Server Timeout
Get Masterchain Info
Authorizations
ApiKeyAuthApiKeyAuthapi-key string
NOWNodes API key passed in the api-key header.
Get up-to-date masterchain state.
Response
Successful Response
Validation Error
Lite Server Timeout
Get Masterchain Block Signatures
Authorizations
ApiKeyAuthApiKeyAuthapi-key string
NOWNodes API key passed in the api-key header.
Get up-to-date masterchain state.
Parameters
seqnointegerrequiredqueryResponse
Successful Response
Validation Error
Lite Server Timeout
Get Shard Block Proof
Authorizations
ApiKeyAuthApiKeyAuthapi-key string
NOWNodes API key passed in the api-key header.
Get merkle proof of shardchain block.
Parameters
workchainintegerrequiredqueryBlock workchain id
shardintegerrequiredqueryBlock shard id
seqnointegerrequiredqueryBlock seqno
from_seqnointegerquerySeqno of masterchain block starting from which proof is required. If not specified latest masterchain block is used.
Response
Successful Response
Validation Error
Lite Server Timeout
Get Consensus Block
Authorizations
ApiKeyAuthApiKeyAuthapi-key string
NOWNodes API key passed in the api-key header.
Get consensus block and its update timestamp.
Response
Successful Response
Validation Error
Lite Server Timeout
Lookup Block
Authorizations
ApiKeyAuthApiKeyAuthapi-key string
NOWNodes API key passed in the api-key header.
Look up block by either seqno, lt or unixtime.
Parameters
workchainintegerrequiredqueryWorkchain id to look up block in
shardintegerrequiredqueryShard id to look up block in
seqnointegerqueryBlock's height
ltintegerqueryBlock's logical time
unixtimeintegerqueryBlock's unixtime
Response
Successful Response
Validation Error
Lite Server Timeout
Get Shards
Authorizations
ApiKeyAuthApiKeyAuthapi-key string
NOWNodes API key passed in the api-key header.
Get shards information.
Parameters
seqnointegerrequiredqueryMasterchain seqno to fetch shards of.
Response
Successful Response
Validation Error
Lite Server Timeout
Get Block Transactions
Authorizations
ApiKeyAuthApiKeyAuthapi-key string
NOWNodes API key passed in the api-key header.
Get transactions of the given block.
Parameters
workchainintegerrequiredqueryshardintegerrequiredqueryseqnointegerrequiredqueryroot_hashstringqueryfile_hashstringqueryafter_ltintegerqueryafter_hashstringquerycountinteger40queryResponse
Successful Response
Validation Error
Lite Server Timeout
Get Block Transactions Ext
Authorizations
ApiKeyAuthApiKeyAuthapi-key string
NOWNodes API key passed in the api-key header.
Get transactions of the given block.
Parameters
workchainintegerrequiredqueryshardintegerrequiredqueryseqnointegerrequiredqueryroot_hashstringqueryfile_hashstringqueryafter_ltintegerqueryafter_hashstringquerycountinteger40queryResponse
Successful Response
Validation Error
Lite Server Timeout
Get Block Header
Authorizations
ApiKeyAuthApiKeyAuthapi-key string
NOWNodes API key passed in the api-key header.
Get metadata of a given block.
Parameters
workchainintegerrequiredqueryshardintegerrequiredqueryseqnointegerrequiredqueryroot_hashstringqueryfile_hashstringqueryResponse
Successful Response
Validation Error
Lite Server Timeout
Get Config Param
Authorizations
ApiKeyAuthApiKeyAuthapi-key string
NOWNodes API key passed in the api-key header.
Get config by id.
Parameters
config_idintegerrequiredqueryConfig id
seqnointegerqueryMasterchain seqno. If not specified, latest blockchain state will be used.
Response
Successful Response
Validation Error
Lite Server Timeout
Get Config All
Authorizations
ApiKeyAuthApiKeyAuthapi-key string
NOWNodes API key passed in the api-key header.
Get cell with full config.
Parameters
seqnointegerqueryMasterchain seqno. If not specified, latest blockchain state will be used.
Response
Successful Response
Validation Error
Lite Server Timeout
Get Out Msg Queue Sizes
Authorizations
ApiKeyAuthApiKeyAuthapi-key string
NOWNodes API key passed in the api-key header.
Get info with current sizes of messages queues by shards.
Response
Successful Response
Validation Error
Lite Server Timeout
Get Token Data
Authorizations
ApiKeyAuthApiKeyAuthapi-key string
NOWNodes API key passed in the api-key header.
Get NFT or Jetton information.
Parameters
addressstringrequiredqueryAddress of NFT collection/item or Jetton master/wallet smart contract
Response
Successful Response
Validation Error
Lite Server Timeout
Get Try Locate Tx
Authorizations
ApiKeyAuthApiKeyAuthapi-key string
NOWNodes API key passed in the api-key header.
Locate outcoming transaction of destination address by incoming message.
Parameters
sourcestringrequiredquerydestinationstringrequiredquerycreated_ltintegerrequiredqueryResponse
Successful Response
Validation Error
Lite Server Timeout
Get Try Locate Result Tx
Authorizations
ApiKeyAuthApiKeyAuthapi-key string
NOWNodes API key passed in the api-key header.
Same as previous. Locate outcoming transaction of destination address by incoming message
Parameters
sourcestringrequiredquerydestinationstringrequiredquerycreated_ltintegerrequiredqueryResponse
Successful Response
Validation Error
Lite Server Timeout
Get Try Locate Source Tx
Authorizations
ApiKeyAuthApiKeyAuthapi-key string
NOWNodes API key passed in the api-key header.
Locate incoming transaction of source address by outcoming message.
Parameters
sourcestringrequiredquerydestinationstringrequiredquerycreated_ltintegerrequiredqueryResponse
Successful Response
Validation Error
Lite Server Timeout
Detect Address
Authorizations
ApiKeyAuthApiKeyAuthapi-key string
NOWNodes API key passed in the api-key header.
Get all possible address forms.
Parameters
addressstringrequiredqueryIdentifier of target TON account in any form.
Response
Successful Response
Validation Error
Lite Server Timeout
Send Boc
Authorizations
ApiKeyAuthApiKeyAuthapi-key string
NOWNodes API key passed in the api-key header.
Send serialized boc file: fully packed and serialized external message to blockchain.
Body
bocstringrequiredb64 encoded bag of cells
Response
Successful Response
Validation Error
Lite Server Timeout
Send Boc Return Hash
Authorizations
ApiKeyAuthApiKeyAuthapi-key string
NOWNodes API key passed in the api-key header.
Send serialized boc file: fully packed and serialized external message to blockchain. The method returns message hash.
Body
bocstringrequiredb64 encoded bag of cells
Response
Successful Response
Validation Error
Lite Server Timeout
Send Query
Authorizations
ApiKeyAuthApiKeyAuthapi-key string
NOWNodes API key passed in the api-key header.
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.
Body
addressstringrequiredAddress in any format
bodystringrequiredb64-encoded boc-serialized cell with message body
init_codestringb64-encoded boc-serialized cell with init-code
init_datastringb64-encoded boc-serialized cell with init-data
Response
Successful Response
Validation Error
Lite Server Timeout
Estimate Fee
Authorizations
ApiKeyAuthApiKeyAuthapi-key string
NOWNodes API key passed in the api-key header.
Estimate fees required for query processing. body, init-code and init-data accepted in serialized format (b64-encoded).
Body
addressstringrequiredAddress in any format
bodystringrequiredb64-encoded cell with message body
init_codestringb64-encoded cell with init-code
init_datastringb64-encoded cell with init-data
ignore_chksigbooleantrueIf true during test query processing assume that all chksig operations return True
Response
Successful Response
Validation Error
Lite Server Timeout
Run Get Method
Authorizations
ApiKeyAuthApiKeyAuthapi-key string
NOWNodes API key passed in the api-key header.
Run get method on smart contract.
Body
addressstringrequiredContract address
methodstring | integerrequiredMethod name or method id
stackArray<Array<any>>requiredArray of stack elements: [['num',3], ['cell', cell_object], ['slice', slice_object]]
seqnointegerSeqno of masterchain block at which moment the Get Method is to be executed
Response
Successful Response
Validation Error
Lite Server Timeout
Jsonrpc Handler
Authorizations
ApiKeyAuthApiKeyAuthapi-key string
NOWNodes API key passed in the api-key header.
All methods in the API are available through JSON-RPC protocol (spec).
Body
methodstringrequiredparamsobject[object Object]idstringjsonrpcstringResponse
Successful Response
Validation Error
Lite Server Timeout