Skip to main content

Endpoints

EnvironmentURL
Mainnetwss://api.hotstuff.trade/ws
Testnetwss://testnet-api.hotstuff.trade/ws

Limits

LimitValue
Connections per IP100
Subscriptions per IP1,000
Inbound messages per minute2,000
Max message size512 bytes

Message Buffering

Each client has a 256-message outbound buffer. When the buffer fills (slow consumer), new messages are dropped silently—the connection remains open with no error sent.
Slow clients will miss data without warning. Process messages promptly to avoid gaps.

Rate Limiting

Exceeding 2,000 inbound messages/min triggers a JSON-RPC error. The connection stays open:
{
  "jsonrpc": "2.0",
  "id": "1",
  "error": {
    "code": -32001,
    "message": "Message rate limit exceeded",
    "data": {
      "retry_after": 12
    }
  }
}
The retry_after field indicates seconds to wait before sending more messages.

JSON-RPC post Methods (Info + Exchange)

In addition to subscriptions, WebSocket supports request-response calls through:
  • method: "post"
  • params.type: "info" for all Info REST endpoints
  • params.type: "action" for all Exchange REST endpoints
The payload format mirrors the REST API reference methods and params. See the WSS section Info + Exchnage Requests for separate interactive pages:
  • Info Requests
  • Action Requests

Error Codes

CodeNameDescription
-32700Parse ErrorInvalid JSON
-32600Invalid RequestMalformed JSON-RPC 2.0
-32601Method Not FoundUnknown method
-32602Invalid ParamsBad method parameters
-32603Internal ErrorServer-side failure
-32000Server ErrorGeneric server error
-32001Too Many RequestsRate limit exceeded