Commit d75c8bee by ken

zb

parent d0e7c6fa
......@@ -5,14 +5,14 @@ const request = require('request');
const crypto = require('ezcrypto').Crypto;
const ips = require("./util").allIps;
const options = {};
// const observerSymbol = ["btcusdt", 'ethusdt', 'ethbtc', "eosbtc", "eosusdt", 'bccusdt', "bccbtc"];
const observerSymbol = ["btcusdt", 'bccusdt', "bccbtc"];
const observerSymbol = ["btcusdt", 'ethusdt', 'ethbtc', "eosbtc", "eosusdt", 'bccusdt', "bccbtc"];
// const observerSymbol = ["btcusdt", 'bccusdt', "bccbtc"];
const redis = require('redis');
const redisClient = redis.createClient();
const publishKey = "ZB@2";
const accountInfoChannel = "getaccountinfo";
const APIKEY = "8b3a3944-5d13-43b4-a90f-0db5732a35c6";
const APISECRET = "001d5649-65f7-4c88-9d31-c429da39989d";
const APIKEY = "f18b9c03-746c-48a8-8cc4-be8f427aa6c2";
const APISECRET = "31ddd3b4-af0a-4d59-a250-661a023a8cad";
const lastEventTimeMap = {};
let balanceByRestOk = true;
let balanceByWebsocketOk = true;
......@@ -220,7 +220,7 @@ function getBalanceByRest() {
function run() {
subscribe();
const depthInterval = Math.max(60 * 1000 / (850 * 1 / observerSymbol.length), 300);
const depthInterval = Math.max(60 * 1000 / (850 * ips.length / observerSymbol.length), 300);
console.log(depthInterval);
setInterval(() => {
for (const symbol of observerSymbol) {
......
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