From 1da2cc586f8073427983b71b68af3cb56a53ec27 Mon Sep 17 00:00:00 2001 From: MuslemRahimi Date: Sat, 3 Aug 2024 23:48:33 +0200 Subject: [PATCH] update congress db --- app/create_institute_db.py | 2 +- app/cron_congress_trading.py | 3 ++- app/cron_dark_pool_flow.py | 8 ++++---- .../__pycache__/prophet_model.cpython-310.pyc | Bin 2732 -> 2732 bytes app/restart_json.py | 1 + 5 files changed, 8 insertions(+), 6 deletions(-) diff --git a/app/create_institute_db.py b/app/create_institute_db.py index d336dc3..0b3ab24 100755 --- a/app/create_institute_db.py +++ b/app/create_institute_db.py @@ -62,7 +62,7 @@ crypto_con.close() load_dotenv() api_key = os.getenv('FMP_API_KEY') -quarter_date = '2024-6-30' +quarter_date = '2024-03-31' if os.path.exists("backup_db/institute.db"): diff --git a/app/cron_congress_trading.py b/app/cron_congress_trading.py index b38a924..5898017 100755 --- a/app/cron_congress_trading.py +++ b/app/cron_congress_trading.py @@ -98,6 +98,7 @@ def replace_representative(office): 'Blunt, Roy (Senator)': 'Roy Blunt', 'Thune, John (Senator)': 'John Thune', 'Rosen, Jacky (Senator)': 'Jacky Rosen', + 'Britt, Katie (Senator)': 'Katie Britt', 'James Costa': 'Jim Costa', 'Lummis, Cynthia (Senator)': 'Cynthia Lummis', 'Coons, Chris (Senator)': 'Chris Coons', @@ -170,7 +171,7 @@ async def get_endpoints(symbol, session): if any('exchange' in word.lower() for word in item['type'].split()): item['type'] = 'Exchange' - + if 'representative' in item: item['representative'] = replace_representative(item['representative']) diff --git a/app/cron_dark_pool_flow.py b/app/cron_dark_pool_flow.py index fc7f9ed..ff3e316 100644 --- a/app/cron_dark_pool_flow.py +++ b/app/cron_dark_pool_flow.py @@ -21,8 +21,8 @@ def save_json(data): ujson.dump(data, file) -identifier = 'GME' -source = 'cta_a_delayed' +identifier = 'INTC' +source = 'utp_delayed' start_date, end_date = GetStartEndDate().run() start_date = start_date.strftime("%Y-%m-%d") end_date = end_date.strftime("%Y-%m-%d") @@ -42,8 +42,8 @@ def get_data(): if count == 0: next_page = '' try: - response = intrinio.SecurityApi().get_security_trades( - source, start_date=start_date, start_time=start_time, + response = intrinio.SecurityApi().get_security_trades_by_symbol( + identifier, source, start_date=start_date, start_time=start_time, end_date=end_date, end_time=end_time, timezone=timezone, page_size=page_size, darkpool_only=darkpool_only, min_size=min_size, next_page=next_page diff --git a/app/ml_models/__pycache__/prophet_model.cpython-310.pyc b/app/ml_models/__pycache__/prophet_model.cpython-310.pyc index 7fc825e592c803e6d5b1c3f2d754c25fe2296754..c3773a9bf164b8dace41914b120b1243a6a9cf73 100644 GIT binary patch delta 20 acmZ1@x<-^cpO=@50SH$7nY)pDAr}BQS_R1f delta 20 acmZ1@x<-^cpO=@50SK0F>EFn`kP84cT?KLg diff --git a/app/restart_json.py b/app/restart_json.py index 9df1724..6742ac8 100755 --- a/app/restart_json.py +++ b/app/restart_json.py @@ -580,6 +580,7 @@ def replace_representative(office): 'Blunt, Roy (Senator)': 'Roy Blunt', 'Thune, John (Senator)': 'John Thune', 'Rosen, Jacky (Senator)': 'Jacky Rosen', + 'Britt, Katie (Senator)': 'Katie Britt', 'James Costa': 'Jim Costa', 'Lummis, Cynthia (Senator)': 'Cynthia Lummis', 'Coons, Chris (Senator)': 'Chris Coons',