ig-python / trading-ig

A lightweight Python wrapper for the IG Markets API
https://trading-ig.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
308 stars 196 forks source link

IG Rest API gives error.security.client-token-invalid after 13-14 hours of continuous usage #268

Closed MilindRCodes closed 10 months ago

MilindRCodes commented 1 year ago

I observed that the IG Rest API gives the error.security.client-token-invalid error after 13-14 hours of continuous usage in the demo account.

I would appreciate guidance on possible ways to overcome this error.

Thank you.

bug-or-feature commented 1 year ago

https://trading-ig.readthedocs.io/en/latest/faq.html#what-if-i-have-a-problem

galburn commented 1 year ago

I don't experience this issue. Can you please detail exactly how you see it?

MilindRCodes commented 1 year ago

[@galburn]

I put it on a continuous run using the demo account and after 13-14 hours, I got this error,

I tested it twice and got this error everytime.

IG Error

galburn commented 1 year ago

I don't see this issue at all. My code runs all week without a problem. Can you put up the code? Particularly which version of the login calls you are using. Ideally, a minimal code version that shows the issue.

Zartexo commented 1 year ago

Are you doing anything in the first 13- 14 hours? The token expires after about 12 hours if not used. It automaticly refreshes upon opening a position, fetching open positions or something else

bug-or-feature commented 10 months ago

No updates or responses, closing