feat: batch 1-3 API updates — spec alignment, fee_cost, subaccounts, _fp fields#28
Merged
feat: batch 1-3 API updates — spec alignment, fee_cost, subaccounts, _fp fields#28
Conversation
…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.
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
count_fp,yes_price_fixed/no_price_fixed/yes_price_dollars/no_price_dollars, andfee_costfromOption<String>toStringwhere the spec marks them requiredfee_cost(exchange fee as fixed-point dollar string) toFill,Settlement, and WebSocketFillDatasubaccountfilter toGetSettlementsParamsandGetFillsParamsSubaccountBalanceto useStringbalance (fixed-point dollars) and requiredupdated_ts, matching current APIOrderGroupUpdatesWebSocket channel#[deprecated]attributes to Kalshi-deprecated items (legacy fields, old methods)_fpfixed-point fields across REST and WebSocket response typesfee_costBreaking changes
SubaccountBalance::balance:i64→String;updated_ts:Option<i64>→i64;balance_dollars()removedFill::count_fp,Fill::yes_price_fixed,Fill::no_price_fixed,Fill::fee_cost:Option<String>→StringFill::created_time:String→Option<String>Settlement::yes_count_fp,Settlement::no_count_fp,Settlement::fee_cost:Option<String>→StringTrade::count_fp,Trade::yes_price_dollars,Trade::no_price_dollars:Option<String>→String### Changedsection for full listTest plan
cargo test --lib— 186 tests passcargo check --examples— all examples compilecargo doc --no-deps— docs generate cleanly