TradeCancel

Cancel both sides of a trade in the System.

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 IgnoreHoldings is not true, the Holding changes from the Trade
  • If IgnoreLevelOne is 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

NameTypeSize (bytes)Description
MessageTypeInteger (unsigned)2The unique identifier of this message.
ClientIdInteger (unsigned)4The unique identifier of a session with the server, returned in a successful LoginReply message.
RequestIdInteger (unsigned)4Within each session each message must be uniquely identified by this field. It must be monotonically increasing for the duration of the session.

Fields

NameTypeSize (bytes)Description
IdForeign key to Trade8The Id of the trade to be cancelled.
IgnoreHoldingsInteger (unsigned)1Do not adjust the Holdings when cancelling the trades
IgnoreLevelOneInteger (unsigned)1Do not adjust the Level One values when cancelling the trades