☰
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.8K
All Categories
0
Incidents
153
Node JS client
40
Go client
793
.Net API client
378
Kite Publisher
537
.Net / VBA / Excel (3rd party)
457
Algorithms and Strategies
993
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 2020
sujith
Kite Order - Trying to pass Exchange
kiteapi
July 2020
in
Python client
Here is the code:
exchange = "NSE"
kiteExchange = "kite.EXCHANGE_" + exchange
kiteExchange = str(kiteExchange)
print(type(kiteExchange))
print(kiteExchange)
print("kite.EXCHANGE_NSE")
id = kite.place_order(
tradingsymbol=symbol,
exchange=kiteExchange,
transaction_type=kite.TRANSACTION_TYPE_SELL,
quantity=quantity,
price=price,
order_type=kite.ORDER_TYPE_LIMIT,
product=kite.PRODUCT_MIS,
variety=kite.VARIETY_REGULAR,
)
return id
As you can see I am trying to pass exchange, but errors out saying:
kite.EXCHANGE_NSE
kite.EXCHANGE_NSE
Traceback (most recent call last):
Error:
kiteconnect.exceptions.InputException: Invalid `exchange`.
If I pass the exact string "kite.EXCHANGE_NSE" that works fine. I have tried to see what is wrong for quite some time, made sure the type is str, but still errors out.
Tagged:
orders
sujith
July 2020
Can you run in debug mode and paste the complete stack trace here?
Make sure to remove the app and client-specific details.
Sign In
or
Register
to comment.
Make sure to remove the app and client-specific details.