接口用途

当前交易日的南向、北向最新资金流向概览。

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

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

返回字段说明

字段类型说明
typestring类型:沪股通/港股通/深股通/港股通
tnamestring板块:沪股通/港股通(沪)/深股通/港股通(深)
dirstring资金方向:北向/南向
netbuynumber成交净买额(万)=买入成交额-卖出成交额
netinnumber资金净流入(万)=当日限额-当日余额
remainnumber当日资金余额(万)
upnumber上涨股票数
pingnumber持平股票数
downnumber下跌股票数
idxstring相关指数名称
idxdmstring相关指数代码
idxzdnumber相关指数涨跌幅(%)
statusnumber交易状态。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 ·

相关接口