API Support Forum
OEC API > API Support > API clarifications
Author Topic: API clarifications
(7 messages, Page 1 of 1)
Moderators: VPfau
SMarotto9056
Posts: 4
Joined: Dec 30, 2021


Posted: Jan 01, 2022 @ 11:04 AM             Msg. 1 of 7
Hello sirs,
could you please answer us this two questions?

-We request bars for historical downloading with end date parameter, should we unsubscribe the request once finished or is it automatic done since no any bars are available?

-Once we have done validation error for order insert, is it sure that we will receive a callback with no negative order Id? Or is it any situation that the validation is successfully but we can no receive callback with positive id?

Thanks
JSmith5611
Posts: 187
Joined:


Posted: Jan 03, 2022 @ 01:10 PM             Msg. 2 of 7
1) If a bar request has a limited amount that can be returned (i.e. has either a valid end date or an amount), no unsubscribe is needed once all bars have been received.
2) If an order has been sent (via GFApi.Orders.SendOrder) it should get a valid ID (via the OrderConfirmed event), unless there's a system issue, or an account configuration issue.
Jason Smith
SMarotto9056
Posts: 4
Joined: Dec 30, 2021


Posted: Jan 04, 2022 @ 10:02 AM             Msg. 3 of 7
Perfect, an other question:

-Which state and case are order submitted only through OnCommandUpdate and not on StateChanged?

Thanks
SMarotto9056
Posts: 4
Joined: Dec 30, 2021


Posted: Jan 04, 2022 @ 11:26 AM             Msg. 4 of 7
Sorry, also this one:
How can we receive partial fills? With on state changed we just receive when order is fully executed or canceled.
Thanks
SMarotto9056
Posts: 4
Joined: Dec 30, 2021


Posted: Jan 04, 2022 @ 11:26 AM             Msg. 5 of 7
Sorry, also this one:
How can we receive partial fills? With on state changed we just receive when order is fully executed or canceled.
Thanks
JSmith5611
Posts: 187
Joined:


Posted: Jan 05, 2022 @ 02:00 PM             Msg. 6 of 7
Partial fills are still received through GFApi.Orders.OrderFilled event, but order's state will still be Working until fully filled.
Jason Smith
JSmith5611
Posts: 187
Joined:


Posted: Jan 05, 2022 @ 02:04 PM             Msg. 7 of 7
CommandUpdate is different information that StateChanged.

CommandUpdate gives you notification when a command you sent it either executed or failed. Such as an order modify.
Jason Smith