]> git.immae.eu Git - perso/Immae/Projets/Cryptomonnaies/Cryptoportfolio/Trader.git/commitdiff
Add Balance class tests
authorIsmaël Bouya <ismael.bouya@normalesup.org>
Thu, 18 Jan 2018 00:00:57 +0000 (01:00 +0100)
committerIsmaël Bouya <ismael.bouya@normalesup.org>
Thu, 18 Jan 2018 00:00:57 +0000 (01:00 +0100)
portfolio.py
test.py
test_portfolio.json [new file with mode: 0644]

index a4fbf9485ad67b7ed1b0a582c5be8de6284107d1..1d8bfd5f122775df881bcbbdd3a76e8422740896 100644 (file)
@@ -220,6 +220,10 @@ class Balance:
         self.free = Amount(currency, free_value)
         self.used = Amount(currency, used_value)
 
+    @classmethod
+    def from_hash(cls, currency, hash_):
+        return cls(currency, hash_["total"], hash_["free"], hash_["used"])
+
     @classmethod
     def in_currency(cls, other_currency, market, action="average", type="total"):
         amounts = {}
@@ -234,10 +238,6 @@ class Balance:
     def currencies(cls):
         return cls.known_balances.keys()
 
-    @classmethod
-    def from_hash(cls, currency, hash_):
-        return cls(currency, hash_["total"], hash_["free"], hash_["used"])
-
     @classmethod
     def _fill_balances(cls, hash_):
         for key in hash_:
@@ -270,9 +270,6 @@ class Balance:
         new_repartition = cls.dispatch_assets(total_base_value)
         Trade.compute_trades(values_in_base, new_repartition, market=market)
 
-    def __int__(self):
-        return int(self.total)
-
     def __repr__(self):
         return "Balance({} [{}/{}/{}])".format(self.currency, str(self.free), str(self.used), str(self.total))
 
diff --git a/test.py b/test.py
index 21077a36051fd3ab05bdc9262e1f29416934c56c..d10bfe4a9a688f17eec604cb4b62249e936fff25 100644 (file)
--- a/test.py
+++ b/test.py
@@ -251,5 +251,147 @@ class PortfolioTest(unittest.TestCase):
     def tearDown(self):
         self.patcher.stop()
 
+class BalanceTest(unittest.TestCase):
+    def setUp(self):
+        super(BalanceTest, self).setUp()
+
+        self.fetch_balance = {
+                "free": "foo",
+                "info": "bar",
+                "used": "baz",
+                "total": "bazz",
+                "USDT": {
+                    "free": 6.0,
+                    "used": 1.2,
+                    "total": 7.2
+                    },
+                "XVG": {
+                    "free": 16,
+                    "used": 0.0,
+                    "total": 16
+                    },
+                "XMR": {
+                    "free": 0.0,
+                    "used": 0.0,
+                    "total": 0.0
+                    },
+                }
+        self.patcher = mock.patch.multiple(portfolio.Balance, known_balances={}, trades={})
+        self.patcher.start()
+
+    def test_values(self):
+        balance = portfolio.Balance("BTC", 0.65, 0.35, 0.30)
+        self.assertEqual(0.65, balance.total.value)
+        self.assertEqual(0.35, balance.free.value)
+        self.assertEqual(0.30, balance.used.value)
+        self.assertEqual("BTC", balance.currency)
+
+        balance = portfolio.Balance.from_hash("BTC", { "total": 0.65, "free": 0.35, "used": 0.30})
+        self.assertEqual(0.65, balance.total.value)
+        self.assertEqual(0.35, balance.free.value)
+        self.assertEqual(0.30, balance.used.value)
+        self.assertEqual("BTC", balance.currency)
+
+    @mock.patch.object(portfolio.Amount, "get_ticker")
+    def test_in_currency(self, get_ticker):
+        portfolio.Balance.known_balances = {
+                "BTC": portfolio.Balance("BTC", 0.65, 0.35, 0.30),
+                "ETH": portfolio.Balance("ETH", 3, 3, 0),
+                }
+        market = mock.Mock()
+        get_ticker.return_value = {
+                "bid": 0.09,
+                "ask": 0.11,
+                "average": 0.1,
+                }
+
+        amounts = portfolio.Balance.in_currency("BTC", market)
+        self.assertEqual("BTC", amounts["ETH"].currency)
+        self.assertEqual(0.65, amounts["BTC"].value)
+        self.assertEqual(0.30, amounts["ETH"].value)
+
+        amounts = portfolio.Balance.in_currency("BTC", market, action="bid")
+        self.assertEqual(0.65, amounts["BTC"].value)
+        self.assertEqual(0.27, amounts["ETH"].value)
+
+        amounts = portfolio.Balance.in_currency("BTC", market, action="bid", type="used")
+        self.assertEqual(0.30, amounts["BTC"].value)
+        self.assertEqual(0, amounts["ETH"].value)
+
+    def test_currencies(self):
+        portfolio.Balance.known_balances = {
+                "BTC": portfolio.Balance("BTC", 0.65, 0.35, 0.30),
+                "ETH": portfolio.Balance("ETH", 3, 3, 0),
+                }
+        self.assertListEqual(["BTC", "ETH"], list(portfolio.Balance.currencies()))
+
+    @mock.patch.object(portfolio.market, "fetch_balance")
+    def test_fetch_balances(self, fetch_balance):
+        fetch_balance.return_value = self.fetch_balance
+
+        portfolio.Balance.fetch_balances(portfolio.market)
+        self.assertNotIn("XMR", portfolio.Balance.currencies())
+        self.assertEqual(["USDT", "XVG"], list(portfolio.Balance.currencies()))
+
+    @mock.patch.object(portfolio.Portfolio, "repartition_pertenthousand")
+    @mock.patch.object(portfolio.market, "fetch_balance")
+    def test_dispatch_assets(self, fetch_balance, repartition):
+        fetch_balance.return_value = self.fetch_balance
+        portfolio.Balance.fetch_balances(portfolio.market)
+
+        self.assertNotIn("XEM", portfolio.Balance.currencies())
+
+        repartition.return_value = {
+                "XEM": 7500,
+                "BTC": 2600,
+                }
+
+        amounts = portfolio.Balance.dispatch_assets(portfolio.Amount("BTC", 10.1))
+        self.assertIn("XEM", portfolio.Balance.currencies())
+        self.assertEqual(2.6, amounts["BTC"].value)
+        self.assertEqual(7.5, amounts["XEM"].value)
+
+    @mock.patch.object(portfolio.Portfolio, "repartition_pertenthousand")
+    @mock.patch.object(portfolio.Amount, "get_ticker")
+    @mock.patch.object(portfolio.Trade, "compute_trades")
+    def test_prepare_trades(self, compute_trades, get_ticker, repartition):
+        repartition.return_value = {
+                "XEM": 7500,
+                "BTC": 2500,
+                }
+        get_ticker.side_effect = [
+                { "average": 0.0001 },
+                { "average": 0.000001 }
+                ]
+        market = mock.Mock()
+        market.fetch_balance.return_value = {
+                "USDT": {
+                    "free": 10000.0,
+                    "used": 0.0,
+                    "total": 10000.0
+                    },
+                "XVG": {
+                    "free": 10000.0,
+                    "used": 0.0,
+                    "total": 10000.0
+                    },
+                }
+        portfolio.Balance.prepare_trades(market)
+        compute_trades.assert_called()
+
+        call = compute_trades.call_args
+        self.assertEqual(market, call[1]["market"])
+        self.assertEqual(1, call[0][0]["USDT"].value)
+        self.assertEqual(0.01, call[0][0]["XVG"].value)
+        self.assertEqual(0.2525, call[0][1]["BTC"].value)
+        self.assertEqual(0.7575, call[0][1]["XEM"].value)
+
+    def test__repr(self):
+        balance = portfolio.Balance("BTX", 3, 1, 2)
+        self.assertEqual("Balance(BTX [1.00000000 BTX/2.00000000 BTX/3.00000000 BTX])", repr(balance))
+
+    def tearDown(self):
+        self.patcher.stop()
+
 if __name__ == '__main__':
     unittest.main()
diff --git a/test_portfolio.json b/test_portfolio.json
new file mode 100644 (file)
index 0000000..a2ba3f0
--- /dev/null
@@ -0,0 +1,356 @@
+{
+    "portfolio_1": {
+        "holding": {
+            "logo": [
+                "<img src='https://cryptoportfolio.io/wp-content/uploads/portfolio/logo/ETC.png' title='Ethereum Classic'></img>",
+                "<img src='https://cryptoportfolio.io/wp-content/uploads/portfolio/logo/USDT.png' title='Tether'></img>",
+                "<img src='https://cryptoportfolio.io/wp-content/uploads/portfolio/logo/GAS.png' title='Gas'></img>",
+                "<img src='https://cryptoportfolio.io/wp-content/uploads/portfolio/logo/BTC.png' title='Bitcoin'></img>",
+                "<img src='https://cryptoportfolio.io/wp-content/uploads/portfolio/logo/ETH.png' title='Ethereum'></img>",
+                "<img src='https://cryptoportfolio.io/wp-content/uploads/portfolio/logo/FCT.png' title='Factoids'></img>"
+            ],
+            "direction": [
+                "long",
+                "long",
+                "long",
+                "long",
+                "long",
+                "long"
+            ],
+            "weight": [
+                11.27,
+                12.26,
+                13.08,
+                14.29,
+                15.69,
+                33.41
+            ],
+            "bid_ask_spread": [
+                0.669,
+                0.243,
+                0.301,
+                0.243,
+                0.094,
+                0
+            ],
+            "holding_time": [
+                1,
+                1,
+                1,
+                274,
+                1,
+                1
+            ],
+            "weekly_return_usdt": [
+                -0.2515,
+                0,
+                0.0266,
+                -0.1353,
+                -0.2352,
+                -0.315
+            ],
+            "_row": [
+                "Ethereum C (ETC)",
+                "Tether (USDT)",
+                "Gas (GAS)",
+                "Bitcoin (BTC)",
+                "Ethereum (ETH)",
+                "Factoids (FCT)"
+            ]
+        },
+        "weights": {
+            "USDT": [ 0, 0, 0, 0, 0, 0, 0.1577, 0.1083, 0, 0.1226 ],
+            "AMP": [ 0, 0, 0.1854, 0, 0, 0, 0, 0, 0, 0 ],
+            "ARDR": [ 0, 0, 0, 0.0718, 0, 0, 0, 0, 0, 0 ],
+            "BBR": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
+            "BCH": [ 0.1126, 0.0386, 0, 0, 0, 0, 0, 0, 0, 0 ],
+            "BCN": [ 0, 0, 0, 0, 0, 0.1467, 0, 0, 0, 0 ],
+            "BCY": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
+            "BELA": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
+            "BLK": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
+            "BTC": [ 0.1667, 0.2857, 0.2857, 0.2857, 0.2857, 0.2857, 0.1429, 0.1429, 0.2857, 0.1429 ],
+            "BTCD": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
+            "BTM": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
+            "BTS": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
+            "BTSs": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
+            "BURST": [ 0, 0, 0, 0, 0.2959, 0, 0, 0, 0, 0 ],
+            "CLAM": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
+            "CLAMs": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
+            "CURE": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
+            "DASH": [ 0.0919, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
+            "DASHs": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
+            "DCR": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
+            "DGB": [ 0, 0, 0, 0, 0, 0, 0.1177, 0, 0.1015, 0 ],
+            "DOGE": [ 0, 0, 0, 0, 0, 0.1092, 0.2092, 0, 0.1805, 0 ],
+            "DOGEs": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
+            "EMC2": [ 0, 0, 0, 0, 0, 0.3456, 0, 0, 0, 0 ],
+            "ETC": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.1127 ],
+            "ETH": [ 0.3568, 0, 0, 0, 0, 0, 0, 0, 0, 0.1569 ],
+            "ETHs": [ 0, 0, 0, 0.3085, 0, 0, 0, 0, 0, 0 ],
+            "EXP": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
+            "FCT": [ 0, 0, 0, 0, 0, 0, 0, 0.1922, 0, 0.3341 ],
+            "FCTs": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
+            "FLDC": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
+            "FLO": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
+            "GAME": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
+            "GAS": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.1308 ],
+            "GNT": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
+            "GRC": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
+            "HZ": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
+            "IOC": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
+            "LSK": [ 0, 0.2231, 0, 0, 0, 0, 0, 0, 0, 0 ],
+            "LTC": [ 0.2656, 0, 0, 0, 0.2175, 0, 0, 0, 0, 0 ],
+            "LTCs": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
+            "MAID": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
+            "MAIDs": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
+            "NAUT": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
+            "NAV": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
+            "NOTE": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
+            "NXC": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
+            "NXT": [ 0, 0, 0.1297, 0, 0, 0, 0.1445, 0, 0, 0 ],
+            "OMG": [ 0, 0, 0, 0, 0, 0, 0, 0.1757, 0, 0 ],
+            "OMNI": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
+            "PINK": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
+            "POT": [ 0, 0, 0.148, 0, 0, 0, 0, 0.1959, 0, 0 ],
+            "PPC": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
+            "QTL": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
+            "RADS": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
+            "RBY": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
+            "REP": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
+            "SBD": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
+            "SC": [ 0, 0, 0, 0, 0, 0, 0, 0, 0.0623, 0 ],
+            "SDC": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
+            "SJCX": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
+            "STEEM": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
+            "STR": [ 0, 0, 0, 0, 0.0599, 0.1127, 0, 0.185, 0, 0 ],
+            "STRAT": [ 0, 0, 0, 0.0944, 0.1409, 0, 0.2281, 0, 0, 0 ],
+            "SYS": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
+            "VOX": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
+            "VRC": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
+            "VTC": [ 0, 0, 0.2512, 0, 0, 0, 0, 0, 0, 0 ],
+            "XBC": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
+            "XCP": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
+            "XEM": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
+            "XMG": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
+            "XMR": [ 0.0064, 0.0068, 0, 0, 0, 0, 0, 0, 0, 0 ],
+            "XMRs": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
+            "XRP": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
+            "XRPs": [ 0, 0.4457, 0, 0.2397, 0, 0, 0, 0, 0, 0 ],
+            "XVC": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
+            "ZEC": [ 0, 0, 0, 0, 0, 0, 0, 0, 0.3701, 0 ],
+            "_row": [
+                "2017-11-13",
+                "2017-11-20",
+                "2017-11-27",
+                "2017-12-04",
+                "2017-12-11",
+                "2017-12-18",
+                "2017-12-25",
+                "2018-01-01",
+                "2018-01-08",
+                "2018-01-15"
+            ]
+        }
+    },
+    "portfolio_2": {
+        "holding": {
+            "logo": [
+                "<img src='https://cryptoportfolio.io/wp-content/uploads/portfolio/logo/XVC.png' title='Vcash'></img>",
+                "<img src='https://cryptoportfolio.io/wp-content/uploads/portfolio/logo/USDT.png' title='Tether'></img>",
+                "<img src='https://cryptoportfolio.io/wp-content/uploads/portfolio/logo/STRAT.png' title='Stratis'></img>",
+                "<img src='https://cryptoportfolio.io/wp-content/uploads/portfolio/logo/STEEM.png' title='Steem'></img>",
+                "<img src='https://cryptoportfolio.io/wp-content/uploads/portfolio/logo/OMG.png' title='OmiseGo'></img>",
+                "<img src='https://cryptoportfolio.io/wp-content/uploads/portfolio/logo/XEM.png' title='NEM'></img>",
+                "<img src='https://cryptoportfolio.io/wp-content/uploads/portfolio/logo/XMR.png' title='Monero'></img>",
+                "<img src='https://cryptoportfolio.io/wp-content/uploads/portfolio/logo/FCT.png' title='Factoids'></img>",
+                "<img src='https://cryptoportfolio.io/wp-content/uploads/portfolio/logo/ETC.png' title='Ethereum Classic'></img>",
+                "<img src='https://cryptoportfolio.io/wp-content/uploads/portfolio/logo/ZRX.png' title='0x'></img>"
+            ],
+            "direction": [
+                "long",
+                "long",
+                "long",
+                "long",
+                "long",
+                "long",
+                "long",
+                "long",
+                "long",
+                "long"
+            ],
+            "weight": [
+                10,
+                10,
+                10,
+                10,
+                10,
+                10,
+                10,
+                10,
+                10,
+                10
+            ],
+            "bid_ask_spread": [
+                1.699,
+                0.076,
+                0.216,
+                0.076,
+                0.363,
+                0.133,
+                0.306,
+                0.479,
+                0.181,
+                0.264
+            ],
+            "holding_time": [
+                1,
+                1,
+                1,
+                1,
+                15,
+                1,
+                1,
+                15,
+                8,
+                1
+            ],
+            "weekly_return_usdt": [
+                -0.1887,
+                0,
+                -0.2292,
+                -0.3314,
+                -0.2335,
+                -0.2816,
+                -0.1052,
+                -0.315,
+                -0.2515,
+                -0.3732
+            ],
+            "_row": [
+                "Vcash (XVC)",
+                "Tether (USDT)",
+                "Stratis (STRAT)",
+                "Steem (STEEM)",
+                "OmiseGo (OMG)",
+                "NEM (XEM)",
+                "Monero (XMR)",
+                "Factoids (FCT)",
+                "Ethereum C (ETC)",
+                "0x (ZRX)"
+            ]
+        },
+        "weights": {
+            "USDT": [ 0, 0, 0, 0, 0, 0, 0.1, 0, 0, 0.1 ],
+            "AMP": [ 0, 0, 0.1111, 0, 0, 0, 0.1, 0, 0, 0 ],
+            "ARDR": [ 0, 0, 0, 0.1111, 0.2, 0, 0, 0, 0, 0 ],
+            "BBR": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
+            "BCH": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
+            "BCN": [ 0, 0, 0, 0, 0, 0.1111, 0, 0, 0, 0 ],
+            "BCY": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
+            "BELA": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
+            "BITS": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
+            "BLK": [ 0, 0.125, 0, 0, 0, 0, 0, 0, 0, 0 ],
+            "BTC": [ 1.1102e-16, 0, 0, 0, 1.1102e-16, 0, 2.2204e-16, 0, 1.1102e-16, 1.1102e-16 ],
+            "BTCD": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
+            "BTM": [ 0, 0, 0, 0, 0, 0, 0, 0.1, 0, 0 ],
+            "BTS": [ 0.1, 0.125, 0.1111, 0, 0, 0.1111, 0.1, 0, 0, 0 ],
+            "BTSs": [ 0, 0, 0, 0.1111, 0, 0, 0, 0, 0, 0 ],
+            "BURST": [ 0, 0, 0, 0, 0.2, 0.1111, 0.1, 0, 0, 0 ],
+            "C2": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
+            "CLAM": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
+            "CLAMs": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
+            "CURE": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
+            "DASH": [ 0.1, 0.125, 0.1111, 0, 0, 0, 0, 0, 0, 0 ],
+            "DASHs": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
+            "DCR": [ 0.1, 0, 0.1111, 0, 0, 0, 0, 0, 0, 0 ],
+            "DGB": [ 0, 0, 0, 0, 0, 0.1111, 0.1, 0, 0, 0 ],
+            "DOGE": [ 0, 0, 0, 0, 0, 0.1111, 0.1, 0, 0, 0 ],
+            "DOGEs": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
+            "EMC2": [ 0, 0, 0, 0.1111, 0, 0.1111, 0, 0, 0, 0 ],
+            "ETC": [ 0.1, 0.125, 0, 0, 0, 0, 0, 0, 0.1, 0.1 ],
+            "ETH": [ 0.1, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
+            "ETHs": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
+            "EXP": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
+            "FCT": [ 0, 0, 0, 0, 0, 0, 0, 0.1, 0.1, 0.1 ],
+            "FCTs": [ 0, 0, 0, 0.1111, 0, 0, 0, 0, 0, 0 ],
+            "FLDC": [ 0, 0, 0, 0, 0.2, 0, 0, 0, 0, 0 ],
+            "FLO": [ 0, 0, 0, 0, 0, 0, 0, 0.1, 0, 0 ],
+            "GAME": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
+            "GAS": [ 0, 0.125, 0, 0, 0, 0, 0, 0, 0.1, 0 ],
+            "GNO": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
+            "GNT": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
+            "GRC": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
+            "HUC": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
+            "HZ": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
+            "IOC": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
+            "LBC": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
+            "LSK": [ 0, 0.125, 0, 0, 0, 0, 0, 0, 0, 0 ],
+            "LTC": [ 0.1, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
+            "LTCs": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
+            "MAID": [ 0.1, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
+            "MAIDs": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
+            "MYR": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
+            "NAUT": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
+            "NAV": [ 0, 0, 0, 0, 0, 0, 0, 0, 0.1, 0 ],
+            "NEOS": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
+            "NMC": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
+            "NOBL": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
+            "NOTE": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
+            "NSR": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
+            "NXC": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
+            "NXT": [ 0, 0, 0.1111, 0.1111, 0, 0.1111, 0, 0, 0, 0 ],
+            "OMG": [ 0, 0, 0, 0, 0, 0, 0, 0.1, 0.1, 0.1 ],
+            "OMNI": [ 0.1, 0, 0, 0, 0, 0, 0, 0.1, 0.1, 0 ],
+            "PASC": [ 0, 0, 0, 0, 0, 0, 0.1, 0, 0, 0 ],
+            "PINK": [ 0, 0, 0, 0, 0, 0, 0.1, 0, 0, 0 ],
+            "POT": [ 0, 0, 0.1111, 0.1111, 0, 0, 0, 0.1, 0, 0 ],
+            "PPC": [ 0, 0, 0, 0, 0, 0, 0, 0.1, 0.1, 0 ],
+            "QBK": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
+            "QORA": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
+            "QTL": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
+            "RADS": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
+            "RBY": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
+            "REP": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
+            "RIC": [ 0, 0, 0, 0, 0, 0, 0, 0, 0.1, 0 ],
+            "SBD": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
+            "SC": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
+            "SDC": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
+            "SJCX": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
+            "STEEM": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.1 ],
+            "STORJ": [ 0, 0, 0, 0, 0, 0, 0, 0.1, 0, 0 ],
+            "STR": [ 0, 0, 0.1111, 0.1111, 0.2, 0.1111, 0, 0.1, 0, 0 ],
+            "STRAT": [ 0, 0, 0, 0, 0.2, 0, 0.1, 0, 0, 0.1 ],
+            "SYS": [ 0, 0, 0.1111, 0, 0, 0, 0, 0, 0, 0 ],
+            "UNITY": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
+            "VIA": [ 0, 0, 0, 0, 0, 0, 0, 0.1, 0.1, 0 ],
+            "VOX": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
+            "VRC": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
+            "VTC": [ 0.1, 0, 0.1111, 0.1111, 0, 0, 0, 0, 0, 0 ],
+            "XBC": [ 0.1, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
+            "XCP": [ 0, 0, 0, 0, 0, 0, 0, 0, 0.1, 0 ],
+            "XEM": [ 0, 0, 0, 0, 0, 0.1111, 0, 0, 0, 0.1 ],
+            "XMG": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
+            "XMR": [ 0, 0.125, 0, 0, 0, 0, 0, 0, 0, 0.1 ],
+            "XMRs": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
+            "XPM": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
+            "XRP": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
+            "XRPs": [ 0, 0.125, 0, 0.1111, 0, 0, 0, 0, 0, 0 ],
+            "XVC": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.1 ],
+            "ZEC": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
+            "ZRX": [ 0, 0, 0, 0, 0, 0, 0.1, 0, 0, 0.1 ],
+            "_row": [
+                "2017-11-13",
+                "2017-11-20",
+                "2017-11-27",
+                "2017-12-04",
+                "2017-12-11",
+                "2017-12-18",
+                "2017-12-25",
+                "2018-01-01",
+                "2018-01-08",
+                "2018-01-15"
+            ]
+        }
+    }
+}
+