Skip to content

Instantly share code, notes, and snippets.

@ganigithub
Created June 27, 2022 10:48
Show Gist options
  • Save ganigithub/95c2b7f128e94bddc27c6869142f18be to your computer and use it in GitHub Desktop.
Save ganigithub/95c2b7f128e94bddc27c6869142f18be to your computer and use it in GitHub Desktop.
import time
ticker_symbol = "NSE:GLENMARK"
trading_symbol = "GLENMARK"
quantity = 1
#The time at which we want to place order (24 hr format)
entry_hour = 13
entry_minute = 00
for i in range(1000000):
time = datetime.datetime.now()
if (time.hour == entry_hour) and (time.minute == entry_minute):
kite.place_order(tradingsymbol = trading_symbol,
exchange = "NSE",
transaction_type = "SELL",
quantity = quantity,
order_type = "MARKET",
variety = "regular",
product = "MIS")
print('order executed at', f'{entry_hour}:{entry_minute}')
break
time.sleep(5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment