]> git.immae.eu Git - perso/Immae/Projets/Cryptomonnaies/Cryptoportfolio/Trader.git/commitdiff
Complete tests for the ccxt wrapper
authorIsmaël Bouya <ismael.bouya@normalesup.org>
Tue, 6 Mar 2018 00:59:59 +0000 (01:59 +0100)
committerIsmaël Bouya <ismael.bouya@normalesup.org>
Tue, 6 Mar 2018 00:59:59 +0000 (01:59 +0100)
test.py
test_samples/poloniexETest.test_fetch_all_balances.1.json [new file with mode: 0644]
test_samples/poloniexETest.test_fetch_all_balances.2.json [new file with mode: 0644]
test_samples/poloniexETest.test_fetch_all_balances.3.json [new file with mode: 0644]
test_samples/test_portfolio.json [moved from test_portfolio.json with 100% similarity]

diff --git a/test.py b/test.py
index feac62f7be7755cebac97c4ccdd4774285a3f457..c2c70cb469db5eca98158c809ac9193aef38c656 100644 (file)
--- a/test.py
+++ b/test.py
@@ -126,6 +126,317 @@ class poloniexETest(unittest.TestCase):
                     }
             self.assertEqual(expected, self.s.margin_summary())
 
+    def test_create_order(self):
+        with mock.patch.object(self.s, "create_exchange_order") as exchange,\
+                mock.patch.object(self.s, "create_margin_order") as margin:
+            with self.subTest(account="unspecified"):
+                self.s.create_order("symbol", "type", "side", "amount", price="price", lending_rate="lending_rate", params="params")
+                exchange.assert_called_once_with("symbol", "type", "side", "amount", price="price", params="params")
+                margin.assert_not_called()
+                exchange.reset_mock()
+                margin.reset_mock()
+
+            with self.subTest(account="exchange"):
+                self.s.create_order("symbol", "type", "side", "amount", account="exchange", price="price", lending_rate="lending_rate", params="params")
+                exchange.assert_called_once_with("symbol", "type", "side", "amount", price="price", params="params")
+                margin.assert_not_called()
+                exchange.reset_mock()
+                margin.reset_mock()
+
+            with self.subTest(account="margin"):
+                self.s.create_order("symbol", "type", "side", "amount", account="margin", price="price", lending_rate="lending_rate", params="params")
+                margin.assert_called_once_with("symbol", "type", "side", "amount", lending_rate="lending_rate", price="price", params="params")
+                exchange.assert_not_called()
+                exchange.reset_mock()
+                margin.reset_mock()
+
+            with self.subTest(account="unknown"), self.assertRaises(NotImplementedError):
+                self.s.create_order("symbol", "type", "side", "amount", account="unknown")
+
+    def test_parse_ticker(self):
+        ticker = {
+                "high24hr": "12",
+                "low24hr": "10",
+                "highestBid": "10.5",
+                "lowestAsk": "11.5",
+                "last": "11",
+                "percentChange": "0.1",
+                "quoteVolume": "10",
+                "baseVolume": "20"
+                }
+        market = {
+                "symbol": "BTC/ETC"
+                }
+        with mock.patch.object(self.s, "milliseconds") as ms:
+            ms.return_value = 1520292715123
+            result = self.s.parse_ticker(ticker, market)
+
+            expected = {
+                    "symbol": "BTC/ETC",
+                    "timestamp": 1520292715123,
+                    "datetime": "2018-03-05T23:31:55.123Z",
+                    "high": D("12"),
+                    "low": D("10"),
+                    "bid": D("10.5"),
+                    "ask": D("11.5"),
+                    "vwap": None,
+                    "open": None,
+                    "close": None,
+                    "first": None,
+                    "last": D("11"),
+                    "change": D("0.1"),
+                    "percentage": None,
+                    "average": None,
+                    "baseVolume": D("10"),
+                    "quoteVolume": D("20"),
+                    "info": ticker
+                    }
+            self.assertEqual(expected, result)
+
+    def test_fetch_margin_balance(self):
+        with mock.patch.object(self.s, "privatePostGetMarginPosition") as get_margin_position:
+            get_margin_position.return_value = {
+                    "BTC_DASH": {
+                        "amount": "-0.1",
+                        "basePrice": "0.06818560",
+                        "lendingFees": "0.00000001",
+                        "liquidationPrice": "0.15107132",
+                        "pl": "-0.00000371",
+                        "total": "0.00681856",
+                        "type": "short"
+                        },
+                    "BTC_ETC": {
+                        "amount": "-0.6",
+                        "basePrice": "0.1",
+                        "lendingFees": "0.00000001",
+                        "liquidationPrice": "0.6",
+                        "pl": "0.00000371",
+                        "total": "0.06",
+                        "type": "short"
+                        },
+                    "BTC_ETH": {
+                        "amount": "0",
+                        "basePrice": "0",
+                        "lendingFees": "0",
+                        "liquidationPrice": "-1",
+                        "pl": "0",
+                        "total": "0",
+                        "type": "none"
+                        }
+                    }
+            balances = self.s.fetch_margin_balance()
+            self.assertEqual(2, len(balances))
+            expected = {
+                "DASH": {
+                    "amount": D("-0.1"),
+                    "borrowedPrice": D("0.06818560"),
+                    "lendingFees": D("1E-8"),
+                    "pl": D("-0.00000371"),
+                    "liquidationPrice": D("0.15107132"),
+                    "type": "short",
+                    "total": D("0.00681856"),
+                    "baseCurrency": "BTC"
+                    },
+                "ETC": {
+                    "amount": D("-0.6"),
+                    "borrowedPrice": D("0.1"),
+                    "lendingFees": D("1E-8"),
+                    "pl": D("0.00000371"),
+                    "liquidationPrice": D("0.6"),
+                    "type": "short",
+                    "total": D("0.06"),
+                    "baseCurrency": "BTC"
+                    }
+                }
+            self.assertEqual(expected, balances)
+
+    def test_sum(self):
+        self.assertEqual(D("1.1"), self.s.sum(D("1"), D("0.1")))
+
+    def test_fetch_balance(self):
+        with mock.patch.object(self.s, "load_markets") as load_markets,\
+                mock.patch.object(self.s, "privatePostReturnCompleteBalances") as balances,\
+                mock.patch.object(self.s, "common_currency_code") as ccc:
+            ccc.side_effect = ["ETH", "BTC", "DASH"]
+            balances.return_value = {
+                    "ETH": {
+                        "available": "10",
+                        "onOrders": "1",
+                        },
+                    "BTC": {
+                        "available": "1",
+                        "onOrders": "0",
+                        },
+                    "DASH": {
+                        "available": "0",
+                        "onOrders": "3"
+                        }
+                    }
+
+            expected = {
+                    "info": {
+                        "ETH": {"available": "10", "onOrders": "1"},
+                        "BTC": {"available": "1", "onOrders": "0"},
+                        "DASH": {"available": "0", "onOrders": "3"}
+                        },
+                    "ETH": {"free": D("10"), "used": D("1"), "total": D("11")},
+                    "BTC": {"free": D("1"), "used": D("0"), "total": D("1")},
+                    "DASH": {"free": D("0"), "used": D("3"), "total": D("3")},
+                    "free": {"ETH": D("10"), "BTC": D("1"), "DASH": D("0")},
+                    "used": {"ETH": D("1"), "BTC": D("0"), "DASH": D("3")},
+                    "total": {"ETH": D("11"), "BTC": D("1"), "DASH": D("3")}
+                    }
+            result = self.s.fetch_balance()
+            load_markets.assert_called_once()
+            self.assertEqual(expected, result)
+
+    def test_fetch_balance_per_type(self):
+        with mock.patch.object(self.s, "privatePostReturnAvailableAccountBalances") as balances:
+            balances.return_value = {
+                "exchange": {
+                    "BLK": "159.83673869",
+                    "BTC": "0.00005959",
+                    "USDT": "0.00002625",
+                    "XMR": "0.18719303"
+                    },
+                "margin": {
+                    "BTC": "0.03019227"
+                    }
+                }
+            expected = {
+                    "info": {
+                        "exchange": {
+                            "BLK": "159.83673869",
+                            "BTC": "0.00005959",
+                            "USDT": "0.00002625",
+                            "XMR": "0.18719303"
+                            },
+                        "margin": {
+                            "BTC": "0.03019227"
+                            }
+                        },
+                    "exchange": {
+                        "BLK": D("159.83673869"),
+                        "BTC": D("0.00005959"),
+                        "USDT": D("0.00002625"),
+                        "XMR": D("0.18719303")
+                        },
+                    "margin": {"BTC": D("0.03019227")},
+                    "BLK": {"exchange": D("159.83673869")},
+                    "BTC": {"exchange": D("0.00005959"), "margin": D("0.03019227")},
+                    "USDT": {"exchange": D("0.00002625")},
+                    "XMR": {"exchange": D("0.18719303")}
+                    } 
+            result = self.s.fetch_balance_per_type()
+            self.assertEqual(expected, result)
+
+    def test_fetch_all_balances(self):
+        import json
+        with mock.patch.object(self.s, "load_markets") as load_markets,\
+                mock.patch.object(self.s, "privatePostGetMarginPosition") as margin_balance,\
+                mock.patch.object(self.s, "privatePostReturnCompleteBalances") as balance,\
+                mock.patch.object(self.s, "privatePostReturnAvailableAccountBalances") as balance_per_type:
+
+            with open("test_samples/poloniexETest.test_fetch_all_balances.1.json") as f:
+                balance.return_value = json.load(f)
+            with open("test_samples/poloniexETest.test_fetch_all_balances.2.json") as f:
+                margin_balance.return_value = json.load(f)
+            with open("test_samples/poloniexETest.test_fetch_all_balances.3.json") as f:
+                balance_per_type.return_value = json.load(f)
+
+            result = self.s.fetch_all_balances()
+            expected_doge = {
+                    "total": D("-12779.79821852"),
+                    "exchange_used": D("0E-8"),
+                    "exchange_total": D("0E-8"),
+                    "exchange_free": D("0E-8"),
+                    "margin_available": 0,
+                    "margin_in_position": 0,
+                    "margin_borrowed": D("12779.79821852"),
+                    "margin_total": D("-12779.79821852"),
+                    "margin_pending_gain": 0,
+                    "margin_lending_fees": D("-9E-8"),
+                    "margin_pending_base_gain": D("0.00024059"),
+                    "margin_position_type": "short",
+                    "margin_liquidation_price": D("0.00000246"),
+                    "margin_borrowed_base_price": D("0.00599149"),
+                    "margin_borrowed_base_currency": "BTC"
+                    } 
+            expected_btc = {"total": D("0.05432165"),
+                    "exchange_used": D("0E-8"),
+                    "exchange_total": D("0.00005959"),
+                    "exchange_free": D("0.00005959"),
+                    "margin_available": D("0.03019227"),
+                    "margin_in_position": D("0.02406979"),
+                    "margin_borrowed": 0,
+                    "margin_total": D("0.05426206"),
+                    "margin_pending_gain": D("0.00093955"),
+                    "margin_lending_fees": 0,
+                    "margin_pending_base_gain": 0,
+                    "margin_position_type": None,
+                    "margin_liquidation_price": 0,
+                    "margin_borrowed_base_price": 0,
+                    "margin_borrowed_base_currency": None
+                    }
+            expected_xmr = {"total": D("0.18719303"),
+                    "exchange_used": D("0E-8"),
+                    "exchange_total": D("0.18719303"),
+                    "exchange_free": D("0.18719303"),
+                    "margin_available": 0,
+                    "margin_in_position": 0,
+                    "margin_borrowed": 0,
+                    "margin_total": 0,
+                    "margin_pending_gain": 0,
+                    "margin_lending_fees": 0,
+                    "margin_pending_base_gain": 0,
+                    "margin_position_type": None,
+                    "margin_liquidation_price": 0,
+                    "margin_borrowed_base_price": 0,
+                    "margin_borrowed_base_currency": None
+                    } 
+            self.assertEqual(expected_xmr, result["XMR"])
+            self.assertEqual(expected_doge, result["DOGE"])
+            self.assertEqual(expected_btc, result["BTC"])
+
+    def test_create_margin_order(self):
+        with self.assertRaises(market.ExchangeError):
+            self.s.create_margin_order("FOO", "market", "buy", "10")
+
+        with mock.patch.object(self.s, "load_markets") as load_markets,\
+                mock.patch.object(self.s, "privatePostMarginBuy") as margin_buy,\
+                mock.patch.object(self.s, "privatePostMarginSell") as margin_sell,\
+                mock.patch.object(self.s, "market") as market_mock,\
+                mock.patch.object(self.s, "price_to_precision") as ptp,\
+                mock.patch.object(self.s, "amount_to_precision") as atp:
+
+            margin_buy.return_value = {
+                    "orderNumber": 123
+                    }
+            margin_sell.return_value = {
+                    "orderNumber": 456
+                    }
+            market_mock.return_value = { "id": "BTC_ETC", "symbol": "BTC_ETC" }
+            ptp.return_value = D("0.1")
+            atp.return_value = D("12")
+
+            order = self.s.create_margin_order("BTC_ETC", "margin", "buy", "12", price="0.1")
+            self.assertEqual(123, order["id"])
+            margin_buy.assert_called_once_with({"currencyPair": "BTC_ETC", "rate": D("0.1"), "amount": D("12")})
+            margin_sell.assert_not_called()
+            margin_buy.reset_mock()
+            margin_sell.reset_mock()
+
+            order = self.s.create_margin_order("BTC_ETC", "margin", "sell", "12", lending_rate="0.01", price="0.1")
+            self.assertEqual(456, order["id"])
+            margin_sell.assert_called_once_with({"currencyPair": "BTC_ETC", "rate": D("0.1"), "amount": D("12"), "lendingRate": "0.01"})
+            margin_buy.assert_not_called()
+
+    def test_create_exchange_order(self):
+        with mock.patch.object(market.ccxt.poloniex, "create_order") as create_order:
+            self.s.create_order("symbol", "type", "side", "amount", price="price", params="params")
+
+            create_order.assert_called_once_with("symbol", "type", "side", "amount", price="price", params="params")
+
 @unittest.skipUnless("unit" in limits, "Unit skipped")
 class PortfolioTest(WebMockTestCase):
     def fill_data(self):
@@ -135,7 +446,7 @@ class PortfolioTest(WebMockTestCase):
     def setUp(self):
         super(PortfolioTest, self).setUp()
 
-        with open("test_portfolio.json") as example:
+        with open("test_samples/test_portfolio.json") as example:
             self.json_response = example.read()
 
         self.wm.get(portfolio.Portfolio.URL, text=self.json_response)
diff --git a/test_samples/poloniexETest.test_fetch_all_balances.1.json b/test_samples/poloniexETest.test_fetch_all_balances.1.json
new file mode 100644 (file)
index 0000000..b04648c
--- /dev/null
@@ -0,0 +1,1459 @@
+{
+    "1CR": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "ABY": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "AC": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "ACH": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "ADN": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "AEON": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "AERO": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "AIR": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "AMP": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "APH": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "ARCH": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "ARDR": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "AUR": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "AXIS": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "BALLS": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "BANK": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "BBL": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "BBR": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "BCC": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "BCH": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "BCN": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "BCY": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "BDC": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "BDG": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "BELA": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "BITCNY": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "BITS": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "BITUSD": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "BLK": {
+        "available": "159.83673869",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00562305"
+    },
+    "BLOCK": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "BLU": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "BNS": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "BONES": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "BOST": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "BTC": {
+        "available": "0.03025186",
+        "onOrders": "0.00000000",
+        "btcValue": "0.03025186"
+    },
+    "BTCD": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "BTCS": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "BTM": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "BTS": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "BURN": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "BURST": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "C2": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "CACH": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "CAI": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "CC": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "CCN": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "CGA": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "CHA": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "CINNI": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "CLAM": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "CNL": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "CNMT": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "CNOTE": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "COMM": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "CON": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "CORG": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "CRYPT": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "CURE": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "CVC": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "CYC": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "DAO": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "DASH": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "DCR": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "DGB": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "DICE": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "DIEM": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "DIME": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "DIS": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "DNS": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "DOGE": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "DRKC": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "DRM": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "DSH": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "DVK": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "EAC": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "EBT": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "ECC": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "EFL": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "EMC2": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "EMO": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "ENC": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "ETC": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "ETH": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "eTOK": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "EXE": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "EXP": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "FAC": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "FCN": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "FCT": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "FIBRE": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "FLAP": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "FLDC": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "FLO": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "FLT": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "FOX": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "FRAC": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "FRK": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "FRQ": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "FVZ": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "FZ": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "FZN": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "GAME": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "GAP": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "GAS": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "GDN": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "GEMZ": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "GEO": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "GIAR": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "GLB": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "GML": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "GNO": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "GNS": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "GNT": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "GOLD": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "GPC": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "GPUC": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "GRC": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "GRCX": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "GRS": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "GUE": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "H2O": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "HIRO": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "HOT": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "HUC": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "HUGE": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "HVC": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "HYP": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "HZ": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "IFC": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "INDEX": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "IOC": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "ITC": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "IXC": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "JLH": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "JPC": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "JUG": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "KDC": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "KEY": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "LBC": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "LC": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "LCL": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "LEAF": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "LGC": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "LOL": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "LOVE": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "LQD": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "LSK": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "LTBC": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "LTC": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "LTCX": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "MAID": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "MAST": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "MAX": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "MCN": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "MEC": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "METH": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "MIL": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "MIN": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "MINT": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "MMC": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "MMNXT": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "MMXIV": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "MNTA": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "MON": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "MRC": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "MRS": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "MTS": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "MUN": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "MYR": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "MZC": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "N5X": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "NAS": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "NAUT": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "NAV": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "NBT": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "NEOS": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "NL": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "NMC": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "NOBL": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "NOTE": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "NOXT": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "NRS": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "NSR": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "NTX": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "NXC": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "NXT": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "NXTI": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "OMG": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "OMNI": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "OPAL": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "PAND": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "PASC": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "PAWN": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "PIGGY": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "PINK": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "PLX": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "PMC": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "POT": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "PPC": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "PRC": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "PRT": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "PTS": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "Q2C": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "QBK": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "QCN": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "QORA": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "QTL": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "RADS": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "RBY": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "RDD": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "REP": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "RIC": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "RZR": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "SBD": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "SC": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "SDC": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "SHIBE": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "SHOPX": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "SILK": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "SJCX": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "SLR": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "SMC": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "SOC": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "SPA": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "SQL": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "SRCC": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "SRG": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "SSD": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "STEEM": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "STORJ": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "STR": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "STRAT": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "SUM": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "SUN": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "SWARM": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "SXC": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "SYNC": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "SYS": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "TAC": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "TOR": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "TRUST": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "TWE": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "UIS": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "ULTC": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "UNITY": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "URO": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "USDE": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "USDT": {
+        "available": "0.00002625",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "UTC": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "UTIL": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "UVC": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "VIA": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "VOOT": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "VOX": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "VRC": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "VTC": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "WC": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "WDC": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "WIKI": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "WOLF": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "X13": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "XAI": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "XAP": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "XBC": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "XC": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "XCH": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "XCN": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "XCP": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "XCR": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "XDN": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "XDP": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "XEM": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "XHC": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "XLB": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "XMG": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "XMR": {
+        "available": "0.18719303",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00598102"
+    },
+    "XPB": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "XPM": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "XRP": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "XSI": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "XST": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "XSV": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "XUSD": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "XVC": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "XXC": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "YACC": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "YANG": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "YC": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "YIN": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "ZEC": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    },
+    "ZRX": {
+        "available": "0.00000000",
+        "onOrders": "0.00000000",
+        "btcValue": "0.00000000"
+    }
+}
+
+
diff --git a/test_samples/poloniexETest.test_fetch_all_balances.2.json b/test_samples/poloniexETest.test_fetch_all_balances.2.json
new file mode 100644 (file)
index 0000000..3d2f741
--- /dev/null
@@ -0,0 +1,101 @@
+{
+    "BTC_BTS": {
+        "amount": "-309.05320945",
+        "total": "0.00602465",
+        "basePrice": "0.00001949",
+        "liquidationPrice": "0.00010211",
+        "pl": "0.00024394",
+        "lendingFees": "0.00000000",
+        "type": "short"
+    },
+    "BTC_CLAM": {
+        "type": "none",
+        "amount": "0.00000000",
+        "total": "0.00000000",
+        "basePrice": "0.00000000",
+        "liquidationPrice": -1,
+        "pl": "0.00000000",
+        "lendingFees": "0.00000000"
+    },
+    "BTC_DASH": {
+        "amount": "-0.11204647",
+        "total": "0.00602391",
+        "basePrice": "0.05376260",
+        "liquidationPrice": "0.28321001",
+        "pl": "0.00006304",
+        "lendingFees": "0.00000000",
+        "type": "short"
+    },
+    "BTC_DOGE": {
+        "amount": "-12779.79821852",
+        "total": "0.00599149",
+        "basePrice": "0.00000046",
+        "liquidationPrice": "0.00000246",
+        "pl": "0.00024059",
+        "lendingFees": "-0.00000009",
+        "type": "short"
+    },
+    "BTC_LTC": {
+        "type": "none",
+        "amount": "0.00000000",
+        "total": "0.00000000",
+        "basePrice": "0.00000000",
+        "liquidationPrice": -1,
+        "pl": "0.00000000",
+        "lendingFees": "0.00000000"
+    },
+    "BTC_MAID": {
+        "type": "none",
+        "amount": "0.00000000",
+        "total": "0.00000000",
+        "basePrice": "0.00000000",
+        "liquidationPrice": -1,
+        "pl": "0.00000000",
+        "lendingFees": "0.00000000"
+    },
+    "BTC_STR": {
+        "type": "none",
+        "amount": "0.00000000",
+        "total": "0.00000000",
+        "basePrice": "0.00000000",
+        "liquidationPrice": -1,
+        "pl": "0.00000000",
+        "lendingFees": "0.00000000"
+    },
+    "BTC_XMR": {
+        "type": "none",
+        "amount": "0.00000000",
+        "total": "0.00000000",
+        "basePrice": "0.00000000",
+        "liquidationPrice": -1,
+        "pl": "0.00000000",
+        "lendingFees": "0.00000000"
+    },
+    "BTC_XRP": {
+        "amount": "-68.66952474",
+        "total": "0.00602974",
+        "basePrice": "0.00008780",
+        "liquidationPrice": "0.00045756",
+        "pl": "0.00039198",
+        "lendingFees": "0.00000000",
+        "type": "short"
+    },
+    "BTC_ETH": {
+        "type": "none",
+        "amount": "0.00000000",
+        "total": "0.00000000",
+        "basePrice": "0.00000000",
+        "liquidationPrice": -1,
+        "pl": "0.00000000",
+        "lendingFees": "0.00000000"
+    },
+    "BTC_FCT": {
+        "type": "none",
+        "amount": "0.00000000",
+        "total": "0.00000000",
+        "basePrice": "0.00000000",
+        "liquidationPrice": -1,
+        "pl": "0.00000000",
+        "lendingFees": "0.00000000"
+    }
+}
diff --git a/test_samples/poloniexETest.test_fetch_all_balances.3.json b/test_samples/poloniexETest.test_fetch_all_balances.3.json
new file mode 100644 (file)
index 0000000..e805f6f
--- /dev/null
@@ -0,0 +1,11 @@
+{
+    "exchange": {
+        "BLK": "159.83673869",
+        "BTC": "0.00005959",
+        "USDT": "0.00002625",
+        "XMR": "0.18719303"
+    },
+    "margin": {
+        "BTC": "0.03019227"
+    }
+}