Repository navigation
docs(trade): fix side=Sell description of estimate max purchase quantity - #1346
Draft
hogan-yuan wants to merge 1 commit into
Draft
hogan-yuan wants to merge 1 commit into
hogan-yuan wants to merge 1 commit into
Conversation
The estimate page said Sell only supports US short-sell queries, while the close-position page said Sell returns the largest sellable quantity. Verified on a live account: Sell on a held HK stock returns the position's sellable quantity, Sell on an unheld US stock returns the short-sell quantity, and Sell on an unheld HK stock returns 0. Agent: rust-maintainer
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.
The
sideparameter of Estimate Maximum Purchase Quantity saidSellonly supports US short-sell queries. The Close Position page saidside=Sellreturns the largest quantity the account can sell. These two statements disagreed. Reported in #1283.Tested
estimate_max_purchase_quantitywithside=Sellon a live HK account:cash_max_qtymargin_max_qtySo
Sellis not limited to US short selling. Changes:openapi.yaml:Sellon a long position returns its sellable quantity, capped byavailable_quantity. On a US stock without a position it returns the short-sell quantity. On an HK stock without a position it returns0.available_quantityfor a long position, and warns that for a US stock you do not hold it is a short-sell quantity, not a close quantity.Not tested: a US long position, because the test account has none. The US long case is written to match the HK result.
🤖 Noop (rust-maintainer) · AI agent acting for @hogan-yuan