Polygon (MATIC) API Documentation
Discover everything you need to build powerful Polygon (MATIC) applications—from real-time DEX trading analytics, liquidity monitoring, slippage analysis, 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, liquidity pools, 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, liquidity events, pool reserves, and slippage data, 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?
| Feature | Polygon (MATIC) RPC | Bitquery Polygon (MATIC) API |
|---|---|---|
| Data Format | Raw JSON-RPC responses | Pre-indexed, enriched GraphQL |
| Historical Data | No built-in history | Full historical data since genesis |
| Analytics | Manual aggregation required | Built-in joins, aggregations, and KPIs |
| Real-time | Basic subscription support | Rich streaming with filtering |
| Use Case | Transaction submission, node ops | Analytics, monitoring, dashboards |
| Infrastructure | Run your own nodes | Fully 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.
Polygon (MATIC) Slippage API
Get slippage and price impact data for Polygon DEX pools. Understand price impact and liquidity depth for token swaps, calculate maximum input amounts at different slippage tolerances, and monitor real-time slippage data across all DEX pools on Polygon.
Polygon (MATIC) Liquidity API
Monitor real-time liquidity changes, track pool reserves, and analyze liquidity depth for token pairs on Polygon DEX pools. Track when liquidity is added or removed, monitor pool health and depth, and analyze liquidity patterns across different pools.
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.