Fetching index prices

Hide code cell content

import warnings
warnings.simplefilter(action='ignore', category=FutureWarning)

import lseg.data as ld

ld.open_session()
<lseg.data.session.Definition object at 0x7f4060b338c0 {name='rdp'}>

You can use the LSEG Data Library for Python to retrieve the latest value of a stock index by passing its Refinitiv Instrument Code to the get_data function. They are typically prefixed with a period. Here’s the Dow Jones Industrial Average:

ld.get_data(".DJI")

The get_data query requires that you account have access to real-time trading data, which is not available to all users. If you don’t, you can request the latest "1min" intervals from the get_history method.

ld.get_history(
    ".DJI",
    interval="1min",
).tail(1)
.DJI HIGH_1 LOW_1 OPEN_PRC TRDPRC_1 NUM_MOVES ACVOL_UNS O_SEC_OFST C_SEC_OFST BID_HIGH_1 BID_LOW_1 OPEN_BID BID BID_NUMMOV ASK_HIGH_1 ASK_LOW_1 OPEN_ASK ASK ASK_NUMMOV
Timestamp
2026-08-27 20:58:00 53569.44 53569.44 53569.44 53569.44 1 12915118 32 32 53395.95 53395.95 53395.95 53395.95 1 53653.01 53653.01 53653.01 53653.01 1

Historical data

You can retrieve historical stock prices by passing a Refinitiv Instrument Code to the get_history function. By default it returns the closing price for the last 30 days.

ld.get_history('.DJI')
.DJI TRDPRC_1 OPEN_PRC HIGH_1 LOW_1 ACVOL_UNS ASK THEO_OPEN BID NUM_MOVES
Date
2026-07-31 52485.03 52235.03 52623.14 51996.32 703442636 52651.75 52415.25 52341.91 24602
2026-08-03 53178.41 52759.06 53230.08 52759.06 604860673 53261.2 53011.4 53085.99 24602
2026-08-04 54085.88 53641.21 54272.6 53641.21 580351963 54318.51 53835.48 54028.17 24602
2026-08-05 54349.12 54266.12 54744.33 54266.12 524200884 54459.2 54371.89 54141.1 24602
2026-08-06 53885.1 54426.85 54502.87 53835.02 420031319 53991.61 54440.45 53735.74 24602
2026-08-07 54036.93 53849.26 54094.65 53807.94 378681628 54126.41 53949.47 53843.92 24602
2026-08-10 53975.98 54072.66 54072.66 53850.19 413895987 54012.18 53988.58 53797.44 24602
2026-08-11 53791.85 53961.6 54222.85 53746.43 379390280 53908.46 54026.86 53687.9 24602
2026-08-12 53770.27 53797.47 53969.36 53731.96 410994494 53871.91 53917.97 53585.49 24602
2026-08-13 53839.99 53828.55 54049.14 53622.46 417348252 53959.7 53960.35 53650.63 24602
2026-08-14 53732.41 53842.8 53890.84 53673.47 319617349 53901.57 53762.73 53577.76 24602
2026-08-17 53459.78 53663.11 53663.11 53395.23 436708050 53530.98 53556.3 53383.29 24602
2026-08-18 53343.4 53354.43 53478.76 53256.34 427996859 53459.42 53396.01 53238.02 24602
2026-08-19 53463.05 53463.47 53710.06 53399.53 451465247 53623.23 53562.37 53373.78 24602
2026-08-20 52759.21 53381.22 53381.22 52754.9 445163800 52947.56 53153.21 52629.16 24602
2026-08-21 53277.01 52768.87 53355.92 52768.87 424065337 53357.19 53052.23 53175.56 24602
2026-08-24 53417.16 53261.95 53508.18 53261.95 416038344 53618.77 53306.91 53243.55 24602
2026-08-25 53577.4 53594.92 53675.32 53386.37 400321605 53656.57 53649.62 53428.87 24602
2026-08-26 53463.88 53547.68 53639.75 53379.4 426130738 53736.28 53560.17 53533.07 24602
2026-08-27 53569.44 53613.66 53707.62 53345.62 653738196 53653.01 53462.69 53395.95 24602

Multiple instruments

You can retrieve data for multiple instruments by passing a list of Refinitiv Instrument Codes to the get_data and get_history functions.

ld.get_history(['.DJI', '.FTSE'])
.DJI .FTSE
TRDPRC_1 OPEN_PRC HIGH_1 LOW_1 ACVOL_UNS ASK THEO_OPEN BID NUM_MOVES TRDPRC_1 OPEN_PRC HIGH_1 LOW_1 ACVOL_UNS TRNOVR_UNS TRDVOL_1
Date
2026-07-31 52485.03 52235.03 52623.14 51996.32 703442636 52651.75 52415.25 52341.91 24602 10868.05 10897.12 10989.45 10829.34 770646930 594605.29 2189028
2026-08-03 53178.41 52759.06 53230.08 52759.06 604860673 53261.2 53011.4 53085.99 24602 10857.7 10868.09 10917.41 10832.5 1185070987 961438.41 137246979
2026-08-04 54085.88 53641.21 54272.6 53641.21 580351963 54318.51 53835.48 54028.17 24602 10879.38 10857.63 10932.54 10855.2 1054179194 773953.86 109858403
2026-08-05 54349.12 54266.12 54744.33 54266.12 524200884 54459.2 54371.89 54141.1 24602 10888.3 10879.0 10952.31 10836.86 1040376937 820130.57 62318264
2026-08-06 53885.1 54426.85 54502.87 53835.02 420031319 53991.61 54440.45 53735.74 24602 10867.89 10888.45 10944.75 10865.32 637065603 515098.38 23715249
2026-08-07 54036.93 53849.26 54094.65 53807.94 378681628 54126.41 53949.47 53843.92 24602 10901.09 10867.91 10959.94 10855.17 1065758372 1008230.43 108184567
2026-08-10 53975.98 54072.66 54072.66 53850.19 413895987 54012.18 53988.58 53797.44 24602 10862.5 10901.09 10910.87 10829.0 607675760 506132.38 22165908
2026-08-11 53791.85 53961.6 54222.85 53746.43 379390280 53908.46 54026.86 53687.9 24602 10844.19 10862.85 10893.22 10825.39 718685140 536368.61 68969799
2026-08-12 53770.27 53797.47 53969.36 53731.96 410994494 53871.91 53917.97 53585.49 24602 10833.15 10844.19 10863.81 10809.63 546362793 488800.21 10108546
2026-08-13 53839.99 53828.55 54049.14 53622.46 417348252 53959.7 53960.35 53650.63 24602 10772.67 10833.58 10837.02 10756.38 844020011 709873.47 19270161
2026-08-14 53732.41 53842.8 53890.84 53673.47 319617349 53901.57 53762.73 53577.76 24602 10750.11 10772.54 10789.71 10723.66 710226177 729133.86 85864531
2026-08-17 53459.78 53663.11 53663.11 53395.23 436708050 53530.98 53556.3 53383.29 24602 10720.3 10749.95 10793.55 10717.55 581855238 466575.93 59478514
2026-08-18 53343.4 53354.43 53478.76 53256.34 427996859 53459.42 53396.01 53238.02 24602 10728.04 10720.85 10779.85 10701.69 772456072 565050.95 14355331
2026-08-19 53463.05 53463.47 53710.06 53399.53 451465247 53623.23 53562.37 53373.78 24602 10743.35 10727.84 10765.96 10701.11 697379623 532160.86 16739717
2026-08-20 52759.21 53381.22 53381.22 52754.9 445163800 52947.56 53153.21 52629.16 24602 10748.16 10743.23 10766.85 10684.38 762324655 572236.27 66336851
2026-08-21 53277.01 52768.87 53355.92 52768.87 424065337 53357.19 53052.23 53175.56 24602 10816.56 10748.07 10831.64 10734.92 672861168 500058.55 28932085
2026-08-24 53417.16 53261.95 53508.18 53261.95 416038344 53618.77 53306.91 53243.55 24602 10854.32 10816.33 10864.75 10798.98 658944025 638548.69 106384737
2026-08-25 53577.4 53594.92 53675.32 53386.37 400321605 53656.57 53649.62 53428.87 24602 10886.16 10854.57 10886.98 10825.76 608850863 509345.98 36470364
2026-08-26 53463.88 53547.68 53639.75 53379.4 426130738 53736.28 53560.17 53533.07 24602 10878.12 10886.2 10920.48 10855.62 576224377 495745.34 41639763
2026-08-27 53569.44 53613.66 53707.62 53345.62 653738196 53653.01 53462.69 53395.95 24602 10792.54 10878.16 10878.47 10772.62 605676792 492113.62 41276400

Hide code cell content

ld.close_session()