Type/to search

获取OK期货实时限价

Tool
0
Follow
2
Followers

获取OK期货实时限价,仅实盘有效。
代码仅供学习,作者不保证程序正确性,据此交易后果自负。

Source
JavaScript
$.GetLimit = function(currStr, contract) {
    var url = "https://www.okcoin.com/api/v1/future_price_limit.do?symbol=" + currStr + "_usd&contract_type=" + contract;
    var httpResp = HttpQuery(url);
    if (httpResp.indexOf("false") != -1) return null;
    var parsedResp;
    try {
        parsedResp = JSON.parse(httpResp);
    } catch (e) {
        return null;
    }
    return parsedResp;
Comment
All comments (1)

    TypeError: value has no property
    at main (FILE:16)
    请问是哪里出现的问题,在调试工具里面运行后出错了,如上所示。

    5 years ago
  • 1
iPhone Download
Forums
PINE Language
© 2015 - ∞ INVENTOR PTE LTD (SG)