Skip to main content

Per-second limits

Every call belongs to one of three classes. It spends your quota and the per-second limit of its class: The numbers depend on the plan — see Plans and billing. The limits belong to the plan and are shared by all its endpoints. Each limit holds one second’s worth. With 30 WU/s, for example, up to 30 WU go through at once, and the limit then refills at 30 WU per second. A read is let in while the read limit has any room left, and its cost is taken after the answer: one heavy read can push the limit below zero, and the next reads wait until it has refilled. A block range returns at most 10 blocks per call.

Error format

A refusal is JSON with a message in Error and a machine-readable code:
Use code; the message may change. A refusal always has a code. The node’s own errors do not: java-tron answers {"Error": "…"} without a code, usually with status 200, and such an answer is charged like any other — see Quota units. Refusals are not charged and carry no X-Node-API-WU, except method_not_found, which carries X-Node-API-WU: 0. 429 and 503 refusals usually carry Retry-After.

Refusal codes

Over gRPC the same codes come in the x-node-api-reason trailing metadata, with a gRPC status instead of the HTTP one — see gRPC.

Degraded mode

When our primary node for Node API is unavailable or falls behind the network, the service keeps running on a reserve node. While it does:
  • answered calls carry the header X-Node-API-Mode: degraded (over gRPC, the trailing metadata x-node-api-mode: degraded);
  • your read limit in WU per second is halved; block call and broadcast limits stay as they are;
  • fresh blocks — within 20 of the head — and their receipts are served as usual, while older blocks, their receipts and block ranges are refused with 503 degraded;
  • the shared capacity is smaller, so 503 capacity is more likely.
Broadcasts are never cut. The normal mode comes back by itself; you do not need to do anything. If your app reads old blocks, pause that work while the header is present and resume when it is gone.

Retrying

  • 429 rate_read, rate_block, rate_write, trials and every 503: wait the number of seconds in Retry-After, then retry.
  • 429 quota and 429 overage_budget: waiting does not help. Top up the balance or change the plan.
  • 502 node_error: retry. Re-sending the same signed transaction is safe — the network executes a transaction ID only once.
  • Other 4xx: fix the request; repeating it gives the same answer.