Skip to content

enviodev/polymarket-indexer-2

Repository files navigation

Polymarket Indexer

Discord

An indexer for Polymarket on-chain events, built with Envio HyperIndex. Created as a reference migration from the Polymarket Subgraph.

Note: This indexer is a work-in-progress and is meant as a reference implementation only. Do not use in production without thorough testing.

What's Indexed

The GraphQL API exposes Polymarket wallet activity, order fills, market lifecycle events, liquidity provision, and prediction market mechanics on Polygon. You can use this as a foundation for building Polymarket analytics tools, trade trackers, and market dashboards.

Events Indexed

  • Transfer (USDC) - USDC transfers between wallets
  • ProxyCreation (SafeProxyFactory) - new Polymarket wallet creation
  • TransactionRelayed (RelayHub) - relayed transactions
  • GameCreated, GameSettled, GameEmergencySettled, GameCanceled, GamePaused, GameUnpaused (UMA Sports Oracle) - sports market lifecycle
  • MarketCreated, MarketPaused, MarketUnpaused (UMA Sports Oracle) - market management
  • OrderFilled (Exchange) - order fills
  • ConditionPreparation, PositionSplit, PositionsMerge, PayoutRedemption (ConditionalTokens) - prediction market mechanics
  • FPMMCreated, FPMMBuy, FPMMSell (FixedProductMarketMaker) - AMM activity

Chain

Polygon (chain ID 137)

Prerequisites

Quick Start

# Install dependencies
pnpm install

# Run locally (starts indexer + GraphQL API at http://localhost:8080)
pnpm dev

The GraphQL Playground is available at http://localhost:8080. Local password: testing.

Regenerate Files

pnpm codegen

Subgraph Migration Status

  • Wallet Subgraph
  • Sports Oracle Subgraph
  • Order Book Subgraph
  • OI Subgraph
  • FPMM Subgraph
  • Activity Subgraph
  • Fee Module Subgraph
  • PNL Subgraph

Built With

Related

Documentation

Support

About

Index Polymarket events with HyperIndex

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors