Type/to search
0
Follow
0
Followers
¡Ayuda! Cuando falla una orden de BitMEX, ¿los datos devueltos son falsos, nulos o indefinidos?
FAQ
Created 2018-03-21 08:08:53  
 2
 2400

El código fue usado para realizar un pedido
exchanges[1].SetContractType("XBTUSD");
exchanges[1].SetMarginLevel(80);
exchanges[1].SetDirection("buy");
exchanges[1].Buy(close+20,amout);

Resultado El sistema devuelve un error de sobrecarga: Futures_BitMEX Error Futures_OP 0: 503: {"error":{"message":The system is currently overloaded. Please try again later.","name":HTTPError"}}

Quiero volver a intentarlo con la siguiente estructura de ciclo infinito, pero no sé cuál es el valor de regreso del error anterior.
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);
}

¿Cuál de las condiciones de while debería usarse? ¿null, false, undefined? ¿o algún otro valor?

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)