☰
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.2K
All Categories
0
Incidents
126
Node JS client
36
Go client
765
.Net API client
360
Kite Publisher
532
.Net / VBA / Excel (3rd party)
433
Algorithms and Strategies
964
Java client
1K
API clients
400
PHP client
3.8K
Python client
331
Mobile and Desktop apps
1.3K
Market data (WebSockets)
3.1K
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.