Skip to main content
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

APIDescription
Search MarketsQuery markets by keywords or tags
Get Trending MarketsDiscover high-volume markets sorted by 24hr trading activity
Get TagsRetrieve categories for filtering markets

Market Information

APIDescription
Get EventRetrieve complete event details with all associated markets
Get MarketsQuery specific markets by token ID, slug, or category
Get Market PriceFetch current best bid/ask prices
Get Price HistoryAnalyze historical price data across different time intervals

User Positions & Activity

APIDescription
Get Current PositionsView all open positions with PnL calculations
Get Closed PositionsAccess historical positions from resolved markets
Get TradesRetrieve detailed trade history
Get ActivityComprehensive activity feed including orders and trades
Get PnLAggregate 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.
Create a key in the Console.

Getting Started

  1. Discover Markets: Start with the search or trending endpoints to find markets
  2. Get Details: Use the market or event endpoints to fetch comprehensive information
  3. Track Prices: Monitor real-time prices and historical data
  4. 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. Polymarket Demo App