aboutsummaryrefslogtreecommitdiffstats
path: root/python/bbg_helpers.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/bbg_helpers.py')
-rw-r--r--python/bbg_helpers.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/python/bbg_helpers.py b/python/bbg_helpers.py
index a2ae0f29..203b280f 100644
--- a/python/bbg_helpers.py
+++ b/python/bbg_helpers.py
@@ -7,6 +7,8 @@ import logging
logger = logging.getLogger(__name__)
+BBG_IP = '192.168.0.4'
+
@contextmanager
def init_bbg_session(ipaddr, port=8194):
sessionOptions = blpapi.SessionOptions()
@@ -111,7 +113,7 @@ if __name__=="__main__":
hist_fields = ['PX_LAST']
securities = ['38145BAA9 Mtge', '75157EAE2 Mtge', 'XS0295516776 Mtge']
fields = ['CUR_CPN', 'START_ACC_DT']
- with init_bbg_session('192.168.0.4', 8194) as session:
+ with init_bbg_session(BBG_IP, 8194) as session:
hist_data = retrieve_data(session, hist_securities, hist_fields, start_date=testdate)
overrides={'SETTLE_DT': testdate}
ref_data = retrieve_data(session, securities, fields, overrides=overrides)