question

Upvotes
Accepted
61 4 9 12

Accessing Algo Fields on an Existing Order in Redi

I see via demo code examples how to get a list of algo fields from redi for a given set of symbol, exchange, and order type. I was wondering how you get access to algo field values for an order submitted to the broker. Do those fields come through via the Cache Object or can I request algo fields on an order object that has the order ref id set?

I was trying to get the start and end times of an algo for an existing order at program start up.

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.

Upvote
Accepted
61 4 9 12

I believe I've been able to answer my own problem. Here's a code snippet for anyone else looking for the same thing.

Once you've gotten all your data from the order cache callback take some of that information, create an order object, set that information for the new order like you were going to update it, then request the list of algo fields. The value's field should have what has been set in either Redi Plus or in your own application.


code-snippet.png (10.8 KiB)
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.

Upvote
32.2k 40 11 19

Hello @tobermark,

Thank you for posting this information!

Sharing what you have learned may help other members with similar questions, sharing is caring.

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.