- prediction markets you created
- current liquidity of a pool
- current prices for tokens in your portfolio
Market Data
To query market data you need to use Seer Subgraph. You can choose to query multiple markets or a specific market by providing a market id.Query markets
To query the first 5 markets:Query a market
To query a single market:Liquidity and price data
To query liquidity and price data you need to use Algebra Subgraph. Currently, Seer is using Swapr to create and provide liquidity for trading pools. Behind the scenes, Swapr uses Algebra and Algebra Subgraph, for which you can find the documentation here. Inside the docs you can find more information about Algebra Subgraph schemas, queries, and other related topics.Query pools and liquidity
To query multiple pools with liquidity information: <pre><code>{ pools(first:10, skip:5){ id liquidity sqrtPrice token0 { id symbol } token1 { id symbol } } } </code></pre> You may notice that we use skip here to get 10 pools after the first 5.Query price changes over a certain period
Every time the prices of a pool change, a record ofPoolHourData is registered. You can query for these records and filter a specific time range using periodStartUnix_lt and periodStartUnix_gt.
The following query retrieves the first 5 PoolHourData records from September 1, 2024, between 00:00 and 10:00 UTC: