nickcamel
-
Posts
7 -
Joined
-
Last visited
Content Type
Profiles
Forums
Blogs
Events
Community Tutorials
Store
Posts posted by nickcamel
-
-
12 hours ago, AndaIG said:
I did now, thanks. Will post here if I get a response.
- 1
-
This week the API has been very shaky for me.
The REST-API
- login,
- handshake for retrieving CST and X-SECURITY-TOKEN tokens
and the STREAMING API
- subscribing
all work pretty decent.
However, other REST-API calls, e.g. 'positions', 'prices', 'watchlists', most of the time return a connection error:
QuoteConnection broken: ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None)
Concurrent calls, say 1 in 50, returns an OK response. Concurrent = call, get connection broken response, wait, same call again, i.e. without any new logout / login routines.
I've tried with both live and demo account. Same behavior.
Funny enough, 'positions/otc' seem to work most of the time.
Anyone know what's up?
-
On 26/07/2020 at 20:34, jlz said:
@panja I added a method to retrieve prices within the IgClient class at
Input parameters are: Epic, Resolution, DateFrom and DateTo.
Resolution is an enum also part of the repository., check the possible values there.
An example url retrieving prices for the FTSE100 from the 20th to the 21st of July with a daily resolution would retrieve two candles, one per day.
Producing the result of:
result:[
{
"closePrice": {
"ask": 6269.3,
"bid": 6265.3,
"lastTraded": null
},
"highPrice": {
"ask": 6314.3,
"bid": 6310.3,
"lastTraded": null
},
"lastTradedVolume": 75212,
"lowPrice": {
"ask": 6220.1,
"bid": 6219.1,
"lastTraded": null
},
"openPrice": {
"ask": 6308.8,
"bid": 6304.8,
"lastTraded": null
},
"snapshotTime": "2020/07/20 00:00:00",
"snapshotTimeUTC": "2020-07-19T23:00:00"
},
{
"closePrice": {
"ask": 6264.5,
"bid": 6260.5,
"lastTraded": null
},
"highPrice": {
"ask": 6317.0,
"bid": 6316.0,
"lastTraded": null
},
"lastTradedVolume": 74772,
"lowPrice": {
"ask": 6237.9,
"bid": 6235.9,
"lastTraded": null
},
"openPrice": {
"ask": 6268.9,
"bid": 6264.9,
"lastTraded": null
},
"snapshotTime": "2020/07/21 00:00:00",
"snapshotTimeUTC": "2020-07-20T23:00:00"
}
]
Repo seems gone!?
I've also started a python project on Ig Api, when I saw your post I was def hoping on gaining some more knowledge or collaboration.
Here's my repo. https://github.com/nickcamel/IgApi
-
-
I've started a project on github that should get you going until I further develop it.
-
Information is really scarce regarding python.
I'm working on it right now... I've basically made a fancier and easier interface than this.
Will put up a repo in github soon. hopefully
API calls occasionally return ConnectionResetError10054
in IG Technical Support - Platform and App Help
Posted
I think I managed to figure it out and resolve this issue.
Previously (for years) I used to always send a body along with the request
Even if the body was empty.
This doesn’t seem to be a stable solution any longer for unknown reasons, (first detected 2022-07-04).
That’s also, I believe, why the ‘position/otc’ – POST would work, because it would send a non-empty body (as required).