PolyEdge Developer Overview

PolyEdge provides high-performance real-time mempool trade streaming (Stream API) and on-chain intelligence (Analytics API) for Polymarket prediction markets. Direct peering with validator P2P mempool gossip networks delivers pre-block execution data and institutional trader analytics for copy-trading bots, market makers, and quantitative research teams.


Service Endpoints

PolyEdge provides two dedicated endpoints for real-time streaming and REST data analytics:

Service Base URL Protocol Purpose
Stream Gateway https://stream.polyedge.dev HTTP/2 SSE Low-latency mempool trade streaming, dynamic filtering, and session control
Analytics API v2 https://api.polyedge.dev/v2 HTTPS Trader profiles, PnL leaderboards, market positions, and order history

Authentication

All API requests and streaming connections authenticate via the X-PolyEdge-Key HTTP header:

X-PolyEdge-Key: <YOUR_API_KEY>

To generate or manage your API keys, visit API Keys in the console.


Quickstart

Verify your API key by querying the trader leaderboard:

curl -X GET "https://api.polyedge.dev/v2/analytics/leaderboard?time_frame=30D&sort_by=pnl&limit=10" \
  -H "X-PolyEdge-Key: <YOUR_API_KEY>"

Next Steps

  • Official SDKs: Read Official PolyEdge SDKs to integrate in TypeScript, Python, Rust, or Go with automatic reconnection and built-in watchdogs.
  • Stream Integration: Read the Stream Guide to learn how to create, connect, and manage live mempool streaming feeds.
  • Select Your Feed Architecture: Read Stream Types to configure trader copy-trading, topic-based, or full-market mempool firehose streams.
  • Build a Copy-Trading Bot: Follow the Polymarket Copy-Trading Bot Guide to build an automated pre-block trade execution bot.
  • Understand Analytics Engine: Read Analytics Engine to learn how positions, cost basis, PnL, and ROI are computed block by block.