接口用途
当前交易日的南向、北向最新资金流向概览。
请求地址
POST https://liangmai.pro/api/gateway统一网关调用,query 参数携带 token(访问令牌)与 api=northbound_flow_overview(接口名),其余为业务参数。
返回字段说明
| 字段 | 类型 | 说明 |
|---|---|---|
type | string | 类型:沪股通/港股通/深股通/港股通 |
tname | string | 板块:沪股通/港股通(沪)/深股通/港股通(深) |
dir | string | 资金方向:北向/南向 |
netbuy | number | 成交净买额(万)=买入成交额-卖出成交额 |
netin | number | 资金净流入(万)=当日限额-当日余额 |
remain | number | 当日资金余额(万) |
up | number | 上涨股票数 |
ping | number | 持平股票数 |
down | number | 下跌股票数 |
idx | string | 相关指数名称 |
idxdm | string | 相关指数代码 |
idxzd | number | 相关指数涨跌幅(%) |
status | number | 交易状态。3:收盘,4:休市 |
调用示例
Python
import requests
url = "https://liangmai.pro/api/gateway"
params = {
"token": "YOUR_TOKEN",
"api": "northbound_flow_overview",
}
r = requests.post(url, params=params)
print(r.json())PHP
$url = "https://liangmai.pro/api/gateway";
$data = [
'token' => 'YOUR_TOKEN',
'api' => 'northbound_flow_overview',
];
$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: "northbound_flow_overview",
});
fetch("https://liangmai.pro/api/gateway", {
method: "POST",
body: params
})
.then(r => r.json())
.then(data => console.log(data));更新与限流
数据更新:每日20:10 ·