Skip to content

Commit

Permalink
update congress db
Browse files Browse the repository at this point in the history
  • Loading branch information
MuslemRahimi committed Aug 3, 2024
1 parent e577eb7 commit 1da2cc5
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion app/create_institute_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def normalize_name(name):

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"):
Expand Down
3 changes: 2 additions & 1 deletion app/cron_congress_trading.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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'])

Expand Down
8 changes: 4 additions & 4 deletions app/cron_dark_pool_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand All @@ -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
Expand Down
Binary file modified app/ml_models/__pycache__/prophet_model.cpython-310.pyc
Binary file not shown.
1 change: 1 addition & 0 deletions app/restart_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit 1da2cc5

Please sign in to comment.