Skip to main content
Glama

get_twap_latest

Retrieve time-weighted average prices from Pyth Network's decentralized oracle for specified assets using a custom time window, enabling accurate price calculations for trading and analysis.

Instructions

Get the latest time-weighted average price (TWAP) from Pyth Network with a custom time window

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
window_secondsYesTime window in seconds (1-600). Example: 300 for 5-minute TWAP
idsYesList of price feed IDs to get TWAP for
encodingNoEncoding type for binary data (default: hex)
parsedNoInclude calculated TWAP in parsed field (default: true)
ignore_invalid_price_idsNoIgnore invalid price IDs (default: false)
include_binaryNoInclude binary proof data (default: false)

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/itsOmSarraf/pyth-network-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server