question

Upvotes
Accepted
61 2 4 9

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 5.0 MiB each and 10.0 MiB total.

Upvote
Accepted
61 2 4 9

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 5.0 MiB each and 10.0 MiB total.

Upvote
23k 22 9 14

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 5.0 MiB each and 10.0 MiB total.

Click below to post an Idea Post Idea