So I am new to python I wrote a code which gives me spot LTP in a loop. but I wanted it to give me the live data.
I want it to give me the live updated data after every 1.5 seconds. Again Sorry I'm New
#importing Required Modules
from nsetools import Nse
import time as time
#Welcome
print("A Product of iTrenzy Technologies")
#Making the Symbol UpperCase
symbol = input("Enter Symbol: ")
symbol_1 = symbol.upper()
#Getting the Data
nse = Nse()
#Syncing index symbols and stock symbols
try:
q = nse.get_index_quote(symbol_1)
v = (q["lastPrice"])
except:
q = nse.get_quote(symbol_1)
v = (q["lastPrice"])
#Building Loops
while True:
print(f"The Current Spot Price of {symbol_1} is", v )
time.sleep(1.5)