feat: batch API updates — subaccounts, _fp fields, model enrichments#27
Merged
feat: batch API updates — subaccounts, _fp fields, model enrichments#27
Conversation
… 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
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)._fpfields on REST types (CreateOrderRequest,AmendOrderRequest,DecreaseOrderRequest,QueuePosition, RFQ/Quote, order groups) and WebSocket message types (OrderbookDeltaData,TickerData,TradeData,FillData,MarketPositionData).Market(integer cent prices,Settled/Scalarvariants, metadata fields,min_updated_tsfilter),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.target_cost_dollarsreplaces deprecatedtarget_cost_centi_cents,side/expires_in_secondson requests, partial acceptance viacontractsfield.AmendOrderRequest::new()signature simplified (client order IDs now optional),BatchCancelOrdersRequest::idsnowOption,Rfq::target_cost_dollars()→target_cost_as_dollars(), multivariatevariablesfields nowOption<HashMap>.order_group_updatesauth channel and relaxed ticker requirements.Test plan
cargo buildcompiles without errorscargo testpasses all unit tests