Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

historicalDataEnd is never emitted #135

Open
tredondo opened this issue Nov 18, 2018 · 0 comments
Open

historicalDataEnd is never emitted #135

tredondo opened this issue Nov 18, 2018 · 0 comments

Comments

@tredondo
Copy link
Contributor

This can be seen in the example, or simplified:

const ib = new (require('ib'))({
  // clientId: 0,
  // host: '127.0.0.1',
  // port: 7496
}).on('error', err => {
  console.error(err.message);
}).on('result', (event, args) => {
  console.log(event, '---', args);
});

ib.connect();

ib.reqHistoricalData(
  // tickerId, contract, endDateTime, durationStr, barSizeSetting
  1, ib.contract.stock('SPY', 'SMART', 'USD'), '20160308 12:00:00', '1 W', '1 day',
  // whatToShow, useRTH, formatDate, keepUpToDate
  'TRADES', 1, 1, false
);

setTimeout(() => ib.disconnect(), 5 * 1000);

The last event is

historicalData --- [ 1, 'finished-20160301 12:00:00-20160308 12:00:00', -1, -1, ... ]

Why isn't historicalDataEnd emitted, when reqHistoricalData was called with keepUpToDate = false?

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

No branches or pull requests

1 participant