question

Upvotes
Accepted
1 0 0 1

Code to get Open interest ek.get_data('/SBc1',[TR.OPENINTEREST']) has stopped working

Hi, the python code below was used to get the open interest for sugar no11 and no.5, it used to work but has recently stopped working and returns NoneType.

open_int, err = ek.get_data('/SBc1', ['TR.OPENINTEREST.date',

'TR.OPENINTEREST',

{'SDate': '2023-01-01', "EDate": str(datetime.date.today())})


Is there a different code that I need to use?


refinitiv-realtime#productpython apithomson-reutersmarket-price
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.

1 Answer

· Write an Answer
Upvotes
Accepted
4.7k 13 2 7

Hi @BSeed ,


Thank you for your question. I just checked it works for me:

screenshot-2023-03-31-at-155147.png

It seems you are just missing "]" after 'TR.OPENINTEREST'. Please have a look at the complete code below:

open_int, err = ek.get_data('/SBc1', ['TR.OPENINTEREST.date','TR.OPENINTEREST'],
                        {'SDate': '2023-01-01', "EDate":  str(datetime.date.today())})
open_int


Best regards,

Haykaz


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.