Skip to content

Commit

Permalink
[Exchange] add price24h to ticker
Browse files Browse the repository at this point in the history
  • Loading branch information
xeroc committed Mar 30, 2016
1 parent cdd73d7 commit 7a1c99a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion grapheneexchange/exchange.py
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,7 @@ def returnTicker(self):
* ``percentChange``: 24h change percentage (in %)
* ``settlement_price``: Settlement Price for borrow/settlement
* ``core_exchange_rate``: Core exchange rate for payment of fee in non-BTS asset
* ``price24h``: the price 24h ago
.. note::
Expand Down Expand Up @@ -453,7 +454,7 @@ def returnTicker(self):
data["quoteVolume"] = float(marketHistory[0]["base_volume"]) / (10 ** quote_asset["precision"])
price24h = ((float(marketHistory[0]["open_quote"]) / 10 ** base_asset["precision"]) /
(float(marketHistory[0]["open_base"]) / 10 ** quote_asset["precision"]))
# data["price24h"] = price24h
data["price24h"] = price24h
data["percentChange"] = ((data["last"] / price24h - 1) * 100)
else :
data["baseVolume"] = 0
Expand Down

0 comments on commit 7a1c99a

Please sign in to comment.