接口用途
统计近3、5、10天概念板块资金流入情况。
请求地址
POST https://liangmai.pro/api/gateway统一网关调用,query 参数携带 token(访问令牌)与 api=flow_sector_map(接口名),其余为业务参数。
返回字段说明
| 字段 | 类型 | 说明 |
|---|---|---|
t | string | 服务器更新时间yyyy-MM-ddHH:mm:ss |
mc | string | 概念板块名 |
dm | string | 概念板块代码 |
ac3 | number | 近三日涨跌幅(%) |
net3 | number | 近三日净流入(元) |
ra3 | number | 近三日净流入率(%) |
ac5 | number | 近五日涨跌幅(%) |
net5 | number | 近五日净流入(元) |
ra5 | number | 近五日净流入率(%) |
ac10 | number | 近十日涨跌幅(%) |
net10 | number | 近十日净流入(元) |
ra10 | number | 近十日净流入率(%) |
调用示例
Python
import requests
url = "https://liangmai.pro/api/gateway"
params = {
"token": "YOUR_TOKEN",
"api": "flow_sector_map",
}
r = requests.post(url, params=params)
print(r.json())PHP
$url = "https://liangmai.pro/api/gateway";
$data = [
'token' => 'YOUR_TOKEN',
'api' => 'flow_sector_map',
];
$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: "flow_sector_map",
});
fetch("https://liangmai.pro/api/gateway", {
method: "POST",
body: params
})
.then(r => r.json())
.then(data => console.log(data));更新与限流
数据更新:每日15:40 ·