veighna-global / vnpy_binance

Binance trading gateway for VeighNa Evo
MIT License
236 stars 100 forks source link

引擎链接币安报错 #16

Closed yhmickey closed 2 years ago

yhmickey commented 2 years ago

版本: vnpy 2.7.0 接口: vnpy-binance 2021.10.27

连接后,会报一连串如下错误:

RestClient on failed----------

request : GET /fapi/v1/openOrders?timestamp=1636379819221&signature=### because 400: headers: {'Content-Type': 'application/x-www-form-urlencoded', 'Accept': 'application/json', 'X-MBX-APIKEY': ' ### ', 'Connection': 'close'} params: {}

vnpy commented 2 years ago

请检查是否使用了海外云服务器?

yhmickey commented 2 years ago

用了,之前没有遇到这个问题。这次更新后,第一次出来的,不知道是什么原因。

yhmickey commented 2 years ago

完整报错如下,会出现好几个 RestClient on failed---------- request : GET /api/v3/account?timestamp=1636436288433&signature=###because 400: headers: {'Content-Type': 'application/x-www-form-urlencoded', 'Accept': 'application/json', 'X-MBX-APIKEY': '###', 'Connection': 'close'} params: {} data: {} response:{"code":-1021,"msg":"Timestamp for this request was 1000ms ahead of the server's time."}

vnpy commented 2 years ago

这是因为本地机器和服务器的时间差距过大(超前了),做个系统对时就行了,跟vn.py没关系哦