tg12/FAIG

AttributeError

Closed this issue · 6 comments

Hi, I am trying to test out your code but im getting the error:

File "C:\Users*****\Desktop\FAIG-master\igclient.py", line 91, in session
self.update_session({"accountId":self.accountId,"defaultAccount": "True"})

AttributeError: 'API' object has no attribute 'accountId'

I have input username, password and API in the config.conf file, so I am not sure what went wrong, tried to understand what went wrong in igclient.py but can't figure out. Can you help?

Thanks.
Curiouspota2

tg12 commented

Have you encapsulated it in quotes?
Have you got all the required modules (Installed with Pip)
Are the files in the right directory/Path?

must the modules be the same as the ones listed? or can it be a newer version. I was actually missing on pygobject which I thought i already had. Will install that and see how it goes

tg12 commented

It definitely should be the newest versions available. This wont break anything as far as I am aware. It's very good practice to keep everything up to date. The versions were the latest at the time of the project.

now that I've got everything right, but ended up with
requests.exceptions.Invalidschema: No connection adapters were found for ' "https://demo-api.ig.com/deal"/session'

By any chance do you also quote the api endpoint? if I don't quote api endpoint then I am getting a CST error.

also just realised that I am on CFD as spreadbet is not allowed outside of UK and Ireland, what do I need to change in the file?

tg12 commented

also just realised that I am on CFD as spreadbet is not allowed outside of UK and Ireland, what do I need to change in the file?

Hi, To change this to this would mean a fundamental code change (The trades are different)

Someone did try do it a while back, Their code might be somewhere on Github. Other than that I can't help I am afraid.