Skip to content

fix(orders): preserve unknown execution liquidity codes - #760

Open
faysou wants to merge 1 commit into
wboayue:mainfrom
faysou:fix/unknown-execution-liquidity
Open

fix(orders): preserve unknown execution liquidity codes#760
faysou wants to merge 1 commit into
wboayue:mainfrom
faysou:fix/unknown-execution-liquidity

Conversation

@faysou

@faysou faysou commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Summary

Map the documented execution liquidity codes as before, including wire code zero as Liquidity::None. Preserve every other value as Liquidity::Unknown(i32) so callers can log, store, or reject an unsupported code without silently treating it as missing data.

flowchart LR
    Wire[Execution liquidity code] --> Known{Code 0 to 3?}
    Known -- Yes --> Variant[Known Liquidity variant]
    Known -- No --> Unknown[Liquidity::Unknown with original code]
Loading

The conversion remains infallible while retaining the wire value for forward compatibility.

Testing

  • cargo test -p ibapi --features sync.
  • Unit coverage for zero, positive unknown, and negative unknown codes.

- Preserve unsupported wire codes as Liquidity::Unknown
- Keep wire code zero mapped to Liquidity::None
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