Repository navigation
feat(trade): add estimate_multileg_available_quantity (POST /v1/trade/estimate/multileg) - #603
Open
hogan-yuan wants to merge 6 commits into
Open
hogan-yuan wants to merge 6 commits into
hogan-yuan wants to merge 6 commits into
Conversation
…/estimate/multileg) Pre-trade estimate for a US multi-leg option combination: max tradable quantity and margin impact. Because the request carries a legs array it is a POST with a JSON body (RESTful), unlike the scalar single-leg estimate which is GET+query. Rust core async + blocking.
This was referenced Oct 9, 2026
This branch has not been deployed
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
New
TradeContext.estimate_multileg_available_quantity— a pre-trade estimate of a US multi-leg option combination's maximum tradable quantity and margin impact (max_open_qty,unit_margin,initial_margin_change,maintenance_margin_change).Request:
side,order_type,submitted_quantity,strategy(MultiLegStrategy),legs(each symbol + a reserved side), optionalsubmitted_price.RESTful note
The single-leg
estimate_max_purchase_quantityis aGETwith scalar query params. This one carries alegsarray — which cannot be encoded in a query string — so it is aPOSTwith a JSON body, consistent with the multi-leg submit endpoint (POST /v1/trade/order/multileg).Layers
Rust core (async + blocking) + C, C++, Java, Node.js, Python. Each builds;
longbridge.h,index.d.ts,openapi.pyiregenerated/updated. Go is a separate PR; CLI/MCP are follow-ups.