Giter VIP home page Giter VIP logo

Comments (5)

redbullpeter avatar redbullpeter commented on June 26, 2024

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.

redbullpeter avatar redbullpeter commented on June 26, 2024

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.

redbullpeter avatar redbullpeter commented on June 26, 2024

@femtotrader Can you give me rights to open a pull request.

from trading-ig.

femtotrader avatar femtotrader commented on June 26, 2024

You don't need any rights to open a PR.

You just need to first fork this repository.
capture d ecran 2017-02-02 a 20 49 06

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.

femtotrader avatar femtotrader commented on June 26, 2024

Thanks @M1ntcraft3r and @redbullpeter

from trading-ig.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.