Created
June 21, 2022 15:13
-
-
Save ganigithub/63578189768a66e335cff25b446c606a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
######################### 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