Skip to content

feat: batch API updates — subaccounts, _fp fields, model enrichments#27

Merged
pbeets merged 4 commits intomainfrom
feat/batch1-api-updates
Feb 21, 2026
Merged

feat: batch API updates — subaccounts, _fp fields, model enrichments#27
pbeets merged 4 commits intomainfrom
feat/batch1-api-updates

Conversation

@pbeets
Copy link
Owner

@pbeets pbeets commented Feb 21, 2026

Summary

  • Subaccount support across order operations (cancel, amend, decrease, create), order group operations (delete, reset, trigger, limit), RFQs, and quotes. Adds _for_subaccount() convenience methods and per-order subaccount in batch cancels (BatchCancelOrderItem).
  • Fixed-point _fp fields on REST types (CreateOrderRequest, AmendOrderRequest, DecreaseOrderRequest, QueuePosition, RFQ/Quote, order groups) and WebSocket message types (OrderbookDeltaData, TickerData, TradeData, FillData, MarketPositionData).
  • Model enrichments: Market (integer cent prices, Settled/Scalar variants, metadata fields, min_updated_ts filter), Series (category, tags, settlement sources, fee fields), Event/Milestone/StructuredTarget (status), Fill (fee_cost), MarketPosition (market_result, total_cost), MultivariateEventCollection (events, selected-market support), and more.
  • RFQ/Quote updates: target_cost_dollars replaces deprecated target_cost_centi_cents, side/expires_in_seconds on requests, partial acceptance via contracts field.
  • Breaking changes: AmendOrderRequest::new() signature simplified (client order IDs now optional), BatchCancelOrdersRequest::ids now Option, Rfq::target_cost_dollars()target_cost_as_dollars(), multivariate variables fields now Option<HashMap>.
  • Docs: CHANGELOG updated with all additions/changes/deprecations. WS README updated for order_group_updates auth channel and relaxed ticker requirements.

Test plan

  • cargo build compiles without errors
  • cargo test passes all unit tests
  • Verify CHANGELOG accurately reflects all breaking changes
  • Verify WS README Important Notes section is accurate

… docs

Add subaccount support across orders, order groups, RFQs, and batch
cancels. Add fixed-point _fp fields to REST and WS types. Enrich Market,
Series, Event, Multivariate, and other models with new API fields.
Update CHANGELOG and WS README to reflect all changes.
Add Rust deprecation attributes so users get compiler warnings when
using items the Kalshi API has deprecated:

- OrderType::Market variant (market orders no longer supported)
- Rfq::target_cost_as_dollars() / Quote::rfq_target_cost_as_dollars()
- BatchCancelOrdersRequest::new() / try_new() (legacy ids format)
- Updated field docs for liquidity, liquidity_dollars, order_type
Revert incorrect deprecations (liquidity fields, OrderType::Market,
order_type field doc) that don't match the official Python SDK.

Add/improve deprecation doc comments to match Python SDK:
- Order.queue_position: always returns 0, use queue_position endpoint
- Fill.trade_id, market_ticker, ts: legacy field names
- Fill.price, Trade.price: use yes_price/no_price instead
- Event.category: use series-level category instead
- MarketPosition.resting_orders_count: deprecated
- batch_orders: use BatchCancelOrdersRequest::with_orders() instead of
  deprecated new()
- rfq_verify: use target_cost_dollars field instead of deprecated
  target_cost_as_dollars() method
- Expand changelog Deprecated section to cover all items aligned with
  kalshi_python_async v3.2.0
@pbeets pbeets merged commit b5a8f72 into main Feb 21, 2026
5 checks passed
@pbeets pbeets deleted the feat/batch1-api-updates branch February 21, 2026 18:09
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