unable to place options MIS order


  • Hi Team,
    Unable to place options mis order. getting below error
    'NoneType' object is not subscriptable

    Could you please share sample request to place mis order.
    Please include futures request as well.


  • @rajanprabu I didn't know that, thanks for letting me know.


  • @rajanprabu said in unable to place options MIS order:

    this is not true anymore.. Angel allowed it long back. Jan 14th onwards..

    Thanks Rajan for spreading the word.


  • @rjbanna

    @rjbanna said in unable to place options MIS order:

    If you are using the API while you are logged in to the Angel Broking web platform, you might not be able to use the API as Angel doesn't allow concurrent sessions.

    this is not true anymore.. Angel allowed it long back. Jan 14th onwards..


  • @sankar574 Your code is fine and I'm able to place the order successfully. Please do remember that you can either use the API or Angel Broking web platform at a time. If you are using the API while you are logged in to the Angel Broking web platform, you might not be able to use the API as Angel doesn't allow concurrent sessions.


  •  fno_symbol = "SBIN25MAR21405CE"
    	symboltoken = "52653"
    	qtp = "3000"
    	
    	try:
            orderparams = {
                "variety": "NORMAL",
                "tradingsymbol": fno_symbol,
                "symboltoken": symboltoken,
                "transactiontype": "BUY",
                "exchange": "NFO",
                "ordertype": "MARKET",
                "producttype": "INTRADAY",
                "duration": "DAY",
                "price": "0",
                "squareoff": "0",
                "stoploss": "0",
                "quantity": qtp
            }
            orderId=angle.placeOrder(orderparams)
            print("The order id is: {}".format(orderId))
            aleart(str(orderId))
            #aleart("Order successfully placed" + fno_symbol)
        except Exception as e:
            print("Order placement failed: {}".format(e.message))
    

    error :

    Traceback (most recent call last):
    File "./TestPlaceOrder.py", line 119, in buy
    orderId=angle.placeOrder(orderparams)
    File "/usr/local/lib/python3.6/site-packages/smartapi/smartConnect.py", line 309, in placeOrder
    orderResponse= self._postRequest("api.order.place", params)['data']['orderid']
    TypeError: 'NoneType' object is not subscriptable

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
    File "./TestPlaceOrder.py", line 127, in <module>
    buy("SBIN",405)
    File "./TestPlaceOrder.py", line 124, in buy
    print("Order placement failed: {}".format(e.message))
    AttributeError: 'TypeError' object has no attribute 'message'


  • @sankar574 Please share your code here.


  • Dear Admin,
    I have already gown though the link which you have provided.
    its not helping me to resolve the issue.
    Please provide the sample request to place the options and futures order.

    Thanks in advance.!!

    Thanks & Regards
    Sankar


  • @sankar574 Please refer to our documentation - Place order request https://smartapi.angelbroking.com/docs/Orders