# Excel VBA callbacks

## OnConnectionStatus

连线状态通知

```csharp
void OnConnectionStatus(string SystemName, string status);
```

| **Parameters** |                                                            |
| -------------- | ---------------------------------------------------------- |
| SystemName     | TCore系统名称                                                  |
| status         | <p>1 : Connected</p><p>0 : Logout<br>-1 : Connect lost</p> |

## OnReportReset

回报重&#x6574;**，**&#x6240;有回报更新通知。请清除所有回报，所有回报会从[OnExecutionReport](#onexecutionreport)重新推送。

```csharp
void OnReportReset();
```

## OnExecutionReport

回报资料更新通知。

```csharp
void OnExecutionReport(TCExcelLib.order order, Boolean isReportReset);
```

| **Parameters** |                                                                                                                            |
| -------------- | -------------------------------------------------------------------------------------------------------------------------- |
| order          | [TCExcelLib.order](https://algomaster.gitbook.io/tcore-api/excellib-can-shu-yu-hui-fu#hui-bao-wu-jian-tcexcelliborder)回报物件 |
| isReportReset  | <p>Ture : 回报重整，推送的回报。</p><p>False : 实时主推回报。</p>                                                                            |

## OnMarginUpdate

资金帐务更新

```csharp
void OnMarginUpdate(Margin margin);
```

| **Parameters** |                                                                                                                             |
| -------------- | --------------------------------------------------------------------------------------------------------------------------- |
| margin         | [TCExcelLib.margin](https://algomaster.gitbook.io/tcore-api/excellib-can-shu-yu-hui-fu#zi-jin-wu-jian-tcexcellibmargin)资金物件 |

## OnPositionUpdate

部位帐务更新

```csharp
void OnPositionUpdate(Position position);
```

| **Parameters** |                                                                                                                                 |
| -------------- | ------------------------------------------------------------------------------------------------------------------------------- |
| position       | [TCExcelLib.position](https://algomaster.gitbook.io/tcore-api/excellib-can-shu-yu-hui-fu#bu-wei-wu-jian-tcexcellibposition)部位物件 |
