amm_info
POST
Returns information about an Automated Market Maker (AMM) instance.It lets you check the deposited asset amounts, the LP token supply, the trading fee and the auction slot state.
📘 You must provide either amm_account, or both asset and asset2.
param[0]
parametersobjectrequired
amm_accountstring
The special account address of the AMM. It is also the issuer of the LP tokens.assetobject
Specifies an asset by currency code and issuer. Omit issuer for XRP.currencystring
The currency code. Pass XRP for XRP.issuerstring
The address of the account that issued the token. Omit for XRP.asset2object
Specifies an asset by currency code and issuer. Omit issuer for XRP.currencystring
The currency code. Pass XRP for XRP.issuerstring
The address of the account that issued the token. Omit for XRP.accountstring
Also returns the amount of LP tokens held by this account.ledger_hashstring
The hash of the ledger version to use. Pass a 32-byte hex string.ledger_indexoneOf
Specifies the ledger version to use. Pass a ledger index as an integer, or use one of the shortcut strings below.validated: Uses the most recent ledger version validated by the network.closed: Uses the most recent ledger version the server has closed. It may not be validated.current: Uses the in-progress ledger version the server is currently building.
Responses
Detailed AMM information.
accountstring
The special account address of the AMM. It is also the issuer of the LP tokens.amountoneOf
Represents an amount. XRP is expressed as a string in drops; tokens are expressed as an object.amount2oneOf
Represents an amount. XRP is expressed as a string in drops; tokens are expressed as an object.asset_frozenboolean
Whether the first asset is frozen.asset2_frozenboolean
Whether the second asset is frozen.Information about the trading fee discount auction slot.
accountstring
The address of the account that currently holds the slot.discounted_feeinteger
The discounted fee applied to the slot holder, in units of 1/100,000.priceoneOf
Represents an amount. XRP is expressed as a string in drops; tokens are expressed as an object.time_intervalinteger
The current time interval of the auction slot.expirationstring
The time the slot expires, in ISO 8601 format.The list of accounts designated to also receive the discounted fee.
accountstring
The account address.lp_tokenoneOf
Represents an amount. XRP is expressed as a string in drops; tokens are expressed as an object.trading_feeinteger
The trading fee of the AMM, in units of 1/100,000.The current state of trading fee voting.
accountstring
The address of the account that voted.trading_feeinteger
The trading fee that account voted for, in units of 1/100,000.vote_weightinteger
The weight of the vote.ledger_hashstring
The hash of the ledger version used. Returned when a validated ledger version was queried.ledger_indexinteger
The ledger index of the version used. Returned when a validated ledger version was queried.ledger_current_indexinteger
The ledger index of the in-progress ledger. Returned when the current ledger was queried.validatedboolean
Whether the response was derived from a validated ledger version.codestringrequired
Code identifying the cause of the failed request.messagestringrequired
Detailed message including the name and value of the invalid parameter.{"code": "ERROR_CODE","message": "Unauthorized"}
cURL
curl -X POST 'https://xrpl-mainnet.nodit.io' \-H 'Content-Type: application/json' \-H 'X-API-KEY: nodit-demo' \-d '{"method": "amm_info","params": [{"asset": {"currency": "XRP"},"asset2": {"currency": "USD","issuer": "rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q"}}]}'