接口用途
近n日营业部上榜统计,其中近n日中的n可以是5、10、30、60。
请求地址
POST https://liangmai.pro/api/gateway统一网关调用,query 参数携带 token(访问令牌)与 api=lhb_branch_stat(接口名),其余为业务参数。
参数说明
| 参数 | 名称 | 是否必填 | 说明 | 示例 |
|---|---|---|---|---|
days | 天数 | 必填 | 近 n 日(龙虎榜类 5/10/30/60;个股阶段统计 3/5/10/20) | 5 |
返回字段说明
| 字段 | 类型 | 说明 |
|---|---|---|
yybmc | string | 营业部名称 |
count | number | 上榜次数 |
totalb | number | 累积获取额(万) |
bcount | number | 买入席位 |
totals | number | 累积卖出额(万) |
scount | number | 卖出席位 |
top3 | string | 买入前三股票 |
调用示例
Python
import requests
url = "https://liangmai.pro/api/gateway"
params = {
"token": "YOUR_TOKEN",
"api": "lhb_branch_stat",
"days": "5",
}
r = requests.post(url, params=params)
print(r.json())PHP
$url = "https://liangmai.pro/api/gateway";
$data = [
'token' => 'YOUR_TOKEN',
'api' => 'lhb_branch_stat',
'days' => '5',
];
$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: "lhb_branch_stat",
days: "5",
});
fetch("https://liangmai.pro/api/gateway", {
method: "POST",
body: params
})
.then(r => r.json())
.then(data => console.log(data));更新与限流
数据更新:每日15:40 ·