Command Palette

Search for a command to run...

Назад к скиллам
скилл № 67930

dflow-kalshi-market-data

Read market data for a known Kalshi prediction market on DFlow — orderbook, trades, top-of-book prices, candlesticks, forecast-percentile history, and Kalshi…

БесплатноБез исполняемых скриптов
x402agentот x402agent★ 26 звёзд на GitHub

Установить dflow-kalshi-market-data в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Об этом скилле

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 orderb

Полный SKILL.md на GitHub

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл dflow-kalshi-market-data?

Read market data for a known Kalshi prediction market on DFlow — orderbook, trades, top-of-book prices, candlesticks, forecast-percentile history, and Kalshi in-game live data — via one-shot REST snapshots, historical ranges, or live WebSocket streams. Use when the user asks "show me the orderbook for X", "get last hour of trades", "build a live price ticker", "stream orderbook depth", "pull 1-minute candles for the last day", "watch in-game scores for this sports market", or "alert me when the orderbook moves". Do NOT use to discover markets matching a criterion (use `dflow-kalshi-market-scanner`), to place orders (use `dflow-kalshi-trading`), or to read a user's own positions/P&L (use `dflow-kalshi-portfolio`).

Как установить скилл dflow-kalshi-market-data?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл dflow-kalshi-market-data запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить dflow-kalshi-market-data с