Save Kline data into SQLlite database, need a good working script

Hello, i am trying since few days to code a Node.js script for saveing Kline data into SQLite database, i have use the technic to read from websocket and from Kline Rest API call, always when the websocket stream say that a candel have close then i download again from Kline some data otherwise i let the script save the stream candle data to the database, but since few days i have errors in my scripts and it looks like i waist to much time till i find out how to code it best way.

And i also thing this is something which many people have already try and there could be a good solution already anywhere, if you just know where.

Have somebody here a tip for me for a good working node.js script which save Kline data into SQLite database?

I need this candelsticks datas to draw some charts.

Hi @Email_Account, since this forum is mostly focused on direct question about the API endpoints, it’s unlikely you’ll have a direct answer on how to write the script.
However, if feasible you could directly download kline .csv files from https://data.binance.vision and then pass to your database.

thank you to let me know that.
Normaly it would be also easy if i just can call the Kline rest API every second, but i know that there are rate limits and for my app i want to offer livecharts for many different currencys, but i dont know why my script at moment dont work like i want and before waisting to much time i was thinking there could be ready coded scripts.
Your tip with csv files sound interestinig but do you think for something like live charts it usefull?