Swaps enables users to trade on Polymarket directly from their wallet using any token on any chain. The prediction market data endpoints provide real time market information to build comprehensive applications on Polymarket.
Endpoint reference
Market Discovery
| API | Description |
|---|
| Search Markets | Query markets by keywords or tags |
| Get Trending Markets | Discover high-volume markets sorted by 24hr trading activity |
| Get Tags | Retrieve categories for filtering markets |
| API | Description |
|---|
| Get Event | Retrieve complete event details with all associated markets |
| Get Markets | Query specific markets by token ID, slug, or category |
| Get Market Price | Fetch current best bid/ask prices |
| Get Price History | Analyze historical price data across different time intervals |
User Positions & Activity
| API | Description |
|---|
| Get Current Positions | View all open positions with PnL calculations |
| Get Closed Positions | Access historical positions from resolved markets |
| Get Trades | Retrieve detailed trade history |
| Get Activity | Comprehensive activity feed including orders and trades |
| Get PnL | Aggregate profit and loss summary |
Authentication
All API endpoints require authentication using API keys passed via the x-api-key header. We have provided a highly ratelimited API key for testing in the API playground.
Getting Started
- Discover Markets: Start with the search or trending endpoints to find markets
- Get Details: Use the market or event endpoints to fetch comprehensive information
- Track Prices: Monitor real-time prices and historical data
- Analyze Users: Query positions and activity for wallet addresses
In accordance with the underlying prediction markets, Swaps’ prediction market APIs are not available to users located in the United States.
- Polymarket Demo App - Test Swaps’ prediction market APIs by sending live Polymarket orders. Provides a reference for the discovery path and network requests to quickly add prediction markets to your app.