360 Secure SkillHub
360 安全技能中心

vike-polymarket-find-market

该 Skill 支持用市场名称、slug、condition_id 或 Polymarket 链接检索市场,返回 condition_id、outcome token id、结束时间、neg_risk、tick_size 与开闭状态;可通过 MCP、vike-data CLI 或 curl 调用,适合为后续行情、订单簿和结算查询准备标识。

分类:搜索
vikeio
vikeio
热度 38.71
最近更新 2026-12-02 09:59:01

安装

发给 Agent
帮我安装这个技能:npx secure-skills-cli add vikeio/vike-polymarket-find-market
兼容性
通用兼容
联网要求
需要联网
数据出网
必须出网
Metadata
name
vike-polymarket-find-market
description
Find a Polymarket market and the ids every other call needs - from a name or a polymarket.com link, from the words of its slug (open or closed, newest end first, paged), or one market by condition_id even long after it closed - with its condition_id, outcome token ids, end time, neg_risk, tick size and whether it is still open. Use when the user asks "find the Polymarket market about X" / "what is the condition id of this market" / "token ids of this Polymarket market" / "list closed Polymarket markets about bitcoin" / "is this Polymarket market still open".
allowed-tools
Bash(vike-data:*)

vike-polymarket-find-market

Two ids, never interchangeable. A market has one condition_id (0x + 64 hex) and one outcome TOKEN id per outcome (a long decimal number). polymarket market, market-trades and settlement take the condition id; orderbook, market-stats, tape and candles polymarket take a token id. This skill gets you both.

Call it

Use the first of these that is available:

  1. MCP: search with q for a name or a polymarket.com link; polymarket_markets with view: "search", query, and the optional active (or closed), limit, offset; polymarket_markets with view: "market", condition_id.
  2. CLI:
    vike-data search "glucksmann french election" --json                                 # `markets`: condition_id, question, end_date, volume_24h_usd
    vike-data polymarket markets --view search --query "btc updown 5m" --active false --limit 50 --json
    vike-data polymarket markets --view search --query btc-updown-5m-1796151300 --json   # one market by its whole slug
    vike-data polymarket markets --view market --condition-id 0xa5ca27858ef5676943b3961ab3e14d9cd7c614fe33591c14e0f6023c7a9391c8 --json
    
  3. curl: the credential is VIKE_API_KEY, else api_key or anon_token from ~/.vike/config.json (Windows %USERPROFILE%\.vike\config.json); with none, get a free anonymous token with curl -s -X POST https://data.vike.io/v1/anon -H 'Content-Type: application/json' -d '{"source":"skill-curl"}' and save its token there as "anon_token" (see vike-core).
    curl -s "https://data.vike.io/v1/search?q=glucksmann&limit=5" -H "X-API-KEY: $TOKEN"
    curl -s "https://data.vike.io/v1/polymarket/markets?query=btc+updown+5m&active=false&limit=50" -H "X-API-KEY: $TOKEN"
    curl -s "https://data.vike.io/v1/polymarket/markets/0xa5ca27858ef5676943b3961ab3e14d9cd7c614fe33591c14e0f6023c7a9391c8" -H "X-API-KEY: $TOKEN"
    
Flag (API name) Default Values
--query none words that must ALL appear in the slug, any order, case-insensitive (at most 8 words)
--active both true only open, false only closed (REST also takes closed, never both)
--limit 50 at most 100 (a larger value is clamped)
--offset 0 0 to 10000
--condition-id - --view market only, required there

Output

  • search: the markets section lists Polymarket markets by question (condition_id, question, end_date, volume_24h_usd); its predictfun section holds Predict.fun markets (market_id), and polymarket holds Polymarket wallets.
  • --view search rows, newest end_date first: active, closed (1 or 0), condition_id, end_date (epoch ms), neg_risk (1 or 0), slug, tick_size, token_ids.
  • --view market: a list of 0 or 1 such rows plus source: recorded (a market we recorded) or catalog (Polymarket's full list, where tick_size and neg_risk are null). An unknown id is [], not an error.

Reading

  • Each query word is a substring match: 5m also matches 15m (checked 2026-12-02: btc updown 5m returned a btc-updown-15m-... row first). For one market give its whole slug, timestamp included.
  • token_ids has no outcome labels here. They follow the market's outcome order, which this row does not carry: take the labels from vike-data polymarket market <condition_id> (outcomes beside clob_token_ids) or polymarket settlement (outcomes beside token_ids). For up/down markets the order is Up, Down.
  • --view search covers only the markets we recorded (since 2026-07-25: the most active markets and the up/down series). A market it does not find can still be in Polymarket's catalogue: look it up by condition id with --view market, or by name with vike-data search.
  • closed comes from the on-chain resolution or Polymarket's own closed flag; active is its opposite. A market past end_date that nothing has closed yet still reads active: 1: confirm with vike-polymarket-resolutions.
  • neg_risk: 1 marks a market of a multi-outcome event (one Yes/No market per candidate or bucket).
  • For trending markets with live quotes use vike-polymarket-markets; for one market's holders, trades and stats, vike-polymarket-market-detail.

Errors

  • pass either 'active' or 'closed', not both: MCP and REST take both spellings; send one.
  • An offset above 10000 is refused: narrow the words instead.
  • REST: errors are 400 {"error": "..."}, and an unknown parameter is refused: ?condition_id= on /markets answers that condition_id is a path segment (use /markets/{condition_id}); ?q= gets did you mean 'query'.
  • A token id passed as condition_id matches nothing: [].
  • Exit code 3: the anonymous token's daily limit; tell the user to run vike-data login, do not retry.

Anti-patterns

  • Don't read the first token id as Yes or Up without checking the outcome labels.
  • Don't call a market open because active is 1 after its end date.

Pairs well with

  • vike-polymarket-market-detail, vike-pm-market-diligence - one market in depth
  • vike-polymarket-updown - the slug rule of the crypto up/down markets
  • vike-polymarket-order-book, vike-polymarket-tape, vike-candles - what to do with a token id