1
fokus pada
0
Pengikut

Cara menggunakan try, kecuali jika ralat ini berlaku dalam Python

Dicipta dalam: 2021-12-01 12:00:09, dikemas kini pada:
comments   11
hits   891

Kesilapan Sell(581.63, 0.01): 400: {“code”:-4024,“msg”:“Limit price can’t be lower than 600.087”} Kod 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