Jump to content
  • 0

Using the IG API to trade in the USA500 (SP500)


zdruid

Question

Hello,

I want to use the IG API to place automated orders with the SP500 (EPIC: IX.D.SPTRD.IFS.IP) but using /positions/otc with this data:

                   "epic"          => "IX.D.SPTRD.IFS.IP",
                    "direction"     => "BUY",
                    "size"          => "1",
                    "orderType"     => "MARKET",
                    "stopLevel"     => 3830,
                    "forceOpen"     => "false",
                    "currencyCode"  => "USD"

I get the following response:

"errorCode":"unauthorised access, user has no access to the relevant exchange. Epic=IX.D.SPTRD.IFS.IP
exchangeId=IND_GBL_GBP"

 

Maybe I am doing something wrong or simply I can't operate this instrument with the API?

Thank you very much

Best regards.

 

Link to comment

2 answers to this question

Recommended Posts

  • 0
7 hours ago, zdruid said:

Hello,

I want to use the IG API to place automated orders with the SP500 (EPIC: IX.D.SPTRD.IFS.IP) but using /positions/otc with this data:

                   "epic"          => "IX.D.SPTRD.IFS.IP",
                    "direction"     => "BUY",
                    "size"          => "1",
                    "orderType"     => "MARKET",
                    "stopLevel"     => 3830,
                    "forceOpen"     => "false",
                    "currencyCode"  => "USD"

I get the following response:

"errorCode":"unauthorised access, user has no access to the relevant exchange. Epic=IX.D.SPTRD.IFS.IP
exchangeId=IND_GBL_GBP"

 

Maybe I am doing something wrong or simply I can't operate this instrument with the API?

Thank you very much

Best regards.

 

Hi @zdruid

Thanks for reaching out. Please email webapisupport@ig.com for more assistance. This team was created to assist with all API queries. Thanks, OfentseIG

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
  • General Statistics

    • Total Topics
      21,195
    • Total Posts
      90,731
    • Total Members
      41,305
    • Most Online
      7,522
      10/06/21 10:53

    Newest Member
    sbehdadkia
    Joined 30/01/23 19:24
  • Posts

    • Trying to buy First Trust Nasdaq Cybersecurity ETF (CIBR) but the order keeps getting rejected, even with Order type = limit and expiry = Day (all  sessions).  Please advise.
    • @MongiIG How long does it take to reply to a simple question?
    • Look Ahead to 31/1/23: Big data from the US, China, Japan; PFE, XOM, AMD earnings Ahead of the Fed meeting and the key US jobs report, investors get set to digest retail sales numbers from Germany and Japan. Plus, look out for consumer-related data from China, France, and the US. Earnings see Pfizer (PFE), Exxon Mobil (XOM) and Advanced Micro Devices (AMD) hand in their Q4 report cards.   Angeline Ong | Presenter, Analyst and Content Editor, London | Publication date: Monday 30 January 2023        
×
×
  • Create New...