hsun 10 months ago
parent
commit
42709caedf
1 changed files with 18 additions and 18 deletions
  1. 18 18
      pscg_bloomberg/main.py

+ 18 - 18
pscg_bloomberg/main.py

@@ -147,24 +147,24 @@ def write_data_to_file(json_data, dir_path=None):
         print(f"写入文件时发生错误:{e}")
 
 
-def main():
-    ### Download data from Bloomberg website scheduled run
-    ### Be aware different column fields for different run job
-    ### For example: price data clolumn:
-    ### Date: PX_CLOSE_DT, Value: PX_YEST_CLOSE
-    ### Other type of data download cloumn
-    ### Date: LAST_UPDATE_DT, Value: PX_LAST
-
-    bbg_down = bbg_schedule_run("./ps-credential.txt")
-    # "IDpcsgDailyType6Price", "IDpcsgDailyGeneral" "IDpcsgWeeklyRunETA222", "IDpcsgMonthRun"
-    df_daily_price = bbg_down.get_sched_data("IDpcsgDailyType6Price")
-    df_daily_general = bbg_down.get_sched_data("IDpcsgDailyGeneral")
-    # df_weekly = bbg_down.get_sched_data("IDpcsgWeeklyRunETA223")
-    df_monthly = bbg_down.get_sched_data("IDpcsgMonthRun")
-
-    print(df_daily_price)
-    print(df_daily_general)
-    print(df_monthly)
+# def main():
+#     ### Download data from Bloomberg website scheduled run
+#     ### Be aware different column fields for different run job
+#     ### For example: price data clolumn:
+#     ### Date: PX_CLOSE_DT, Value: PX_YEST_CLOSE
+#     ### Other type of data download cloumn
+#     ### Date: LAST_UPDATE_DT, Value: PX_LAST
+#
+#     bbg_down = bbg_schedule_run("./ps-credential.txt")
+#     # "IDpcsgDailyType6Price", "IDpcsgDailyGeneral" "IDpcsgWeeklyRunETA222", "IDpcsgMonthRun"
+#     df_daily_price = bbg_down.get_sched_data("IDpcsgDailyType6Price")
+#     df_daily_general = bbg_down.get_sched_data("IDpcsgDailyGeneral")
+#     # df_weekly = bbg_down.get_sched_data("IDpcsgWeeklyRunETA223")
+#     df_monthly = bbg_down.get_sched_data("IDpcsgMonthRun")
+#
+#     print(df_daily_price)
+#     print(df_daily_general)
+#     print(df_monthly)
 
 
 if __name__ == "__main__":