Skip to content

feat: batch 1-3 API updates — spec alignment, fee_cost, subaccounts, _fp fields#28

Merged
pbeets merged 1 commit intomainfrom
feat/batch1-api-updates
Feb 22, 2026
Merged

feat: batch 1-3 API updates — spec alignment, fee_cost, subaccounts, _fp fields#28
pbeets merged 1 commit intomainfrom
feat/batch1-api-updates

Conversation

@pbeets
Copy link
Owner

@pbeets pbeets commented Feb 22, 2026

Summary

  • Implements Kalshi API changelog items from Jan 22 – Jan 29, 2026 (batches 1-3)
  • Aligns model field types with the official Kalshi API spec — promotes count_fp, yes_price_fixed/no_price_fixed/yes_price_dollars/no_price_dollars, and fee_cost from Option<String> to String where the spec marks them required
  • Adds fee_cost (exchange fee as fixed-point dollar string) to Fill, Settlement, and WebSocket FillData
  • Adds subaccount filter to GetSettlementsParams and GetFillsParams
  • Updates SubaccountBalance to use String balance (fixed-point dollars) and required updated_ts, matching current API
  • Adds order group trigger/limit endpoints, account API limits endpoint, and OrderGroupUpdates WebSocket channel
  • Adds #[deprecated] attributes to Kalshi-deprecated items (legacy fields, old methods)
  • Adds _fp fixed-point fields across REST and WebSocket response types
  • Updates examples to use fixed-point dollar fields and display fee_cost

Breaking changes

  • SubaccountBalance::balance: i64String; updated_ts: Option<i64>i64; balance_dollars() removed
  • Fill::count_fp, Fill::yes_price_fixed, Fill::no_price_fixed, Fill::fee_cost: Option<String>String
  • Fill::created_time: StringOption<String>
  • Settlement::yes_count_fp, Settlement::no_count_fp, Settlement::fee_cost: Option<String>String
  • Trade::count_fp, Trade::yes_price_dollars, Trade::no_price_dollars: Option<String>String
  • See CHANGELOG.md ### Changed section for full list

Test plan

  • cargo test --lib — 186 tests pass
  • cargo check --examples — all examples compile
  • cargo doc --no-deps — docs generate cleanly
  • Manual verification against live Kalshi API responses

…baccount fields

Promote fields from Option<String> to String where the official API spec
marks them as required: Fill (count_fp, yes_price_fixed, no_price_fixed,
fee_cost), Settlement (yes_count_fp, no_count_fp, fee_cost), and Trade
(count_fp, yes_price_dollars, no_price_dollars). Fill::created_time
changed to Option<String> (optional per spec).

Update SubaccountBalance to use String balance (fixed-point dollars)
and required updated_ts, matching the current API. Add subaccount
filter to GetSettlementsParams and fee_cost to WS FillData.

Update examples to use fixed-point dollar fields and display fee_cost.
@pbeets pbeets merged commit f16e9af into main Feb 22, 2026
5 checks passed
@pbeets pbeets deleted the feat/batch1-api-updates branch February 22, 2026 03:43
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