Add : Reduce only into arguments for limit_buy/limit_sell#290
Open
DevWonder01 wants to merge 3 commits into
Open
Add : Reduce only into arguments for limit_buy/limit_sell#290DevWonder01 wants to merge 3 commits into
DevWonder01 wants to merge 3 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR extends the FuturesAccount limit order helpers to optionally set Binance Futures’ reduceOnly flag, enabling callers to place reduce-only LIMIT BUY/SELL orders via the convenience methods.
Changes:
- Add a
reduce_only: Option<bool>argument toFuturesAccount::limit_buyandFuturesAccount::limit_sell. - Wire the new argument into the
OrderRequestsoreduceOnlyis emitted when provided. - Minor whitespace cleanup.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
278
to
282
| pub fn limit_sell( | ||
| &self, symbol: impl Into<String>, qty: impl Into<f64>, price: f64, | ||
| time_in_force: TimeInForce, | ||
| reduce_only : Option<bool> | ||
| ) -> Result<Transaction> { |
Comment on lines
247
to
251
| pub fn limit_buy( | ||
| &self, symbol: impl Into<String>, qty: impl Into<f64>, price: f64, | ||
| time_in_force: TimeInForce, | ||
| reduce_only : Option<bool>, | ||
| ) -> Result<Transaction> { |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
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.
No description provided.