Extract Particular Tick Stock Data from Streaming KiteConnect WebSocket

Streaming Tick Stock Data contains Voluminous data and Contains in a large set of Regular Expressions to filter out and get required price i have performed some operations by importing re.


While doing this i Exactly First Extracted those Tick Data in CSV and then read them and then First i asked for a match value while split them and read in each and every line of row for that i just looped through using 'for' loop and took an x for iteartaing every row.In the End if Reached end of the file it will throw an error.


For Further instructions please follow the Video and then go for the Code Input.




#import package module
import re

#read tick data
r1=open('quot.csv','r').read()

#loop it and perform the split operation
x=0
for r2 in r1:
    r2=re.split(r'last_price',r1)[x].split(',')[0]
    r2=re.findall(r'\d+',r2)
    x+=1
    print(r2)

--End of Code Input--