Token导航 LogoToken导航TokenDH.com
开发敏感数据github未标认证来源可访问许可证需确认审计异常

dflow-kalshi-market-datadflow 卡尔希市场数据

Agent Skill

用于辅助数据整理、表格处理、CSV/Excel 分析、指标计算和图表准备。它适合让 Agent 清洗字段、汇总数据、发现异常、生成统计口径或把分析结果转成可读说明。使用时需要确认数据来源、字段含义和时间范围,避免把样本数据当全量事实;涉及敏感数据、导出文件或批量写回时,应先确认权限和脱敏边界。

总安装

376

周安装

16

GitHub Stars

公开资料未说明

下载量

132
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:dflow-kalshi-market-data(dflow 卡尔希市场数据)
来源仓库:https://github.com/dflowprotocol/dflow-skills
仓库路径:skills/dflow-kalshi-market-data
安装命令:
npx skills add https://github.com/dflowprotocol/dflow-skills --skill dflow-kalshi-market-data
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/dflowprotocol/dflow-skills --skill dflow-kalshi-market-data

简介

dflow-kalshi-market-data 提供 Kalshi 市场的订单簿、交易、价格和预测数据访问。

  • 适用于获取实时市场快照、历史数据回放和流式行情,支持多种数据格式和时间范围查询。
  • 通过 DFlow Metadata API 提供标准化的数据端点,确保查询参数和响应结构的准确性。
  • 安装前需确认权限范围和维护状态,注意是否会触发联网、命令执行或文件读写操作。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

DFlow Kalshi Market Data

Pull data about a known Kalshi market (or set of markets) — orderbook, trades, prices, candles, forecasts, in-game live data — as a snapshot, a historical range, or a live stream.

Prerequisites

  • DFlow docs MCP (https://pond.dflow.net/mcp) — install per the repo README. This skill is the recipe; the MCP is the reference. Query params, pagination, exact payload schemas, WS snapshot-vs-diff semantics, and the category-specific live_data.details shapes all live there — don't guess.

Surface

All data endpoints in this skill run against the Metadata API (https://pond.dflow.net/build/metadata-api) — REST for snapshots and history, WebSockets for live streams. Call it from anywhere: a curl from the command line, a Node/Python script, a cron job, a backend, or a Next.js proxy fronting a browser UI.

If the user says "run this from my terminal", don't reach for the dflow CLI — it has no market-data subcommands. Write a short HTTP/WS script against the Metadata API instead.

Pick the shape first

Three intents, three shapes. Match the user's phrasing, then pick the endpoint:

  • Snapshot ("right now", "current") → REST, one call.
  • History ("last hour", "between T1 and T2", "last N trades") → REST with time / limit params.
  • Stream ("live", "as it happens", "alert me when") → WebSocket subscription.

Data → endpoint map

For each dataset below, the one-liner covers all three shapes. Field-level details (exact params, pagination tokens, payload schemas) → docs MCP.

Orderbook

  • Snapshot: GET /api/v1/orderbook/{ticker} or /api/v1/orderbook/by-mint/{mint} (includes sequence).
  • Stream: orderbook channel (yes_bids + no_bids maps per update; no sequence on the stream payload).

Trades — two endpoints, overlapping but different scopes

  • GET /api/v1/trades (and /trades/by-mint/{mint}) — the complete market print tape. All trades that hit Kalshi's orderbook, which includes DFlow onchain fills (those hit Kalshi's book too; see the "Do onchain trades show up on Kalshi's trade websocket?" FAQ). This is the default for "show me trades on this market." Stream equivalent: trades channel.
  • GET /api/v1/onchain-trades (and /onchain-trades/by-market/{ticker}, /onchain-trades/by-event/{eventTicker}) — DFlow onchain fills only, with onchain-specific fields that /trades doesn't carry: wallet, transactionSignature, id, inputAmount, outputAmount, createdAt. Subset of what's on /trades, but richer per-row. No WS stream.
  • Decision: *complete tape* → /trades. *Wallet-scoped activity feed, DFlow-execution analytics, tx-signature lookups* → /onchain-trades. Real-time fill detection for a specific user order → parse program events directly (see /build/prediction-markets/onchain-trade-parsing).

Top-of-book prices

  • Snapshot: read yesBid / yesAsk / noBid / noAsk directly from the market object (GET /api/v1/market/{ticker} — singular) — no separate endpoint.
  • Stream: prices channel.

Candlesticks (OHLCV)

  • Market-level: GET /api/v1/market/{ticker}/candlesticks or /api/v1/market/by-mint/{mint}/candlesticks.
  • Event-level: GET /api/v1/event/{ticker}/candlesticks.
  • 5,000-candle cap per request (see Gotchas).

Forecast percentile history

  • Event-level: GET /api/v1/event/{seriesTicker}/{eventId}/forecast_percentile_history (plus /api/v1/event/by-mint/{mint}/forecast_percentile_history). Kalshi's historical forecast distribution for an event.

Live data (Kalshi passthrough)

  • GET /api/v1/live_data, /live_data/by-event/{ticker}, /live_data/by-mint/{mint}.
  • Response includes a details object whose fields depend on the milestone type — football, soccer, tennis, golf, MMA, baseball, cricket, racing each have their own known-field sets. See live-data-details in the docs MCP before touching details.

Streaming lifecycle

Connect → subscribe → handle → reconnect. In a sentence each:

  • Connect: dev is wss://dev-prediction-markets-api.dflow.net/api/v1/ws (no auth). Prod is wss://prediction-markets-api.dflow.net/api/v1/ws with x-api-key on the WS upgrade headers. REST equivalents: https://dev-prediction-markets-api.dflow.net and https://prediction-markets-api.dflow.net.
  • Subscribe: send {type: "subscribe", channel: "prices" | "trades" | "orderbook", all: true | tickers: [...]}. Each channel holds its own subscription state.
  • Handle: parse each message by channel, process asynchronously — don't block the read loop.
  • Reconnect: exponential backoff on disconnect, and re-send every subscription after reconnect. The server doesn't remember you.

Exact message schemas (prices, trades, orderbook), heartbeat/ping behavior, and incremental-vs-snapshot semantics on the orderbook channel → docs MCP.

What to ASK the user (and what NOT to ask)

Query shape — infer if unambiguous, confirm if not:

  1. Which market — ticker or outcome mint.
  2. Which dataset — orderbook, trades (Kalshi vs onchain), prices, candles, forecasts, or live data.
  3. Snapshot / history / stream — infer from phrasing, confirm if ambiguous.
  4. History bounds / interval — time range (startTs, endTs) and periodInterval for candles; limit for trades.

Infra — always ask, never infer:

  1. DFlow API key. **Ask with a clean, neutral question: *"Do you have a DFlow API key?"*** Don't presuppose where the key lives — phrasings like *"do you have it in env?"* or *"is DFLOW_API_KEY set?"* nudge the user toward env-var defaults they didn't ask for. Don't assume the user has one just because they mention the dflow CLI is configured. Surface the choice; don't silently fall back to env or to dev. It's one key for everything DFlow — same x-api-key unlocks the Trade API *and* the Metadata API, REST *and* WebSocket. If yes → prod host (https://prediction-markets-api.dflow.net REST, wss://prediction-markets-api.dflow.net/api/v1/ws WS) with x-api-key on every request (REST and the WS upgrade). If no → dev host (https://dev-prediction-markets-api.dflow.net, wss://dev-prediction-markets-api.dflow.net/api/v1/ws), rate-limited; point them at https://pond.dflow.net/build/api-key for a prod key. When you generate a script, log the resolved host + key-presence at startup so the user can see which rails they're on.

Do NOT ask about:

  • RPC, wallet, signing — this skill is read-only public data.
  • Settlement mint / slippage / fees — trade-side concerns; if the user pivots to placing an order off something they see here, hand off to dflow-kalshi-trading.

Gotchas (the docs MCP won't volunteer these)

  • Two trade endpoints, overlapping scopes. /api/v1/trades is the complete market tape (Kalshi-offchain order flow plus DFlow onchain fills — DFlow fills hit Kalshi's book). /api/v1/onchain-trades is the DFlow-onchain subset, enriched with wallet / transactionSignature / input-output amounts. When a user says "show trades on this market" they want /trades; when they say "show this wallet's DFlow activity" they want /onchain-trades?wallet=....
  • Orderbook returns only bid ladders (yes_bids, no_bids). Best YES *ask* is derived: 1 - max(no_bids keys) (a NO bid at p is a YES offer at 1-p). Same on REST and the WS channel.
  • Two price scales. Probability strings ("0.4200") on orderbook + prices channels. Integer 0–10000 on /trades + trades channel, with yes_price_dollars / no_price_dollars string companions. Normalize before you compute.
  • 5,000-candle cap per request, hard 400. If the range × interval would produce more than 5,000 candles, the endpoint returns a 400 with no partial result — it's Kalshi's upstream cap forwarded through DFlow. Narrow the range, widen the interval, or page yourself.
  • periodInterval is in minutes, not seconds. Kalshi convention: 1 = 1-minute candles, 60 = hourly, 1440 = daily. Easy to blow past the 5,000-candle cap by assuming seconds.
  • live_data.details is categorical, not generic. Fields differ per milestone type. Don't hardcode cross-category field access; branch on type and pull the known fields for that category from the MCP's live-data-details reference.
  • WebSocket all: true is a firehose. Especially on prices and orderbook. Use a ticker list unless the monitor truly needs universe-wide coverage.
  • WS subscriptions don't survive reconnects. After every reconnect, resend every subscribe message you had before the drop.
  • Streams can go quiet in the maintenance window — Thursdays 3:00–5:00 AM ET, Kalshi is offline; expect sparse or missing WS traffic and stale REST fields.
  • The CLI's stored key doesn't flow into your script's HTTP client. dflow setup stores the key for the dflow binary's own use. The Metadata API calls your script makes directly are separate — they need the key plumbed in (env, .env, flag). It's one DFlow key, but two plumbing sites any time you mix CLI invocations with direct HTTP/WS calls in the same codebase.

When something doesn't fit

For anything not covered above — full parameter lists, pagination tokens, exact WS message shapes (snapshot-vs-diff on orderbook, heartbeat cadence), candlestick interval enums, category-specific live_data.details fields, forecast-percentile response shape — query the docs MCP (search_d_flow, query_docs_filesystem_d_flow). Don't guess.

Sibling skills

  • dflow-kalshi-market-scanner — find markets matching a criterion across the universe (uses these primitives, shapes them into named scans).
  • dflow-kalshi-trading — place buy / sell / redeem orders on a market you're watching here.
  • dflow-kalshi-portfolio — view the user's own positions and P&L.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

38.23%
按下载量换算50

Claude

27.15%
按下载量换算36

Cursor

19%
按下载量换算25

Gemini CLI

9.29%
按下载量换算12

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

未通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills