Maton

Kalshi

Access the Kalshi trading API with managed authentication. Read markets, events, series, order books, and your portfolio, and place, amend, or cancel orders.

Permissions

Suggested read access

In the Console, Read limits the connection to these 86 read-only endpoints, plus deny rules for any write endpoint a broader rule would otherwise match. Endpoints Maton has found to return credentials, start jobs, or spend credits are left out; a few reads that can change state or return a secret depending on their parameters stay in, and their descriptions say how. It is a suggestion: the saved rules are exactly the ones you see, and you can change them with Custom. See Access policy.

Reference

Portfolio API

Get Balance

maton api '/kalshi/trade-api/v2/portfolio/balance'

Response:

{
  "balance": 10000,
  "balance_dollars": "100.0000",
  "portfolio_value": 2500,
  "balance_breakdown": [...],
  "updated_ts": 1764000000
}

balance and portfolio_value are in cents. Pass subaccount to read a subaccount instead of the primary account.

List Positions

maton api '/kalshi/trade-api/v2/portfolio/positions?limit=5'

Query parameters:

  • limit (integer, optional): Results per page (default 100)
  • cursor (string, optional): Cursor from the previous page
  • count_filter (string, optional): Return only positions with a non-zero value in these fields, e.g. position
  • ticker (string, optional): One market ticker
  • event_ticker (string, optional): One event ticker
  • subaccount (integer, optional): Subaccount number (0 is the primary account)

Response:

{
  "market_positions": [...],
  "event_positions": [...],
  "cursor": ""
}

Unsettled positions are returned by default, including closed markets still awaiting settlement.

List Orders

maton api '/kalshi/trade-api/v2/portfolio/orders?status=resting&limit=5'

Query parameters:

  • status (string, optional): resting, canceled, or executed
  • ticker (string, optional): Market ticker
  • event_ticker (string, optional): Event ticker
  • min_ts / max_ts (integer, optional): Unix timestamp bounds
  • limit (integer, optional): Results per page (default 100)
  • cursor (string, optional): Cursor from the previous page
  • subaccount (integer, optional): Subaccount number

Response:

{
  "orders": [...],
  "cursor": ""
}

Get Order

maton api '/kalshi/trade-api/v2/portfolio/orders/{order_id}'

Order reads update asynchronously after a write, so an order created, amended, or canceled moments ago can briefly return 404 or its previous state.

List Fills

maton api '/kalshi/trade-api/v2/portfolio/fills?limit=5'

Query parameters:

  • ticker (string, optional): Market ticker
  • order_id (string, optional): One order's fills
  • min_ts / max_ts (integer, optional): Unix timestamp bounds
  • limit, cursor, subaccount: As above

Response:

{
  "fills": [...],
  "cursor": ""
}

List Settlements

maton api '/kalshi/trade-api/v2/portfolio/settlements?limit=5'

Accepts ticker, event_ticker, min_ts, max_ts, limit, cursor, and subaccount. Returns {"settlements": [...], "cursor": ""}.

Markets API

List Markets

maton api '/kalshi/trade-api/v2/markets?limit=5&status=open&mve_filter=exclude'

Query parameters:

  • status (string, optional): unopened, open, closed, or settled (one at a time). Open markets come back with "status": "active".
  • event_ticker (string, optional): One event ticker
  • series_ticker (string, optional): Series ticker
  • tickers (string, optional): Comma-separated market tickers
  • mve_filter (string, optional): exclude drops multivariate (combo) markets, which otherwise fill the first pages
  • min_close_ts / max_close_ts (integer, optional): Close-time bounds (Unix seconds)
  • limit (integer, optional): Results per page (default 100, max 1000)
  • cursor (string, optional): Cursor from the previous page

Response:

{
  "markets": [
    {
      "ticker": "KXELONMARS-99",
      "event_ticker": "KXELONMARS-99",
      "title": "...",
      "status": "active",
      "yes_bid_dollars": "0.1000",
      "yes_ask_dollars": "0.1100",
      "last_price_dollars": "0.1000",
      "volume_fp": "...",
      "close_time": "..."
    }
  ],
  "cursor": "..."
}

Get Market

maton api '/kalshi/trade-api/v2/markets/{ticker}'
Example
maton api '/kalshi/trade-api/v2/markets/KXELONMARS-99'

Returns {"market": {...}} with prices, volume, open interest, rules_primary, rules_secondary, and price_level_structure (the valid price increments).

Get Market Orderbook

maton api '/kalshi/trade-api/v2/markets/{ticker}/orderbook?depth=5'

Response:

{
  "orderbook_fp": {
    "yes_dollars": [["0.0800", "1386.83"], ["0.0900", "1519.70"], ["0.1000", "1344.47"]],
    "no_dollars": [["0.8500", "10.00"], ["0.8600", "10.00"], ["0.8700", "1488.86"]]
  }
}

Each level is [price, contracts], sorted by ascending price, so the best bid is the last entry. Only bids are returned: a YES bid at X is a NO ask at 1 − X. depth limits the levels per side.

List Trades

maton api '/kalshi/trade-api/v2/markets/trades?ticker={ticker}&limit=5'

Public trade prints for all markets or one ticker, with min_ts, max_ts, limit, and cursor. Returns {"trades": [...], "cursor": "..."}.

Events API

List Events

maton api '/kalshi/trade-api/v2/events?limit=5&status=open&with_nested_markets=true'

Query parameters:

  • status (string, optional): unopened, open, closed, or settled
  • series_ticker (string, optional): Series ticker
  • with_nested_markets (boolean, optional): Include each event's markets
  • min_close_ts (integer, optional): Events with a market closing after this time
  • limit (integer, optional): Results per page (default 200, max 200)
  • cursor (string, optional): Cursor from the previous page

Returns {"events": [...], "cursor": "...", "milestones": [...]}. Multivariate (combo) events are excluded.

Get Event

maton api '/kalshi/trade-api/v2/events/{event_ticker}'
Example
maton api '/kalshi/trade-api/v2/events/KXELONMARS-99'

Returns {"event": {...}, "markets": [...]}.

Series API

List Series

maton api '/kalshi/trade-api/v2/series?category=Economics'

Filters: category, tags, include_volume. A series is the template for recurring events (for example a monthly jobs report). Returns {"series": [...]}; a category can hold several hundred series.

Get Series

maton api '/kalshi/trade-api/v2/series/{series_ticker}'
Example
maton api '/kalshi/trade-api/v2/series/KXELONMARS'

Returns {"series": {...}} with the title, frequency, fee type, settlement sources, and contract terms URL.

Get Tags by Category

maton api '/kalshi/trade-api/v2/search/tags_by_categories'

Exchange API

Get Exchange Status

maton api '/kalshi/trade-api/v2/exchange/status'

Response:

{
  "exchange_active": true,
  "trading_active": true,
  "intra_exchange_transfers_active": true,
  "exchange_index_statuses": [...]
}

Check trading_active before proposing an order: orders are rejected while trading is paused.

Get Exchange Schedule

maton api '/kalshi/trade-api/v2/exchange/schedule'

Returns {"schedule": {"standard_hours": [...], "maintenance_windows": [...]}}.

Account API

Get API Limits

maton api '/kalshi/trade-api/v2/account/limits'

Response:

{
  "usage_tier": "basic",
  "read": {"bucket_capacity": 600, "refill_rate": 200},
  "write": {"bucket_capacity": 100, "refill_rate": 100},
  "grants": []
}

List Non-Default Endpoint Costs

maton api '/kalshi/trade-api/v2/account/endpoint_costs'

Orders API

Order writes use the V2 endpoints under /portfolio/events/orders. The legacy write endpoints under /portfolio/orders (create, cancel, amend, decrease, and their batch forms) now return 410 Gone; GET /portfolio/orders is still the way to read orders. Prices are fixed-point dollar strings ("0.5600") and counts are fixed-point contract strings ("10.00"). side is quoted from the YES book: bid buys YES, ask sells YES (economically, buying NO at 1 − price).

Create Order

maton api -X POST '/kalshi/trade-api/v2/portfolio/events/orders' -H 'Content-Type: application/json' --input - <<'JSON'
{
  "ticker": "{ticker}",
  "client_order_id": "{new-uuid}",
  "side": "bid",
  "count": "10",
  "price": "0.56",
  "time_in_force": "good_till_canceled",
  "self_trade_prevention_type": "taker_at_cross"
}
JSON

Body fields:

  • ticker (string, required): Market ticker
  • side (string, required): bid (buy YES) or ask (sell YES)
  • count (string, required): Contracts, up to 2 decimals
  • price (string, required): Limit price in dollars, within the market's price_level_structure
  • time_in_force (string, required): good_till_canceled, immediate_or_cancel, or fill_or_kill
  • self_trade_prevention_type (string, required): taker_at_cross or maker
  • client_order_id (string, optional): Up to 64 characters; unique while the order is open. Always send a new one.
  • expiration_time (integer, optional): Unix seconds; use with good_till_canceled
  • post_only, reduce_only, cancel_order_on_pause (boolean, optional)
  • subaccount (integer, optional): 0 is the primary account

Response (201):

{
  "order_id": "3b23c1c7-f4ef-4f0d-8b9a-9e53c61f1a0d",
  "client_order_id": "8c35ecb3-328f-4f52-8c7c-0f4b9862f8d1",
  "fill_count": "0.00",
  "remaining_count": "10.00",
  "ts_ms": 1715793600123
}

201 means the order was accepted, not that it is resting: read fill_count and remaining_count. A reused client_order_id returns 409 order_already_exists; look the order up instead of resubmitting.

Amend Order

maton api -X POST '/kalshi/trade-api/v2/portfolio/events/orders/{order_id}/amend' -H 'Content-Type: application/json' --input - <<'JSON'
{
  "ticker": "{ticker}",
  "side": "bid",
  "price": "0.57",
  "count": "8"
}
JSON

count is the new total fillable count: contracts already filled plus the desired resting remainder. An amend that changes nothing returns 400 AMEND_ORDER_NO_OP.

Decrease Order

maton api -X POST '/kalshi/trade-api/v2/portfolio/events/orders/{order_id}/decrease' -H 'Content-Type: application/json' --input - <<'JSON'
{
  "reduce_by": "2"
}
JSON

Send exactly one of reduce_by or reduce_to.

Cancel Order

maton api -X DELETE '/kalshi/trade-api/v2/portfolio/events/orders/{order_id}?market_ticker={ticker}'

Returns {order_id, client_order_id, reduced_by}.

Batch Create Orders

maton api -X POST '/kalshi/trade-api/v2/portfolio/events/orders/batched' -H 'Content-Type: application/json' --input - <<'JSON'
{
  "orders": [
    {
      "ticker": "{ticker}",
      "client_order_id": "{new-uuid-1}",
      "side": "bid",
      "count": "10",
      "price": "0.56",
      "time_in_force": "good_till_canceled",
      "self_trade_prevention_type": "taker_at_cross"
    },
    {
      "ticker": "{ticker}",
      "client_order_id": "{new-uuid-2}",
      "side": "ask",
      "count": "5",
      "price": "0.58",
      "time_in_force": "good_till_canceled",
      "self_trade_prevention_type": "taker_at_cross"
    }
  ]
}
JSON

Not atomic: orders are processed one at a time, and an entry that failed carries an error object in place of order_id. An entry error with a timeout or unavailable code does not prove the order was not placed. The maximum batch size scales with the account's write budget.

Batch Cancel Orders

maton api -X DELETE '/kalshi/trade-api/v2/portfolio/events/orders/batched' -H 'Content-Type: application/json' --input - <<'JSON'
{
  "orders": [
    {"order_id": "{order_id_1}"},
    {"order_id": "{order_id_2}"}
  ]
}
JSON

Cancel All Orders

maton api -X DELETE '/kalshi/trade-api/v2/portfolio/events/orders'

Cancels every resting order on the account across all exchange shards, and orders placed during the following minute may also be canceled. Add ?subaccount={n} to limit it to one subaccount. Returns 204.

Pagination

List endpoints use cursor pagination. Pass the response's cursor as cursor on the next request; an empty cursor means the last page.

maton api '/kalshi/trade-api/v2/markets?limit=100&status=open&cursor={cursor}'

Notes

  • Market tickers look like KXELONMARS-99; an event ticker groups markets and a series ticker groups recurring events.
  • Prices are fixed-point dollar strings (*_dollars) and counts fixed-point strings (*_fp); balance and portfolio value are integers in cents.
  • Orders, fills, and settlements that closed before the historical cutoff are only under /historical/... (see GET /historical/cutoff).
  • API keys can be scoped. A key without read cannot list orders, fills, or positions; a key without write::trade gets 403 with a code naming the missing scope on order writes. Keys of data-only accounts are read-only.
  • Writes are read back asynchronously: allow a moment before expecting a new order in GET /portfolio/orders.

Resources

On this page