You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Everything works fine until the last line. I have 2 problems here :
I didn't fully understand how to pass the arguments for a specific ticker, for example BTCUSDT
biggest problem : even if I try it with no argument, the doc says ":param symbol: (optional) If the symbol is not sent, all symbols will be returned in an array." So I should at least get an array as return, but instead I get the following error which I don't understand :
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/requests/models.py", line 971, in json
return complexjson.loads(self.text, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/json/init.py", line 346, in loads
return _default_decoder.decode(s)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "", line 1, in
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pymexc/spot.py", line 290, in ticker_price
return self.call("GET", "/api/v3/ticker/price",
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pymexc/base.py", line 100, in call
return response.json()
^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/requests/models.py", line 975, in json
raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
What's wrong ?
The text was updated successfully, but these errors were encountered:
Thanks, it works now :)
However I'm still struggling to pass the argument for a specific ticker.
For example I tried spot_client.ticker_price('symbol': 'BTCUSDT') but it says invalid syntax and if I try spot_client.ticker_price({'symbol': 'BTCUSDT'}) it says invalid symbol. What's the syntax to use ?
I also tried using '=' instead of ':' but nothing works.
EDIT : nevermind I found it, it's spot_client.ticker_price(symbol = 'BTCUSDT'), I was a bit stupid on this one
Hi,
I'm simply trying the following to get used to this library :
Everything works fine until the last line. I have 2 problems here :
I didn't fully understand how to pass the arguments for a specific ticker, for example BTCUSDT
biggest problem : even if I try it with no argument, the doc says ":param symbol: (optional) If the symbol is not sent, all symbols will be returned in an array." So I should at least get an array as return, but instead I get the following error which I don't understand :
What's wrong ?
The text was updated successfully, but these errors were encountered: