接口用途

南向资金历史总览。

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

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

返回字段说明

字段类型说明
nx1mnumber南向资金近一月净流入(百万)
ggth1mnumber港股通(沪)近一月净流入(百万)
ggts1mnumber港股通(深)近一月净流入(百万)
nx6mnumber南向资金近六月净流入(百万)
ggth6mnumber港股通(沪)近六月净流入(百万)
ggts6mnumber港股通(深)近六月净流入(百万)
nx1ynumber南向资金近一年净流入(百万)
ggth1ynumber港股通(沪)近一年净流入(百万)
ggts1ynumber港股通(深)近一年净流入(百万)
nxallnumber南向资金历史净流入(百万)
ggthallnumber港股通(沪)历史净流入(百万)
ggtsallnumber港股通(深)历史净流入(百万)

调用示例

Python
import requests

url = "https://liangmai.pro/api/gateway"
params = {
    "token": "YOUR_TOKEN",
    "api": "northbound_south_history",
}
r = requests.post(url, params=params)
print(r.json())
PHP
$url = "https://liangmai.pro/api/gateway";
$data = [
    'token' => 'YOUR_TOKEN',
    'api' => 'northbound_south_history',
];
$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_south_history",
});

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

更新与限流

数据更新:每日20:10 ·

相关接口