-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Modify or replace order #2818
Comments
I think it is a dangerous addition to the generic interface. This sure is a great feature when implemented by the exchanges, but unfortunately too rare. Will cause many client codes to throw unexpected exceptions. |
There are already functions in the generic interface that hasn't implemented in particular exchanges. For instance
If developer will use library blindly, without looking at what features are supported, he gets exceptions even without |
I agree with @SergeyLukashevich and I think it is OK to add such interface method, and add it to all supported exchanges and returning 'not implemented' exception on the exchanges that does not support replace feature. I already have that interface at my code with implementation for Bitfinex and Poloniex only: |
@SergeyLukashevich the fact that some generic features are not supported on 100% exchanges is not an argument to assume that features supported by a few exchanges are generic some exchanges support so we could consider adding however according to my research at https://github.com/knowm/XChange/wiki/Generic-feature-candidates this still does not cover > 50% of exchanges so to not have a method that throws a NotYetImplementedException for > 50% of exchanges we could add a default method to the interface like
|
Sounds good for me. But |
Ok for |
Update feature request based on [knowm#2818]; Update documentation; Make cancel and replace by two requests as default behaviour for exchanges that doesn't support modify or cancel/replace.
Some exchanges have API methods that allow to modify an order or cancel an existing one and create a new one in one request. This could be added to generic interfaces as one method:
which will either modify an existing order or replace it depending on the exchanges API capabilities.
This feature was initially proposed in PR: #2806
however current API support seams not wide spread enough to add to generic interfaces.
Feature support in exchange APIs is monitored on: https://github.com/knowm/XChange/wiki/Generic-feature-candidates
The text was updated successfully, but these errors were encountered: