Sandbox version
For experimental use only. Proceed with caution.
AMM/DEX Methods
Get AMM pool information
wss://honeycluster.io
rpc method: amm_info

Returns information about an Automated Market Maker (AMM) pool, identified by account or asset pair.

Try it now
Response · amm_info WS Response
{
  "result": {
    "amm": {
      "account": "rG1QQv2nh2gr7RCZ1P8YYcBUKCCN633jCn",
      "amount": "10000000000",
      "amount2": {
        "currency": "USD",
        "issuer": "rPT1Sjq2YGrBMTttX4GZHjKu9dyfzbpAYe",
        "value": "5000"
      },
      "asset2_frozen": false,
      "lp_token": {
        "currency": "03930D02208264E2E40EC1B0C09E4DB96EE197B1",
        "issuer": "rG1QQv2nh2gr7RCZ1P8YYcBUKCCN633jCn",
        "value": "223606.7977499"
      },
      "trading_fee": 600
    },
    "ledger_index": 89012345
  },
  "status": "success",
  "type": "response",
  "id": 1
}
Request Message
amm_info WS Request
application/json
Get AMM pool information
FieldTypeDescription
command
required
string
WebSocket command name
id
object
Client-supplied identifier to correlate requests with responses.
amm_account
string
The AMM account address. Provide this OR the asset/asset2 pair.
asset
object
One of the two currencies in the AMM pool.
asset.currency
required
string
Three-letter ISO 4217 currency code, or 160-bit hex currency code.
asset.issuer
string
Account address of the token issuer. Omit for XRP.
asset2
object
The other currency in the AMM pool.
asset2.currency
required
string
Three-letter ISO 4217 currency code, or 160-bit hex currency code.
asset2.issuer
string
Account address of the token issuer. Omit for XRP.
ledger_index
object
A ledger index (sequence number) or shortcut string identifying which ledger to use.
ledger_hash
string
256-bit hex hash identifying a specific ledger version.
api_version
object
API version for the response format. Version 2 is the default for rippled 2.0+.
Example
Json
{
  "command": "amm_info",
  "id": 1,
  "asset": {
    "currency": "XRP"
  },
  "asset2": {
    "currency": "USD",
    "issuer": "rPT1Sjq2YGrBMTttX4GZHjKu9dyfzbpAYe"
  },
  "ledger_index": "validated"
}
Response Message
amm_info WS Response
application/json
WebSocket response for amm_info
FieldTypeDescription
result
object
status
enum<string>
Available
successerror
type
string
id
stringnumber
Echo of the client-provided correlation ID
Example
Json
{
  "result": {
    "amm": {
      "account": "rG1QQv2nh2gr7RCZ1P8YYcBUKCCN633jCn",
      "amount": "10000000000",
      "amount2": {
        "currency": "USD",
        "issuer": "rPT1Sjq2YGrBMTttX4GZHjKu9dyfzbpAYe",
        "value": "5000"
      },
      "asset2_frozen": false,
      "lp_token": {
        "currency": "03930D02208264E2E40EC1B0C09E4DB96EE197B1",
        "issuer": "rG1QQv2nh2gr7RCZ1P8YYcBUKCCN633jCn",
        "value": "223606.7977499"
      },
      "trading_fee": 600
    },
    "ledger_index": 89012345
  },
  "status": "success",
  "type": "response",
  "id": 1
}