From 7e229ab39ad60f34d70cb5382089c1162dc3b0da Mon Sep 17 00:00:00 2001 From: Tanguy Pruvot Date: Sat, 15 Sep 2018 13:53:16 +0200 Subject: [PATCH] kucoin: some tickers may not have a sell field --- web/yaamp/core/backend/markets.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/yaamp/core/backend/markets.php b/web/yaamp/core/backend/markets.php index fa4c60b..da80cd5 100644 --- a/web/yaamp/core/backend/markets.php +++ b/web/yaamp/core/backend/markets.php @@ -1515,7 +1515,7 @@ function updateKuCoinMarkets() if (objSafeVal($ticker,'buy',-1) == -1) continue; $market->price = AverageIncrement($market->price, $ticker->buy); - $market->price2 = AverageIncrement($market->price2, $ticker->sell); + $market->price2 = AverageIncrement($market->price2, objSafeVal($ticker,'sell',$ticker->buy)); if (!empty($coininfo)) foreach ($coininfo->data as $info) { if ($info->coin == $symbol) { //todo: $market->withdrawfee = $info->withdrawMinFee;