Search Apps Documentation Source Content File Folder Download Copy Actions Download State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

pool package

Function

OracleConsult

func OracleConsult(poolPath string, secondsAgo uint32) (int32, string, error)

OracleConsult returns the arithmetic mean tick and harmonic mean liquidity over a lookback, following Uniswap V3 OracleLibrary's consult convention. Parameters:

  • poolPath: Canonical pool path whose oracle data is queried.
  • secondsAgo: Lookback duration in seconds used to compute the time-weighted values.

Returns:

  • int32: Arithmetic mean tick over the requested lookback.
  • string: Harmonic mean liquidity over the lookback, serialized as a base-10 unsigned integer.
  • error: Non-nil when the pool or required observation history is unavailable.

Params

Command

gnokey query vm/qeval -remote "http://127.0.0.1:26657" -data "gno.land/r/gnoswap/pool.OracleConsult(,)"

Result