{"uid":"cap_CM1it80sCGLYQ4jwXYeMP","slug":"nansen-orderbook-71d2fdce","name":"Polymarket Prediction Market Orderbook","description":"Get the full bid/ask orderbook for a Polymarket prediction market. Data is\npolled from the Polymarket CLOB API every ~60 seconds with MD5 change detection.\n\n**What it helps to answer:**\n\n1. **What is the current bid/ask depth for a prediction market?**\n2. **How much liquidity is available at each price level?**\n3. **What is the current spread?**","url":"https://api.nansen.ai/api/v1/prediction-market/orderbook?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","title":"OrderbookRequest","required":["market_id"],"properties":{"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 orderbook endpoint.","additionalProperties":false},"responseSchema":{"type":"object","title":"OrderbookResponse","required":["data"],"properties":{"data":{"type":"array","items":{"type":"object","title":"OrderbookLevel","required":["market_id"],"properties":{"side":{"anyOf":[{"type":"string"}],"title":"Side","examples":["buy"],"description":"buy or sell"},"size":{"anyOf":[{"type":"number"}],"title":"Size","examples":[1000],"description":"Size at level"},"price":{"anyOf":[{"type":"number"}],"title":"Price","examples":[0.52],"description":"Price level"},"outcome":{"anyOf":[{"type":"string"}],"title":"Outcome","examples":["Yes"],"description":"Outcome label"},"asset_id":{"anyOf":[{"type":"string"}],"title":"Asset Id","examples":["71321045679252212"],"description":"CLOB token ID"},"event_id":{"anyOf":[{"type":"string"}],"title":"Event Id","description":"Event ID"},"market_id":{"type":"string","title":"Market Id","examples":["654412"],"description":"Market ID"},"outcome_index":{"anyOf":[{"type":"integer"}],"title":"Outcome Index","examples":[1],"description":"Outcome index"},"cumulative_size":{"anyOf":[{"type":"number"}],"title":"Cumulative Size","examples":[5000],"description":"Cumulative size"},"snapshot_timestamp":{"anyOf":[{"type":"string","format":"date-time"}],"title":"Snapshot Timestamp","examples":["2024-11-01T12:00:00"],"description":"Snapshot timestamp"}},"description":"Orderbook level from ch_api_pm_orderbook."},"title":"Data","description":"List of orderbook level 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 orderbook 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_P5sCdkkrhePgayFq-GipY","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":"Returns the full bid/ask orderbook with price levels, sizes, and cumulative depth for a Polymarket prediction market, polled every ~60 seconds.","exampleAgentPrompt":"Can you pull the full orderbook for Polymarket market ID 654412 — I want to see all the bid and ask price levels, how much size is at each level, and the cumulative depth for both Yes and No outcomes?","exampleUseCases":null,"resultDescription":"A paginated list of orderbook levels, each containing the side (buy/sell), price, size, cumulative size, outcome label (e.g. Yes/No), asset ID, event ID, market ID, outcome index, and a snapshot timestamp indicating when the data was last polled from Polymarket.","failureModes":["Invalid or non-existent market_id returns empty data array","Market not yet indexed returns empty result","Pagination page beyond last page returns empty data","Rate limit or authentication failure returns HTTP 4xx error","Stale data up to ~60 seconds old due to polling interval"],"whenToPreferThis":"Use this endpoint when you need the full bid/ask depth and liquidity profile for a specific Polymarket prediction market, including cumulative order sizes and price levels for each outcome. Prefer this over generic DEX trade endpoints when you specifically want prediction market orderbook structure rather than executed trade history.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-09T18:51:30.172Z","isFirstParty":false,"canonicalSlug":"nansen-orderbook-71d2fdce"}