0
tập trung vào
0
Người theo dõi

Giúp đỡ! Khi lệnh BitMEX không thành công, dữ liệu trả về là false, null hay undefine?

Được tạo ra trong: 2018-03-21 08:08:53, cập nhật trên:
comments   2
hits   2180

Lưu ý: exchanges[1].SetContractType(“XBTUSD”); exchanges[1].SetMarginLevel(80); exchanges[1].SetDirection(“buy”); exchanges[1].Buy(close+20,amout);

Kết quả hệ thống trả về lỗi quá tải: Futures_BitMEX Error Futures_OP 0: 503: {“error”:{“message:“The system is currently overloaded. Please try again later.”,“name”:“HTTPError”}}

Tôi muốn thử lại với cấu trúc vòng lặp vô hạn như sau, nhưng tôi không biết giá trị trả về sai ở trên là gì? var id=null; while(id==null||id==false){ exchanges[1].SetContractType(“XBTUSD”); exchanges[1].SetMarginLevel(80); exchanges[1].SetDirection(“buy”); id=exchanges[1].Buy(close+20,amout); Sleep(100); }

Vậy điều kiện while nên dùng cái gì? Null, false, undefined?