Jump to content
  • 0

"Soft 404" error placing orders starting a few months ago



David Gibbs, who used to be a senior software engineer at IG, wrote some code, based on the original femtotrader code, to allow me to place DMA Equity orders. That was back in 2018. There have been no problems with it until recently.

Below, I have shown the output of two logfiles. The first one is when the DMA order placing software worked (as it did from 2018 until some point in 2023). It failed on the first try, but succeeded on the second. 

The second file shows that I now receive a 404 error trying to place an order.  (The GET function works properly as I am able to retrieve positions). . 

I would like to know whether the URL has changed for the POST function. Thank you.

Here is the successful order placing:

DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): api.ig.com:443
DEBUG:urllib3.connectionpool:https://api.ig.com:443 "POST /gateway/deal/session HTTP/1.1" 200 337
INFO:place_order_PY:Authenticated to IG session for EC.D.ATOFP.CASH.IP order
DEBUG:urllib3.connectionpool:https://api.ig.com:443 "POST /gateway/deal/workingorders/dma/equity HTTP/1.1" 200 53
DEBUG:urllib3.connectionpool:https://api.ig.com:443 "GET /gateway/deal/confirms/GG7UZEN2HZ3AX HTTP/1.1" 404 60
INFO:trading_ig.rest:Deal reference GG7UZEN2HZ3AX not found, retrying.
DEBUG:urllib3.connectionpool:https://api.ig.com:443 "GET /gateway/deal/confirms/GG7UZEN2HZ3AX HTTP/1.1" 200 266

Here is the unsuccessful order placing (showing, however, that I am able to retrieve positions):

DEBUG:urllib3.connectionpool:https://api.ig.com:443 "POST /gateway/deal/session HTTP/1.1" 200 337
DEBUG:urllib3.connectionpool:https://api.ig.com:443 "GET /gateway/deal/positions HTTP/1.1" 200 880
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): api.ig.com:443
DEBUG:urllib3.connectionpool:https://api.ig.com:443 "POST /gateway/deal/session HTTP/1.1" 200 337
INFO:__main__:Authenticated to IG session for EC.D.ATOFP.CASH.IP order
DEBUG:urllib3.connectionpool:https://api.ig.com:443 "POST /gateway/deal/workingorders/dma/equity HTTP/1.1" 404 123

Output from Python console:

IGException: <html><head><title>Page Not Found</title><h3>Error 404</h3><h3>Sorry, 
the requested page is not available.</h3></body></html>

Thank you for your help.

Kevin Brau





Link to comment

4 answers to this question

Recommended Posts

  • 0

As you said, the official REST API  only support OTC orders, not DMA orders.  I cannot trade with OTC orders because I trade small cap equities, which can have enormous spreads.

Furthermore, as I pointed out, /workingorders/dma/equity was an endpoint that used to work from 2018 until around 2023, without any problem. Here is an example of it working:
INFO:place_order_PY:Authenticated to IG session for EC.D.ATOFP.CASH.IP order
DEBUG:urllib3.connectionpool:https://api.ig.com:443 "POST /gateway/deal/workingorders/dma/equity HTTP/1.1" 200 53. (Notice the 200, not 404 code.)  I was also able to delete a working/dma/equity via the deal ID, and update it. 

If I place a DMA equity order via L2, then deal ID is created, which shows that at least DMA equity orders have not been eliminated.  I have read about similar situations where are URL for endpoints is not recognized and no explanation is given. You will never find a reference in the REST API for DMA equity orders enpoints because it is bespoke code, and because there is little demand for it, For me, it's probably a deal breaker. 

Anyway, thanks for your response.  I believe I have to go back to the REST API team, who have already said "this is not our responsibility". It is possible that a decision was taken to remove the workingordres/dma/equity endpoint. I rule nothing out. 







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

    • I overheard a discussion between two friends and one was telling the other that Bitcoin is a scam and that a lot of people preached about the halving and how people could cashout from it. The other friend was trying to convince him to continue holding his asset but he refused and replied that nothing would stop him from selling the coins he's holding.  When I heard that man mentioned cashing out from the halving, I understood that he might know about Bitcoin but he's not properly enlightened concerning it. A lot of expectations were cut short after the halving event cause most people expected Bitcoin to set a new height of $80k but then it didn't even get close to the previous all time high and have reduced below $60k currently.  I think people shouldn't get discourage by that, though I didn't experience other halvings cause I had zero knowledge about Bitcoin then but i think something similar have occurred before in one of the previous halving where Bitcoin price didn't go up as expected but later traced back and went up after some period, a lot of people might begin to panic and sell their coins but I still see this an opportunity to buy more Bitcoin and for those who are not opportuned to do so, holding is the best option, please correct me if you think am wrong  
    • S&P 500, SPY, NASDAQ 100, QQQ, RUSSELL 2000, DAX 40, FTSE 100, ASX 200. Featuring Elliott Wave Technical Analysis Elliott Wave Analysis Indices: Triple Witching Friday 21 June - SP500 and NASDAQ 100: Both indices are in Elliott Wave v of (iii) of iii) of 3 of (5) of 3) of I. The ETFs SPY and QQQ share the same pattern. - RUT (IWM), DAX, and FTSE 100: These indices are struggling to lift off lows. They may need another low to complete their corrective patterns. We are looking for long trade setups if certain levels are met. - ASX 200: Needs to develop support at 7800 to confirm an uptrend and avoid a larger Elliott Wave Triangle pattern. Trading Strategies: - Holding long positions in SP500, NASDAQ, SPY, and QQQ, which are currently the best trade positions. Video Chapters  00:00 SP 500 (SPX), SPY ETF 07:27 NASDAQ (NDX), QQQ ETF 13:39 Russell 2000 (RUT) IWM ETF 15:15 DAX 40 (DAX) 16:33 FTSE 100 UKX (UK100) 19:18 S&P/ASX 200 (XJO) 25:39 End Analyst Peter Mathers TradingLounge  
    • Non-Playable Coin (NPC) is a weird and wonderful experiment that smashes together meme culture, NFTs, and DeFi. It's like someone threw a bunch of internet trends into a blender and hit puree. But hey, that's kind of what makes it interesting. So, NPC has a massive token supply - like, a whopping 7.9 billion. That's basically the entire global population. It's like they're trying to make ownership a thing for the masses. And then there's the Meme Fungible Token (MFT), which is like a token shape-shifter. It can switch between ERC20 and ERC1155 standards, making it a flexible little beast. So, is NPC the ultimate meme coin for the NFT generation just because it got listed on Bitget? Nah, let's not get ahead of ourselves. It's an innovative project, sure, but it's not the only game in town. There are other meme coin and NFT hybrid projects worth exploring. What do you think, folks? Is NPC a brilliant mashup of memes, NFTs, and DeFi, or just a fleeting fad? Share your thoughts in the comments!"
  • Create New...