☰
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
14.1K
All Categories
0
Incidents
157
Node JS client
41
Go client
797
.Net API client
385
Kite Publisher
537
.Net / VBA / Excel (3rd party)
463
Algorithms and Strategies
1K
Java client
1.1K
API clients
407
PHP client
4.1K
Python client
349
Mobile and Desktop apps
1.4K
Market data (WebSockets)
3.4K
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.