Skip to content

Conversation

@eeropu
Copy link

@eeropu eeropu commented Jul 24, 2023

Current implementation of cancelOrder method for Ascendex trade service does not work correctly. It removes all orders based on currency pair and ignores the orderId.

Current version of cancelOrder is renamed to cancelAllOrdersByCurrencyPair and the cancelOrder method has been changed to remove only the order with the given id.

cancelOrder method's functionality is now inline with other trade services' method with the same name.


@Override
public boolean cancelOrder(CancelOrderParams orderParams) throws IOException {
if (orderParams instanceof DefaultCancelOrderByInstrumentAndIdParams) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you should type check by interface not their default implementation

please do orderParams instance of CancelOrderByIdParams && orderParams instanceof CancelOrderByInstrument

if both are needed

if only one is needed then use ||

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants