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

你好,操作遇到异常,异常只显示'Error response_status_code 401',如何看到具体的错误码? #1

Open
Jepheus opened this issue Feb 21, 2023 · 1 comment

Comments

@Jepheus
Copy link

Jepheus commented Feb 21, 2023

50101 | 401 | APIKey 与当前环境不匹配
50102 | 401 | 请求时间戳过期
50103 | 401 | 请求头"OK-ACCESS-KEY"不能为空
50104 | 401 | 请求头"OK-ACCESS-PASSPHRASE"不能为空
50105 | 401 | 请求头"OK-ACCESS-PASSPHRASE"错误
50106 | 401 | 请求头"OK-ACCESS-SIGN"不能为空
50107 | 401 | 请求头"OK-ACCESS-TIMESTAMP"不能为空
50108 | 401 | 券商ID不存在
50109 | 401 | 券商域名不存在
50110 | 401 | 您的IP{0}不在APIKey绑定IP名单中 (您可以将您的IP加入到APIKey绑定白名单中)
50111 | 401 | 无效的OK-ACCESS-KEY
50112 | 401 | 无效的OK-ACCESS-TIMESTAMP
50113 | 401 | 无效的签名
50114 | 401 | 无效的授权

仅凭401无法定位错误,具体的错误码如何看到呢?

@pyted
Copy link
Owner

pyted commented Mar 2, 2023

非常感谢您的反馈,这个功能已经添加,请下载新版本的okx:pip3 install okx==1.0.8

okx._client.ResponseStatusError: Error response_status_code 401
response_content={"msg":"Invalid OK-ACCESS-KEY","code":"50111"}

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

No branches or pull requests

2 participants