Jump to content
  • 0

Create Position request with "success" and deal reference response but no Position created


ikkeman

Question

When working against my demo account through the REST API with the API companion tool (and also with my own code in C# and Python) I have successfully authenticated and are able to retrieve the Access_Token, Account Details etc. When I try to create a new position with parameters as below (this example I used stock but I also tried EURUSD CFD epic) I get a success as response (no error code) and a Deal Reference. But when I look-up open positions or the details of the open position based on the Deal reference there is no open position found. Anyone with ideas on what I'm doing wrong? 

p.s. opening positions on this account with the IG mobile App does work so I know in theory the account allows for the creation of new positions. 


    "epic": "UB.D.GOOGL.CASH.IP",
    "expiry": "DFB",
    "direction": "BUY",
    "size": "1",
    "orderType": "MARKET",
    "timeInForce": "FILL_OR_KILL",
    "level": null,
    "guaranteedStop": "false",
    "stopLevel": null,
    "stopDistance": null,
    "trailingStop": null,
    "trailingStopIncrement": null,
    "forceOpen": "false",
    "limitLevel": null,
    "limitDistance": null,
    "quoteId": null,
    "currencyCode": "USD"
}

Link to comment

2 answers to this question

Recommended Posts

  • 0
6 hours ago, ikkeman said:

When working against my demo account through the REST API with the API companion tool (and also with my own code in C# and Python) I have successfully authenticated and are able to retrieve the Access_Token, Account Details etc. When I try to create a new position with parameters as below (this example I used stock but I also tried EURUSD CFD epic) I get a success as response (no error code) and a Deal Reference. But when I look-up open positions or the details of the open position based on the Deal reference there is no open position found. Anyone with ideas on what I'm doing wrong? 

p.s. opening positions on this account with the IG mobile App does work so I know in theory the account allows for the creation of new positions. 


    "epic": "UB.D.GOOGL.CASH.IP",
    "expiry": "DFB",
    "direction": "BUY",
    "size": "1",
    "orderType": "MARKET",
    "timeInForce": "FILL_OR_KILL",
    "level": null,
    "guaranteedStop": "false",
    "stopLevel": null,
    "stopDistance": null,
    "trailingStop": null,
    "trailingStopIncrement": null,
    "forceOpen": "false",
    "limitLevel": null,
    "limitDistance": null,
    "quoteId": null,
    "currencyCode": "USD"
}

Hi @ikkeman,

Thanks for your post.

For API support, please reach out to our dedicated team at webapisupport@ig.com.

All the best - Arvin

  • Thanks 1
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

    • With BTC making its exponential highs, a couple new projects are springing up incredibly fast. The narratives popping up right now are gaming and AI projects. Through my research, I found a new gaming project with some good gaming use cases and tokenomics. The project is, flappyMoonbird. It is a web3 game metaverse with a Player vs Player based on a bird themed scope. At this moment, the project’s team has announced 3 games; Racing bird, AI birdnopoly and FlappymoonBird inclusive, these have gameplay and demo released. The game has also incorporated Play2Earn to its framework, while playing users are given latitude to play games casually to earn mystery boxes, and its native $FMB tokens and other prizes. After reading exhaustively about this project, I was on the lookout for where to buy it from. Reliable platforms like bitget have expressed intent to list it through its deposit to list activity. Consequently, by depositing some amount of it ($FMB) on the CEX, the platform will list the token and this will undoubtedly provide the project with further exposure just the same way it has done for some of its popular projects. From my personal experience, projects that are often incubated by the CEX in this manner turnout to perform exceedingly well. Taking a cue from projects like $CSIX and $GRIMACE that went through same procedure, after they got listed, the projects performed quite well and are still performing with very good price action thus far.  On a safer note, if the project doesn’t scale through the listing procedure, all funds can be withdrawn seamlessly. The project looks quite promising and I think with the platforms concerted efforts, it will get listed along with good price action.
    • I'm still holding ZETA,GPT & MANTA . Tho I've taken my initial out, letting the rest to run!
×
×
  • Create New...
us