返回介绍

开始入门

操作指引

SDK

数据文档

常见问题

量化工具

其他

其他

枚举常量

发布于 2024-06-22 12:53:28 字数 7459 浏览 0 评论 0 收藏 0

委托状态OrderStatus

enum OrderStatus
{
	OrderStatus_Unknown = 0,
	OrderStatus_New = 1,                   //已报
	OrderStatus_PartiallyFilled = 2,       //部成
	OrderStatus_Filled = 3,                //已成
	OrderStatus_Canceled = 5,              //已撤
	OrderStatus_PendingCancel = 6,         //待撤
	OrderStatus_Rejected = 8,              //已拒绝
	OrderStatus_PendingNew = 10,           //待报
	OrderStatus_Expired = 12,              //已过期

};

委托方向OrderSide

enum OrderSide
{
	OrderSide_Unknown = 0,
	OrderSide_Buy = 1,    //买入
	OrderSide_Sell = 2,    //卖出
};

委托类型OrderType

enum OrderType
{
	OrderType_Unknown = 0,
	OrderType_Limit = 1,    //限价委托
	OrderType_Market = 2,    //市价委托
	OrderType_Stop = 3,    //止损止盈委托
};

委托时间属性OrderDuration

enum OrderDuration
{
	OrderDuration_Unknown = 0,
	OrderDuration_FAK = 1,  //即时成交剩余撤销(fill and kill)
	OrderDuration_FOK = 2,  //即时全额成交或撤销(fill or kill)
	OrderDuration_GFD = 3,  //当日有效(good for day)
	OrderDuration_GFS = 4,  //本节有效(good for section)
	OrderDuration_GTD = 5,  //指定日期前有效(goodl till date)
	OrderDuration_GTC = 6,  //撤销前有效(good till cancel)
	OrderDuration_GFA = 7,  //集合竞价前有效(good for auction)
};

委托成交属性OrderQualifier

enum OrderQualifier
{
	OrderQualifier_Unknown = 0,
	OrderQualifier_BOC = 1,  //对方最优价格(best of counterparty)
	OrderQualifier_BOP = 2,  //己方最优价格(best of party)
	OrderQualifier_B5TC = 3,  //最优五档剩余撤销(best 5 then cancel)
	OrderQualifier_B5TL = 4,  //最优五档剩余转限价(best 5 then limit)
};

执行回报类型ExecType

enum ExecType
{
	ExecType_Trade = 15,                   //成交
	ExecType_CancelRejected = 19,          //撤单被拒绝
};

开平仓类型PositionEffect

enum PositionEffect
{
	PositionEffect_Unknown = 0,
	PositionEffect_Open = 1,     //开仓
	PositionEffect_Close = 2,     //平仓,具体语义取决于对应的交易所
	PositionEffect_CloseToday = 3,     //平今仓
	PositionEffect_CloseYesterday = 4,     //平昨仓
};

持仓方向PositionSide

enum PositionSide
{
	PositionSide_Unknown = 0,
	PositionSide_Long = 1,   //多方向
	PositionSide_Short = 2,   //空方向
};

订单拒绝原因OrderRejectReason

enum OrderRejectReason
{
	OrderRejectReason_Unknown = 0,                           //未知原因
	OrderRejectReason_RiskRuleCheckFailed = 1,               //不符合风控规则
	OrderRejectReason_NoEnoughCash = 2,                      //资金不足
	OrderRejectReason_NoEnoughPosition = 3,                  //仓位不足
	OrderRejectReason_IllegalAccountId = 4,                  //非法账户ID
	OrderRejectReason_IllegalStrategyId = 5,                 //非法策略ID
	OrderRejectReason_IllegalSymbol = 6,                     //非法交易代码
	OrderRejectReason_IllegalVolume = 7,                     //非法委托量
	OrderRejectReason_IllegalPrice = 8,                      //非法委托价
	OrderRejectReason_AccountDisabled = 10,                  //交易账号被禁止交易
	OrderRejectReason_AccountDisconnected = 11,              //交易账号未连接
	OrderRejectReason_AccountLoggedout = 12,                 //交易账号未登录
	OrderRejectReason_NotInTradingSession = 13,              //非交易时段
	OrderRejectReason_OrderTypeNotSupported = 14,            //委托类型不支持
	OrderRejectReason_Throttle = 15,                         //流控限制
	OrderRejectReason_SymbolSusppended = 16,                 //交易代码停牌
	OrderRejectReason_Internal = 999,                        //内部错误

	CancelOrderRejectReason_OrderFinalized = 101,            //委托已完成
	CancelOrderRejectReason_UnknownOrder = 102,              //未知委托
	CancelOrderRejectReason_BrokerOption = 103,              //柜台设置
	CancelOrderRejectReason_AlreadyInPendingCancel = 104,    //委托撤销中
};

仓位变更原因CashPositionChangeReason

enum CashPositionChangeReason
{
	CashPositionChangeReason_Unknown = 0,
	CashPositionChangeReason_Trade = 1,  //交易
	CashPositionChangeReason_Inout = 2,  //出入金/出入持仓
	CashPositionChangeReason_Dividend = 3,  //分红送股
};

交易账户状态AccountState


enum AccountState
{
	State_UNKNOWN = 0,       //未知
	State_CONNECTING = 1,    //连接中
	State_CONNECTED = 2,     //已连接
	State_LOGGEDIN = 3,      //已登录
	State_DISCONNECTING = 4, //断开中
	State_DISCONNECTED = 5,  //已断开
	State_ERROR = 6          //错误
};

算法单状态,暂停/恢复算法单时有效AlgoOrderStatus

enum AlgoOrderStatus
{
	AlgoOrderStatus_Unknown = 0,
	AlgoOrderStatus_Resume = 1,                  //恢复母单
	AlgoOrderStatus_Pause = 2,                   //暂停母单
	AlgoOrderStatus_PauseAndCancelSubOrders = 3  //暂算母单并撤子单
};

头寸来源(仅适用融券融券)PositionSrc

enum PositionSrc
{
	PositionSrc_Unknown = 0,
	PositionSrc_L1 = 1,          //普通池
	PositionSrc_L2 = 2           //专项池
};

证券类型SecurityType

enum SecurityType
{
	SecurityType_Unknown = 0,
	SecurityType_Stock = 1,  //股票
	SecurityType_Fund = 2,   //基金
	SecurityType_Index = 3,  //指数
	SecurityType_Future = 4,  //期货
	SecurityType_Option = 5,  //期权
	SecurityType_Credit = 6,  //两融
	SecurityType_Bond = 7,    //债券
	SecurityType_Bond_Convertible = 8 //可债券
};

业务类型OrderBusiness

enum OrderBusiness
{
	OrderBusiness_NORMAL = 0,                         //普通交易
	OrderBusiness_IPO_BUY = 100,                      //新股申购
	OrderBusiness_CREDIT_BOM = 200,                   //融资买入(buying on margin)
	OrderBusiness_CREDIT_SS = 201,                    //融券卖出(short selling)
	OrderBusiness_CREDIT_RSBBS = 202,                 //买券还券(repay share by buying share)
	OrderBusiness_CREDIT_RCBSS = 203,                 //卖券还款(repay cash by selling share)
	OrderBusiness_CREDIT_DRS = 204,                   //直接还券(directly repay share)
	OrderBusiness_CREDIT_DRC = 211,                   //直接还款(directly repay cash)
	OrderBusiness_CREDIT_CPOM = 205,                  //融资平仓(close position on margin)
	OrderBusiness_CREDIT_CPOSS = 206,                 //融券平仓(close position on short selling)
	OrderBusiness_CREDIT_BOC = 207,                   //担保品买入(buying on collateral)
	OrderBusiness_CREDIT_SOC = 208,                   //担保品卖出(selling on collateral)
	OrderBusiness_CREDIT_CI = 209,                    //担保品转入(collateral in)
	OrderBusiness_CREDIT_CO = 210,                    //担保品转出(collateral out)
	OrderBusiness_ETF_BUY = 301,                      //ETF申购(purchase)
	OrderBusiness_ETF_RED = 302,                      //ETF赎回(redemption)
	OrderBusiness_FUND_SUB = 303,                     //基金认购(subscribing)
	OrderBusiness_FUND_BUY = 304,                     //基金申购(purchase)
	OrderBusiness_FUND_RED = 305,                     //基金赎回(redemption)
	OrderBusiness_FUND_CONVERT = 306,                 //基金转换(convert)
	OrderBusiness_FUND_SPLIT = 307,                   //基金分拆(split)
	OrderBusiness_FUND_MERGE = 308,                   //基金合并(merge)
	OrderBusiness_BOND_RRP = 400,                     //债券逆回购(reverse repurchase agreement (RRP) or reverse repo)
	OrderBusiness_BOND_CONVERTIBLE_BUY = 401,         //可转债申购(purchase)
	OrderBusiness_BOND_CONVERTIBLE_CALL = 402,        //可转债转股
	OrderBusiness_BOND_CONVERTIBLE_PUT = 403,         //可转债回售
	OrderBusiness_BOND_CONVERTIBLE_PUT_CANCEL = 404   //可转债回售撤销
};

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文