#ifndef __TC_TRADE_API_DEFINITIONS_H_
#define __TC_TRADE_API_DEFINITIONS_H_

#define CONNECT_STATUS_DISCONNECTED	0
#define CONNECT_STATUS_CONNECTING	1
#define CONNECT_STATUS_CONNECTED	2

#define CONNECT_RETURN_CONNECTED	2
#define CONNECT_RETURN_CONNECTING	1
#define CONNECT_RETURN_FAIL			0

#define COMMAND_MSG_TYPE_ERROR		1
#define COMMAND_MSG_SYSTEM_STATUS	2
#define COMMAND_MSG_BROKER_READY				3
#define COMMAND_MSG_PERMISSION_READY			4
#define COMMAND_MSG_PRIVATE_STORAGE_UPDATE		5
#define COMMAND_MSG_GLOBAL_STORAGE_UPDATE		6
#define COMMAND_MSG_GENERAL_QUERY_RESULT		7
#define COMMAND_MSG_MEMBER_LOGIN_PROFILE		20

#define ERROR_CODE_UNDEFINED			0
#define ERROR_CODE_CONNECT_FAIL			1
#define ERROR_CODE_REGISTER_FAIL		2
#define ERROR_OPERATE_BEFORE_CONNECTED	3
#define ERROR_BAD_DATA_PARAMETERS		4
#define ERROR_SUBQUOTE_DUPLICATED		5
#define ERROR_UNSUBQUOTE_FAILED			6

#define SECURITY_TYPE_ALL				0
#define SECURITY_TYPE_STOCK			1
#define SECURITY_TYPE_FUTURE		2
#define SECURITY_TYPE_OPTION			3
#define SECURITY_TYPE_FUTURE2		4
#define SECURITY_TYPE_OPTION2		5
#define SECURITY_TYPE_SYMBOL_STOCK		8
#define SECURITY_TYPE_SYMBOL_FUTURE		9
#define SECURITY_TYPE_SYMBOL_OPTION		10

#define ADT_ACCOUNT					1	//帐号
#define ADT_BANK						3  //银行帐号
#define ADT_MARGIN						5	//证券/期货/期权权益数
#define ADT_POSITION					6	//证券/期货/期权部位
#define ADT_RT_POSITION				7	//即时 证券/期货/期权部位
#define ADT_DETAIL_POSITION		8	//部位明细
#define ADT_RT_MARGIN				9	//即时 证券/期货/期权权益数
#define ADT_SUMPOSITION_ONLY		10
#define ADT_FUT_CLOSED			12  //期货当日平仓	
#define ADT_BANKTRANSFER	    13    // 出入金查询
#define ADT_POSITION_ZERO				14	//证券/期货/期权平完部位
#define ADT_EXERCISE_STATUS	21 //行权状态
#define ADT_GROUP_ACCOUNT	31	//群组帐号

#define DSFT_QUERY_MARGIN	101
#define DSFT_QUERY_POSITION	102
#define DSFT_QUERY_YPOSITION	103
#define DSFT_QUERY_DETAILPOSITION		104
#define DSFT_QUERY_SUMPOSITION_ONLY	107

#endif //__TC_TRADE_API_DEFINITIONS_H_
