Placing the order in BSE Futures & Options with API

Hi @Hardik
I used the script template given in document as below.

Place an order for BSE Futures & Options

dhan.place_order(security_id=‘1135553’, #SensexPE
exchange_segment=dhan.BSE_FNO,
transaction_type=dhan.BUY,
quantity=1,
order_type=dhan.MARKET,
product_type=dhan.INTRA,
price=0,)

But, I used my BSE FNO security id as below
order=dhan.place_order(security_id=‘1119289’,
exchange_segment=dhan.BSE_FNO,
transaction_type=dhan.BUY,
quantity=1,
order_type=dhan.MARKET,
product_type=dhan.INTRA,
price=0,)
print(order)

I am getting following error
{‘status’: ‘failure’, ‘remarks’: {‘error_code’: ‘RS-9005’, ‘message’: ’ todo mandatory fields '}, ‘data’: ‘’}

Hi @paritosh176

plz check on the quantity and price once again.

@Sai_Chandra Actually, I’d used quality 1 lot and price 0 as per market order. It worked fine with MCX Crudeoil 1 lot order.
Are you suggesting to use actual quantity multiplying with lot size?

Hi @paritosh176

For BSE FNO , just use FNO for exchange_segment.

@Naman
As suggested, I used the code as below
order=dhan.place_order(security_id=‘1119289’,
exchange_segment=dhan.FNO,
transaction_type=dhan.BUY,
quantity=1,
order_type=dhan.MARKET,
product_type=dhan.INTRA,
price=0,)
Getting this message
{‘status’: ‘failure’, ‘remarks’: {‘error_code’: ‘RS-9005’, ‘message’: ‘Transactions Fails.’}, ‘data’: ‘’}

Hello @paritosh176

Over here, you are adding incorrect quantity. Quantity needs to be multiple of lot sizes.

On exchange_segment, it will be BSE_FNO itself.