Skip to content

Commit f3ee953

Browse files
fix #380
1 parent c79c720 commit f3ee953

30 files changed

+2025
-1982
lines changed

.github/ISSUE_TEMPLATE/bug_report.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,10 @@ body:
113113
description: |
114114
Are you using the `stream_buffer` or the `process_stream_data`-callback function?
115115
options:
116-
- stream_buffer
116+
- process_asyncio_queue
117117
- process_stream_data
118+
- process_stream_data_async
119+
- stream_buffer
118120
validations:
119121
required: true
120122

.github/workflows/build_wheels.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ jobs:
9090
generate_release_notes: true
9191
name: unicorn-binance-websocket-api
9292
prerelease: false
93-
tag_name: 2.7.1
93+
tag_name: 2.7.2
9494
token: ${{ secrets.GITHUB_TOKEN }}
9595

9696
- name: Create PyPi Release

CHANGELOG.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,11 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
99

1010
[How to upgrade to the latest version!](https://unicorn-binance-websocket-api.docs.lucit.tech/readme.html#installation-and-upgrade)
1111

12-
## 2.7.1.dev (development stage/unreleased/unstable)
12+
## 2.7.2.dev (development stage/unreleased/unstable)
13+
14+
## 2.7.2
15+
### Fixed
16+
- Stream Data is always returned in `raw_data` format. [issue#380](https://github.com/LUCIT-Systems-and-Development/unicorn-binance-websocket-api/issues/380)
1317

1418
## 2.7.1
1519
### Added

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -486,10 +486,10 @@ Run in bash:
486486
`pip install https://github.com/LUCIT-Systems-and-Development/unicorn-binance-websocket-api/archive/$(curl -s https://api.github.com/repos/LUCIT-Systems-and-Development/unicorn-binance-websocket-api/releases/latest | grep -oP '"tag_name": "\K(.*)(?=")').tar.gz --upgrade`
487487

488488
#### Windows
489-
Use the below command with the version (such as 2.7.1) you determined
489+
Use the below command with the version (such as 2.7.2) you determined
490490
[here](https://github.com/LUCIT-Systems-and-Development/unicorn-binance-websocket-api/releases/latest):
491491

492-
`pip install https://github.com/LUCIT-Systems-and-Development/unicorn-binance-websocket-api/archive/2.7.1.tar.gz --upgrade`
492+
`pip install https://github.com/LUCIT-Systems-and-Development/unicorn-binance-websocket-api/archive/2.7.2.tar.gz --upgrade`
493493
### From the latest source (dev-stage) with PIP from [GitHub](https://github.com/LUCIT-Systems-and-Development/unicorn-binance-websocket-api)
494494
This is not a release version and can not be considered to be stable!
495495

dev/set_version_config.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
2.7.1
1+
2.7.2
22
meta.yaml,pyproject.toml,setup.py,README.md,.github/workflows/build_wheels.yml,dev/sphinx/source/conf.py,unicorn_binance_websocket_api/manager.py

dev/sphinx/source/changelog.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,11 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
99

1010
[How to upgrade to the latest version!](https://unicorn-binance-websocket-api.docs.lucit.tech/readme.html#installation-and-upgrade)
1111

12-
## 2.7.1.dev (development stage/unreleased/unstable)
12+
## 2.7.2.dev (development stage/unreleased/unstable)
13+
14+
## 2.7.2
15+
### Fixed
16+
- Stream Data is always returned in `raw_data` format. [issue#380](https://github.com/LUCIT-Systems-and-Development/unicorn-binance-websocket-api/issues/380)
1317

1418
## 2.7.1
1519
### Added

dev/sphinx/source/conf.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
# The short X.Y version
2828
version = ''
2929
# The full version, including alpha/beta/rc tags
30-
release = '2.7.1'
30+
release = '2.7.2'
3131

3232
html_last_updated_fmt = "%b %d %Y at %H:%M (CET)"
3333

dev/sphinx/source/readme.md

+9-6
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ ubwa.create_stream(channels=['trade', 'kline_1m'],
7676
process_stream_data=process_new_receives)
7777
```
7878

79-
### Or with a [async callback function](https://unicorn-binance-websocket-api.docs.lucit.tech/unicorn_binance_websocket_api.html?highlight=process_stream_data#unicorn_binance_websocket_api.manager.BinanceWebSocketApiManager.create_stream) just do
79+
### Or with an [async callback function](https://unicorn-binance-websocket-api.docs.lucit.tech/unicorn_binance_websocket_api.html?highlight=process_stream_data#unicorn_binance_websocket_api.manager.BinanceWebSocketApiManager.create_stream) just do
8080

8181
```
8282
from unicorn_binance_websocket_api import BinanceWebSocketApiManager
@@ -210,8 +210,8 @@ currently "blind" and you may want to close open positions to be on the safe sid
210210
incorrect values or that you have to reload the missing data via REST as an alternative.
211211

212212
For this purpose, the UNICORN Binance WebSocket API provides so-called
213-
[`stream_signals`](https://github.com/LUCIT-Systems-and-Development/unicorn-binance-websocket-api/wiki/%60stream_signals%60)
214-
, which are used to tell your code in real time when a stream is connected, when it received its first data record, when
213+
[`stream_signals`](https://github.com/LUCIT-Systems-and-Development/unicorn-binance-websocket-api/wiki/%60stream_signals%60),
214+
which are used to tell your code in real time when a stream is connected, when it received its first data record, when
215215
it was disconnected and stopped, and when the stream cannot be restored.
216216

217217
```
@@ -263,7 +263,7 @@ also all private userData streams which needs to be used with a valid
263263
from the Binance Exchange [www.binance.com](https://www.binance.com/),
264264
[testnet.binance.vision](https://testnet.binance.vision/) or
265265
[www.binance.us](https://www.binance.us) - for the DEX you need a user address from
266-
[www.binance.org](https://www.binance.org/en/create) or [testnet.binance.org](https://testnet.binance.org/en/create)
266+
[www.binance.org](https://www.binance.org/en/create) or [testnet.binance.org](https://testnet.binance.org/en/create),
267267
and you can [get funds](https://www.binance.vision/tutorials/binance-dex-funding-your-testnet-account) for the testnet.
268268

269269
Use the [UNICORN Binance REST API](https://www.lucit.tech/unicorn-binance-rest-api.html) in combination.
@@ -367,6 +367,9 @@ and many more! Explore them [here](https://unicorn-binance-websocket-api.docs.lu
367367
and specific streams with
368368
[`get_stream_info()`](https://unicorn-binance-websocket-api.docs.lucit.tech/unicorn_binance_websocket_api.html#unicorn_binance_websocket_api.manager.BinanceWebSocketApiManager.get_stream_info).
369369

370+
- Available as a package via `pip` and `conda` as precompiled C extension with stub files for improved Intellisense
371+
functions and source code for easier debugging of the source code. [To the installation.](#installation-and-upgrade)
372+
370373
- Nice to use with [iPython](https://ipython.org/):
371374
"IPython (Interactive Python) is a command shell for interactive computing that offers introspection,
372375
rich media, shell syntax, tab completion, and history."
@@ -483,10 +486,10 @@ Run in bash:
483486
`pip install https://github.com/LUCIT-Systems-and-Development/unicorn-binance-websocket-api/archive/$(curl -s https://api.github.com/repos/LUCIT-Systems-and-Development/unicorn-binance-websocket-api/releases/latest | grep -oP '"tag_name": "\K(.*)(?=")').tar.gz --upgrade`
484487

485488
#### Windows
486-
Use the below command with the version (such as 2.7.1) you determined
489+
Use the below command with the version (such as 2.7.2) you determined
487490
[here](https://github.com/LUCIT-Systems-and-Development/unicorn-binance-websocket-api/releases/latest):
488491

489-
`pip install https://github.com/LUCIT-Systems-and-Development/unicorn-binance-websocket-api/archive/2.7.1.tar.gz --upgrade`
492+
`pip install https://github.com/LUCIT-Systems-and-Development/unicorn-binance-websocket-api/archive/2.7.2.tar.gz --upgrade`
490493
### From the latest source (dev-stage) with PIP from [GitHub](https://github.com/LUCIT-Systems-and-Development/unicorn-binance-websocket-api)
491494
This is not a release version and can not be considered to be stable!
492495

docs/.buildinfo

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# Sphinx build info version 1
22
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
3-
config: 5be6d9e3caa654ce2760904d74eac401
3+
config: 2388cf749599782cc97e4320c09ba519
44
tags: 645f666f9bcd5a90fca523b33c5a78b7

docs/_modules/index.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<head>
55
<meta charset="utf-8" />
66
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7-
<title>Overview: module code &#8212; unicorn-binance-websocket-api 2.7.1 documentation</title><meta name="viewport" content="width=device-width, initial-scale=1.0">
7+
<title>Overview: module code &#8212; unicorn-binance-websocket-api 2.7.2 documentation</title><meta name="viewport" content="width=device-width, initial-scale=1.0">
88

99
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=92fd9be5" />
1010
<link rel="stylesheet" type="text/css" href="../_static/pydoctheme.css?v=fdf8e9ae" />
@@ -254,7 +254,7 @@ <h3>Navigation</h3>
254254
<a href="https://docs.lucit.tech">Index of all LUCIT Software Documentation</a><br />
255255
&copy; <a href="/license.html">Copyright</a> 2023-2023, LUCIT Systems and Development. All Rights Reserved..
256256
See <a href="/license.html">License</a> for more information.<br />
257-
Last updated on May 14 2024 at 21:34 (CET).
257+
Last updated on May 15 2024 at 09:17 (CET).
258258
<a href="https://github.com/LUCIT-Systems-and-Development/unicorn-binance-websocket-api/issues/new/choose">Found a bug</a>?
259259
<br />
260260
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 7.2.6.

docs/_modules/unicorn_binance_websocket_api/manager.html

+9-9
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<head>
55
<meta charset="utf-8" />
66
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7-
<title>unicorn_binance_websocket_api.manager &#8212; unicorn-binance-websocket-api 2.7.1 documentation</title><meta name="viewport" content="width=device-width, initial-scale=1.0">
7+
<title>unicorn_binance_websocket_api.manager &#8212; unicorn-binance-websocket-api 2.7.2 documentation</title><meta name="viewport" content="width=device-width, initial-scale=1.0">
88

99
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=92fd9be5" />
1010
<link rel="stylesheet" type="text/css" href="../../_static/pydoctheme.css?v=fdf8e9ae" />
@@ -208,7 +208,7 @@ <h1>Source code for unicorn_binance_websocket_api.manager</h1><div class="highli
208208

209209

210210
<span class="n">__app_name__</span><span class="p">:</span> <span class="nb">str</span> <span class="o">=</span> <span class="s2">&quot;unicorn-binance-websocket-api&quot;</span>
211-
<span class="n">__version__</span><span class="p">:</span> <span class="nb">str</span> <span class="o">=</span> <span class="s2">&quot;2.7.1.dev&quot;</span>
211+
<span class="n">__version__</span><span class="p">:</span> <span class="nb">str</span> <span class="o">=</span> <span class="s2">&quot;2.7.2&quot;</span>
212212
<span class="n">__logger__</span><span class="p">:</span> <span class="n">logging</span><span class="o">.</span><span class="n">getLogger</span> <span class="o">=</span> <span class="n">logging</span><span class="o">.</span><span class="n">getLogger</span><span class="p">(</span><span class="s2">&quot;unicorn_binance_websocket_api&quot;</span><span class="p">)</span>
213213

214214
<span class="n">logger</span> <span class="o">=</span> <span class="n">__logger__</span>
@@ -859,7 +859,7 @@ <h1>Source code for unicorn_binance_websocket_api.manager</h1><div class="highli
859859
<span class="n">api_key</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
860860
<span class="n">api_secret</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
861861
<span class="n">symbols</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
862-
<span class="n">output</span><span class="p">:</span> <span class="n">Optional</span><span class="p">[</span><span class="n">Literal</span><span class="p">[</span><span class="s1">&#39;dict&#39;</span><span class="p">,</span> <span class="s1">&#39;raw_data&#39;</span><span class="p">,</span> <span class="s1">&#39;UnicornFy&#39;</span><span class="p">]]</span> <span class="o">=</span> <span class="s2">&quot;raw_data&quot;</span><span class="p">,</span>
862+
<span class="n">output</span><span class="p">:</span> <span class="n">Optional</span><span class="p">[</span><span class="n">Literal</span><span class="p">[</span><span class="s1">&#39;dict&#39;</span><span class="p">,</span> <span class="s1">&#39;raw_data&#39;</span><span class="p">,</span> <span class="s1">&#39;UnicornFy&#39;</span><span class="p">]]</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span>
863863
<span class="n">ping_interval</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
864864
<span class="n">ping_timeout</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
865865
<span class="n">close_timeout</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
@@ -1821,7 +1821,7 @@ <h1>Source code for unicorn_binance_websocket_api.manager</h1><div class="highli
18211821
<span class="n">api_key</span><span class="p">:</span> <span class="nb">str</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span>
18221822
<span class="n">api_secret</span><span class="p">:</span> <span class="nb">str</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span>
18231823
<span class="n">symbols</span><span class="p">:</span> <span class="n">Union</span><span class="p">[</span><span class="nb">str</span><span class="p">,</span> <span class="n">List</span><span class="p">[</span><span class="nb">str</span><span class="p">],</span> <span class="n">Set</span><span class="p">[</span><span class="nb">str</span><span class="p">],</span> <span class="kc">None</span><span class="p">]</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span>
1824-
<span class="n">output</span><span class="p">:</span> <span class="n">Optional</span><span class="p">[</span><span class="n">Literal</span><span class="p">[</span><span class="s1">&#39;dict&#39;</span><span class="p">,</span> <span class="s1">&#39;raw_data&#39;</span><span class="p">,</span> <span class="s1">&#39;UnicornFy&#39;</span><span class="p">]]</span> <span class="o">=</span> <span class="s2">&quot;raw_data&quot;</span><span class="p">,</span>
1824+
<span class="n">output</span><span class="p">:</span> <span class="n">Optional</span><span class="p">[</span><span class="n">Literal</span><span class="p">[</span><span class="s1">&#39;dict&#39;</span><span class="p">,</span> <span class="s1">&#39;raw_data&#39;</span><span class="p">,</span> <span class="s1">&#39;UnicornFy&#39;</span><span class="p">]]</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span>
18251825
<span class="n">ping_interval</span><span class="p">:</span> <span class="nb">int</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span>
18261826
<span class="n">ping_timeout</span><span class="p">:</span> <span class="nb">int</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span>
18271827
<span class="n">close_timeout</span><span class="p">:</span> <span class="nb">int</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span>
@@ -1894,7 +1894,7 @@ <h1>Source code for unicorn_binance_websocket_api.manager</h1><div class="highli
18941894
<span class="sd"> :type api_secret: str</span>
18951895
<span class="sd"> :param symbols: provide the symbols for isolated_margin user_data streams</span>
18961896
<span class="sd"> :type symbols: str, list, set</span>
1897-
<span class="sd"> :param output: the default setting `raw_data` can be globaly overwritten with the parameter</span>
1897+
<span class="sd"> :param output: the default setting `raw_data` can be globally overwritten with the parameter</span>
18981898
<span class="sd"> `output_default &lt;https://unicorn-binance-websocket-api.docs.lucit.tech/unicorn_binance_websocket_api.html?highlight=output_default#module-unicorn_binance_websocket_api.unicorn_binance_websocket_api_manager&gt;`__</span>
18991899
<span class="sd"> of BinanceWebSocketApiManager`. To overrule the `output_default` value for this specific stream,</span>
19001900
<span class="sd"> set `output` to &quot;dict&quot; to convert the received raw data to a python dict, set to &quot;UnicornFy&quot; to</span>
@@ -4506,7 +4506,7 @@ <h1>Source code for unicorn_binance_websocket_api.manager</h1><div class="highli
45064506
<span class="n">new_api_key</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
45074507
<span class="n">new_api_secret</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
45084508
<span class="n">new_symbols</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
4509-
<span class="n">new_output</span><span class="p">:</span> <span class="n">Optional</span><span class="p">[</span><span class="n">Literal</span><span class="p">[</span><span class="s1">&#39;dict&#39;</span><span class="p">,</span> <span class="s1">&#39;raw_data&#39;</span><span class="p">,</span> <span class="s1">&#39;UnicornFy&#39;</span><span class="p">]]</span> <span class="o">=</span> <span class="s2">&quot;raw_data&quot;</span><span class="p">,</span>
4509+
<span class="n">new_output</span><span class="p">:</span> <span class="n">Optional</span><span class="p">[</span><span class="n">Literal</span><span class="p">[</span><span class="s1">&#39;dict&#39;</span><span class="p">,</span> <span class="s1">&#39;raw_data&#39;</span><span class="p">,</span> <span class="s1">&#39;UnicornFy&#39;</span><span class="p">]]</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span>
45104510
<span class="n">new_ping_interval</span><span class="o">=</span><span class="mi">20</span><span class="p">,</span>
45114511
<span class="n">new_ping_timeout</span><span class="o">=</span><span class="mi">20</span><span class="p">,</span>
45124512
<span class="n">new_close_timeout</span><span class="o">=</span><span class="mi">10</span><span class="p">,</span>
@@ -4539,8 +4539,8 @@ <h1>Source code for unicorn_binance_websocket_api.manager</h1><div class="highli
45394539
<span class="sd"> :type new_symbols: str</span>
45404540
<span class="sd"> :return: new stream_id</span>
45414541
<span class="sd"> :param new_output: set to &quot;dict&quot; to convert the received raw data to a python dict, set to &quot;UnicornFy&quot; to convert</span>
4542-
<span class="sd"> with `UnicornFy &lt;https://github.com/LUCIT-Systems-and-Development/unicorn-fy&gt;`__ - otherwise the output</span>
4543-
<span class="sd"> remains unchanged and gets delivered as received from the endpoints</span>
4542+
<span class="sd"> with `UnicornFy &lt;https://github.com/LUCIT-Systems-and-Development/unicorn-fy&gt;`__ - otherwise</span>
4543+
<span class="sd"> the output remains unchanged and gets delivered as received from the endpoints</span>
45444544
<span class="sd"> :type new_output: str</span>
45454545
<span class="sd"> :param new_ping_interval: Once the connection is open, a `Ping frame` is sent every</span>
45464546
<span class="sd"> `ping_interval` seconds. This serves as a keepalive. It helps keeping</span>
@@ -5428,7 +5428,7 @@ <h3>Navigation</h3>
54285428
<a href="https://docs.lucit.tech">Index of all LUCIT Software Documentation</a><br />
54295429
&copy; <a href="/license.html">Copyright</a> 2023-2023, LUCIT Systems and Development. All Rights Reserved..
54305430
See <a href="/license.html">License</a> for more information.<br />
5431-
Last updated on May 14 2024 at 21:34 (CET).
5431+
Last updated on May 15 2024 at 09:17 (CET).
54325432
<a href="https://github.com/LUCIT-Systems-and-Development/unicorn-binance-websocket-api/issues/new/choose">Found a bug</a>?
54335433
<br />
54345434
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 7.2.6.

0 commit comments

Comments
 (0)