# Get Earnings Calendar
- Python
- Proto
- C#
- Java
- C++
- JavaScript
get_earnings_calendar(market, sort_type=None, begin_date=None, end_date=None, filter_list=None)
Description
Get earnings calendar, returning a list of stocks in a specified market that are about to or have already released earnings reports within a given date range, including earnings date, actual and estimated values for EPS/revenue/EBIT, option implied volatility, and other information.
Parameters
Parameter Type Description market Market Market type (required) sort_type EarningsCalendarSortType Sort type (default Hot) begin_date str Start date, format "yyyy-MM-dd", defaults to today if not provided (fetches only that day) end_date str End date, format "yyyy-MM-dd", if not provided only fetches beginDate; interval with beginDate must not exceed 7 days filter_list list[ EarningsCalendarFilter]Filter condition list (multiple conditions are AND-combined) Input Limits
filter_listFilter Conditions(EarningsCalendarFilter):Construct filter conditions via
EarningsCalendarFilter, supporting two filter modes:Constructor Parameter Description indicator_typeFilter indicator type ( EarningsCalendarIndicatorType, required)value_listExact value list (for enum-type filters such as release type, indicator type, stock list type) interval_min/interval_maxMin/max value for range filter min_inclusive/max_inclusiveWhether range boundaries are inclusive (default True)
Return
Parameter Type Description ret RET_CODE API call result data pd.DataFrame When ret == RET_OK, returns data str When ret != RET_OK, returns error description - Data format:
Field Type Description security str Stock code (e.g. 'US.AAPL')name str Stock name earnings_date str Earnings date ("yyyy-MM-dd") earnings_timestamp float Earnings release timestamp (Unix seconds) pub_type str Publish type (BEFORE=pre-market / AFTER=after-hours / REGULAR=intraday) period_text str Fiscal period (e.g. '2025Q1')eps_actual float EPS actual value (available when published) eps_predict float EPS estimated value revenue_actual float Total revenue actual value (available when published) revenue_predict float Total revenue estimated value ebit_actual float EBIT actual value (available when published) ebit_predict float EBIT estimated value option_volume int Option volume (HK/US stocks only) iv float Implied volatility (%) (HK/US stocks only) iv_rank float IV rank (%) (HK/US stocks only) iv_percentile float IV percentile (%) (HK/US stocks only) market_cap float Real-time market cap price float Latest price
- Data format:
Example
from futu import *
quote_ctx = OpenQuoteContext(host='127.0.0.1', port=11111)
ret, data = quote_ctx.get_earnings_calendar(market=Market.US)
if ret == RET_OK:
print(data.head(2))
else:
print('error:', data)
quote_ctx.close()
2
3
4
5
6
7
8
9
10
11
- Output
security name earnings_date earnings_timestamp pub_type period_text eps_actual eps_predict revenue_actual revenue_predict ebit_actual ebit_predict option_volume iv iv_rank iv_percentile market_cap price
0 US.MU 美光科技 2026-06-24 1.782331e+09 AFTER 2026Q3 N/A 20.8654 N/A 35251836320.0 N/A 26879423830.0 633420 113.795 97.754 98.015 1.186117e+12 1051.77
1 US.PAYX 沛齐 2026-06-24 1.782308e+09 BEFORE 2026Q4 N/A 1.2167 N/A 1606293190.0 N/A 661853410.0 6603 42.209 85.862 93.650 3.510892e+10 97.99
2
3
# Qot_GetEarningsCalendar.proto
Description
Get earnings calendar, returning a list of stocks in a specified market that are about to or have already released earnings reports within a given date range, including earnings date, actual and estimated values for EPS/revenue/EBIT, option implied volatility, and other information.
Parameters
// Earnings calendar sort type
enum EarningsCalendarSortType {
EarningsCalendarSortType_Unknown = 0; //Unknown
EarningsCalendarSortType_Hot = 1; //Popular (default)
EarningsCalendarSortType_MarketCap = 2; //Historical market cap
EarningsCalendarSortType_OptionVolume = 3; //Option volume (HK/US stocks only)
EarningsCalendarSortType_IV = 4; //Implied volatility (HK/US stocks only)
EarningsCalendarSortType_IVRank = 5; //IV level (HK/US stocks only)
EarningsCalendarSortType_IVPercentile = 6; //IV percentile (HK/US stocks only)
EarningsCalendarSortType_RtMarketCap = 7; //Real-time market cap
}
// Earnings calendar publish type
enum EarningsCalendarPubType {
EarningsCalendarPubType_Unknown = -1; //Unknown
EarningsCalendarPubType_Regular = 0; //Intraday (period unidentified)
EarningsCalendarPubType_Before = 1; //Pre-market
EarningsCalendarPubType_After = 2; //After-hours
}
// Earnings indicator type
enum EarningsCalendarEstimateType {
EarningsCalendarEstimateType_Unknown = 0; //Unknown
EarningsCalendarEstimateType_EPS = 1; //Earnings per share (EPS GAAP)
EarningsCalendarEstimateType_Revenue = 2; //Total revenue
EarningsCalendarEstimateType_EBIT = 3; //EBIT
}
// Earnings period type
enum EarningsCalendarPeriodType {
EarningsCalendarPeriodType_Unknown = 0; //Unknown
EarningsCalendarPeriodType_Quarterly = 1; //Quarterly
EarningsCalendarPeriodType_SemiAnnual = 2; //Semi-annual
EarningsCalendarPeriodType_Annual = 3; //Annual
}
// Stock list type
enum EarningsCalendarStockListType {
EarningsCalendarStockListType_Unknown = 0; //Unknown
EarningsCalendarStockListType_Watchlist = 1; //Watchlist
EarningsCalendarStockListType_Position = 2; //Holding
EarningsCalendarStockListType_Special = 3; //Special attention
}
// Earnings calendar filter factor type
enum EarningsCalendarIndicatorType {
EarningsCalendarIndicatorType_Unknown = 0;
EarningsCalendarIndicatorType_PubType = 1; //[Exact value] Publish type (valueList, EarningsCalendarPubType)
EarningsCalendarIndicatorType_EstimateType = 2; //[Exact value] Indicator type (valueList, EarningsCalendarEstimateType)
EarningsCalendarIndicatorType_MarketCap = 3; //[Range] Market cap
EarningsCalendarIndicatorType_StockListType = 4; //[Exact value] Stock list type (valueList, EarningsCalendarStockListType)
EarningsCalendarIndicatorType_OptionVolume = 5; //[Range] Option volume (HK/US stocks only)
EarningsCalendarIndicatorType_IV = 6; //[Range] Implied volatility(%) (HK/US stocks only)
EarningsCalendarIndicatorType_IVRank = 7; //[Range] IV level(%) (HK/US stocks only)
EarningsCalendarIndicatorType_IVPercentile = 8; //[Range] IV percentile(%) (HK/US stocks only)
EarningsCalendarIndicatorType_RtMarketCap = 9; //[Range] Real-time market cap
}
// Earnings calendar filter conditions
message EarningsCalendarIndicator {
required int32 indicatorType = 1; // EarningsCalendarIndicatorType
optional Qot_OptionCommon.IndicatorValue indicatorValue = 2; // Filter conditions
}
// Earnings forecast data
message EstimateData {
optional int32 estimateType = 1; // EarningsCalendarEstimateType
optional double actualValue = 2; // Actual value (available when published)
optional double predictValue = 3; // Forecast value
optional string currency = 4; // Currency unit (ISO 4217)
optional int32 periodType = 5; // EarningsCalendarPeriodType
}
// Earnings calendar item
message EarningsCalendarItem {
required Qot_Common.Security security = 1; // Stock
optional string name = 2; // Stock name
optional string earningsDate = 3; // Earnings date ("yyyy-MM-dd")
optional double earningsTimestamp = 4; // Earnings report publish timestamp (seconds)
optional int32 pubType = 5; // EarningsCalendarPubType
optional string periodText = 7; // Fiscal period (e.g. "2025Q1")
repeated EstimateData estimateList = 8; // Forecast data list
// Option fields (HK/US stocks only)
optional int64 optionVolume = 10; // Option volume
optional double iv = 11; // Implied volatility(%)
optional double ivRank = 12; // IV level(%)
optional double ivPercentile = 13; // IV percentile(%)
// Quote field
optional double marketCap = 20; // Real-time market cap
optional double price = 21; // Last price
}
message C2S {
required int32 market = 1; // Qot_Common.QotMarket (supports HK/US/CNSH/CNSZ/SG/JP/AU/CA)
optional int32 sortType = 2; // EarningsCalendarSortType (default Hot)
optional string beginDate = 3; // Start date, format "yyyy-MM-dd", default today if omitted (fetch current day only)
optional string endDate = 4; // End date, format "yyyy-MM-dd", fetches beginDate only if omitted; max 7 days from beginDate
repeated EarningsCalendarIndicator filterList = 5; // Filter conditions (AND relationship)
}
message S2C {
repeated EarningsCalendarItem itemList = 1;
}
message Request {
required C2S c2s = 1;
}
message Response {
required int32 retType = 1 [default = -400]; //RetType, return result
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
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
Protocol ID
3401
uint GetEarningsCalendar(Qot_GetEarningsCalendar.Request req);
virtual void OnReply_GetEarningsCalendar(FTAPI_Conn client, uint nSerialNo, Qot_GetEarningsCalendar.Response rsp);
Description
Get earnings calendar, returning a list of stocks in a specified market that are about to or have already released earnings reports within a given date range, including earnings date, actual and estimated values for EPS/revenue/EBIT, option implied volatility, and other information.
Parameters
// Earnings calendar sort type
enum EarningsCalendarSortType {
EarningsCalendarSortType_Unknown = 0; //Unknown
EarningsCalendarSortType_Hot = 1; //Popular (default)
EarningsCalendarSortType_MarketCap = 2; //Historical market cap
EarningsCalendarSortType_OptionVolume = 3; //Option volume (HK/US stocks only)
EarningsCalendarSortType_IV = 4; //Implied volatility (HK/US stocks only)
EarningsCalendarSortType_IVRank = 5; //IV level (HK/US stocks only)
EarningsCalendarSortType_IVPercentile = 6; //IV percentile (HK/US stocks only)
EarningsCalendarSortType_RtMarketCap = 7; //Real-time market cap
}
// Earnings calendar publish type
enum EarningsCalendarPubType {
EarningsCalendarPubType_Unknown = -1; //Unknown
EarningsCalendarPubType_Regular = 0; //Intraday (period unidentified)
EarningsCalendarPubType_Before = 1; //Pre-market
EarningsCalendarPubType_After = 2; //After-hours
}
// Earnings indicator type
enum EarningsCalendarEstimateType {
EarningsCalendarEstimateType_Unknown = 0; //Unknown
EarningsCalendarEstimateType_EPS = 1; //Earnings per share (EPS GAAP)
EarningsCalendarEstimateType_Revenue = 2; //Total revenue
EarningsCalendarEstimateType_EBIT = 3; //EBIT
}
// Earnings period type
enum EarningsCalendarPeriodType {
EarningsCalendarPeriodType_Unknown = 0; //Unknown
EarningsCalendarPeriodType_Quarterly = 1; //Quarterly
EarningsCalendarPeriodType_SemiAnnual = 2; //Semi-annual
EarningsCalendarPeriodType_Annual = 3; //Annual
}
// Stock list type
enum EarningsCalendarStockListType {
EarningsCalendarStockListType_Unknown = 0; //Unknown
EarningsCalendarStockListType_Watchlist = 1; //Watchlist
EarningsCalendarStockListType_Position = 2; //Holding
EarningsCalendarStockListType_Special = 3; //Special attention
}
// Earnings calendar filter factor type
enum EarningsCalendarIndicatorType {
EarningsCalendarIndicatorType_Unknown = 0;
EarningsCalendarIndicatorType_PubType = 1; //[Exact value] Publish type (valueList, EarningsCalendarPubType)
EarningsCalendarIndicatorType_EstimateType = 2; //[Exact value] Indicator type (valueList, EarningsCalendarEstimateType)
EarningsCalendarIndicatorType_MarketCap = 3; //[Range] Market cap
EarningsCalendarIndicatorType_StockListType = 4; //[Exact value] Stock list type (valueList, EarningsCalendarStockListType)
EarningsCalendarIndicatorType_OptionVolume = 5; //[Range] Option volume (HK/US stocks only)
EarningsCalendarIndicatorType_IV = 6; //[Range] Implied volatility(%) (HK/US stocks only)
EarningsCalendarIndicatorType_IVRank = 7; //[Range] IV level(%) (HK/US stocks only)
EarningsCalendarIndicatorType_IVPercentile = 8; //[Range] IV percentile(%) (HK/US stocks only)
EarningsCalendarIndicatorType_RtMarketCap = 9; //[Range] Real-time market cap
}
// Earnings calendar filter conditions
message EarningsCalendarIndicator {
required int32 indicatorType = 1; // EarningsCalendarIndicatorType
optional Qot_OptionCommon.IndicatorValue indicatorValue = 2; // Filter conditions
}
// Earnings forecast data
message EstimateData {
optional int32 estimateType = 1; // EarningsCalendarEstimateType
optional double actualValue = 2; // Actual value (available when published)
optional double predictValue = 3; // Forecast value
optional string currency = 4; // Currency unit (ISO 4217)
optional int32 periodType = 5; // EarningsCalendarPeriodType
}
// Earnings calendar item
message EarningsCalendarItem {
required Qot_Common.Security security = 1; // Stock
optional string name = 2; // Stock name
optional string earningsDate = 3; // Earnings date ("yyyy-MM-dd")
optional double earningsTimestamp = 4; // Earnings report publish timestamp (seconds)
optional int32 pubType = 5; // EarningsCalendarPubType
optional string periodText = 7; // Fiscal period (e.g. "2025Q1")
repeated EstimateData estimateList = 8; // Forecast data list
// Option fields (HK/US stocks only)
optional int64 optionVolume = 10; // Option volume
optional double iv = 11; // Implied volatility(%)
optional double ivRank = 12; // IV level(%)
optional double ivPercentile = 13; // IV percentile(%)
// Quote field
optional double marketCap = 20; // Real-time market cap
optional double price = 21; // Last price
}
message C2S {
required int32 market = 1; // Qot_Common.QotMarket (supports HK/US/CNSH/CNSZ/SG/JP/AU/CA)
optional int32 sortType = 2; // EarningsCalendarSortType (default Hot)
optional string beginDate = 3; // Start date, format "yyyy-MM-dd", default today if omitted (fetch current day only)
optional string endDate = 4; // End date, format "yyyy-MM-dd", fetches beginDate only if omitted; max 7 days from beginDate
repeated EarningsCalendarIndicator filterList = 5; // Filter conditions (AND relationship)
}
message S2C {
repeated EarningsCalendarItem itemList = 1;
}
message Request {
required C2S c2s = 1;
}
message Response {
required int32 retType = 1 [default = -400]; //RetType, return result
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
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
- For interface result, refer to RetType
Protocol ID
3401
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}
", errCode, desc, client.GetConnectID());
if (errCode != 0)
return;
QotGetEarningsCalendar.C2S c2s = QotGetEarningsCalendar.C2S.CreateBuilder()
.SetBeginDate("2026-06-22")
.SetEndDate("2026-06-22")
.SetMarket(11)
.Build();
QotGetEarningsCalendar.Request req = QotGetEarningsCalendar.Request.CreateBuilder().SetC2S(c2s).Build();
uint seqNo = qot.GetEarningsCalendar(req);
Console.Write("Send QotGetEarningsCalendar: {0}
", seqNo);
}
public void OnDisconnect(FTAPI_Conn client, long errCode) {
Console.Write("Qot onDisConnect: {0}
", errCode);
}
public void OnReply_GetEarningsCalendar(FTAPI_Conn client, uint nSerialNo, QotGetEarningsCalendar.Response rsp)
{
Console.Write("Reply: QotGetEarningsCalendar: {0}
", nSerialNo);
if (rsp.RetType == 0 && rsp.HasS2C)
Console.Write("{0}
", rsp.ToString());
}
public static void Main(String[] args) {
FTAPI.Init();
Program program = new Program();
program.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
- Output
Send QotGetEarningsCalendar: 3
Reply: QotGetEarningsCalendar: 3
GetEarningsCalendar: errCode 0, retMsg , retType 0
{
"itemList": [
{ "security": { "market": 11, "code": "FRVO" }, "name": "FERVO ENERGY COMPANY", "earningsDate": "2026-06-22", "pubType": 1 },
{ "security": { "market": 11, "code": "BCKIY" }, "name": "BABCOCK INTERNATIONAL GROUP UNSP ADR", "earningsDate": "2026-06-22", "pubType": 0 },
{ "security": { "market": 11, "code": "POWW" }, "name": "Outdoor Holding", "earningsDate": "2026-06-22", "pubType": 1 }
]
}
2
3
4
5
6
7
8
9
10
int getEarningsCalendar(Qot_GetEarningsCalendar.Request req);
onReply_GetEarningsCalendar(FTAPI_Conn client, int nSerialNo, Qot_GetEarningsCalendar.Response rsp)
Description
Get earnings calendar, returning a list of stocks in a specified market that are about to or have already released earnings reports within a given date range, including earnings date, actual and estimated values for EPS/revenue/EBIT, option implied volatility, and other information.
Parameters
// Earnings calendar sort type
enum EarningsCalendarSortType {
EarningsCalendarSortType_Unknown = 0; //Unknown
EarningsCalendarSortType_Hot = 1; //Popular (default)
EarningsCalendarSortType_MarketCap = 2; //Historical market cap
EarningsCalendarSortType_OptionVolume = 3; //Option volume (HK/US stocks only)
EarningsCalendarSortType_IV = 4; //Implied volatility (HK/US stocks only)
EarningsCalendarSortType_IVRank = 5; //IV level (HK/US stocks only)
EarningsCalendarSortType_IVPercentile = 6; //IV percentile (HK/US stocks only)
EarningsCalendarSortType_RtMarketCap = 7; //Real-time market cap
}
// Earnings calendar publish type
enum EarningsCalendarPubType {
EarningsCalendarPubType_Unknown = -1; //Unknown
EarningsCalendarPubType_Regular = 0; //Intraday (period unidentified)
EarningsCalendarPubType_Before = 1; //Pre-market
EarningsCalendarPubType_After = 2; //After-hours
}
// Earnings indicator type
enum EarningsCalendarEstimateType {
EarningsCalendarEstimateType_Unknown = 0; //Unknown
EarningsCalendarEstimateType_EPS = 1; //Earnings per share (EPS GAAP)
EarningsCalendarEstimateType_Revenue = 2; //Total revenue
EarningsCalendarEstimateType_EBIT = 3; //EBIT
}
// Earnings period type
enum EarningsCalendarPeriodType {
EarningsCalendarPeriodType_Unknown = 0; //Unknown
EarningsCalendarPeriodType_Quarterly = 1; //Quarterly
EarningsCalendarPeriodType_SemiAnnual = 2; //Semi-annual
EarningsCalendarPeriodType_Annual = 3; //Annual
}
// Stock list type
enum EarningsCalendarStockListType {
EarningsCalendarStockListType_Unknown = 0; //Unknown
EarningsCalendarStockListType_Watchlist = 1; //Watchlist
EarningsCalendarStockListType_Position = 2; //Holding
EarningsCalendarStockListType_Special = 3; //Special attention
}
// Earnings calendar filter factor type
enum EarningsCalendarIndicatorType {
EarningsCalendarIndicatorType_Unknown = 0;
EarningsCalendarIndicatorType_PubType = 1; //[Exact value] Publish type (valueList, EarningsCalendarPubType)
EarningsCalendarIndicatorType_EstimateType = 2; //[Exact value] Indicator type (valueList, EarningsCalendarEstimateType)
EarningsCalendarIndicatorType_MarketCap = 3; //[Range] Market cap
EarningsCalendarIndicatorType_StockListType = 4; //[Exact value] Stock list type (valueList, EarningsCalendarStockListType)
EarningsCalendarIndicatorType_OptionVolume = 5; //[Range] Option volume (HK/US stocks only)
EarningsCalendarIndicatorType_IV = 6; //[Range] Implied volatility(%) (HK/US stocks only)
EarningsCalendarIndicatorType_IVRank = 7; //[Range] IV level(%) (HK/US stocks only)
EarningsCalendarIndicatorType_IVPercentile = 8; //[Range] IV percentile(%) (HK/US stocks only)
EarningsCalendarIndicatorType_RtMarketCap = 9; //[Range] Real-time market cap
}
// Earnings calendar filter conditions
message EarningsCalendarIndicator {
required int32 indicatorType = 1; // EarningsCalendarIndicatorType
optional Qot_OptionCommon.IndicatorValue indicatorValue = 2; // Filter conditions
}
// Earnings forecast data
message EstimateData {
optional int32 estimateType = 1; // EarningsCalendarEstimateType
optional double actualValue = 2; // Actual value (available when published)
optional double predictValue = 3; // Forecast value
optional string currency = 4; // Currency unit (ISO 4217)
optional int32 periodType = 5; // EarningsCalendarPeriodType
}
// Earnings calendar item
message EarningsCalendarItem {
required Qot_Common.Security security = 1; // Stock
optional string name = 2; // Stock name
optional string earningsDate = 3; // Earnings date ("yyyy-MM-dd")
optional double earningsTimestamp = 4; // Earnings report publish timestamp (seconds)
optional int32 pubType = 5; // EarningsCalendarPubType
optional string periodText = 7; // Fiscal period (e.g. "2025Q1")
repeated EstimateData estimateList = 8; // Forecast data list
// Option fields (HK/US stocks only)
optional int64 optionVolume = 10; // Option volume
optional double iv = 11; // Implied volatility(%)
optional double ivRank = 12; // IV level(%)
optional double ivPercentile = 13; // IV percentile(%)
// Quote field
optional double marketCap = 20; // Real-time market cap
optional double price = 21; // Last price
}
message C2S {
required int32 market = 1; // Qot_Common.QotMarket (supports HK/US/CNSH/CNSZ/SG/JP/AU/CA)
optional int32 sortType = 2; // EarningsCalendarSortType (default Hot)
optional string beginDate = 3; // Start date, format "yyyy-MM-dd", default today if omitted (fetch current day only)
optional string endDate = 4; // End date, format "yyyy-MM-dd", fetches beginDate only if omitted; max 7 days from beginDate
repeated EarningsCalendarIndicator filterList = 5; // Filter conditions (AND relationship)
}
message S2C {
repeated EarningsCalendarItem itemList = 1;
}
message Request {
required C2S c2s = 1;
}
message Response {
required int32 retType = 1 [default = -400]; //RetType, return result
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
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
- For interface result, refer to RetType
Protocol ID
3401
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=%d desc=%s connID=%d
", errCode, desc, client.getConnectID());
if (errCode != 0)
return;
QotGetEarningsCalendar.C2S c2s = QotGetEarningsCalendar.C2S.newBuilder()
.setBeginDate("2026-06-22")
.setEndDate("2026-06-22")
.setMarket(11)
.build();
QotGetEarningsCalendar.Request req = QotGetEarningsCalendar.Request.newBuilder().setC2S(c2s).build();
int seqNo = qot.getEarningsCalendar(req);
System.out.printf("Send QotGetEarningsCalendar: %d
", seqNo);
}
@Override
public void onDisconnect(FTAPI_Conn client, long errCode) {
System.out.printf("Qot onDisConnect: %d
", errCode);
}
@Override
public void onReply_GetEarningsCalendar(FTAPI_Conn client, int nSerialNo, QotGetEarningsCalendar.Response rsp) {
if (rsp.getRetType() != 0) {
System.out.printf("QotGetEarningsCalendar failed: %s
", rsp.getRetMsg());
} else {
try {
String json = JsonFormat.printer().print(rsp);
System.out.printf("Receive QotGetEarningsCalendar: %s
", 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
67
68
- Output
Send QotGetEarningsCalendar: 3
Receive QotGetEarningsCalendar: {
"itemList": [
{ "security": { "market": 11, "code": "FRVO" }, "name": "FERVO ENERGY COMPANY", "earningsDate": "2026-06-22", "pubType": 1 },
{ "security": { "market": 11, "code": "BCKIY" }, "name": "BABCOCK INTERNATIONAL GROUP UNSP ADR", "earningsDate": "2026-06-22", "pubType": 0 },
{ "security": { "market": 11, "code": "POWW" }, "name": "Outdoor Holding", "earningsDate": "2026-06-22", "pubType": 1 }
]
}
2
3
4
5
6
7
8
Futu::u32_t GetEarningsCalendar(const Qot_GetEarningsCalendar::Request &stReq);
virtual void OnReply_GetEarningsCalendar(Futu::u32_t nSerialNo, const Qot_GetEarningsCalendar::Response &stRsp) = 0;
Description
Protocol request and response definition
Parameters
// Earnings calendar sort type
enum EarningsCalendarSortType {
EarningsCalendarSortType_Unknown = 0; //Unknown
EarningsCalendarSortType_Hot = 1; //Popular (default)
EarningsCalendarSortType_MarketCap = 2; //Historical market cap
EarningsCalendarSortType_OptionVolume = 3; //Option volume (HK/US stocks only)
EarningsCalendarSortType_IV = 4; //Implied volatility (HK/US stocks only)
EarningsCalendarSortType_IVRank = 5; //IV level (HK/US stocks only)
EarningsCalendarSortType_IVPercentile = 6; //IV percentile (HK/US stocks only)
EarningsCalendarSortType_RtMarketCap = 7; //Real-time market cap
}
// Earnings calendar publish type
enum EarningsCalendarPubType {
EarningsCalendarPubType_Unknown = -1; //Unknown
EarningsCalendarPubType_Regular = 0; //Intraday (period unidentified)
EarningsCalendarPubType_Before = 1; //Pre-market
EarningsCalendarPubType_After = 2; //After-hours
}
// Earnings indicator type
enum EarningsCalendarEstimateType {
EarningsCalendarEstimateType_Unknown = 0; //Unknown
EarningsCalendarEstimateType_EPS = 1; //Earnings per share (EPS GAAP)
EarningsCalendarEstimateType_Revenue = 2; //Total revenue
EarningsCalendarEstimateType_EBIT = 3; //EBIT
}
// Earnings period type
enum EarningsCalendarPeriodType {
EarningsCalendarPeriodType_Unknown = 0; //Unknown
EarningsCalendarPeriodType_Quarterly = 1; //Quarterly
EarningsCalendarPeriodType_SemiAnnual = 2; //Semi-annual
EarningsCalendarPeriodType_Annual = 3; //Annual
}
// Stock list type
enum EarningsCalendarStockListType {
EarningsCalendarStockListType_Unknown = 0; //Unknown
EarningsCalendarStockListType_Watchlist = 1; //Watchlist
EarningsCalendarStockListType_Position = 2; //Holding
EarningsCalendarStockListType_Special = 3; //Special attention
}
// Earnings calendar filter factor type
enum EarningsCalendarIndicatorType {
EarningsCalendarIndicatorType_Unknown = 0;
EarningsCalendarIndicatorType_PubType = 1; //[Exact value] Publish type (valueList, EarningsCalendarPubType)
EarningsCalendarIndicatorType_EstimateType = 2; //[Exact value] Indicator type (valueList, EarningsCalendarEstimateType)
EarningsCalendarIndicatorType_MarketCap = 3; //[Range] Market cap
EarningsCalendarIndicatorType_StockListType = 4; //[Exact value] Stock list type (valueList, EarningsCalendarStockListType)
EarningsCalendarIndicatorType_OptionVolume = 5; //[Range] Option volume (HK/US stocks only)
EarningsCalendarIndicatorType_IV = 6; //[Range] Implied volatility(%) (HK/US stocks only)
EarningsCalendarIndicatorType_IVRank = 7; //[Range] IV level(%) (HK/US stocks only)
EarningsCalendarIndicatorType_IVPercentile = 8; //[Range] IV percentile(%) (HK/US stocks only)
EarningsCalendarIndicatorType_RtMarketCap = 9; //[Range] Real-time market cap
}
// Earnings calendar filter conditions
message EarningsCalendarIndicator {
required int32 indicatorType = 1; // EarningsCalendarIndicatorType
optional Qot_OptionCommon.IndicatorValue indicatorValue = 2; // Filter conditions
}
// Earnings forecast data
message EstimateData {
optional int32 estimateType = 1; // EarningsCalendarEstimateType
optional double actualValue = 2; // Actual value (available when published)
optional double predictValue = 3; // Forecast value
optional string currency = 4; // Currency unit (ISO 4217)
optional int32 periodType = 5; // EarningsCalendarPeriodType
}
// Earnings calendar item
message EarningsCalendarItem {
required Qot_Common.Security security = 1; // Stock
optional string name = 2; // Stock name
optional string earningsDate = 3; // Earnings date ("yyyy-MM-dd")
optional double earningsTimestamp = 4; // Earnings report publish timestamp (seconds)
optional int32 pubType = 5; // EarningsCalendarPubType
optional string periodText = 7; // Fiscal period (e.g. "2025Q1")
repeated EstimateData estimateList = 8; // Forecast data list
// Option fields (HK/US stocks only)
optional int64 optionVolume = 10; // Option volume
optional double iv = 11; // Implied volatility(%)
optional double ivRank = 12; // IV level(%)
optional double ivPercentile = 13; // IV percentile(%)
// Quote field
optional double marketCap = 20; // Real-time market cap
optional double price = 21; // Last price
}
message C2S {
required int32 market = 1; // Qot_Common.QotMarket (supports HK/US/CNSH/CNSZ/SG/JP/AU/CA)
optional int32 sortType = 2; // EarningsCalendarSortType (default Hot)
optional string beginDate = 3; // Start date, format "yyyy-MM-dd", default today if omitted (fetch current day only)
optional string endDate = 4; // End date, format "yyyy-MM-dd", fetches beginDate only if omitted; max 7 days from beginDate
repeated EarningsCalendarIndicator filterList = 5; // Filter conditions (AND relationship)
}
message S2C {
repeated EarningsCalendarItem itemList = 1;
}
message Request {
required C2S c2s = 1;
}
message Response {
required int32 retType = 1 [default = -400]; //RetType, return result
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
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
- For interface result, refer to RetType
Protocol ID
3401
Example
class Program : public FTSPI_Qot, 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) {
Qot_GetEarningsCalendar::Request req;
Qot_GetEarningsCalendar::C2S *c2s = req.mutable_c2s();
c2s->set_market(Qot_Common::QotMarket::QotMarket_US_Security);
c2s->set_begindate("2024-06-01");
c2s->set_enddate("2024-06-07");
m_GetEarningsCalendarSerialNo = m_pQotApi->GetEarningsCalendar(req);
}
virtual void OnReply_GetEarningsCalendar(Futu::u32_t nSerialNo, const Qot_GetEarningsCalendar::Response &stRsp) {
if (nSerialNo != m_GetEarningsCalendarSerialNo) return;
string resp_str;
ProtoBufToBodyData(stRsp, resp_str);
cout << UTF8ToLocal(resp_str) << endl;
}
protected:
FTAPI_Qot *m_pQotApi;
Futu::u32_t m_GetEarningsCalendarSerialNo = 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
- Output
{
"retType": 0,
"retMsg": "",
"errCode": 0,
"s2c": {
"itemList": [
{
"security": {
"market": 11,
"code": "AAPL"
},
"name": "Apple",
"earningsDate": "2024-07-30",
"pubType": 2,
"periodText": "2024Q3",
"estimateList": [
{
"estimateType": 1,
"predictValue": 1.35
}
]
}
]
}
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
getEarningsCalendar(qotGetEarningsCalendar)
Description
Get earnings calendar, returning a list of stocks in a specified market that are about to or have already released earnings reports within a given date range, including earnings date, actual and estimated values for EPS/revenue/EBIT, option implied volatility, and other information.
Parameters
// Earnings calendar sort type
enum EarningsCalendarSortType {
EarningsCalendarSortType_Unknown = 0; //Unknown
EarningsCalendarSortType_Hot = 1; //Popular (default)
EarningsCalendarSortType_MarketCap = 2; //Historical market cap
EarningsCalendarSortType_OptionVolume = 3; //Option volume (HK/US stocks only)
EarningsCalendarSortType_IV = 4; //Implied volatility (HK/US stocks only)
EarningsCalendarSortType_IVRank = 5; //IV level (HK/US stocks only)
EarningsCalendarSortType_IVPercentile = 6; //IV percentile (HK/US stocks only)
EarningsCalendarSortType_RtMarketCap = 7; //Real-time market cap
}
// Earnings calendar publish type
enum EarningsCalendarPubType {
EarningsCalendarPubType_Unknown = -1; //Unknown
EarningsCalendarPubType_Regular = 0; //Intraday (period unidentified)
EarningsCalendarPubType_Before = 1; //Pre-market
EarningsCalendarPubType_After = 2; //After-hours
}
// Earnings indicator type
enum EarningsCalendarEstimateType {
EarningsCalendarEstimateType_Unknown = 0; //Unknown
EarningsCalendarEstimateType_EPS = 1; //Earnings per share (EPS GAAP)
EarningsCalendarEstimateType_Revenue = 2; //Total revenue
EarningsCalendarEstimateType_EBIT = 3; //EBIT
}
// Earnings period type
enum EarningsCalendarPeriodType {
EarningsCalendarPeriodType_Unknown = 0; //Unknown
EarningsCalendarPeriodType_Quarterly = 1; //Quarterly
EarningsCalendarPeriodType_SemiAnnual = 2; //Semi-annual
EarningsCalendarPeriodType_Annual = 3; //Annual
}
// Stock list type
enum EarningsCalendarStockListType {
EarningsCalendarStockListType_Unknown = 0; //Unknown
EarningsCalendarStockListType_Watchlist = 1; //Watchlist
EarningsCalendarStockListType_Position = 2; //Holding
EarningsCalendarStockListType_Special = 3; //Special attention
}
// Earnings calendar filter factor type
enum EarningsCalendarIndicatorType {
EarningsCalendarIndicatorType_Unknown = 0;
EarningsCalendarIndicatorType_PubType = 1; //[Exact value] Publish type (valueList, EarningsCalendarPubType)
EarningsCalendarIndicatorType_EstimateType = 2; //[Exact value] Indicator type (valueList, EarningsCalendarEstimateType)
EarningsCalendarIndicatorType_MarketCap = 3; //[Range] Market cap
EarningsCalendarIndicatorType_StockListType = 4; //[Exact value] Stock list type (valueList, EarningsCalendarStockListType)
EarningsCalendarIndicatorType_OptionVolume = 5; //[Range] Option volume (HK/US stocks only)
EarningsCalendarIndicatorType_IV = 6; //[Range] Implied volatility(%) (HK/US stocks only)
EarningsCalendarIndicatorType_IVRank = 7; //[Range] IV level(%) (HK/US stocks only)
EarningsCalendarIndicatorType_IVPercentile = 8; //[Range] IV percentile(%) (HK/US stocks only)
EarningsCalendarIndicatorType_RtMarketCap = 9; //[Range] Real-time market cap
}
// Earnings calendar filter conditions
message EarningsCalendarIndicator {
required int32 indicatorType = 1; // EarningsCalendarIndicatorType
optional Qot_OptionCommon.IndicatorValue indicatorValue = 2; // Filter conditions
}
// Earnings forecast data
message EstimateData {
optional int32 estimateType = 1; // EarningsCalendarEstimateType
optional double actualValue = 2; // Actual value (available when published)
optional double predictValue = 3; // Forecast value
optional string currency = 4; // Currency unit (ISO 4217)
optional int32 periodType = 5; // EarningsCalendarPeriodType
}
// Earnings calendar item
message EarningsCalendarItem {
required Qot_Common.Security security = 1; // Stock
optional string name = 2; // Stock name
optional string earningsDate = 3; // Earnings date ("yyyy-MM-dd")
optional double earningsTimestamp = 4; // Earnings report publish timestamp (seconds)
optional int32 pubType = 5; // EarningsCalendarPubType
optional string periodText = 7; // Fiscal period (e.g. "2025Q1")
repeated EstimateData estimateList = 8; // Forecast data list
// Option fields (HK/US stocks only)
optional int64 optionVolume = 10; // Option volume
optional double iv = 11; // Implied volatility(%)
optional double ivRank = 12; // IV level(%)
optional double ivPercentile = 13; // IV percentile(%)
// Quote field
optional double marketCap = 20; // Real-time market cap
optional double price = 21; // Last price
}
message C2S {
required int32 market = 1; // Qot_Common.QotMarket (supports HK/US/CNSH/CNSZ/SG/JP/AU/CA)
optional int32 sortType = 2; // EarningsCalendarSortType (default Hot)
optional string beginDate = 3; // Start date, format "yyyy-MM-dd", default today if omitted (fetch current day only)
optional string endDate = 4; // End date, format "yyyy-MM-dd", fetches beginDate only if omitted; max 7 days from beginDate
repeated EarningsCalendarIndicator filterList = 5; // Filter conditions (AND relationship)
}
message S2C {
repeated EarningsCalendarItem itemList = 1;
}
message Request {
required C2S c2s = 1;
}
message Response {
required int32 retType = 1 [default = -400]; //RetType, return result
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
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
- For interface result, refer to RetType
Protocol ID
3401
Example
import ftWebsocket from "futu-api";
import { Common, Qot_Common } from "futu-api/proto";
import beautify from "js-beautify";
function QotGetEarningsCalendar(){
const { RetType } = Common
let [addr, port, enable_ssl, key] = ["127.0.0.1", 11111, false, "xxxxxx"];
let websocket = new ftWebsocket();
websocket.onlogin = (ret, msg)=>{
if (ret) {
const req = {
c2s: {
market: 11, // Qot_Common.QotMarket_US
beginDate: "2026-06-22",
endDate: "2026-06-22",
},
};
websocket.GetEarningsCalendar(req)
.then((res)=>{
let { errCode, retMsg, retType, s2c } = res
console.log("GetEarningsCalendar: 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("start error", msg);
}
};
websocket.start(addr, port, enable_ssl, key);
setTimeout(()=>{ websocket.stop(); process.exit(); }, 5000);
}
QotGetEarningsCalendar()
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
- Output
GetEarningsCalendar: errCode 0, retMsg , retType 0
{
"itemList": [
{ "security": { "market": 11, "code": "FRVO" }, "name": "FERVO ENERGY COMPANY", "earningsDate": "2026-06-22", "pubType": 1 },
{ "security": { "market": 11, "code": "BCKIY" }, "name": "BABCOCK INTERNATIONAL GROUP UNSP ADR", "earningsDate": "2026-06-22", "pubType": 0 },
{ "security": { "market": 11, "code": "POWW" }, "name": "Outdoor Holding", "earningsDate": "2026-06-22", "pubType": 1 }
]
}
2
3
4
5
6
7
8
API Limits
- Maximum 60 requests within 30 seconds
- Only the first page of paginated requests counts toward rate limiting
- Python
- Proto
- C#
- Java
- C++
- JavaScript
get_earnings_calendar(market, sort_type=None, begin_date=None, end_date=None, filter_list=None)
Description
Get earnings calendar, returning a list of stocks in a specified market that are about to or have already released earnings reports within a given date range, including earnings date, actual and estimated values for EPS/revenue/EBIT, option implied volatility, and other information.
Parameters
Parameter Type Description market Market Market type (required) sort_type EarningsCalendarSortType Sort type (default Hot) begin_date str Start date, format "yyyy-MM-dd", defaults to today if not provided (fetches only that day) end_date str End date, format "yyyy-MM-dd", if not provided only fetches beginDate; interval with beginDate must not exceed 7 days filter_list list[ EarningsCalendarFilter]Filter condition list (multiple conditions are AND-combined) Input Limits
filter_listFilter Conditions(EarningsCalendarFilter):Construct filter conditions via
EarningsCalendarFilter, supporting two filter modes:Constructor Parameter Description indicator_typeFilter indicator type ( EarningsCalendarIndicatorType, required)value_listExact value list (for enum-type filters such as release type, indicator type, stock list type) interval_min/interval_maxMin/max value for range filter min_inclusive/max_inclusiveWhether range boundaries are inclusive (default True)
Return
Parameter Type Description ret RET_CODE API call result data pd.DataFrame When ret == RET_OK, returns data str When ret != RET_OK, returns error description - Data format:
Field Type Description security str Stock code (e.g. 'US.AAPL')name str Stock name earnings_date str Earnings date ("yyyy-MM-dd") earnings_timestamp float Earnings release timestamp (Unix seconds) pub_type str Publish type (BEFORE=pre-market / AFTER=after-hours / REGULAR=intraday) period_text str Fiscal period (e.g. '2025Q1')eps_actual float EPS actual value (available when published) eps_predict float EPS estimated value revenue_actual float Total revenue actual value (available when published) revenue_predict float Total revenue estimated value ebit_actual float EBIT actual value (available when published) ebit_predict float EBIT estimated value option_volume int Option volume (HK/US stocks only) iv float Implied volatility (%) (HK/US stocks only) iv_rank float IV rank (%) (HK/US stocks only) iv_percentile float IV percentile (%) (HK/US stocks only) market_cap float Real-time market cap price float Latest price
- Data format:
Example
from futu import *
quote_ctx = OpenQuoteContext(host='127.0.0.1', port=11111)
ret, data = quote_ctx.get_earnings_calendar(market=Market.US)
if ret == RET_OK:
print(data.head(2))
else:
print('error:', data)
quote_ctx.close()
2
3
4
5
6
7
8
9
10
11
- Output
security name earnings_date earnings_timestamp pub_type period_text eps_actual eps_predict revenue_actual revenue_predict ebit_actual ebit_predict option_volume iv iv_rank iv_percentile market_cap price
0 US.MU 美光科技 2026-06-24 1.782331e+09 AFTER 2026Q3 N/A 20.8654 N/A 35251836320.0 N/A 26879423830.0 633420 113.795 97.754 98.015 1.186117e+12 1051.77
1 US.PAYX 沛齐 2026-06-24 1.782308e+09 BEFORE 2026Q4 N/A 1.2167 N/A 1606293190.0 N/A 661853410.0 6603 42.209 85.862 93.650 3.510892e+10 97.99
2
3
# Qot_GetEarningsCalendar.proto
Description
Get earnings calendar, returning a list of stocks in a specified market that are about to or have already released earnings reports within a given date range, including earnings date, actual and estimated values for EPS/revenue/EBIT, option implied volatility, and other information.
Parameters
// Earnings calendar sort type
enum EarningsCalendarSortType {
EarningsCalendarSortType_Unknown = 0; //Unknown
EarningsCalendarSortType_Hot = 1; //Popular (default)
EarningsCalendarSortType_MarketCap = 2; //Historical market cap
EarningsCalendarSortType_OptionVolume = 3; //Option volume (HK/US stocks only)
EarningsCalendarSortType_IV = 4; //Implied volatility (HK/US stocks only)
EarningsCalendarSortType_IVRank = 5; //IV level (HK/US stocks only)
EarningsCalendarSortType_IVPercentile = 6; //IV percentile (HK/US stocks only)
EarningsCalendarSortType_RtMarketCap = 7; //Real-time market cap
}
// Earnings calendar publish type
enum EarningsCalendarPubType {
EarningsCalendarPubType_Unknown = -1; //Unknown
EarningsCalendarPubType_Regular = 0; //Intraday (period unidentified)
EarningsCalendarPubType_Before = 1; //Pre-market
EarningsCalendarPubType_After = 2; //After-hours
}
// Earnings indicator type
enum EarningsCalendarEstimateType {
EarningsCalendarEstimateType_Unknown = 0; //Unknown
EarningsCalendarEstimateType_EPS = 1; //Earnings per share (EPS GAAP)
EarningsCalendarEstimateType_Revenue = 2; //Total revenue
EarningsCalendarEstimateType_EBIT = 3; //EBIT
}
// Earnings period type
enum EarningsCalendarPeriodType {
EarningsCalendarPeriodType_Unknown = 0; //Unknown
EarningsCalendarPeriodType_Quarterly = 1; //Quarterly
EarningsCalendarPeriodType_SemiAnnual = 2; //Semi-annual
EarningsCalendarPeriodType_Annual = 3; //Annual
}
// Stock list type
enum EarningsCalendarStockListType {
EarningsCalendarStockListType_Unknown = 0; //Unknown
EarningsCalendarStockListType_Watchlist = 1; //Watchlist
EarningsCalendarStockListType_Position = 2; //Holding
EarningsCalendarStockListType_Special = 3; //Special attention
}
// Earnings calendar filter factor type
enum EarningsCalendarIndicatorType {
EarningsCalendarIndicatorType_Unknown = 0;
EarningsCalendarIndicatorType_PubType = 1; //[Exact value] Publish type (valueList, EarningsCalendarPubType)
EarningsCalendarIndicatorType_EstimateType = 2; //[Exact value] Indicator type (valueList, EarningsCalendarEstimateType)
EarningsCalendarIndicatorType_MarketCap = 3; //[Range] Market cap
EarningsCalendarIndicatorType_StockListType = 4; //[Exact value] Stock list type (valueList, EarningsCalendarStockListType)
EarningsCalendarIndicatorType_OptionVolume = 5; //[Range] Option volume (HK/US stocks only)
EarningsCalendarIndicatorType_IV = 6; //[Range] Implied volatility(%) (HK/US stocks only)
EarningsCalendarIndicatorType_IVRank = 7; //[Range] IV level(%) (HK/US stocks only)
EarningsCalendarIndicatorType_IVPercentile = 8; //[Range] IV percentile(%) (HK/US stocks only)
EarningsCalendarIndicatorType_RtMarketCap = 9; //[Range] Real-time market cap
}
// Earnings calendar filter conditions
message EarningsCalendarIndicator {
required int32 indicatorType = 1; // EarningsCalendarIndicatorType
optional Qot_OptionCommon.IndicatorValue indicatorValue = 2; // Filter conditions
}
// Earnings forecast data
message EstimateData {
optional int32 estimateType = 1; // EarningsCalendarEstimateType
optional double actualValue = 2; // Actual value (available when published)
optional double predictValue = 3; // Forecast value
optional string currency = 4; // Currency unit (ISO 4217)
optional int32 periodType = 5; // EarningsCalendarPeriodType
}
// Earnings calendar item
message EarningsCalendarItem {
required Qot_Common.Security security = 1; // Stock
optional string name = 2; // Stock name
optional string earningsDate = 3; // Earnings date ("yyyy-MM-dd")
optional double earningsTimestamp = 4; // Earnings report publish timestamp (seconds)
optional int32 pubType = 5; // EarningsCalendarPubType
optional string periodText = 7; // Fiscal period (e.g. "2025Q1")
repeated EstimateData estimateList = 8; // Forecast data list
// Option fields (HK/US stocks only)
optional int64 optionVolume = 10; // Option volume
optional double iv = 11; // Implied volatility(%)
optional double ivRank = 12; // IV level(%)
optional double ivPercentile = 13; // IV percentile(%)
// Quote field
optional double marketCap = 20; // Real-time market cap
optional double price = 21; // Last price
}
message C2S {
required int32 market = 1; // Qot_Common.QotMarket (supports HK/US/CNSH/CNSZ/SG/JP/AU/CA)
optional int32 sortType = 2; // EarningsCalendarSortType (default Hot)
optional string beginDate = 3; // Start date, format "yyyy-MM-dd", default today if omitted (fetch current day only)
optional string endDate = 4; // End date, format "yyyy-MM-dd", fetches beginDate only if omitted; max 7 days from beginDate
repeated EarningsCalendarIndicator filterList = 5; // Filter conditions (AND relationship)
}
message S2C {
repeated EarningsCalendarItem itemList = 1;
}
message Request {
required C2S c2s = 1;
}
message Response {
required int32 retType = 1 [default = -400]; //RetType, return result
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
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
Protocol ID
3401
uint GetEarningsCalendar(Qot_GetEarningsCalendar.Request req);
virtual void OnReply_GetEarningsCalendar(FTAPI_Conn client, uint nSerialNo, Qot_GetEarningsCalendar.Response rsp);
Description
Get earnings calendar, returning a list of stocks in a specified market that are about to or have already released earnings reports within a given date range, including earnings date, actual and estimated values for EPS/revenue/EBIT, option implied volatility, and other information.
Parameters
// Earnings calendar sort type
enum EarningsCalendarSortType {
EarningsCalendarSortType_Unknown = 0; //Unknown
EarningsCalendarSortType_Hot = 1; //Popular (default)
EarningsCalendarSortType_MarketCap = 2; //Historical market cap
EarningsCalendarSortType_OptionVolume = 3; //Option volume (HK/US stocks only)
EarningsCalendarSortType_IV = 4; //Implied volatility (HK/US stocks only)
EarningsCalendarSortType_IVRank = 5; //IV level (HK/US stocks only)
EarningsCalendarSortType_IVPercentile = 6; //IV percentile (HK/US stocks only)
EarningsCalendarSortType_RtMarketCap = 7; //Real-time market cap
}
// Earnings calendar publish type
enum EarningsCalendarPubType {
EarningsCalendarPubType_Unknown = -1; //Unknown
EarningsCalendarPubType_Regular = 0; //Intraday (period unidentified)
EarningsCalendarPubType_Before = 1; //Pre-market
EarningsCalendarPubType_After = 2; //After-hours
}
// Earnings indicator type
enum EarningsCalendarEstimateType {
EarningsCalendarEstimateType_Unknown = 0; //Unknown
EarningsCalendarEstimateType_EPS = 1; //Earnings per share (EPS GAAP)
EarningsCalendarEstimateType_Revenue = 2; //Total revenue
EarningsCalendarEstimateType_EBIT = 3; //EBIT
}
// Earnings period type
enum EarningsCalendarPeriodType {
EarningsCalendarPeriodType_Unknown = 0; //Unknown
EarningsCalendarPeriodType_Quarterly = 1; //Quarterly
EarningsCalendarPeriodType_SemiAnnual = 2; //Semi-annual
EarningsCalendarPeriodType_Annual = 3; //Annual
}
// Stock list type
enum EarningsCalendarStockListType {
EarningsCalendarStockListType_Unknown = 0; //Unknown
EarningsCalendarStockListType_Watchlist = 1; //Watchlist
EarningsCalendarStockListType_Position = 2; //Holding
EarningsCalendarStockListType_Special = 3; //Special attention
}
// Earnings calendar filter factor type
enum EarningsCalendarIndicatorType {
EarningsCalendarIndicatorType_Unknown = 0;
EarningsCalendarIndicatorType_PubType = 1; //[Exact value] Publish type (valueList, EarningsCalendarPubType)
EarningsCalendarIndicatorType_EstimateType = 2; //[Exact value] Indicator type (valueList, EarningsCalendarEstimateType)
EarningsCalendarIndicatorType_MarketCap = 3; //[Range] Market cap
EarningsCalendarIndicatorType_StockListType = 4; //[Exact value] Stock list type (valueList, EarningsCalendarStockListType)
EarningsCalendarIndicatorType_OptionVolume = 5; //[Range] Option volume (HK/US stocks only)
EarningsCalendarIndicatorType_IV = 6; //[Range] Implied volatility(%) (HK/US stocks only)
EarningsCalendarIndicatorType_IVRank = 7; //[Range] IV level(%) (HK/US stocks only)
EarningsCalendarIndicatorType_IVPercentile = 8; //[Range] IV percentile(%) (HK/US stocks only)
EarningsCalendarIndicatorType_RtMarketCap = 9; //[Range] Real-time market cap
}
// Earnings calendar filter conditions
message EarningsCalendarIndicator {
required int32 indicatorType = 1; // EarningsCalendarIndicatorType
optional Qot_OptionCommon.IndicatorValue indicatorValue = 2; // Filter conditions
}
// Earnings forecast data
message EstimateData {
optional int32 estimateType = 1; // EarningsCalendarEstimateType
optional double actualValue = 2; // Actual value (available when published)
optional double predictValue = 3; // Forecast value
optional string currency = 4; // Currency unit (ISO 4217)
optional int32 periodType = 5; // EarningsCalendarPeriodType
}
// Earnings calendar item
message EarningsCalendarItem {
required Qot_Common.Security security = 1; // Stock
optional string name = 2; // Stock name
optional string earningsDate = 3; // Earnings date ("yyyy-MM-dd")
optional double earningsTimestamp = 4; // Earnings report publish timestamp (seconds)
optional int32 pubType = 5; // EarningsCalendarPubType
optional string periodText = 7; // Fiscal period (e.g. "2025Q1")
repeated EstimateData estimateList = 8; // Forecast data list
// Option fields (HK/US stocks only)
optional int64 optionVolume = 10; // Option volume
optional double iv = 11; // Implied volatility(%)
optional double ivRank = 12; // IV level(%)
optional double ivPercentile = 13; // IV percentile(%)
// Quote field
optional double marketCap = 20; // Real-time market cap
optional double price = 21; // Last price
}
message C2S {
required int32 market = 1; // Qot_Common.QotMarket (supports HK/US/CNSH/CNSZ/SG/JP/AU/CA)
optional int32 sortType = 2; // EarningsCalendarSortType (default Hot)
optional string beginDate = 3; // Start date, format "yyyy-MM-dd", default today if omitted (fetch current day only)
optional string endDate = 4; // End date, format "yyyy-MM-dd", fetches beginDate only if omitted; max 7 days from beginDate
repeated EarningsCalendarIndicator filterList = 5; // Filter conditions (AND relationship)
}
message S2C {
repeated EarningsCalendarItem itemList = 1;
}
message Request {
required C2S c2s = 1;
}
message Response {
required int32 retType = 1 [default = -400]; //RetType, return result
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
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
- For interface result, refer to RetType
Protocol ID
3401
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}
", errCode, desc, client.GetConnectID());
if (errCode != 0)
return;
QotGetEarningsCalendar.C2S c2s = QotGetEarningsCalendar.C2S.CreateBuilder()
.SetBeginDate("2026-06-22")
.SetEndDate("2026-06-22")
.SetMarket(11)
.Build();
QotGetEarningsCalendar.Request req = QotGetEarningsCalendar.Request.CreateBuilder().SetC2S(c2s).Build();
uint seqNo = qot.GetEarningsCalendar(req);
Console.Write("Send QotGetEarningsCalendar: {0}
", seqNo);
}
public void OnDisconnect(MMAPI_Conn client, long errCode) {
Console.Write("Qot onDisConnect: {0}
", errCode);
}
public void OnReply_GetEarningsCalendar(MMAPI_Conn client, uint nSerialNo, QotGetEarningsCalendar.Response rsp)
{
Console.Write("Reply: QotGetEarningsCalendar: {0}
", nSerialNo);
if (rsp.RetType == 0 && rsp.HasS2C)
Console.Write("{0}
", rsp.ToString());
}
public static void Main(String[] args) {
MMAPI.Init();
Program program = new Program();
program.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
- Output
Send QotGetEarningsCalendar: 3
Reply: QotGetEarningsCalendar: 3
GetEarningsCalendar: errCode 0, retMsg , retType 0
{
"itemList": [
{ "security": { "market": 11, "code": "FRVO" }, "name": "FERVO ENERGY COMPANY", "earningsDate": "2026-06-22", "pubType": 1 },
{ "security": { "market": 11, "code": "BCKIY" }, "name": "BABCOCK INTERNATIONAL GROUP UNSP ADR", "earningsDate": "2026-06-22", "pubType": 0 },
{ "security": { "market": 11, "code": "POWW" }, "name": "Outdoor Holding", "earningsDate": "2026-06-22", "pubType": 1 }
]
}
2
3
4
5
6
7
8
9
10
int getEarningsCalendar(Qot_GetEarningsCalendar.Request req);
onReply_GetEarningsCalendar(FTAPI_Conn client, int nSerialNo, Qot_GetEarningsCalendar.Response rsp)
Description
Get earnings calendar, returning a list of stocks in a specified market that are about to or have already released earnings reports within a given date range, including earnings date, actual and estimated values for EPS/revenue/EBIT, option implied volatility, and other information.
Parameters
// Earnings calendar sort type
enum EarningsCalendarSortType {
EarningsCalendarSortType_Unknown = 0; //Unknown
EarningsCalendarSortType_Hot = 1; //Popular (default)
EarningsCalendarSortType_MarketCap = 2; //Historical market cap
EarningsCalendarSortType_OptionVolume = 3; //Option volume (HK/US stocks only)
EarningsCalendarSortType_IV = 4; //Implied volatility (HK/US stocks only)
EarningsCalendarSortType_IVRank = 5; //IV level (HK/US stocks only)
EarningsCalendarSortType_IVPercentile = 6; //IV percentile (HK/US stocks only)
EarningsCalendarSortType_RtMarketCap = 7; //Real-time market cap
}
// Earnings calendar publish type
enum EarningsCalendarPubType {
EarningsCalendarPubType_Unknown = -1; //Unknown
EarningsCalendarPubType_Regular = 0; //Intraday (period unidentified)
EarningsCalendarPubType_Before = 1; //Pre-market
EarningsCalendarPubType_After = 2; //After-hours
}
// Earnings indicator type
enum EarningsCalendarEstimateType {
EarningsCalendarEstimateType_Unknown = 0; //Unknown
EarningsCalendarEstimateType_EPS = 1; //Earnings per share (EPS GAAP)
EarningsCalendarEstimateType_Revenue = 2; //Total revenue
EarningsCalendarEstimateType_EBIT = 3; //EBIT
}
// Earnings period type
enum EarningsCalendarPeriodType {
EarningsCalendarPeriodType_Unknown = 0; //Unknown
EarningsCalendarPeriodType_Quarterly = 1; //Quarterly
EarningsCalendarPeriodType_SemiAnnual = 2; //Semi-annual
EarningsCalendarPeriodType_Annual = 3; //Annual
}
// Stock list type
enum EarningsCalendarStockListType {
EarningsCalendarStockListType_Unknown = 0; //Unknown
EarningsCalendarStockListType_Watchlist = 1; //Watchlist
EarningsCalendarStockListType_Position = 2; //Holding
EarningsCalendarStockListType_Special = 3; //Special attention
}
// Earnings calendar filter factor type
enum EarningsCalendarIndicatorType {
EarningsCalendarIndicatorType_Unknown = 0;
EarningsCalendarIndicatorType_PubType = 1; //[Exact value] Publish type (valueList, EarningsCalendarPubType)
EarningsCalendarIndicatorType_EstimateType = 2; //[Exact value] Indicator type (valueList, EarningsCalendarEstimateType)
EarningsCalendarIndicatorType_MarketCap = 3; //[Range] Market cap
EarningsCalendarIndicatorType_StockListType = 4; //[Exact value] Stock list type (valueList, EarningsCalendarStockListType)
EarningsCalendarIndicatorType_OptionVolume = 5; //[Range] Option volume (HK/US stocks only)
EarningsCalendarIndicatorType_IV = 6; //[Range] Implied volatility(%) (HK/US stocks only)
EarningsCalendarIndicatorType_IVRank = 7; //[Range] IV level(%) (HK/US stocks only)
EarningsCalendarIndicatorType_IVPercentile = 8; //[Range] IV percentile(%) (HK/US stocks only)
EarningsCalendarIndicatorType_RtMarketCap = 9; //[Range] Real-time market cap
}
// Earnings calendar filter conditions
message EarningsCalendarIndicator {
required int32 indicatorType = 1; // EarningsCalendarIndicatorType
optional Qot_OptionCommon.IndicatorValue indicatorValue = 2; // Filter conditions
}
// Earnings forecast data
message EstimateData {
optional int32 estimateType = 1; // EarningsCalendarEstimateType
optional double actualValue = 2; // Actual value (available when published)
optional double predictValue = 3; // Forecast value
optional string currency = 4; // Currency unit (ISO 4217)
optional int32 periodType = 5; // EarningsCalendarPeriodType
}
// Earnings calendar item
message EarningsCalendarItem {
required Qot_Common.Security security = 1; // Stock
optional string name = 2; // Stock name
optional string earningsDate = 3; // Earnings date ("yyyy-MM-dd")
optional double earningsTimestamp = 4; // Earnings report publish timestamp (seconds)
optional int32 pubType = 5; // EarningsCalendarPubType
optional string periodText = 7; // Fiscal period (e.g. "2025Q1")
repeated EstimateData estimateList = 8; // Forecast data list
// Option fields (HK/US stocks only)
optional int64 optionVolume = 10; // Option volume
optional double iv = 11; // Implied volatility(%)
optional double ivRank = 12; // IV level(%)
optional double ivPercentile = 13; // IV percentile(%)
// Quote field
optional double marketCap = 20; // Real-time market cap
optional double price = 21; // Last price
}
message C2S {
required int32 market = 1; // Qot_Common.QotMarket (supports HK/US/CNSH/CNSZ/SG/JP/AU/CA)
optional int32 sortType = 2; // EarningsCalendarSortType (default Hot)
optional string beginDate = 3; // Start date, format "yyyy-MM-dd", default today if omitted (fetch current day only)
optional string endDate = 4; // End date, format "yyyy-MM-dd", fetches beginDate only if omitted; max 7 days from beginDate
repeated EarningsCalendarIndicator filterList = 5; // Filter conditions (AND relationship)
}
message S2C {
repeated EarningsCalendarItem itemList = 1;
}
message Request {
required C2S c2s = 1;
}
message Response {
required int32 retType = 1 [default = -400]; //RetType, return result
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
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
- For interface result, refer to RetType
Protocol ID
3401
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=%d desc=%s connID=%d
", errCode, desc, client.getConnectID());
if (errCode != 0)
return;
QotGetEarningsCalendar.C2S c2s = QotGetEarningsCalendar.C2S.newBuilder()
.setBeginDate("2026-06-22")
.setEndDate("2026-06-22")
.setMarket(11)
.build();
QotGetEarningsCalendar.Request req = QotGetEarningsCalendar.Request.newBuilder().setC2S(c2s).build();
int seqNo = qot.getEarningsCalendar(req);
System.out.printf("Send QotGetEarningsCalendar: %d
", seqNo);
}
@Override
public void onDisconnect(MMAPI_Conn client, long errCode) {
System.out.printf("Qot onDisConnect: %d
", errCode);
}
@Override
public void onReply_GetEarningsCalendar(MMAPI_Conn client, int nSerialNo, QotGetEarningsCalendar.Response rsp) {
if (rsp.getRetType() != 0) {
System.out.printf("QotGetEarningsCalendar failed: %s
", rsp.getRetMsg());
} else {
try {
String json = JsonFormat.printer().print(rsp);
System.out.printf("Receive QotGetEarningsCalendar: %s
", 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
67
68
- Output
Send QotGetEarningsCalendar: 3
Receive QotGetEarningsCalendar: {
"itemList": [
{ "security": { "market": 11, "code": "FRVO" }, "name": "FERVO ENERGY COMPANY", "earningsDate": "2026-06-22", "pubType": 1 },
{ "security": { "market": 11, "code": "BCKIY" }, "name": "BABCOCK INTERNATIONAL GROUP UNSP ADR", "earningsDate": "2026-06-22", "pubType": 0 },
{ "security": { "market": 11, "code": "POWW" }, "name": "Outdoor Holding", "earningsDate": "2026-06-22", "pubType": 1 }
]
}
2
3
4
5
6
7
8
moomoo::u32_t GetEarningsCalendar(const Qot_GetEarningsCalendar::Request &stReq);
virtual void OnReply_GetEarningsCalendar(moomoo::u32_t nSerialNo, const Qot_GetEarningsCalendar::Response &stRsp) = 0;
Description
Protocol request and response definition
Parameters
// Earnings calendar sort type
enum EarningsCalendarSortType {
EarningsCalendarSortType_Unknown = 0; //Unknown
EarningsCalendarSortType_Hot = 1; //Popular (default)
EarningsCalendarSortType_MarketCap = 2; //Historical market cap
EarningsCalendarSortType_OptionVolume = 3; //Option volume (HK/US stocks only)
EarningsCalendarSortType_IV = 4; //Implied volatility (HK/US stocks only)
EarningsCalendarSortType_IVRank = 5; //IV level (HK/US stocks only)
EarningsCalendarSortType_IVPercentile = 6; //IV percentile (HK/US stocks only)
EarningsCalendarSortType_RtMarketCap = 7; //Real-time market cap
}
// Earnings calendar publish type
enum EarningsCalendarPubType {
EarningsCalendarPubType_Unknown = -1; //Unknown
EarningsCalendarPubType_Regular = 0; //Intraday (period unidentified)
EarningsCalendarPubType_Before = 1; //Pre-market
EarningsCalendarPubType_After = 2; //After-hours
}
// Earnings indicator type
enum EarningsCalendarEstimateType {
EarningsCalendarEstimateType_Unknown = 0; //Unknown
EarningsCalendarEstimateType_EPS = 1; //Earnings per share (EPS GAAP)
EarningsCalendarEstimateType_Revenue = 2; //Total revenue
EarningsCalendarEstimateType_EBIT = 3; //EBIT
}
// Earnings period type
enum EarningsCalendarPeriodType {
EarningsCalendarPeriodType_Unknown = 0; //Unknown
EarningsCalendarPeriodType_Quarterly = 1; //Quarterly
EarningsCalendarPeriodType_SemiAnnual = 2; //Semi-annual
EarningsCalendarPeriodType_Annual = 3; //Annual
}
// Stock list type
enum EarningsCalendarStockListType {
EarningsCalendarStockListType_Unknown = 0; //Unknown
EarningsCalendarStockListType_Watchlist = 1; //Watchlist
EarningsCalendarStockListType_Position = 2; //Holding
EarningsCalendarStockListType_Special = 3; //Special attention
}
// Earnings calendar filter factor type
enum EarningsCalendarIndicatorType {
EarningsCalendarIndicatorType_Unknown = 0;
EarningsCalendarIndicatorType_PubType = 1; //[Exact value] Publish type (valueList, EarningsCalendarPubType)
EarningsCalendarIndicatorType_EstimateType = 2; //[Exact value] Indicator type (valueList, EarningsCalendarEstimateType)
EarningsCalendarIndicatorType_MarketCap = 3; //[Range] Market cap
EarningsCalendarIndicatorType_StockListType = 4; //[Exact value] Stock list type (valueList, EarningsCalendarStockListType)
EarningsCalendarIndicatorType_OptionVolume = 5; //[Range] Option volume (HK/US stocks only)
EarningsCalendarIndicatorType_IV = 6; //[Range] Implied volatility(%) (HK/US stocks only)
EarningsCalendarIndicatorType_IVRank = 7; //[Range] IV level(%) (HK/US stocks only)
EarningsCalendarIndicatorType_IVPercentile = 8; //[Range] IV percentile(%) (HK/US stocks only)
EarningsCalendarIndicatorType_RtMarketCap = 9; //[Range] Real-time market cap
}
// Earnings calendar filter conditions
message EarningsCalendarIndicator {
required int32 indicatorType = 1; // EarningsCalendarIndicatorType
optional Qot_OptionCommon.IndicatorValue indicatorValue = 2; // Filter conditions
}
// Earnings forecast data
message EstimateData {
optional int32 estimateType = 1; // EarningsCalendarEstimateType
optional double actualValue = 2; // Actual value (available when published)
optional double predictValue = 3; // Forecast value
optional string currency = 4; // Currency unit (ISO 4217)
optional int32 periodType = 5; // EarningsCalendarPeriodType
}
// Earnings calendar item
message EarningsCalendarItem {
required Qot_Common.Security security = 1; // Stock
optional string name = 2; // Stock name
optional string earningsDate = 3; // Earnings date ("yyyy-MM-dd")
optional double earningsTimestamp = 4; // Earnings report publish timestamp (seconds)
optional int32 pubType = 5; // EarningsCalendarPubType
optional string periodText = 7; // Fiscal period (e.g. "2025Q1")
repeated EstimateData estimateList = 8; // Forecast data list
// Option fields (HK/US stocks only)
optional int64 optionVolume = 10; // Option volume
optional double iv = 11; // Implied volatility(%)
optional double ivRank = 12; // IV level(%)
optional double ivPercentile = 13; // IV percentile(%)
// Quote field
optional double marketCap = 20; // Real-time market cap
optional double price = 21; // Last price
}
message C2S {
required int32 market = 1; // Qot_Common.QotMarket (supports HK/US/CNSH/CNSZ/SG/JP/AU/CA)
optional int32 sortType = 2; // EarningsCalendarSortType (default Hot)
optional string beginDate = 3; // Start date, format "yyyy-MM-dd", default today if omitted (fetch current day only)
optional string endDate = 4; // End date, format "yyyy-MM-dd", fetches beginDate only if omitted; max 7 days from beginDate
repeated EarningsCalendarIndicator filterList = 5; // Filter conditions (AND relationship)
}
message S2C {
repeated EarningsCalendarItem itemList = 1;
}
message Request {
required C2S c2s = 1;
}
message Response {
required int32 retType = 1 [default = -400]; //RetType, return result
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
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
- For interface result, refer to RetType
Protocol ID
3401
Example
class Program : public MMSPI_Qot, 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) {
Qot_GetEarningsCalendar::Request req;
Qot_GetEarningsCalendar::C2S *c2s = req.mutable_c2s();
c2s->set_market(Qot_Common::QotMarket::QotMarket_US_Security);
c2s->set_begindate("2024-06-01");
c2s->set_enddate("2024-06-07");
m_GetEarningsCalendarSerialNo = m_pQotApi->GetEarningsCalendar(req);
}
virtual void OnReply_GetEarningsCalendar(moomoo::u32_t nSerialNo, const Qot_GetEarningsCalendar::Response &stRsp) {
if (nSerialNo != m_GetEarningsCalendarSerialNo) return;
string resp_str;
ProtoBufToBodyData(stRsp, resp_str);
cout << UTF8ToLocal(resp_str) << endl;
}
protected:
MMAPI_Qot *m_pQotApi;
moomoo::u32_t m_GetEarningsCalendarSerialNo = 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
- Output
{
"retType": 0,
"retMsg": "",
"errCode": 0,
"s2c": {
"itemList": [
{
"security": {
"market": 11,
"code": "AAPL"
},
"name": "Apple",
"earningsDate": "2024-07-30",
"pubType": 2,
"periodText": "2024Q3",
"estimateList": [
{
"estimateType": 1,
"predictValue": 1.35
}
]
}
]
}
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
getEarningsCalendar(qotGetEarningsCalendar)
Description
Get earnings calendar, returning a list of stocks in a specified market that are about to or have already released earnings reports within a given date range, including earnings date, actual and estimated values for EPS/revenue/EBIT, option implied volatility, and other information.
Parameters
// Earnings calendar sort type
enum EarningsCalendarSortType {
EarningsCalendarSortType_Unknown = 0; //Unknown
EarningsCalendarSortType_Hot = 1; //Popular (default)
EarningsCalendarSortType_MarketCap = 2; //Historical market cap
EarningsCalendarSortType_OptionVolume = 3; //Option volume (HK/US stocks only)
EarningsCalendarSortType_IV = 4; //Implied volatility (HK/US stocks only)
EarningsCalendarSortType_IVRank = 5; //IV level (HK/US stocks only)
EarningsCalendarSortType_IVPercentile = 6; //IV percentile (HK/US stocks only)
EarningsCalendarSortType_RtMarketCap = 7; //Real-time market cap
}
// Earnings calendar publish type
enum EarningsCalendarPubType {
EarningsCalendarPubType_Unknown = -1; //Unknown
EarningsCalendarPubType_Regular = 0; //Intraday (period unidentified)
EarningsCalendarPubType_Before = 1; //Pre-market
EarningsCalendarPubType_After = 2; //After-hours
}
// Earnings indicator type
enum EarningsCalendarEstimateType {
EarningsCalendarEstimateType_Unknown = 0; //Unknown
EarningsCalendarEstimateType_EPS = 1; //Earnings per share (EPS GAAP)
EarningsCalendarEstimateType_Revenue = 2; //Total revenue
EarningsCalendarEstimateType_EBIT = 3; //EBIT
}
// Earnings period type
enum EarningsCalendarPeriodType {
EarningsCalendarPeriodType_Unknown = 0; //Unknown
EarningsCalendarPeriodType_Quarterly = 1; //Quarterly
EarningsCalendarPeriodType_SemiAnnual = 2; //Semi-annual
EarningsCalendarPeriodType_Annual = 3; //Annual
}
// Stock list type
enum EarningsCalendarStockListType {
EarningsCalendarStockListType_Unknown = 0; //Unknown
EarningsCalendarStockListType_Watchlist = 1; //Watchlist
EarningsCalendarStockListType_Position = 2; //Holding
EarningsCalendarStockListType_Special = 3; //Special attention
}
// Earnings calendar filter factor type
enum EarningsCalendarIndicatorType {
EarningsCalendarIndicatorType_Unknown = 0;
EarningsCalendarIndicatorType_PubType = 1; //[Exact value] Publish type (valueList, EarningsCalendarPubType)
EarningsCalendarIndicatorType_EstimateType = 2; //[Exact value] Indicator type (valueList, EarningsCalendarEstimateType)
EarningsCalendarIndicatorType_MarketCap = 3; //[Range] Market cap
EarningsCalendarIndicatorType_StockListType = 4; //[Exact value] Stock list type (valueList, EarningsCalendarStockListType)
EarningsCalendarIndicatorType_OptionVolume = 5; //[Range] Option volume (HK/US stocks only)
EarningsCalendarIndicatorType_IV = 6; //[Range] Implied volatility(%) (HK/US stocks only)
EarningsCalendarIndicatorType_IVRank = 7; //[Range] IV level(%) (HK/US stocks only)
EarningsCalendarIndicatorType_IVPercentile = 8; //[Range] IV percentile(%) (HK/US stocks only)
EarningsCalendarIndicatorType_RtMarketCap = 9; //[Range] Real-time market cap
}
// Earnings calendar filter conditions
message EarningsCalendarIndicator {
required int32 indicatorType = 1; // EarningsCalendarIndicatorType
optional Qot_OptionCommon.IndicatorValue indicatorValue = 2; // Filter conditions
}
// Earnings forecast data
message EstimateData {
optional int32 estimateType = 1; // EarningsCalendarEstimateType
optional double actualValue = 2; // Actual value (available when published)
optional double predictValue = 3; // Forecast value
optional string currency = 4; // Currency unit (ISO 4217)
optional int32 periodType = 5; // EarningsCalendarPeriodType
}
// Earnings calendar item
message EarningsCalendarItem {
required Qot_Common.Security security = 1; // Stock
optional string name = 2; // Stock name
optional string earningsDate = 3; // Earnings date ("yyyy-MM-dd")
optional double earningsTimestamp = 4; // Earnings report publish timestamp (seconds)
optional int32 pubType = 5; // EarningsCalendarPubType
optional string periodText = 7; // Fiscal period (e.g. "2025Q1")
repeated EstimateData estimateList = 8; // Forecast data list
// Option fields (HK/US stocks only)
optional int64 optionVolume = 10; // Option volume
optional double iv = 11; // Implied volatility(%)
optional double ivRank = 12; // IV level(%)
optional double ivPercentile = 13; // IV percentile(%)
// Quote field
optional double marketCap = 20; // Real-time market cap
optional double price = 21; // Last price
}
message C2S {
required int32 market = 1; // Qot_Common.QotMarket (supports HK/US/CNSH/CNSZ/SG/JP/AU/CA)
optional int32 sortType = 2; // EarningsCalendarSortType (default Hot)
optional string beginDate = 3; // Start date, format "yyyy-MM-dd", default today if omitted (fetch current day only)
optional string endDate = 4; // End date, format "yyyy-MM-dd", fetches beginDate only if omitted; max 7 days from beginDate
repeated EarningsCalendarIndicator filterList = 5; // Filter conditions (AND relationship)
}
message S2C {
repeated EarningsCalendarItem itemList = 1;
}
message Request {
required C2S c2s = 1;
}
message Response {
required int32 retType = 1 [default = -400]; //RetType, return result
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
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
- For interface result, refer to RetType
Protocol ID
3401
Example
import mmWebsocket from "moomoo-api";
import { Common, Qot_Common } from "moomoo-api/proto";
import beautify from "js-beautify";
function QotGetEarningsCalendar(){
const { RetType } = Common
let [addr, port, enable_ssl, key] = ["127.0.0.1", 11111, false, "xxxxxx"];
let websocket = new mmWebsocket();
websocket.onlogin = (ret, msg)=>{
if (ret) {
const req = {
c2s: {
market: 11, // Qot_Common.QotMarket_US
beginDate: "2026-06-22",
endDate: "2026-06-22",
},
};
websocket.GetEarningsCalendar(req)
.then((res)=>{
let { errCode, retMsg, retType, s2c } = res
console.log("GetEarningsCalendar: 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("start error", msg);
}
};
websocket.start(addr, port, enable_ssl, key);
setTimeout(()=>{ websocket.stop(); process.exit(); }, 5000);
}
QotGetEarningsCalendar()
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
- Output
GetEarningsCalendar: errCode 0, retMsg , retType 0
{
"itemList": [
{ "security": { "market": 11, "code": "FRVO" }, "name": "FERVO ENERGY COMPANY", "earningsDate": "2026-06-22", "pubType": 1 },
{ "security": { "market": 11, "code": "BCKIY" }, "name": "BABCOCK INTERNATIONAL GROUP UNSP ADR", "earningsDate": "2026-06-22", "pubType": 0 },
{ "security": { "market": 11, "code": "POWW" }, "name": "Outdoor Holding", "earningsDate": "2026-06-22", "pubType": 1 }
]
}
2
3
4
5
6
7
8
API Limits
- Maximum 60 requests within 30 seconds
- Only the first page of paginated requests counts toward rate limiting