Request Formatting Guide
Public Servers
Section titled “Public Servers”- wss://xahau.network or https://xahau.network (Mainnet)
- wss://xahau-test.net or https://xahau-test.net (Testnet)
Sample Requests
Section titled “Sample Requests”To send a sample request to the API, use the following commands.
Websocket
Section titled “Websocket”{ "id": 3, "command": "account_info", "account": "rhBDFMmr3jSjgsWMqBAYaATLy3PuXy395y", "strict": true, "ledger_index": "validated", "api_version": 1}
WebSocket Request Structure
Section titled “WebSocket Request Structure”Once you establish a WebSocket connection to the xahaud
server, you can send commands as JSON objects with these fields:
Field | Type | Description |
---|---|---|
command | String | The name of the API method |
id | (Multiple) | (Optional) Unique identifier for the request. |
api_version | Number | (Optional) Specifies the API version. |
JSON-RPC
Section titled “JSON-RPC”POST https://xahau.network/Content-Type: application/json
{ "method": "account_info", "params": [ { "account": "rhBDFMmr3jSjgsWMqBAYaATLy3PuXy395y", "strict": true, "ledger_index": "validated", "api_version": 1 } ]}
JSON-RPC Request Structure
Section titled “JSON-RPC Request Structure”Field | Type | Description |
---|---|---|
method | String | The name of the API method |
params | Array | (Optional) A one-item array containing a JSON object with the parameters of the method. |
Comandline
Section titled “Comandline”xahaud account_info rhBDFMmr3jSjgsWMqBAYaATLy3PuXy395y validated strict
Commandline Request Structure
Section titled “Commandline Request Structure”Field | Description |
---|---|
xahaud | Start calling the service xahaud |
method | The name of the API method |
params | (Optional) |