#ifndef __TC_QUOTE_API_DEFINITIONS_H_
#define __TC_QUOTE_API_DEFINITIONS_H_

#define CONNECTION_STATUS_RECONNECT_FAIL	-5		//重连失败
#define CONNECTION_STATUS_DISCONNECTED		-4		//已结束连线
#define CONNECTION_STATUS_CONNECT_LOST		-3		//连线中断
#define CONNECTION_STATUS_LOGIN_FAIL		-2		//登入失败
#define CONNECTION_STATUS_CONNECT_FAIL		-1		//连线失败
#define CONNECTION_STATUS_CONNECTING		0		//连线中
#define CONNECTION_STATUS_CONNECT_OK		1		//连线完成
#define CONNECTION_STATUS_INFO				2		//其他错误
#define CONNECTION_STATUS_RECONNECTING		3		//断线重连中
#define CONNECTION_STATUS_EXCHANGE_CLEAR	4		//交易所清盘
#define CONNECTION_STATUS_SUBSECURITY_CLEAR	5		//订阅中品种清盘

#define DATA_TYPE_REALTIME		1
#define DATA_TYPE_MATCH_LIST	2
#define DATA_TYPE_PRICE_LIST	3
#define DATA_TYPE_1K					4
#define DATA_TYPE_DK					5
#define DATA_OPTION_GREEKS	6
#define DATA_USEDEF_QUOTE		7
#define DATA_TYPE_DK_SP_CLOSE	8

#define SECURITY_TYPE_ALL			0
#define SECURITY_TYPE_STOCK			1
#define SECURITY_TYPE_FUTURE		2
#define SECURITY_TYPE_OPTION		3
#define SECURITY_TYPE_SYMBOL		9

#define COMMAND_MSG_TYPE_ERROR		1
#define COMMAND_MSG_SYSTEM_STATUS	2
#define COMMAND_MSG_SYMBOLLOOKUP	3

#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_USEDEF		7

#define SYMBOL_LOOKUP_TYPE_SYNC		1
#define SYMBOL_LOOKUP_TYPE_ASYNC	2

#endif //__TC_QUOTE_DEFINITIONS_H_
