Jump to content
  • 0

Create Position on API companion


Shahram65

Question

Good afternoon,

Using the API companion, I seem to succeed in creating a new position in my demo account and I do receive a deal reference (see attached below). But looking at the account online, I see no impact: no positions, no orders and the fund change. What am I doing wrong please?

 

Regards,

Shahram

image.png.6b96e85cf328e97130002b131c0de002.png

Link to comment

4 answers to this question

Recommended Posts

  • 0

@Shahram65 The companion interface can be confusing for new users, because it says "Success". The success in this context means you have succesfully sent a request to the IG trading server. The success here is the HTTP status. It means the URL was valid, the parameter names were expected, you were authenticated, that sort of thing. It does not necessarily mean you successfully opened a position.

Opening a position with IG is a two stage process. The first step is to request the position be opened. The second step is to check the status of the first step. You have only done the first step.

The second step, as @KoketsoIG says, is to request confirmation for the first request. You do this in the REST Companion under Trading - Positions > Trade Confirm. Paste the deal reference you received in the response to the first request into the text input box there, and hit the Go button. The response to this second request will tell you the status of your initial request. I expect it will tell you the request was not successful. Hopefully it will also provide useful clues explaining why.

Edited by bug-or-feature
grammar
  • Thanks 1
Link to comment
  • 0
19 hours ago, Shahram65 said:

Good afternoon,

Using the API companion, I seem to succeed in creating a new position in my demo account and I do receive a deal reference (see attached below). But looking at the account online, I see no impact: no positions, no orders and the fund change. What am I doing wrong please?

 

Regards,

Shahram

image.png.6b96e85cf328e97130002b131c0de002.png

Dear @Shahram65,

Thank you for your post.

Please note that you can also receive a deal reference in the case of a working order which means that the order was not executed but the request has been sent to the trading server. Please use trade confirm to check whether the trade is rejected or executed (copy the deal reference and paste).

Thanks,

KoketsoIG

Please rate us on Trustpilot: IG Trustpilot 

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

    • Hi everyone, just a short post at this stage as I want to see if there is any interest in this topic first.  I’ll likely contact IG but wanted to see if there are other thoughts and experiences first as there are several issues I am seeing and it’s a bit complicated, so didn’t want to write some long rambling post. i trade the Dax and Nasdaq indices and use an automated strategy using the API.  I am effectively trying to do a trend trading strategy but on short timescales.  So i set fairly tight stops and then run those trades that leave the area to the plus side.  My win rate is low so have a lot of losers so slippage on stops is quite important to me. i have a database of trades and 5m data going back over 3years now - so have a lot of data to work with. i measured the stop slippage several years ago and it was fine for this method but have re measured it recently as I noticed the losing trades were a bit too large and it seems that the slippage has increased quite a lot for Nasdaq (not then Dax). I am trying to see what is behind this. Anyone interested or tackling similar issues? Thanks David 
    • Hae, crypto degenerates! 👋 Your boy's got the inside scoop on a DeFi gem that's about to blow up! LOGX Network is dropping on Bitget on September 24th, and I'm all in. Here's why I'm losing sleep over this: It's not just another DeFi clone. We're talking AI-powered trading, gasless transactions, and perpetual markets. It's like the lovechild of a hedge fund and a crystal ball! These madlads raised $10.1M from big dogs like Hashed Emergent. That's some serious validation! 67% of tokens going to the community? They're practically handing us the keys to the kingdom! A Cross-chain liquidity from Binance, Coinbase, and OKX. It's like the Avengers of crypto, assembled in one place! Airdrop alert! 🚨 Claims going live on Arbitrum. Free money, anyone? Look, I'm just a dude who likes to ape into promising projects, but LOGX is ticking all my boxes. It's innovative, community-focused, and backed by some serious players. Am I saying mortgage your house for this? Hell no! But maybe skip a few lattes and throw some change at it? Could be your ticket to lambo-land! What do you think? Is LOGX the next big thing or am I huffing too much hopium? Drop your thoughts below! 👇 Remember, DYOR and don't bet your lunch money. But also... don't miss out on potentially the hottest DeFi project of 2024!
    • Cardano (ADA) has seen an impressive 9% increase in price, rising from $0.3251 on September 7 to $0.3545 by September 15. This surge is linked to the announcement from The Artificial Superintelligence Alliance that their FET token is now live on the Cardano blockchain. Why Cardano? The ASI alliance chose Cardano for its strong security, fast transaction speeds, and low fees. This decision has reignited interest in the Cardano ecosystem, and many investors are paying attention. ADA Price Target Looking ahead, analysts believe ADA might aim for $0.5 in the coming days. With a positive Relative Strength Index (RSI) supporting this prediction, the ADA price target of $0.5 seems attainable. A boost in buying volume could help ADA break through this level, and if it does, the next target could be around $0.6. Ecosystem Expansion Cardano is also growing with innovations like the Iagon bridge, which allows asset transfers between Cardano and Ethereum. Additionally, ADA holders are considering investments in promising projects like Rollblock, currently in its 6th presale and promising potential returns of up to 200x. Conclusion As the broader crypto market rebounds, will Cardano continue its upward trend, or will it face challenges ahead? Stay tuned!    
×
×
  • Create New...
us