Skip to content

fix: normalize zero-padded HK symbols in the grid and multi-leg builders - #636

Open
hogan-yuan wants to merge 2 commits into
mainfrom
fix/normalize-hk-symbol-grid-multileg
Open

hogan-yuan wants to merge 2 commits into
mainfrom
fix/normalize-hk-symbol-grid-multileg

Conversation

@hogan-yuan

Copy link
Copy Markdown
Member

Follow-up to #627, which canonicalizes 00700.HK → 700.HK in the trade and asset builders because the gateway answers a padded HK symbol with an empty result instead of an error. Four builders were missed and still send the padded form unchanged:

  • SubmitGridOrderOptions::new
  • GetGridOrdersOptions::symbol
  • GridContext::symbol_info
  • SubmitMultiLegOrderLeg::new

They now go through the same normalize_symbol_owned. Other markets are sent verbatim, as before.

I have not measured the grid endpoints' behaviour with a padded symbol; this is for consistency with the rest of the trade surface, so 00700.HK behaves the same everywhere.

Tests

grid::context::symbol_normalization_tests and submit_multileg_normalizes_leg_symbols.

🤖 Generated with Claude Code

5.5.0 canonicalized 00700.HK -> 700.HK in the trade and asset builders but missed SubmitGridOrderOptions, GetGridOrdersOptions.symbol, GridContext.symbol_info and SubmitMultiLegOrderLeg. Route them through normalize_symbol_owned as well.

This branch has not been deployed

No deployments
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