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 0x7fe630ed38c0 {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 BID_HIGH_1 BID_LOW_1 OPEN_BID BID BID_NUMMOV ASK_HIGH_1 ASK_LOW_1 OPEN_ASK ASK ASK_NUMMOV
Timestamp
2026-07-17 20:43:00 52146.42 52146.42 52146.42 52146.42 1 630591 52039.26 52039.26 52039.26 52039.26 1 52275.04 52275.04 52275.04 52275.04 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-06-18 51564.7 51571.85 51949.26 51554.53 985372653 51724.22 51961.87 51419.59 24602
2026-06-22 51712.71 51555.19 51887.85 51555.19 531542037 51923.27 51680.76 51663.89 24602
2026-06-23 51666.84 51735.64 51872.56 51301.77 569180241 51755.13 51460.66 51622.88 24602
2026-06-24 51848.9 51660.75 52248.69 51617.73 560271694 52161.41 51684.08 51597.89 24602
2026-06-25 51920.62 52009.02 52655.66 51857.78 639230227 52171.07 52123.91 51805.8 24602
2026-06-26 51876.11 51803.77 52130.07 51614.74 1321068148 51943.34 51783.33 51683.1 24602
2026-06-29 52182.74 51995.14 52311.63 51949.54 592815720 52305.65 52056.79 52129.6 24602
2026-06-30 52319.2 52168.18 52387.45 52033.13 639535665 52352.43 52275.04 52086.33 24602
2026-07-01 52305.24 52231.18 52742.66 52026.64 627339226 52434.57 52214.42 52070.23 24602
2026-07-02 52900.07 52395.22 52903.85 52395.22 548821105 52945.12 52633.32 52655.31 24602
2026-07-06 53055.91 52828.45 53060.1 52648.69 467397226 53142.57 52970.5 52824.94 24602
2026-07-07 52925.15 53104.06 53289.3 52774.17 443184789 53121.95 53249.67 52748.21 24602
2026-07-08 52348.39 52758.47 52758.47 52069.87 454136957 52472.91 52465.71 52146.36 24602
2026-07-09 52487.41 52249.44 52574.89 52249.44 461091588 52663.69 52420.66 52318.13 24602
2026-07-10 52637.01 52622.92 52709.75 52266.81 416819369 52765.39 52606.64 52537.39 24602
2026-07-13 52498.64 52676.53 52846.51 52351.12 407344253 52568.6 52659.89 52369.01 24602
2026-07-14 52508.27 52046.36 52695.06 52046.36 473241685 52665.6 52364.61 52385.89 24602
2026-07-15 52658.64 52604.2 52823.95 52428.54 508443319 52790.29 52609.73 52544.58 24602
2026-07-16 52552.97 52924.86 52924.86 52367.42 534292984 52589.7 52768.24 52370.44 24602
2026-07-17 52146.42 52426.46 52610.97 51986.74 549691647 52275.04 51995.81 52039.26 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-06-18 51564.7 51571.85 51949.26 51554.53 985372653 51724.22 51961.87 51419.59 24602 <NA> <NA> <NA> <NA> <NA> <NA> <NA>
2026-06-22 51712.71 51555.19 51887.85 51555.19 531542037 51923.27 51680.76 51663.89 24602 10437.85 10363.58 10443.16 10346.63 1061872669 756946.85 89372533
2026-06-23 51666.84 51735.64 51872.56 51301.77 569180241 51755.13 51460.66 51622.88 24602 10428.85 10438.24 10462.19 10332.4 886362424 701994.84 44474492
2026-06-24 51848.9 51660.75 52248.69 51617.73 560271694 52161.41 51684.08 51597.89 24602 10461.63 10429.02 10469.33 10406.95 918761021 714874.98 18047795
2026-06-25 51920.62 52009.02 52655.66 51857.78 639230227 52171.07 52123.91 51805.8 24602 10529.89 10461.52 10575.31 10415.45 970238545 747963.45 94181696
2026-06-26 51876.11 51803.77 52130.07 51614.74 1321068148 51943.34 51783.33 51683.1 24602 10508.02 10530.18 10530.18 10404.73 753242111 577829.5 68875322
2026-06-29 52182.74 51995.14 52311.63 51949.54 592815720 52305.65 52056.79 52129.6 24602 10484.22 10507.83 10521.03 10471.98 705514852 529796.47 53296797
2026-06-30 52319.2 52168.18 52387.45 52033.13 639535665 52352.43 52275.04 52086.33 24602 10497.12 10484.31 10613.18 10483.86 818985404 630826.19 11773893
2026-07-01 52305.24 52231.18 52742.66 52026.64 627339226 52434.57 52214.42 52070.23 24602 10478.34 10497.6 10508.25 10429.17 884289466 619339.62 55696698
2026-07-02 52900.07 52395.22 52903.85 52395.22 548821105 52945.12 52633.32 52655.31 24602 10652.87 10477.76 10694.94 10436.76 890530678 692853.27 36143010
2026-07-03 <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA> 10679.03 10652.81 10701.32 10604.25 423929586 274144.74 11004321
2026-07-06 53055.91 52828.45 53060.1 52648.69 467397226 53142.57 52970.5 52824.94 24602 10651.77 10679.38 10733.39 10618.43 573481830 499419.8 35680558
2026-07-07 52925.15 53104.06 53289.3 52774.17 443184789 53121.95 53249.67 52748.21 24602 10665.88 10651.3 10747.01 10651.17 638378340 542466.31 15426563
2026-07-08 52348.39 52758.47 52758.47 52069.87 454136957 52472.91 52465.71 52146.36 24602 10489.04 10666.09 10666.09 10467.01 691957685 558244.8 35683229
2026-07-09 52487.41 52249.44 52574.89 52249.44 461091588 52663.69 52420.66 52318.13 24602 10472.45 10487.89 10539.47 10397.48 548778542 547677.34 18927851
2026-07-10 52637.01 52622.92 52709.75 52266.81 416819369 52765.39 52606.64 52537.39 24602 10497.29 10471.94 10513.9 10462.75 740631972 497978.06 35586220
2026-07-13 52498.64 52676.53 52846.51 52351.12 407344253 52568.6 52659.89 52369.01 24602 10498.29 10498.05 10532.1 10465.0 596249196 488068.81 37999042
2026-07-14 52508.27 52046.36 52695.06 52046.36 473241685 52665.6 52364.61 52385.89 24602 10529.39 10498.7 10552.56 10422.98 645956394 507722.54 26086429
2026-07-15 52658.64 52604.2 52823.95 52428.54 508443319 52790.29 52609.73 52544.58 24602 10515.92 10529.05 10546.16 10443.59 918536834 614045.97 37909959
2026-07-16 52552.97 52924.86 52924.86 52367.42 534292984 52589.7 52768.24 52370.44 24602 10572.24 10514.96 10572.24 10447.55 776250186 518898.69 70622395
2026-07-17 52146.42 52426.46 52610.97 51986.74 549691647 52275.04 51995.81 52039.26 24602 10600.37 10572.39 10623.69 10527.65 771637803 619461.63 15910113

Hide code cell content

ld.close_session()