question

Upvotes
Accepted
1 0 0 0

I am seeing inconsistent order fields

Using the C# REDI API to monitor orders via the OrderCache I am fetching various fields including

Exchange and AvgExecPrice.

  1. For exchange I get the values: “1010956” but looking on the Message Monitor, there are no Exch values that are numeric.
  2. 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());

}


redi-api
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

1 Answer

Upvotes
Accepted
23k 22 9 14

Hello @lkunin,

1. I can confirm that what you see on exchanges is correct, they come out as numbers rather then human readable strings.

2. Please be more specific when do you observe this?

If you run the code Monitoring Orders Tutorial do you see AvgExecPrice upon execution as expected?

(ExecQty is 0 when an order is first created. If it's executed, as a result, it becomes non-0)

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Click below to post an Idea Post Idea