Countdown Error

@Brian I receive the following error pertaining to my Countdown service every afternoon. My countdown service has the following which includes XCBT, which I thought was required for some Futures data I collect. Please let me know if XCBT is needed, should be replaced with another exchange symbol, or if I should just delete it from my Countdown.

# Collect data from Interactive Brokers each evening at 5:30 PM if the market was open for 15 Minute Futures
40 17 * * mon-fri quantrocket master isopen 'XCME' 'XCBT' 'XNYM' 'XCEC'  --ago '6h' && quantrocket history collect 'ibkr-futures-15mins' 
2025-01-28 17:40:02 quantrocket.countdown: ERROR Error running /opt/conda/bin/quantrocket master isopen XCME XCBT XNYM XCEC --ago 6h
2025-01-28 17:40:02 quantrocket.countdown: ERROR Traceback (most recent call last):
2025-01-28 17:40:02 quantrocket.countdown: ERROR   File "/opt/conda/lib/python3.11/site-packages/quantrocket/_cli/commands.py", line 110, in main
2025-01-28 17:40:02 quantrocket.countdown: ERROR     result, exit_code = func(**args)
2025-01-28 17:40:02 quantrocket.countdown: ERROR                         ^^^^^^^^^^^^
2025-01-28 17:40:02 quantrocket.countdown: ERROR   File "/opt/conda/lib/python3.11/site-packages/quantrocket/master.py", line 1608, in _cli_isopen
2025-01-28 17:40:02 quantrocket.countdown: ERROR     statuses = list_calendar_statuses(exchanges, sec_type=sec_type, in_=in_, ago=ago, outside_rth=outside_rth)
2025-01-28 17:40:02 quantrocket.countdown: ERROR                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-01-28 17:40:02 quantrocket.countdown: ERROR   File "/opt/conda/lib/python3.11/site-packages/quantrocket/master.py", line 1539, in list_calendar_statuses
2025-01-28 17:40:02 quantrocket.countdown: ERROR     houston.raise_for_status_with_json(response)
2025-01-28 17:40:02 quantrocket.countdown: ERROR   File "/opt/conda/lib/python3.11/site-packages/quantrocket/houston.py", line 225, in raise_for_status_with_json
2025-01-28 17:40:02 quantrocket.countdown: ERROR     raise e
2025-01-28 17:40:02 quantrocket.countdown: ERROR   File "/opt/conda/lib/python3.11/site-packages/quantrocket/houston.py", line 217, in raise_for_status_with_json
2025-01-28 17:40:02 quantrocket.countdown: ERROR     response.raise_for_status()
2025-01-28 17:40:02 quantrocket.countdown: ERROR   File "/opt/conda/lib/python3.11/site-packages/requests/models.py", line 1021, in raise_for_status
2025-01-28 17:40:02 quantrocket.countdown: ERROR     raise HTTPError(http_error_msg, response=self)
2025-01-28 17:40:02 quantrocket.countdown: ERROR requests.exceptions.HTTPError: ('400 Client Error: BAD REQUEST for url: http://houston/master/calendar?exchanges=XCME&exchanges=XCBT&exchanges=XNYM&exchanges=XCEC&ago=6h', {'status': 'error', 'msg': 'no trading hours available for XCBT before requested datetime'})

I would just pick one exchange and check if it was open. If it was open, the others were open.

@Brian the error is around the XCBT exchange. I received it again tonight and the CBOT was obviously open yesterday and today. As I said I've been receiving this error regularly. The database has successfully collected from the XCBT in the past but I've been ignoring it because it wasn't pressing and now I'm trying to trouble shoot it. Any further guidance would be appreciated. Thanks.

XCBT fails because exchange_calendars (which isopen uses) doesn’t support that particular MIC. You can use CBOT instead. See the choices here.

1 Like

Great. Thank you @Brian