Skip to content

feat: batch 6 API updates - balance subaccount, historical endpoints, deprecations#29

Merged
pbeets merged 2 commits intomainfrom
feat/batch6-api-updates
Feb 23, 2026
Merged

feat: batch 6 API updates - balance subaccount, historical endpoints, deprecations#29
pbeets merged 2 commits intomainfrom
feat/batch6-api-updates

Conversation

@pbeets
Copy link
Owner

@pbeets pbeets commented Feb 23, 2026

Summary

  • Deprecate Market.liquidity and Market.liquidity_dollars fields (always return 0 per Kalshi API changelog Feb 13)
  • Add GetBalanceParams with subaccount filter for GET /portfolio/balance — omitting returns combined balance, subaccount(0) filters to primary only
  • Add settlement_value field on MarketLifecycleData in WebSocket market_lifecycle_v2 channel for market_determined events
  • Add 6 historical data endpoints: cutoff, markets, market by ticker, candlesticks, fills, orders
  • Add dedicated HistoricalCandlesticksResponse with dollar-string-only OHLC types (HistoricalCandlestick, HistoricalOhlc, HistoricalPriceOhlc) — the historical candlestick API uses a different wire schema than live candlesticks (dollar strings only, no cent integers)
  • Add yes_settlement_value_dollars to MveSelectedLeg

All types cross-referenced against the official Kalshi API docs and kalshi_python_async v3.7.0 SDK.

Test plan

  • cargo build passes
  • cargo test — all 195 tests pass
  • cargo fmt — no changes needed
  • cargo clippy --all-targets — zero warnings
  • New deserialization tests for HistoricalCandlesticksResponse (including nullable price fields)
  • Manual verification against live historical API once endpoints are active

…nts, deprecations

Add batch 6 changes from the Kalshi API changelog (Feb 13-19, 2026):

- Deprecate `Market.liquidity` and `Market.liquidity_dollars` (always return 0)
- Add `GetBalanceParams` with `subaccount` filter for `GET /portfolio/balance`
- Add `settlement_value` to `MarketLifecycleData` for WebSocket determined events
- Add 6 historical data endpoints with dedicated response types
- Add `HistoricalCandlesticksResponse` with dollar-string-only OHLC types
  (historical candlesticks use a different schema than live candlesticks)
- Add `yes_settlement_value_dollars` to `MveSelectedLeg`
@pbeets pbeets merged commit fdd057d into main Feb 23, 2026
5 checks passed
@pbeets pbeets deleted the feat/batch6-api-updates branch February 23, 2026 07:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant