> ## Documentation Index
> Fetch the complete documentation index at: https://docs.beta.b3os.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Kalshi (read-only)

The io.b3os/kalshi pack: 9 actions with call snippets, fixture outputs, connection setup and error codes, generated from version 1.0.0.

`io.b3os/kalshi` 1.0.0 · `prediction-markets`, `market-data`, `event-contracts` · MIT

Read-only market data from Kalshi, the CFTC-regulated US event-contract exchange: keyword search, markets with live bid, ask and last prices, events, series, order books, candlesticks and recent trades. Keyless public API; no trading and no account data. Prices are dollar strings from 0.0000 to 1.0000 per contract and read as implied probabilities; counts and volumes are fixed-point strings.

Every call's result carries `upstream_status` and `timing`: `validate_ms`, `inject_ms`, `render_ms`, `upstream_ms`, `map_ms` and `total_ms`. `upstream` is the service's time; the others are B3OS's own ([call actions](/actions/call)). The snippets below show no timing values, because a fixture records none.

## Connection

No credential: a keyless public API. Calls name no connection.

Hosts it reaches: `api.elections.kalshi.com`.

## Actions

| Action | Effect | MCP tool | Title |
|---|---|---|---|
| [`search`](/actions/catalog/kalshi#kalshi-search) | read | `kalshi__search` | Search markets |
| [`list-markets`](/actions/catalog/kalshi#kalshi-list-markets) | read | `kalshi__list-markets` | List markets |
| [`get-market`](/actions/catalog/kalshi#kalshi-get-market) | read | `kalshi__get-market` | Kalshi Get Market |
| [`get-event`](/actions/catalog/kalshi#kalshi-get-event) | read | `kalshi__get-event` | Kalshi Get Event |
| [`list-events`](/actions/catalog/kalshi#kalshi-list-events) | read | `kalshi__list-events` | List events |
| [`get-series`](/actions/catalog/kalshi#kalshi-get-series) | read | `kalshi__get-series` | Get series |
| [`get-orderbook`](/actions/catalog/kalshi#kalshi-get-orderbook) | read | `kalshi__get-orderbook` | Get order book |
| [`get-candlesticks`](/actions/catalog/kalshi#kalshi-get-candlesticks) | read | `kalshi__get-candlesticks` | Kalshi Get Market Candlesticks |
| [`get-trades`](/actions/catalog/kalshi#kalshi-get-trades) | read | `kalshi__get-trades` | Kalshi Get Trades |

search

**Search markets.** Keyword search over Kalshi series and their live markets (for example knicks, fed rate, bitcoin), ranked by relevance and volume. Each result is a series with its current event and markets, including bid, ask and last prices. Use list-markets to filter by status, event or series instead.

Ref `io.b3os/kalshi/search@1.0.0` · effect `read` · no connection · MCP tool `kalshi__search`

**curl**

```bash
    curl -s https://beta-api.b3os.org/v1/actions/call \
      -H "Authorization: Bearer $B3OS_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
          "ref": "io.b3os/kalshi/search@1",
          "input": {"query": "bitcoin", "page_size": 1}
        }'
    ```
  **TypeScript**

```ts
    import { B3OS } from "@b3os/sdk";

    const b3os = new B3OS();
    const result = await b3os.actions.call({
      ref: "io.b3os/kalshi/search@1",
      input: { query: "bitcoin", page_size: 1 },
    });
    console.log(result.output);
    ```
  **Python**

```python
    from b3os import B3OS

    b3os = B3OS()
    result = b3os.actions.call({
        "ref": "io.b3os/kalshi/search@1",
        "input": {"query": "bitcoin", "page_size": 1},
    })
    print(result["output"])
    ```
  **MCP**

```json
    {
      "method": "tools/call",
      "params": {
        "name": "kalshi__search",
        "arguments": {"query": "bitcoin", "page_size": 1}
      }
    }
    ```

    Expose the pack as tools with `--packs kalshi` on the local server or `?packs=kalshi` on the remote URL, and the agent calls `kalshi__search` with the action's input. The tool needs no connection. Without exposing the pack, `actions_call` takes the same input with `ref`.

Output, labeled `fixture`: Search markets (response recorded 2026-10-26). From the bundle's `fixtures/search.json`, not a live call.

```json
{
  "results": [
    {
      "series_ticker": "KXBTC15M",
      "series_title": "Bitcoin price up down",
      "event_ticker": "KXBTC15M-26OCT260345",
      "event_title": "BTC 15 min · $79,920.08 target",
      "event_subtitle": "Oct 26 - 3:30AM EDT to 3:45AM EDT",
      "category": "Crypto",
      "total_volume": 1124225,
      "markets": [
        {
          "ticker": "KXBTC15M-26OCT260345-45",
          "title": "BTC price up in next 15 mins?",
          "yes_subtitle": "Target Price: $79,920.08",
          "yes_bid_dollars": "0.2800",
          "yes_ask_dollars": "0.2900",
          "last_price_dollars": "0.2800",
          "close_time": "2026-10-26T07:45:00Z"
        }
      ]
    }
  ],
  "total": 31,
  "next_cursor": "CAE"
}
```

When the service answers with an error, the call fails with [`upstream_error`](/errors#upstream_error) and `pack_error.code` is one of:

| `pack_error.code` | Service status | Retryable | Message |
|---|---|---|---|
| `not_found` | 404 | no | Kalshi has no market, event or series with this ticker. |
| `rate_limited` | 429 | yes | Kalshi rate limit reached; retry shortly. |
| `invalid_request` | 400, 422 | no | built from the service's response |

list-markets

**List markets.** List Kalshi markets filtered by status (unopened, open, closed, settled), event ticker, series ticker or a set of market tickers, with prices, volume, open interest and close time. Page with the returned cursor.

Ref `io.b3os/kalshi/list-markets@1.0.0` · effect `read` · no connection · MCP tool `kalshi__list-markets`

**curl**

```bash
    curl -s https://beta-api.b3os.org/v1/actions/call \
      -H "Authorization: Bearer $B3OS_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
          "ref": "io.b3os/kalshi/list-markets@1",
          "input": {"status": "open", "series_ticker": "KXFEDDECISION", "limit": 2}
        }'
    ```
  **TypeScript**

```ts
    import { B3OS } from "@b3os/sdk";

    const b3os = new B3OS();
    const result = await b3os.actions.call({
      ref: "io.b3os/kalshi/list-markets@1",
      input: { status: "open", series_ticker: "KXFEDDECISION", limit: 2 },
    });
    console.log(result.output);
    ```
  **Python**

```python
    from b3os import B3OS

    b3os = B3OS()
    result = b3os.actions.call({
        "ref": "io.b3os/kalshi/list-markets@1",
        "input": {"status": "open", "series_ticker": "KXFEDDECISION", "limit": 2},
    })
    print(result["output"])
    ```
  **MCP**

```json
    {
      "method": "tools/call",
      "params": {
        "name": "kalshi__list-markets",
        "arguments": {"status": "open", "series_ticker": "KXFEDDECISION", "limit": 2}
      }
    }
    ```

    Expose the pack as tools with `--packs kalshi` on the local server or `?packs=kalshi` on the remote URL, and the agent calls `kalshi__list-markets` with the action's input. The tool needs no connection. Without exposing the pack, `actions_call` takes the same input with `ref`.

Output, labeled `fixture`: List markets (response recorded 2026-10-26). From the bundle's `fixtures/list-markets.json`, not a live call.

```json
{
  "markets": [
    {
      "ticker": "KXFEDDECISION-28JAN-H26",
      "title": "Will the Federal Reserve Hike rates by >25bps at their January 2028 meeting?",
      "event_ticker": "KXFEDDECISION-28JAN",
      "market_type": "binary",
      "subtitle": "Hike >25bps",
      "yes_sub_title": "Hike >25bps",
      "no_sub_title": "Hike >25bps",
      "status": "active",
      "yes_bid_dollars": "0.0800",
      "yes_ask_dollars": "0.2100",
      "no_bid_dollars": "0.7900",
      "no_ask_dollars": "0.9200",
      "last_price_dollars": "0.2200",
      "volume_fp": "2458.31",
      "volume_24h_fp": "0.00",
      "open_interest_fp": "1225.31",
      "close_time": "2028-01-26T18:59:00Z"
    },
    {
      "ticker": "KXFEDDECISION-28JAN-H25",
      "title": "Will the Federal Reserve Hike rates by 25bps at their January 2028 meeting?",
      "event_ticker": "KXFEDDECISION-28JAN",
      "market_type": "binary",
      "subtitle": "Hike 25bps",
      "yes_sub_title": "Hike 25bps",
      "no_sub_title": "Hike 25bps",
      "status": "active",
      "yes_bid_dollars": "0.1500",
      "yes_ask_dollars": "0.2500",
      "no_bid_dollars": "0.7500",
      "no_ask_dollars": "0.8500",
      "last_price_dollars": "0.0400",
      "volume_fp": "637.70",
      "volume_24h_fp": "0.00",
      "open_interest_fp": "147.00",
      "close_time": "2028-01-26T18:59:00Z"
    }
```

The first 40 of 44 lines; the fixture file has the rest.

When the service answers with an error, the call fails with [`upstream_error`](/errors#upstream_error) and `pack_error.code` is one of:

| `pack_error.code` | Service status | Retryable | Message |
|---|---|---|---|
| `not_found` | 404 | no | Kalshi has no market, event or series with this ticker. |
| `rate_limited` | 429 | yes | Kalshi rate limit reached; retry shortly. |
| `invalid_request` | 400, 422 | no | built from the service's response |

get-market

**Kalshi Get Market.** One Kalshi market by ticker: title, Yes and No labels, status, best bids and asks, last and previous prices, volume, 24-hour volume, open interest, open, close and expiration times, the result once settled, and the primary rules text. Prices are dollar strings per contract (0.0000 to 1.0000).

Ref `io.b3os/kalshi/get-market@1.0.0` · effect `read` · no connection · MCP tool `kalshi__get-market`

**curl**

```bash
    curl -s https://beta-api.b3os.org/v1/actions/call \
      -H "Authorization: Bearer $B3OS_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
          "ref": "io.b3os/kalshi/get-market@1",
          "input": {"ticker": "KXFEDDECISION-26OCT-H0"}
        }'
    ```
  **TypeScript**

```ts
    import { B3OS } from "@b3os/sdk";

    const b3os = new B3OS();
    const result = await b3os.actions.call({
      ref: "io.b3os/kalshi/get-market@1",
      input: { ticker: "KXFEDDECISION-26OCT-H0" },
    });
    console.log(result.output);
    ```
  **Python**

```python
    from b3os import B3OS

    b3os = B3OS()
    result = b3os.actions.call({
        "ref": "io.b3os/kalshi/get-market@1",
        "input": {"ticker": "KXFEDDECISION-26OCT-H0"},
    })
    print(result["output"])
    ```
  **MCP**

```json
    {
      "method": "tools/call",
      "params": {
        "name": "kalshi__get-market",
        "arguments": {"ticker": "KXFEDDECISION-26OCT-H0"}
      }
    }
    ```

    Expose the pack as tools with `--packs kalshi` on the local server or `?packs=kalshi` on the remote URL, and the agent calls `kalshi__get-market` with the action's input. The tool needs no connection. Without exposing the pack, `actions_call` takes the same input with `ref`.

Output, labeled `fixture`: Kalshi Get Market (response recorded 2026-10-26). From the bundle's `fixtures/get-market.json`, not a live call.

```json
{
  "ticker": "KXFEDDECISION-26OCT-H0",
  "title": "Will the Federal Reserve Hike rates by 0bps at their October 2026 meeting?",
  "event_ticker": "KXFEDDECISION-26OCT",
  "market_type": "binary",
  "subtitle": "Hike 0bps",
  "yes_sub_title": "Fed maintains rate",
  "no_sub_title": "Fed maintains rate",
  "status": "active",
  "yes_bid_dollars": "0.9300",
  "yes_ask_dollars": "0.9400",
  "no_bid_dollars": "0.0600",
  "no_ask_dollars": "0.0700",
  "last_price_dollars": "0.9400",
  "previous_price_dollars": "0.9300",
  "previous_yes_bid_dollars": "0.9300",
  "previous_yes_ask_dollars": "0.9400",
  "volume_fp": "7649654.80",
  "volume_24h_fp": "292559.16",
  "open_interest_fp": "3154021.29",
  "open_time": "2025-09-29T14:00:00Z",
  "close_time": "2026-10-28T17:59:00Z",
  "expiration_time": "2027-01-27T18:01:00Z",
  "result": "",
  "settlement_value_dollars": null,
  "rules_primary": "If the Federal Reserve does a Hike of 0bps on October 28, 2026, then the market resolves to Yes.",
  "can_close_early": true,
  "notional_value_dollars": "1.0000",
  "cap_strike": null,
  "floor_strike": null
}
```

When the service answers with an error, the call fails with [`upstream_error`](/errors#upstream_error) and `pack_error.code` is one of:

| `pack_error.code` | Service status | Retryable | Message |
|---|---|---|---|
| `not_found` | 404 | no | Kalshi has no market, event or series with this ticker. |
| `rate_limited` | 429 | yes | Kalshi rate limit reached; retry shortly. |
| `invalid_request` | 400, 422 | no | built from the service's response |

get-event

**Kalshi Get Event.** One Kalshi event (the question several markets share, such as one game or one rate decision) with its series, category, mutual exclusivity, strike date and, by default, every market in it with prices and volume.

Ref `io.b3os/kalshi/get-event@1.0.0` · effect `read` · no connection · MCP tool `kalshi__get-event`

**curl**

```bash
    curl -s https://beta-api.b3os.org/v1/actions/call \
      -H "Authorization: Bearer $B3OS_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
          "ref": "io.b3os/kalshi/get-event@1",
          "input": {"eventTicker": "KXFEDDECISION-26OCT"}
        }'
    ```
  **TypeScript**

```ts
    import { B3OS } from "@b3os/sdk";

    const b3os = new B3OS();
    const result = await b3os.actions.call({
      ref: "io.b3os/kalshi/get-event@1",
      input: { eventTicker: "KXFEDDECISION-26OCT" },
    });
    console.log(result.output);
    ```
  **Python**

```python
    from b3os import B3OS

    b3os = B3OS()
    result = b3os.actions.call({
        "ref": "io.b3os/kalshi/get-event@1",
        "input": {"eventTicker": "KXFEDDECISION-26OCT"},
    })
    print(result["output"])
    ```
  **MCP**

```json
    {
      "method": "tools/call",
      "params": {
        "name": "kalshi__get-event",
        "arguments": {"eventTicker": "KXFEDDECISION-26OCT"}
      }
    }
    ```

    Expose the pack as tools with `--packs kalshi` on the local server or `?packs=kalshi` on the remote URL, and the agent calls `kalshi__get-event` with the action's input. The tool needs no connection. Without exposing the pack, `actions_call` takes the same input with `ref`.

Output, labeled `fixture`: Kalshi Get Event (response recorded 2026-10-26). From the bundle's `fixtures/get-event.json`, not a live call.

```json
{
  "event_ticker": "KXFEDDECISION-26OCT",
  "series_ticker": "KXFEDDECISION",
  "title": "Fed decision in Oct 2026?",
  "sub_title": "On Oct 28, 2026",
  "category": "Economics",
  "mutually_exclusive": true,
  "strike_date": "2026-10-28T18:00:00Z",
  "strike_period": "",
  "markets": [
    {
      "ticker": "KXFEDDECISION-26OCT-C26",
      "title": "Will the Federal Reserve Cut rates by >25bps at their October 2026 meeting?",
      "event_ticker": "KXFEDDECISION-26OCT",
      "market_type": "binary",
      "subtitle": "Cut >25bps",
      "yes_sub_title": "Cut >25bps",
      "no_sub_title": "Cut >25bps",
      "status": "active",
      "yes_bid_dollars": "0.0000",
      "yes_ask_dollars": "0.0100",
      "no_bid_dollars": "0.9900",
      "no_ask_dollars": "1.0000",
      "last_price_dollars": "0.0100",
      "volume_fp": "247588.88",
      "volume_24h_fp": "941.73",
      "open_interest_fp": "234135.43",
      "close_time": "2026-10-28T17:59:00Z"
    },
    {
      "ticker": "KXFEDDECISION-26OCT-C25",
      "title": "Will the Federal Reserve Cut rates by 25bps at their October 2026 meeting?",
      "event_ticker": "KXFEDDECISION-26OCT",
      "market_type": "binary",
      "subtitle": "Cut 25bps",
      "yes_sub_title": "Cut 25bps",
      "no_sub_title": "Cut 25bps",
      "status": "active",
      "yes_bid_dollars": "0.0000",
      "yes_ask_dollars": "0.0100",
```

The first 40 of 51 lines; the fixture file has the rest.

When the service answers with an error, the call fails with [`upstream_error`](/errors#upstream_error) and `pack_error.code` is one of:

| `pack_error.code` | Service status | Retryable | Message |
|---|---|---|---|
| `not_found` | 404 | no | Kalshi has no market, event or series with this ticker. |
| `rate_limited` | 429 | yes | Kalshi rate limit reached; retry shortly. |
| `invalid_request` | 400, 422 | no | built from the service's response |

list-events

**List events.** List Kalshi events by status (open, closed, settled) or series, newest first, with title, category, series and strike date. Page with the cursor; get-event lists an event's markets.

Ref `io.b3os/kalshi/list-events@1.0.0` · effect `read` · no connection · MCP tool `kalshi__list-events`

**curl**

```bash
    curl -s https://beta-api.b3os.org/v1/actions/call \
      -H "Authorization: Bearer $B3OS_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
          "ref": "io.b3os/kalshi/list-events@1",
          "input": {"status": "open", "limit": 2}
        }'
    ```
  **TypeScript**

```ts
    import { B3OS } from "@b3os/sdk";

    const b3os = new B3OS();
    const result = await b3os.actions.call({
      ref: "io.b3os/kalshi/list-events@1",
      input: { status: "open", limit: 2 },
    });
    console.log(result.output);
    ```
  **Python**

```python
    from b3os import B3OS

    b3os = B3OS()
    result = b3os.actions.call({
        "ref": "io.b3os/kalshi/list-events@1",
        "input": {"status": "open", "limit": 2},
    })
    print(result["output"])
    ```
  **MCP**

```json
    {
      "method": "tools/call",
      "params": {
        "name": "kalshi__list-events",
        "arguments": {"status": "open", "limit": 2}
      }
    }
    ```

    Expose the pack as tools with `--packs kalshi` on the local server or `?packs=kalshi` on the remote URL, and the agent calls `kalshi__list-events` with the action's input. The tool needs no connection. Without exposing the pack, `actions_call` takes the same input with `ref`.

Output, labeled `fixture`: List events (response recorded 2026-10-26). From the bundle's `fixtures/list-events.json`, not a live call.

```json
{
  "events": [
    {
      "event_ticker": "KXELONMARS-99",
      "series_ticker": "KXELONMARS",
      "title": "Will Elon Musk visit Mars in his lifetime?",
      "sub_title": "Before 2099",
      "category": "Science and Technology",
      "mutually_exclusive": false,
      "strike_date": null
    },
    {
      "event_ticker": "KXNEXTNATOSECGEN-99",
      "series_ticker": "KXNEXTNATOSECGEN",
      "title": "Who will be the next Secretary General of NATO?",
      "sub_title": "Before Jan 1, 2099",
      "category": "Elections",
      "mutually_exclusive": true,
      "strike_date": null
    }
  ],
  "cursor": "CgYI8OG8lQ8SE0tYTkVYVE5BVE9TRUNHRU4tOTk"
}
```

When the service answers with an error, the call fails with [`upstream_error`](/errors#upstream_error) and `pack_error.code` is one of:

| `pack_error.code` | Service status | Retryable | Message |
|---|---|---|---|
| `not_found` | 404 | no | Kalshi has no market, event or series with this ticker. |
| `rate_limited` | 429 | yes | Kalshi rate limit reached; retry shortly. |
| `invalid_request` | 400, 422 | no | built from the service's response |

get-series

**Get series.** One Kalshi series (a recurring market template such as daily Bitcoin range or every Fed decision): title, category, frequency, tags, fee type and the settlement sources the exchange uses to resolve it.

Ref `io.b3os/kalshi/get-series@1.0.0` · effect `read` · no connection · MCP tool `kalshi__get-series`

**curl**

```bash
    curl -s https://beta-api.b3os.org/v1/actions/call \
      -H "Authorization: Bearer $B3OS_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
          "ref": "io.b3os/kalshi/get-series@1",
          "input": {"series_ticker": "KXFEDDECISION"}
        }'
    ```
  **TypeScript**

```ts
    import { B3OS } from "@b3os/sdk";

    const b3os = new B3OS();
    const result = await b3os.actions.call({
      ref: "io.b3os/kalshi/get-series@1",
      input: { series_ticker: "KXFEDDECISION" },
    });
    console.log(result.output);
    ```
  **Python**

```python
    from b3os import B3OS

    b3os = B3OS()
    result = b3os.actions.call({
        "ref": "io.b3os/kalshi/get-series@1",
        "input": {"series_ticker": "KXFEDDECISION"},
    })
    print(result["output"])
    ```
  **MCP**

```json
    {
      "method": "tools/call",
      "params": {
        "name": "kalshi__get-series",
        "arguments": {"series_ticker": "KXFEDDECISION"}
      }
    }
    ```

    Expose the pack as tools with `--packs kalshi` on the local server or `?packs=kalshi` on the remote URL, and the agent calls `kalshi__get-series` with the action's input. The tool needs no connection. Without exposing the pack, `actions_call` takes the same input with `ref`.

Output, labeled `fixture`: Get series (response recorded 2026-10-26). From the bundle's `fixtures/get-series.json`, not a live call.

```json
{
  "ticker": "KXFEDDECISION",
  "title": "Fed meeting",
  "category": "Economics",
  "frequency": "custom",
  "tags": ["Fed"],
  "fee_type": "quadratic_with_maker_fees",
  "settlement_sources": [
    {
      "name": "Federal Reserve",
      "url": "https://www.federalreserve.gov"
    }
  ],
  "contract_url": "https://assets.kalshi.com/regulatory/product-certifications/FEDDECISION.pdf"
}
```

When the service answers with an error, the call fails with [`upstream_error`](/errors#upstream_error) and `pack_error.code` is one of:

| `pack_error.code` | Service status | Retryable | Message |
|---|---|---|---|
| `not_found` | 404 | no | Kalshi has no market, event or series with this ticker. |
| `rate_limited` | 429 | yes | Kalshi rate limit reached; retry shortly. |
| `invalid_request` | 400, 422 | no | built from the service's response |

get-orderbook

**Get order book.** The order book of one Kalshi market: resting Yes bids and No bids as price and contract count, best price last on each side. A No bid at price p is an offer to sell Yes at 1 - p, so the best Yes ask is 1 minus the best No bid. Limit levels per side with depth.

Ref `io.b3os/kalshi/get-orderbook@1.0.0` · effect `read` · no connection · MCP tool `kalshi__get-orderbook`

**curl**

```bash
    curl -s https://beta-api.b3os.org/v1/actions/call \
      -H "Authorization: Bearer $B3OS_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
          "ref": "io.b3os/kalshi/get-orderbook@1",
          "input": {"ticker": "KXFEDDECISION-26OCT-H0", "depth": 3}
        }'
    ```
  **TypeScript**

```ts
    import { B3OS } from "@b3os/sdk";

    const b3os = new B3OS();
    const result = await b3os.actions.call({
      ref: "io.b3os/kalshi/get-orderbook@1",
      input: { ticker: "KXFEDDECISION-26OCT-H0", depth: 3 },
    });
    console.log(result.output);
    ```
  **Python**

```python
    from b3os import B3OS

    b3os = B3OS()
    result = b3os.actions.call({
        "ref": "io.b3os/kalshi/get-orderbook@1",
        "input": {"ticker": "KXFEDDECISION-26OCT-H0", "depth": 3},
    })
    print(result["output"])
    ```
  **MCP**

```json
    {
      "method": "tools/call",
      "params": {
        "name": "kalshi__get-orderbook",
        "arguments": {"ticker": "KXFEDDECISION-26OCT-H0", "depth": 3}
      }
    }
    ```

    Expose the pack as tools with `--packs kalshi` on the local server or `?packs=kalshi` on the remote URL, and the agent calls `kalshi__get-orderbook` with the action's input. The tool needs no connection. Without exposing the pack, `actions_call` takes the same input with `ref`.

Output, labeled `fixture`: Get order book (response recorded 2026-10-26). From the bundle's `fixtures/get-orderbook.json`, not a live call.

```json
{
  "yes_dollars": [
    {"price_dollars": "0.9100", "count_fp": "5650.00"},
    {"price_dollars": "0.9200", "count_fp": "86213.58"},
    {"price_dollars": "0.9300", "count_fp": "147543.00"}
  ],
  "no_dollars": [
    {"price_dollars": "0.0400", "count_fp": "333974.86"},
    {"price_dollars": "0.0500", "count_fp": "955689.70"},
    {"price_dollars": "0.0600", "count_fp": "768013.58"}
  ],
  "yesLevels": 3,
  "noLevels": 3,
  "ticker": "KXFEDDECISION-26OCT-H0"
}
```

When the service answers with an error, the call fails with [`upstream_error`](/errors#upstream_error) and `pack_error.code` is one of:

| `pack_error.code` | Service status | Retryable | Message |
|---|---|---|---|
| `not_found` | 404 | no | Kalshi has no market, event or series with this ticker. |
| `rate_limited` | 429 | yes | Kalshi rate limit reached; retry shortly. |
| `invalid_request` | 400, 422 | no | built from the service's response |

get-candlesticks

**Kalshi Get Market Candlesticks.** Candlesticks for one Kalshi market between two Unix times: per period the Yes bid and ask OHLC, the trade price distribution (open, high, low, close, mean), volume and open interest, at 1-minute, 1-hour or 1-day periods. Needs the market's series ticker too.

Ref `io.b3os/kalshi/get-candlesticks@1.0.0` · effect `read` · no connection · MCP tool `kalshi__get-candlesticks`

**curl**

```bash
    curl -s https://beta-api.b3os.org/v1/actions/call \
      -H "Authorization: Bearer $B3OS_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
          "ref": "io.b3os/kalshi/get-candlesticks@1",
          "input": {
            "seriesTicker": "KXFEDDECISION",
            "ticker": "KXFEDDECISION-26OCT-H0",
            "startTs": 1792900000,
            "endTs": 1792990000,
            "periodInterval": 1440
          }
        }'
    ```
  **TypeScript**

```ts
    import { B3OS } from "@b3os/sdk";

    const b3os = new B3OS();
    const result = await b3os.actions.call({
      ref: "io.b3os/kalshi/get-candlesticks@1",
      input: {
        seriesTicker: "KXFEDDECISION",
        ticker: "KXFEDDECISION-26OCT-H0",
        startTs: 1792900000,
        endTs: 1792990000,
        periodInterval: 1440,
      },
    });
    console.log(result.output);
    ```
  **Python**

```python
    from b3os import B3OS

    b3os = B3OS()
    result = b3os.actions.call({
        "ref": "io.b3os/kalshi/get-candlesticks@1",
        "input": {
            "seriesTicker": "KXFEDDECISION",
            "ticker": "KXFEDDECISION-26OCT-H0",
            "startTs": 1792900000,
            "endTs": 1792990000,
            "periodInterval": 1440,
        },
    })
    print(result["output"])
    ```
  **MCP**

```json
    {
      "method": "tools/call",
      "params": {
        "name": "kalshi__get-candlesticks",
        "arguments": {
          "seriesTicker": "KXFEDDECISION",
          "ticker": "KXFEDDECISION-26OCT-H0",
          "startTs": 1792900000,
          "endTs": 1792990000,
          "periodInterval": 1440
        }
      }
    }
    ```

    Expose the pack as tools with `--packs kalshi` on the local server or `?packs=kalshi` on the remote URL, and the agent calls `kalshi__get-candlesticks` with the action's input. The tool needs no connection. Without exposing the pack, `actions_call` takes the same input with `ref`.

Output, labeled `fixture`: Kalshi Get Market Candlesticks (response recorded 2026-10-26). From the bundle's `fixtures/get-candlesticks.json`, not a live call.

```json
{
  "candlesticks": [
    {
      "end_period_ts": 1792900800,
      "yes_bid": {
        "open_dollars": "0.9200",
        "low_dollars": "0.9200",
        "high_dollars": "0.9200",
        "close_dollars": "0.9200"
      },
      "yes_ask": {
        "open_dollars": "0.9300",
        "low_dollars": "0.9300",
        "high_dollars": "0.9300",
        "close_dollars": "0.9300"
      },
      "price": {
        "open_dollars": "0.9200",
        "low_dollars": "0.9200",
        "high_dollars": "0.9300",
        "close_dollars": "0.9300",
        "mean_dollars": "0.9291",
        "previous_dollars": "0.9300"
      },
      "volume_fp": "217799.63",
      "open_interest_fp": "2946144.56"
    },
    {
      "end_period_ts": 1792987200,
      "yes_bid": {
        "open_dollars": "0.9200",
        "low_dollars": "0.9200",
        "high_dollars": "0.9300",
        "close_dollars": "0.9300"
      },
      "yes_ask": {
        "open_dollars": "0.9300",
        "low_dollars": "0.9300",
        "high_dollars": "0.9400",
        "close_dollars": "0.9400"
```

The first 40 of 57 lines; the fixture file has the rest.

When the service answers with an error, the call fails with [`upstream_error`](/errors#upstream_error) and `pack_error.code` is one of:

| `pack_error.code` | Service status | Retryable | Message |
|---|---|---|---|
| `not_found` | 404 | no | Kalshi has no market, event or series with this ticker. |
| `rate_limited` | 429 | yes | Kalshi rate limit reached; retry shortly. |
| `invalid_request` | 400, 422 | no | built from the service's response |

get-trades

**Kalshi Get Trades.** Recent Kalshi trades, newest first, across all markets or for one ticker: trade id, contract count, Yes and No prices, taker side and time. Filter by a Unix time window and page with the cursor.

Ref `io.b3os/kalshi/get-trades@1.0.0` · effect `read` · no connection · MCP tool `kalshi__get-trades`

**curl**

```bash
    curl -s https://beta-api.b3os.org/v1/actions/call \
      -H "Authorization: Bearer $B3OS_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{"ref": "io.b3os/kalshi/get-trades@1", "input": {"limit": 2}}'
    ```
  **TypeScript**

```ts
    import { B3OS } from "@b3os/sdk";

    const b3os = new B3OS();
    const result = await b3os.actions.call({ ref: "io.b3os/kalshi/get-trades@1", input: { limit: 2 } });
    console.log(result.output);
    ```
  **Python**

```python
    from b3os import B3OS

    b3os = B3OS()
    result = b3os.actions.call({"ref": "io.b3os/kalshi/get-trades@1", "input": {"limit": 2}})
    print(result["output"])
    ```
  **MCP**

```json
    {
      "method": "tools/call",
      "params": {"name": "kalshi__get-trades", "arguments": {"limit": 2}}
    }
    ```

    Expose the pack as tools with `--packs kalshi` on the local server or `?packs=kalshi` on the remote URL, and the agent calls `kalshi__get-trades` with the action's input. The tool needs no connection. Without exposing the pack, `actions_call` takes the same input with `ref`.

Output, labeled `fixture`: Kalshi Get Trades (response recorded 2026-10-26). From the bundle's `fixtures/get-trades.json`, not a live call.

```json
{
  "trades": [
    {
      "trade_id": "0724abbc-65f1-adeb-a074-4f2dcd6ab576",
      "ticker": "KXBTC15M-26OCT260345-45",
      "count_fp": "4.18",
      "yes_price_dollars": "0.2700",
      "no_price_dollars": "0.7300",
      "taker_side": "no",
      "created_time": "2026-10-26T07:39:36.976527Z"
    },
    {
      "trade_id": "0724abbc-4b11-a828-f908-4e6a587585f5",
      "ticker": "KXITFMATCH-26OCT26NAKFUX-NAK",
      "count_fp": "30.00",
      "yes_price_dollars": "0.9300",
      "no_price_dollars": "0.0700",
      "taker_side": "yes",
      "created_time": "2026-10-26T07:39:36.962304Z"
    }
  ],
  "cursor": "EhIKEAckq7xLEago-QhOalh1hfUaDAi4h_zWBhCAsO7KAw",
  "count": 2
}
```

When the service answers with an error, the call fails with [`upstream_error`](/errors#upstream_error) and `pack_error.code` is one of:

| `pack_error.code` | Service status | Retryable | Message |
|---|---|---|---|
| `not_found` | 404 | no | Kalshi has no market, event or series with this ticker. |
| `rate_limited` | 429 | yes | Kalshi rate limit reached; retry shortly. |
| `invalid_request` | 400, 422 | no | built from the service's response |