Commit 5d105003 by ken

try

parent f0db4859
......@@ -197,10 +197,10 @@ const lastDepthRestSendTimeMap = {};
let detphRestSentAmount = 0;
function depthByRest(symbol,callback) {
const urls = [`http://api.zb.cn/data/v1/depth?market=${symbol}&size=5`, `http://api.zb.com/data/v1/depth?market=${symbol}&size=5`];
detphRestSentAmount += 1;
const index = detphRestSentAmount % 2;
const url = urls[index];
// const urls = [`http://api.zb.cn/data/v1/depth?market=${symbol}&size=5`, `http://api.zb.com/data/v1/depth?market=${symbol}&size=5`];
// detphRestSentAmount += 1;
// const index = detphRestSentAmount % 2;
const url = "http://api.zb.com/data/v1/depth?market=${symbol}&size=5";
const sendTime = Date.now();
_request("GET", url, (err, data) => {
const lastDepthRestSendTime = lastDepthRestSendTimeMap[symbol] || 0;
......
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