Jump to content
  • 0

API calls occasionally return ConnectionResetError10054


nickcamel

Question

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:

Quote

Connection 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?

Edited by nickcamel
added working REST-API call
Link to comment

4 answers to this question

Recommended Posts

  • 1
On 07/07/2022 at 07:26, nickcamel said:

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:

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?

Hi @nickcamel,

You can reach out to webapisupport@ig.com for assistance on API.  Send them as much information as possible, they will come back to you accordingly.

All the best - Arvin

  • Like 1
Link to comment
  • 0

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

Quote

 body={}
...
requests.request(method, url, headers=headers, json=body)

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).

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • image.png

  • Posts

    • Portuma's innovative approach to in-game advertising and Play-to-Earn (P2E) has sparked significant interest in the gaming and blockchain communities. Portuma's blockchain integration simplifies ad implementation for game developers and enables transparent transactions.  Its Win-Win Ecosystem aims to benefit all participants. advertisers gain reach, publishers earn revenue, and players get rewarded. While Portuma is a strong contender in the P2E and in-game advertising space, it's not the only player. Other projects are exploring innovative approaches to monetization, engagement, and rewards.  With its listing on Bitget, Portuma is poised to revolutionize the monetization of in-game advertising. But is it the ultimate solution, or just a stepping stone in the evolving P2E and in-game advertising landscape? Have you explored other P2E or in-game advertising projects? Do you think Portuma is a revolutionary force or a stepping stone? Share your thoughts in the comments!
    • Portuma's innovative approach to in-game advertising and Play-to-Earn (P2E) has sparked significant interest in the gaming and blockchain communities. Portuma's blockchain integration simplifies ad implementation for game developers and enables transparent transactions.  Its Win-Win Ecosystem aims to benefit all participants. advertisers gain reach, publishers earn revenue, and players get rewarded. While Portuma is a strong contender in the P2E and in-game advertising space, it's not the only player. Other projects are exploring innovative approaches to monetization, engagement, and rewards.  With its listing on Bitget, Portuma is poised to revolutionize the monetization of in-game advertising. But is it the ultimate solution, or just a stepping stone in the evolving P2E and in-game advertising landscape? Have you explored other P2E or in-game advertising projects? Do you think Portuma is a revolutionary force or a stepping stone? Share your thoughts in the comments!
    • LinqAI is making waves by offering versatile AI tools and fostering a decentralized future through Web3. LinqAI offers some compelling features that set it apart such as focus on Web3 Integration like deep commitment to integrating AI solutions with the decentralized future of Web3, limited supply token with a focus on revenue sharing and incentivizing long-term holders (similar to a UBI model within Web3) and Pre-Built AI Tools like Marketr, Engagr, and Analyzr offer specific solutions for marketing, customer service, and data analysis. So, is LinqAI the ultimate solution for AI-powered business solutions with Web3 Integration because it got listed on Bitget? It's a promising contender, but the market is evolving rapidly. What do you think? Is LinqAI a game-changer for AI-powered business solutions and Web3 integration, or just an interesting concept? Have you explored any other AI for business or Web3-integrated projects? Share your thoughts in the comments!
×
×
  • Create New...
us