Skip to content

Response Formatting Guide

Responses are structured differently based on whether the request is made through the WebSocket, JSON-RPC, or Commandline interfaces. The JSON-RPC and Commandline interfaces share the same format, as the Commandline interface internally uses JSON-RPC.

FieldTypeDescription
id(Varies)(For WebSocket) The ID from the original request.
statusString(For WebSocket) Indicates success when the request was received and processed correctly.
result.statusString(For JSON-RPC and Commandline) Indicates success when the request was successfully processed.
typeString(For WebSocket) The value response is used for direct replies to API requests. Asynchronous notifications use other values, such as ledgerClosed or transaction.
resultObjectContains the query result, with content that varies by command.
warningString(Optional) If present, the value is load, indicating the client is nearing the rate limit threshold where the server may disconnect.
warningsArray(Optional) A list of Warning Objects with important server warnings. For more details, see API Warnings.
forwardedBoolean(Optional) true indicates the request was forwarded from a Reporting Mode server to a P2P server to fulfill the request. Default is false.

API Warnings

When a response contains a warnings array, each entry represents a specific warning from the server. Each Warning Object includes the following fields:

FieldTypeDescription
idNumberA unique numeric code identifying this warning message.
messageStringA human-readable explanation of the warning. Avoid writing code that relies on the content of this field; use the id (and details, if available) to interpret the warning instead.
detailsObject(Optional) Additional context about the warning. The content varies by warning type.