mirror of
https://github.com/LBRYFoundation/pool.git
synced 2025-08-23 17:37:25 +00:00
cryptsy: fix possible market price error
This commit is contained in:
parent
ac2455cc60
commit
4ae2e97ff9
1 changed files with 4 additions and 1 deletions
|
@ -351,7 +351,10 @@ function updateCryptsyMarkets()
|
|||
continue;
|
||||
}
|
||||
|
||||
$price2 = ($ticker->return->$symbol->buyorders[0]->price + $ticker->return->$symbol->sellorders[0]->price)/2;
|
||||
$price2 = $ticker->return->$symbol->buyorders[0]->price;
|
||||
if (isset($ticker->return->$symbol->sellorders))
|
||||
$price2 = ($price2 + $ticker->return->$symbol->sellorders[0]->price) / 2.0;
|
||||
|
||||
$market->price2 = AverageIncrement($market->price2, $price2);
|
||||
$market->price = AverageIncrement($market->price, $ticker->return->$symbol->buyorders[0]->price);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue