The resource loading... loading...

Problems encountered when retrieving K-line data in real-time with GetRecords after switching transactions

Author: swordhnj, Created: 2017-06-21 21:29:41, Updated:

The following is the code to get the K-string of different currencies by switching pairs:

function main() {
    LogReset();
    while (true) {
        exchange.IO("currency", "ETH");
        var curETH = exchange.GetCurrency();
        var recordsOfETH = exchange.GetRecords(PERIOD_M5);
        Log(curETH, "当前搜集到recordsOfETH的5(分钟)线数量", recordsOfETH.length, ":", recordsOfETH);
        exchange.IO("currency", "LTC");
        var curLTC = exchange.GetCurrency();
        var recordsOfLTC = exchange.GetRecords(PERIOD_M5);
        Log(curLTC, "当前搜集到recordsOfLTC的5(分钟)线数量", recordsOfLTC.length, ":", recordsOfLTC);
        exchange.IO("currency", "BTC");
        var curBTC = exchange.GetCurrency();
        var recordsOfBTC = exchange.GetRecords(PERIOD_M5);
        Log(curBTC, "当前搜集到recordsOfBTC的5(分钟)线数量", recordsOfBTC.length, ":", recordsOfBTC);
        Sleep(5000);
    }
}

However, the K-line data obtained during the Bitcoin exchange test has been duplicated.imgAnd then I tested everything on Okcoin, and it worked.imgPlease tell me what is the reason for this problem, is it the wrong way to get the K-line, or is it because the K-line of the Bitcoin exchange is a real-time collection problem, and there is no locating problem, please tell me!


More

Inventors quantify - small dreamsThis is a list of all the different ways Dn-filebox.qbox.me/1de1b7de4ffaff10a91f15e1c3201307fde334bf.png is credited in the database. It is true that the Bitcoin exchange network does not provide a K-line interface. And then I tested it with your test code and found: This is a list of all the different ways Dn-filebox.qbox.me/4408aec8a61e085e49ff1538c604e68dc1dc8477.png is credited in the database. This is a list of all the different ways Dn-filebox.qbox.me/66589341c54405b4492839f9ce2bc1fba3ab34e0.png is credited in the database. Is your host up-to-date? Even though the major version is not updated, it has been tweaked a few times due to the more recent additions, so you can try it out with the latest version.

Inventors quantify - small dreamsIf you are looking for a QQ, please contact me at 359706687.

swordhnjI downloaded the latest hoster test and it looks like this: This is a list of all the different ways Dn-filebox.qbox.me/900dba21f1a7bdb01c1760f54ea84520aa90f419.png is credited in the database. The system environment is 64-bit Linux, will this have an impact? This is a screenshot of the administrator https://dn-filebox.qbox.me/733adee9ef8be8e39445750f8aafc5473dbca2c3.png