Interface AMMInfoResponse

Response expected from an AMMInfoRequest.

Hierarchy

Properties

api_version?: number
forwarded?: boolean
id: string | number
result: {
    amm: {
        account: string;
        amount: Amount;
        amount2: Amount;
        asset2_frozen?: boolean;
        asset_frozen?: boolean;
        auction_slot?: {
            account: string;
            auth_accounts: {
                account: string;
            }[];
            discounted_fee: number;
            expiration: string;
            price: IssuedCurrencyAmount;
            time_interval: number;
        };
        lp_token: IssuedCurrencyAmount;
        trading_fee: number;
        vote_slots?: {
            account: string;
            trading_fee: number;
            vote_weight: number;
        }[];
    };
    ledger_hash?: string;
    ledger_index?: number;
    validated?: boolean;
}

Type declaration

  • amm: {
        account: string;
        amount: Amount;
        amount2: Amount;
        asset2_frozen?: boolean;
        asset_frozen?: boolean;
        auction_slot?: {
            account: string;
            auth_accounts: {
                account: string;
            }[];
            discounted_fee: number;
            expiration: string;
            price: IssuedCurrencyAmount;
            time_interval: number;
        };
        lp_token: IssuedCurrencyAmount;
        trading_fee: number;
        vote_slots?: {
            account: string;
            trading_fee: number;
            vote_weight: number;
        }[];
    }
    • account: string

      The address of the AMM Account.

    • amount: Amount

      The total amount of one asset in the AMM's pool. (Note: This could be asset or asset2 from the request)

    • amount2: Amount

      The total amount of the other asset in the AMM's pool. (Note: This could be asset or asset2 from the request)

    • Optional asset2_frozen?: boolean

      (Omitted for XRP) If true, the amount currency is currently frozen for asset2.

    • Optional asset_frozen?: boolean

      (Omitted for XRP) If true, the amount currency is currently frozen for asset.

    • Optional auction_slot?: {
          account: string;
          auth_accounts: {
              account: string;
          }[];
          discounted_fee: number;
          expiration: string;
          price: IssuedCurrencyAmount;
          time_interval: number;
      }

      (May be omitted) An Auction Slot Object describing the current auction slot holder, if there is one.

      • account: string

        The address of the account that owns the auction slot.

      • auth_accounts: {
            account: string;
        }[]

        A list of additional accounts that the auction slot holder has designated as being eligible of the discounted trading fee. Each member of this array is an object with one field, account, containing the address of the designated account.

      • discounted_fee: number

        The discounted trading fee that applies to the auction slot holder, and any eligible accounts when trading against this AMM. This is always 0.

      • expiration: string

        The ISO 8601 UTC timestamp after which this auction slot expires. After expired, the auction slot does not apply (but the data can remain in the ledger until another transaction replaces it or cleans it up).

      • price: IssuedCurrencyAmount

        The amount, in LP Tokens, that the auction slot holder paid to win the auction slot. This affects the price to outbid the current slot holder.

      • time_interval: number

        The current 72-minute time interval this auction slot is in, from 0 to 19. The auction slot expires after 24 hours (20 intervals of 72 minutes) and affects the cost to outbid the current holder and how much the current holder is refunded if someone outbids them.

    • lp_token: IssuedCurrencyAmount

      The total amount of this AMM's LP Tokens outstanding.

    • trading_fee: number

      The AMM's current trading fee, in units of 1/100,000; a value of 1 is equivalent to a 0.001% fee.

    • Optional vote_slots?: {
          account: string;
          trading_fee: number;
          vote_weight: number;
      }[]

      (May be omitted) The current votes for the AMM's trading fee, as Vote Slot Objects.

  • Optional ledger_hash?: string

    The identifying hash of the ledger that was used to generate this response.

  • Optional ledger_index?: number

    The ledger index of the ledger version that was used to generate this response.

  • Optional validated?: boolean

    If included and set to true, the information in this response comes from a validated ledger version. Otherwise, the information is subject to change.

status?: string
type: string
warning?: "load"
warnings?: ResponseWarning[]

Generated using TypeDoc