don't know howto heandle the receive data from binance
See original GitHub issuehi, guy I came from python-biannce client user, i like current unicorn-binance socket client. but i found there is missing some sample case to examine the usage case.
such as: I want to handle KDJ kline. i can reference this repo’s sample code:
oldest_stream_data_from_stream_buffer = UnicornFy.binance_com_websocket(oldest_stream_data_from_stream_buffer)
but the oldest_stream_data_from_stream_buffer is not easy to use to feed pandas framedata.
below is my python-binance code
candles = client.get_klines(symbol=symbol, interval=Client.KLINE_INTERVAL_5MINUTE)
df = pd.DataFrame(candles)
df.columns=['timestart','open','high','low','close','?','timeend','?','?','?','?','?']
df.timestart = [datetime.fromtimestamp(i/1000) for i in df.timestart.values]
df.timeend = [datetime.fromtimestamp(i/1000) for i in df.timeend.values]
in unicorn-binance. howto do that. please give some example. thanks.
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
How to get live crypto data from Binance | by Gabriele Deri
Just call the ws_trade() function like a normal function and wsapp.run_forever() will handle all the incoming messages from Binance and it will display...
Read more >Exploratory Data Analysis with the Binance API using Python ...
Want to start your own crypto analysis?Keen to apply a little Python or Data Science to your finances?Well this series is for you!...
Read more >15 Tips to Enhance Security of Your Binance Account
1. Always use · 2. Check the list of devices · 3. Use a strong password for your Binance account and change it...
Read more >Binance Python API – A Step-by-Step Guide - Algo Trading 101
Using the Binance WebSocket for the latest Bitcoin price. The Binance WebSocket requires us to only send a command once to open up...
Read more >Do you want consistent data from binance? *** #254 - GitHub
Yes I do think that should be the process of recovering lost data. As for the way to receive the signal, I don't...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@oliver-zehentleitner thanks for your patient reply. I got it. Thanks a lot
I have very less time this days so I cant prepare an example file atm.
The first request from python binance is a REST API request for ONE symbol!
The websocket is able to deliver klines for any symbol via one single connection. So they add some more infos to enable you to recognize what you got.
the output you get is:
This is a string variable with json content, now convert the json to a python dict with:
your_dict = json.loads(stream_data_json)https://github.com/binance-exchange/binance-official-api-docs/blob/master/web-socket-streams.md#klinecandlestick-streams
What you need is o c h l (open, close, highest and lowest price).
I hope this helps you!