home / skills / velcrafting / codex-skills / kalshi-markets

kalshi-markets skill

/skills/kalshi/kalshi-markets

This skill helps you access and analyze Kalshi market data including prices, orderbooks, trades, and events for quick insights.

npx playbooks add skill velcrafting/codex-skills --skill kalshi-markets

Review the files below or copy the command above to add this skill to your agents.

Files (11)
SKILL.md
2.3 KB
---
name: kalshi-markets
description: Access Kalshi prediction market data including market prices, orderbooks, trades, events, and series information. Use when the user asks about prediction markets, Kalshi markets, betting odds, market prices, or needs to search or analyze prediction market data.
---

# Kalshi Markets

Standalone, self-contained scripts for Kalshi prediction markets.
Each script is independently executable with zero dependencies between scripts.

## Instructions

- **Default to `--json` flag** for all commands when processing data
- Prioritize high volume markets, series, and events.
- **IMPORTANT**: **Don't read scripts unless absolutely needed** - instead, use `<script.py> --help` to understand options and then call the script with `uv run <script.py> <options>` to get the data you need.
- All scripts work from any directory (use absolute paths internally)

## Progressive Disclosure

Each script contains ~200-300 lines with complete functionality.
Only load the script you need - no unnecessary context.

## Available Scripts

### `scripts/status.py`
**When to use:** Check if Kalshi exchange is operational

### `scripts/markets.py`
**When to use:** Browse available prediction markets

### `scripts/market.py`
**When to use:** Get comprehensive details about a specific market

### `scripts/orderbook.py`
**When to use:** View bid/ask levels for a market

### `scripts/trades.py`
**When to use:** Monitor recent trading activity

### `scripts/search.py`
**When to use:** Find markets by keyword (uses intelligent caching)

### `scripts/events.py`
**When to use:** List groups of related markets

### `scripts/event.py`
**When to use:** Get details about a specific event

### `scripts/series_list.py`
**When to use:** Browse all market templates (~6900 available)

### `scripts/series.py`
**When to use:** Get information about a specific market template

## Architecture

- **Self-Contained:** Each script includes all necessary code
- **No External Dependencies:** HTTP client embedded in each script
- **Progressive Discovery:** Only see what you need
- **Incrementally Adoptable:** Use one script or many

## Quick Start

All scripts support `--help` and `--json`:

```bash
uv run scripts/[script].py --help
uv run scripts/[script].py --json
```

No authentication required for any script.

Overview

This skill provides direct access to Kalshi prediction market data: market listings, market details, orderbooks, trades, events, and series templates. It exposes a set of independent, ready-to-run scripts that return machine-friendly JSON by default. Use it to fetch live market prices, inspect liquidity, and search or analyze prediction market activity quickly.

How this skill works

Each script is standalone and self-contained; run the specific script you need with the --json flag to get structured output. Scripts include endpoints for status, markets, single-market details, orderbooks, recent trades, event groups, and series templates. The recommended workflow is to run <script> --help to review options, then run the script with --json to retrieve the data you need without loading unnecessary code.

When to use it

  • You need current market prices or binary contract odds from Kalshi.
  • You want to inspect orderbook depth or recent trade activity for liquidity analysis.
  • You need to locate markets by keyword or browse event groups and series templates.
  • You want a quick operational check of the Kalshi exchange.
  • You are building dashboards or backtests that require deterministic, scriptable data pulls.

Best practices

  • Always run scripts with the --json flag to get consistent machine-readable output.
  • Prefer high-volume markets, series, and events when analyzing price signals to reduce noise.
  • Use the --help option on a script to discover available filters before executing the query.
  • Call only the single script you need to minimize runtime and reduce surface area for errors.
  • Cache stable responses locally for repeated analysis, but refresh orderbooks and trades frequently for live views.

Example use cases

  • Fetch live bid/ask levels for a market to evaluate execution and slippage before placing an account order.
  • Pull recent trades and volumes to detect sudden price moves or unusual activity for monitoring alerts.
  • Search markets by keyword to find relevant contracts for a specific event or macro outcome.
  • List all series templates to enumerate similar contract structures for batch analysis or model training.
  • Query event-level details to aggregate market probabilities across related markets for portfolio decisions.

FAQ

Do the scripts require authentication?

No authentication is required; scripts work without API keys.

How do I get machine-readable output?

Run any script with the --json flag to receive structured JSON suitable for downstream processing.