Using the C# REDI API to monitor orders via the OrderCache I am fetching various fields including
Exchange and AvgExecPrice.
- For exchange I get the values: “1010956” but looking on the Message Monitor, there are no Exch values that are numeric.
- In cases where “ExecQuantity” is positive, I get AvgExecPrice == 0;
My code is:
ord.Exch = GetCell(orderCache, row, "Exchange", out errCode).ToString().Trim();
ord.Quantity = long.Parse(GetCell(orderCache, row, "Quantity", out errCode).ToString().Trim());
ord.ExecQuantity = long.Parse(GetCell(orderCache, row, "ExecQuantity", out errCode).ToString().Trim());
if(ord.ExecQuantity > 0)
{
ord.ExecPrice = decimal.Parse(GetCell(orderCache, row, "AvgExecPrice", out errCode).ToString().Trim());
}