TradeViaPython / Kite_Zerodha

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Not able to place order

yogesh249 opened this issue · comments

I have used the exact same code as given in GITHUB to place the order

Traceback (most recent call last):
File "C:\Users\HP\KiteTrading.py", line 25, in
order = kite.place_order(variety=kite.VARIETY_REGULAR,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\HP\kite_trade.py", line 134, in place_order
order_id = self.session.post(f"{self.root_url}/orders/{variety}",
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: 'NoneType' object is not subscriptable

Resolved !!
I was using wrong parameters like wrong trading symbol, wrong exchange (not NFO) for options.

Hi Yogesh, getting error while placing order. can you please share working .py code.

ERROR:"TypeError: KiteApp.place_order() got an unexpected keyword argument 'squareoff'"

using this code :
order = kite.place_order(variety=kite.VARIETY_REGULAR,
exchange=kite.EXCHANGE_NSE,
tradingsymbol="ACC",
transaction_type=kite.TRANSACTION_TYPE_BUY,
quantity=1,
product=kite.PRODUCT_MIS,
order_type=kite.ORDER_TYPE_MARKET,
price=None,
validity=None,
disclosed_quantity=None,
trigger_price=None,
squareoff=None,
stoploss=None,
trailing_stoploss=None,
tag="TradeViaPython")

print(order)

thanks in advance