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"