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

GetTWAP

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

GetTWAP returns the time-weighted average price for a pool. Returns arithmetic mean tick and harmonic mean liquidity over the time period.

Params

Command

gnokey query vm/qeval -remote "https://rpc.topaz.testnets.gno.land" -data "gno.land/r/gnoswap/pool.GetTWAP(,)"

Result