Jump to content
  • 0

API - Selling a PUT under the actual price


GGPound

Question

Hi, I'm using the API for the first time and I'm trying various thing.

I tried to sell a PUT in Barriers & Options account under the actual price but obviously it won't work (LIMIT_ORDER_WRONG_SIDE_OF_MARKET)

I tried with the follow code (using limits) and I also tried all combination of a MARKET open instead but it won't work to ("errorCode": "error.trading.otc.market-orders.not-supported-for-epic")

Thank you in advice for your help!

 

resp = ig_service.create_open_position(
        currency_code='USD',
        direction='SELL',
        epic='OP.D.OTCSPX1.4660P.IP',
        order_type='LIMIT',
        expiry='NOV-23',
        force_open='true',
        guaranteed_stop='false',
        size=1, level=4660,
        limit_distance=None,
        limit_level=None,
        quote_id=None,
        stop_level=None,
        stop_distance=None,
        trailing_stop=None,
        trailing_stop_increment=None)
Link to comment

0 answers to this question

Recommended Posts

There have been no answers to this question yet

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