Jump to content
  • 0

Separate program threads fail setting account after session creation (REST API)


JulianG

Question

Posted

I have a program that uses the REST API. It has a main routine and two threads (written in Python). The main routine and each of the two threads establish their own session using the API (POST /session), then set the account (PUT /session).

This has worked fine for months, but for the last few weeks there has been a problem. The first creation of a session and setting the account works as before. However, when the threads come to set their accounts, I get error 401 and message 'error.security.account-token-invalid'. This program goes straight from creating the session to setting the account and it uses the CST and X-SECURITY-TOKEN returned by the session creation when it sets the account. Creating the session itself returns code 200, which indicates success.

Nothing has changed in my program to cause this. The problem is intermittent and I can improve things by retrying after a few seconds, when it will sometimes work.

Does anyone know of any changes at the IG end that might be causing this? Are there any obvious workarounds. One reason for having the separate sessions for the threads was to avoid any possibility of interference between them. I don't know how necessary this is. However, the program worked before and, even if I have to change it, I'd like to know what is happening.

Thanks for any help or suggestions.

Julian

 

1 answer to this question

Recommended Posts

  • 0
Posted

I've had similar problems using the rest api on a demo account. I've been using it for around 18 months now. My experience is this: it all works fine for months, then something happens (maybe they update the software or something) then it all goes flakey, struggling to create a session, errors downloading historic data. This can continue for weeks until finally everything goes back to normal again. Based on my time with IG I would describe what you have experienced as normal behaviour for their rest API. It's a shame and is putting me off from going live to be honest.

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

    • Lately I’ve been following AIXBT by Virtuals for a bit, and I’m not gonna lie, it’s making me wonder about the direction AI is taking in the crypto space. Kinda seen a lot of hype around AI lately on X and different forums. So here’s my take, instead of just applying AI to the usual market analysis, AIXBT is talking about AI agents that could actually be co-owned and tokenized like digital assets that interact with games, social platforms, and even manage wallets. More findings in the whole co-ownership thingy, which is a great idea especially with the blockchain aspect. A lot of people are talking about how AI could help boost revenue across different platforms, but I’m still skeptical about how this will actually work in practice. These agents are supposed to be able to do things like pick up a sword in Roblox or interact on TikTok, but will they actually change the way users engage with digital spaces? Couple of top exchanges like BINGX already listed $AIXBT which is a big deal, imho as it’s gaining some real traction already.  Notwithstanding, still thinking if this is the future of digital assets, or is it just another trend that’s getting way too much hype?
    • With Clanker native token recently listed on Bitget and already trading above $68, some people have start speculating that this AI-driven token deployment platform on the Base network could increase adoption on the blockchain due to some various reason such as; 1. Ease of Token Creation: Clanker simplifies the process of token creation to the point where it's accessible to anyone with basic social media skills. Users can deploy tokens by simply tagging Clanker on the Farcaster platform, describing their desired token, thereby lowering the entry barriers for token creators and potentially attracting a broader user base to the Base ecosystem. 2. Community Engagement and Viral Potential: The integration of token deployment with social media platforms like Farcaster encourages community participation. Memes and viral content can naturally lead to increased attention and, consequently, adoption. Clanker's tokens often become memes themselves, which can drive speculative interest and trading volume, furthering the network's visibility 3. Profit Sharing Mechanism: Clanker's model includes sharing a portion of the fees with the users who request token deployments. This financial incentive could encourage more people to use Clanker for launching tokens, thus increasing activity on Base. The promise of earning from the liquidity pool fees makes it an attractive proposition for users looking to participate in the crypto space in a potentially profitable manner. 4. Innovation in Tokenomics: By introducing tokens like LUM, which were autonomously created through AI collaboration, Clanker showcases innovative tokenomics. This not only promotes the idea of AI in blockchain but also piques interest in how tokens can be generated, possibly drawing tech enthusiasts and investors curious about new token models. 5. Fostering Decentralized Social Interaction: Clanker's operation within the Farcaster ecosystem highlights how blockchain can intersect with decentralized social networks. This intersection can lead to new forms of interaction and economic models where social engagement directly correlates with token creation, potentially making Base a hub for such activities.  6. Market Activity Boost: The surge in transaction volumes due to Clanker's activity indicates its substantial impact on the network's activity. High transaction volumes often correlate with increased interest and investment in a blockchain, which could lead to greater adoption as more participants are drawn to where the action is.   Is obvious that these factors could increase adoption to base chain but what do you think?
    • I just claimed my allocation to bitget since there is $0 gass fee for claiming. I hope this project cooks 
×
×
  • Create New...
us