Jump to content

Not able to create new posistion


Recommended Posts

Hi,

I'm new to IG and I am trying to place a new position through API, but it is throwing error. Can someone help how to fix this please?

ig_service.create_open_position(
        currency_code='GBP',
        direction='SELL',
        epic='OP.D.SPXWEEK.3980C.IP',
        order_type='MARKET',
        expiry='-',
        force_open='false',
        guaranteed_stop='false',
        size=0.5, level=None,
        limit_distance=None,
        limit_level=None,
        quote_id=None,
        stop_level=None,
        stop_distance=None,
        trailing_stop=None,
        trailing_stop_increment=None)

 

Getting error message : "errorCode":"error.trading.otc.market-orders.not-supported-for-epic"

Link to comment
9 hours ago, VijayKiran said:

Hi,

I'm new to IG and I am trying to place a new position through API, but it is throwing error. Can someone help how to fix this please?

ig_service.create_open_position(
        currency_code='GBP',
        direction='SELL',
        epic='OP.D.SPXWEEK.3980C.IP',
        order_type='MARKET',
        expiry='-',
        force_open='false',
        guaranteed_stop='false',
        size=0.5, level=None,
        limit_distance=None,
        limit_level=None,
        quote_id=None,
        stop_level=None,
        stop_distance=None,
        trailing_stop=None,
        trailing_stop_increment=None)

 

Getting error message : "errorCode":"error.trading.otc.market-orders.not-supported-for-epic"

Hi @VijayKiran,

Thank you for your post. You can reach out to webapisupport@ig.com for support on API.

Thank you - Arvin

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