For AI agents: an LLM-friendly Markdown version of every page is available by appending .md to its URL or by sending an Accept: text/markdown request header. The full documentation index is at https://www.ankr.com/docs/llms.txt
Skip to main content

XRP — book, deposit, get, nft, ripple, channel, Methods, server

API reference for XRP. All methods ->

book_offers

Retrieves info on the currency exchange offers.

The book_offers method retrieves a list of offers between two currencies, also known as an order book. The response omits unfunded offers and reports how much of each remaining offer's total is currently funded.

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):

    • taker_gets (object; required): The asset the account taking the offer would receive, as a currency without an amount.
    • taker_pays (object; required): The asset the account taking the offer would pay, as a currency without an amount.
    • domain (hash; optional): The ledger entry ID of a permissioned domain. If provided, return offers from the corresponding permissioned DEX instead of using the open DEX. (Requires the PermissionedDEX amendment. Open for Voting: 48.57%)
    • 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)
    • limit (number; optional): The maximum number of offers to return. The response may include fewer results.
    • taker (string; optional): The Address of an account to use as a perspective. The response includes this account's Offers even if they are unfunded. (You can use this to see what Offers are above or below yours in the order book.)

Returns

The response follows the standard format, with a successful result containing the following fields:

  • ledger_current_index (ledger index; optional): Omitted if ledger_index is provided. The ledger index of the current in-progress ledger version, which was used to retrieve this information.
  • ledger_index (ledger index; optional): Omitted if ledger_current_index is provided. The ledger index of the ledger version that was used when retrieving this data, as requested.
  • ledger_hash (hash; optional): The identifying hash of the ledger version that was used when retrieving this data, as requested.
  • offers (array): Array of offer objects, as described below.

Each member of the offers array contains canonical fields of an Offer entry and can also contain the following additional fields:

  • owner_funds (string): Amount of the TakerGets currency the side placing the offer has available to be traded. (XRP is represented as drops; any other currency is represented as a decimal value.) If a trader has multiple offers in the same book, only the highest-ranked offer includes this field.
  • taker_gets_funded (currency amount; optional): (Only included in partially-funded offers) The maximum amount of currency that the taker can get, given the funding status of the offer.
  • taker_pays_funded (currency amount; optional): (Only included in partially-funded offers) The maximum amount of currency that the taker would pay, given the funding status of the offer.
  • quality (string): The exchange rate, as the ratio taker_pays divided by taker_gets. For fairness, offers that have the same quality are automatically taken first-in, first-out. (In other words, if multiple people offer to exchange currency at the same rate, the oldest offer is taken first.)

Request example

curl 'https://rpc.ankr.com/xrp_mainnet/YOUR_ANKR_API_KEY' \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "book_offers",
"params": [
{
"taker": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
"taker_gets": {
"currency": "XRP"
},
"taker_pays": {
"currency": "USD",
"issuer": "rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B"
},
"limit": 10
}
]
}'

Response example

{
"result": {
"ledger_current_index": 100604206,
"offers": [
{
"Account": "rdmZRvr9aBdGwzF2DwYBnHxTUDomJoiaQ",
"BookDirectory": "DFA3B6DDAB58C7E8E5D944E736DA4B7046C30E4F460FD9DE4F07346FDFE9BD33",
"BookNode": "0",
"Flags": 0,
"LedgerEntryType": "Offer",
"OwnerNode": "8",
"PreviousTxnID": "4F34894FC227EBC36B0469672C533DB245DB8CB9FAC59E49A7B058D3A0ED08F6",
"PreviousTxnLgrSeq": 100604145,
"Sequence": 99505926,
"TakerGets": "9117876",
"TakerPays": {
"currency": "USD",
"issuer": "rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B",
"value": "18.49086962"
},
"index": "8FA868A2EFF6B0CF195126639615DBE9251AE5E5559E428450D7F260E2D16CBA",
"owner_funds": "16902114",
"quality": "0.000002027979939626291"
}
],
"status": "success",
"validated": false
}
}

deposit_authorized

Checks whether an account is authorized to send money directly to another account.

The deposit_authorized command indicates whether one account is authorized to send payments directly to another. See Deposit Authorization for information on how to require authorization to deliver money to your account.

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):

    • source_account (string — address; required): The sender of a possible payment.
    • destination_account (string — address; required): The recipient of a possible payment.
    • ledger_hash (hash; optional): A 32-byte hex string for 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)
    • credentials (array; optional): A set of credentials to take into account when checking if the sender can send funds to the destination. Each member of the array must be the unique ID of a Credential entry in the ledger. Cannot be an empty array.

Note: If you provide a set of credentials that does not exactly match a set of credentials preauthorized by the destination, the payment is not authorized, even if the destination has preauthorized a subset of those credentials. This matches the behavior of transaction processing.

Returns

  • credentials (array of hash; optional): The credentials specified in the request, if any.
  • deposit_authorized (boolean; required): Whether the specified source account is authorized to send payments directly to the destination account. If true, either the destination account does not require deposit authorization or the source account is preauthorized.
  • destination_account (string — address; required): The destination account specified in the request.
  • ledger_hash (string; optional): The identifying hash of the ledger that was used to generate this response.
  • ledger_index (number — ledger index; optional): The ledger index of the ledger version that was used to generate this response.
  • ledger_current_index (number — ledger index; optional): The ledger index of the current in-progress ledger version, which was used to generate this response.
  • source_account (string — address; required): The source account specified in the request.
  • validated (boolean; optional): If true, the information comes from a validated ledger version.

Request example

curl 'https://rpc.ankr.com/xrp_mainnet/YOUR_ANKR_API_KEY' \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "deposit_authorized",
"params": [
{
"source_account": "rEhxGqkqPPSxQ3P25J66ft5TwpzV14k2de",
"destination_account": "rsUiUMpnrgxQp24dJYZDhmV4bE3aBtQyt8",
"credentials": [
"A182EFBD154C9E80195082F86C1C8952FC0760A654B886F61BB0A59803B4387B",
"383D269D6C7417D0A8716B09F5DB329FB17B45A5EFDBAFB82FF04BC420DCF7D5"
],
"ledger_index": "validated"
}
]
}'

Response example

{
"result": {
"credentials": [
"A182EFBD154C9E80195082F86C1C8952FC0760A654B886F61BB0A59803B4387B",
"383D269D6C7417D0A8716B09F5DB329FB17B45A5EFDBAFB82FF04BC420DCF7D5"
],
"deposit_authorized": true,
"destination_account": "rsUiUMpnrgxQp24dJYZDhmV4bE3aBtQyt8",
"ledger_hash": "BD03A10653ED9D77DCA859B7A735BF0580088A8F287FA2C5403E0A19C58EF322",
"ledger_index": 8,
"source_account": "rEhxGqkqPPSxQ3P25J66ft5TwpzV14k2de",
"status": "success",
"validated": true
}
}

get_aggregate_price

Calculates the aggregate price of specified Oracle instances.

The get_aggregate_price method retrieves the aggregate price of specified Oracle objects, returning three price statistics: mean, median, and trimmed mean.

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):

    • base_asset (string; required): The currency code of the asset to be priced.
    • quote_asset (string; required): The currency code of the asset to quote the price of the base asset.
    • trim (number; optional): The percentage of outliers to trim. Valid trim range is 1–25. If included, the API returns statistics for the trimmed mean.
    • trim_threshold (number; optional): Defines a time range in seconds for filtering out older price data. Default value is 0, which doesn't filter any data.
    • oracles (array; required): An array of oracle identifier objects. You must list between 1 and 200 oracle identifiers.

Each member of the oracles array is an oracle identifier object with the following fields:

  • account (string; required): The XRPL account that controls the Oracle object.
  • oracle_document_id (number; required): A unique identifier of the price oracle for the Account.

Returns

  • entire_set (object): The statistics from the collected oracle prices.
    • entire_set.mean (string — number): The simple mean.
    • entire_set.size (number): The size of the data set to calculate the mean.
    • entire_set.standard_deviation (string — number): The standard deviation.
  • trimmed_set (object; optional): The trimmed statistics from the collected oracle prices. Only appears if the trim field was specified in the request.
    • trimmed_set.mean (string — number): The simple mean of the trimmed data.
    • trimmed_set.size (number): The size of the data to calculate the trimmed mean.
    • trimmed_set.standard_deviation (string — number): The standard deviation of the trimmed data.
  • time (number): The most recent timestamp out of all LastUpdateTime values, represented in Unix time.

Request example

curl 'https://rpc.ankr.com/xrp_mainnet/YOUR_ANKR_API_KEY' \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "get_aggregate_price",
"params": [
{
"ledger_index": "current",
"base_asset": "XRP",
"quote_asset": "USD",
"trim": 20,
"oracles": [
{
"account": "rNZ9m6AP9K7z3EVg6GhPMx36V4QmZKeWds",
"oracle_document_id": 34
},
{
"account": "rMVKq8zrVsJZQFEiTARyC6WfZznhhLMcNi",
"oracle_document_id": 100
},
{
"account": "r92kJTnUbUUq15t2BBZYGYxY79RnNc7rLQ",
"oracle_document_id": 2
}
]
}
]
}'

Response example

{
"result": {
"entire_set": {
"mean": "0.78",
"size": 3,
"standard_deviation": "0.03464101615137754"
},
"ledger_current_index": 3677185,
"median": "0.8",
"time": 1724877762,
"trimmed_set": {
"mean": "0.78",
"size": 3,
"standard_deviation": "0.03464101615137754"
},
"validated": false
},
"status": "success",
"type": "response"
}

nft_buy_offers

Retrieves a list of all buy offers for the NFT specified.

The nft_buy_offers method returns a list of buy offers for a given NFToken object.

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):

    • nft_id (string; required): The unique identifier of a NFToken object.
    • ledger_hash (string; optional): The unique hash of the ledger version to use. (See Specifying Ledgers)
    • ledger_index (string or number; optional): The ledger index of the ledger to use, or a shortcut string to choose a ledger automatically. (See Specifying Ledgers)
    • limit (integer; optional): Limit the number of NFT buy offers to retrieve. This value cannot be lower than 50 or more than 500. Positive values outside this range are replaced with the closest valid option. The default is 250.
    • marker (marker; optional): Value from a previous paginated response. Resume retrieving data where that response left off.

Returns

The response follows the standard format, with a successful result containing the following fields:

  • nft_id (string): The NFToken these offers are for, as specified in the request.
  • offers (array): A list of buy offers for the token. Each of these is formatted as a Buy Offer (see below).
  • limit (number; optional): The limit, as specified in the request.
  • marker (marker; optional): Server-defined value indicating the response is paginated. Pass this to the next call to resume where this call left off. Omitted when there are no pages of information after this one.

Buy Offers

Each member of the offers array represents one NFTokenOffer object to buy the NFT in question and has the following fields:

  • amount (string or object): The amount offered to buy the NFT for, as a String representing an amount in drops of XRP, or an object representing an amount of a fungible token. (See Specifying Currency Amounts)
  • flags (number): A set of bit-flags for this offer. See NFTokenOffer flags for possible values.
  • nft_offer_index (string): The ledger object ID of this offer.
  • owner (string): The account that placed this offer.

Request example

curl 'https://rpc.ankr.com/xrp_mainnet/YOUR_ANKR_API_KEY' \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "nft_buy_offers",
"params": [
{
"nft_id": "00090000D0B007439B080E9B05BF62403911301A7B1F0CFAA048C0A200000007",
"ledger_index": "validated"
}
]
}'

Response example

{
"result": {
"nft_id": "00090000D0B007439B080E9B05BF62403911301A7B1F0CFAA048C0A200000007",
"offers": [
{
"amount": "1500",
"flags": 0,
"nft_offer_index": "3212D26DB00031889D4EF7D9129BB0FA673B5B40B1759564486C0F0946BA203F",
"owner": "rsuHaTvJh1bDmDoxX9QcKP7HEBSBt4XsHx"
}
],
"status": "success"
}
}

nft_sell_offers

Retrieves a list of all sell offers for the NFT specified.

The nft_sell_offers method returns a list of sell offers for a given NFToken object.

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):

    • nft_id (string; required): The unique identifier of a NFToken object.
    • ledger_hash (string; optional): The unique hash of the ledger version to use. (See Specifying Ledgers)
    • ledger_index (string or number; optional): The ledger index of the ledger to use, or a shortcut string to choose a ledger automatically. (See Specifying Ledgers)
    • limit (integer; optional): Limit the number of NFT sell offers to retrieve. This value cannot be lower than 50 or more than 500. Positive values outside this range are replaced with the closest valid option. The default is 250.
    • marker (marker; optional): Value from a previous paginated response. Resume retrieving data where that response left off.

Returns

  • nft_id (string): The NFToken these offers are for, as specified in the request.
  • offers (array): A list of buy offers for the token. Each of these is formatted as a Sell Offer (see below).
  • limit (number; optional): The limit, as specified in the request.
  • marker (marker; optional): Server-defined value indicating the response is paginated. Pass this to the next call to resume where this call left off. Omitted when there are no pages of information after this one.

Sell Offers

Each member of the offers array represents one NFTokenOffer object to buy the NFT in question and has the following fields:

  • amount (string or object): The amount offered to sell the NFT for, as a String representing an amount in drops of XRP, or an object representing an amount of a fungible token. (See Specifying Currency Amounts)
  • flags (number): A set of bit-flags for this offer. See NFTokenOffer flags for possible values.
  • nft_offer_index (string): The ledger object ID of this offer.
  • owner (string): The account that placed this offer.

Request example

curl 'https://rpc.ankr.com/xrp_mainnet/YOUR_ANKR_API_KEY' \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "nft_sell_offers",
"params": [
{
"nft_id": "00090000D0B007439B080E9B05BF62403911301A7B1F0CFAA048C0A200000007"
}
]
}'

Response example

{
"result": {
"nft_id": "00090000D0B007439B080E9B05BF62403911301A7B1F0CFAA048C0A200000007",
"offers": [
{
"amount": "1000",
"flags": 1,
"nft_offer_index": "9E28E366573187F8E5B85CE301F229E061A619EE5A589EF740088F8843BF10A1",
"owner": "rLpSRZ1E8JHyNDZeHYsQs1R5cwDCB3uuZt"
}
],
"status": "success"
}
}

ripple_path_find

Finds a path for payment between two accounts, once.

Although the rippled server tries to find the cheapest path or combination of paths for making a payment, it is not guaranteed that the paths returned by this method are, in fact, the best paths.

Caution: Be careful with the pathfinding results from untrusted servers. A server could be modified to return less-than-optimal paths to earn money for its operators. A server may also return poor results when under heavy load. If you do not have your own server that you can trust with pathfinding, you should compare the results of pathfinding from multiple servers run by different parties, to minimize the risk of a single server returning poor results.

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):

    • source_account (string — address; required): The account that would send funds.
    • destination_account (string — address; required): The account that would receive funds.
    • destination_amount (currency amount; required): How much the destination account would receive. Special case: You can specify -1 (for XRP) or provide -1 as the value field (for tokens). This requests a path to deliver as much as possible, while spending no more than the amount specified in send_max (if provided).
    • domain (string — hash; optional): The ledger entry ID of a permissioned domain. If provided, only return paths that use the corresponding permissioned DEX. (Requires the PermissionedDEX amendment)
    • ledger_hash (string — 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)
    • send_max (currency amount; optional): Maximum amount that would be spent. Cannot be used with source_currencies.
    • source_currencies (array; optional): Array of currencies that the source account might want to spend. Each entry in the array should be a JSON object with a mandatory currency field and optional issuer field, like how currency amounts are specified. Cannot contain more than 18 source currencies. By default, uses all source currencies available up to a maximum of 88 different currency/issuer pairs.

Returns

The response follows the standard format, with a successful result containing the following fields:

  • alternatives (array): Array of objects with possible paths to take, as described below. If empty, then there are no paths connecting the source and destination accounts.
  • destination_account (string): Unique address of the account that would receive a payment transaction.
  • destination_currencies (array): Array of strings representing the currencies that the destination accepts, as 3-letter codes like USD or as 40-character hex like 015841551A748AD2C1F76FF6ECB0CCCD00000000.

Each element in the alternatives array is an object that represents a path from one possible source currency (held by the initiating account) to the destination account and currency. This object has the following fields:

  • paths_computed (array): Array of arrays of objects defining payment paths.
  • source_amount (string or object): Currency Amount that the source would have to send along this path for the destination to receive the desired amount.

Request example

curl 'https://rpc.ankr.com/xrp_mainnet/YOUR_ANKR_API_KEY' \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "ripple_path_find",
"params": [
{
"destination_account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
"destination_amount": {
"currency": "USD",
"issuer": "rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B",
"value": "0.001"
},
"source_account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
"source_currencies": [
{
"currency": "XRP"
},
{
"currency": "USD"
}
]
}
]
}'

Response example

{
"id": 1,
"jsonrpc": "2.0",
"result": {
"alternatives": [
{
"paths_canonical": [],
"paths_computed": [
[
{
"currency": "USD",
"issuer": "rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B",
"type": 48
}
]
],
"source_amount": "461"
},
{
"paths_canonical": [],
"paths_computed": [],
"source_amount": {
"currency": "USD",
"issuer": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
"value": "0.0010015"
}
}
],
"destination_account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
"destination_amount": {
"currency": "USD",
"issuer": "rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B",
"value": "0.001"
},
"destination_currencies": [
"JOE",
"MXN",
"USD",
"DYM",
"CNY",
"015841551A748AD2C1F76FF6ECB0CCCD00000000",
"EUR",
"BTC",
"XRP"
],
"full_reply": true,
"source_account": "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
"status": "success"
}
}

Payment Channel Methods:

Payment channels are a tool for facilitating repeated, unidirectional payments, or temporary credit between two parties. Use these methods to work with payment channels.

channel_verify

Checks a payment channel claim's signature.

The channel_verify method checks the validity of a signature that can be used to redeem a specific amount of XRP from a payment channel.

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):

    • amount (string; required): The amount of XRP, in drops, that the provided signature authorizes.
    • channel_id (string; required): The Channel ID of the channel that provides the amount. This is a 64-character hexadecimal string.
    • public_key (string; required): The public key of the channel and the key pair that was used to create the signature, in hexadecimal or the XRP Ledger's base58 format.
    • signature (string; required): The signature to verify, in hexadecimal.

Returns

  • signature_verified (boolean): If true, the signature is valid for the stated amount, channel, and public key.

Request example

curl 'https://rpc.ankr.com/xrp_mainnet/YOUR_ANKR_API_KEY' \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "channel_verify",
"params": [
{
"channel_id": "5DB01B7FFED6B67E6B0414DED11E051D2EE2B7619CE0EAA6286D67A3A4D5BDB3",
"signature": "304402204EF0AFB78AC23ED1C472E74F4299C0C21F1B21D07EFC0A3838A420F76D783A400220154FB11B6F54320666E4C36CA7F686C16A3A0456800BBC43746F34AF50290064",
"public_key": "aB44YfzW24VDEJQ2UuLPV2PvqcPCSoLnL7y5M1EzhdW4LnK5xMS3",
"amount": "1000000"
}
]
}'

Response example

{
"id": 1,
"jsonrpc": "2.0",
"result": {
"signature_verified": true,
"status": "success"
}
}

Server Info Methods:

Use these methods to retrieve information about the current state of the rippled server.

fee

Retrieves information on the transaction cost.

The fee command reports the current state of the open-ledger requirements for the transaction cost. This requires the FeeEscalation amendment to be enabled.

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 fields:

  • current_ledger_size (string — integer): Number of transactions provisionally included in the in-progress ledger.
  • current_queue_size (string — integer): Number of transactions currently queued for the next ledger.
  • drops (object): Various information about the transaction cost (the Fee field of a transaction), in drops of XRP.
    • drops.base_fee (string — integer): The transaction cost required for a reference transaction to be included in a ledger under minimum load, represented in drops of XRP.
    • drops.median_fee (string — integer): An approximation of the median transaction cost among transactions included in the previous validated ledger, represented in drops of XRP.
    • drops.minimum_fee (string — integer): The minimum transaction cost for a reference transaction to be queued for a later ledger, represented in drops of XRP. If greater than base_fee, the transaction queue is full.
    • drops.open_ledger_fee (string — integer): The minimum transaction cost that a reference transaction must pay to be included in the current open ledger, represented in drops of XRP.
  • expected_ledger_size (string — integer): The approximate number of transactions expected to be included in the current ledger. This is based on the number of transactions in the previous ledger.
  • ledger_current_index (number): The Ledger Index of the current open ledger these stats describe.
  • levels (object): Various information about the transaction cost, in fee levels. The ratio in fee levels applies to any transaction relative to the minimum cost of that particular transaction.
    • levels.median_level (string — integer): The median transaction cost among transactions in the previous validated ledger, represented in fee levels.
    • levels.minimum_level (string — integer): The minimum transaction cost required to be queued for a future ledger, represented in fee levels.
    • levels.open_ledger_level (string — integer): The minimum transaction cost required to be included in the current open ledger, represented in fee levels.
    • levels.reference_level (string — integer): The equivalent of the minimum transaction cost, represented in fee levels.
  • max_queue_size (string — integer): The maximum number of transactions that the transaction queue can currently hold.

Request example

curl 'https://rpc.ankr.com/xrp_mainnet/YOUR_ANKR_API_KEY' \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "fee",
"params": [{}]
}'

Response example

{
"result": {
"current_ledger_size": "89",
"current_queue_size": "0",
"drops": {
"base_fee": "10",
"median_fee": "5000",
"minimum_fee": "10",
"open_ledger_fee": "10"
},
"expected_ledger_size": "396",
"ledger_current_index": 100647307,
"levels": {
"median_level": "128000",
"minimum_level": "256",
"open_ledger_level": "256",
"reference_level": "256"
},
"max_queue_size": "7920",
"status": "success"
}
}

feature

Retrieves information on the protocol amendments.

The feature command returns information about amendments this server knows about, including whether they are enabled and if the server knows how to apply the amendments.

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):

    • feature (string; optional): The unique ID of an amendment, as hexadecimal; or the short name of the amendment. If provided, limits the response to one amendment. Otherwise, the response lists all amendments.

Returns

The response follows the standard format, with a successful result containing a map of amendments as a JSON object.

The keys of the object are amendment IDs. The values for each key are amendment objects that describe the status of the amendment with that ID. If the request specified a feature, the map contains only the requested amendment object, after applying any changes from the request. Each amendment object has the following fields:

  • enabled (boolean): Whether this amendment is currently enabled in the latest ledger.
  • name (string; optional): The human-readable name for this amendment, if known.
  • supported (boolean): Whether the server knows how to apply this amendment. If this field is set to false (the server does not know how to apply this amendment) and enabled is set to true (this amendment is enabled in the latest ledger), this amendment may cause your server to be amendment blocked.

Request example

curl 'https://rpc.ankr.com/xrp_mainnet/YOUR_ANKR_API_KEY' \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "fee",
"params": [
{
"feature": "4C97EBA926031A7CF7D7B36FDE3ED66DDA5421192D63DE53FFB46E43B9DC8373"
}
]
}'

Response example

{
"id": 1,
"jsonrpc": "2.0",
"result": {
"current_ledger_size": "36",
"current_queue_size": "0",
"drops": {
"base_fee": "10",
"median_fee": "5000",
"minimum_fee": "10",
"open_ledger_fee": "10"
},
"expected_ledger_size": "396",
"ledger_current_index": 100647615,
"levels": {
"median_level": "128000",
"minimum_level": "256",
"open_ledger_level": "256",
"reference_level": "256"
},
"max_queue_size": "7920",
"status": "success"
}
}

manifest

Retrieves public information on a known validator.

The manifest method reports the current "manifest" information for a given validator public key. The "manifest" is a block of data that authorizes an ephemeral signing key with a signature from the validator's master key pair.

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):

    • public_key (string; required): The base58-encoded public key of the validator to look up. This can be the master public key or ephemeral public key.

Returns

The response follows the standard format, with a successful result containing the following fields:

  • details (object; optional): The data contained in this manifest. Omitted if the server does not have a manifest for the public_key from the request. See Details Object below for a full description of its contents.
  • manifest (string; optional): The full manifest data in base64 format. This data is serialized to binary before being base64-encoded. Omitted if the server does not have a manifest for the public_key from the request.
  • requested (string): The public_key from the request.

Details Object

If provided, the details object contains the following fields:

  • domain (string): The domain name this validator claims to be associated with. If the manifest does not contain a domain, this is an empty string.
  • ephemeral_key (string): The ephemeral public key for this validator, in base58.
  • master_key (string): The master public key for this validator, in base58.
  • seq (number): The sequence number of this manifest. This number increases whenever the validator operator updates the validator's token to rotate ephemeral keys or change settings.

Request example

curl 'https://rpc.ankr.com/xrp_mainnet/YOUR_ANKR_API_KEY' \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "manifest",
"params": [
{
"public_key":"nHUFE9prPXPrHcG3SkwP1UzAQbSphqyQkQK9ATXLZsfkezhhda3p"
}
]
}'

Response example

{
"id": 1,
"jsonrpc": "2.0",
"result": {
"details": {
"domain": "alloy.ee",
"ephemeral_key": "n9LMfcjE6dMyshCqiftLFXpB9K3Mnd2r5bG7K8osmrkFpHUoR3c1",
"master_key": "nHUFE9prPXPrHcG3SkwP1UzAQbSphqyQkQK9ATXLZsfkezhhda3p",
"seq": 4
},
"manifest": "JAAAAARxIe3AkJgOyqs3y+UuiAI27Ff3Mrfbt8e7mjdo06bnGEp5XnMhAu2LSAwZEQnm/mq9K6sSZJk5JkbcKCv6C7vQW2C8RnZVdkcwRQIhAI9uwQ1p58oyob1E+DaFLwjTdiRbVIKSMPqaaUwnJdN2AiB79DlPXHwztNULraVTkehbDsCAyDdf3VZB3FvkCZNOFHcIYWxsb3kuZWVwEkBf6A9ktcj2H4a61Av8ujQFL2KNcmr/FuEKbwlZEniJvhf0UqNiYc2bAsTJE5wMn00E0JBbw2m9OFwto50DcdkC",
"requested": "nHUFE9prPXPrHcG3SkwP1UzAQbSphqyQkQK9ATXLZsfkezhhda3p",
"status": "success"
}
}

server_definitions

Retrieves an SDK-compatible definitions.json generated from the currently running rippled instance.

The server_definitions command returns an SDK-compatible definitions.json, generated from the rippled instance currently running. You can use this to query a node in a network, quickly receiving the definitions necessary to serialize/deserialize its binary data.

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

To see a full definitions.json file and descriptions of the top-level fields, see the Definitions File.

Request example

curl 'https://rpc.ankr.com/xrp_mainnet/YOUR_ANKR_API_KEY' \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "server_definitions",
"params": []
}'

Response example

{
"id": 1,
"result": {
"FIELDS": [
[
"Generic",
{
"isSerialized": false,
"isSigningField": false,
"isVLEncoded": false,
"nth": 0,
"type": "Unknown"
}
],
[
"Invalid",
{
"isSerialized": false,
"isSigningField": false,
"isVLEncoded": false,
"nth": -1,
"type": "Unknown"
}
],
[
"ObjectEndMarker",
{
"isSerialized": true,
"isSigningField": true,
"isVLEncoded": false,
"nth": 1,
"type": "STObject"
}
],
[
"ArrayEndMarker",
{
"isSerialized": true,
"isSigningField": true,
"isVLEncoded": false,
"nth": 1,
"type": "STArray"
}
]
...
]
}
}