Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KeyError: 'fetchConvertTradeHistory' in exchange.has['fetchConvertTradeHistory'] - on phemex #22330

Closed
egabosh opened this issue Apr 29, 2024 · 2 comments · Fixed by #22331
Closed
Assignees
Labels

Comments

@egabosh
Copy link

egabosh commented Apr 29, 2024

Operating System

Debian 12

Programming Languages

Python

CCXT Version

4.3.11

Description

Moin,

for my understanding I can use "if exchange.has['fetchConvertTradeHistory']:" to check if there is the wanted method.
Running it on binance where the method exists all workd fine. On phemex I get the following error:

Traceback (most recent call last):
  File "/root/fetch-orders.py", line 65, in <module>
    if exchange.has['fetchConvertTradeHistory']: 
       ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'fetchConvertTradeHistory'

For my understanding there should be "x" printed.
Any Ideas whats going wrong?

Code

if exchange.has['fetchConvertTradeHistory']:
  print(exchange.fetchConvertTradeHistory(limit=200, since=1685700951930, params={'until': 1685700951932}))
else:
  print('x')
@carlosmiei carlosmiei self-assigned this Apr 29, 2024
@carlosmiei
Copy link
Collaborator

Hello @egabosh, thanks for reporting it, it is indeed a bug on our side, but we will fix it asap.

@egabosh
Copy link
Author

egabosh commented May 8, 2024

Seems not fixed in CCXT Version: 4.3.18:

Traceback (most recent call last):
File "/root/fetch-orders.py", line 66, in
if exchange.has['fetchConvertTradeHistory']:
~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'fetchConvertTradeHistory'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants