Navigation

    SmartAPI Forum
    • Register
    • Login
    • Search
    • Categories
    • Popular
    • Groups
    • FAQs
    • API Docs
    1. Home
    2. SK
    S
    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 1
    • Best 0
    • Groups 0

    SK

    @SK

    0
    Reputation
    1
    Profile views
    1
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    SK Unfollow Follow

    Latest posts made by SK

    • ROBO order for Bank Nifty Options

      Hi,
      has anyone been able to create a ROBO order for Bank Nifty Options?

      Input:
      orderparams = {
      "variety":"ROBO",
      "tradingsymbol":"BANKNIFTY11NOV2139400CE",
      "symboltoken": 48607,
      "transactiontype":"BUY",
      "exchange":"NSE",
      "ordertype":"LIMIT",
      "producttype": "BO",
      "duration": "DAY",
      "price": 10.2,
      "triggerprice":10,
      "squareoff": 120,
      "stoploss": 80,
      "quantity": 25
      }
      orderId=obj.placeOrder(orderparams)
      It is failing with the following error:

      TypeError Traceback (most recent call last)
      /var/folders/p1/x72ypdl14wzb896mwkp88fwc0000gn/T/ipykernel_10795/112253952.py in <module>
      26 print(orderparams)
      ---> 27 orderId=obj.placeOrder(orderparams)
      28 print("The order id is: {}".format(orderId))

      /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/smartapi/smartConnect.py in placeOrder(self, orderparams)
      289
      --> 290 orderResponse= self._postRequest("api.order.place", params)['data']['orderid']
      291

      TypeError: 'NoneType' object is not subscriptable

      posted in Python SDK
      S
      SK