-
-
Notifications
You must be signed in to change notification settings - Fork 505
Data not being stored to database #36
Comments
Hi, It seems that the log2db in blotter.py has a bug. Might be because of latest version of mysql. https://github.com/ranaroussi/qtpylib/blob/master/qtpylib/blotter.py#L641 After changing However, there's still another problem with futures data where the symbol is not being created. Problem was in the symbols.csv file for the futures specification which was incorrect for the expiry. |
I can confirm that removal of the quotes fixes this issue when connecting to a TWS instance NOT using an FA account. |
You're absolutely right, though personally I've never encountered this issue. Just out of curiosity - what version of MySQL are you using? In any case, this should be fixed in version $ pip install qtpylib --upgrade --no-cache-dir LMK if that fixed the issue. |
I experienced the issue on MariaDB 10.1.19 and on MySQL 5.7 |
Thanks! Everything seems to be working now? |
Really like the approach you are taking here and look forward to participating in the improvement.
But in the short term, I'm struggling to get data into the local mysql database. Hoping you can give some suggestions as to how to further debug this.
Currently connecting to a remote TWS instance. I've tried running TWS on a couple of different systems in case there is an API problem. As you can see below, Blotter starts up and indicates it is adding the contracts.
But looking in the mysql database running on the same server, I have no data stored to the tables:
I ran into some other errors when trying to add some ETFs like SPY, SSO, etc. but will see if first I can get this working with your example instruments. TWS is configured as you show in your screenshots.
The text was updated successfully, but these errors were encountered: