Part 1 — Filter activity by market
Pass themarketIds 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
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
UseGET /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
sentence field gives you a ready-to-read one-liner describing the entire transaction:
Buy 3604.58 No for 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 yourfromTimestamp 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