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

Error: Warning: You submitted request with date-time attributes without explicit time zone. #29

Open
junajan opened this issue May 30, 2024 · 0 comments · May be fixed by #30
Open

Error: Warning: You submitted request with date-time attributes without explicit time zone. #29

junajan opened this issue May 30, 2024 · 0 comments · May be fixed by #30

Comments

@junajan
Copy link

junajan commented May 30, 2024

IB has changed the timezone format in TWS 10.17+ and now it requires us to provide timezone at the end of the dates.
See info here: https://forum.amibroker.com/t/please-look-at-timeinforce-part-of-place-order-code/31980/3

So instead:

let details = await api.getHistoricalData({
    contract: Contract.stock('AAPL'),
    endDateTime: '20200308 12:00:00,
    duration: '1 D',
    barSizeSetting: '1 min',
    whatToShow: 'TRADES',
    useRth: 1,
    formatDate: 1
});

Valid date format is now:

let details = await api.getHistoricalData({
    contract: Contract.stock('AAPL'),
    endDateTime: '20200308 12:00:00 US/Eastern', // or for UTC: 20200308-12:00:00
    duration: '1 D',
    barSizeSetting: '1 min',
    whatToShow: 'TRADES',
    useRth: 1,
    formatDate: 1
});
@junajan junajan linked a pull request May 30, 2024 that will close this issue
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

Successfully merging a pull request may close this issue.

1 participant