Skip to content

Commit

Permalink
fix safetrade BS
Browse files Browse the repository at this point in the history
  • Loading branch information
cipig committed Oct 8, 2022
1 parent 2d405df commit 62a206b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mpm/mpm
Original file line number Diff line number Diff line change
Expand Up @@ -2078,10 +2078,11 @@ if ( $api eq "dex_gecko" ) {
if ( $safetrade_price ne "1" ) {
if ( from_json($safetrade_price)->{"ticker"}{"buy"} ne "0.0" ) {
$price = ( from_json($safetrade_price)->{"ticker"}{"sell"} + from_json($safetrade_price)->{"ticker"}{"buy"} + from_json($safetrade_price)->{"ticker"}{"last"} ) / 3 / $base_btc_price;
$coinusdprice = ( from_json($safetrade_price)->{"ticker"}{"sell"} + from_json($safetrade_price)->{"ticker"}{"buy"} + from_json($safetrade_price)->{"ticker"}{"last"} ) / 3 * $btcusdprice;
} else {
$price = from_json($safetrade_price)->{"ticker"}{"last"} / $base_btc_price;
$coinusdprice = from_json($safetrade_price)->{"ticker"}{"last"} * $btcusdprice;
}
$coinusdprice = ( from_json($safetrade_price)->{"ticker"}{"sell"} + from_json($safetrade_price)->{"ticker"}{"buy"} + from_json($safetrade_price)->{"ticker"}{"last"} ) / 3 * $btcusdprice;
if ( from_json($safetrade_price)->{"ticker"}{"high"} ne "0.0" ) { $change = (1 - from_json($safetrade_price)->{"ticker"}{"low"} / from_json($safetrade_price)->{"ticker"}{"high"}) * 100; }
}
} elsif ( defined $exbitron_usd_symbol ) {
Expand Down

0 comments on commit 62a206b

Please sign in to comment.