期货行情数据查询
应用参数 | 类型 | 是否必填 | 默认值 | 示例值 | 说明 |
en_name | string | true | 必须为 quote.futures | ||
ftsId | string | true | 31001:黄金,31007:WTI原油,31008:伦敦布伦特原油,31037:香港恒生指数期货 |
系统参数 | 类型 | 是否必填 | 说明 |
ak | string | true | 开发者密钥 |
{ "success": "1", "result": { "dtQuery": "31007", "dtCount": "1", "dtList": { "31007": { "ftsId": "31007", "ftsType": "CFD", "ftsNm": "WTI原油", "lastPrice": "53", "highPrice": "53.41", "lowPrice": "52.76", "openPrice": "53.31", "yesyPrice": "52.92", "changePrice": "0.08", "changeMargin": "0.15%", "upTime": "2021-01-22 01:27:43" } } } }
<?php $ch = curl_init(); $url = 'http://api.liangmlk.cn?ak=xxxx&en_name=quote.futures&ftsId=xxxx'; curl_setopt($ch,CURLOPT_URL,$url); $res = curl_exec($ch); curl_close($ch); return $res; ?>
import requests url = 'http://api.liangmlk.cn?ak=xxxx&en_name=quote.futures&ftsId=xxxx' print( requests.get(url).json() )
curl http://api.liangmlk.cn?ak=xxxx&en_name=quote.futures&ftsId=xxxx