xrpl
    Preparing search index...

    Interface GetAggregatePriceRequest

    The get_aggregate_price method retrieves the aggregate price of specified Oracle objects, returning three price statistics: mean, median, and trimmed mean. Returns an GetAggregatePriceResponse.

    interface GetAggregatePriceRequest {
        api_version?: number;
        base_asset: string;
        command: "get_aggregate_price";
        id?: string | number;
        oracles: { account: string; oracle_document_id: string | number }[];
        quote_asset: string;
        trim?: number;
        trim_threshold?: number;
        [x: string]: unknown;
    }

    Hierarchy (View Summary)

    Indexable

    • [x: string]: unknown
    Index

    Properties

    api_version?: number

    The API version to use. If omitted, use version 1.

    base_asset: string

    The currency code of the asset to be priced.

    command: "get_aggregate_price"

    The name of the API method.

    id?: string | number

    A unique value to identify this request. The response to this request uses the same id field. This way, even if responses arrive out of order, you know which request prompted which response.

    oracles: { account: string; oracle_document_id: string | number }[]

    The oracle identifier.

    Type declaration

    • account: string

      The XRPL account that controls the Oracle object.

    • oracle_document_id: string | number

      A unique identifier of the price oracle for the Account

    quote_asset: string

    The currency code of the asset to quote the price of the base asset.

    trim?: number

    The percentage of outliers to trim. Valid trim range is 1-25. If included, the API returns statistics for the trimmed mean.

    trim_threshold?: number

    Defines a time range in seconds for filtering out older price data. Default value is 0, which doesn't filter any data.