Closed alphaDev23 closed 1 year ago
This isn't a request for 1 minute bars but a request for 1 day bars.
Are you sure it didn't work? Look in data/STK/1_day/AMGN.csv
The above file is actually there but the script also creates an AMGN folder, which I was looking in. I think this folder should be not be created or is there a need for it?
The following produces no data. There is data for minute bars at least of the first 5 days.
./src/download_bars.py -p 7497 --size "1 day" --start-date 20200202 --end-date 20210207 AMGN 03:36:04,392 ibapi.client INFO sent startApi 03:36:04,393 ibapi.client INFO REQUEST startApi {} 03:36:04,393 ibapi.client INFO SENDING startApi b'\x00\x00\x00\x0871\x002\x000\x00\x00' 03:36:04,393 root INFO Connected 03:36:04,394 root INFO Waiting for thread to finish ... 03:36:04,439 ibapi.wrapper INFO ANSWER nextValidId {'orderId': 1} 03:36:04,440 root INFO nextValidId: 1 03:36:04,440 ibapi.client INFO REQUEST reqContractDetails {'reqId': 1, 'contract': 139795742161360: 0,AMGN,STK,,0,,,SMART,,USD,,,False,,,,combo:} 03:36:04,441 ibapi.client INFO SENDING reqContractDetails b'\x00\x00\x00*9\x008\x001\x000\x00AMGN\x00STK\x00\x000.0\x00\x00\x00SMART\x00\x00USD\x00\x00\x000\x00\x00\x00\x00' 03:36:04,441 ibapi.wrapper INFO ANSWER error {'reqId': -1, 'errorCode': 2104, 'errorString': 'Market data farm connection is OK:uscrypto', 'advancedOrderRejectJson': ''} 03:36:04,441 ibapi.wrapper ERROR ERROR -1 2104 Market data farm connection is OK:uscrypto 03:36:04,442 ibapi.wrapper INFO ANSWER error {'reqId': -1, 'errorCode': 2104, 'errorString': 'Market data farm connection is OK:usfuture.nj', 'advancedOrderRejectJson': ''} 03:36:04,442 ibapi.wrapper ERROR ERROR -1 2104 Market data farm connection is OK:usfuture.nj 03:36:04,442 ibapi.wrapper INFO ANSWER error {'reqId': -1, 'errorCode': 2104, 'errorString': 'Market data farm connection is OK:usfarm.nj', 'advancedOrderRejectJson': ''} 03:36:04,442 ibapi.wrapper ERROR ERROR -1 2104 Market data farm connection is OK:usfarm.nj 03:36:04,442 ibapi.wrapper INFO ANSWER error {'reqId': -1, 'errorCode': 2104, 'errorString': 'Market data farm connection is OK:cashfarm', 'advancedOrderRejectJson': ''} 03:36:04,443 ibapi.wrapper ERROR ERROR -1 2104 Market data farm connection is OK:cashfarm 03:36:04,443 ibapi.wrapper INFO ANSWER error {'reqId': -1, 'errorCode': 2104, 'errorString': 'Market data farm connection is OK:usfarm', 'advancedOrderRejectJson': ''} 03:36:04,443 ibapi.wrapper ERROR ERROR -1 2104 Market data farm connection is OK:usfarm 03:36:04,443 ibapi.wrapper INFO ANSWER error {'reqId': -1, 'errorCode': 2106, 'errorString': 'HMDS data farm connection is OK:euhmds', 'advancedOrderRejectJson': ''} 03:36:04,443 ibapi.wrapper ERROR ERROR -1 2106 HMDS data farm connection is OK:euhmds 03:36:04,443 ibapi.wrapper INFO ANSWER error {'reqId': -1, 'errorCode': 2106, 'errorString': 'HMDS data farm connection is OK:cashhmds', 'advancedOrderRejectJson': ''} 03:36:04,443 ibapi.wrapper ERROR ERROR -1 2106 HMDS data farm connection is OK:cashhmds 03:36:04,443 ibapi.wrapper INFO ANSWER managedAccounts {'accountsList': ''}
03:36:04,444 ibapi.wrapper INFO ANSWER error {'reqId': -1, 'errorCode': 2106, 'errorString': 'HMDS data farm connection is OK:fundfarm', 'advancedOrderRejectJson': ''}
03:36:04,444 ibapi.wrapper ERROR ERROR -1 2106 HMDS data farm connection is OK:fundfarm
03:36:04,447 ibapi.wrapper INFO ANSWER error {'reqId': -1, 'errorCode': 2106, 'errorString': 'HMDS data farm connection is OK:ushmds', 'advancedOrderRejectJson': ''}
03:36:04,447 ibapi.wrapper ERROR ERROR -1 2106 HMDS data farm connection is OK:ushmds
03:36:04,448 ibapi.wrapper INFO ANSWER error {'reqId': -1, 'errorCode': 2158, 'errorString': 'Sec-def data farm connection is OK:secdefil', 'advancedOrderRejectJson': ''}
03:36:04,448 ibapi.wrapper ERROR ERROR -1 2158 Sec-def data farm connection is OK:secdefil
03:36:04,518 ibapi.wrapper INFO ANSWER contractDetails {'reqId': 1, 'contractDetails': 139795742608688: 266145,AMGN,STK,,0,,,SMART,NASDAQ,USD,AMGN,NMS,False,,,,combo:,NMS,0.01,ACTIVETIM,AD,ADJUST,ALERT,ALGO,ALLOC,AON,AVGCOST,BASKET,BENCHPX,CASHQTY,COND,CONDORDER,DARKONLY,DARKPOLL,DAY,DEACT,DEACTDIS,DEACTEOD,DIS,DUR,GAT,GTC,GTD,GTT,HID,IBKRATS,ICE,IMB,IOC,LIT,LMT,LOC,MIDPX,MIT,MKT,MOC,MTL,NGCOMB,NODARK,NONALGO,OCA,OPG,OPGREROUT,PEGBENCH,PEGMID,POSTATS,POSTONLY,PREOPGRTH,PRICECHK,REL,REL2MID,RELPCTOFS,RPI,RTH,SCALE,SCALEODD,SCALERST,SIZECHK,SMARTSTG,SNAPMID,SNAPMKT,SNAPREL,STP,STPLMT,SWEEP,TRAIL,TRAILLIT,TRAILLMT,TRAILMIT,WHATIF,SMART,AMEX,NYSE,CBOE,PHLX,ISE,CHX,ARCA,ISLAND,DRCTEDGE,BEX,BATS,EDGEA,CSFBALGO,JEFFALGO,BYX,IEX,EDGX,FOXRIVER,PEARL,NYSENAT,LTSE,MEMX,TPLUS1,PSX,1,0,AMGEN INC,,Consumer, Non-cyclical,Biotechnology,Medical-Biomedical/Gene,US/Eastern,20230326:CLOSED;20230327:0400-20230327:2000;20230328:0400-20230328:2000;20230329:0400-20230329:2000;20230330:0400-20230330:2000;20230331:0400-20230331:2000,20230326:CLOSED;20230327:0930-20230327:1600;20230328:0930-20230328:1600;20230329:0930-20230329:1600;20230330:0930-20230330:1600;20230331:0930-20230331:1600,,0,,,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,1,[139795742218224: ISIN=US0311621009;],,COMMON,,,,,,False,False,0,False,,,,,False,,1,1,100}
03:36:04,518 ibapi.client INFO REQUEST reqHeadTimeStamp {'reqId': 2, 'contract': 139795742218176: 266145,AMGN,STK,,0,,,SMART,NASDAQ,USD,AMGN,NMS,False,,,,combo:, 'whatToShow': 'TRADES', 'useRTH': 0, 'formatDate': 1}
03:36:04,518 ibapi.client INFO SENDING reqHeadTimeStamp b'\x00\x00\x00C87\x002\x00266145\x00AMGN\x00STK\x00\x000.0\x00\x00\x00SMART\x00NASDAQ\x00USD\x00AMGN\x00NMS\x000\x000\x00TRADES\x001\x00'
03:36:04,590 root INFO Head Timestamp for 266145,AMGN,STK,,0,,,SMART,NASDAQ,USD,AMGN,NMS,False,,,,combo: is 1983-06-17 13:30:00+00:00
03:36:04,590 ibapi.client INFO REQUEST reqHistoricalData {'reqId': 3, 'contract': 139795742218176: 266145,AMGN,STK,,0,,,SMART,NASDAQ,USD,AMGN,NMS,False,,,,combo:, 'endDateTime': '20210207 00:00:00 UTC', 'durationStr': '2 Y', 'barSizeSetting': '1 day', 'whatToShow': 'TRADES', 'useRTH': True, 'formatDate': 1, 'keepUpToDate': False, 'chartOptions': []}
03:36:04,590 ibapi.client INFO SENDING reqHistoricalData b'\x00\x00\x00f20\x003\x00266145\x00AMGN\x00STK\x00\x000.0\x00\x00\x00SMART\x00NASDAQ\x00USD\x00AMGN\x00NMS\x000\x0020210207 00:00:00 UTC\x001 day\x002 Y\x001\x00TRADES\x001\x000\x00\x00'
03:36:04,861 ibapi.wrapper INFO ANSWER historicalDataEnd {'reqId': 3, 'start': '20190206 17:00:00 America/Denver', 'end': '20210206 17:00:00 America/Denver'}
03:36:04,861 root INFO historicalDataEnd: 3 20190206 17:00:00 America/Denver 20210206 17:00:00 America/Denver
03:36:04,881 root INFO All requests for 2021-02-07 00:00:00+00:00 complete.
03:36:04,907 root INFO Sending code 0
03:36:04,908 root INFO Received code 0
03:36:04,908 ibapi.client INFO disconnecting
03:36:04,908 ibapi.wrapper INFO ANSWER connectionClosed {}