Commit 34b6f65a by ken

balance

parent fce0049c
...@@ -57,9 +57,10 @@ function subscribe() { ...@@ -57,9 +57,10 @@ function subscribe() {
const coins = data.data.coins; const coins = data.data.coins;
const balances = {}; const balances = {};
for (const coin of coins) { for (const coin of coins) {
balances[coin.enName] = {"onOrder": coin.freez, "available": coin.available} balances[coin.enName] = {"onOrder": coin.freez, "available": coin.available};
} }
redisClient.hset("balance", "binance", balances); console.log(balances);
redisClient.hset("balance", "zb", balances);
} else { } else {
const depth = data; const depth = data;
const key = depth.channel.replace('_', '').toUpperCase() + '@zb'; const key = depth.channel.replace('_', '').toUpperCase() + '@zb';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment