Learn about the standard JSON-RPC error codes

HTTP Status Codes

In addition to the standard The Open Network JSON-RPC error codes, TONX API will return the following status codes for HTTP requests:

CodeDescription
200OK -- the request is successfully
400Bad Request -- Your request is invalid. Double-check your JSON-RPC body.
401Unauthorized -- You must authenticate your request with an API key.
403Forbidden -- You've use wrong key to query specific network(using testent key to query mainnet data)
429Too Many Requests -- You've exceeded your concurrent requests capacity.
500internal Server Error -- We're unable to process your request right now. Get in touch with us if you see this.
503Service unavailable -- unable to complete the request due to server issues

JSON-RPC Error Codes

CodePossible Return MessageDescription
-32000Server errorReserved for implementation-defined server-errors. See hint below.
-32001Data not foundPlease note: TONX API (beta) queries data only for the last 1 days.
-32002The bag of cells format is incorrect or corrupted.The bag of cells format is incorrect or corrupted.
-32003Transaction not found.Please verify that the request parameters are correct and try again.
-32007Invitation code expiredInvitation code expired
-32600Invalid RequestThe JSON sent is not a valid Request object.
-32601Method not foundThe method does not exist / is not available.
-32602Invalid parameterInvalid method parameter(s).
-32603Internal errorInternal JSON-RPC error.
-32700Parse errorInvalid JSON was received by the server. An error occurred on the server while parsing the JSON text.
-40011Too Many RequestsYou've exceeded your concurrent requests capacity.

📘

NOTE:

-32000 is used for general server errors

"resource not found case"

-32600 is used for many errors about the authentication failed

"no api key case"

"api key not found case"

"inconsistent network case"

"missing columns of JSON-RPC standard"

-32603 is used for several errors

"fallback"

"internal error case"

Example Response

{
    "jsonrpc":"2.0",
    "error":{
        "code":-32000,
        "message": "Interal Error"
    },
    "id":1
}