1
fokus pada
0
Pengikut

Cara menggunakan try, kecuali jika kesalahan ini terjadi di Python

Dibuat di: 2021-12-01 12:00:09, diperbarui pada:
comments   11
hits   891

Kesalahan Sell(581.63, 0.01): 400: {“code”:-4024,“msg”:“Limit price can’t be lower than 600.087”} Kode saya def sell(currency,price,amount): Log(“sell currency: “, currency) set_precision(currency) exchange.SetDirection(“sell”) id1 = 0 k = 0 while (id1 == 0 and k == 0): try: id1 = exchange.Sell(price, amount) Log(“price: “, price) Log(“amount: “, amount) k = 1 Log(“k: “, k) except: cancel_all_sell_order(currency) continue return id1

Tidak masuk kecuali, tanya kenapa