Subgraph Overview

Polymarket has written and open sourced a subgraph that provides, via a GraphQL query interface, useful aggregate calculations and event indexing for things like volume, user position, market and liquidity data. The subgraph updates in real time to be able to be mixed, and match core data from the primary Polymarket interface, providing positional data, activity history and more. The subgraph can be hosted by anyone but is also hosted and made publicly available by a 3rd party provider, Goldsky.

Source

The Polymarket subgraph is entirely open source and can be found on the Polymarket Github.

Polymarket.polymarket-subgraph

Note: The available models/schemas can be found in the schema.graphql file.

Hosted Version

The subgraphs are hosted on goldsky, each with an accompanying GraphQL playground: