Error while placing order


  • @harish I'm able to place the order. I don't see any issues. Make sure you are passing the valid symboltoken and tradingsymbol. I tried with "BANKNIFTY31DEC2028200CE" and "36482" and it was successfully placed.


  • @rjbanna Sir have you tried placing FNO order, getting this error RMS:Field Not Found 63002

    bc27d921-9396-40d5-9675-f9d3a19d8924-image.png


  • @dorje Haven't tried steaming data yet will try and let you know if it works.


  • @rjbanna thanks boss, it worked was using refreshToken which was creating issue after generateSession function.

    Working now👍


  • @harish hi harish are you able to stream tick data , if yes could you please let us know how you did that.


  • @harish I tried to place the order and it was successful from my side. Below is the code that I used.

            obj = SmartConnect(api_key="API_KEY")
    	data = obj.generateSession("CLIENT_ID","PWD")
    
    	try:
    		orderparams = {
    			"variety": "NORMAL",
    			"tradingsymbol": "SBIN-EQ",
    			"symboltoken": "3045",
    			"transactiontype": "BUY",
    			"exchange": "NSE",
    			"ordertype": "LIMIT",
    			"producttype": "INTRADAY",
    			"duration": "DAY",
    			"price": "195",
    			"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))
    

  • Dear @bhaveshjain

    Sir kindly check above issue once we are facing this issue while placing order. Tried exact code as given in documentation for SBIN but still getting error.


  • @rjbanna sir yesterday got a mail to reset password from Angel broking after that we were able to login. We faced login error till yesterday which you have mentioned. It is fixed now.

    We are facing issue in sending orders. tried the same code as in documentation still getting error.


  • @harish I think your credentials are not correct and if they are correct kindly confirm if your account has been migrated to the new Angel Broking server or not. Because I was also getting the same issue and once my account got migrated, the issue was resolved. There are many people with this same issue.


  • @harish File "C:\Anaconda\lib\site-packages\smartapi\smartConnect.py", line 235, in generateSession
    loginResultObject=self._postRequest("api.login",params)
    File "C:\Anaconda\lib\site-packages\smartapi\smartConnect.py", line 227, in _postRequest
    return self._request(route, "POST", params)
    File "C:\Anaconda\lib\site-packages\smartapi\smartConnect.py", line 198, in _request
    raise ex.DataException("Couldn't parse the JSON response received from the server: {content}".format(
    smartapi.smartExceptions.DataException: Couldn't parse the JSON response received from the server: b''