API Support Forum
OEC API > API Support > Order replace event (not getting update on API session)
Author Topic: Order replace event (not getting update on API session)
(2 messages, Page 1 of 1)
Moderators: VPfau
AAthan245
Posts: 1
Joined: Dec 03, 2018


Posted: Dec 05, 2018 @ 04:00 PM             Msg. 1 of 2
Hello,

If I place a new order via OEC and then cancel in OEC I get all updates in API event OnOrderStateChanged. If I replace existing order in OEC I don't get OnOrderStateChanged event. Though, when I cancel already replaced order I see that price variable in Order was changed, means it was updated. What event am I missing in order to catch OEC order replaces in API object?

Please LMK,
Thanks
Oleg
SRuscak
Posts: 2
Joined: Aug 24, 2017


Posted: Dec 06, 2018 @ 09:18 AM             Msg. 2 of 2
Hello Oleg,

Order modification doesn't change OrderState, which is why the OnOrderStateChanged event isn't raised.

The modify request is represented by a Command, and the server responds to the modify request by updating Order.Commands, so you should be able to listen to Order modifications with OnCommandUpdated.

Regards,
Seth