RTCTradeAPISpi类-交易回调
RTCTradeAPISpi介面
OnFrontConnected
当客户端与TCore通信连接时,该方法被调用
void OnFrontConnected()
OnFrontDisconnected
当客户端与TCore通信连接断开时,该方法被调用。
void OnFrontDisconnected()
OnRspUserLogin
交易连线登录请求响应
void OnRspUserLogin(ICERspUserLoginField *pRspUserLogin, ICERspInfoField *pRspInfo, int nRequestID, bool bIsLast)
Parameters
|
类型 | 说明 |
pRspUserLogin
|
pointer
|
ICERspUserLoginField data struct
|
pRspInfo
|
pointer
|
ICERspInfoField data struct
|
nRequestID
|
int
|
|
bIsLast
|
bool
|
OnRspUserLogout
交易连线登出请求响应
void OnRspUserLogout(ICEUserLogoutField *pUserLogout, ICERspInfoField *pRspInfo, int nRequestID, bool bIsLast)
Parameters
|
类型
|
说明
|
pUserLogout
|
pointer
|
ICEUserLogoutField data struct
|
pRspInfo
|
pointer
|
ICERspInfoField data struct
|
nRequestID
|
int
|
|
bIsLast
|
bool
|
OnRspOrderInsert
报单录入请求响应
Callback |
|
|||||||||||||||
Description |
下单失败的错误码 -10 Unknow Error -11 买卖别不对 -12 复式单商品代码解晰错误 -13 下单帐号, 不可下此交易所商品 -14 下单错误, 不支援的价格 或 OrderType 或 TimeInForce -15 不支援证券下单 -20 连线未建立 -22 价格的TickSize错误 -23 下单数量超过该商品的上下限 -24 下单数量错误 -25 价格不能小于和等于0 (市价类型不会去检查) |
OnRspOrderAction
报单操作请求响应
Callback |
|
|||||||||||||||
Description |
删单错误码
-16 群组虚拟单, 不可删改单
-17 改单错误, 追价单 不可改量改价
-18 改单错误, Trailing 不可改量改价
改价改量错误码
-16 群组虚拟单, 不可删改单
-17 改单错误, 追价单 不可改量改价
-18 改单错误, Trailing 不可改量改价
-19 改单错误, TimeInForce 参数错误
-21 改单错误, 不支援spread改价改量
-22 价格的TickSize错误
-23 下单数量超过该商品的上下限
-24 下单数量错误
-25 价格不能小于和等于0 (市价类型不会去检查)
|
OnRspQryOrder
请求查询报单响应
void OnRspQryOrder(ICEOrderField *pOrder, ICERspInfoField *pRspInfo, int nRequestID, bool bIsLast)
Parameters
|
类型
|
说明
|
pOrder
|
pointer
|
ICEOrderField data struct
|
pRspInfo
|
pointer
|
ICERspInfoField data struct
|
nRequestID
|
int
|
|
bIsLast
|
bool
|
OnRspQryTrade
请求查询成交响应
void OnRspQryTrade(ICETradeField *pTrade, ICERspInfoField *pRspInfo, int nRequestID, bool bIsLast)
Parameters
|
类型
|
说明
|
pTrade
|
pointer
|
ICETradeField data struct
|
pRspInfo
|
pointer
|
ICERspInfoField data struct
|
nRequestID
|
int
|
|
bIsLast
|
bool
|
OnRspQryInvestorPosition
请求查询投资者持仓响应
void OnRspQryInvestorPosition(ICEInvestorPositionField *pInvestorPosition, ICERspInfoField *pRspInfo, int nRequestID, bool bIsLast)
Parameters
|
类型
|
说明
|
pInvestorPosition
|
pointer
|
ICEInvestorPositionField data struct
|
pRspInfo
|
pointer
|
ICERspInfoField data struct
|
nRequestID
|
int
|
|
bIsLast
|
bool
|
OnRspQryTradingAccount
请求查询资金账户响应
void OnRspQryTradingAccount(ICETradingAccountField *pTradingAccount, ICERspInfoField *pRspInfo, int nRequestID, bool bIsLast)
Parameters
|
类型
|
说明
|
pTradingAccount
|
pointer
|
ICETradingAccountField data struct
|
pRspInfo
|
pointer
|
ICERspInfoField data struct
|
nRequestID
|
int
|
|
bIsLast
|
bool
|
OnRtnOrder
报单通知
void OnRtnOrder(ICEOrderField *pOrder)
Parameters
|
类型
|
说明
|
pOrder
|
pointer
|
ICEOrderField data struct
|
OnRtnTrade
成交通知
void OnRtnTrade(ICETradeField *pTrade)
Parameters
|
类型
|
说明
|
pTrade
|
pointer
|
ICETradeField data struct
|
OnRspQryInstrument
请求查询合约响应
void OnRspQryInstrument(ICEInstrumentField *pInstrument, ICERspInfoField *pRspInfo, int nRequestID, bool bIsLast)
Parameters
|
类型
|
说明 |
pInstrument
|
pointer
|
ICEInstrumentField data struct
|
pRspInfo
|
pointer
|
ICERspInfoField data struct
|
nRequestID
|
int
|
|
bIsLast
|
bool
|
OnRspQryInvestorPositionDetail
请求查询投资者持仓明细响应
void OnRspQryInvestorPositionDetail(ICEInvestorPositionDetailField *pInvestorPositionDetail, ICERspInfoField *pRspInfo, int nRequestID, bool bIsLast)
Parameters
|
类型
|
说明
|
pInvestorPositionDetail
|
pointer
|
ICEInvestorPositionDetailField data struct
|
pRspInfo
|
pointer
|
ICERspInfoField data struct
|
nRequestID
|
int
|
|
bIsLast
|
bool
|
OnRspQryCombAction
请求查询申请组合响应
void OnRspQryCombAction(ICECombActionField *pCombAction, ICERspInfoField *pRspInfo, int nRequestID, bool bIsLast)
Parameters
|
类型
|
说明
|
pCombAction
|
pointer
|
|
pRspInfo
|
pointer
|
ICERspInfoField data struct
|
nRequestID
|
int
|
Content
|
bIsLast
|
bool
|
Content
|
OnSymbolClassificationsUpdate
分类表更新通知
void OnSymbolClassificationsUpdate()