Skip to content

Instantly share code, notes, and snippets.

@ganigithub
Last active June 27, 2022 10:46
Show Gist options
  • Select an option

  • Save ganigithub/89fe11b72a7126f3055d1911b2e4595f to your computer and use it in GitHub Desktop.

Select an option

Save ganigithub/89fe11b72a7126f3055d1911b2e4595f to your computer and use it in GitHub Desktop.
import time
ticker_symbol = "NSE:GLENMARK"
trading_symbol = 'GLENMARK'
quantity = 1
for i in range(10000):
ltp = kite.ltp(ticker_symbol)[ticker_symbol]["last_price"]
if ltp >= 450:
kite.place_order(tradingsymbol = trading_symbol,
exchange = "NSE",
transaction_type = "BUY",
quantity = quantity,
order_type = "MARKET",
variety = "regular",
product = "MIS")
break
time.sleep(5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment