https://github.com/scottgriffinm/simplebloomberg
A simple wrapper for the Bloomberg Terminal API.
https://github.com/scottgriffinm/simplebloomberg
bloomberg bloomberg-api finance
Last synced: 6 months ago
JSON representation
A simple wrapper for the Bloomberg Terminal API.
- Host: GitHub
- URL: https://github.com/scottgriffinm/simplebloomberg
- Owner: scottgriffinm
- Created: 2023-08-28T00:49:57.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-02-19T21:58:21.000Z (over 1 year ago)
- Last Synced: 2025-02-13T13:41:10.275Z (8 months ago)
- Topics: bloomberg, bloomberg-api, finance
- Language: Python
- Homepage:
- Size: 23.4 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# SimpleBloomberg.py
A simple wrapper for the Bloomberg Terminal Python API, currently only retrieves historical prices.
Quickstart:
(1) On your computer, open the Bloomberg terminal application and log in. Make sure to keep the application open throughout this process.
(2) Open the command line and install the Bloomberg Python API libraries (you need to have the privledges to change PATH variables on your computer):
```
python -m pip install --index-url=https://bcms.bloomberg.com/pip/simple blpapi
```(3) Then clone this Github reposititory (or download it as a .zip and extract it to a folder):
```
git clone https://github.com/scottgriffinm/SimpleBloomberg.git
```(4) Create a Python script in the same folder as SimpleBloomberg.py and paste the following code:
```
import SimpleBloomberg as sb
# get IBM & AAPL daily closing prices for the period of 4/27/2010 to 5/1/2010 and save to csv
data = sb.getHistoricalPrices(['IBM US Equity','AAPL US Equity'], '20100427', '20100501', 'DAILY', fields='PX_LAST')
sb.saveToCSV(data,'data.csv')
```(5) Run your Python script.