Login Page - Create Account

Support Board


Date/Time: Wed, 30 Apr 2025 11:28:42 +0000



Post From: sc.GetOrderFillEvents is Returning a Value of Zero for Quantity

[2025-04-24 21:29:25]
Richard Novak - Posts: 26
I have an automated trading system that I'm working on and having an issue with retrieving the quantity when performing a call to sc.GetOrderFillEvents. I'm first performing a call to sc.GetOrderByOrderID(InternalOrderID, s_SCTradeOrder) to get the trade order data. This call is returning the correct average fill price, quantity, and filled quantity. I'm then iterating backwards through the GetOrderFillEvents to find the fill data record for the trade order identified by the InternalOrderID. I'm finding that sc.GetOrderFillEvents(index, s_SCOrderFillData) function is returning a value of zero for both the Quantity and TradePositionQuantity. Am I missing something here? Is there a delay between when the data returned in sc.GetOrderFillEvents is updated and when the data returned from sc.GetOrderFillEvents is updated? It should be noted that I'm using the Trading Evaluator service for this work. The quantity is shown correctly in the trade orders windows.

Thanks for your help.