g-make-it / IG_Trading_Algo_Scripts_Python

IG Trading Algos and Scripts in Python
BSD 3-Clause "New" or "Revised" License
215 stars 48 forks source link

Make use of config.acc_number #3

Open Andrew-Horton opened 2 years ago

Andrew-Horton commented 2 years ago

For some reason IG removed optino to set default account in demo account and my one is set to CFD. I would suggest to add ig_service.switch_account() to have possibility of switching demo accounts. I tried to amend initialisation class but I couldn't make it work.

g-make-it commented 2 years ago

Hi Andrew,

I had some issues here as well, switching accounts is hard todo via the API programmatically, I would suggest using the online developer console IG offers: Base website: https://labs.ig.com/ The rest API console (can switch accounts here): https://labs.ig.com/sample-apps/api-companion/index.html