Skip to content

Commit d88c065

Browse files
authored
fix(client): handle non ascii symbols in public and private methods (#1620)
* update gitignore * bump version * fix(client): handle non ascii symbols in public and private methods * fix
1 parent ec3164e commit d88c065

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

binance/async_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ async def _request(
166166

167167
# Remove proxies from kwargs since aiohttp uses 'proxy' parameter instead
168168
kwargs.pop('proxies', None)
169-
169+
170170
async with getattr(self.session, method)(
171171
yarl.URL(uri, encoded=True),
172172
proxy=self.https_proxy,

binance/base_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,7 @@ def _get_request_kwargs(
514514
# if get request assign data array to params value for requests lib
515515
if data and (method == "get" or force_params):
516516
kwargs["params"] = "&".join(
517-
"%s=%s" % (data[0], data[1]) for data in kwargs["data"]
517+
"%s=%s" % (data[0], _urlencode.quote(data[1]) if data[0] == 'symbol' else data[1]) for data in kwargs["data"]
518518
)
519519
del kwargs["data"]
520520

0 commit comments

Comments
 (0)