diff --git a/app/cron_borrowed_share.py b/app/cron_borrowed_share.py index 29fded0..cfb857e 100644 --- a/app/cron_borrowed_share.py +++ b/app/cron_borrowed_share.py @@ -65,7 +65,7 @@ async def run(): for i in tqdm(range(0, len(tasks), batch_size)): batch = tasks[i:i + batch_size] await asyncio.gather(*batch) - await asyncio.sleep(300) + await asyncio.sleep(10) if __name__ == "__main__": try: diff --git a/app/cron_dark_pool_flow.py b/app/cron_dark_pool_flow.py index f091659..fc7f9ed 100644 --- a/app/cron_dark_pool_flow.py +++ b/app/cron_dark_pool_flow.py @@ -42,8 +42,8 @@ def get_data(): if count == 0: next_page = '' try: - response = intrinio.SecurityApi().get_security_trades_by_symbol( - identifier, source, start_date=start_date, start_time=start_time, + response = intrinio.SecurityApi().get_security_trades( + 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/main.py b/app/main.py index d1685c2..e43f629 100755 --- a/app/main.py +++ b/app/main.py @@ -2970,6 +2970,7 @@ async def get_all_politician(api_key: str = Security(get_api_key)): ) + @app.get("/most-shorted-stocks") async def get_most_shorted_stocks(api_key: str = Security(get_api_key)): cache_key = f"most-shorted-stocks" diff --git a/app/primary_cron_job.py b/app/primary_cron_job.py index 4ca70da..db68db2 100755 --- a/app/primary_cron_job.py +++ b/app/primary_cron_job.py @@ -495,8 +495,8 @@ schedule.every(2).hours.do(run_threaded, run_fda_calendar).tag('fda_calendar_job schedule.every(3).hours.do(run_threaded, run_json_job).tag('json_job') schedule.every(6).hours.do(run_threaded, run_analyst_rating).tag('analyst_job') -schedule.every(10).seconds.do(run_threaded, run_cron_options_flow).tag('options_flow_job') -schedule.every(10).seconds.do(run_threaded, run_cron_options_zero_dte).tag('options_zero_dte_job') +schedule.every(20).seconds.do(run_threaded, run_cron_options_flow).tag('options_flow_job') +schedule.every(20).seconds.do(run_threaded, run_cron_options_zero_dte).tag('options_zero_dte_job') # Run the scheduled jobs indefinitelyp