{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/asteroidxrpl-com/json-schema/asteroidxrpl-com-liquidity-state-schema.json",
  "title": "ASTEROID liquidity state",
  "x-generated": "2026-11-01",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/asteroidxrpl-com-openapi.json#/components/schemas/liquidity-state",
  "type": "object",
  "required": [
    "amm",
    "lpAccounts",
    "lockedLpTotal",
    "lockedLpSharePct",
    "communityLpSharePct",
    "methodology"
  ],
  "additionalProperties": false,
  "properties": {
    "amm": {
      "type": "object",
      "required": [
        "account",
        "asteroidReserve",
        "xrpReserve",
        "lpTokenSupply",
        "lpTokenCurrency",
        "lpTokenIssuer",
        "tradingFeeUnits",
        "tradingFeePct",
        "spotXrpPerAsteroid",
        "spotAsteroidPerXrp",
        "feeNote",
        "methodology"
      ],
      "additionalProperties": false,
      "properties": {
        "account": {
          "type": [
            "string",
            "null"
          ]
        },
        "asteroidReserve": {
          "type": [
            "string",
            "null"
          ],
          "pattern": "^-?[0-9]+(\\.[0-9]+)?$",
          "description": "Exact decimal string. Never rounded for transport. Null means unreadable, not zero."
        },
        "xrpReserve": {
          "type": [
            "string",
            "null"
          ],
          "pattern": "^-?[0-9]+(\\.[0-9]+)?$",
          "description": "Exact decimal string. Never rounded for transport. Null means unreadable, not zero."
        },
        "lpTokenSupply": {
          "type": [
            "string",
            "null"
          ],
          "pattern": "^-?[0-9]+(\\.[0-9]+)?$",
          "description": "Exact decimal string. Never rounded for transport. Null means unreadable, not zero."
        },
        "lpTokenCurrency": {
          "type": [
            "string",
            "null"
          ]
        },
        "lpTokenIssuer": {
          "type": [
            "string",
            "null"
          ]
        },
        "tradingFeeUnits": {
          "type": [
            "integer",
            "null"
          ],
          "description": "XRPL AMM trading fee in units of 1/100,000."
        },
        "tradingFeePct": {
          "type": [
            "string",
            "null"
          ],
          "pattern": "^-?[0-9]+(\\.[0-9]+)?$",
          "description": "Exact decimal string. Never rounded for transport. Null means unreadable, not zero."
        },
        "spotXrpPerAsteroid": {
          "type": [
            "string",
            "null"
          ],
          "pattern": "^-?[0-9]+(\\.[0-9]+)?$",
          "description": "Exact decimal string. Never rounded for transport. Null means unreadable, not zero."
        },
        "spotAsteroidPerXrp": {
          "type": [
            "string",
            "null"
          ],
          "pattern": "^-?[0-9]+(\\.[0-9]+)?$",
          "description": "Exact decimal string. Never rounded for transport. Null means unreadable, not zero."
        },
        "feeNote": {
          "type": "string"
        },
        "methodology": {
          "type": "string"
        }
      }
    },
    "lpAccounts": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "address",
          "roleClaimStatus",
          "lpBalance",
          "shareOfLpSupplyPct",
          "impliedXrp",
          "impliedAsteroid",
          "control",
          "accessibilityNote"
        ],
        "additionalProperties": false,
        "properties": {
          "address": {
            "type": "string"
          },
          "roleClaimStatus": {
            "type": "string",
            "enum": [
              "ledger-verified",
              "owner-confirmed",
              "independently-sourced",
              "derived",
              "aspirational",
              "unresolved"
            ]
          },
          "lpBalance": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^-?[0-9]+(\\.[0-9]+)?$",
            "description": "Exact decimal string. Never rounded for transport. Null means unreadable, not zero."
          },
          "shareOfLpSupplyPct": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^-?[0-9]+(\\.[0-9]+)?$",
            "description": "Exact decimal string. Never rounded for transport. Null means unreadable, not zero."
          },
          "impliedXrp": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^-?[0-9]+(\\.[0-9]+)?$",
            "description": "Exact decimal string. Never rounded for transport. Null means unreadable, not zero."
          },
          "impliedAsteroid": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^-?[0-9]+(\\.[0-9]+)?$",
            "description": "Exact decimal string. Never rounded for transport. Null means unreadable, not zero."
          },
          "control": {
            "type": "object",
            "required": [
              "masterKeyDisabled",
              "regularKeyUnusable",
              "signerListActive",
              "verdict"
            ],
            "additionalProperties": false,
            "properties": {
              "masterKeyDisabled": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "regularKeyUnusable": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "signerListActive": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "verdict": {
                "type": "string",
                "enum": [
                  "no-known-signing-path",
                  "signing-path-remains",
                  "unknown"
                ]
              }
            }
          },
          "accessibilityNote": {
            "type": "string"
          }
        }
      }
    },
    "lockedLpTotal": {
      "type": [
        "string",
        "null"
      ],
      "pattern": "^-?[0-9]+(\\.[0-9]+)?$",
      "description": "Exact decimal string. Never rounded for transport. Null means unreadable, not zero."
    },
    "lockedLpSharePct": {
      "type": [
        "string",
        "null"
      ],
      "pattern": "^-?[0-9]+(\\.[0-9]+)?$",
      "description": "Exact decimal string. Never rounded for transport. Null means unreadable, not zero."
    },
    "communityLpSharePct": {
      "type": [
        "string",
        "null"
      ],
      "pattern": "^-?[0-9]+(\\.[0-9]+)?$",
      "description": "Exact decimal string. Never rounded for transport. Null means unreadable, not zero."
    },
    "methodology": {
      "type": "string"
    }
  }
}