Skip to content

Commit ec3164e

Browse files
authored
fix(signature): encode non-ascii symbol (#1618)
* update gitignore * bump version * fix(signature): encode non-ascii symbol * bump version
1 parent e692c12 commit ec3164e

File tree

4 files changed

+11
-3
lines changed

4 files changed

+11
-3
lines changed

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
=================================
2-
Welcome to python-binance v1.0.30
2+
Welcome to python-binance v1.0.31
33
=================================
44

55
.. image:: https://img.shields.io/pypi/v/python-binance.svg

binance/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
55
"""
66

7-
__version__ = "1.0.30"
7+
__version__ = "1.0.31"
88

99
from binance.async_client import AsyncClient # noqa
1010
from binance.client import Client # noqa

binance/base_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ def _generate_signature(self, data: Dict, uri_encode=True) -> str:
374374
sig_func = self._rsa_signature
375375
else:
376376
sig_func = self._ed25519_signature
377-
query_string = "&".join([f"{d[0]}={d[1]}" for d in self._order_params(data)])
377+
query_string = "&".join([f"{d[0]}={_urlencode.quote(d[1]) if d[0] == 'symbol' else d[1]}" for d in self._order_params(data)])
378378
res = sig_func(query_string)
379379
return self.encode_uri_component(res) if uri_encode else res
380380

docs/changelog.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
Changelog
22
=========
33

4+
v1.0.31 - 2025-10-29
5+
^^^^^^^^^^^^^^^^^^^^
6+
7+
**Fixed**
8+
9+
- fix signature encoding for non-ascii symbols (#1612), eg: 币安人生USDT
10+
11+
412
v1.0.30 - 2025-10-14
513
^^^^^^^^^^^^^^^^^^^^
614

0 commit comments

Comments
 (0)