vike-polymarket-tape
Two reads of trading, pick by the question:
| Need | Command | Id | Wallets |
|---|---|---|---|
| One market's fills, with who traded | polymarket market-trades |
condition_id (0x + 64 hex) |
yes |
| Trade prints of up to 100 outcome tokens, one window of at most 24 h | polymarket tape --event-type trade |
outcome token ids (long decimals) | no |
Ids: vike-polymarket-find-market. Trades as they happen: vike-stream (pm.trades).
Call it
Use the first of these that is available:
- MCP:
polymarket_market_trades(condition_id, optionalfrom_ms,to_ms,cursor,limit);polymarket_tape(token_idortoken_ids,from_ms,to_ms,event_type: "trade", optionalcursor,limit). - CLI:
CID=0xcfc6e088b78e695e831e094f7aa1197c16b2436e5984b12fb9286361804b8e1b vike-data polymarket market-trades $CID --from-ms 1796087347000 --limit 1000 --json # the last 24 h, newest first vike-data polymarket market-trades $CID --from-ms 1796087347000 --cursor "<next_cursor>" --limit 1000 --json vike-data polymarket tape --token-ids <token_a>,<token_b> --from-ms 1796160000000 --to-ms 1796173700000 --event-type trade --limit 5000 --json - curl: the credential is
VIKE_API_KEY, elseapi_keyoranon_tokenfrom~/.vike/config.json(Windows%USERPROFILE%\.vike\config.json); with none, get a free anonymous token withcurl -s -X POST https://data.vike.io/v1/anon -H 'Content-Type: application/json' -d '{"source":"skill-curl"}'and save itstokenthere as"anon_token"(seevike-core).curl -s "https://data.vike.io/v1/polymarket/markets/$CID/trades?from_ms=1796087347000&limit=1000" -H "X-API-KEY: $TOKEN" curl -s "https://data.vike.io/v1/polymarket/events?token_ids=<token_a>,<token_b>&from_ms=1796160000000&to_ms=1796173700000&event_type=trade" -H "X-API-KEY: $TOKEN"
--from-ms is inclusive and --to-ms exclusive (epoch ms). market-trades: both optional, --limit default 100 on the CLI and MCP and 1000 on REST, at most 10,000. tape: both required, at most 24 hours apart, --limit default 100 (REST 5000), at most 50,000, --token-ids at most 100. Both page while has_more is true: pass next_cursor back with --cursor, unchanged. Each page is one request, so ask for full pages.
Output
market-trades:{trades, has_more, next_cursor}, newest first. Each row:ts(block time, epoch ms),tx_hash,log_index,block_number,proxy_wallet,name,pseudonym(both usually empty),side(BUY/SELLoftoken_id),role(maker/taker),outcome,outcome_index,token_id,size(shares),price(0 to 1). There is no USD field: dollars =sizexprice.tape --event-type trade:{events, has_more, next_cursor}, oldest first. Each row:ts(Polymarket's time),local_ts(ours),token_id,price,size(shares),side(buy/sell, as Polymarket's feed reports the print).best_bid,best_askandbids/asksare empty on trade rows: 0 there means absent.
Reading
- One
market-tradesrow is one ORDER's fill, not one match. A match is onemakerrow per resting order hit plus onetakerrow whose size is theirs added up (checked 2026-12-02: a 400-share taker SELL beside a 400-share maker BUY in the same transaction). Count volume and "big bets" on ONE role,takerfor the aggressor; never add both. - Biggest bets: keep
role == "taker", rank bysizexprice. A largemakerrow is a resting order that was filled, worth naming too. - One wallet in this market: filter the rows on
proxy_wallet; its whole record across markets isvike-polymarket-trader.proxy_walletis Polymarket's proxy wallet, not necessarily the person's own address. outcome_index0 is the market's first outcome; readoutcomerather than assume Yes or Up.- A few percent of fills merge (one wallet, one token, one transaction), so a count can sit slightly under the on-chain total.
market-tradesreaches back to 2026-01-01;tapecovers the markets we recorded live since 2026-07-25 (the most active ones and the up/down series). The two totals can differ a little: one is on-chain fills, the other the venue's prints.- The tape window counts OUR receive time (
local_ts). For both outcomes of a binary market pass both token ids; up to 100 ids is 50 binary markets, such as a run ofbtc-updown-5mwindows.
Errors
condition_id must be 0x followed by 64 hex digits: ...(exit 1):market-tradesgot a token id. On REST a malformed or unknown id is a 200 with emptytrades, not an error.that is a condition_id (0x...); this tool takes an outcome token id, ...:tapegot a market id.trades requires to_ms > from_ms;events requires from_ms/to_ms.events window too wide: ...ms requested, max 86400000ms (24h): split into days, or take the daily Parquet files of thetradesstream (vike-pm-l2-archive).events: token_ids requests N tokens, exceeding the max 100 tokens per request: split the list.- REST: errors are 400
{"error": "..."}, and an unknown parameter is refused (?type=tradegetsdid you mean 'event_type'). - Exit code 3: the anonymous token's daily limit; tell the user to run
vike-data login, do not retry.
Anti-patterns
- Don't add
sizexpriceover maker and taker rows together: that counts each match twice. - Don't call a wallet an insider from its timing in one market.
- Don't request a tape without
--event-type tradefor trades: a page is then mostly book changes.
Pairs well with
vike-polymarket-trader- the record of a wallet found herevike-polymarket-order-book- the book those trades hitvike-pm-market-diligence- the one-market playbook these reads belong tovike-predictfun-market-detail- fills with wallets of a Predict.fun market
