SubgraphClient class provides methods to query historical data from the CoW Protocol subgraph, including trading volumes, totals, and other aggregated metrics.
Initialization
Methods
last_days_volume
Query the trading volume for the last N days.
Returns:
LastDaysVolume with daily_totals list containing:
timestamp(int): Unix timestamp for the dayvolume_usd(Optional[Any]): Trading volume in USD
last_hours_volume
Query the trading volume for the last N hours.
Returns:
LastHoursVolume with hourly_totals list containing:
timestamp(int): Unix timestamp for the hourvolume_usd(Optional[Any]): Trading volume in USD
totals
Query aggregate protocol statistics.Totals with a totals list containing: