我正在尝试发送请求,但我总是收到此错误消息,但没有找到解决该问题的结果。
import bybit
client = bybit.bybit(test=True, api_key="APIkey",api_secret="APISecret")
client.Order.Order_getOrders().result()
({'ret_code': 10002, 'ret_msg': 'invalid request, please check your timestamp and recv_window param. req_timestamp: 1582153492000 server_timestamp: 1582153500315 recv_window: 5000', 'ext_code': '', 'result': None, 'ext_info': None, 'time_now': '1582153500.308807'}, <bravado.requests_client.RequestsResponseAdapter object at 0x7ff9dc665e10>)
我只发现了这种可能的解决方案,但我不知道请求的外观如何
//recv_window from bybit is 5000, so going 2500 milliseconds ahead to
allow more network delay timestamp: (new Date().getTime())+2500