For the second time this year, today I sent an order and received no order status messages. Does anybody have any strategies for dealing with this situation? Could one send a request open orders and try and reconcile that with my view of the orders? Thanks in advance.
|
It is documented that you are not guaranteed to get order status
messages. You will always get exec details though.
You can request open orders but you also need to monitor
executions since if the order has filled it will no longer be
open.
You also get portfolio updates when an order fills.
There's no single right way to reconcile orders, everyone finds a
method that works for them.
On 6/18/2021 3:42 PM, Craig Carr wrote:
toggle quoted message
Show quoted text
For the second
time this year, today I sent an order and received no order status
messages.
Does anybody have any strategies for dealing with this situation?
Could one send a request open orders and try and reconcile that
with my view of the orders?
Thanks in advance.
|
Thanks for pointing that out! I never knew. My trades are mkt
orders with the ES E-mini and always saw correct callbacks with
orderstatus though, including all order updates. But it's true,
the manual has a small note near the bottom of this page:
- There are not guaranteed to be orderStatus callbacks for every
change in order status. For example with market orders when the
order is accepted and executes immediately, there commonly will
not be any corresponding orderStatus callbacks. For that reason
it is recommended to monitor the??function
in addition to?.
And while I now go through the API mailing archive, I noticed
others have pointed this out as well. Ok, that means a little
refactoring the code, it's a minor impact.
Thanks!
Regards,
Raoul
On 18-06-2021 21:52, Nick wrote:
toggle quoted message
Show quoted text
It is documented that you are not guaranteed to get order
status messages. You will always get exec details though.
You can request open orders but you also need to monitor
executions since if the order has filled it will no longer be
open.
You also get portfolio updates when an order fills.
There's no single right way to reconcile orders, everyone finds a
method that works for them.
On 6/18/2021 3:42 PM, Craig Carr
wrote:
For the
second time this year, today I sent an order and received no
order status messages.
Does anybody have any strategies for dealing with this
situation?
Could one send a request open orders and try and reconcile that
with my view of the orders?
Thanks in advance.
|
Thanks Nick, I wasn't aware of that. Another thing to program around...
|
On this particular order, I also got no "OpenOrder" update. Do people generally assume the the "OpenOrder" event is reliable? I don't see anything in the documentation indicating it isn't.
|
After getting more into the details, I didn't realize that the
algo has to call the reqExecutions method first before receiving
the callback on execDetails. Initially I thought execDetails was
called automatically after executing the last order.
But then, what would be the trigger for calling reqExecutions?
What would be the right moment? And then the callback sends all
orders that were executed this current session.
Any suggestions?
Regards,
Raoul
On 18-06-2021 23:13, Raoul Suurmeijer
wrote:
toggle quoted message
Show quoted text
Thanks for pointing that out! I never knew. My trades are mkt
orders with the ES E-mini and always saw correct callbacks with
orderstatus though, including all order updates. But it's true,
the manual has a small note near the bottom of this page:
- There are not guaranteed to be orderStatus callbacks for
every change in order status. For example with market orders
when the order is accepted and executes immediately, there
commonly will not be any corresponding orderStatus callbacks.
For that reason it is recommended to monitor the??function
in addition to?.
And while I now go through the API mailing archive, I noticed
others have pointed this out as well. Ok, that means a little
refactoring the code, it's a minor impact.
Thanks!
Regards,
Raoul
On 18-06-2021 21:52, Nick wrote:
It is documented that you are not guaranteed to get order
status messages. You will always get exec details though.
You can request open orders but you also need to monitor
executions since if the order has filled it will no longer be
open.
You also get portfolio updates when an order fills.
There's no single right way to reconcile orders, everyone finds
a method that works for them.
On 6/18/2021 3:42 PM, Craig Carr
wrote:
For the
second time this year, today I sent an order and received no
order status messages.
Does anybody have any strategies for dealing with this
situation?
Could one send a request open orders and try and reconcile
that with my view of the orders?
Thanks in advance.
|
execDetails is always generated, you don't have to request it. Something is missing in your code to receive the execDetails.
toggle quoted message
Show quoted text
On 6/21/2021 10:44 AM, Raoul Suurmeijer wrote: After getting more into the details, I didn't realize that the algo has to call the reqExecutions method first before receiving the callback on execDetails. Initially I thought execDetails was called automatically after executing the last order.
|
From a first test, it looks like it wants a requestId, implying I
have to request it first(?) On the other had, I do see a single
callback, but with the error message the reqId is unknow.
Raoul
On 21-06-2021 16:51, Nick wrote:
toggle quoted message
Show quoted text
execDetails
is always generated, you don't have to request it. Something is
missing in your code to receive the execDetails.
On 6/21/2021 10:44 AM, Raoul Suurmeijer wrote:
After getting more into the details, I
didn't realize that the algo has to call the reqExecutions
method first before receiving the callback on execDetails.
Initially I thought execDetails was called automatically after
executing the last order.
|
Not sure what you are referring to, Raoul. Nick is correct in that you get execDetails (and commissionReport) callbacks automatically when an order fills partially or completely. You do not call reqExecutions at all.
You might want to re-read the documentation at and and check your code if you do not get those callbacks.
reqExecutions is for the retrieval of historical executions (of the same day) and you can filter the information by various parameters.
JR
toggle quoted message
Show quoted text
On Mon, Jun 21, 2021 at 01:01 PM, Raoul Suurmeijer wrote:
From a first test, it looks like it wants a requestId, implying I have to request it first(?) On the other had, I do see a single callback, but with the error message the reqId is unknow.
Raoul
On 21-06-2021 16:51, Nick wrote:
execDetails is always generated, you don't have to request it. Something is missing in your code to receive the execDetails.
On 6/21/2021 10:44 AM, Raoul Suurmeijer wrote:
After getting more into the details, I didn't realize that the algo has to call the reqExecutions method first before receiving the callback on execDetails. Initially I thought execDetails was called automatically after executing the last order.
|
Going through the log file, I do indeed see an automatic callback
on execDetails after an order was executed. But the method
execDetails delivers three parameters, the first one being a reqId
(and also Contract and Execution). Normally this is related to the
initial request, but not this time obviously.
But now that I read de details of the delivered object Execution,
it has a variable OrderId which can then be related back to the
algo-thread that placed the order. We can ignore the reqId as
understand it. Is that how you handle the execDetails callback, by
using the OrderId from the Execution object? (and simply ignoring
the reqId?)
Thanks!,
Raoul
On 21-06-2021 21:57, JR wrote:
toggle quoted message
Show quoted text
Not sure what you are referring to, Raoul. Nick is correct in that
you get execDetails (and commissionReport) callbacks automatically
when an order fills partially or completely. You do not call
reqExecutions at all.
You might want to re-read the documentation at
and and check your code if you do not get those callbacks.
reqExecutions is for the retrieval of historical executions (of
the same day) and you can filter the information by various
parameters.
JR
On Mon, Jun 21, 2021 at 01:01 PM, Raoul Suurmeijer wrote:
From a first test, it looks like it wants a requestId,
implying I have to request it first(?) On the other had, I do
see a single callback, but with the error message the reqId is
unknow.
Raoul
On 21-06-2021 16:51, Nick wrote:
execDetails
is always generated, you don't have to request it. Something
is missing in your code to receive the execDetails.
On 6/21/2021 10:44 AM, Raoul Suurmeijer wrote:
After getting more into the details, I didn't
realize that the algo has to call the reqExecutions method
first before receiving the callback on execDetails.
Initially I thought execDetails was called automatically
after executing the last order.
|
You can use the integer numbers orderId or permId or the string orderRef (in case you set that field) to relate Executions to Orders.
The reqId in execDetail callbacks is there so that you can differentiate automatically generated callbacks from live order fills (probably a reqId of 0 or -1 ?) from historical executions you'd receive after reqExecutions calls. If you never intend to request historical executions, then you can ignore reqid.
toggle quoted message
Show quoted text
On Mon, Jun 21, 2021 at 04:04 PM, Raoul Suurmeijer wrote:
Going through the log file, I do indeed see an automatic callback on execDetails after an order was executed. But the method execDetails delivers three parameters, the first one being a reqId (and also Contract and Execution). Normally this is related to the initial request, but not this time obviously.
But now that I read de details of the delivered object Execution, it has a variable OrderId which can then be related back to the algo-thread that placed the order. We can ignore the reqId as understand it. Is that how you handle the execDetails callback, by using the OrderId from the Execution object? (and simply ignoring the reqId?)
Thanks!,
Raoul
?
?
On 21-06-2021 21:57, JR wrote:
Not sure what you are referring to, Raoul. Nick is correct in that you get execDetails (and commissionReport) callbacks automatically when an order fills partially or completely. You do not call reqExecutions at all.
You might want to re-read the documentation at and and check your code if you do not get those callbacks.
reqExecutions is for the retrieval of historical executions (of the same day) and you can filter the information by various parameters.
JR
On Mon, Jun 21, 2021 at 01:01 PM, Raoul Suurmeijer wrote:
From a first test, it looks like it wants a requestId, implying I have to request it first(?) On the other had, I do see a single callback, but with the error message the reqId is unknow.
Raoul
On 21-06-2021 16:51, Nick wrote:
execDetails is always generated, you don't have to request it. Something is missing in your code to receive the execDetails.
On 6/21/2021 10:44 AM, Raoul Suurmeijer wrote:
After getting more into the details, I didn't realize that the algo has to call the reqExecutions method first before receiving the callback on execDetails. Initially I thought execDetails was called automatically after executing the last order.
|