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

获取账户资产报错 #59

Open
douno23 opened this issue Apr 7, 2024 · 5 comments
Open

获取账户资产报错 #59

douno23 opened this issue Apr 7, 2024 · 5 comments

Comments

@douno23
Copy link

douno23 commented Apr 7, 2024

程序报错

{"code":-1021,"msg":"Timestamp for this request is outside of the recvWindow.","_method":"GET","_url":"https:\/\/api.binance.com\/api\/v3\/account?timestamp=1712466203000","_httpcode":400}
@zhouaini528
Copy link
Owner

程序报错

{"code":-1021,"msg":"Timestamp for this request is outside of the recvWindow.","_method":"GET","_url":"https:\/\/api.binance.com\/api\/v3\/account?timestamp=1712466203000","_httpcode":400}

Timestamp for this request is outside of the recvWindow. 你本地时间和交易所时间 差距大

@douno23
Copy link
Author

douno23 commented Apr 7, 2024

程序报错

{"code":-1021,"msg":"Timestamp for this request is outside of the recvWindow.","_method":"GET","_url":"https:\/\/api.binance.com\/api\/v3\/account?timestamp=1712466203000","_httpcode":400}

Timestamp for this request is outside of the recvWindow. 你本地时间和交易所时间 差距大

这就是奇怪的地方,我同步了服务器时间,其实发现时间差别并不大

@zhouaini528
Copy link
Owner

你请求当时的时间 走到 交易所 这个时间超时了, 你可以单独设置recvWindow 设置大点

@douno23
Copy link
Author

douno23 commented Apr 18, 2024

你请求当时的时间 走到 交易所 这个时间超时了, 你可以单独设置recvWindow 设置大点

怎么设置,能给讲一下吗
是在:
$binance->trade()->postOrder(['recvWindow'=>xxx,.....])这样设置吗

@zhouaini528
Copy link
Owner

是的,设置不超过60000

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