Commit 0a88faf4 by ken

try

parent f22f828b
...@@ -171,7 +171,7 @@ function _request(method, url, callback) { ...@@ -171,7 +171,7 @@ function _request(method, url, callback) {
} }
function depthByRest(symbol,callback) { function depthByRest(symbol,callback) {
const url = `http://api.zb.com/data/v1/depth?market=${symbol}&size=10`; const url = `http://api.zb.com/data/v1/depth?market=${symbol}&size=5`;
_request("GET", url, (err, data) => { _request("GET", url, (err, data) => {
if (err) { if (err) {
console.error(url + "出错"); console.error(url + "出错");
...@@ -232,7 +232,7 @@ function getBalanceByRest() { ...@@ -232,7 +232,7 @@ function getBalanceByRest() {
function run() { function run() {
subscribe(); subscribe();
const depthInterval = Math.max(60 * 1000 / (900 * ips.length / observerSymbol.length), 100); const depthInterval = Math.max(60 * 1000 / (900 * ips.length / observerSymbol.length), 80);
console.log(depthInterval); console.log(depthInterval);
setInterval(() => { setInterval(() => {
for (const symbol of observerSymbol) { 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