Skip to content
This repository has been archived by the owner on Jan 12, 2024. It is now read-only.

example history.py runs with errors #20

Open
josefstr opened this issue Sep 7, 2017 · 5 comments
Open

example history.py runs with errors #20

josefstr opened this issue Sep 7, 2017 · 5 comments

Comments

@josefstr
Copy link

josefstr commented Sep 7, 2017

I'm running the history.py example with
contract = ibConn.createStockContract("AAPL", exchange="NYSE")
or
contract = ibConn.createFuturesContract(symbol="FDAX", exchange="DTB", currency="EUR", expiry="201709")

I don't get any data, I just get the following errors:

Server Version: 76
TWS Time at connection:20170907 14:37:29 CET
2017-09-07 14:37:30,379 [ERROR] ezibpy: [#2107] HMDS data farm connection is inactive but should be available upon demand.ushmds.us
2017-09-07 14:37:30,380 [ERROR] ezibpy: [#2107] HMDS data farm connection is inactive but should be available upon demand.ilhmds
2017-09-07 14:37:30,380 [ERROR] ezibpy: [#2107] HMDS data farm connection is inactive but should be available upon demand.euhmds
2017-09-07 14:37:30,380 [ERROR] ezibpy: [#2107] HMDS data farm connection is inactive but should be available upon demand.ushmds
2017-09-07 14:37:31,383 [ERROR] ezibpy: [#321] Error validating request:-'a0' : cause - Invalid account code '0'.
2017-09-07 14:37:31,385 [ERROR] ezibpy: [#321] Error validating request:-'bm' : cause - Please enter exchange

I'm connecting to an advisor account.

@theblankneverloses
Copy link

I don't think the history portion of his code ever worked.

@rossdem699
Copy link

Did anybody get a resolution to this? I have had some very mixed results with getting data. Usually it just hangs. My request is - fut_contract = ibConn.createFuturesContract("GF", expiry="201806")
[#321] Error validating request:-'bm' : cause - Please enter exchange.
any ideas?

@asnatm
Copy link

asnatm commented May 31, 2018

@josefstr did u manage to solve this issue? can u share a code example for getting historical data? highly appreciated!

@josefstr
Copy link
Author

josefstr commented Jun 1, 2018

@asnatm I didn't start using this tool. So I cannot help you out.

@Zephio
Copy link

Zephio commented Nov 12, 2018

@asnatm I had a rough solution to this. Do a requesthistoricaldata with no contracts created first so that it prompts for market data then create the contracts, put a sleep for 10 seconds then requesthistoricaldata again.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants