Skip to content

feat(trade): add estimate_multileg_available_quantity (POST /v1/trade/estimate/multileg) - #603

Open
hogan-yuan wants to merge 6 commits into
mainfrom
feat/estimate-multileg
Open

hogan-yuan wants to merge 6 commits into
mainfrom
feat/estimate-multileg

Conversation

@hogan-yuan

Copy link
Copy Markdown
Member

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), optional submitted_price.

RESTful note

The single-leg estimate_max_purchase_quantity is a GET with scalar query params. This one carries a legs array — which cannot be encoded in a query string — so it is a POST with 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.pyi regenerated/updated. Go is a separate PR; CLI/MCP are follow-ups.

…/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 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