How to know the source of a PendingOrders.Cancelled event ?
How to know the source of a PendingOrders.Cancelled event ?
19 Feb 2021, 11:27
Hi guys,
I'm subscribed to the PendingOrders.Cancelled event, which is raised when an order is cancelled (by the user or a cBot).
The thing is: I don't know how to get the information about who cancelled the order, user or cBot ?
In my cBot, when I cancel an order, I add the order.Id to a list. Then when I receive the event, I check the list of bot cancelled order Ids to know if the order has been cancelled by the bot or the user.
This is cumbersome, and - I think - knowing the source of a cancelled order is a pretty common use case.
- Is there a way to do it with the API ?
- If not, do you guys found a better solution to handle this ?
Many thanks for your help.
Cheers,
Jerry
Replies
JerryTrader
19 Feb 2021, 12:43
RE:
PanagiotisCharalampous said:
Unfortunately there is no way to get this information from the API at the moment.
Alright,
Thanks for the quick answer.
Does my question make sense, or am I missing something ?
Is it already in your backlog, or should I open a suggestion (if my question makes sense obviously) ?
@JerryTrader
PanagiotisCharalampous
19 Feb 2021, 12:53
( Updated at: 21 Dec 2023, 09:22 )
Hi Jerry,
It makes absolute sense. This information is actually stored in the database. Place a suggestion and I will explore with the product team in if it can be exposed to the API as well.
Best Regards,
Panagiotis
@PanagiotisCharalampous
JerryTrader
19 Feb 2021, 15:09
Good news if it is already in the database and that it makes sense. I'm gonna open a suggestion, then.
Thanks for your answer.
@JerryTrader
... Deleted by UFO ...
PanagiotisCharalampous
19 Feb 2021, 12:37
Hi Jerry,
Unfortunately there is no way to get this information from the API at the moment.
Best Regards,
Panagiotis
Join us on Telegram
@PanagiotisCharalampous