NIFTY and BANKNIFTY
-
Hi, What are the timelines to enable orders against NIFTY and Banknity options?
-
@admin Thank you. I will refer the documentation.
-
Dear @ravindra-e we really value your suggestion we will consider it for sure but we have already mentioned in the documentation.
-
@admin Why don't you update your documentation?
-
Hi @ravindra-e If you want to execute orders in options pass exchange as NFO.
-
@ravindra-e Any update on this?
-
@admin I saw this URL. When i tried below code, it failed.
#fetch User Profile
userProfile= obj.getProfile(refreshToken)print(userProfile)
#place order
try:
orderparams = {
"variety": "NORMAL",
"tradingsymbol": "BANKNIFTY29APR2138000PE",
"symboltoken": "43178",
"transactiontype": "BUY",
"exchange": "NSE",
"ordertype": "MARKET",
"producttype": "INTRADAY",
"duration": "DAY",
"price": "40",
"squareoff": "0",
"stoploss": "0",
"quantity": "1"
}
orderId=obj.placeOrder(orderparams)
print("The order id is: {}".format(orderId))
except Exception as e:
print("Order placement failed: {}".format(e.message))I could print user profile
Please find error below.
TypeError Traceback (most recent call last)
<ipython-input-22-0393c4a0d383> in <module>
20 }
---> 21 orderId=obj.placeOrder(orderparams)
22 print("The order id is: {}".format(orderId))~/opt/anaconda3/lib/python3.7/site-packages/smartapi/smartConnect.py in placeOrder(self, orderparams)
289
--> 290 orderResponse= self._postRequest("api.order.place", params)['data']['orderid']
291TypeError: 'NoneType' object is not subscriptable
During handling of the above exception, another exception occurred:
AttributeError Traceback (most recent call last)
<ipython-input-22-0393c4a0d383> in <module>
22 print("The order id is: {}".format(orderId))
23 except Exception as e:
---> 24 print("Order placement failed: {}".format(e.message))AttributeError: 'TypeError' object has no attribute 'message'
-
HI @ravindra-e please refer below mention link
https://margincalculator.angelbroking.com/OpenAPI_File/files/OpenAPIScripMaster.json -
@admin What I meant is, can i place orders for NIFTY and BANKNIFTY options. If so what code should I use? I am using Python
-
Hi @ravindra-e there is no such time line you can execute you orders in market hours.