You can interact with Xahau via the publicly accessible APIs provided by the xahaud
servers.
Some methods return more data than can fit efficiently into a single response. When the results exceed the response limit, a marker
field is included in the response. This field allows you to retrieve additional pages of data through subsequent requests. To continue fetching data, include the marker
value from the previous response in your next request. If a response does not include a marker
, it means you have reached the end of the data set.
The format of the marker
field is intentionally unspecified. Each server can define the marker
as needed, meaning it could be a string, a nested object, or another type. The marker
format may vary between servers and even between methods on the same server. Each marker
is temporary and may become invalid after approximately 10 minutes.
The xahaud
server enforces rate limits on API clients using public APIs to prevent excessive requests. Rate limiting is applied based on the client’s IP address, meaning multiple clients sharing a network address translation (NAT) will share the same rate limit associated with their public IP.
When a client is nearing the rate limit, the server includes a "warning": "load"
field at the top level of an API response. This warning does not appear on every response but may be sent several times before the server disconnects the client. Clients connected as an admin are exempt from rate limiting.
If a client exceeds the rate limit, the server disconnects the client and temporarily blocks further requests from that IP address. The WebSocket and JSON-RPC APIs handle disconnects differently, as described below.
Interact directly with an xahaud server using public API methods. These methods are not necessarily intended for general public use but are accessible to any client connected to the server.
account_channels
List payment channels where the account is the channel source.
account_currencies
List currencies the account can send or receive.
account_info
Retrieve basic information about an account.
account_lines
Access trust line information for an account.
account_objects
Retrieve all ledger objects owned by an account.
account_offers
View an account’s currency exchange offers.
account_tx
Retrieve transaction history for an account.
gateway_balances
Calculate total issued amounts for an account.
noripple_check
Suggest changes to an account's Default Ripple and No Ripple settings.
ledger
Get information about a specific ledger version.
ledger_closed
Retrieve the most recently closed ledger version.
ledger_current
Retrieve the current working ledger version.
ledger_data
Access raw ledger content.
ledger_entry
Retrieve a specific element from a ledger version.
submit
Submit a transaction to the network.
submit_multisigned
Submit a multi-signed transaction.
transaction_entry
Retrieve details about a transaction in a specific ledger.
tx
Retrieve transaction information across all ledgers.
sign
(Admin) Cryptographically sign a transaction.
sign_for
(Admin) Contribute to a multi-signature.
book_offers
View offers for exchanging two currencies.
deposit_authorized
Check if one account can send payments directly to another.
channel_authorize
Sign a claim for a payment channel
channel_verify
Verify a payment channel claim signature.
subscribe
Listen for updates on a subject
unsubscribe
Stop receiving updates
fee
Retrieve information about transaction costs.
server_info
Get server status in human-readable format.
server_state
Get server status in machine-readable format.
manifest
Retrieve public key details for a validator.
json
Proxy for running commands with JSON parameters. (Commandline only.)
ping
Verify server connectivity.
random
Generate random numbers.
wss://xahau.network or https://xahau.network (Mainnet)
wss://xahau-test.net or https://xahau-test.net (Testnet)
To send a sample request to the API, use the following commands.
Once you establish a WebSocket connection to the xahaud
server, you can send commands as JSON objects with these fields:
command
String
The name of the API method
id
(Multiple)
(Optional) Unique identifier for the request.
api_version
Number
(Optional) Specifies the API version.
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.
xahaud
Start calling the service xahaud
method
The name of the API method
params
(Optional)
These methods are intended exclusively for trusted personnel responsible for maintaining xahaud server operations.
validation_create
Generate a formatted key pair for xhaud nodes. (Validators should use tokens instead of keys from this method.)
wallet_propose
Generate keys for a new account.
can_delete
Enable online deletion of ledgers up to a specified ledger.
download_shard
Download a specific shard of ledger history.
ledger_cleaner
Set up the ledger cleaner to detect and resolve corrupted data.
ledger_request
Query a peer server for a specific ledger version.
log_level
View or change log verbosity levels.
logrotate
Reopen the log file.
node_to_shard
Transfer data from the ledger store to the shard store.
ledger_accept
Close and advance the ledger in stand-alone mode.
stop
Shut down the xahaud server.
sign
Cryptographically sign a transaction.
sign_for
Contribute to a multi-signature.
connect
Force the server to connect to a specific peer.
peer_reservations_add
Add or update a reserved slot for a specific peer.
peer_reservations_del
Remove a reserved slot for a specific peer.
peer_reservations_list
View all reserved peer slots.
peers
Retrieve information about connected peers
consensus_info
View the current state of the consensus process.
feature
Retrieve information about protocol amendments.
fetch_info
Check the server’s synchronization status with the network.
get_counts
View statistics about server internals and memory usage.
manifest
Retrieve public key details for a known validator.
Access information about internal subsystems.
validator_info
Get the server's validator configuration details.
validator_list_sites
View sites that publish validator lists.
validators
Retrieve information about the current validators.
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.
Field
Type
Description
id
(Varies)
(For WebSocket) The ID from the original request.
status
String
(For WebSocket) Indicates success
when the request was received and processed correctly.
result.status
String
(For JSON-RPC and Commandline) Indicates success
when the request was successfully processed.
type
String
(For WebSocket) The value response
is used for direct replies to API requests. Asynchronous notifications use other values, such as ledgerClosed
or transaction
.
result
Object
Contains the query result, with content that varies by command.
warning
String
(Optional) If present, the value is load
, indicating the client is nearing the rate limit threshold where the server may disconnect.
warnings
Array
(Optional) A list of Warning Objects with important server warnings. For more details, see API Warnings.
forwarded
Boolean
(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:
id
Number
A unique numeric code identifying this warning message.
message
String
A 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.
details
Object
(Optional) Additional context about the warning. The content varies by warning type.