Skip to content

Commit b09b56b

Browse files
committed
Fix CER calculation when BTS is quote
Fixes: bitshares#138
1 parent 68ae091 commit b09b56b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

bitshares/market.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,10 @@ def ticker(self):
114114
"""
115115
data = {}
116116
# Core Exchange rate
117-
cer = self["quote"]["options"]["core_exchange_rate"]
117+
if self["quote"]["id"] == '1.3.0':
118+
cer = self["base"]["options"]["core_exchange_rate"]
119+
else:
120+
cer = self["quote"]["options"]["core_exchange_rate"]
118121
data["core_exchange_rate"] = Price(
119122
cer,
120123
blockchain_instance=self.blockchain

0 commit comments

Comments
 (0)