print("Exception Occured while placing order as Put seller",e.message)
The error message from the title is probably from this line. Exception might not have message attribute. To get the actual exception message try str(e)
squareoff is a parameter of bracket orders which are discontinued. If you don't use a param, instead of setting to None, you can simply not provide it in the function call.
Make sure to remove all account credentials from the code before posting.
executing code is posted below, please look into it
code=NIFTY2340617500PE
def orderAsPutSeller(code):
orderPlaced = False
print(code,kite.VARIETY_REGULAR,kite.EXCHANGE_NFO,kite.TRANSACTION_TYPE_SELL,Quantity,kite.PRODUCT_MIS,kite.ORDER_TYPE_MARKET)
while(orderPlaced == False):
try:
order_id = kite.place_order(tradingsymbol=code,
variety=kite.VARIETY_REGULAR,
exchange=kite.EXCHANGE_NFO,
transaction_type=kite.TRANSACTION_TYPE_SELL,
quantity= str(Quantity),
order_type= kite.ORDER_TYPE_MARKET,
product=kite.PRODUCT_MIS,price=None, validity=None,
disclosed_quantity=None, trigger_price=None,
squareoff=None, stoploss=None, trailing_stoploss=None, tag=None)
print(order_id)
orderPlaced = True
orderList[0] = code
total_orders.append(order_id)
# print(datetime.datetime.now,"Put sell order placed")
except Exception as e:
print("Exception Occured while placing order as Put seller",e.message)
str(e)
squareoff
is a parameter of bracket orders which are discontinued. If you don't use a param, instead of setting to None, you can simply not provide it in the function call.Thank you very much for timely inputs.