Is it possible to get historical data for the current day?

We are trying to get historical bars for the current day without success. Here the code we are using and the resulting log:

create_db(db_name, universes=[universe], bar_size='5 mins', times=['09:35:00', ], shard='off')
collect_history(db_name, start_date='2022-01-18')

Here the history service log:

2022-01-20 15:15:17 UTC| <14>1 2022-01-20T15:15:17Z 90dbfa1288d7 quantrocket_history_1 7993 - - Setting IB historical data timeout to initial value of 30 seconds
2022-01-20 15:15:19 UTC| <14>1 2022-01-20T15:15:19Z 90dbfa1288d7 quantrocket_history_1 7993 - - ibg1 client 9383 got IB error code 2104: Market data farm connection is OK:usfarm.nj
2022-01-20 15:15:19 UTC| <14>1 2022-01-20T15:15:19Z 90dbfa1288d7 quantrocket_history_1 7993 - - ibg1 client 9383 got IB error code 2104: Market data farm connection is OK:usfarm
2022-01-20 15:15:19 UTC| <14>1 2022-01-20T15:15:19Z 90dbfa1288d7 quantrocket_history_1 7993 - - ibg1 client 9383 got IB error code 2107: HMDS data farm connection is inactive but should be available upon demand.ushmds.nj
2022-01-20 15:15:19 UTC| <14>1 2022-01-20T15:15:19Z 90dbfa1288d7 quantrocket_history_1 7993 - - ibg1 client 9383 got IB error code 2107: HMDS data farm connection is inactive but should be available upon demand.ushmds
2022-01-20 15:15:19 UTC| <14>1 2022-01-20T15:15:19Z 90dbfa1288d7 quantrocket_history_1 7993 - - Issuing to ibg2 historical data request for 3 D of 5 mins TRADES for A STK (conid 1715006) ending 20220120 15:20:00 GMT
2022-01-20 15:15:19 UTC| <14>1 2022-01-20T15:15:19Z 90dbfa1288d7 quantrocket_history_1 7993 - - Issuing to ibg1 historical data request for 3 D of 5 mins TRADES for AA STK (conid 251962528) ending 20220120 15:20:00 GMT
2022-01-20 15:15:19 UTC| <14>1 2022-01-20T15:15:19Z 90dbfa1288d7 quantrocket_history_1 7993 - - ibg2 client 9383 got IB error code 2104: Market data farm connection is OK:usfarm
2022-01-20 15:15:19 UTC| <14>1 2022-01-20T15:15:19Z 90dbfa1288d7 quantrocket_history_1 7993 - - ibg2 client 9383 got IB error code 2107: HMDS data farm connection is inactive but should be available upon demand.ushmds
2022-01-20 15:15:20 UTC| <14>1 2022-01-20T15:15:20Z 90dbfa1288d7 quantrocket_history_1 7993 - - ibg1 client 9383 got IB error code 2106: HMDS data farm connection is OK:ushmds
2022-01-20 15:15:20 UTC| <14>1 2022-01-20T15:15:20Z 90dbfa1288d7 quantrocket_history_1 7993 - - ibg2 client 9383 got IB error code 2106: HMDS data farm connection is OK:ushmds
2022-01-20 15:15:20 UTC| <14>1 2022-01-20T15:15:20Z 90dbfa1288d7 quantrocket_history_1 7993 - - Issuing to ibg2 historical data request for 3 D of 5 mins TRADES for AAL STK (conid 139673266) ending 20220120 15:20:00 GMT
2022-01-20 15:15:20 UTC| <14>1 2022-01-20T15:15:20Z 90dbfa1288d7 quantrocket_history_1 7993 - - Issuing to ibg1 historical data request for 3 D of 5 mins TRADES for AAP STK (conid 4027) ending 20220120 15:20:00 GMT
2022-01-20 15:15:20 UTC| <14>1 2022-01-20T15:15:20Z 90dbfa1288d7 quantrocket_history_1 7993 - - Processing 166 raw bars from IB for A STK (conid 1715006)
2022-01-20 15:15:20 UTC| <14>1 2022-01-20T15:15:20Z 90dbfa1288d7 quantrocket_history_1 7993 - - Issuing to ibg2 historical data request for 3 D of 5 mins TRADES for AAPL STK (conid 265598) ending 20220120 15:20:00 GMT
2022-01-20 15:15:20 UTC| <14>1 2022-01-20T15:15:20Z 90dbfa1288d7 quantrocket_history_1 7993 - - Issuing to ibg1 historical data request for 3 D of 5 mins TRADES for ABBV STK (conid 118089500) ending 20220120 15:20:00 GMT
2022-01-20 15:15:20 UTC| <14>1 2022-01-20T15:15:20Z 90dbfa1288d7 quantrocket_history_1 7993 - - Issuing to ibg2 historical data request for 3 D of 5 mins TRADES for ABNB STK (conid 459530964) ending 20220120 15:20:00 GMT
2022-01-20 15:15:20 UTC| <14>1 2022-01-20T15:15:20Z 90dbfa1288d7 quantrocket_history_1 7993 - - Processing 166 raw bars from IB for AA STK (conid 251962528)
2022-01-20 15:15:20 UTC| <14>1 2022-01-20T15:15:20Z 90dbfa1288d7 quantrocket_history_1 7993 - - Saving 1 historical bars for 1 securities to quantrocket.history.hist20220120t151517db.sqlite
2022-01-20 15:15:20 UTC| <14>1 2022-01-20T15:15:20Z 90dbfa1288d7 quantrocket_history_1 7993 - - Issuing to ibg1 historical data request for 3 D of 5 mins TRADES for ABT STK (conid 4065) ending 20220120 15:20:00 GMT
2022-01-20 15:15:20 UTC| <14>1 2022-01-20T15:15:20Z 90dbfa1288d7 quantrocket_history_1 7993 - - Issuing to ibg2 historical data request for 3 D of 5 mins TRADES for ACN STK (conid 67889930) ending 20220120 15:20:00 GMT
2022-01-20 15:15:20 UTC| <14>1 2022-01-20T15:15:20Z 90dbfa1288d7 quantrocket_history_1 7993 - - Processing 166 raw bars from IB for AAL STK (conid 139673266)
2022-01-20 15:15:20 UTC| <14>1 2022-01-20T15:15:20Z 90dbfa1288d7 quantrocket_history_1 7993 - - Saving 1 historical bars for 1 securities to quantrocket.history.hist20220120t151517db.sqlite
2022-01-20 15:15:20 UTC| <14>1 2022-01-20T15:15:20Z 90dbfa1288d7 quantrocket_history_1 7993 - - Processing 166 raw bars from IB for AAP STK (conid 4027)
2022-01-20 15:15:20 UTC| <14>1 2022-01-20T15:15:20Z 90dbfa1288d7 quantrocket_history_1 7993 - - Saving 1 historical bars for 1 securities to quantrocket.history.hist20220120t151517db.sqlite
2022-01-20 15:15:20 UTC| <14>1 2022-01-20T15:15:20Z 90dbfa1288d7 quantrocket_history_1 7993 - - Issuing to ibg2 historical data request for 3 D of 5 mins TRADES for ADBE STK (conid 265768) ending 20220120 15:20:00 GMT
2022-01-20 15:15:20 UTC| <14>1 2022-01-20T15:15:20Z 90dbfa1288d7 quantrocket_history_1 7993 - - Issuing to ibg1 historical data request for 3 D of 5 mins TRADES for ADI STK (conid 4157) ending 20220120 15:20:00 GMT
2022-01-20 15:15:21 UTC| <14>1 2022-01-20T15:15:21Z 90dbfa1288d7 quantrocket_history_1 7993 - - Head timestamps were reset to 2004-01-26T09:30:00-05:00 for 14 securities in hist20220120t151517db because intraday data is known to be unavailable before that date for North America stocks (earlier head timestamps apply to EOD data only)
2022-01-20 15:15:21 UTC| <14>1 2022-01-20T15:15:21Z 90dbfa1288d7 quantrocket_history_1 7993 - - Processing 166 raw bars from IB for AAPL STK (conid 265598)
2022-01-20 15:15:21 UTC| <14>1 2022-01-20T15:15:21Z 90dbfa1288d7 quantrocket_history_1 7993 - - Issuing to ibg1 historical data request for 3 D of 5 mins TRADES for ADM STK (conid 4165) ending 20220120 15:20:00 GMT
2022-01-20 15:15:21 UTC| <14>1 2022-01-20T15:15:21Z 90dbfa1288d7 quantrocket_history_1 7993 - - Saving 1 historical bars for 1 securities to quantrocket.history.hist20220120t151517db.sqlite
2022-01-20 15:15:21 UTC| <14>1 2022-01-20T15:15:21Z 90dbfa1288d7 quantrocket_history_1 7993 - - ┌──────────────────────────────────────────────────────┐
2022-01-20 15:15:21 UTC| <14>1 2022-01-20T15:15:21Z 90dbfa1288d7 quantrocket_history_1 7993 - - │ hist20220120t151517db IB response times: │
2022-01-20 15:15:21 UTC| <14>1 2022-01-20T15:15:21Z 90dbfa1288d7 quantrocket_history_1 7993 - - │         all  ibg1  ibg2                              │
2022-01-20 15:15:21 UTC| <14>1 2022-01-20T15:15:21Z 90dbfa1288d7 quantrocket_history_1 7993 - - │ count  10.0   4.0   5.0                              │
2022-01-20 15:15:21 UTC| <14>1 2022-01-20T15:15:21Z 90dbfa1288d7 quantrocket_history_1 7993 - - │ mean    0.2   0.3   0.2                              │
2022-01-20 15:15:21 UTC| <14>1 2022-01-20T15:15:21Z 90dbfa1288d7 quantrocket_history_1 7993 - - │ std     0.2   0.2   0.2                              │
2022-01-20 15:15:21 UTC| <14>1 2022-01-20T15:15:21Z 90dbfa1288d7 quantrocket_history_1 7993 - - │ min     0.1   0.1   0.1                              │
2022-01-20 15:15:21 UTC| <14>1 2022-01-20T15:15:21Z 90dbfa1288d7 quantrocket_history_1 7993 - - │ 25%     0.1   0.1   0.1                              │
2022-01-20 15:15:21 UTC| <14>1 2022-01-20T15:15:21Z 90dbfa1288d7 quantrocket_history_1 7993 - - │ 50%     0.1   0.3   0.1                              │
2022-01-20 15:15:21 UTC| <14>1 2022-01-20T15:15:21Z 90dbfa1288d7 quantrocket_history_1 7993 - - │ 75%     0.4   0.4   0.4                              │
2022-01-20 15:15:21 UTC| <14>1 2022-01-20T15:15:21Z 90dbfa1288d7 quantrocket_history_1 7993 - - │ max     0.5   0.5   0.4                              │
2022-01-20 15:15:21 UTC| <14>1 2022-01-20T15:15:21Z 90dbfa1288d7 quantrocket_history_1 7993 - - └──────────────────────────────────────────────────────┘
2022-01-20 15:15:21 UTC| <14>1 2022-01-20T15:15:21Z 90dbfa1288d7 quantrocket_history_1 7993 - - Issuing to ibg2 historical data request for 3 D of 5 mins TRADES for ADP STK (conid 4661) ending 20220120 15:20:00 GMT
2022-01-20 15:15:21 UTC| <14>1 2022-01-20T15:15:21Z 90dbfa1288d7 quantrocket_history_1 7993 - - Issuing to ibg2 historical data request for 3 D of 5 mins TRADES for ADSK STK (conid 265681) ending 20220120 15:20:00 GMT
2022-01-20 15:15:21 UTC| <14>1 2022-01-20T15:15:21Z 90dbfa1288d7 quantrocket_history_1 7993 - - Issuing to ibg1 historical data request for 3 D of 5 mins TRADES for AEP STK (conid 4211) ending 20220120 15:20:00 GMT
2022-01-20 15:15:21 UTC| <14>1 2022-01-20T15:15:21Z 90dbfa1288d7 quantrocket_history_1 7993 - - Processing 166 raw bars from IB for ABBV STK (conid 118089500)
2022-01-20 15:15:21 UTC| <14>1 2022-01-20T15:15:21Z 90dbfa1288d7 quantrocket_history_1 7993 - - Saving 1 historical bars for 1 securities to quantrocket.history.hist20220120t151517db.sqlite
2022-01-20 15:15:21 UTC| <14>1 2022-01-20T15:15:21Z 90dbfa1288d7 quantrocket_history_1 7993 - - Issuing to ibg2 historical data request for 3 D of 5 mins TRADES for AFL STK (conid 4227) ending 20220120 15:20:00 GMT
2022-01-20 15:15:21 UTC| <14>1 2022-01-20T15:15:21Z 90dbfa1288d7 quantrocket_history_1 7993 - - Issuing to ibg1 historical data request for 3 D of 5 mins TRADES for AFRM STK (conid 465119069) ending 20220120 15:20:00 GMT
2022-01-20 15:15:21 UTC| <14>1 2022-01-20T15:15:21Z 90dbfa1288d7 quantrocket_history_1 7993 - - Issuing to ibg2 historical data request for 3 D of 5 mins TRADES for AGNC STK (conid 249963585) ending 20220120 15:20:00 GMT
2022-01-20 15:15:21 UTC| <14>1 2022-01-20T15:15:21Z 90dbfa1288d7 quantrocket_history_1 7993 - - Issuing to ibg1 historical data request for 3 D of 5 mins TRADES for AI STK (conid 459113767) ending 20220120 15:20:00 GMT
2022-01-20 15:15:21 UTC| <14>1 2022-01-20T15:15:21Z 90dbfa1288d7 quantrocket_history_1 7993 - - Processing 166 raw bars from IB for ABNB STK (conid 459530964)
2022-01-20 15:15:21 UTC| <14>1 2022-01-20T15:15:21Z 90dbfa1288d7 quantrocket_history_1 7993 - - Saving 1 historical bars for 1 securities to quantrocket.history.hist20220120t151517db.sqlite
2022-01-20 15:15:21 UTC| <14>1 2022-01-20T15:15:21Z 90dbfa1288d7 quantrocket_history_1 7993 - - Issuing to ibg1 historical data request for 3 D of 5 mins TRADES for AKAM STK (conid 6220356) ending 20220120 15:20:00 GMT
2022-01-20 15:15:21 UTC| <14>1 2022-01-20T15:15:21Z 90dbfa1288d7 quantrocket_history_1 7993 - - Issuing to ibg2 historical data request for 3 D of 5 mins TRADES for ALB STK (conid 4347) ending 20220120 15:20:00 GMT
2022-01-20 15:15:21 UTC| <14>1 2022-01-20T15:15:21Z 90dbfa1288d7 quantrocket_history_1 7993 - - Issuing to ibg2 historical data request for 3 D of 5 mins TRADES for ALGN STK (conid 11459264) ending 20220120 15:20:00 GMT
2022-01-20 15:15:21 UTC| <14>1 2022-01-20T15:15:21Z 90dbfa1288d7 quantrocket_history_1 7993 - - Issuing to ibg1 historical data request for 3 D of 5 mins TRADES for ALK STK (conid 4352) ending 20220120 15:20:00 GMT
2022-01-20 15:15:21 UTC| <14>1 2022-01-20T15:15:21Z 90dbfa1288d7 quantrocket_history_1 7993 - - Processing 166 raw bars from IB for ABT STK (conid 4065)
2022-01-20 15:15:21 UTC| <14>1 2022-01-20T15:15:21Z 90dbfa1288d7 quantrocket_history_1 7993 - - Saving 1 historical bars for 1 securities to quantrocket.history.hist20220120t151517db.sqlite
2022-01-20 15:15:21 UTC| <14>1 2022-01-20T15:15:21Z 90dbfa1288d7 quantrocket_history_1 7993 - - Issuing to ibg2 historical data request for 3 D of 5 mins TRADES for ALL STK (conid 4357) ending 20220120 15:20:00 GMT
2022-01-20 15:15:21 UTC| <14>1 2022-01-20T15:15:21Z 90dbfa1288d7 quantrocket_history_1 7993 - - Issuing to ibg1 historical data request for 3 D of 5 mins TRADES for AMAT STK (conid 266093) ending 20220120 15:20:00 GMT
2022-01-20 15:15:22 UTC| <14>1 2022-01-20T15:15:22Z 90dbfa1288d7 quantrocket_history_1 7993 - - Issuing to ibg2 historical data request for 3 D of 5 mins TRADES for AMC STK (conid 140070600) ending 20220120 15:20:00 GMT
.....
.....
2022-01-20 15:16:42 UTC| <14>1 2022-01-20T15:16:42Z 90dbfa1288d7 quantrocket_history_1 7993 - - Processing 166 raw bars from IB for ZBH STK (conid 12851783)
2022-01-20 15:16:42 UTC| <14>1 2022-01-20T15:16:42Z 90dbfa1288d7 quantrocket_history_1 7993 - - Saving 1 historical bars for 1 securities to quantrocket.history.hist20220120t151517db.sqlite
2022-01-20 15:16:42 UTC| <14>1 2022-01-20T15:16:42Z 90dbfa1288d7 quantrocket_history_1 7993 - - Processing 166 raw bars from IB for ZBRA STK (conid 276304)
2022-01-20 15:16:42 UTC| <14>1 2022-01-20T15:16:42Z 90dbfa1288d7 quantrocket_history_1 7993 - - Saving 1 historical bars for 1 securities to quantrocket.history.hist20220120t151517db.sqlite
2022-01-20 15:16:42 UTC| <14>1 2022-01-20T15:16:42Z 90dbfa1288d7 quantrocket_history_1 7993 - - Processing 166 raw bars from IB for ZIM STK (conid 468091282)
2022-01-20 15:16:42 UTC| <14>1 2022-01-20T15:16:42Z 90dbfa1288d7 quantrocket_history_1 7993 - - Saving 1 historical bars for 1 securities to quantrocket.history.hist20220120t151517db.sqlite
2022-01-20 15:16:42 UTC| <14>1 2022-01-20T15:16:42Z 90dbfa1288d7 quantrocket_history_1 7993 - - Processing 166 raw bars from IB for ZM STK (conid 361181057)
2022-01-20 15:16:42 UTC| <14>1 2022-01-20T15:16:42Z 90dbfa1288d7 quantrocket_history_1 7993 - - Saving 1 historical bars for 1 securities to quantrocket.history.hist20220120t151517db.sqlite
2022-01-20 15:16:43 UTC| <14>1 2022-01-20T15:16:43Z 90dbfa1288d7 quantrocket_history_1 7993 - - Processing 166 raw bars from IB for ZS STK (conid 310621426)
2022-01-20 15:16:43 UTC| <14>1 2022-01-20T15:16:43Z 90dbfa1288d7 quantrocket_history_1 7993 - - Saving 1 historical bars for 1 securities to quantrocket.history.hist20220120t151517db.sqlite
2022-01-20 15:16:43 UTC| <14>1 2022-01-20T15:16:43Z 90dbfa1288d7 quantrocket_history_1 7993 - - Processing 166 raw bars from IB for ZTS STK (conid 121665622)
2022-01-20 15:16:43 UTC| <14>1 2022-01-20T15:16:43Z 90dbfa1288d7 quantrocket_history_1 7993 - - Saving 1 historical bars for 1 securities to quantrocket.history.hist20220120t151517db.sqlite
2022-01-20 15:16:43 UTC| <14>1 2022-01-20T15:16:43Z 90dbfa1288d7 quantrocket_history_1 7993 - - Saving 1 historical bars for 1 securities to quantrocket.history.hist20220120t151517db.sqlite
2022-01-20 15:16:46 UTC| <14>1 2022-01-20T15:16:46Z 90dbfa1288d7 quantrocket_history_1 7993 - - recycling mule after collecting history
2022-01-20 15:16:47 UTC| <14>1 2022-01-20T15:16:47Z 90dbfa1288d7 quantrocket_history_1 7993 - - OOOPS mule 1 (pid: 6383) crippled...trying respawn...
2022-01-20 15:16:47 UTC| <14>1 2022-01-20T15:16:47Z 90dbfa1288d7 quantrocket_history_1 7993 - - spawned uWSGI mule 1 (pid: 6787)

As you can see it is only saving 1 bar per security (the 2020-01-19 bar), but we are executing this on 2020-01-20 at 10:10 so 9:35 bar should be already available and collected.

We have tried different parameters on the code: day shard, between_times parameter, different times, outside_rth parameter.... we did not success with any of them.

Is it possible to get historical data for the current day?

If the current day data is not coming back, then it must not be available. I don’t think QuantRocket is discarding it, but you can enable and check the IB Gateway message log to be sure of what IBKR is sending back.