Type/to search
0
Follow
1
Followers
অর্ডারের তথ্য প্রাপ্তি
Help
Created 2021-11-23 22:14:46  
 3
 1078

//383375074660855808
var order = exchanges[0].GetOrder("383375074660855808")
Log("Id:", order.Id, "Price:", order.Price, "Amount:", order.Amount, "DealAmount:",
order.DealAmount, "Status:", order.Status, "Type:", order.Type)
////////////////////
var orders = exchanges[0].GetOrders()
Log (("অনুগ্রহ করে অর্ডারটি সম্পূর্ণ করবেন না", orders[0].Id, "Price:", orders[0].Price, "Amount:", orders[0].Amount,
"DealAmount:", orders[0].DealAmount, "type:", orders[0].Type)
Log ((("অনুগ্রহ করে অর্ডার-২ এর তথ্য, আইডিঃ", orders[1].Id, "Price:", orders[1].Price, "Amount:", orders[1].Amount,
"DealAmount:", orders[1].DealAmount, "type:", orders[1].Type)
exchanges[0].GetOrder বার্তা ফেরত দেয়
Id: 383375074660855808 Price: 0 Amount: 1 DealAmount: 1 Status: 1 Type: 0
exchanges[0].GetOrders() ত্রুটি প্রদান করে
TypeError: cannot read property 'Id' of undefined at main (FILE:129)
আমি জানতে চাই, এর কারণ কি? আইডি কি সংজ্ঞায়িত করা দরকার?

Related Recommendations
Comment
All comments (3)

    img
    buyOrderId = openLong(-1, amount) // 挂开多仓的买单 -1代表市价格
    buyOrderId = openLong(-1, amount) // 挂开多仓的买单 -1代表市价格
    var orders = exchanges[0].GetOrders()
    Log("orders=",orders)
    Log("未完成订单一的信息,ID:", orders[0].Id, "Price:", orders[0].Price, "Amount:", orders[0].Amount,
    "DealAmount:", orders[0].DealAmount, "type:", orders[0].Type)
    Log("未完成订单二的信息,ID:", orders[1].Id, "Price:", orders[1].Price, "Amount:", orders[1].Amount,
    "DealAmount:", orders[1].DealAmount, "type:", orders[1].Type)

    错误信息如上图 出问题的代码在这 ,账户里有单子啊,id前面的orders已经定义了啊。。。。。。。。。。。。。。
    求教

    5 years ago

    cannot read property 'Id' of undefined at main (FILE:129)
    129行,检查策略代码,Id这个变量名之前的变量是未定义的。

    5 years ago

    先检查 orders ,如果为空不能直接用

    5 years ago
  • 1
iPhone Download
Forums
PINE Language
© 2015 - ∞ INVENTOR PTE LTD (SG)