-
-
Notifications
You must be signed in to change notification settings - Fork 436
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add PriceMatch parameter to order editing #1440
base: master
Are you sure you want to change the base?
Conversation
}; | ||
parameters.AddOptionalParameter("price", price?.ToString(CultureInfo.InvariantCulture)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to the documentation the price is required for USD futures
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed that, it's a bit contradictory because the parameter itself is there and mentions:
only avaliable for LIMIT/STOP/TAKE_PROFIT order; can be set to OPPONENT/ OPPONENT_5/ OPPONENT_10/ OPPONENT_20: /QUEUE/ QUEUE_5/ QUEUE_10/ QUEUE_20; Can't be passed together with price
I'll do some testing to see whether it gets accepted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have tested it using the locally generated nuget package and the call does get accepted.
/// <summary> | ||
/// PriceMatch | ||
/// </summary> | ||
public PriceMatch? PriceMatch { get; set; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not the actual model which gets send, you'll need to copy it in the actual EditMultipleOrdersAsync methods
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's being added to the orderParameters
collection from this model like this:
orderParameters.AddOptionalEnum("priceMatch", order.PriceMatch);
Is that what you mean or do I misunderstand?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is added in the Coin futures I see, but not in the USD futures EditMultipleOrdersAsync method right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you mean the other way around :-) It's added on Usd but not Coin, I'll fix that!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see any Edit*
methods implemented on the BinanceRestClientCoinFuturesApiTrading
. To be clear the changes I did are on UsdFuturesApi
, both REST and Socket. Hope it makes sense.
Thank you for your feedback. I did some testing and the call does get accepted so the Please let me know if there's anything else I can do! |
/// <summary> | ||
/// PriceMatch | ||
/// </summary> | ||
public PriceMatch? PriceMatch { get; set; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is added in the Coin futures I see, but not in the USD futures EditMultipleOrdersAsync method right?
d5f7a52
to
5808ed6
Compare
@JKorf Could you please have another look? I've checked the |
This adds a
PriceMatch
parameter to the USD-futures order editing methods (both REST and WS). This is useful for "chasing" limit orders to prevent market order fees.Submitting as a draft for feedback.