Fetching index prices¶
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 | ||||||||||||||||
| 2025-10-16 13:45:00 | 46408.45 | 46356.86 | 46356.86 | 46408.45 | 60 | 1964974 | 46377.79 | 46327.94 | 46327.94 | 46377.79 | 60 | 46435.51 | 46381.54 | 46381.54 | 46435.51 | 60 |
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 | |||||||||
| 2025-09-18 | 46142.42 | 46056.55 | 46317.52 | 45954.73 | 495159400 | 46314.54 | 46030.98 | 45948.49 | 24602 |
| 2025-09-19 | 46315.27 | 46211.16 | 46396.47 | 46105.02 | 978320309 | 46483.76 | 46327.57 | 45875.71 | 24602 |
| 2025-09-22 | 46381.54 | 46206.69 | 46447.13 | 46035.83 | 627459057 | 46591.02 | 46143.84 | 46212.07 | 24602 |
| 2025-09-23 | 46292.78 | 46364.11 | 46714.27 | 46217.58 | 552041893 | 46472.82 | 46421.74 | 45986.54 | 24602 |
| 2025-09-24 | 46121.28 | 46368.94 | 46453.07 | 46096.39 | 421042429 | 46334.76 | 46369.43 | 45850.81 | 24602 |
| 2025-09-25 | 45947.32 | 46097.43 | 46122.42 | 45785.17 | 509189132 | 46072.35 | 46004.36 | 45673.54 | 24602 |
| 2025-09-26 | 46247.29 | 46101.45 | 46353.03 | 46051.92 | 437563592 | 46575.72 | 46148.2 | 45945.6 | 24602 |
| 2025-09-29 | 46316.07 | 46306.34 | 46387.06 | 46149.05 | 479741242 | 46443.62 | 46365.31 | 45996.0 | 24602 |
| 2025-09-30 | 46397.89 | 46282.63 | 46425.3 | 46103.39 | 584789247 | 46417.8 | 46289.7 | 46024.16 | 24602 |
| 2025-10-01 | 46441.1 | 46366.78 | 46528.78 | 46276.39 | 554414027 | 46577.5 | 46278.95 | 46153.67 | 24602 |
| 2025-10-02 | 46519.72 | 46461.11 | 46589.31 | 46283.57 | 442792180 | 46657.22 | 46447.43 | 46333.53 | 24602 |
| 2025-10-03 | 46758.28 | 46583.95 | 47049.64 | 46566.87 | 426410831 | 46998.25 | 46590.41 | 46686.36 | 24602 |
| 2025-10-06 | 46694.97 | 46776.04 | 46846.45 | 46426.96 | 500008836 | 46784.28 | 46776.9 | 46517.69 | 24602 |
| 2025-10-07 | 46602.98 | 46700.9 | 46868.49 | 46448.02 | 411287261 | 46891.42 | 46763.14 | 46402.37 | 24602 |
| 2025-10-08 | 46601.78 | 46649.32 | 46816.28 | 46498.39 | 423514264 | 46747.64 | 46722.75 | 46510.74 | 24602 |
| 2025-10-09 | 46358.42 | 46622.31 | 46684.41 | 46271.4 | 493084308 | 46476.26 | 46660.17 | 46249.26 | 24602 |
| 2025-10-10 | 45479.6 | 46394.88 | 46641.74 | 45470.72 | 658107654 | 45524.54 | 46489.72 | 45082.02 | 24602 |
| 2025-10-13 | 46067.58 | 45698.46 | 46153.49 | 45698.46 | 414070965 | 46208.07 | 45815.72 | 45871.96 | 24602 |
| 2025-10-14 | 46270.46 | 45871.89 | 46522.67 | 45452.03 | 515336721 | 46395.12 | 45703.11 | 45979.96 | 24602 |
| 2025-10-15 | 46253.31 | 46375.17 | 46693.34 | 46027.23 | 488709932 | 46366.6 | 46449.61 | 46044.13 | 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 | ||||||||||||||||
| 2025-09-18 | 46142.42 | 46056.55 | 46317.52 | 45954.73 | 495159400 | 46314.54 | 46030.98 | 45948.49 | 24602 | 9228.11 | 9208.37 | 9245.24 | 9208.33 | 635946217 | 491468.76 | 24205036 |
| 2025-09-19 | 46315.27 | 46211.16 | 46396.47 | 46105.02 | 978320309 | 46483.76 | 46327.57 | 45875.71 | 24602 | 9216.67 | 9228.11 | 9250.99 | 9207.7 | 1724967010 | 1120414.33 | 6121290 |
| 2025-09-22 | 46381.54 | 46206.69 | 46447.13 | 46035.83 | 627459057 | 46591.02 | 46143.84 | 46212.07 | 24602 | 9226.68 | 9216.67 | 9234.6 | 9194.32 | 601460977 | 365729.65 | 5613046 |
| 2025-09-23 | 46292.78 | 46364.11 | 46714.27 | 46217.58 | 552041893 | 46472.82 | 46421.74 | 45986.54 | 24602 | 9223.32 | 9226.7 | 9266.87 | 9223.32 | 689429251 | 478502.49 | 6307501 |
| 2025-09-24 | 46121.28 | 46368.94 | 46453.07 | 46096.39 | 421042429 | 46334.76 | 46369.43 | 45850.81 | 24602 | 9250.43 | 9223.34 | 9266.43 | 9177.09 | 628543491 | 458605.73 | 11203227 |
| 2025-09-25 | 45947.32 | 46097.43 | 46122.42 | 45785.17 | 509189132 | 46072.35 | 46004.36 | 45673.54 | 24602 | 9213.98 | 9250.43 | 9251.15 | 9203.17 | 643111892 | 463896.38 | 15158066 |
| 2025-09-26 | 46247.29 | 46101.45 | 46353.03 | 46051.92 | 437563592 | 46575.72 | 46148.2 | 45945.6 | 24602 | 9284.83 | 9213.97 | 9292.11 | 9208.52 | 687657431 | 538708.94 | 32401165 |
| 2025-09-29 | 46316.07 | 46306.34 | 46387.06 | 46149.05 | 479741242 | 46443.62 | 46365.31 | 45996.0 | 24602 | 9299.84 | 9284.82 | 9354.61 | 9284.82 | 535423732 | 414582.44 | 8666080 |
| 2025-09-30 | 46397.89 | 46282.63 | 46425.3 | 46103.39 | 584789247 | 46417.8 | 46289.7 | 46024.16 | 24602 | 9350.43 | 9299.84 | 9363.57 | 9266.29 | 756479012 | 560650.71 | 8944769 |
| 2025-10-01 | 46441.1 | 46366.78 | 46528.78 | 46276.39 | 554414027 | 46577.5 | 46278.95 | 46153.67 | 24602 | 9446.43 | 9350.46 | 9457.91 | 9347.59 | 835521471 | 667867.39 | 21727743 |
| 2025-10-02 | 46519.72 | 46461.11 | 46589.31 | 46283.57 | 442792180 | 46657.22 | 46447.43 | 46333.53 | 24602 | 9427.73 | 9446.44 | 9475.07 | 9417.62 | 650741247 | 486965.74 | 13012327 |
| 2025-10-03 | 46758.28 | 46583.95 | 47049.64 | 46566.87 | 426410831 | 46998.25 | 46590.41 | 46686.36 | 24602 | 9491.25 | 9427.74 | 9494.64 | 9425.03 | 596430000 | 508344.72 | 7382714 |
| 2025-10-06 | 46694.97 | 46776.04 | 46846.45 | 46426.96 | 500008836 | 46784.28 | 46776.9 | 46517.69 | 24602 | 9479.14 | 9491.22 | 9516.83 | 9465.42 | 607288826 | 432992.94 | 6158478 |
| 2025-10-07 | 46602.98 | 46700.9 | 46868.49 | 46448.02 | 411287261 | 46891.42 | 46763.14 | 46402.37 | 24602 | 9483.58 | 9479.13 | 9507.11 | 9473.11 | 641968255 | 424818.62 | 5224372 |
| 2025-10-08 | 46601.78 | 46649.32 | 46816.28 | 46498.39 | 423514264 | 46747.64 | 46722.75 | 46510.74 | 24602 | 9548.87 | 9483.56 | 9577.08 | 9483.55 | 799286254 | 500544.06 | 5008539 |
| 2025-10-09 | 46358.42 | 46622.31 | 46684.41 | 46271.4 | 493084308 | 46476.26 | 46660.17 | 46249.26 | 24602 | 9509.4 | 9548.93 | 9565.49 | 9501.09 | 968082322 | 547107.93 | 24948058 |
| 2025-10-10 | 45479.6 | 46394.88 | 46641.74 | 45470.72 | 658107654 | 45524.54 | 46489.72 | 45082.02 | 24602 | 9427.47 | 9509.42 | 9519.96 | 9414.59 | 633308164 | 530617.06 | 15215563 |
| 2025-10-13 | 46067.58 | 45698.46 | 46153.49 | 45698.46 | 414070965 | 46208.07 | 45815.72 | 45871.96 | 24602 | 9442.87 | 9427.46 | 9459.89 | 9409.67 | 845461754 | 642484.41 | 27602574 |
| 2025-10-14 | 46270.46 | 45871.89 | 46522.67 | 45452.03 | 515336721 | 46395.12 | 45703.11 | 45979.96 | 24602 | 9452.77 | 9442.94 | 9454.29 | 9384.24 | 714801218 | 541083.63 | 10138167 |
| 2025-10-15 | 46253.31 | 46375.17 | 46693.34 | 46027.23 | 488709932 | 46366.6 | 46449.61 | 46044.13 | 24602 | 9424.75 | 9452.75 | 9474.31 | 9395.05 | 606214668 | 431982.25 | 19729838 |