Skip to content

Commit

Permalink
fix(example): Add missing variety param
Browse files Browse the repository at this point in the history
  • Loading branch information
joeirimpan committed May 22, 2018
1 parent 93c411e commit c7e661d
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions examples/simple.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,15 @@

# Place an order
try:
order_id = kite.place_order(tradingsymbol="INFY",
exchange=kite.EXCHANGE_NSE,
transaction_type=kite.TRANSACTION_TYPE_BUY,
quantity=1,
order_type=kite.ORDER_TYPE_MARKET,
product=kite.PRODUCT_NRML)
order_id = kite.place_order(
variety=kite.VARIETY_REGULAR,
exchange=kite.EXCHANGE_NSE,
tradingsymbol="INFY",
transaction_type=kite.TRANSACTION_TYPE_BUY,
quantity=1,
product=kite.PRODUCT_NRML,
order_type=kite.ORDER_TYPE_MARKET
)

logging.info("Order placed. ID is: {}".format(order_id))
except Exception as e:
Expand Down

1 comment on commit c7e661d

@sachinmalee
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kite.request_access_token("xxxxxxxxxxxxxxxxxxxxxxxxxx",api_secret)
Error ----->
AttributeError: 'KiteConnect' object has no attribute 'request_access_token'

Please sign in to comment.