Skip to main content
This guide shows you how to monitor trading activity within a specific Polymarket market and decode individual transactions into human-readable form. You’ll filter a wallet’s history to a single market, inspect a transaction in detail, and build a polling loop that surfaces new trades as they land on-chain.

Part 1 — Filter activity by market

Pass the marketIds query parameter to GET /v1/trader/{address}/activity to scope results to a single market. You can find a market’s numeric ID in the marketId field of any activity response item.
curl
The response contains only the records where marketId == "2707644", in newest-first order. Add fromTimestamp or toTimestamp to narrow further to a specific time window, or repeat marketIds to include multiple markets in one request:

Part 2 — Decode a transaction

Use GET /v1/tx/{txHash} to turn a raw transaction hash into a structured, human-readable breakdown. Every activity item includes a txHash field you can pass directly to this endpoint.
curl
Example response
The sentence field gives you a ready-to-read one-liner describing the entire transaction:
Buy 3604.58 No for 3546.12269inWillBitcoindipto3546.12269 in Will Bitcoin dip to 59,000 on June 9?
This tells you the trader bought 3,604.58 No-outcome shares, spending $3,546.12 USDC, in the Bitcoin dip market. Display this field directly in any UI that needs a human-readable trade summary. The actions array breaks the transaction down into its individual on-chain fills. A single user-level trade can match against multiple counterparties on the order book, producing multiple fill records. Each action in the array shows:

Part 3 — Poll for new activity

The Orbscan API is a REST endpoint, not a streaming connection. To watch for new trades in near real-time, poll the activity endpoint on a schedule and advance your fromTimestamp after each successful request. The loop below queries a specific market every 30 seconds, prints any trades it hasn’t seen yet, and updates the timestamp so it only fetches genuinely new records on each iteration.
Python
Both fromTimestamp and toTimestamp accept Unix seconds, not milliseconds. Use int(time.time()) in Python or Math.floor(Date.now() / 1000) in JavaScript to generate a valid value from the current time.