Order placement failed: string indices must be integers, not 'str'
-
try:
orderparams = {
"variety":"NORMAL",
"tradingsymbol":"SBIN-EQ",
"symboltoken":"3045",
"transactiontype":"BUY",
"exchange":"NSE",
"ordertype":"MARKET",
"producttype":"INTRADAY",
"duration":"DAY",
"price":"194.50",
"squareoff":"0",
"stoploss":"0",
"quantity":"1"
}orderId=smartApi.placeOrder(orderparams) print("The order id is: {}".format(orderId)) except Exception as e: print("Order placement failed: {}".format(e))