order_place GeneralException: Route not found

ferdinand.sousa edited November 2016 in Python client
I'm using Python 2.7.12 with kiteconnect 3.4

I get the error traceback below when calling order_place:

File "C:\Python27\lib\site-packages\kiteconnect\__init__.py", line 278, in order_place
return self._post("orders.place", params)["order_id"]
File "C:\Python27\lib\site-packages\kiteconnect\__init__.py", line 459, in _post
return self._request(route, "POST", params)
File "C:\Python27\lib\site-packages\kiteconnect\__init__.py", line 542, in _request
raise(exp(data["message"], code=r.status_code))
GeneralException: Route not found

I am able to fetch margins and get quotes for scrips.
  • ferdinand.sousa
    I set debug=True and got the following details:

    ('Request: ', 'https://api.kite.trade/orders/BO')
    ({'product': 'BO', 'order_type': 'LIMIT', 'trigger_price': None, 'access_token': u'accesstokenaccesstoken', 'price': 165, 'trailing_stoploss': 1, 'stoploss_value': 1, 'disclosed_quantity': None, 'transaction_type': 'BUY', 'variety': 'BO', 'tradingsymbol': 'HINDALCO', 'tag': 'TEST', 'validity': 'DAY', 'api_key': 'apikeyapikeyapikeyapikey', 'squareoff_value': 10, 'exchange': 'NSE', 'quantity': 300}, '\n')
  • sujith
    Hi @ferdinand.sousa,

    Your url is wrong, all varieties are specified in lowercase, So example url is something like this https://api.kite.trade/orders/bo
  • ferdinand.sousa
    That fixed it. Thanks!
This discussion has been closed.