zerodha / pykiteconnect

The official Python client library for the Kite Connect trading APIs
MIT License
981 stars 469 forks source link

TypeError: place_order() missing 1 required positional argument: 'variety' #66

Closed kinhalkarrushikesh123 closed 4 years ago

kinhalkarrushikesh123 commented 4 years ago

here you need and extra argument and have to specify variety

grsb007 commented 4 years ago

Is there any solution for this?

vividvilla commented 4 years ago

As per documentation variety is a mandatory field - https://kite.trade/docs/pykiteconnect/v3/#kiteconnect.KiteConnect.place_order

c3phalik commented 4 years ago

Is there any solution for this?

It's pretty straightforward. Check the code below order_id = kite.place_order(tradingsymbol='ITC', exchange=kite.EXCHANGE_NSE, transaction_type=kite.TRANSACTION_TYPE_BUY, quantity=1, order_type=kite.ORDER_TYPE_MARKET, product=kite.PRODUCT_CNC, variety=kite.VARIETY_AMO)

Variety can have the following values:

vividvilla commented 4 years ago

Closing the issue since author didn't get back.