接口用途

上市基金实时。

请求地址POST https://liangmai.pro/api/gateway

统一网关调用,query 参数携带 token(访问令牌)与 api=market_fund_quote(接口名),其余为业务参数。

参数说明

参数名称是否必填说明示例
ts_code股票代码必填股票代码(可传 ts_code / code / symbol,6 位;带后缀自动规范为 6 位)600519

返回字段说明

字段类型说明
pnumber最新价
onumber开盘价
hnumber最高价
lnumber最低价
ycnumber前收盘价
cjenumber成交总额
vnumber成交总量
pvnumber原始成交总量
udfloat涨跌额
pcfloat涨跌幅
zffloat振幅
tstring更新时间
penumber市盈率
trnumber换手率
pb_rationumber市净率
tvnumber成交量

调用示例

Python
import requests

url = "https://liangmai.pro/api/gateway"
params = {
    "token": "YOUR_TOKEN",
    "api": "market_fund_quote",
    "ts_code": "600519",
}
r = requests.post(url, params=params)
print(r.json())
PHP
$url = "https://liangmai.pro/api/gateway";
$data = [
    'token' => 'YOUR_TOKEN',
    'api' => 'market_fund_quote',
    'ts_code' => '600519',
];
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$res = curl_exec($ch);
curl_close($ch);
echo $res;
JavaScript
const params = new URLSearchParams({
    token: "YOUR_TOKEN",
    api: "market_fund_quote",
    ts_code: "600519",
});

fetch("https://liangmai.pro/api/gateway", {
  method: "POST",
  body: params
})
  .then(r => r.json())
  .then(data => console.log(data));

更新与限流

调用限制:受您当前 Token 的每分钟请求上限约束;高峰时可能排队或短暂不可用。

相关接口