bitcoin-client

bitcoin client library for price ticker and wallet

git clone https://9o.is/git/bitcoin-client.git

commit d9552641c1c5f12487146159b9f77663407f34dc
parent 6b611857e3299a64562aac8dfa95095327601803
Author: Jul <jul@9o.is>
Date:   Tue, 21 Oct 2014 19:21:00 -0400

price with percentage is rounded to nearest hundredth

Diffstat:
Msrc/main/scala/inc/pyc/bitcoin/PriceTicker.scala | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/main/scala/inc/pyc/bitcoin/PriceTicker.scala b/src/main/scala/inc/pyc/bitcoin/PriceTicker.scala @@ -47,7 +47,8 @@ case class Price(price: Double, percentage: Double = 0) { * Formats the over market price with percentage. */ def priceWithPercentage: Double = { - price + (price * (percentage * 0.01)) + val ans = price + (price * (percentage * 0.01)) + math ceil (ans * 100) / 100 } }