XRP — server, Methods, mpt
API reference for XRP. All methods ->
server_info (rippled)
Retrieves status of the server in human-readable format.
The server_info command asks the server for a human-readable version of various information about the rippled server being queried.
Parameters
-
id(integer; required): a request ID (example: 1). -
jsonrpc(string; required): a JSON-RPC spec used (example: 2.0). -
method(string; required): a method used for the request. -
params(array; required):counters(boolean; optional): Iftrue, return metrics about the job queue, ledger store, and API method activity. The default isfalse.
Returns
The response follows the standard format, with a successful result containing an info object as its only field.
The info object may have some arrangement of the following fields:
amendment_blocked(boolean; may be omitted): Iftrue, this server is amendment blocked. If the server is not amendment blocked, the response omits this field.build_version(string): The version number of the runningrippledserver.closed_ledger(object; may be omitted): Information on the most recently closed ledger that has not been validated by consensus, as a Server Ledger Object. If the most recently validated ledger is available, the response omits this field and includesvalidated_ledgerinstead.complete_ledgers(string): Range expression indicating the sequence numbers of the ledger versions the localrippledhas in its database. This may be a disjoint sequence such as24900901-24900984,24901116-24901158. If the server does not have any complete ledgers (for example, it recently started syncing with the network), this is the stringempty.git(object; admin only): The Git details of yourrippledbuild.git.branch(string; admin only): The Git branch used to build your version ofrippled.git.hash(string; admin only): The Git hash of the commit used to build your version ofrippled.
hostid(string): On an admin request, returns the hostname of the server running therippledinstance; otherwise, returns a single RFC-1751 word based on the node public key.io_latency_ms(number): Amount of time spent waiting for I/O operations, in milliseconds. If this number is not very, very low, then therippledserver is probably having serious load issues.jq_trans_overflow(string — number): The number of times (since starting up) that this server has had over 250 transactions waiting to be processed at once. A large number here may mean that your server is unable to handle the transaction load of the XRP Ledger network. For detailed recommendations of future-proof server specifications, see Capacity Planning.last_close(object): Information about the last time the server closed a ledger, including the amount of time it took to reach a consensus and the number of trusted validators participating.last_close.converge_time_s(number): The amount of time it took to reach a consensus on the most recently validated ledger version, in seconds.last_close.proposers(number): How many trusted validators the server considered (including itself, if configured as a validator) in the consensus process for the most recently validated ledger version.
load(object; admin only): Detailed information about the current load state of the server.load.job_types(array; admin only): Information about the rate of different types of jobs the server is doing and how much time it spends on each.load.threads(number; admin only): The number of threads in the server's main job pool.
load_factor(number): The multiplier to the transaction cost the server is currently enforcing. For example, at1000load factor and a reference transaction cost of 10 drops of XRP, the load-scaled transaction cost is 10,000 drops (0.01 XRP). The load factor is determined by the highest of the individual server's load factor, the cluster's load factor, the open ledger cost, and the overall network's load factor.load_factor_local(number; may be omitted): The current multiplier to the transaction cost based on load to this server.load_factor_net(number; may be omitted): The current multiplier to the transaction cost being used by the rest of the network.load_factor_cluster(number; may be omitted): The current multiplier to the transaction cost based on load to servers in this cluster.load_factor_fee_escalation(number; may be omitted): The current multiplier to the transaction cost that a transaction must pay to get into the open ledger.load_factor_fee_queue(number; may be omitted): The current multiplier to the transaction cost required to get into the queue, if the queue is full.load_factor_server(number; may be omitted): The current multiplier based on server, cluster, and network load (not including open ledger cost).network_ledger(string; may be omitted): When starting the server with the--netparameter, this field contains the stringwaitingwhile the server is syncing to the network.peers(number): How many otherrippledservers this one is currently connected to.ports(array): A list of ports where the server is listening for API commands. Each entry is a Port Descriptor object.pubkey_node(string): Public key used to verify this server for peer-to-peer communications. This node key pair is automatically generated by the server the first time it starts up. (If deleted, the server can create a new pair of keys.) You can set a persistent value in the config file using the[node_seed]config option, which is useful for clustering.pubkey_validator(string; admin only): Public key used by this node to sign ledger validations. This validation key pair is derived from the[validator_token]or[validation_seed]config field.server_state(string): A string indicating to what extent the server is participating in the network. See Possible Server States for more details.server_state_duration_us(number): The number of consecutive microseconds the server has been in the current state.state_accounting(object): A map of various server states with information about the time the server spends in each. This can be useful for tracking the long-term health of your server's connectivity to the network. The contents of this field are formatted as State Accounting Objects.uptime(number): Number of consecutive seconds that the server has been operational.validated_ledger(object; may be omitted): Information about the most recent fully-validated ledger, as a Server Ledger Object. If not available, omitted andclosed_ledgeris included instead.validation_quorum(number): Minimum number of trusted validations required to validate a ledger version.validator_list_expires(string; admin only): Either the human-readable time, in UTC, when the current validator list expires, or the stringunknownif the server has yet to load a published validator list, or the stringneverif the server uses a static validator list.counters(object): Performance metrics regarding RPC calls, JobQueue, and nodestore details (node_writes,node_reads_total,node_reads_hit, etc.).current_activity(object): Lists items currently being run in the job queue and contains two arrays forjobsandmethods.
Port Descriptor Object
Each member of the ports array is an object with the following fields:
port(string — number): A port number where the server is listening.protocol(array of string): A list of protocols being served on this port. Valid protocols includehttporhttpsfor JSON-RPC,ws,ws2,wss,wss2for WebSocket,grpcfor gRPC, andpeerfor the XRP Ledger Peer Protocol.
State Accounting Object
Each field in the state_accounting object has a key that refers to a specific server state, and a value that is an object with the following fields:
duration_us(string — number): The number of microseconds the server has spent in this state. (This is updated whenever the server transitions into another state.)transitions(string — number): The number of times the server has changed into this state.
Server Ledger Object
The response provides either a validated_ledger field or a closed_ledger field. Either field contains an object with the following fields:
age(number): The time since the ledger was closed, in seconds.base_fee_xrp(number): Base fee, in XRP (not drops). This may be represented in scientific notation such as1e-05for0.00001.hash(string — hash): Unique hash for the ledger, as hexadecimal.reserve_base_xrp(number): Minimum amount of XRP (not drops) necessary for every account to keep in reserve.reserve_inc_xrp(number): Amount of XRP (not drops) added to the account reserve for each object an account owns in the ledger.seq(number): The ledger index of the latest validated ledger.
Request example
curl 'https://rpc.ankr.com/xrp_mainnet/YOUR_ANKR_API_KEY' \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "server_info",
"params": [{"counters" : false}]
}'
Response example
{
"result": {
"info": {
"build_version": "2.6.2",
"complete_ledgers": "100146025-100650763",
"hostid": "SAD",
"initial_sync_duration_us": "292599227",
"io_latency_ms": 1,
"jq_trans_overflow": "0",
"last_close": {
"converge_time_s": 3,
"proposers": 35
},
"load_factor": 1,
"peer_disconnects": "18440",
"peer_disconnects_resources": "3",
"peers": 49,
"ports": [
{
"port": "51235",
"protocol": [
"peer"
]
},
{
"port": "51234",
"protocol": [
"http"
]
},
{
"port": "51233",
"protocol": [
"ws"
]
},
{
"port": "50051",
"protocol": [
"grpc"
]
}
],
"pubkey_node": "n94B86FddoyYsndK6N8gZwcD5xoMonptkHxmWnNqc22naS5V1pF8",
"server_state": "full",
"server_state_duration_us": "99692864611",
"state_accounting": {
"connected": {
"duration_us": "283465932",
"transitions": "2"
},
"disconnected": {
"duration_us": "1040136",
"transitions": "2"
},
"full": {
"duration_us": "99692864611",
"transitions": "1"
},
"syncing": {
"duration_us": "8093158",
"transitions": "1"
},
"tracking": {
"duration_us": "0",
"transitions": "1"
}
},
"time": "2025-Dec-04 15:01:28.199321 UTC",
"uptime": 99985,
"validated_ledger": {
"age": 4,
"base_fee_xrp": 1e-05,
"hash": "DC9E71BB38F18D5202594FA800230B0B080199704D7CA02BD2524ED49170DA2F",
"reserve_base_xrp": 1,
"reserve_inc_xrp": 0.2,
"seq": 100650763
},
"validation_quorum": 28
},
"status": "success"
}
}
server_state
Retrieves status of the server in machine-readable format.
The server_state command asks the server for various machine-readable information about the rippled server's current state. The response is almost the same as the server_info rippled method, but uses units that are easier to process instead of easier to read. (For example, XRP values are given in integer drops instead of scientific notation or decimal values, and time is given in milliseconds instead of seconds.)
The Clio server does not support server_state directly, but you can ask for the server_state of the rippled server that Clio is connected to. Specify "ledger_index": "current" (WebSocket) or "params": [{"ledger_index": "current"}] (JSON-RPC).
Parameters
id(integer; required): a request ID (example: 1).jsonrpc(string; required): a JSON-RPC spec used (example: 2.0).method(string; required): a method used for the request.params(array; required): none.
Returns
The response follows the standard format, with a successful result containing a state object as its only field.
The state object may have some arrangement of the following fields:
amendment_blocked(boolean): (May be omitted) Iftrue, this server is amendment blocked. If the server is not amendment blocked, the response omits this field.build_version(string): The version number of the runningrippledversion.complete_ledgers(string): Range expression indicating the sequence numbers of the ledger versions the localrippledhas in its database. It is possible to be a disjoint sequence, e.g. "2500-5000,32570-7695432". If the server does not have any complete ledgers (for example, it recently started syncing with the network), this is the stringempty.closed_ledger(object): (May be omitted) Information on the most recently closed ledger that has not been validated by consensus, as a Server Ledger Object. If the most recently validated ledger is available, the response omits this field and includesvalidated_ledgerinstead.io_latency_ms(number): Amount of time spent waiting for I/O operations, in milliseconds. If this number is not very, very low, then therippledserver is probably having serious load issues.jq_trans_overflow(string — number): The number of times this server has had over 250 transactions waiting to be processed at once. A large number here may mean that your server is unable to handle the transaction load of the XRP Ledger network. For detailed recommendations of future-proof server specifications, see Capacity Planning.last_close(object): Information about the last time the server closed a ledger, including the amount of time it took to reach a consensus and the number of trusted validators participating.last_close.converge_time(number): The amount of time it took to reach a consensus on the most recently validated ledger version, in milliseconds.last_close.proposers(number): How many trusted validators the server considered (including itself, if configured as a validator) in the consensus process for the most recently validated ledger version.
load(object): (Admin only) Detailed information about the current load state of the server.load.job_types(array): (Admin only) Information about the rate of different types of jobs the server is doing and how much time it spends on each.load.threads(number): (Admin only) The number of threads in the server's main job pool.
load_base(number): The baseline amount of server load used in transaction cost calculations. If theload_factoris equal to theload_base, then only the base transaction cost is enforced. If theload_factoris higher than theload_base, then transaction costs are multiplied by the ratio between them. For example, if theload_factoris double theload_base, then transaction costs are doubled.load_factor(number): The load factor the server is currently enforcing. The ratio between this value and theload_basedetermines the multiplier for transaction costs. The load factor is determined by the highest of the individual server's load factor, the cluster's load factor, the open ledger cost, and the overall network's load factor.load_factor_fee_escalation(number): (May be omitted) The current multiplier to the transaction cost to get into the open ledger, in fee levels.load_factor_fee_queue(number): (May be omitted) The current multiplier to the transaction cost to get into the queue, if the queue is full, in fee levels.load_factor_fee_reference(number): (May be omitted) The transaction cost with no load scaling, in fee levels.load_factor_server(number): (May be omitted) The load factor the server is enforcing, based on load to the server, cluster, and network, but not factoring in the open ledger cost.network_ledger(string): (May be omitted) When starting the server with the--netparameter, this field contains the stringwaitingwhile the server is syncing to the network. The field is omitted otherwise.peers(number): How many otherrippledservers this one is currently connected to.ports(array): A list of ports where the server is listening for API commands. Each entry in the array is a Port Descriptor object.pubkey_node(string): Public key used to verify this server for peer-to-peer communications. This node key pair is automatically generated by the server the first time it starts up. (If deleted, the server can create a new pair of keys.) You can set a persistent value in the config file using the[node_seed]config option, which is useful for clustering.pubkey_validator(string): (Admin only) Public key used by this node to sign ledger validations. This validation key pair is derived from the[validator_token]or[validation_seed]config field.server_state(string): A string indicating to what extent the server is participating in the network. See Possible Server States for more details.server_state_duration_us(number): The number of consecutive microseconds the server has been in the current state.state_accounting(object): A map of various server states with information about the time the server spends in each. This can be useful for tracking the long-term health of your server's connectivity to the network. The contents of this field are formatted as State Accounting Objects.time(string): The current time in UTC, according to the server's clock.uptime(number): Number of consecutive seconds that the server has been operational.validated_ledger(object): (May be omitted) Information about the most recent fully-validated ledger, as a Server Ledger Object. If the most recent validated ledger is not available, the response omits this field and includesclosed_ledgerinstead.validation_quorum(number): Minimum number of trusted validations required to validate a ledger version. Some circumstances may cause the server to require more validations.validator_list_expires(number): (Admin only) When the current validator list expires, in seconds since the Ripple Epoch, or 0 if the server has yet to load a published validator list.
Port Descriptor Object
Each member of the ports array is an object with the following fields:
port(string — number): A port number where the server is listening.protocol(array of string): A list of protocols being served on this port. Valid protocols includehttporhttpsfor JSON-RPC,ws,ws2,wss,wss2for WebSocket,grpcfor gRPC, andpeerfor the XRP Ledger Peer Protocol.
State Accounting Object
Each field in the state_accounting object has a key that refers to a specific server state, and a value that is an object with the following fields:
duration_us(string — number): The number of microseconds the server has spent in this state. (This is updated whenever the server transitions into another state.)transitions(string — number): The number of times the server has changed into this state.
Server Ledger Object
The response provides either a validated_ledger field or a closed_ledger field. Either field contains an object with the following fields:
base_fee(number): The base fee, in drops of XRP, for propagating a transaction to the network, as of this ledger version.close_time(number): The official close time of this ledger version, in seconds since the Ripple Epoch. This value is rounded; see Ledger Close Times for details.hash(string — hash): The unique hash of this ledger version, as hexadecimal.reserve_base(number): The minimum account reserve, as of the most recent validated ledger version.reserve_inc(number): The owner reserve for each item an account owns, as of the most recent validated ledger version.seq(number): The ledger index of this ledger version.
Request example
curl 'https://rpc.ankr.com/xrp_mainnet/YOUR_ANKR_API_KEY' \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "server_state",
"params": []
}'
Response example
{
"result": {
"state": {
"build_version": "2.6.2",
"complete_ledgers": "100145467-100651296",
"initial_sync_duration_us": "397921122",
"io_latency_ms": 1,
"jq_trans_overflow": "0",
"last_close": {
"converge_time": 3001,
"proposers": 35
},
"load_base": 256,
"load_factor": 256,
"load_factor_fee_escalation": 256,
"load_factor_fee_queue": 256,
"load_factor_fee_reference": 256,
"load_factor_server": 256,
"peer_disconnects": "15089",
"peer_disconnects_resources": "7",
"peers": 24,
"ports": [
{
"port": "51235",
"protocol": [
"peer"
]
},
{
"port": "51234",
"protocol": [
"http"
]
},
{
"port": "51233",
"protocol": [
"ws"
]
},
{
"port": "50051",
"protocol": [
"grpc"
]
}
],
"pubkey_node": "n94B86FddoyYsndK6N8gZwcD5xoMonptkHxmWnNqc22naS5V1pF8",
"server_state": "full",
"server_state_duration_us": "101916702241",
"state_accounting": {
"connected": {
"duration_us": "391641811",
"transitions": "2"
},
"disconnected": {
"duration_us": "2071962",
"transitions": "2"
},
"full": {
"duration_us": "101916702241",
"transitions": "1"
},
"syncing": {
"duration_us": "4207345",
"transitions": "1"
},
"tracking": {
"duration_us": "1",
"transitions": "1"
}
},
"time": "2025-Dec-04 15:35:55.844094 UTC",
"uptime": 102314,
"validated_ledger": {
"base_fee": 10,
"close_time": 818177751,
"hash": "883E90590C94615CA601D2B9C577FE9AD382ADD5065550EA8021B8088AFD4581",
"reserve_base": 1000000,
"reserve_inc": 200000,
"seq": 100651296
},
"validation_quorum": 28
},
"status": "success"
}
}
version
Retrieves API version information.
The version command retrieves the API version information for the rippled server. For Clio servers, see version (clio) instead.
Parameters
id(integer; required): a request ID (example: 1).jsonrpc(string; required): a JSON-RPC spec used (example: 2.0).method(string; required): a method used for the request.params(array; required): none.
Returns
The response follows the standard format, with a successful result containing a version object as its only field.
The version object returns some arrangement of the following fields:
first(string): Lowest supported API release.last(string): Highest supported API release.good(string): Default API if none specified.
Request example
curl 'https://rpc.ankr.com/xrp_mainnet/YOUR_ANKR_API_KEY' \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "version",
"params": []
}'
Response example
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"status": "success",
"version": {
"first": "1.0.0",
"good": "1.0.0",
"last": "1.0.0"
}
}
}
Clio Methods:
These API methods are provided only by the Clio server, not rippled.
server_info
Retrieves status of the Clio server in human-readable format.
The server_info command asks the Clio server for a human-readable version of various information about the Clio server being queried. For rippled servers, see server_info (rippled) instead.
Parameters
id(integer; required): a request ID (example: 1).jsonrpc(string; required): a JSON-RPC spec used (example: 2.0).method(string; required): a method used for the request.params(array; required): none.
Returns
The response follows the standard format, with a successful result containing an info object as its only field.
The info object may have some arrangement of the following fields:
complete_ledgers(string): Range expression indicating the sequence numbers of the ledger versions the localrippledhas in its database. This may be a disjoint sequence such as24900901-24900984,24901116-24901158. If the server does not have any complete ledgers (for example, it recently started syncing with the network), this is the stringempty.counters(object; optional): Stats on API calls handled since server startup. This is present only if the client connects to the Clio server overlocalhost.rpc(object; optional): Stats on each API call handled by the Clio server since startup. Since this is nested within thecountersobject, this is also present only if the client connects to the Clio server overlocalhost. The rpc object is a map of API method names to API Stats Objects.subscriptions(object; optional): Number of current subscribers for each stream type. Since this is nested within thecountersobject, this is also present only if the client connects to the Clio server overlocalhost.subscriptions.ledgersubscriptions.transactionssubscriptions.transactions_proposedsubscriptions.manifestssubscriptions.validationssubscriptions.accountsubscriptions.accounts_proposedsubscriptions.books
time(string): The current time in UTC, according to the server's clock.uptime(number): Number of consecutive seconds that the server has been operational.amendment_blocked(boolean; optional): Whether the Clio server is Amendment Blocked.load_factor(number): The load-scaled open ledger transaction cost the server is currently enforcing, as a multiplier on the base transaction cost. For example, at1000load factor and a reference transaction cost of 10 drops of XRP, the load-scaled transaction cost is 10,000 drops (0.01 XRP). The load factor is determined by the highest of the individual server's load factor, the cluster's load factor, the open ledger cost, and the overall network's load factor.clio_version(string): The version number of the running Clio server.libxrpl_version(string): The version number of thelibxrpllibrary this Clio server was built against.validation_quorum(number; optional): Minimum number of trusted validations required to validate a ledger version. Some circumstances may cause the server to require more validations. This value is obtained fromrippled. This field may be omitted from the response if the Clio server is unable to connect torippledfor some reason.rippled_version(string; optional): The version number of the runningrippledserver that the Clio server is connected to. This field may be omitted from the response if the Clio server is unable to connect torippledfor some reason.network_id(string; optional): The network ID of the network that therippledthis Clio server is connected to is operating on. This field may be omitted from the response if the Clio server is unable to connect torippledfor some reason.validated_ledger(object; optional): Information about the most recent fully-validated ledger. If the most recent validated ledger is not available, the response omits this field and includesclosed_ledgerinstead.validated_ledger.age(number): The time since the ledger was closed, in seconds.validated_ledger.base_fee_xrp(number): Base fee, in XRP. This may be represented in scientific notation such as1e-05for0.00001.validated_ledger.hash(string): Unique hash for the ledger, as hexadecimal.validated_ledger.reserve_base_xrp(number): Minimum amount of XRP (not drops) necessary for every account to keep in reserve. This may be represented in scientific notation such as1e-05for0.00001.validated_ledger.reserve_inc_xrp(number): Amount of XRP (not drops) added to the account reserve for each object an account owns in the ledger. This may be represented in scientific notation such as1e-05for0.00001.validated_ledger.seq(number): The ledger index of the latest validated ledger.validator_list_expires(string): (Admin only) Either the human-readable time, in UTC, when the current validator list expires, the stringunknownif the server has yet to load a published validator list or the stringneverif the server uses a static validator list.
cache(object): Information on Clio's state data cache.cache.size(number): Number of state data objects currently in the cache.cache.is_full(boolean): True if cache contains all state data for a specific ledger, false otherwise. Some API calls, such as the book_offers method, process much faster when the cache is full.cache.latest_ledger_seq(number): The ledger index of the latest validated ledger stored in the cache.
etl(object): Therippledsources (ETL sources) that the Clio server is connected to. This is present only if the client connects to the Clio server overlocalhost.etl.etl_sources(array): List therippledsources (ETL sources) that the Clio server is connected to and extracts data from.etl.etl_sources.validated_range(string): The validated ledger range retrieved by the P2Prippledserver.etl.etl_sources.is_connected(boolean): True if Clio is connected to this source via websocket, false otherwise. A value of false here could indicate a networking issue, or thatrippledis not running, amongst other things.etl.etl_sources.ip(number): IP of therippledserver.etl.etl_sources.ws_port(number): Websocket port of therippledserver.etl.etl_sources.grpc_port(number): The gRPC connection port of the P2Prippledserver that the Clio server is connected to.etl.etl_sources.last_msg_age_seconds(number): Total seconds that have elapsed since Clio last heard anything fromrippled. This should not be higher than 8.
etl.is_writer(boolean):trueif this Clio server is currently writing data to the database,falseotherwise.etl.read_only(boolean):trueif this Clio server is configured in read-only mode,falseotherwise.etl.last_publish_age_seconds(number): Time in seconds that have elapsed since this Clio server last published a ledger. This should not be more than 8.
validated(boolean): Whentrue, this indicates that the response uses a ledger version that has been validated by consensus. In Clio, this is always true as Clio stores and returns validated ledger data. If a request was forwarded torippledand the server returns current data, a missing orfalsevalue indicates that this ledger's data is not final.status(string): Returns the status of the API request:successwhen the request completes successfully.
API Stats Objects
An API Stats object provides key metrics for every API call handled by the Clio server since startup. It includes the following fields:
started(number): Number of API calls of this type that the Clio server has started processing since startup.finished(number): Number of API calls of this type that the Clio server has finished processing since startup.errored(number): Number of API calls of this type that have resulted in some sort of error since startup.forwarded(number): Number of API calls of this type that the Clio server has forwarded to arippledP2P server since startup.duration_us(number): The total number of microseconds spent processing API calls of this type since startup.
Request example
curl 'https://rpc.ankr.com/xrp_mainnet/YOUR_ANKR_API_KEY' \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "server_info",
"params": []
}'
Response example
{
"result": {
"info": {
"build_version": "2.6.2",
"complete_ledgers": "100146025-100669999",
"hostid": "SAD",
"initial_sync_duration_us": "292599227",
"io_latency_ms": 1,
"jq_trans_overflow": "0",
"last_close": {
"converge_time_s": 3,
"proposers": 35
},
"load_factor": 1,
"peer_disconnects": "25682",
"peer_disconnects_resources": "10",
"peers": 50,
"ports": [
{
"port": "51235",
"protocol": [
"peer"
]
},
{
"port": "51234",
"protocol": [
"http"
]
},
{
"port": "51233",
"protocol": [
"ws"
]
},
{
"port": "50051",
"protocol": [
"grpc"
]
}
],
"pubkey_node": "n94B86FddoyYsndK6N8gZwcD5xoMonptkHxmWnNqc22naS5V1pF8",
"server_state": "full",
"server_state_duration_us": "174432150738",
"state_accounting": {
"connected": {
"duration_us": "283465932",
"transitions": "2"
},
"disconnected": {
"duration_us": "1040136",
"transitions": "2"
},
"full": {
"duration_us": "174432150738",
"transitions": "1"
},
"syncing": {
"duration_us": "8093158",
"transitions": "1"
},
"tracking": {
"duration_us": "0",
"transitions": "1"
}
},
"time": "2025-Dec-05 11:47:07.485428 UTC",
"uptime": 174724,
"validated_ledger": {
"age": 4,
"base_fee_xrp": 1e-05,
"hash": "88DD7DD8994E83A178D341FB9621610CD56B4576384FCA3A962A675E9C1A4003",
"reserve_base_xrp": 1,
"reserve_inc_xrp": 0.2,
"seq": 100669999
},
"validation_quorum": 28
},
"status": "success"
}
}
ledger
Retrieves info on the ledger version.
The ledger command retrieves information about the public ledger.
Note that the Clio server returns validated ledger data by default.
Parameters
-
id(integer; required): a request ID (example: 1). -
jsonrpc(string; required): a JSON-RPC spec used (example: 2.0). -
method(string; required): a method used for the request. -
params(array; required):ledger_hash(hash; optional): The unique hash of the ledger version to use. (See Specifying Ledgers).ledger_index(ledger index; optional): The ledger index of the ledger to use, or a shortcut string to choose a ledger automatically. (See Specifying Ledgers)transactions(boolean; optional): Iftrue, return information on transactions in the specified ledger version. Defaults tofalse. Ignored if you did not specify a ledger version.expand(boolean; optional): Provide full JSON-formatted information for transaction/account information instead of only hashes. Defaults tofalse. Ignored unless you request transactions.owner_funds(boolean; optional): Iftrue, includeowner_fundsfield in the metadata of OfferCreate transactions in the response. Defaults tofalse. Ignored unless transactions are included and expand istrue.binary(boolean; optional): Iftrue, andtransactionsandexpandare both alsotrue, return transaction information in binary format (hexadecimal string) instead of JSON format.diff(boolean; optional): Iftrue, returns all objects that were added, modified, or deleted as part of applying transactions in the specified ledger.
Returns
The response follows the standard format, with a successful result containing information about the ledger, including the following fields:
ledger(object): The complete header data of this ledger.ledger.account_hash(string): Hash of all account state information in this ledger, as hex.ledger.accountState(array; optional): All the account-state information in this ledger.ledger.close_flags(integer): A bit-map of flags relating to the closing of this ledger.ledger.close_time(integer): The time this ledger was closed, in seconds since the Ripple Epoch.ledger.close_time_human(string): The time this ledger was closed, in human-readable format. Always uses the UTC time zone.ledger.close_time_resolution(integer): Ledger close times are rounded to within this many seconds.ledger.closed(boolean): Whether this ledger has been closed or not.ledger.ledger_hash(string): Unique identifying hash of the entire ledger.ledger.ledger_index(string): The Ledger Index of this ledger, as a quoted integer.ledger.parent_close_time(integer): The time at which the previous ledger was closed.ledger.parent_hash(string): Unique identifying hash of the ledger that came immediately before this one.ledger.total_coins(string): Total number of XRP drops in the network, as a quoted integer. (This decreases as transaction costs destroy XRP.)ledger.transaction_hash(string): Hash of the transaction information included in this ledger, as hex.ledger.transactions(array; optional): Transactions applied in this ledger version. By default, members are the transactions' identifying Hash strings. If the request specifiedexpandastrue, members are full representations of the transactions instead, in either JSON or binary depending on whether the request specifiedbinaryastrue.
ledger_hash(string): Unique identifying hash of the entire ledger.ledger_index(number): The Ledger Index of this ledger.validated(boolean; optional): Iftrue, this is a validated ledger version. If omitted or set tofalse, this ledger's data is not final.diff(object; optional): Object containing an array of hashes that were added, modified, or deleted as part of applying transactions for the ledger.
If the request specified "owner_funds": true and expanded transactions, the response has a field owner_funds in the metaData object of each OfferCreate transaction. The purpose of this field is to make it easier to track the funding status of offers with each new validated ledger.
owner_funds(string): Numeric amount of theTakerGetscurrency that theAccountsending this OfferCreate transaction has after the execution of all transactions in this ledger. This does not check whether the currency amount is frozen.
If the request specified "diff": true, the response has an object diff. The fields of this object are as follows:
object_id(string): The object identifier.Hashes(object or string): Depending on whether the request setbinarytotrueorfalse, this field returns the contents of the object that was created, the new value of an object that was modified, or an empty string if the object was deleted.
Request example
curl 'https://rpc.ankr.com/xrp_mainnet/YOUR_ANKR_API_KEY' \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "ledger",
"params": [
{
"ledger_index": "validated",
"transactions": false,
"expand": false,
"owner_funds": false,
"diff": false
}
]
}'
Response example
{
"result": {
"ledger": {
"account_hash": "F16BD4873733F45AA69A22E16669701FA6382BE5465EDA7B9B77AFCFBE9BB335",
"close_flags": 0,
"close_time": 818251651,
"close_time_human": "2025-Dec-05 12:07:31.000000000 UTC",
"close_time_iso": "2025-12-05T12:07:31Z",
"close_time_resolution": 10,
"closed": true,
"ledger_hash": "57FAE517644B0E528D331D105D5E06071742CD7E35BE77C4F775E6FA98B38A83",
"ledger_index": "100670317",
"parent_close_time": 818251650,
"parent_hash": "ECEB12B2CC088D735BA64F05DF424833B9CD1821FDFE72C8608FA0895BF8DA87",
"total_coins": "99985745812732275",
"transaction_hash": "B3440C9462D83D4CD22208538DA257974A99AC132EBE976CE7B581C36F8B8825"
},
"ledger_hash": "57FAE517644B0E528D331D105D5E06071742CD7E35BE77C4F775E6FA98B38A83",
"ledger_index": 100670317,
"status": "success",
"validated": true
}
}
mpt_holders
Retrieves the holders of a given MPT issuance for a given ledger.
For a given MPTokenIssuanceID and ledger sequence, mpt_holders returns all holders of that MPT and their balance. This method likely returns very large data sets, so you should expect to implement paging via the marker field. This API is only available using Clio, not rippled.
Parameters
-
id(integer; required): a request ID (example: 1). -
jsonrpc(string; required): a JSON-RPC spec used (example: 2.0). -
method(string; required): a method used for the request. -
params(array; required):mpt_issuance_id(string; required): TheMPTokenIssuanceto query.ledger_index(ledger index; optional): The Ledger Index of the max ledger to use, or a shortcut string to choose a ledger automatically. You must specify eitherledger_indexorledger_hash. See Specifying Ledgers.ledger_hash(string; optional): A 32-byte hex string for the ledger version to use. You must specify eitherledger_indexorledger_hash. See Specifying Ledgers.marker(marker; optional): Used to continue your query where it left off in paginating.limit(number — positive integer; optional): Specify a limit to the number of MPTs returned.
Returns
mpt_issuance_id(string): TheMPTokenIssuancequeried.mptokens(array): An array of MPTokens. Includes all relevant fields in the underlyingMPTokenobject.marker(marker; optional): Used to continue querying where we left off when paginating. Omitted if there are no more entries after this result.limit(number): The limit, as specified in the request.ledger_index(ledger index): The index of the ledger used.validated(boolean): Iftrue, the ledger has been validated by the consensus process and is immutable. Otherwise, the contents of the ledger are not final and may change. In Clio, this is always true as Clio stores and returns validated ledger data.
MPToken
An MPToken object has the following parameters:
account(string): The account address of the holder who owns theMPToken.flags(number): The flags assigned to theMPTokenobject.mpt_amount(string — number): Specifies a positive amount of tokens currently held by the owner.mptoken_index(string): Key of theMPTokenobject.
Request example
curl 'https://rpc.ankr.com/xrp_mainnet/YOUR_ANKR_API_KEY' \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "mpt_holders",
"params": [
{
"mpt_issuance_id": "0024D204E07DDDFBCD83B1649C07FE27FD536A3A32E6FDD8",
"ledger_index": "validated"
}
]
}'
Response example
{
"result": {
"mpt_issuance_id": "0024D204E07DDDFBCD83B1649C07FE27FD536A3A32E6FDD8",
"limit": 50,
"ledger_index": 2415033,
"mptokens": [
{
"account": "rfyWeQpYM3vCXRHA9cMLs2ZEdZv1F1jzm9",
"flags": 0,
"mpt_amount": "200",
"mptoken_index": "22F99DCD55BCCF3D68DC3E4D6CF12602006A7563A6BE93FC57FD63298BCCEB13"
}
],
"validated": true,
"status": "success"
},
"warnings": [
{
"id": 2001,
"message": "This is a clio server. clio only serves validated data. If you want to talk to rippled, include 'ledger_index':'current' in your request"
}
]
}
version
Retrieves API version information.
The version command retrieves the API version information of the Clio server. For rippled servers, see version (rippled) instead.
Parameters
id(integer; required): a request ID (example: 1).jsonrpc(string; required): a JSON-RPC spec used (example: 2.0).method(string; required): a method used for the request.params(array; required): none.
Returns
The response follows the standard format, with a successful result containing an info object as its only field.
The version object returns some arrangement of the following fields:
first(integer): Lowest supported API release.last(integer): Highest supported API release.good(integer): Default API if none specified.
Request example
curl 'https://rpc.ankr.com/xrp_mainnet/YOUR_ANKR_API_KEY' \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "version",
"params": []
}'
Response example
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"status": "success",
"version": {
"first": "1.0.0",
"good": "1.0.0",
"last": "1.0.0"
}
}
}
Utility Methods:
Use these methods to perform convenient tasks, such as ping and random number generation.
ping
Confirms connectivity with the server.
The ping command returns an acknowledgement, so that clients can test the connection status and latency.
Parameters
id(integer; required): a request ID (example: 1).jsonrpc(string; required): a JSON-RPC spec used (example: 2.0).method(string; required): a method used for the request.params(array; required): none.
Returns
The response follows the standard format, with a successful result containing no fields. The client can measure the round-trip time from request to response as latency.
Request example
curl 'https://rpc.ankr.com/xrp_mainnet/YOUR_ANKR_API_KEY' \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "ping",
"params": []
}'
Response example
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"status": "success"
}
}
random
Generates a random number.
The random command provides a random number to be used as a source of entropy for random number generation by clients.
Parameters
id(integer; required): a request ID (example: 1).jsonrpc(string; required): a JSON-RPC spec used (example: 2.0).method(string; required): a method used for the request.params(array; required): none.
Returns
The response follows the standard format, with a successful result containing the following field:
random(string): Random 256-bit hex value.
Request example
curl 'https://rpc.ankr.com/xrp_mainnet/YOUR_ANKR_API_KEY' \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "random",
"params": []
}'
Response example
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"random": "3060417EAEBDB220E2CBED2B4BCBAEDD805D8A1A8D7C405A868F11ABB7249B2A",
"status": "success"
}
}