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
×
×
  • Create New...
us