wss://honeycluster.iosubscribeSubscribes to various event streams (ledger closings, transactions, etc.) to receive real-time updates over WebSocket.
{
"result": {
"fee_base": 10,
"fee_ref": 10,
"ledger_hash": "4BC50C9B0D8515D3EAAE1E74B29A95804346C491EE1A95BF25E4AAB854A6A652",
"ledger_index": 89012345,
"ledger_time": 750171900,
"reserve_base": 10000000,
"reserve_inc": 2000000,
"validated_ledgers": "32570-89012345"
},
"status": "success",
"type": "response",
"id": 1
}| Field | Type | Description |
|---|---|---|
commandrequired | string | WebSocket command name |
id | object | Client-supplied identifier to correlate requests with responses. |
streams | enum<string>[] | Array of stream types to subscribe to (e.g. "ledger", "transactions"). |
accounts | string[] | Array of account addresses to subscribe to for transaction notifications. |
accounts_proposed | string[] | Like accounts, but includes unvalidated (proposed) transactions. |
books | object[] | Array of order book subscriptions. |
books[].required | object | Currency the taker receives. |
books[].required | string | Three-letter ISO 4217 currency code, or 160-bit hex currency code. |
books[]. | string | Account address of the token issuer. Omit for XRP. |
books[].required | object | Currency the taker pays. |
books[].required | string | Three-letter ISO 4217 currency code, or 160-bit hex currency code. |
books[]. | string | Account address of the token issuer. Omit for XRP. |
books[]. | string | Account address to use as perspective. |
books[]. | boolean | If true, send the current order book as the first message. |
books[]. | boolean | If true, subscribe to both sides of the order book. |
url | string | URL for a WebSocket callback (for HTTP API subscribers). |
url_username | string | Username for authenticating to the callback URL. |
url_password | string | Password for authenticating to the callback URL. |
api_version | object | API version for the response format. Version 2 is the default for rippled 2.0+. |
{
"command": "subscribe",
"id": 1,
"streams": [
"ledger",
"transactions"
],
"accounts": [
"rG1QQv2nh2gr7RCZ1P8YYcBUKCCN633jCn"
]
}| Field | Type | Description |
|---|---|---|
result | object | |
status | enum<string> | Available successerror |
type | string | |
id | stringnumber | Echo of the client-provided correlation ID |
{
"result": {
"fee_base": 10,
"fee_ref": 10,
"ledger_hash": "4BC50C9B0D8515D3EAAE1E74B29A95804346C491EE1A95BF25E4AAB854A6A652",
"ledger_index": 89012345,
"ledger_time": 750171900,
"reserve_base": 10000000,
"reserve_inc": 2000000,
"validated_ledgers": "32570-89012345"
},
"status": "success",
"type": "response",
"id": 1
}