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

    • Despite the complaint on Catizen, I recently saw a tweet where one KOL showed his excitement for the project. He claimed to staked $cati on Bitget Poolx and earn good apr and further encouraged his followers to participate in other campaigns on the exchange for Catizen players. Even when I feel he was just trying to make his followers to be optimistic and stop wasting time complaining. I still feel citizen team were not transparent to their community. While many continue to call the project scam, I choose to defer because the project has a well-defined roadmap and use case for the token. These I feel might have huge impact in the project development and sustainability in this volatile space. We learn daily so this airdrop hunters should take this as a learning stage and further focus on other opportunities abundant in this industry. Many people only farm for airdrop and don’t care to understand the space and see where they can contribute. Web3 is a revolution and is better to join early and create a niche for yourself that just passing through.
    • There was another 30k CATS for the first 200k users that deposit on Bitget. 
    • MemeFi sounds like a fun mix of gaming and DeFi, plus the chance to trade MEMEFI early on Bitget a good opportunity
×
×
  • Create New...
us