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
Error in cancelOrder in TradeService class #584
Comments
@Tempys thx! It works without currency pair on kucoin ! Which exchange are you using ? still Binance ? |
@straumat yes im using binance |
@straumat should be additional method |
also CancelOrderParams its interfaces and required a specific implementation (((( |
But that would mean you would have the call one or the other strategy based on the exchange being used. |
Geez. More complicated than thought... BinanceCancelOrderParams has to be created so It forces me to add xchange-binance to the main project which is really not a good idea :( |
But why retrieve the currency pair from the order repos if the strategy can simply provide it ? And regarding xchange-binance: just implement the CancelOrderByCurrencyPair and CancelOrderByIdParams interfaces |
In cassandre, i don't have a dependency for any exchange library except xchange-core. And it seems I need to fulfill BinanceCancelOrderParams which forces me to add xchange-binance which is not clean |
No. binance xchange implementation just checks for CancelOrderByCurrencyPair and CancelOrderByIdParams... |
you need to move that logic on strategy level as i do that code is working for me
in that case u ll avoid issues with adding additional libraries |
@dstibbe but a BinanceCancelOrderParams has to be instantiated no? |
NO :P |
Edited : Just use the class mentioned a few posts down : DefaultCancelOrderByCurrencyPairAndIdParams |
@dstibbe its not only binance specific other exchange can require other parameters so about that functionality should be responsible strategy and not bot |
And I would just change the signature of cassandre's TradeService cancelOrder to : |
@Tempys yes, it is not only binance specific, so I would say have Cassandre's tradeService always call the xchange tradeservice with a currencypair |
If you don't, you are gonna have to make logic based on which exchange you are communicating with |
And I just noticed , the class I was suggesting to implement already exists ! :D |
@Tempys regarding cancel orders on other exchanges: it seems Xchange has narrowed it down to 4 params:
based on the existing interface |
when i tried to loanch method
in TradeService
i got the next error
2021-05-04 20:45:31,536 ERROR [boundedElastic-5] tech.cassandre.trading.bot.service.xchange.TradeServiceXChangeImplementation: TradeService - Error canceling order 130285696 : You need to provide the currency pair to cancel an order.
The text was updated successfully, but these errors were encountered: