get-twap
Calculate Time-Weighted Average Price (TWAP) for a specific pool on Osmosis by providing pool ID, asset denominations, and start time.
Instructions
Returns Time-Weighted Average Price for a pool
Input Schema
Name | Required | Description | Default |
---|---|---|---|
baseAsset | Yes | Base asset denomination | |
endTime | No | Optional: End time (RFC3339 format, defaults to now) | |
poolId | Yes | The pool ID | |
quoteAsset | Yes | Quote asset denomination | |
startTime | Yes | Start time (RFC3339 format) |
Input Schema (JSON Schema)
{
"properties": {
"baseAsset": {
"description": "Base asset denomination",
"type": "string"
},
"endTime": {
"description": "Optional: End time (RFC3339 format, defaults to now)",
"type": "string"
},
"poolId": {
"description": "The pool ID",
"type": "string"
},
"quoteAsset": {
"description": "Quote asset denomination",
"type": "string"
},
"startTime": {
"description": "Start time (RFC3339 format)",
"type": "string"
}
},
"required": [
"poolId",
"baseAsset",
"quoteAsset",
"startTime"
],
"type": "object"
}