Upgrade from Eikon -> Workspace. Learn about programming differences.

For a deeper look into our Eikon Data API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
1 0 0 1

How do I fix the duplicate dates when I try to retrieve the TR.FIXINGVALUE for USDSOFR= using Workspace API Python

import refinitiv.data as rd
rd.open_session()
df = rd.get_data(
    universe = ['USDSOFR='],
    fields = ['TR.FIXINGVALUE'],
    parameters = {
        'SDate': '2024-07-01',
        'EDate': '1D',
        'Frq': 'D',
        'CH': 'IN;Fd',
        'RH': 'date'
    }
)

display(df)

When using the above code instead of returning the values for 24/07/2023 it duplicates the value for 23/07/2024.
As shown below.

Instrument Date Fixing Value

0 USDSOFR= 2024-07-15 5.34

1 USDSOFR= 2024-07-16 5.35

2 USDSOFR= 2024-07-17 5.35

3 USDSOFR= 2024-07-18 5.34

4 USDSOFR= 2024-07-19 5.34

5 USDSOFR= 2024-07-22 5.33

6 USDSOFR= 2024-07-23 5.34

7 USDSOFR= 2024-07-23 5.34

workspace#technologypython apihistoricalrefinitiv-data-libraries
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
Upvote
Accepted
10.8k 21 6 9

@teombe.macaso Sorry to hear about your issue - can you try the following:

df = rd.get_data(
    universe = ['USDSOFR='],
    fields = ['TR.FIXINGVALUE.date','TR.FIXINGVALUE'],
    parameters = {
        'SDate': '2024-07-01',
        'EDate': '2024-07-23',
        'Frq': 'D'
    }
)
df

1721830410986.png

All looks good to me. I hope this can help.


1721830410986.png (136.3 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.

Thank you for this Jason, how do I get the value for today as well 07/24/2024? Or is that not possible?

Hello @teombe.macaso

To get the current data (real-time data), you can use the rd.get_data() method without the date parameters:

df = rd.get_data(
    universe = ['USDSOFR='],
    fields = ['TR.FIXINGVALUE.date','TR.FIXINGVALUE']
)
df

Note: You need the real-time data permission.

1722502967495.png

1722502967495.png (10.0 KiB)

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.