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

withdraw from OKX to Arbitrum failed #16236

Closed
eliiik opened this issue Dec 28, 2022 · 2 comments · Fixed by #16291
Closed

withdraw from OKX to Arbitrum failed #16236

eliiik opened this issue Dec 28, 2022 · 2 comments · Fixed by #16291
Assignees
Labels

Comments

@eliiik
Copy link

eliiik commented Dec 28, 2022

  • OS: Windows 10
  • Programming Language version: Python
  • CCXT version: 2.4.49
exchange.withdraw(
                token, amount, to_address,  params={
                    "network": "Arbitrum one"
                    "fee": self.withdraw_fee,
                    "pwd": ""
                }

9501a4ab845019a3c3d810fcd0c00cd

here safe_string_upper caused this error, OKX need exactly "Arbitrum one" to be the network to withdraw, but ccxt convert all to upper string, so as returned "Parameter chainName error"

    exec(code, run_globals)
  File "C:\Users\home\AppData\Local\Programs\Python\Python310\lib\site-packages\ccxt\async_support\base\exchange.py", line 1300, in request
    return await self.fetch2(path, api, method, params, headers, body, config, context)
  File "C:\Users\home\AppData\Local\Programs\Python\Python310\lib\site-packages\ccxt\async_support\base\exchange.py", line 1297, in fetch2
    return await self.fetch(request['url'], request['method'], request['headers'], request['body'])
  File "C:\Users\home\AppData\Local\Programs\Python\Python310\lib\site-packages\ccxt\async_support\base\exchange.py", line 163, in fetch
    self.handle_errors(http_status_code, http_status_text, url, method, headers, http_response, json_response, request_headers, request_body)
  File "C:\Users\home\AppData\Local\Programs\Python\Python310\lib\site-packages\ccxt\async_support\okx.py", line 5387, in handle_errors
    self.throw_exactly_matched_exception(self.exceptions['exact'], code, feedback)
  File "C:\Users\home\AppData\Local\Programs\Python\Python310\lib\site-packages\ccxt\async_support\base\exchange.py", line 1583, in throw_exactly_matched_exception       
    raise exact[string](message)
ccxt.base.errors.BadRequest: okx {"code":"51000","data":[],"msg":"Parameter chainName  error"}
@sc0Vu sc0Vu self-assigned this Jan 2, 2023
@sc0Vu sc0Vu added the bug label Jan 2, 2023
@sc0Vu
Copy link
Contributor

sc0Vu commented Jan 2, 2023

Hi @eliiik

Thanks, looks like the code also broken for Avalanche / Optimism. We'll fix asap.

sc0Vu added a commit to sc0Vu/ccxt that referenced this issue Jan 2, 2023
kroitor added a commit that referenced this issue Jan 2, 2023
@bizire
Copy link

bizire commented Apr 3, 2023

Fantom network also problem

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.

3 participants