question

Upvotes
Accepted
18 0 4 9

How to get rediorderid in Python?

Firstly, I want to get RediOrderID from my Python. After i run the script of ordersending as :

msg = win32com.client.VARIANT(win32com.client.pythoncom.VT_BYREF | win32com.client.pythoncom.VT_VARIANT, None)

res = o.Submit(msg)

The returned result as res have value only "True" or "False" but i expect to get OrderID.

Then i develop my C# to run another process like cachecontrol to capture the return message from wincom32. Now, my ordersending process was change to able to send more than one order at a time. So, this manner can occur of race condition e.g. order a and b are send at the same time to mapping return of b may be matched to order a. then i found the document of Refinitiv REDI EMS API Spec, Document Version 2.4, Date of issue: 3 December 2019, from page 3 in the document, which "Member Name" can we use?. In the document said "ClientData --String 36 -- This field is free text field which persist throughout lifecycle of an order. It is NOT recommended using this field if your firm use portfolio trader or FIX ticket.", can i use another member name?? or do you have any suggest to track the RediOrderID after order was submitted, not concept of cachecontrol?


redi-apicaching
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.

Upvotes
Accepted
32.2k 40 11 19

Hello @alongkot.b ,

If I understand your question correctly, the answer is no, you will not be able to monitor/track, cancel or modify order in Python, as REDI Python offers very limited functionality.

You will be able to monitor, cancel or modify orders in C#, please refer to REDI API Spec and REDI Tutorials -> C# for more information on REDI Order Monitoring and on cancelling order by OrderRefKey, perhaps this previous discussion thread can be of more help.

You will also be able to monitor, cancel and modify in VB/Excel, please refer to the relevant spec and VB/Excel tutorial information.

Please let us know of this helps?


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.

Upvotes
18 0 4 9

Hi @zoya.farberov ,

your answer can help me for sure. my system use python to send the order and C# to get the order status. but i still have one more question of the member name. i want to know a reason of clientdata the document suggest me to do not use and which member name you suggest me to use?

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.

Upvotes
32.2k 40 11 19

Hello @alongkot.b ,

If I understand your question correctly, to differentiate the orders as well as cancel the orders if they are not executed, you can use OrdeRefKey, as it is a unique identifier for the order, and is system-generated. For example:

res = orderCache.CancelByKey("r151681", "gS05779521", err);

In terms of using ClientData that is self-selected:

Where I think you may wish to be careful is, setting the same ClientData on multiple orders is not supported and can lead to issues.

Secondly not recommended if "using portfolio trader or FIX ticket ", I think otherwise it is ok to populate it.

Hope this helps

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.