Type alias PoolPricesStreamQuery

PoolPricesStreamQuery: {
    assetIn?: SwapsAsset | {
        CategoricalOutcome: any;
    } | {
        ScalarOutcome: any;
    } | {
        CombinatorialOutcome: any;
    } | {
        PoolShare: any;
    } | {
        Ztg: any;
    };
    from?: BlockNumber | Date | Duration;
    pool: number;
    resolution?: Duration;
}

Streaming query paramaters.

Type declaration

  • Optional assetIn?: SwapsAsset | {
        CategoricalOutcome: any;
    } | {
        ScalarOutcome: any;
    } | {
        CombinatorialOutcome: any;
    } | {
        PoolShare: any;
    } | {
        Ztg: any;
    }

    The asset in to check prices for. Defaults to ZTG.

  • Optional from?: BlockNumber | Date | Duration

    The blocknumber or date to tail prices from.

  • pool: number

    The pool to fetch prices for

  • Optional resolution?: Duration

    Projected space between blocks.

    Example

    // Will stream price by the hour for the last day. Stream of 24 items.
    sdk.model.assets.poolPrices.$({tail: '-24 hour', resolution: '1 hour', marketId})

Generated using TypeDoc