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;Related strategies
Comment
All comments (1)
- 1
