Order Times in API
Order Times in API
03 Jun 2020, 13:49
Hi All,
Was hoping someone might be able to help figure out how, if possible, to get the “Order created” time.
The time I’m referring to is the time you’ll see attached to the OID# @:
a) In the ‘Journal’ - e.g. “ → Request to close position PID12345 is ACCEPTED, order OID12345 created (01/06/2020 12:01:23.456 UTC+0)”
b) “Submitted Time” when viewing the 'Order Info' popup window accessed from ‘Trade History’ [i]
I’m aware it’s possible to get the Position times resulting from an order, with something along the lines of...
trade = ExecuteMarketOrder(...);
trade.Position.EntryTime;
lastTrade = History.FindLast(...);
lastTrade.ClosingTime;
... but I can’t seem to find a similar reference for the order itself, only the position resulting from the order (as above).
I’m interested in both open & close orders (in case there’s a difference).
I understand there are ways to create workarounds to get approximations for this, but I’m hoping an API reference (similar to the above examples) exists, as the data itself is available in the system.
I appreciate any support.
Thanks,
John
PanagiotisCharalampous
03 Jun 2020, 14:56
Hi John,
Unfortunately this information is not available through cTrader Automate API.
Best Regards,
Panagiotis
Join us on Telegram
@PanagiotisCharalampous