Mengakses informasi pesanan

Penulis:Aku tidak tahu., Dibuat: 2021-11-23 22:14:46, Diperbarui:

//383375074660855808 var order = pertukaran[0].GetOrder ((383375074660855808)
Log ((Id:,order.IdPrice: , order.Price, Amount: , order.Amount, DealAmount: , order.DealAmount, Status: order.Status, Type: order.Type) (Tawa) Ya. var orders = exchanges[0].GetOrders (dalam bahasa Inggris). Log (mengacu pada informasi tentang pesanan yang belum selesai, ID:, orders[0].Id, Price:, orders[0].Price, Amount:, orders[0].Amount, DealAmount: , orders[0].DealAmount, type: , orders[0].Type Log (mengacu pada informasi tentang pesanan kedua yang belum selesai, ID:, 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)
     
     请问这是什么原因啊?Id需要定义吗/xiexie

Lebih banyak

Aku tidak tahu./upload/asset/23c31a045d4345042eab9.jpg buyOrderId = openLong ((-1, amount) // Pembelian dengan banyak posisi terbuka -1 mewakili harga pasar buyOrderId = openLong ((-1, amount) // Pembelian dengan banyak posisi terbuka -1 mewakili harga pasar var orders = exchanges[0].GetOrders (dalam bahasa Inggris). Log (("orders=",orders) Log (("Informasi tentang pesanan yang belum selesai, ID:", orders[0].Id, "Price:", orders[0].Price, "Amount:", orders[0].Amount, "DealAmount:", orders[0].DealAmount, "type:", orders[0].Type) Log (("Informasi tentang pesanan kedua belum selesai, ID:", orders[1].Id, "Price:", orders[1].Price, "Amount:", orders[1].Amount, "DealAmount:", orders[1].DealAmount, "type:", orders[1].Type) --------------------------- Kasalahan seperti gambar di atas. Kode yang ditanyakan di sini, akun memiliki angka ah, order di depan id telah didefinisikan ah......................................................................................... Berdoa

Mimpi kecilcannot read property 'Id' of undefined at main (__FILE__:129) Baris 129, memeriksa kode kebijakan, variabel sebelum nama variabel Id tidak didefinisikan.

RumputPeriksa order terlebih dahulu, jika tidak bisa digunakan secara langsung