zhouaini528 / binance-php

Binance API Like the official document interface, Support for arbitrary extension.
MIT License
107 stars 43 forks source link

获取账户资产报错 #59

Open douno23 opened 5 months ago

douno23 commented 5 months ago

程序报错

{"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 commented 5 months ago

程序报错

{"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 commented 5 months ago

程序报错

{"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 commented 5 months ago

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

douno23 commented 4 months ago

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

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

zhouaini528 commented 4 months ago

是的,设置不超过60000