TradeViaPython / Kite_Zerodha

171 stars 109 forks source link

Not able to place order #21

Open mauryaamit007d opened 1 year ago

mauryaamit007d commented 1 year ago

HI, getting this error while placing order.

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

mtech2008 commented 1 year ago

I am also getting the same error

Anirudh-12 commented 10 months ago

remove the square_off=None here is the modified_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,
stoploss=None,
trailing_stoploss=None,
tag="TradeViaPython")