☰
Login
Signup
Home
›
Python client
Howdy, Stranger!
It looks like you're new here. If you want to get involved, click one of these buttons!
Sign In
Register
Categories
Recent Discussions
Activity
Categories
13.9K
All Categories
0
Incidents
154
Node JS client
40
Go client
793
.Net API client
378
Kite Publisher
537
.Net / VBA / Excel (3rd party)
457
Algorithms and Strategies
994
Java client
1.1K
API clients
404
PHP client
4K
Python client
346
Mobile and Desktop apps
1.4K
Market data (WebSockets)
3.3K
General
In this Discussion
July 2023
shijukklm
July 2023
sujith
Order error
shijukklm
July 2023
in
Python client
kite.place_order - > Facing below error though the api token and api secret are correct... Could someone please help ?
kite.place_order(tradingsymbol="INFY", quantity=1, exchange="NSE", transaction_type="BUY", order_type="MARKET", product="CNC", variety="REGULAR")
---------------------------------------------------------------------------
InputException Traceback (most recent call last)
Cell In[8], line 1
----> 1 kite.place_order(tradingsymbol="INFY", quantity=1, exchange="NSE", transaction_type="BUY", order_type="MARKET", product="CNC", variety="REGULAR")
File ~\anaconda3\Lib\site-packages\kiteconnect\connect.py:360, in KiteConnect.place_order(self, variety, exchange, tradingsymbol, transaction_type, quantity, product, order_type, price, validity, validity_ttl, disclosed_quantity, trigger_price, iceberg_legs, iceberg_quantity, auction_number, tag)
357 if params[k] is None:
358 del (params[k])
--> 360 return self._post("order.place",
361 url_args={"variety": variety},
362 params=params)["order_id"]
File ~\anaconda3\Lib\site-packages\kiteconnect\connect.py:855, in KiteConnect._post(self, route, url_args, params, is_json, query_params)
853 def _post(self, route, url_args=None, params=None, is_json=False, query_params=None):
854 """Alias for sending a POST request."""
--> 855 return self._request(route, "POST", url_args=url_args, params=params, is_json=is_json, query_params=query_params)
File ~\anaconda3\Lib\site-packages\kiteconnect\connect.py:927, in KiteConnect._request(self, route, method, url_args, params, is_json, query_params)
925 # native Kite errors
926 exp = getattr(ex, data.get("error_type"), ex.GeneralException)
--> 927 raise exp(data["message"], code=r.status_code)
929 return data["data"]
930 elif "csv" in r.headers["content-type"]:
InputException: Invalid `api_key` or `access_token`.
sujith
July 2023
You seem to be sending the uppercase value for variety. You can check out
here
to know more.
shijukklm
July 2023
Thanks a lot
.. I given lowercase and it worked..
This discussion has been closed.