sendQuery - Ton

sendQuery. Sends a query to the TON blockchain and returns the result, allowing users to execute commands and retrieve information from the network.

sendQuery - ton [Value: 100CU]
Sends a query to the TON blockchain and returns the result, allowing users to execute commands and retrieve information from the network.
Use cases

Use cases

  • Send a query to the TON network
  • Retrieve data from smart contracts
  • Facilitate interaction with blockchain services
Constraints

Constraints

  • Requires a valid query structure
  • Dependent on network connectivity
  • Only processes supported query types
Get started
Unlock Access to 50+ chains
Boost your app's speed and reliability with dRPC - get your access API key

Language

Request
Examples
curl --request POST \
     --url 'https://ton.drpc.org/rest/sendQuery' \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --header 'x-api-key: t-66a730ccccfd17001c479705-2f597d14ad7543f289a03418' \
     --data '{
         "address": "0:abcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdef",
         "body": "te6cckEBAQEAAjz+9wAAMABBBIAgAAZL0AAdBGdZnYDAAUGdD59VAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAABAcAA=="
     }'
Copy
Response
200
{
    "status": "success",
    "transactionHash": "0:abcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdef",
    "message": "Query sent successfully."
}
Copy

Request params

Parametersobject
object
addressstring
Identifier of the target TON account in any form.
bodystring

Response

200

Response params

object
statusstring
Indicates the status of the request.
transactionHashstring
The hash of the transaction that was processed.
messagestring
A message indicating the result of the query.