Closed vishvesh098 closed 2 years ago
@krishnavelu bro please help on this issue as soon as possible.
Thanks & regards, Vishvesh Upadhyay
I didn’t understand what you are looking for. I don’t know sql lite. If you have any problems getting live data, read this. After getting live data what you are doing with that is up to you. Understand this library completely. And understand/study sql lite completely. Try do do one thing at at a time and develop your code. Code copy pasted from internet many times won’t work.
Hi I managed to get this code by searching on internet forums.
Basically I am very new to python. So I am finding difficulty to create a code that ...
1) Get livestreaming data from alice_blue api 2) store the data into a database (e.g. sqlite3)
So to get live stream start which thing should be called ? (for example if I defined x= 3, & then if i have to print x i write print(x). In your code after defining event_handler.. , open_callback, alice.subscribe, alice.start_websocket which thing is to start the webstreaming ?)
I managed to get sqlite3 insert code from forums. I tried to add it at multiple places such as running it seperately, defining with event_handler.. but it does not insert data into database. also does not show any error.
Please help me solve issues.
code to generate access token and alice object
creating database and tables
till here no problem everything works fine
Now I defined sql insert function. I have called the function inside the event_handler.. function but didnt work, I defined separately and run separately but didnt work, also i defined the whole thing inside the event handler but didnt work
I tested the sqlite3 database using yfinance and yliveticker and it works like charm (using the absolutely same syntax as this code) also i have tried manipulating sqlite3 code many times so there might be some minor error like missing comma or bracket.
now i tried running the following code to get the live market data. when I run the full code I get market data but I dont know specifically which function starts websocket streaming