Type/to search
0
Follow
0
Followers
ヘルプ! BitMEX の注文が失敗した場合、返されるデータは false、null、または undefine ですか?
FAQ
Created 2018-03-21 08:08:53  
 2
 2400

このコードで注文した
exchanges[1].SetContractType("XBTUSD");
exchanges[1].SetMarginLevel(80);
exchanges[1].SetDirection("buy");
exchanges[1].Buy(close+20,amout);

結果 システム 過剰負荷 返信 エラー:Futures_BitMEX エラー Futures_OP 0: 503: {"error":{"message":"The system is currently overloaded. Please try again later.","name":"HTTPError"}}

繰り返し試したいのですが, 返される誤差の値がわからないです.
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);
}

whileの条件は,null,false,undefined,または他の値で定義されます.

Related Recommendations
Comment
All comments (2)

    谢谢 我找到了zero的容错封装

    8 years ago

    一般情况来说,
    一个 交易所 下单成功 应当返回 订单 ID,
    如果 有异常 或者 失败 返回的 是 null 。

    8 years ago
  • 1
Forums
PINE Language
Get the app
iPhone Download
© 2015 - ∞ INVENTOR PTE LTD (SG)