# General Definitions
# Interface Result
- Python
- Proto
- C#
- Java
- C++
- JavaScript
RET_CODE
RET_OKSuccess
RET_ERRORFailed
RetType
enum RetType
{
RetType_Succeed = 0; //Success
RetType_Failed = -1; //Failed
RetType_TimeOut = -100; //Timeout
RetType_Unknown = -400; //Unknown result
}
2
3
4
5
6
7
RetType
enum RetType
{
RetType_Succeed = 0; //Success
RetType_Failed = -1; //Failed
RetType_TimeOut = -100; //Timeout
RetType_Unknown = -400; //Unknown result
}
2
3
4
5
6
7
RetType
enum RetType
{
RetType_Succeed = 0; //Success
RetType_Failed = -1; //Failed
RetType_TimeOut = -100; //Timeout
RetType_Unknown = -400; //Unknown result
}
2
3
4
5
6
7
RetType
enum RetType
{
RetType_Succeed = 0; //Success
RetType_Failed = -1; //Failed
RetType_TimeOut = -100; //Timeout
RetType_Unknown = -400; //Unknown result
}
2
3
4
5
6
7
RetType
enum RetType
{
RetType_Succeed = 0; //Success
RetType_Failed = -1; //Failed
RetType_TimeOut = -100; //Timeout
RetType_Unknown = -400; //Unknown result
}
2
3
4
5
6
7
# Protocol Format
- Python
- Proto
- C#
- Java
- C++
- JavaScript
ProtoFMT
ProtobufGoogle Protobuf
JsonJson
ProtoFmt
enum ProtoFmt
{
ProtoFmt_Protobuf = 0; //Google Protobuf
ProtoFmt_Json = 1; //Json
}
2
3
4
5
ProtoFmt
enum ProtoFmt
{
ProtoFmt_Protobuf = 0; //Google Protobuf
ProtoFmt_Json = 1; //Json
}
2
3
4
5
ProtoFmt
enum ProtoFmt
{
ProtoFmt_Protobuf = 0; //Google Protobuf
ProtoFmt_Json = 1; //Json
}
2
3
4
5
ProtoFmt
enum ProtoFmt
{
ProtoFmt_Protobuf = 0; //Google Protobuf
ProtoFmt_Json = 1; //Json
}
2
3
4
5
ProtoFmt
enum ProtoFmt
{
ProtoFmt_Protobuf = 0; //Google Protobuf
ProtoFmt_Json = 1; //Json
}
2
3
4
5
# Packet Encryption Algorithm
- Python
- Proto
- C#
- Java
- C++
- JavaScript
PacketEncAlgo
enum PacketEncAlgo
{
PacketEncAlgo_FTAES_ECB = 0; //AES ECB mode encryption modified by Futu
PacketEncAlgo_None = -1; //No encryption
PacketEncAlgo_AES_ECB = 1; //Standard AES ECB mode encryption
PacketEncAlgo_AES_CBC = 2; //Standard AES CBC mode encryption
}
2
3
4
5
6
7
enum PacketEncAlgo
{
PacketEncAlgo_FTAES_ECB = 0; //AES ECB mode encryption modified by moomoo
PacketEncAlgo_None = -1; //No encryption
PacketEncAlgo_AES_ECB = 1; //Standard AES ECB mode encryption
PacketEncAlgo_AES_CBC = 2; //Standard AES CBC mode encryption
}
2
3
4
5
6
7
PacketEncAlgo
enum PacketEncAlgo
{
PacketEncAlgo_FTAES_ECB = 0; //AES ECB mode encryption modified by Futu
PacketEncAlgo_None = -1; //No encryption
PacketEncAlgo_AES_ECB = 1; //Standard AES ECB mode encryption
PacketEncAlgo_AES_CBC = 2; //Standard AES CBC mode encryption
}
2
3
4
5
6
7
enum PacketEncAlgo
{
PacketEncAlgo_FTAES_ECB = 0; //AES ECB mode encryption modified by moomoo
PacketEncAlgo_None = -1; //No encryption
PacketEncAlgo_AES_ECB = 1; //Standard AES ECB mode encryption
PacketEncAlgo_AES_CBC = 2; //Standard AES CBC mode encryption
}
2
3
4
5
6
7
# Program Status Type
- Python
- Proto
- C#
- Java
- C++
- JavaScript
ProgramStatusType
NONEUnknown
LOADEDThe necessary modules have been loaded
LOGINGLogging in
NEED_PIC_VERIFY_CODENeed graphic verification code
NEED_PHONE_VERIFY_CODENeed mobile phone verification code
LOGIN_FAILEDLogin failed
FORCE_UPDATEThe client version is too low
NESSARY_DATA_PREPARINGPulling necessary information
NESSARY_DATA_MISSINGMissing necessary information
UN_AGREE_DISCLAIMERDisclaimer is not agreed
READYReady to use
FORCE_LOGOUTOpenD was forced to log out
ProgramStatusType
enum ProgramStatusType
{
ProgramStatusType_None = 0;
ProgramStatusType_Loaded = 1; //Operations such as loading configuration and starting the server have been completed, and the status before the server is started does not need to be returned
ProgramStatusType_Loging = 2; //Logging in
ProgramStatusType_NeedPicVerifyCode = 3; //Need a graphic verification code
ProgramStatusType_NeedPhoneVerifyCode = 4; //Need phone verification code
ProgramStatusType_LoginFailed = 5; //Login failed, and the reason is returned in the description
ProgramStatusType_ForceUpdate = 6; //The client version is too low
ProgramStatusType_NessaryDataPreparing = 7; //Some necessary information like disclaimer is being pulled
ProgramStatusType_NessaryDataMissing = 8; //Missing necessary information
ProgramStatusType_UnAgreeDisclaimer = 9; //Disclaimer is not agreed
ProgramStatusType_Ready = 10; //Can receive and send the business protocol, normal available status
//OpenD is forced to log out after logging in, which will cause all the connections to be disconnected. You need to reconnect to get the following status (and need to be in ui mode)
ProgramStatusType_ForceLogout = 11; //Is forced to log out, because of changing the login password, opening the device lock, etc. The reason is returned in the description
ProgramStatusType_DisclaimerPullFailed = 12; //Failed to get disclaimers
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
ProgramStatusType
enum ProgramStatusType
{
ProgramStatusType_None = 0;
ProgramStatusType_Loaded = 1; //Operations such as loading configuration and starting the server have been completed, and the status before the server is started does not need to be returned
ProgramStatusType_Loging = 2; //Logging in
ProgramStatusType_NeedPicVerifyCode = 3; //Need a graphic verification code
ProgramStatusType_NeedPhoneVerifyCode = 4; //Need phone verification code
ProgramStatusType_LoginFailed = 5; //Login failed, and the reason is returned in the description
ProgramStatusType_ForceUpdate = 6; //The client version is too low
ProgramStatusType_NessaryDataPreparing = 7; //Some necessary information like disclaimer is being pulled
ProgramStatusType_NessaryDataMissing = 8; //Missing necessary information
ProgramStatusType_UnAgreeDisclaimer = 9; //Disclaimer is not agreed
ProgramStatusType_Ready = 10; //Can receive and send the business protocol, normal available status
//OpenD is forced to log out after logging in, which will cause all the connections to be disconnected. You need to reconnect to get the following status (and need to be in ui mode)
ProgramStatusType_ForceLogout = 11; //is forced to log out, because of changing the login password, opening the device lock, etc. The reason is returned in the description
ProgramStatusType_DisclaimerPullFailed = 12; //Failed to get disclaimers
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
ProgramStatusType
enum ProgramStatusType
{
ProgramStatusType_None = 0;
ProgramStatusType_Loaded = 1; //Operations such as loading configuration and starting the server have been completed, and the status before the server is started does not need to be returned
ProgramStatusType_Loging = 2; //Logging in
ProgramStatusType_NeedPicVerifyCode = 3; //Need a graphic verification code
ProgramStatusType_NeedPhoneVerifyCode = 4; //Need phone verification code
ProgramStatusType_LoginFailed = 5; //Login failed, and the reason is returned in the description
ProgramStatusType_ForceUpdate = 6; //The client version is too low
ProgramStatusType_NessaryDataPreparing = 7; //Some necessary information like disclaimer is being pulled
ProgramStatusType_NessaryDataMissing = 8; //Missing necessary information
ProgramStatusType_UnAgreeDisclaimer = 9; //Disclaimer is not agreed
ProgramStatusType_Ready = 10; //Can receive and send the business protocol, normal available status
//OpenD is forced to log out after logging in, which will cause all the connections to be disconnected. You need to reconnect to get the following status (and need to be in ui mode)
ProgramStatusType_ForceLogout = 11; //is forced to log out, because of changing the login password, opening the device lock, etc. The reason is returned in the description
ProgramStatusType_DisclaimerPullFailed = 12; //Failed to get disclaimers
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
ProgramStatusType
enum ProgramStatusType
{
ProgramStatusType_None = 0;
ProgramStatusType_Loaded = 1; //Operations such as loading configuration and starting the server have been completed, and the status before the server is started does not need to be returned
ProgramStatusType_Loging = 2; //Logging in
ProgramStatusType_NeedPicVerifyCode = 3; //Need a graphic verification code
ProgramStatusType_NeedPhoneVerifyCode = 4; //Need phone verification code
ProgramStatusType_LoginFailed = 5; //Login failed, and the reason is returned in the description
ProgramStatusType_ForceUpdate = 6; //The client version is too low
ProgramStatusType_NessaryDataPreparing = 7; //Some necessary information like disclaimer is being pulled
ProgramStatusType_NessaryDataMissing = 8; //Missing necessary information
ProgramStatusType_UnAgreeDisclaimer = 9; //Disclaimer is not agreed
ProgramStatusType_Ready = 10; //Can receive and send the business protocol, normal available status
//OpenD is forced to log out after logging in, which will cause all the connections to be disconnected. You need to reconnect to get the following status (and need to be in ui mode)
ProgramStatusType_ForceLogout = 11; //is forced to log out, because of changing the login password, opening the device lock, etc. The reason is returned in the description
ProgramStatusType_DisclaimerPullFailed = 12; //Failed to get disclaimers
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
ProgramStatusType
enum ProgramStatusType
{
ProgramStatusType_None = 0;
ProgramStatusType_Loaded = 1; //Operations such as loading configuration and starting the server have been completed, and the status before the server is started does not need to be returned
ProgramStatusType_Loging = 2; //Logging in
ProgramStatusType_NeedPicVerifyCode = 3; //Need a graphic verification code
ProgramStatusType_NeedPhoneVerifyCode = 4; //Need phone verification code
ProgramStatusType_LoginFailed = 5; //Login failed, and the reason is returned in the description
ProgramStatusType_ForceUpdate = 6; //The client version is too low
ProgramStatusType_NessaryDataPreparing = 7; //Some necessary information like disclaimer is being pulled
ProgramStatusType_NessaryDataMissing = 8; //Missing necessary information
ProgramStatusType_UnAgreeDisclaimer = 9; //Disclaimer is not agreed
ProgramStatusType_Ready = 10; //Can receive and send the business protocol, normal available status
//OpenD is forced to log out after logging in, which will cause all the connections to be disconnected. You need to reconnect to get the following status (and need to be in ui mode)
ProgramStatusType_ForceLogout = 11; //is forced to log out, because of changing the login password, opening the device lock, etc. The reason is returned in the description
ProgramStatusType_DisclaimerPullFailed = 12; //Failed to get disclaimers
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# OpenD Event Notification Type
- Python
- Proto
- C#
- Java
- C++
- JavaScript
GtwEventType
LocalCfgLoadFailedFailed to load the local configuration file
APISvrRunFailedFailed to run the OpenD monitoring service
ForceUpdateForce upgrade of the OpenD
LoginFailedFailed to log in to Futu servers
LoginFailedFailed to log in to moomoo servers
UnAgreeDisclaimerDid not agree to the disclaimer, unable to run
LOGIN_FAILEDLogin failed
NetCfgMissingMissing network connection configuration
KickedOutLogin kicked offline
LoginPwdChangedLogin password has been changed
BanLoginThis account is not allowed to log in by Futu servers
BanLoginThis account is not allowed to log in by moomoo servers
NeedPicVerifyCodeNeed graphic verification code
NeedPhoneVerifyCodeNeed mobile verification code
AppDataNotExistProgram package data loss
NessaryDataMissingThe necessary data is not synchronized successfully
TradePwdChangedTransaction password change notice
EnableDeviceLockNeed to enable device lock
GtwEventType
enum GtwEventType
{
GtwEventType_None = 0; //No error
GtwEventType_LocalCfgLoadFailed = 1; //Load local configuration failed
GtwEventType_APISvrRunFailed = 2; //Server start failed
GtwEventType_ForceUpdate = 3; //The client version is too low
GtwEventType_LoginFailed = 4; //Login failed
GtwEventType_UnAgreeDisclaimer = 5; //Disclaimer is not agreed
GtwEventType_NetCfgMissing = 6; //Missing necessary network configuration information. For example, to control the subscription quota //It has been optimized and this situation will not occur again
GtwEventType_KickedOut = 7; //Account is logged in elsewhere
GtwEventType_LoginPwdChanged = 8; //Login password has been changed
GtwEventType_BanLogin = 9; //User is forbidden to log in
GtwEventType_NeedPicVerifyCode = 10; //Need graphic verification code
GtwEventType_NeedPhoneVerifyCode = 11; //Need phone verification code
GtwEventType_AppDataNotExist = 12; //The program's own data does not exist
GtwEventType_NessaryDataMissing = 13; //Missing necessary data
GtwEventType_TradePwdChanged = 14; //Trading password has been changed
GtwEventType_EnableDeviceLock = 15; //Enable device lock
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
GtwEventType
enum GtwEventType
{
GtwEventType_None = 0; //No error
GtwEventType_LocalCfgLoadFailed = 1; //Load local configuration failed
GtwEventType_APISvrRunFailed = 2; //Server start failed
GtwEventType_ForceUpdate = 3; //The client version is too low
GtwEventType_LoginFailed = 4; //Login failed
GtwEventType_UnAgreeDisclaimer = 5; //Disclaimer is not agreed
GtwEventType_NetCfgMissing = 6; //Missing necessary network configuration information. For example, to control the subscription quota //It has been optimized and this situation will not occur again
GtwEventType_KickedOut = 7; //Account is logged in elsewhere
GtwEventType_LoginPwdChanged = 8; //Login password has been changed
GtwEventType_BanLogin = 9; //User is forbidden to log in
GtwEventType_NeedPicVerifyCode = 10; //Need graphic verification code
GtwEventType_NeedPhoneVerifyCode = 11; //Need phone verification code
GtwEventType_AppDataNotExist = 12; //The program's own data does not exist
GtwEventType_NessaryDataMissing = 13; //Missing necessary data
GtwEventType_TradePwdChanged = 14; //Trading password has been changed
GtwEventType_EnableDeviceLock = 15; //Enable device lock
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
GtwEventType
enum GtwEventType
{
GtwEventType_None = 0; //No error
GtwEventType_LocalCfgLoadFailed = 1; //Load local configuration failed
GtwEventType_APISvrRunFailed = 2; //Server start failed
GtwEventType_ForceUpdate = 3; //The client version is too low
GtwEventType_LoginFailed = 4; //Login failed
GtwEventType_UnAgreeDisclaimer = 5; //Disclaimer is not agreed
GtwEventType_NetCfgMissing = 6; //Missing necessary network configuration information. For example, to control the subscription quota //It has been optimized and this situation will not occur again
GtwEventType_KickedOut = 7; //Account is logged in elsewhere
GtwEventType_LoginPwdChanged = 8; //Login password has been changed
GtwEventType_BanLogin = 9; //User is forbidden to log in
GtwEventType_NeedPicVerifyCode = 10; //Need graphic verification code
GtwEventType_NeedPhoneVerifyCode = 11; //Need phone verification code
GtwEventType_AppDataNotExist = 12; //The program's own data does not exist
GtwEventType_NessaryDataMissing = 13; //Missing necessary data
GtwEventType_TradePwdChanged = 14; //Trading password has been changed
GtwEventType_EnableDeviceLock = 15; //Enable device lock
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
GtwEventType
enum GtwEventType
{
GtwEventType_None = 0; //No error
GtwEventType_LocalCfgLoadFailed = 1; //Load local configuration failed
GtwEventType_APISvrRunFailed = 2; //Server start failed
GtwEventType_ForceUpdate = 3; //The client version is too low
GtwEventType_LoginFailed = 4; //Login failed
GtwEventType_UnAgreeDisclaimer = 5; //Disclaimer is not agreed
GtwEventType_NetCfgMissing = 6; //Missing necessary network configuration information. For example, to control the subscription quota //It has been optimized and this situation will not occur again
GtwEventType_KickedOut = 7; //Account is logged in elsewhere
GtwEventType_LoginPwdChanged = 8; //Login password has been changed
GtwEventType_BanLogin = 9; //User is forbidden to log in
GtwEventType_NeedPicVerifyCode = 10; //Need graphic verification code
GtwEventType_NeedPhoneVerifyCode = 11; //Need phone verification code
GtwEventType_AppDataNotExist = 12; //The program's own data does not exist
GtwEventType_NessaryDataMissing = 13; //Missing necessary data
GtwEventType_TradePwdChanged = 14; //Trading password has been changed
GtwEventType_EnableDeviceLock = 15; //Enable device lock
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
GtwEventType
enum GtwEventType
{
GtwEventType_None = 0; //No error
GtwEventType_LocalCfgLoadFailed = 1; //Load local configuration failed
GtwEventType_APISvrRunFailed = 2; //Server start failed
GtwEventType_ForceUpdate = 3; //The client version is too low
GtwEventType_LoginFailed = 4; //Login failed
GtwEventType_UnAgreeDisclaimer = 5; //Disclaimer is not agreed
GtwEventType_NetCfgMissing = 6; //Missing necessary network configuration information. For example, to control the subscription quota //It has been optimized and this situation will not occur again
GtwEventType_KickedOut = 7; //Account is logged in elsewhere
GtwEventType_LoginPwdChanged = 8; //Login password has been changed
GtwEventType_BanLogin = 9; //User is forbidden to log in
GtwEventType_NeedPicVerifyCode = 10; //Need graphic verification code
GtwEventType_NeedPhoneVerifyCode = 11; //Need phone verification code
GtwEventType_AppDataNotExist = 12; //The program's own data does not exist
GtwEventType_NessaryDataMissing = 13; //Missing necessary data
GtwEventType_TradePwdChanged = 14; //Trading password has been changed
GtwEventType_EnableDeviceLock = 15; //Enable device lock
}
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# System Notification Type
- Python
- Proto
- C#
- Java
- C++
- JavaScript
SysNotifyType
GTW_EVENTGateway event
PROGRAM_STATUSProgram status changes
CONN_STATUSStatus of Connection to Futu servers has been changed
CONN_STATUSStatus of Connection to moomoo servers has been changed
QOT_RIGHTQuotes authority changed
NotifyType
enum NotifyType
{
NotifyType_None = 0; //None
NotifyType_GtwEvent = 1; //OpenD running event notification
NotifyType_ProgramStatus = 2; //Program status
NotifyType_ConnStatus = 3; //Connection status
NotifyType_QotRight = 4; //Quotes authority
NotifyType_APILevel = 5; //User level, has been deprecated after version 2.10
NotifyType_APIQuota = 6; //API Quota
}
2
3
4
5
6
7
8
9
10
NotifyType
enum NotifyType
{
NotifyType_None = 0; //None
NotifyType_GtwEvent = 1; //OpenD running event notification
NotifyType_ProgramStatus = 2; //Program status
NotifyType_ConnStatus = 3; //Connection status
NotifyType_QotRight = 4; //Quotes authority
NotifyType_APILevel = 5; //User level, has been deprecated after version 2.10
NotifyType_APIQuota = 6; //API Quota
}
2
3
4
5
6
7
8
9
10
NotifyType
enum NotifyType
{
NotifyType_None = 0; //None
NotifyType_GtwEvent = 1; //OpenD running event notification
NotifyType_ProgramStatus = 2; //Program status
NotifyType_ConnStatus = 3; //Connection status
NotifyType_QotRight = 4; //Quotes authority
NotifyType_APILevel = 5; //User level, has been deprecated after version 2.10
NotifyType_APIQuota = 6; //API Quota
}
2
3
4
5
6
7
8
9
10
NotifyType
enum NotifyType
{
NotifyType_None = 0; //None
NotifyType_GtwEvent = 1; //OpenD running event notification
NotifyType_ProgramStatus = 2; //Program status
NotifyType_ConnStatus = 3; //Connection status
NotifyType_QotRight = 4; //Quotes authority
NotifyType_APILevel = 5; //User level, has been deprecated after version 2.10
NotifyType_APIQuota = 6; //API Quota
}
2
3
4
5
6
7
8
9
10
NotifyType
enum NotifyType
{
NotifyType_None = 0; //None
NotifyType_GtwEvent = 1; //OpenD running event notification
NotifyType_ProgramStatus = 2; //Program status
NotifyType_ConnStatus = 3; //Connection status
NotifyType_QotRight = 4; //Quotes authority
NotifyType_APILevel = 5; //User level, has been deprecated after version 2.10
NotifyType_APIQuota = 6; //API Quota
}
2
3
4
5
6
7
8
9
10
# Package Unique Identifier
PacketID
message PacketID
{
required uint64 connID = 1; //The current TCP connection ID, the unique identifier of a connection, returned by the InitConnect protocol
required uint32 serialNo = 2; //Increment serial number
}
2
3
4
5
# Program Status
ProgramStatus
message ProgramStatus
{
required ProgramStatusType type = 1; //Current status
optional string strExtDesc = 2; //Additional description
}
2
3
4
5