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
17 5 5 11

Workspace with API (refinitiv.data / rd.get_history) does not give unadjusted prices

Hi support team

I want to download unadjusted stock price data. TESLA had a stock split on 2022-08-23.

- Workspace is running while I download data via API

If I use refinitiv.data API:

import refinitiv.data as rd
...
df3 = rd.get_history(
      universe=["TSLA.O"],
      fields=["tr.PriceClose", "tr.Volume", "tr.Turnover"],
      interval="1D",
      start="2022-08-01",
      end="2022-08-31",
      adjustments="unadjusted"
      )

gives result:

TSLA.O Price Close Volume Turnover

Date

2022-08-22 289.913043 55843402 16144833663

2022-08-23 296.453037 63985107 18862157610

2022-08-24 297.09637 57259773 17184310837

2022-08-25 296.07 53230013 15731346515

Data does NOT show the stock split and is adjusted for it.


If I use the Eikon API:

import eikon as ek
...
df = ek.get_timeseries(
        # [f'{RIC}'],
        ['TSLA.O'],
        start_date="2022-08-01", 
        end_date="2022-08-31", 
        interval='daily',
        corax='unadjusted')
print(df)

Gives the unadjusted prices BUT is limited to 3000 observations per call

TSLA.O HIGH CLOSE LOW OPEN COUNT VOLUME

Date

2022-08-23 896.4799 889.36 863.77 874.36 576125 21328348

2022-08-24 910.94 891.29 889.5 892.69 594436 19086572

2022-08-25 302.96 296.07 291.6 302.36 1041466 53230013

2022-08-26 302.0 288.09 287.47 297.43 984030 57163947

Data shows stock split and is not adjusted.

Question 1) How can I use unadjusted stock prices with API refining.data?

Question 2) With Eikon API I can only download 3000 lines per data reference. Is there any way to handle that smartly or get around this?

Thanks for your help!

#technology#product#contentpython api
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
79.3k 253 52 74

@ns3481

Thank you for reaching out to us.

You can try the following code in the RD library.

rd.get_history(universe="TSLA.O",start="2022-08-01",end="2022-08-31",
               fields=["HIGH_1","TRDPRC_1","LOW_1","OPEN_PRC","NUM_MOVES","ACVOL_UNS"],
               adjustments="unadjusted")

For question 2, it is a limitation in the API. You can try the RD library instead.


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.

Thanks @Jirapongse, I will try this and circle back.

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.