Everything ONE wallet did on PREDICTION MARKETS (Polymarket, on Polygon): its own orders, broken out per market and per outcome, with how much it bought and sold in USD, the outcome shares, and the average price it paid and received. Use for "what has <wallet> been betting on", "which prediction markets does this address trade", "this wallet's Polymarket history". NOT that wallet's token/DEX swaps -- trader_activity, trader_profile and trader_positions cover ERC-20 swaps, an entirely different market. For a one-line whole-history card of the same wallet use polymarket_trader_summary; for a ranking of MANY wallets use polymarket_top_traders; for redemptions, splits and merges (which are not trades) use polymarket_settlements; for the raw order-by-order tape of one market use polymarket_market_trades. Every figure here is computed from this wallet's own settled on-chain orders. READ THE FIRST ROW BEFORE ANYTHING ELSE. Every response starts with a row where Row_Type='scope'; its Note states the exact period the figures cover, and its Window_Start / Window_End bound them. A RESULT WITH ONLY THAT ROW MEANS "THIS WALLET PLACED NO ORDERS IN THAT PERIOD" -- it does NOT mean the wallet never traded, and you must never report it as "no activity", "not a trader" or "address not found". Re-run with window_hours=0 to search this wallet's whole recorded history (slower but conclusive), or call polymarket_trader_summary. Only an empty result from a window_hours=0 call means the wallet has never placed a prediction-market order. The remaining rows have Row_Type='market', one per (market, outcome): question id, title, outcome label, order counts split into buys and sells, buy/sell/total USD, shares bought and sold, net shares, the average buy price and the average sell price, how many of the orders took liquidity rather than resting on the book, the trading fees this wallet paid, and the first/last trade time. NAMES CAN BE MISSING; IDENTITY NEVER IS. Some order records carry no market title or outcome name. Name_Source tells you what you are looking at: 'as-traded' = the names came from the order records themselves; 'recovered' = the records were unnamed and the title and outcome were restored from the market's own registration; 'unresolved' = unnamed and no registration exists, so Title reads '(unidentified market)' and the outcome token id in Asset_Id is the only identifier. An 'unresolved' row is a REAL market with real volume -- report it as an unnamed market, never drop it, and never merge several of them together. COUNTED ONCE, AS THE WALLET'S OWN ORDERS. Every order this wallet placed is here, whether it rested on the book or took liquidity -- Taker_Orders says how many did the latter. Orders where this wallet was merely someone else's counterparty are NOT counted again: that is the same trade seen from the other side. PRICE IS A PROBABILITY between 0 and 1 -- the market's implied chance of that outcome. Avg_Buy_Price / Avg_Sell_Price are this wallet's own volume-weighted execution prices for that one outcome, so a wallet that bought "Yes" at 0.20 and sold it at 0.80 traded the same outcome at very different implied odds. BUYING AND SELLING ARE NOT SYMMETRIC HERE. On these markets a position is very often exited by BUYING the opposite outcome rather than by selling the one you hold, so a wallet can show heavy buying and almost no selling while still closing positions. Never read a low Sell_Usd as "never took profit" -- check the complementary outcome of the same market, and check polymarket_settlements for merges and redemptions. VOLUME IS NOT PROFIT, AND Net_Shares IS NOT A POSITION. This tool reports what was traded, never what it was worth afterwards: no realized or unrealized P&L is computed anywhere. Net_Shares is simply shares bought minus shares sold WITHIN THIS WINDOW from trading only -- a wallet also acquires and destroys outcome shares by splitting, merging and redeeming collateral, and none of that is a trade, so Net_Shares is NOT the wallet's holdings and must never be presented as one. Report it as trading flow, and use polymarket_settlements to see the splits, merges and redemptions. FEES_PAID_USD IS EXACT AND COMPLETE for this wallet. The fee is always charged to the owner of the order, and these rows are this wallet's own orders, so the figure is the whole fee it paid on this market and outcome, in the market's collateral currency - it does not depend on which side of a match the order was. It is a COST: subtract it when reasoning about what the wallet made, and never add it to Volume_Usd. Fees are a recent feature of these markets, so older activity shows a real 0. COST SCALES WITH THE WINDOW, NOT WITH limit. With question_id set the call is cheap at any window, whole history included. Without it, the work is proportional to the window: about a second for a day, a few seconds for a week, and roughly half a minute for window_hours=0 (the whole history) -- worth paying whenever a thin answer would otherwise be mistaken for no history, but not a default. May time out on very wide windows -- retry with a smaller window_hours. ORDERS ARRIVE WITH A DELAY. Every row carries Last_Indexed_Time (the time of the newest order recorded so far, across all markets) and Data_Lag_Minutes (how far that is behind the clock) - usually well under half an hour, occasionally several hours - and the scope row's Note repeats them. An order newer than Last_Indexed_Time is not visible yet, so if Last_Indexed_Time is earlier than Window_Start, only the scope row coming back means the data has not arrived, NOT that the wallet was inactive: say so and widen window_hours.
Parameters
Wallet address, 0x-hex (case-insensitive -- checksummed addresses from an explorer or UI are fine). Must be 40 hex characters (0x prefix optional); anything else is rejected.
Max (market, outcome) rows to return, on top of the leading scope row. At most 9999. Default: `50`.
Drop (market, outcome) rows whose USD volume is below this. 0 (default) = keep all. This filters the OUTPUT only; it does not make the call cheaper. Default: `0`.
Restrict to ONE market by its question id, 0x-hex (case-insensitive) as returned by polymarket_find_markets / polymarket_top_markets. Empty (default) = every market this wallet traded. Setting it makes the call cheap at any window, whole history included. Must be 64 hex characters (0x prefix optional); anything else is rejected. Default: ``.
"all" (default) = both directions. "buy" = only the orders that bought outcome shares. "sell" = only the orders that sold them. Remember that selling one outcome is often expressed as buying the opposite one, so "buy" is not the same as "opened a position". Lowercase exactly as written; any other value is rejected. Default: `all`.
"volume_usd" (default) = biggest USD volume first; "orders" = most orders first; "recent" = most recently traded first. Lowercase exactly as written; any other value is rejected. Default: `volume_usd`.
Look-back window in hours, ending now. Default 168 (7 days). 0 = this wallet's COMPLETE recorded history, honoured whether or not question_id is set -- use it whenever an empty or thin result would otherwise be read as "this wallet never traded". Without question_id a 0 costs roughly half a minute; with it, it is cheap. Cost is proportional to this, not to limit. Default: `168`.