For the complete documentation index, see llms.txt. This page is also available as Markdown.

amm_info

Gets information about an Automated Market Maker (AMM) instance, identified either by its asset pair or by its AMM account.

This method will use 20 Compute Units.


Reference: Here

Parameters

  • asset (object, optional) One of the assets of the AMM to look up, as an object with currency and issuer fields (omit issuer for XRP).

  • asset2 (object, optional) The other of the assets of the AMM, in the same format.

  • amm_account (string, optional) The address of the AMM's special AccountRoot. Use this instead of asset and asset2.

  • account (string, optional) Show only LP Tokens held by this liquidity provider.

  • ledger_hash (string, optional) The unique hash of the ledger version to use.

  • ledger_index (number or string, optional) The ledger index of the ledger to use, or a shortcut string such as validated, closed or current.

Returns

  • amm (object) An AMM description object with account, amount, amount2, asset_frozen, asset2_frozen, auction_slot, lp_token, trading_fee (in units of 1/100,000) and vote_slots.

  • ledger_current_index (number) Omitted if ledger_index is provided instead.

  • ledger_hash (string) The identifying hash of the ledger version used.

  • ledger_index (number) The ledger index of the ledger version used.

  • validated (boolean) If true, the ledger used for this request is validated and these results are final.

Over WebSocket, send {"id":1,"command":"amm_info","asset":{"currency":"XRP"},"asset2":{"currency":"524C555344000000000000000000000000000000","issuer":"rMxCKbEDwqr76QuheSUMdEGf4B9xJ8m5De"},"ledger_index":"validated"} to wss://mainnet.xrpl.validationcloud.io/v1/<YOUR_API_KEY_HERE>.

Last updated

Was this helpful?