Skip to main content

Polygon (MATIC) API Documentation

Discover everything you need to build powerful Polygon (MATIC) applications—from real-time DEX trading analytics and token holder insights to NFT tracking and transaction monitoring. This comprehensive guide provides ready-to-use GraphQL APIs, live streaming data, and step-by-step examples for tracking swaps, balances, transfers, and more across the Polygon ecosystem. Whether you're building trading bots, dashboards, or DeFi analytics tools, find all the Polygon data solutions you need right here.

Need help crafting a query or subscription? Message us on support.

What is the Bitquery Polygon (MATIC) API?​

It's a GraphQL interface over curated, indexed Polygon (MATIC) data. Write concise queries instead of building and maintaining your own indexer.

What can you build with it?​

Track wallet portfolios and token holders, monitor DEX price/volume and liquidity events, analyze gas and fees, stream mempool activity, compute KPIs over blocks/transactions, and power dashboards or trading systems with real‑time data.

How is it different from raw Polygon (MATIC) RPC?​

FeaturePolygon (MATIC) RPCBitquery Polygon (MATIC) API
Data FormatRaw JSON-RPC responsesPre-indexed, enriched GraphQL
Historical DataNo built-in historyFull historical data since genesis
AnalyticsManual aggregation requiredBuilt-in joins, aggregations, and KPIs
Real-timeBasic subscription supportRich streaming with filtering
Use CaseTransaction submission, node opsAnalytics, monitoring, dashboards
InfrastructureRun your own nodesFully managed, auto-scaling

WebSockets and Webhooks​

Most queries can be turned into live streams by switching query to subscription, and consumed over WebSocket. See examples and code snippets here.

DEX Trades​

Query and subscribe to on‑chain swaps, OHLCV, liquidity events, pools, and per‑wallet trading activity across major Polygon DEXes.

Transfers​

Follow ERC‑20 token flows and compute supply‑side metrics on Polygon.

Balances​

Get real‑time and historical balances for addresses and tokens on Polygon.

NFT​

Fetch collections, ownership, transfers, trades, and metadata on Polygon.

Videos​

Polygon (MATIC) API | How to Get Real-time & Historical Matic (Polygon) Data​