How to place a order for option selling

I am tying to place a order though python, I am getting live price and all properly. login and authentication, everything is set. i want a simpler way to place a order.

pm.place_order()

can someone give me the syntax for placing a sell order.

for strike_price, expiry_date, overnight_validity, market_order, lot_size, Nifty.

1 Like

pm.place_order(txn_type=‘S’,
exchange=‘NSE’,
segment=‘D’,
product=‘M’,
security_id=‘35787’,
quantity=25,
profit_value=None,
trigger_price=None,
validity=‘GTC’,
order_type=‘MKT’,
source=‘N’,
price=0)

{“status”:“error”,“message”:“Invalid Validity value”,“error_code”:“400 BAD_REQUEST”}

I am getting this error.

i want to place a sell order at market price. kindly help

Hi @alexruban111 , please try with validity=‘DAY’

1 Like