{"uid":"cap_puzIbqUeK584X_o-tWpSx","slug":"nansen-trades-by-market-3b36e942","name":"Polymarket Trades By Market","description":"Get recent trades for a Polymarket prediction market. Trades are decoded from\non-chain OrderFilled events on Polygon, joined with market metadata.\n\n**What it helps to answer:**\n\n1. **What are the most recent trades in this market?**\n2. **Who is buying and selling, and at what prices?**\n3. **What is the trade size distribution?**","url":"https://api.nansen.ai/api/v1/prediction-market/trades-by-market?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","title":"TradesByMarketRequest","required":["market_id"],"properties":{"date":{"anyOf":[{"type":"object","title":"DateRange","properties":{"to":{"anyOf":[{"type":"string"}],"title":"To","examples":["2025-01-31T23:59:59Z"],"description":"End date in ISO 8601 format (e.g., 2025-01-31T23:59:59Z or 2025-01-31)"},"from":{"anyOf":[{"type":"string"}],"title":"From","examples":["2025-01-01T00:00:00Z"],"description":"Start date in ISO 8601 format (e.g., 2025-01-01T00:00:00Z or 2025-01-01)"}},"description":"Date range model matching the API schema."}],"examples":[{"to":"2024-12-31T23:59:59Z","from":"2024-01-01T00:00:00Z"}],"description":"Date range filter (ISO 8601 date-time)"},"order_by":{"anyOf":[{"type":"array","items":{"type":"object","title":"TradesByMarketSortOrder","required":["field","direction"],"properties":{"field":{"enum":["timestamp"],"type":"string","title":"TradesByMarketSortField","description":"Sortable fields for trades by market endpoint."},"direction":{"enum":["ASC","DESC"],"type":"string","title":"SortDirection","description":"Enum for sort directions."}}}}],"title":"Order By","examples":[[{"field":"timestamp","direction":"DESC"}]],"description":"Sort order"},"market_id":{"type":"string","title":"Market Id","examples":["654412"],"maxLength":100,"minLength":1,"description":"Polymarket market ID"},"pagination":{"type":"object","title":"PaginationRequest","properties":{"page":{"type":"integer","title":"Page","default":1,"minimum":1,"description":"Page number (1-based)"},"per_page":{"type":"integer","title":"Per Page","default":10,"maximum":1000,"minimum":1,"description":"Number of records per page (max 1000)"}},"description":"Pagination parameters for API requests."}},"description":"Request for trades by market endpoint.","additionalProperties":false},"responseSchema":{"type":"object","title":"TradesByMarketResponse","required":["data"],"properties":{"data":{"type":"array","items":{"type":"object","title":"TradeByMarket","required":["market_id"],"properties":{"side":{"anyOf":[{"type":"string"}],"title":"Side","examples":["Yes"],"description":"Outcome side (Yes/No)"},"size":{"anyOf":[{"type":"number"}],"title":"Size","examples":[1000],"description":"Trade size in tokens"},"buyer":{"anyOf":[{"type":"string"}],"title":"Buyer","examples":["0xabcdefabcdefabcdefabcdefabcdefabcdefabcd"],"description":"Buyer address (hex)"},"price":{"anyOf":[{"type":"number"}],"title":"Price","examples":[0.52],"description":"Price per share (0-1)"},"seller":{"anyOf":[{"type":"string"}],"title":"Seller","examples":["0x1234567890abcdef1234567890abcdef12345678"],"description":"Seller address (hex)"},"tx_hash":{"anyOf":[{"type":"string"}],"title":"Tx Hash","examples":["0xabc123def456"],"description":"Transaction hash (hex)"},"market_id":{"type":"string","title":"Market Id","examples":["654412"],"description":"Market ID"},"timestamp":{"anyOf":[{"type":"string","format":"date-time"}],"title":"Timestamp","examples":["2024-11-01T12:30:00"],"description":"Trade timestamp (ISO format)"},"usdc_value":{"anyOf":[{"type":"number"}],"title":"Usdc Value","examples":[520],"description":"Trade value in USDC"},"taker_action":{"anyOf":[{"type":"string"}],"title":"Taker Action","examples":["buy"],"description":"Taker action (buy/sell)"},"outcome_index":{"anyOf":[{"type":"integer"}],"title":"Outcome Index","examples":[1],"description":"Outcome index"}},"description":"Trade data from ch_api_pm_trades_by_market."},"title":"Data","description":"List of trade records"},"pagination":{"type":"object","title":"PaginationInfo","properties":{"page":{"type":"integer","title":"Page","default":1,"minimum":1,"description":"Current page number"},"per_page":{"type":"integer","title":"Per Page","default":10,"maximum":1000,"minimum":1,"description":"Number of records per page"},"is_last_page":{"type":"boolean","title":"Is Last Page","default":true,"description":"Whether this is the last page"}},"description":"Pagination information for API responses."}},"description":"Response for trades by market endpoint."},"example":null,"exampleRequest":null,"tags":["blockchain","smart-money","wallet","tokens","defi","analytics","profiler","dex","pnl","onchain","prediction-market","data"],"displayCostAmount":"0.01","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.01/call","primary":{"kind":"static","protocol":"mpp","network":"tempo","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"mpp","network":"tempo","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_2t-SrG0zlUTRWijOQmwZf","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":"Nansen","brandSlug":"nansen","brandBaseUrl":"https://nansen.ai","brandDocsUrl":"https://docs.nansen.ai","whatItDoes":"Retrieve recent on-chain trades for a specific Polymarket prediction market, decoded from Polygon OrderFilled events with buyer/seller addresses, prices, and USDC values.","exampleAgentPrompt":"Pull the 50 most recent trades for Polymarket market ID 654412, sorted newest first, for the date range January 1 to January 31 2025 — I want to see who's buying and selling, at what prices, and the USDC values.","exampleUseCases":null,"resultDescription":"A paginated array of trade records, each containing market_id, buyer and seller wallet addresses, price per share (0-1), trade size in tokens, USDC value, outcome side (Yes/No), outcome index, taker action (buy/sell), transaction hash, and timestamp. Also includes pagination metadata (current page, per_page, is_last_page).","failureModes":["Invalid or non-existent market_id returns empty data array","Malformed date range (invalid ISO 8601 format) returns validation error","Pagination page exceeding available records returns empty data","Rate limiting or authentication failure returns 401/403 error","market_id exceeding 100 characters returns schema validation error"],"whenToPreferThis":"Use this endpoint when you need granular, individual trade-level data for a specific Polymarket market — including counterparty wallet addresses, exact prices, and on-chain transaction hashes. Prefer this over aggregated endpoints when you need to analyze trade distribution, identify specific traders, or reconstruct the order flow timeline for a single market.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-11T12:47:01.825Z","isFirstParty":false,"canonicalSlug":"nansen-trades-by-market-3b36e942"}