Comments (5)
I get this error too when I run the test_ig_service function.
A cursory check shows that
IG returns a key called snapshotTime but not snapshotTimeUTC. Changing the expected key to snapshotTime (rest.py:line757) seems to solve the basic issue but then datetime doesn't seem to recognise the date format at (rest.py: line 758).
So it seems IG changed something since this piece of code was written...
I'll dig a little deeper later and see if I can fix it. It seems relatively simple.... (watch me eat my words!)
from trading-ig.
OK here's a fix:
line 757: df = df.set_index('snapshotTime')
line 758: df.index = pd.to_datetime(df.index, format="%Y:%m:%d-%H:%M:%S")
Be aware that the time index will be local time (timezone of the account) and not UTC. As part of the config we could require a timezone to use. But I'll leave that for another iteration.
from trading-ig.
@femtotrader Can you give me rights to open a pull request.
from trading-ig.
You don't need any rights to open a PR.
You just need to first fork this repository.
Clone your fork.
$ git clone https://github.com/YOU/REPOS
Define this repository as upstream.
$ git remote add upstream https://github.com/ORIGINAL_USER/REPOS
Create a branch
$ git checkout -b fix_issue_33
Modify code to fix issue (or add enhancement)
Commit your changes
$ git commit
Push to your repository
$ git push
Open a Pull request (from your repository)
https://help.github.com/articles/creating-a-pull-request/
https://help.github.com/articles/about-pull-requests/
from trading-ig.
Thanks @M1ntcraft3r and @redbullpeter
from trading-ig.
Related Issues (20)
- Unable to get OPU via streaming API
- Deal Id confirmed but no opend position HOT 1
- lighstreamer error in Docker container - EOFError: EOF when reading a line HOT 1
- fetch_historical_prices_by_epic_and_date_range : "puredeal:err:(none):403 Access forbidden!" HOT 2
- lightstreamer.py -- connect systemd.daemon not available, no watchdog notifications will be sent. HOT 2
- Communication Error / ConnectionResetError: [Errno 104] Connection reset by peer HOT 1
- Add support for new official Lightstreamer client lib HOT 2
- timeInForce for create_open_position() and close_open_position() HOT 4
- fetch_historical_prices_by_epic_and_date_range raise KeyError(key) from err KeyError: 'last' HOT 10
- Sample stream not working HOT 11
- Invalid session token, triggering refresh...
- Workaround for IG `/confirms` bug
- Deprecation error on lightreamer.Subscription HOT 2
- add functions for "Indicative costs and charges"
- Exception: error.security.account-token-invalid HOT 7
- pandas 2.2.0 causes warnings for future deprecations HOT 5
- Future warning in trading_ig\rest.py HOT 5
- IG Login (OAuth) v3 does not require an accountId HOT 1
- Different return for fetch_historical_prices_by_epic_and_date_range() HOT 1
- Improve ClientListener access
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from trading-ig.