¿ªÔÆÌåÓý

ctrl + shift + ? for shortcuts
© 2025 Groups.io

Flex Queries: Order Reference always empty


corneliu maftuleac
 

I am using orderRef field of an order to mark an order as it belongs to a specific strategy.
However when using flex queries to retrieve the list of orders the OrderReference field is always empty.

As specified on the docs: The order reference number as defined by the user on the order ticket.?

Any ideas how to retrieve order reference?


 

OrderRef will be in reports only for the most recent session. Workaround: configure the system to send daily reports by mail, then collect and collate them.


corneliu maftuleac
 

Thanks for the reply.
Already doing this, however reports are supposed to be self-sufficient.?

External tools may fail, mails may get lost, etc.
It is very unfortunate that IB does not keep that info, I wonder what technical complexity is keeping them from storing this field in the DB.


Nick
 

¿ªÔÆÌåÓý

IB is all-in with daily resets. I don't know if they painted themselves into a corner long ago and would essentially have to start over, or if there is some kind of regulatory or legal explanation. It doesn't seem like technology itself requires a broker to go offline every day.


On 3/10/2021 4:37 PM, corneliu maftuleac wrote:

Thanks for the reply.
Already doing this, however reports are supposed to be self-sufficient.?

External tools may fail, mails may get lost, etc.
It is very unfortunate that IB does not keep that info, I wonder what technical complexity is keeping them from storing this field in the DB.


 

Since you are throwing situations there is another to add:

Or that there is a business advantage for them to reset; Like playing the spreads or market at times they see fit by taking the opportunity away from others by resets.

Technical difficulties alone don't make sense.

On Wed, Mar 10, 2021, 4:52 PM Nick <news1000@...> wrote:

IB is all-in with daily resets. I don't know if they painted themselves into a corner long ago and would essentially have to start over, or if there is some kind of regulatory or legal explanation. It doesn't seem like technology itself requires a broker to go offline every day.


On 3/10/2021 4:37 PM, corneliu maftuleac wrote:
Thanks for the reply.
Already doing this, however reports are supposed to be self-sufficient.?

External tools may fail, mails may get lost, etc.
It is very unfortunate that IB does not keep that info, I wonder what technical complexity is keeping them from storing this field in the DB.


 

True but OrderRef reset is an exception I wouldn't blame them for. Didn't test its limits but obviously clients can stuff A LOT of data into this field at zero cost to them so I imagine it could easily get out of hand for IB if they kept all of it on their servers forever.


corneliu maftuleac
 

This is why orderRef (or a similar customer-supplied field) should be int64 instead of string, then no issues with storage.


 

I agree, this could easily be in the top 5 features on my wishlist, even though with the daily report mail-ins it would merely offer convenience rather than a full blown upgrade. I would even settle for just keeping my api order numbers because with proper math one could chop a few bits to store custom flags and small numbers. Unfortunately it doesn't look possible either.

§é§ä, 11 §Þ§Ñ§â. 2021 §Ô., 2:17 corneliu maftuleac <corneliu.maftuleac@...>:

This is why orderRef (or a similar customer-supplied field) should be int64 instead of string, then no issues with storage.


 

Is there a way to retrieve Exchange Execution ID or to track by that (exists in TWS)? This of course only happens after transacted but should be a solid one.


On Wed, Mar 10, 2021, 6:38 PM ds-avatar <dimsal.public@...> wrote:
I agree, this could easily be in the top 5 features on my wishlist, even though with the daily report mail-ins it would merely offer convenience rather than a full blown upgrade. I would even settle for just keeping my api order numbers because with proper math one could chop a few bits to store custom flags and small numbers. Unfortunately it doesn't look possible either.

§é§ä, 11 §Þ§Ñ§â. 2021 §Ô., 2:17 corneliu maftuleac <corneliu.maftuleac@...>:
This is why orderRef (or a similar customer-supplied field) should be int64 instead of string, then no issues with storage.