TradeCancel
Cancel both sides of a trade in the System.
- Section: Transactions
- Related Message: TradeCancelReply
Please note that serious consideration should be given before cancelling a trade, and each case should be evaluated in depth before performing this transaction.
The TradeCancel message unwinds the effects of the Trade in MarketGrid only. Any other external integrations e.g. banking or registry holdings will need to be handled separately and explicitly.
The transaction will reverse:
- If
IgnoreHoldingsis not true, the Holding changes from the Trade - If
IgnoreLevelOneis not true, the LevelOne changes from the Trade
Both sides of the Trade are updated with TradeStatus = Cancelled.
Both sides of the Trade are updated with Reason = Cancelled.
Metadata
- Message Type: TransactionMessage
- Message Number: 1008
Inherited fields
| Name | Type | Size (bytes) | Description |
|---|---|---|---|
| MessageType | Integer (unsigned) | 2 | The unique identifier of this message. |
| ClientId | Integer (unsigned) | 4 | The unique identifier of a session with the server, returned in a successful LoginReply message. |
| RequestId | Integer (unsigned) | 4 | Within each session each message must be uniquely identified by this field. It must be monotonically increasing for the duration of the session. |
Fields
| Name | Type | Size (bytes) | Description |
|---|---|---|---|
| Id | Foreign key to Trade | 8 | The Id of the trade to be cancelled. |
| IgnoreHoldings | Integer (unsigned) | 1 | Do not adjust the Holdings when cancelling the trades |
| IgnoreLevelOne | Integer (unsigned) | 1 | Do not adjust the Level One values when cancelling the trades |