# 株主持株明細の取得
- Python
- Proto
- C#
- Java
- C++
- JavaScript
get_shareholders_holder_detail(code, request_type=None, next_key=None, num=None, sort_column=None, sort_type=None, period_id=None, holder_id=None)
説明
指定銘柄の指定保有者タイプの持株明細リストを取得します。ページネーションに対応しています
パラメータ
パラメータ 型 説明 code str 銘柄コード 例:US.AAPL;香港株、米国株の正株およびファンドに対応request_type HolderDetailType 保有者タイプ 0=デフォルト,1000=全部,1=その他機関,2=伝統的投資マネージャー,3=ヘッジファンド,4=ベンチャー/プライベートエクイティ,5=企業年金,6=財団ファンド,7=保険会社,8=銀行/投資銀行,9=ファミリーオフィス/トラスト,10=政府系ファンド,11=REIT,12=ストラクチャードファイナンスマネージャー,13=労組年金,14=政府年金,15=基金,100=個人,200=ADS,300=上場企業,400=非上場企業,500=国有株;デフォルトはサーバー側ロジックによるnext_key str ページネーションキー 初回はなし;続きを取得する場合は前回返された next_key を渡す;"-1" はデータなしを意味するnum int 1ページあたりの件数 デフォルト 10、範囲 1~50sort_column SortField ソートフィールド 61=保有株数(デフォルト),62=持株変動数sort_type SortType ソート方向 1=降順(デフォルト),2=昇順period_id int 報告期 ID GetShareholdersOverview(3237)が返す holdingPeriodList の periodId と対応;デフォルト 0 は最新期holder_id int 保有者 ID フィルター デフォルト 0 はフィルターなし;GetShareholdersOverview(3237)、GetShareholdersHoldingChanges(3238)、本プロトコル(3239)、GetInsiderHolderList(3241)、GetInsiderTradeList(3242)から取得可能戻り値
パラメータ 型 説明 ret RET_CODE API呼び出し結果 data pd.DataFrame ret == RET_OK の場合、持株明細の DataFrame を返します str ret != RET_OK の場合、エラーの説明を返します DataFrame フィールド説明:
フィールド 型 説明 update_time_str str データ更新時刻 形式:YYYY-MM-DD HH:MM:SS、対応市場タイムゾーンnext_key str ページネーションキー "-1" はデータなしを意味する;次のリクエストの next_key パラメータにそのまま渡すperiod_text str 報告期 例:"2026/Q1"holder_id int 保有者 ID 他の株主関連プロトコルの holder_id フィルターとして使用可能name str 保有者名 holder_quantity int 保有株数合計 単位:株holder_quantity_change int 持株変動数 単位:株;正値は増加、負値は減少holder_pct float 持株比率 パーセント記号の前の値、例:12.34 は 12.34% を意味するholder_pct_change float 持株変動比率 パーセント記号の前の値、例:12.34 は 12.34% の変動を意味する;負値は減少holding_date_str str 保有日付 形式:YYYY-MM-DD、香港時区close_price float 保有日付の終値 保有日付に対応する実際の終値price_change_pct float 株価変動比率 パーセント記号の前の値、例:-0.4467 は -0.4467% を意味するsource_group_name str データソース 持株明細の開示元、例:"13F"、"13F Summary" など
Example
from futu import *
quote_ctx = OpenQuoteContext(host='127.0.0.1', port=11111)
ret, data = quote_ctx.get_shareholders_holder_detail("HK.00700", request_type=1000)
if ret == RET_OK:
print(data[['period_text', 'name', 'holder_quantity', 'holder_pct', 'holder_pct_change']].to_string(index=False))
print('next_key:', data.attrs.get('next_key', '-1'))
else:
print('error:', data)
quote_ctx.close()
2
3
4
5
6
7
8
9
10
- Output
period_text name holder_quantity holder_pct holder_pct_change
2026/Q1 Prosus Ventures N.V. 2079512000 23.053 -0.285
2026/Q1 Huateng Ma 709859700 7.869 0.000
2026/Q1 The Vanguard 268596433 2.977 0.031
2026/Q1 BlackRock 240834898 2.669 0.088
2026/Q1 Norges Bank Investment Management 122744699 1.360 -0.083
2026/Q1 FMR 86765121 0.961 -0.232
2026/Q1 Capital Research 85568118 0.948 0.024
2026/Q1 J.P. Morgan Asset Management, Inc. 62437911 0.692 -0.025
2026/Q1 E Fund Management Co., Ltd. 52722677 0.584 0.000
2026/Q1 Baillie Gifford 35674108 0.395 0.020
next_key: 10
2
3
4
5
6
7
8
9
10
11
12
# Qot_GetShareholdersHolderDetail.proto
説明
株主持株明細を取得します
パラメータ
message C2S
{
required Qot_Common.Security security = 1;
optional Qot_Common.HolderDetailType requestType = 2; // リクエストデータタイプ、Qot_Common.HolderDetailType を参照;デフォルトはサーバー側ロジックによる
optional string nextKey = 3; // ページネーションキー;初回は不要、続き取得時は前回の nextKey を渡す;"-1" はデータなしを意味する
optional int32 num = 4; // 1ページあたりの件数、デフォルト 10、範囲 1~50
optional Qot_Common.SortField sortColumn = 5; // ソートフィールド、Qot_Common.SortField 参照:61=保有株数(デフォルト)62=持株変動数
optional Qot_Common.SortType sortType = 6; // ソート方向、Qot_Common.SortType 定義を参照、デフォルト降順
optional int32 periodId = 7; // 報告期 ID;GetShareholdersOverview(3237)が返す holdingPeriodList の periodId と対応;デフォルト 0 は最新期
optional int32 holderId = 8; // 保有者 ID フィルター;デフォルト 0 はフィルターなし;GetShareholdersOverview(3237)、GetShareholdersHoldingChanges(3238)、本プロトコル(3239)、GetInsiderHolderList(3241)、GetInsiderTradeList(3242)から取得可能
}
message Request
{
required C2S c2s = 1;
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
- Security 構造については Security を参照
- 保有者詳細タイプについては HolderDetailType を参照
- 戻り値
message OwnershipDetailItem
{
optional string periodText = 1; // 報告期、例:"2025/Q3"
optional uint64 holderId = 2; // 保有者 ID
optional string name = 3; // 保有者名
optional int64 holderQuantity = 4; // 保有株数合計(単位:株)
optional int64 holderQuantityChange = 5; // 持株変動数(単位:株;正値=増加、負値=減少)
optional double holderPct = 6; // 持株比率、パーセント記号前の値、例:12.34 は 12.34% を意味する
optional double holderPctChange = 7; // 持株変動比率、パーセント記号前の値、例:12.34 は 12.34% の変動を意味する;負値は減少
optional uint64 holdingDate = 8; // 保有日タイムスタンプ(秒)
optional string holdingDateStr = 9; // 保有日文字列、形式:YYYY-MM-DD、香港時区
optional double closePrice = 10; // 保有日付の終値(実際の価格)
optional double priceChangePct = 11; // 保有日付の株価変動比率、例:-0.4467 は -0.4467% を意味する
optional string sourceGroupName = 12; // 持株明細の開示元(例:13F、複数申告など)
}
message S2C
{
optional uint64 updateTime = 1; // データ更新タイムスタンプ(秒)
optional string updateTimeStr = 2; // データ更新時刻文字列、形式:YYYY-MM-DD HH:MM:SS、対応市場タイムゾーン
optional string nextKey = 3; // ページネーションキー;"-1" はデータなしを意味する
repeated OwnershipDetailItem itemList = 4;
}
message Response
{
required int32 retType = 1 [default = -400]; // 返回結果、Common.RetType を参照
optional string retMsg = 2; // 返回結果説明
optional int32 errCode = 3; // エラーコード
optional S2C s2c = 4;
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
- API呼び出し結果の構造については RetType を参照
- 株主持株明細の保有者タイプについては HolderDetailType を参照
プロトコル ID
3239
uint GetShareholdersHolderDetail(QotGetShareholdersHolderDetail.Request req);
virtual void OnReply_GetShareholdersHolderDetail(MMAPI_Conn client, uint nSerialNo, QotGetShareholdersHolderDetail.Response rsp);
説明
株主持株明細を取得します
パラメータ
message C2S
{
required Qot_Common.Security security = 1;
optional Qot_Common.HolderDetailType requestType = 2; // リクエストデータタイプ、Qot_Common.HolderDetailType を参照;デフォルトはサーバー側ロジックによる
optional string nextKey = 3; // ページネーションキー;初回は不要、続き取得時は前回の nextKey を渡す;"-1" はデータなしを意味する
optional int32 num = 4; // 1ページあたりの件数、デフォルト 10、範囲 1~50
optional Qot_Common.SortField sortColumn = 5; // ソートフィールド、Qot_Common.SortField 参照:61=保有株数(デフォルト)62=持株変動数
optional Qot_Common.SortType sortType = 6; // ソート方向、Qot_Common.SortType 定義を参照、デフォルト降順
optional int32 periodId = 7; // 報告期 ID;GetShareholdersOverview(3237)が返す holdingPeriodList の periodId と対応;デフォルト 0 は最新期
optional int32 holderId = 8; // 保有者 ID フィルター;デフォルト 0 はフィルターなし;GetShareholdersOverview(3237)、GetShareholdersHoldingChanges(3238)、本プロトコル(3239)、GetInsiderHolderList(3241)、GetInsiderTradeList(3242)から取得可能
}
message Request
{
required C2S c2s = 1;
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
- Security 構造については Security を参照
- 戻り値
message OwnershipDetailItem
{
optional string periodText = 1; // 報告期、例:"2025/Q3"
optional uint64 holderId = 2; // 保有者 ID
optional string name = 3; // 保有者名
optional int64 holderQuantity = 4; // 保有株数合計(単位:株)
optional int64 holderQuantityChange = 5; // 持株変動数(単位:株;正値=増加、負値=減少)
optional double holderPct = 6; // 持株比率、パーセント記号前の値、例:12.34 は 12.34% を意味する
optional double holderPctChange = 7; // 持株変動比率、パーセント記号前の値、例:12.34 は 12.34% の変動を意味する;負値は減少
optional uint64 holdingDate = 8; // 保有日タイムスタンプ(秒)
optional string holdingDateStr = 9; // 保有日文字列、形式:YYYY-MM-DD、香港時区
optional double closePrice = 10; // 保有日付の終値(実際の価格)
optional double priceChangePct = 11; // 保有日付の株価変動比率、例:-0.4467 は -0.4467% を意味する
optional string sourceGroupName = 12; // 持株明細の開示元(例:13F、複数申告など)
}
message S2C
{
optional uint64 updateTime = 1; // データ更新タイムスタンプ(秒)
optional string updateTimeStr = 2; // データ更新時刻文字列、形式:YYYY-MM-DD HH:MM:SS、対応市場タイムゾーン
optional string nextKey = 3; // ページネーションキー;"-1" はデータなしを意味する
repeated OwnershipDetailItem itemList = 4;
}
message Response
{
required int32 retType = 1 [default = -400]; // 返回結果、Common.RetType を参照
optional string retMsg = 2; // 返回結果説明
optional int32 errCode = 3; // エラーコード
optional S2C s2c = 4;
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
- API呼び出し結果の構造については RetType を参照
- Example
public class Program : FTSPI_Qot, FTSPI_Conn
{
FTAPI_Qot qot = new FTAPI_Qot();
public Program()
{
qot.SetClientInfo("csharp", 1);
qot.SetConnCallback(this);
qot.SetQotCallback(this);
}
public void Start()
{
qot.InitConnect("127.0.0.1", (ushort)11111, false);
}
public void OnInitConnect(FTAPI_Conn client, long errCode, String desc)
{
Console.Write("Qot onInitConnect: ret={0} desc={1} connID={2}\n", errCode, desc, client.GetConnectID());
if (errCode != 0)
return;
QotCommon.Security sec = QotCommon.Security.CreateBuilder()
.SetMarket((int)QotCommon.QotMarket.QotMarket_HK_Security)
.SetCode("00700")
.Build();
QotGetShareholdersHolderDetail.C2S c2s = QotGetShareholdersHolderDetail.C2S.CreateBuilder()
.SetSecurity(sec)
.Build();
QotGetShareholdersHolderDetail.Request req = QotGetShareholdersHolderDetail.Request.CreateBuilder().SetC2S(c2s).Build();
uint seqNo = qot.GetShareholdersHolderDetail(req);
Console.Write("Send QotGetShareholdersHolderDetail: {0}\n", seqNo);
}
public void OnDisconnect(FTAPI_Conn client, long errCode)
{
Console.Write("Qot onDisConnect: {0}\n", errCode);
}
public void OnReply_GetShareholdersHolderDetail(FTAPI_Conn client, uint nSerialNo, QotGetShareholdersHolderDetail.Response rsp)
{
Console.Write("Reply: QotGetShareholdersHolderDetail: {0} {1}\n", nSerialNo, rsp.ToString());
}
public static void Main(String[] args)
{
FTAPI.Init();
Program qot = new Program();
qot.Start();
while (true)
Thread.Sleep(1000 * 600);
}
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
- Output
sent seqNo=3
retType: 0
retMsg: ""
errCode: 0
s2c {
updateTime: 1778344379
updateTimeStr: "2026-05-10 00:32:59"
nextKey: "10"
itemList {
periodText: "2026/Q1"
holderId: 337488017
name: "Prosus Ventures N.V."
holderQuantity: 2079512000
holderQuantityChange: -25741100
holderPct: 23.053
holderPctChange: -0.285
holdingDate: 1767110400
holdingDateStr: "2025-12-31"
closePrice: 599
priceChangePct: -0.1666
sourceGroupName: "Annual Report"
}
itemList {
//...
}
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
int getShareholdersHolderDetail(QotGetShareholdersHolderDetail.Request req);
void onReply_GetShareholdersHolderDetail(MMAPI_Conn client, int nSerialNo, QotGetShareholdersHolderDetail.Response rsp);
説明
株主持株明細を取得します
パラメータ
message C2S
{
required Qot_Common.Security security = 1;
optional Qot_Common.HolderDetailType requestType = 2; // リクエストデータタイプ、Qot_Common.HolderDetailType を参照;デフォルトはサーバー側ロジックによる
optional string nextKey = 3; // ページネーションキー;初回は不要、続き取得時は前回の nextKey を渡す;"-1" はデータなしを意味する
optional int32 num = 4; // 1ページあたりの件数、デフォルト 10、範囲 1~50
optional Qot_Common.SortField sortColumn = 5; // ソートフィールド、Qot_Common.SortField 参照:61=保有株数(デフォルト)62=持株変動数
optional Qot_Common.SortType sortType = 6; // ソート方向、Qot_Common.SortType 定義を参照、デフォルト降順
optional int32 periodId = 7; // 報告期 ID;GetShareholdersOverview(3237)が返す holdingPeriodList の periodId と対応;デフォルト 0 は最新期
optional int32 holderId = 8; // 保有者 ID フィルター;デフォルト 0 はフィルターなし;GetShareholdersOverview(3237)、GetShareholdersHoldingChanges(3238)、本プロトコル(3239)、GetInsiderHolderList(3241)、GetInsiderTradeList(3242)から取得可能
}
message Request
{
required C2S c2s = 1;
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
- Security 構造については Security を参照
- 戻り値
message OwnershipDetailItem
{
optional string periodText = 1; // 報告期、例:"2025/Q3"
optional uint64 holderId = 2; // 保有者 ID
optional string name = 3; // 保有者名
optional int64 holderQuantity = 4; // 保有株数合計(単位:株)
optional int64 holderQuantityChange = 5; // 持株変動数(単位:株;正値=増加、負値=減少)
optional double holderPct = 6; // 持株比率、パーセント記号前の値、例:12.34 は 12.34% を意味する
optional double holderPctChange = 7; // 持株変動比率、パーセント記号前の値、例:12.34 は 12.34% の変動を意味する;負値は減少
optional uint64 holdingDate = 8; // 保有日タイムスタンプ(秒)
optional string holdingDateStr = 9; // 保有日文字列、形式:YYYY-MM-DD、香港時区
optional double closePrice = 10; // 保有日付の終値(実際の価格)
optional double priceChangePct = 11; // 保有日付の株価変動比率、例:-0.4467 は -0.4467% を意味する
optional string sourceGroupName = 12; // 持株明細の開示元(例:13F、複数申告など)
}
message S2C
{
optional uint64 updateTime = 1; // データ更新タイムスタンプ(秒)
optional string updateTimeStr = 2; // データ更新時刻文字列、形式:YYYY-MM-DD HH:MM:SS、対応市場タイムゾーン
optional string nextKey = 3; // ページネーションキー;"-1" はデータなしを意味する
repeated OwnershipDetailItem itemList = 4;
}
message Response
{
required int32 retType = 1 [default = -400]; // 返回結果、Common.RetType を参照
optional string retMsg = 2; // 返回結果説明
optional int32 errCode = 3; // エラーコード
optional S2C s2c = 4;
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
- API呼び出し結果の構造については RetType を参照
- Example
public class QotDemo implements FTSPI_Qot, FTSPI_Conn {
FTAPI_Conn_Qot qot = new FTAPI_Conn_Qot();
public QotDemo() {
qot.setClientInfo("javaclient", 1);
qot.setConnSpi(this);
qot.setQotSpi(this);
}
public void start() {
qot.initConnect("127.0.0.1", (short)11111, false);
}
@Override
public void onInitConnect(FTAPI_Conn client, long errCode, String desc)
{
System.out.printf("Qot onInitConnect: ret=%b desc=%s connID=%d\n", errCode, desc, client.getConnectID());
if (errCode != 0)
return;
QotCommon.Security sec = QotCommon.Security.newBuilder()
.setMarket(QotCommon.QotMarket.QotMarket_HK_Security_VALUE)
.setCode("00700")
.build();
QotGetShareholdersHolderDetail.C2S c2s = QotGetShareholdersHolderDetail.C2S.newBuilder()
.setSecurity(sec)
.build();
QotGetShareholdersHolderDetail.Request req = QotGetShareholdersHolderDetail.Request.newBuilder().setC2S(c2s).build();
int seqNo = qot.getShareholdersHolderDetail(req);
System.out.printf("Send QotGetShareholdersHolderDetail: %d\n", seqNo);
}
@Override
public void onDisconnect(FTAPI_Conn client, long errCode) {
System.out.printf("Qot onDisConnect: %d\n", errCode);
}
@Override
public void onReply_GetShareholdersHolderDetail(FTAPI_Conn client, int nSerialNo, QotGetShareholdersHolderDetail.Response rsp) {
if (rsp.getRetType() != 0) {
System.out.printf("QotGetShareholdersHolderDetail failed: %s\n", rsp.getRetMsg());
}
else {
try {
String json = JsonFormat.printer().print(rsp);
System.out.printf("Receive QotGetShareholdersHolderDetail: %s\n", json);
} catch (InvalidProtocolBufferException e) {
e.printStackTrace();
}
}
}
public static void main(String[] args) {
FTAPI.init();
QotDemo qot = new QotDemo();
qot.start();
while (true) {
try {
Thread.sleep(1000 * 600);
} catch (InterruptedException exc) {
}
}
}
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
- Output
Qot onInitConnect: ret=0 desc= connID=7459212646576371604
Send Qot_GetShareholdersHolderDetail: 2
Receive Qot_GetShareholdersHolderDetail: retType: 0
retMsg: ""
errCode: 0
s2c {
updateTime: 1778344379
updateTimeStr: "2026-05-10 00:32:59"
nextKey: "10"
itemList {
periodText: "2026/Q1"
holderId: 337488017
name: "Prosus Ventures N.V."
holderQuantity: 2079512000
holderQuantityChange: -25741100
holderPct: 23.053
holderPctChange: -0.285
holdingDate: 1767110400
holdingDateStr: "2025-12-31"
closePrice: 599.0
priceChangePct: -0.1666
sourceGroupName: "Annual Report"
}
itemList {
//...
}
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
moomoo::u32_t GetShareholdersHolderDetail(const Qot_GetShareholdersHolderDetail::Request &stReq);
virtual void OnReply_GetShareholdersHolderDetail(moomoo::u32_t nSerialNo, const Qot_GetShareholdersHolderDetail::Response &stRsp) = 0;
説明
株主持株明細を取得します
パラメータ
message C2S
{
required Qot_Common.Security security = 1;
optional Qot_Common.HolderDetailType requestType = 2; // リクエストデータタイプ、Qot_Common.HolderDetailType を参照;デフォルトはサーバー側ロジックによる
optional string nextKey = 3; // ページネーションキー;初回は不要、続き取得時は前回の nextKey を渡す;"-1" はデータなしを意味する
optional int32 num = 4; // 1ページあたりの件数、デフォルト 10、範囲 1~50
optional Qot_Common.SortField sortColumn = 5; // ソートフィールド、Qot_Common.SortField 参照:61=保有株数(デフォルト)62=持株変動数
optional Qot_Common.SortType sortType = 6; // ソート方向、Qot_Common.SortType 定義を参照、デフォルト降順
optional int32 periodId = 7; // 報告期 ID;GetShareholdersOverview(3237)が返す holdingPeriodList の periodId と対応;デフォルト 0 は最新期
optional int32 holderId = 8; // 保有者 ID フィルター;デフォルト 0 はフィルターなし;GetShareholdersOverview(3237)、GetShareholdersHoldingChanges(3238)、本プロトコル(3239)、GetInsiderHolderList(3241)、GetInsiderTradeList(3242)から取得可能
}
message Request
{
required C2S c2s = 1;
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
- Security 構造については Security を参照
- 戻り値
message OwnershipDetailItem
{
optional string periodText = 1; // 報告期、例:"2025/Q3"
optional uint64 holderId = 2; // 保有者 ID
optional string name = 3; // 保有者名
optional int64 holderQuantity = 4; // 保有株数合計(単位:株)
optional int64 holderQuantityChange = 5; // 持株変動数(単位:株;正値=増加、負値=減少)
optional double holderPct = 6; // 持株比率、パーセント記号前の値、例:12.34 は 12.34% を意味する
optional double holderPctChange = 7; // 持株変動比率、パーセント記号前の値、例:12.34 は 12.34% の変動を意味する;負値は減少
optional uint64 holdingDate = 8; // 保有日タイムスタンプ(秒)
optional string holdingDateStr = 9; // 保有日文字列、形式:YYYY-MM-DD、香港時区
optional double closePrice = 10; // 保有日付の終値(実際の価格)
optional double priceChangePct = 11; // 保有日付の株価変動比率、例:-0.4467 は -0.4467% を意味する
optional string sourceGroupName = 12; // 持株明細の開示元(例:13F、複数申告など)
}
message S2C
{
optional uint64 updateTime = 1; // データ更新タイムスタンプ(秒)
optional string updateTimeStr = 2; // データ更新時刻文字列、形式:YYYY-MM-DD HH:MM:SS、対応市場タイムゾーン
optional string nextKey = 3; // ページネーションキー;"-1" はデータなしを意味する
repeated OwnershipDetailItem itemList = 4;
}
message Response
{
required int32 retType = 1 [default = -400]; // 返回結果、Common.RetType を参照
optional string retMsg = 2; // 返回結果説明
optional int32 errCode = 3; // エラーコード
optional S2C s2c = 4;
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
- API呼び出し結果の構造については RetType を参照
- Example
class Program : public FTSPI_Qot, public FTSPI_Trd, public FTSPI_Conn
{
public:
Program() {
m_pQotApi = FTAPI::CreateQotApi();
m_pQotApi->RegisterQotSpi(this);
m_pQotApi->RegisterConnSpi(this);
}
~Program() {
if (m_pQotApi != nullptr)
{
m_pQotApi->UnregisterQotSpi();
m_pQotApi->UnregisterConnSpi();
FTAPI::ReleaseQotApi(m_pQotApi);
m_pQotApi = nullptr;
}
}
void Start() {
m_pQotApi->InitConnect("127.0.0.1", 11111, false);
}
virtual void OnInitConnect(FTAPI_Conn* pConn, Futu::i64_t nErrCode, const char* strDesc) {
cout << "connect" << endl;
// construct request message
Qot_GetShareholdersHolderDetail::Request req;
Qot_GetShareholdersHolderDetail::C2S *c2s = req.mutable_c2s();
Qot_Common::Security *sec = c2s->mutable_security();
sec->set_code("00700");
sec->set_market(Qot_Common::QotMarket::QotMarket_HK_Security);
m_pQotApi->GetShareholdersHolderDetail(req);
cout << "GetShareholdersHolderDetail" << endl;
}
virtual void OnReply_GetShareholdersHolderDetail(Futu::u32_t nSerialNo, const Qot_GetShareholdersHolderDetail::Response &stRsp){
cout << "OnReply_GetShareholdersHolderDetail:" << endl;
// print response
// ProtoBufToBodyData and UTF8ToLocal refer to tool.h in Samples
string resp_str;
ProtoBufToBodyData(stRsp, resp_str);
cout << UTF8ToLocal(resp_str) << endl;
}
protected:
FTAPI_Qot *m_pQotApi;
};
int32_t main(int32_t argc, char** argv)
{
FTAPI::Init();
{
Program program;
program.Start();
getchar();
}
protobuf::ShutdownProtobufLibrary();
FTAPI::UnInit();
return 0;
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
- Output
onInitConnect: ret=0 desc=Succeed!
Send Qot_GetShareholdersHolderDetail seqNo=3
retType: 0
retMsg: ""
errCode: 0
s2c {
updateTime: 1778344379
updateTimeStr: "2026-05-10 00:32:59"
nextKey: "10"
itemList {
periodText: "2026/Q1"
holderId: 337488017
name: "Prosus Ventures N.V."
holderQuantity: 2079512000
holderQuantityChange: -25741100
holderPct: 23.053
holderPctChange: -0.285
holdingDate: 1767110400
holdingDateStr: "2025-12-31"
closePrice: 599
priceChangePct: -0.1666
sourceGroupName: "Annual Report"
}
itemList {
//...
}
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
GetShareholdersHolderDetail(req);
説明
株主持株明細を取得します
パラメータ
message C2S
{
required Qot_Common.Security security = 1;
optional Qot_Common.HolderDetailType requestType = 2; // リクエストデータタイプ、Qot_Common.HolderDetailType を参照;デフォルトはサーバー側ロジックによる
optional string nextKey = 3; // ページネーションキー;初回は不要、続き取得時は前回の nextKey を渡す;"-1" はデータなしを意味する
optional int32 num = 4; // 1ページあたりの件数、デフォルト 10、範囲 1~50
optional Qot_Common.SortField sortColumn = 5; // ソートフィールド、Qot_Common.SortField 参照:61=保有株数(デフォルト)62=持株変動数
optional Qot_Common.SortType sortType = 6; // ソート方向、Qot_Common.SortType 定義を参照、デフォルト降順
optional int32 periodId = 7; // 報告期 ID;GetShareholdersOverview(3237)が返す holdingPeriodList の periodId と対応;デフォルト 0 は最新期
optional int32 holderId = 8; // 保有者 ID フィルター;デフォルト 0 はフィルターなし;GetShareholdersOverview(3237)、GetShareholdersHoldingChanges(3238)、本プロトコル(3239)、GetInsiderHolderList(3241)、GetInsiderTradeList(3242)から取得可能
}
message Request
{
required C2S c2s = 1;
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
- Security 構造については Security を参照
- 戻り値
message OwnershipDetailItem
{
optional string periodText = 1; // 報告期、例:"2025/Q3"
optional uint64 holderId = 2; // 保有者 ID
optional string name = 3; // 保有者名
optional int64 holderQuantity = 4; // 保有株数合計(単位:株)
optional int64 holderQuantityChange = 5; // 持株変動数(単位:株;正値=増加、負値=減少)
optional double holderPct = 6; // 持株比率、パーセント記号前の値、例:12.34 は 12.34% を意味する
optional double holderPctChange = 7; // 持株変動比率、パーセント記号前の値、例:12.34 は 12.34% の変動を意味する;負値は減少
optional uint64 holdingDate = 8; // 保有日タイムスタンプ(秒)
optional string holdingDateStr = 9; // 保有日文字列、形式:YYYY-MM-DD、香港時区
optional double closePrice = 10; // 保有日付の終値(実際の価格)
optional double priceChangePct = 11; // 保有日付の株価変動比率、例:-0.4467 は -0.4467% を意味する
optional string sourceGroupName = 12; // 持株明細の開示元(例:13F、複数申告など)
}
message S2C
{
optional uint64 updateTime = 1; // データ更新タイムスタンプ(秒)
optional string updateTimeStr = 2; // データ更新時刻文字列、形式:YYYY-MM-DD HH:MM:SS、対応市場タイムゾーン
optional string nextKey = 3; // ページネーションキー;"-1" はデータなしを意味する
repeated OwnershipDetailItem itemList = 4;
}
message Response
{
required int32 retType = 1 [default = -400]; // 返回結果、Common.RetType を参照
optional string retMsg = 2; // 返回結果説明
optional int32 errCode = 3; // エラーコード
optional S2C s2c = 4;
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
- API呼び出し結果の構造については RetType を参照
- Example
import ftWebsocket from "futu-api";
import { Common, Qot_Common } from "futu-api/proto";
import beautify from "js-beautify";
function QotGetShareholdersHolderDetail(){
const { RetType } = Common
const { QotMarket } = Qot_Common
let [addr, port, enable_ssl, key] = ["127.0.0.1", 33333, false, '7522027ccf5a06b1'];
let websocket = new ftWebsocket();
websocket.onlogin = (ret, msg)=>{
if (ret) {
const req = {
c2s: {
security: {
market: QotMarket.QotMarket_HK_Security,
code: "00700",
},
},
};
websocket.GetShareholdersHolderDetail(req)
.then((res) => {
let { errCode, retMsg, retType,s2c } = res
console.log("GetShareholdersHolderDetail: errCode %d, retMsg %s, retType %d", errCode, retMsg, retType);
if(retType == RetType.RetType_Succeed){
let data = beautify(JSON.stringify(s2c), {
indent_size: 2,
space_in_empty_paren: true,
});
console.log(data);
}
})
.catch((error) => {
console.log("error:", error);
});
} else {
console.log("error", msg);
}
};
websocket.start(addr, port, enable_ssl, key);
setTimeout(()=>{
websocket.stop();
console.log("stop");
}, 5000);
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
- Output
GetShareholdersHolderDetail: errCode 0, retMsg , retType 0
{
"updateTime": "1778344379",
"updateTimeStr": "2026-05-10 00:32:59",
"nextKey": "10",
"itemList": [{
"periodText": "2026/Q1",
"holderId": "337488017",
"name": "Prosus Ventures N.V.",
"holderQuantity": "2079512000",
"holderQuantityChange": "-25741100",
"holderPct": 23.053,
"holderPctChange": -0.285,
"holdingDate": "1767110400",
"holdingDateStr": "2025-12-31",
"closePrice": 599,
"priceChangePct": -0.1666,
"sourceGroupName": "Annual Report"
//...
}]
}
stop
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
API制限
- 30秒以内に最大30回リクエスト可能。
- 香港株、米国株の正株およびファンドに対応。
- ページネーションに対応;デフォルトのページサイズは 10;ページネーションキーは文字列型。
- Python
- Proto
- C#
- Java
- C++
- JavaScript
get_shareholders_holder_detail(code, request_type=None, next_key=None, num=None, sort_column=None, sort_type=None, period_id=None, holder_id=None)
説明
指定銘柄の指定保有者タイプの持株明細リストを取得します。ページネーションに対応しています
パラメータ
パラメータ 型 説明 code str 銘柄コード 例:US.AAPL;香港株、米国株の正株およびファンドに対応request_type HolderDetailType 保有者タイプ 0=デフォルト,1000=全部,1=その他機関,2=伝統的投資マネージャー,3=ヘッジファンド,4=ベンチャー/プライベートエクイティ,5=企業年金,6=財団ファンド,7=保険会社,8=銀行/投資銀行,9=ファミリーオフィス/トラスト,10=政府系ファンド,11=REIT,12=ストラクチャードファイナンスマネージャー,13=労組年金,14=政府年金,15=基金,100=個人,200=ADS,300=上場企業,400=非上場企業,500=国有株;デフォルトはサーバー側ロジックによるnext_key str ページネーションキー 初回はなし;続きを取得する場合は前回返された next_key を渡す;"-1" はデータなしを意味するnum int 1ページあたりの件数 デフォルト 10、範囲 1~50sort_column SortField ソートフィールド 61=保有株数(デフォルト),62=持株変動数sort_type SortType ソート方向 1=降順(デフォルト),2=昇順period_id int 報告期 ID GetShareholdersOverview(3237)が返す holdingPeriodList の periodId と対応;デフォルト 0 は最新期holder_id int 保有者 ID フィルター デフォルト 0 はフィルターなし;GetShareholdersOverview(3237)、GetShareholdersHoldingChanges(3238)、本プロトコル(3239)、GetInsiderHolderList(3241)、GetInsiderTradeList(3242)から取得可能戻り値
パラメータ 型 説明 ret RET_CODE API呼び出し結果 data pd.DataFrame ret == RET_OK の場合、持株明細の DataFrame を返します str ret != RET_OK の場合、エラーの説明を返します DataFrame フィールド説明:
フィールド 型 説明 update_time_str str データ更新時刻 形式:YYYY-MM-DD HH:MM:SS、対応市場タイムゾーンnext_key str ページネーションキー "-1" はデータなしを意味する;次のリクエストの next_key パラメータにそのまま渡すperiod_text str 報告期 例:"2026/Q1"holder_id int 保有者 ID 他の株主関連プロトコルの holder_id フィルターとして使用可能name str 保有者名 holder_quantity int 保有株数合計 単位:株holder_quantity_change int 持株変動数 単位:株;正値は増加、負値は減少holder_pct float 持株比率 パーセント記号の前の値、例:12.34 は 12.34% を意味するholder_pct_change float 持株変動比率 パーセント記号の前の値、例:12.34 は 12.34% の変動を意味する;負値は減少holding_date_str str 保有日付 形式:YYYY-MM-DD、香港時区close_price float 保有日付の終値 保有日付に対応する実際の終値price_change_pct float 株価変動比率 パーセント記号の前の値、例:-0.4467 は -0.4467% を意味するsource_group_name str データソース 持株明細の開示元、例:"13F"、"13F Summary" など
Example
from moomoo import *
quote_ctx = OpenQuoteContext(host='127.0.0.1', port=11111)
ret, data = quote_ctx.get_shareholders_holder_detail("HK.00700", request_type=1000)
if ret == RET_OK:
print(data[['period_text', 'name', 'holder_quantity', 'holder_pct', 'holder_pct_change']].to_string(index=False))
print('next_key:', data.attrs.get('next_key', '-1'))
else:
print('error:', data)
quote_ctx.close()
2
3
4
5
6
7
8
9
10
- Output
period_text name holder_quantity holder_pct holder_pct_change
2026/Q1 Prosus Ventures N.V. 2079512000 23.053 -0.285
2026/Q1 Huateng Ma 709859700 7.869 0.000
2026/Q1 The Vanguard 268596433 2.977 0.031
2026/Q1 BlackRock 240834898 2.669 0.088
2026/Q1 Norges Bank Investment Management 122744699 1.360 -0.083
2026/Q1 FMR 86765121 0.961 -0.232
2026/Q1 Capital Research 85568118 0.948 0.024
2026/Q1 J.P. Morgan Asset Management, Inc. 62437911 0.692 -0.025
2026/Q1 E Fund Management Co., Ltd. 52722677 0.584 0.000
2026/Q1 Baillie Gifford 35674108 0.395 0.020
next_key: 10
2
3
4
5
6
7
8
9
10
11
12
# Qot_GetShareholdersHolderDetail.proto
説明
株主持株明細を取得します
パラメータ
message C2S
{
required Qot_Common.Security security = 1;
optional Qot_Common.HolderDetailType requestType = 2; // リクエストデータタイプ、Qot_Common.HolderDetailType を参照;デフォルトはサーバー側ロジックによる
optional string nextKey = 3; // ページネーションキー;初回は不要、続き取得時は前回の nextKey を渡す;"-1" はデータなしを意味する
optional int32 num = 4; // 1ページあたりの件数、デフォルト 10、範囲 1~50
optional Qot_Common.SortField sortColumn = 5; // ソートフィールド、Qot_Common.SortField 参照:61=保有株数(デフォルト)62=持株変動数
optional Qot_Common.SortType sortType = 6; // ソート方向、Qot_Common.SortType 定義を参照、デフォルト降順
optional int32 periodId = 7; // 報告期 ID;GetShareholdersOverview(3237)が返す holdingPeriodList の periodId と対応;デフォルト 0 は最新期
optional int32 holderId = 8; // 保有者 ID フィルター;デフォルト 0 はフィルターなし;GetShareholdersOverview(3237)、GetShareholdersHoldingChanges(3238)、本プロトコル(3239)、GetInsiderHolderList(3241)、GetInsiderTradeList(3242)から取得可能
}
message Request
{
required C2S c2s = 1;
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
- Security 構造については Security を参照
- 保有者詳細タイプについては HolderDetailType を参照
- 戻り値
message OwnershipDetailItem
{
optional string periodText = 1; // 報告期、例:"2025/Q3"
optional uint64 holderId = 2; // 保有者 ID
optional string name = 3; // 保有者名
optional int64 holderQuantity = 4; // 保有株数合計(単位:株)
optional int64 holderQuantityChange = 5; // 持株変動数(単位:株;正値=増加、負値=減少)
optional double holderPct = 6; // 持株比率、パーセント記号前の値、例:12.34 は 12.34% を意味する
optional double holderPctChange = 7; // 持株変動比率、パーセント記号前の値、例:12.34 は 12.34% の変動を意味する;負値は減少
optional uint64 holdingDate = 8; // 保有日タイムスタンプ(秒)
optional string holdingDateStr = 9; // 保有日文字列、形式:YYYY-MM-DD、香港時区
optional double closePrice = 10; // 保有日付の終値(実際の価格)
optional double priceChangePct = 11; // 保有日付の株価変動比率、例:-0.4467 は -0.4467% を意味する
optional string sourceGroupName = 12; // 持株明細の開示元(例:13F、複数申告など)
}
message S2C
{
optional uint64 updateTime = 1; // データ更新タイムスタンプ(秒)
optional string updateTimeStr = 2; // データ更新時刻文字列、形式:YYYY-MM-DD HH:MM:SS、対応市場タイムゾーン
optional string nextKey = 3; // ページネーションキー;"-1" はデータなしを意味する
repeated OwnershipDetailItem itemList = 4;
}
message Response
{
required int32 retType = 1 [default = -400]; // 返回結果、Common.RetType を参照
optional string retMsg = 2; // 返回結果説明
optional int32 errCode = 3; // エラーコード
optional S2C s2c = 4;
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
- API呼び出し結果の構造については RetType を参照
- 株主持株明細の保有者タイプについては HolderDetailType を参照
プロトコル ID
3239
uint GetShareholdersHolderDetail(QotGetShareholdersHolderDetail.Request req);
virtual void OnReply_GetShareholdersHolderDetail(MMAPI_Conn client, uint nSerialNo, QotGetShareholdersHolderDetail.Response rsp);
説明
株主持株明細を取得します
パラメータ
message C2S
{
required Qot_Common.Security security = 1;
optional Qot_Common.HolderDetailType requestType = 2; // リクエストデータタイプ、Qot_Common.HolderDetailType を参照;デフォルトはサーバー側ロジックによる
optional string nextKey = 3; // ページネーションキー;初回は不要、続き取得時は前回の nextKey を渡す;"-1" はデータなしを意味する
optional int32 num = 4; // 1ページあたりの件数、デフォルト 10、範囲 1~50
optional Qot_Common.SortField sortColumn = 5; // ソートフィールド、Qot_Common.SortField 参照:61=保有株数(デフォルト)62=持株変動数
optional Qot_Common.SortType sortType = 6; // ソート方向、Qot_Common.SortType 定義を参照、デフォルト降順
optional int32 periodId = 7; // 報告期 ID;GetShareholdersOverview(3237)が返す holdingPeriodList の periodId と対応;デフォルト 0 は最新期
optional int32 holderId = 8; // 保有者 ID フィルター;デフォルト 0 はフィルターなし;GetShareholdersOverview(3237)、GetShareholdersHoldingChanges(3238)、本プロトコル(3239)、GetInsiderHolderList(3241)、GetInsiderTradeList(3242)から取得可能
}
message Request
{
required C2S c2s = 1;
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
- Security 構造については Security を参照
- 戻り値
message OwnershipDetailItem
{
optional string periodText = 1; // 報告期、例:"2025/Q3"
optional uint64 holderId = 2; // 保有者 ID
optional string name = 3; // 保有者名
optional int64 holderQuantity = 4; // 保有株数合計(単位:株)
optional int64 holderQuantityChange = 5; // 持株変動数(単位:株;正値=増加、負値=減少)
optional double holderPct = 6; // 持株比率、パーセント記号前の値、例:12.34 は 12.34% を意味する
optional double holderPctChange = 7; // 持株変動比率、パーセント記号前の値、例:12.34 は 12.34% の変動を意味する;負値は減少
optional uint64 holdingDate = 8; // 保有日タイムスタンプ(秒)
optional string holdingDateStr = 9; // 保有日文字列、形式:YYYY-MM-DD、香港時区
optional double closePrice = 10; // 保有日付の終値(実際の価格)
optional double priceChangePct = 11; // 保有日付の株価変動比率、例:-0.4467 は -0.4467% を意味する
optional string sourceGroupName = 12; // 持株明細の開示元(例:13F、複数申告など)
}
message S2C
{
optional uint64 updateTime = 1; // データ更新タイムスタンプ(秒)
optional string updateTimeStr = 2; // データ更新時刻文字列、形式:YYYY-MM-DD HH:MM:SS、対応市場タイムゾーン
optional string nextKey = 3; // ページネーションキー;"-1" はデータなしを意味する
repeated OwnershipDetailItem itemList = 4;
}
message Response
{
required int32 retType = 1 [default = -400]; // 返回結果、Common.RetType を参照
optional string retMsg = 2; // 返回結果説明
optional int32 errCode = 3; // エラーコード
optional S2C s2c = 4;
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
- API呼び出し結果の構造については RetType を参照
- Example
public class Program : MMSPI_Qot, MMSPI_Conn
{
MMAPI_Qot qot = new MMAPI_Qot();
public Program()
{
qot.SetClientInfo("csharp", 1);
qot.SetConnCallback(this);
qot.SetQotCallback(this);
}
public void Start()
{
qot.InitConnect("127.0.0.1", (ushort)11111, false);
}
public void OnInitConnect(MMAPI_Conn client, long errCode, String desc)
{
Console.Write("Qot onInitConnect: ret={0} desc={1} connID={2}\n", errCode, desc, client.GetConnectID());
if (errCode != 0)
return;
QotCommon.Security sec = QotCommon.Security.CreateBuilder()
.SetMarket((int)QotCommon.QotMarket.QotMarket_HK_Security)
.SetCode("00700")
.Build();
QotGetShareholdersHolderDetail.C2S c2s = QotGetShareholdersHolderDetail.C2S.CreateBuilder()
.SetSecurity(sec)
.Build();
QotGetShareholdersHolderDetail.Request req = QotGetShareholdersHolderDetail.Request.CreateBuilder().SetC2S(c2s).Build();
uint seqNo = qot.GetShareholdersHolderDetail(req);
Console.Write("Send QotGetShareholdersHolderDetail: {0}\n", seqNo);
}
public void OnDisconnect(MMAPI_Conn client, long errCode)
{
Console.Write("Qot onDisConnect: {0}\n", errCode);
}
public void OnReply_GetShareholdersHolderDetail(MMAPI_Conn client, uint nSerialNo, QotGetShareholdersHolderDetail.Response rsp)
{
Console.Write("Reply: QotGetShareholdersHolderDetail: {0} {1}\n", nSerialNo, rsp.ToString());
}
public static void Main(String[] args)
{
MMAPI.Init();
Program qot = new Program();
qot.Start();
while (true)
Thread.Sleep(1000 * 600);
}
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
- Output
sent seqNo=3
retType: 0
retMsg: ""
errCode: 0
s2c {
updateTime: 1778344379
updateTimeStr: "2026-05-10 00:32:59"
nextKey: "10"
itemList {
periodText: "2026/Q1"
holderId: 337488017
name: "Prosus Ventures N.V."
holderQuantity: 2079512000
holderQuantityChange: -25741100
holderPct: 23.053
holderPctChange: -0.285
holdingDate: 1767110400
holdingDateStr: "2025-12-31"
closePrice: 599
priceChangePct: -0.1666
sourceGroupName: "Annual Report"
}
itemList {
//...
}
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
int getShareholdersHolderDetail(QotGetShareholdersHolderDetail.Request req);
void onReply_GetShareholdersHolderDetail(MMAPI_Conn client, int nSerialNo, QotGetShareholdersHolderDetail.Response rsp);
説明
株主持株明細を取得します
パラメータ
message C2S
{
required Qot_Common.Security security = 1;
optional Qot_Common.HolderDetailType requestType = 2; // リクエストデータタイプ、Qot_Common.HolderDetailType を参照;デフォルトはサーバー側ロジックによる
optional string nextKey = 3; // ページネーションキー;初回は不要、続き取得時は前回の nextKey を渡す;"-1" はデータなしを意味する
optional int32 num = 4; // 1ページあたりの件数、デフォルト 10、範囲 1~50
optional Qot_Common.SortField sortColumn = 5; // ソートフィールド、Qot_Common.SortField 参照:61=保有株数(デフォルト)62=持株変動数
optional Qot_Common.SortType sortType = 6; // ソート方向、Qot_Common.SortType 定義を参照、デフォルト降順
optional int32 periodId = 7; // 報告期 ID;GetShareholdersOverview(3237)が返す holdingPeriodList の periodId と対応;デフォルト 0 は最新期
optional int32 holderId = 8; // 保有者 ID フィルター;デフォルト 0 はフィルターなし;GetShareholdersOverview(3237)、GetShareholdersHoldingChanges(3238)、本プロトコル(3239)、GetInsiderHolderList(3241)、GetInsiderTradeList(3242)から取得可能
}
message Request
{
required C2S c2s = 1;
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
- Security 構造については Security を参照
- 戻り値
message OwnershipDetailItem
{
optional string periodText = 1; // 報告期、例:"2025/Q3"
optional uint64 holderId = 2; // 保有者 ID
optional string name = 3; // 保有者名
optional int64 holderQuantity = 4; // 保有株数合計(単位:株)
optional int64 holderQuantityChange = 5; // 持株変動数(単位:株;正値=増加、負値=減少)
optional double holderPct = 6; // 持株比率、パーセント記号前の値、例:12.34 は 12.34% を意味する
optional double holderPctChange = 7; // 持株変動比率、パーセント記号前の値、例:12.34 は 12.34% の変動を意味する;負値は減少
optional uint64 holdingDate = 8; // 保有日タイムスタンプ(秒)
optional string holdingDateStr = 9; // 保有日文字列、形式:YYYY-MM-DD、香港時区
optional double closePrice = 10; // 保有日付の終値(実際の価格)
optional double priceChangePct = 11; // 保有日付の株価変動比率、例:-0.4467 は -0.4467% を意味する
optional string sourceGroupName = 12; // 持株明細の開示元(例:13F、複数申告など)
}
message S2C
{
optional uint64 updateTime = 1; // データ更新タイムスタンプ(秒)
optional string updateTimeStr = 2; // データ更新時刻文字列、形式:YYYY-MM-DD HH:MM:SS、対応市場タイムゾーン
optional string nextKey = 3; // ページネーションキー;"-1" はデータなしを意味する
repeated OwnershipDetailItem itemList = 4;
}
message Response
{
required int32 retType = 1 [default = -400]; // 返回結果、Common.RetType を参照
optional string retMsg = 2; // 返回結果説明
optional int32 errCode = 3; // エラーコード
optional S2C s2c = 4;
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
- API呼び出し結果の構造については RetType を参照
- Example
public class QotDemo implements MMSPI_Qot, MMSPI_Conn {
MMAPI_Conn_Qot qot = new MMAPI_Conn_Qot();
public QotDemo() {
qot.setClientInfo("javaclient", 1);
qot.setConnSpi(this);
qot.setQotSpi(this);
}
public void start() {
qot.initConnect("127.0.0.1", (short)11111, false);
}
@Override
public void onInitConnect(MMAPI_Conn client, long errCode, String desc)
{
System.out.printf("Qot onInitConnect: ret=%b desc=%s connID=%d\n", errCode, desc, client.getConnectID());
if (errCode != 0)
return;
QotCommon.Security sec = QotCommon.Security.newBuilder()
.setMarket(QotCommon.QotMarket.QotMarket_HK_Security_VALUE)
.setCode("00700")
.build();
QotGetShareholdersHolderDetail.C2S c2s = QotGetShareholdersHolderDetail.C2S.newBuilder()
.setSecurity(sec)
.build();
QotGetShareholdersHolderDetail.Request req = QotGetShareholdersHolderDetail.Request.newBuilder().setC2S(c2s).build();
int seqNo = qot.getShareholdersHolderDetail(req);
System.out.printf("Send QotGetShareholdersHolderDetail: %d\n", seqNo);
}
@Override
public void onDisconnect(MMAPI_Conn client, long errCode) {
System.out.printf("Qot onDisConnect: %d\n", errCode);
}
@Override
public void onReply_GetShareholdersHolderDetail(MMAPI_Conn client, int nSerialNo, QotGetShareholdersHolderDetail.Response rsp) {
if (rsp.getRetType() != 0) {
System.out.printf("QotGetShareholdersHolderDetail failed: %s\n", rsp.getRetMsg());
}
else {
try {
String json = JsonFormat.printer().print(rsp);
System.out.printf("Receive QotGetShareholdersHolderDetail: %s\n", json);
} catch (InvalidProtocolBufferException e) {
e.printStackTrace();
}
}
}
public static void main(String[] args) {
MMAPI.init();
QotDemo qot = new QotDemo();
qot.start();
while (true) {
try {
Thread.sleep(1000 * 600);
} catch (InterruptedException exc) {
}
}
}
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
- Output
Qot onInitConnect: ret=0 desc= connID=7459212646576371604
Send Qot_GetShareholdersHolderDetail: 2
Receive Qot_GetShareholdersHolderDetail: retType: 0
retMsg: ""
errCode: 0
s2c {
updateTime: 1778344379
updateTimeStr: "2026-05-10 00:32:59"
nextKey: "10"
itemList {
periodText: "2026/Q1"
holderId: 337488017
name: "Prosus Ventures N.V."
holderQuantity: 2079512000
holderQuantityChange: -25741100
holderPct: 23.053
holderPctChange: -0.285
holdingDate: 1767110400
holdingDateStr: "2025-12-31"
closePrice: 599.0
priceChangePct: -0.1666
sourceGroupName: "Annual Report"
}
itemList {
//...
}
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
moomoo::u32_t GetShareholdersHolderDetail(const Qot_GetShareholdersHolderDetail::Request &stReq);
virtual void OnReply_GetShareholdersHolderDetail(moomoo::u32_t nSerialNo, const Qot_GetShareholdersHolderDetail::Response &stRsp) = 0;
説明
株主持株明細を取得します
パラメータ
message C2S
{
required Qot_Common.Security security = 1;
optional Qot_Common.HolderDetailType requestType = 2; // リクエストデータタイプ、Qot_Common.HolderDetailType を参照;デフォルトはサーバー側ロジックによる
optional string nextKey = 3; // ページネーションキー;初回は不要、続き取得時は前回の nextKey を渡す;"-1" はデータなしを意味する
optional int32 num = 4; // 1ページあたりの件数、デフォルト 10、範囲 1~50
optional Qot_Common.SortField sortColumn = 5; // ソートフィールド、Qot_Common.SortField 参照:61=保有株数(デフォルト)62=持株変動数
optional Qot_Common.SortType sortType = 6; // ソート方向、Qot_Common.SortType 定義を参照、デフォルト降順
optional int32 periodId = 7; // 報告期 ID;GetShareholdersOverview(3237)が返す holdingPeriodList の periodId と対応;デフォルト 0 は最新期
optional int32 holderId = 8; // 保有者 ID フィルター;デフォルト 0 はフィルターなし;GetShareholdersOverview(3237)、GetShareholdersHoldingChanges(3238)、本プロトコル(3239)、GetInsiderHolderList(3241)、GetInsiderTradeList(3242)から取得可能
}
message Request
{
required C2S c2s = 1;
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
- Security 構造については Security を参照
- 戻り値
message OwnershipDetailItem
{
optional string periodText = 1; // 報告期、例:"2025/Q3"
optional uint64 holderId = 2; // 保有者 ID
optional string name = 3; // 保有者名
optional int64 holderQuantity = 4; // 保有株数合計(単位:株)
optional int64 holderQuantityChange = 5; // 持株変動数(単位:株;正値=増加、負値=減少)
optional double holderPct = 6; // 持株比率、パーセント記号前の値、例:12.34 は 12.34% を意味する
optional double holderPctChange = 7; // 持株変動比率、パーセント記号前の値、例:12.34 は 12.34% の変動を意味する;負値は減少
optional uint64 holdingDate = 8; // 保有日タイムスタンプ(秒)
optional string holdingDateStr = 9; // 保有日文字列、形式:YYYY-MM-DD、香港時区
optional double closePrice = 10; // 保有日付の終値(実際の価格)
optional double priceChangePct = 11; // 保有日付の株価変動比率、例:-0.4467 は -0.4467% を意味する
optional string sourceGroupName = 12; // 持株明細の開示元(例:13F、複数申告など)
}
message S2C
{
optional uint64 updateTime = 1; // データ更新タイムスタンプ(秒)
optional string updateTimeStr = 2; // データ更新時刻文字列、形式:YYYY-MM-DD HH:MM:SS、対応市場タイムゾーン
optional string nextKey = 3; // ページネーションキー;"-1" はデータなしを意味する
repeated OwnershipDetailItem itemList = 4;
}
message Response
{
required int32 retType = 1 [default = -400]; // 返回結果、Common.RetType を参照
optional string retMsg = 2; // 返回結果説明
optional int32 errCode = 3; // エラーコード
optional S2C s2c = 4;
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
- API呼び出し結果の構造については RetType を参照
- Example
class Program : public MMSPI_Qot, public MMSPI_Trd, public MMSPI_Conn
{
public:
Program() {
m_pQotApi = MMAPI::CreateQotApi();
m_pQotApi->RegisterQotSpi(this);
m_pQotApi->RegisterConnSpi(this);
}
~Program() {
if (m_pQotApi != nullptr)
{
m_pQotApi->UnregisterQotSpi();
m_pQotApi->UnregisterConnSpi();
MMAPI::ReleaseQotApi(m_pQotApi);
m_pQotApi = nullptr;
}
}
void Start() {
m_pQotApi->InitConnect("127.0.0.1", 11111, false);
}
virtual void OnInitConnect(MMAPI_Conn* pConn, moomoo::i64_t nErrCode, const char* strDesc) {
cout << "connect" << endl;
// construct request message
Qot_GetShareholdersHolderDetail::Request req;
Qot_GetShareholdersHolderDetail::C2S *c2s = req.mutable_c2s();
Qot_Common::Security *sec = c2s->mutable_security();
sec->set_code("00700");
sec->set_market(Qot_Common::QotMarket::QotMarket_HK_Security);
m_pQotApi->GetShareholdersHolderDetail(req);
cout << "GetShareholdersHolderDetail" << endl;
}
virtual void OnReply_GetShareholdersHolderDetail(moomoo::u32_t nSerialNo, const Qot_GetShareholdersHolderDetail::Response &stRsp){
cout << "OnReply_GetShareholdersHolderDetail:" << endl;
// print response
// ProtoBufToBodyData and UTF8ToLocal refer to tool.h in Samples
string resp_str;
ProtoBufToBodyData(stRsp, resp_str);
cout << UTF8ToLocal(resp_str) << endl;
}
protected:
MMAPI_Qot *m_pQotApi;
};
int32_t main(int32_t argc, char** argv)
{
MMAPI::Init();
{
Program program;
program.Start();
getchar();
}
protobuf::ShutdownProtobufLibrary();
MMAPI::UnInit();
return 0;
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
- Output
onInitConnect: ret=0 desc=Succeed!
Send Qot_GetShareholdersHolderDetail seqNo=3
retType: 0
retMsg: ""
errCode: 0
s2c {
updateTime: 1778344379
updateTimeStr: "2026-05-10 00:32:59"
nextKey: "10"
itemList {
periodText: "2026/Q1"
holderId: 337488017
name: "Prosus Ventures N.V."
holderQuantity: 2079512000
holderQuantityChange: -25741100
holderPct: 23.053
holderPctChange: -0.285
holdingDate: 1767110400
holdingDateStr: "2025-12-31"
closePrice: 599
priceChangePct: -0.1666
sourceGroupName: "Annual Report"
}
itemList {
//...
}
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
GetShareholdersHolderDetail(req);
説明
株主持株明細を取得します
パラメータ
message C2S
{
required Qot_Common.Security security = 1;
optional Qot_Common.HolderDetailType requestType = 2; // リクエストデータタイプ、Qot_Common.HolderDetailType を参照;デフォルトはサーバー側ロジックによる
optional string nextKey = 3; // ページネーションキー;初回は不要、続き取得時は前回の nextKey を渡す;"-1" はデータなしを意味する
optional int32 num = 4; // 1ページあたりの件数、デフォルト 10、範囲 1~50
optional Qot_Common.SortField sortColumn = 5; // ソートフィールド、Qot_Common.SortField 参照:61=保有株数(デフォルト)62=持株変動数
optional Qot_Common.SortType sortType = 6; // ソート方向、Qot_Common.SortType 定義を参照、デフォルト降順
optional int32 periodId = 7; // 報告期 ID;GetShareholdersOverview(3237)が返す holdingPeriodList の periodId と対応;デフォルト 0 は最新期
optional int32 holderId = 8; // 保有者 ID フィルター;デフォルト 0 はフィルターなし;GetShareholdersOverview(3237)、GetShareholdersHoldingChanges(3238)、本プロトコル(3239)、GetInsiderHolderList(3241)、GetInsiderTradeList(3242)から取得可能
}
message Request
{
required C2S c2s = 1;
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
- Security 構造については Security を参照
- 戻り値
message OwnershipDetailItem
{
optional string periodText = 1; // 報告期、例:"2025/Q3"
optional uint64 holderId = 2; // 保有者 ID
optional string name = 3; // 保有者名
optional int64 holderQuantity = 4; // 保有株数合計(単位:株)
optional int64 holderQuantityChange = 5; // 持株変動数(単位:株;正値=増加、負値=減少)
optional double holderPct = 6; // 持株比率、パーセント記号前の値、例:12.34 は 12.34% を意味する
optional double holderPctChange = 7; // 持株変動比率、パーセント記号前の値、例:12.34 は 12.34% の変動を意味する;負値は減少
optional uint64 holdingDate = 8; // 保有日タイムスタンプ(秒)
optional string holdingDateStr = 9; // 保有日文字列、形式:YYYY-MM-DD、香港時区
optional double closePrice = 10; // 保有日付の終値(実際の価格)
optional double priceChangePct = 11; // 保有日付の株価変動比率、例:-0.4467 は -0.4467% を意味する
optional string sourceGroupName = 12; // 持株明細の開示元(例:13F、複数申告など)
}
message S2C
{
optional uint64 updateTime = 1; // データ更新タイムスタンプ(秒)
optional string updateTimeStr = 2; // データ更新時刻文字列、形式:YYYY-MM-DD HH:MM:SS、対応市場タイムゾーン
optional string nextKey = 3; // ページネーションキー;"-1" はデータなしを意味する
repeated OwnershipDetailItem itemList = 4;
}
message Response
{
required int32 retType = 1 [default = -400]; // 返回結果、Common.RetType を参照
optional string retMsg = 2; // 返回結果説明
optional int32 errCode = 3; // エラーコード
optional S2C s2c = 4;
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
- API呼び出し結果の構造については RetType を参照
- Example
import mmWebsocket from "moomoo-api";
import { Common, Qot_Common } from "moomoo-api/proto";
import beautify from "js-beautify";
function QotGetShareholdersHolderDetail(){
const { RetType } = Common
const { QotMarket } = Qot_Common
let [addr, port, enable_ssl, key] = ["127.0.0.1", 33333, false, '7522027ccf5a06b1'];
let websocket = new mmWebsocket();
websocket.onlogin = (ret, msg)=>{
if (ret) {
const req = {
c2s: {
security: {
market: QotMarket.QotMarket_HK_Security,
code: "00700",
},
},
};
websocket.GetShareholdersHolderDetail(req)
.then((res) => {
let { errCode, retMsg, retType,s2c } = res
console.log("GetShareholdersHolderDetail: errCode %d, retMsg %s, retType %d", errCode, retMsg, retType);
if(retType == RetType.RetType_Succeed){
let data = beautify(JSON.stringify(s2c), {
indent_size: 2,
space_in_empty_paren: true,
});
console.log(data);
}
})
.catch((error) => {
console.log("error:", error);
});
} else {
console.log("error", msg);
}
};
websocket.start(addr, port, enable_ssl, key);
setTimeout(()=>{
websocket.stop();
console.log("stop");
}, 5000);
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
- Output
GetShareholdersHolderDetail: errCode 0, retMsg , retType 0
{
"updateTime": "1778344379",
"updateTimeStr": "2026-05-10 00:32:59",
"nextKey": "10",
"itemList": [{
"periodText": "2026/Q1",
"holderId": "337488017",
"name": "Prosus Ventures N.V.",
"holderQuantity": "2079512000",
"holderQuantityChange": "-25741100",
"holderPct": 23.053,
"holderPctChange": -0.285,
"holdingDate": "1767110400",
"holdingDateStr": "2025-12-31",
"closePrice": 599,
"priceChangePct": -0.1666,
"sourceGroupName": "Annual Report"
//...
}]
}
stop
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
API制限
- 30秒以内に最大30回リクエスト可能。
- 香港株、米国株の正株およびファンドに対応。
- ページネーションに対応;デフォルトのページサイズは 10;ページネーションキーは文字列型。