交易 COM API Events

TCTradeWrapperAPI events

OnCommandMsg

TCore传送出讯息。

OnCommandMsg([in] LONG MsgType, [in] LONG MsgCode, [in] BSTR MsgString);

Parameters

类型

说明

MsgType

long

讯息Type

1 : MSG_TYPE_ERROR

2 : MSG_SYSTEM_STATUS

MsgCode

long

讯息数值资料

0 : STATUS_DISCONNECTED

1 : STATUS_CONNECTING

2 : STATUS_CONNECTED

MsgString

string

讯息字串资料

OnAccountUpdate

帐号及帐务资料更新通知。可呼叫methods GetAccountData,重新取得最新的帐务资料。

OnAccountUpdate([in] LONG Type, [in] BSTR AcctMask, [in] LONG Count);

Parameters

类型

说明

Type

long

1 : 帐号

5 : 查询 证券/期货/期权权益数

6 : 查询 证券/期货/期权部位

7 : 主推 即时 证券/期货/期权部位

9 : 主推 即时 证券/期货/期权权益数

31 : 群组帐号

AcctMask

string

更新帐务的帐号。

Count

long

资料笔数。

OnReportReset

回报重整所有回报更新通知。可呼叫methods GetReportData,重新取得所有回报。

OnReportReset();

OnExecutionReport

回报资料更新通知。呼叫methods GetReportData,帶入ReportID取得更新当笔回报。

OnExecutionReport([in] BSTR ReportID);

Parameters

类型

说明

ReportID

string

更新当笔回报的RportID。

OnFilledReport

成交回报资料更新通知。呼叫methods GetReportData,帶入ReportID取得更新当笔回报。

OnFilledReport ([in] BSTR ReportID);

Parameters

类型

说明

ReportID

string

更新当笔回报的RportID。

OnInstrumentInfoUpdate

商品的交易设定资料更新通知。可呼叫methods GetInstrumentInfo,重新取得最新商品资讯。

OnInstrumentInfoUpdate();

Last updated