Skip to content

Instantly share code, notes, and snippets.

@ganigithub
Created June 21, 2022 15:13
Show Gist options
  • Save ganigithub/63578189768a66e335cff25b446c606a to your computer and use it in GitHub Desktop.
Save ganigithub/63578189768a66e335cff25b446c606a to your computer and use it in GitHub Desktop.
######################### ORDER FUNCTION ##########################
def order(trading_symbol, t_type, quantity, kite):
"""
This function will execute order. i.e place Buy/Sell order
trading_symbol : symbol of the stock
t_type : type of order. 'BUY' or 'SELL'
quantity : quantity of the stocks to buy/sell
kite : kite object that is created earlier
"""
kite.place_order(tradingsymbol = trading_symbol,
exchange = 'NSE',
transaction_type = t_type,
quantity = quantity,
order_type = 'MARKET',
variety = 'regular',
product = 'MIS')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment