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 512.0 KiB each and 1.0 MiB total.

@lkunin

Thank you for your participation in the forum. Are any of the replies below satisfactory in resolving your query? If yes please click the 'Accept' text next to the reply that best answers your question. This will guide all community members who have a similar question. Otherwise please post again offering further insight into your question.

Thanks,

-AHS

Please be informed that a reply has been verified as correct in answering the question, and has been marked as such.

Thanks,


AHS

1 Answer

· Write an Answer
Upvotes
Accepted
32.2k 40 11 20

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 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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