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
0 0 0 1

Retrieving historical bid-ask quotes for bonds

Is it possible to retrieve historical values for the fields "PRIMACT_1" (bid) and "SEC_ACT_1" (ask)? Currently i can only manage to retrieve the live value from those fields through the eikon API. I currently use R for this, but i could also use python, if there is better support for the API there.


#productapi#contentpython apihistoricalbonds
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
6.2k 18 2 8

Hi @ss01 ,


You can use RD Libraries for python:

import refinitiv.data as rd
rd.open_session()
rd.get_history('594918BB9=')

This will return all available pricing fields for the instrument:

screenshot-2024-04-19-at-140808.png

Then you can use the field parameter to specify fields if you want to:

rd.get_history('594918BB9=', fields=['BID', "ASK"])


Hope this helps.


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.

Thank you, i got the same output using the Cusip from the bond in your example. I tried the get_history function on some norwegian bonds, and got no outputs. Is get_history not available for norwegian bonds, and if it is, what do i use as identifier? Since Cusip does not exist on them.
Upvote
6.2k 18 2 8

Hi @ss01 ,


It should be available for Norwegian bonds as well, I would suggest using RIC though. You can convert CUSIP to RIC using Symbology conversion capabilities of the Library- Example.DataLibrary.Python/Examples/2-Content/2.05-Symbology/EX-2.05.01-Symbology.ipynb at main · LSEG-API-Samples/Example.DataLibrary.Python (github.com)


If you will still have any issues, feel free to provide a couple of CUSIPs I will try on my end as well.


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.

Thank you, when i used the Symbology conversion to convert Isin to RIC, it worked.

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.