Caplin Trader 5.1.0

Class: module:ct-trading/restoration/TradeRestoreEvent

module:ct-trading/restoration/TradeRestoreEvent(oTrade, sPreviousState, sRestoreState, mPreviousFieldData, mRestoredFieldData)

new module:ct-trading/restoration/TradeRestoreEvent(oTrade, sPreviousState, sRestoreState, mPreviousFieldData, mRestoredFieldData)

An event which is fired before and after a trade is restored.

Parameters:
Name Type Description
oTrade module:ct-trading/trademodel/Trade

The trade that was restored.

sPreviousState String

The state that the trade was in before restoring.

sRestoreState String

The state that the trade is restoring to.

mPreviousFieldData Map

The data of the trade before the trade was restored.

mRestoredFieldData Map

The data of the trade after the trade was restored.

See:

Methods

getPreviousFieldData() → {Map}

Returns the data of the trade prior to being restored. This includes previous leg data (prefixed with 'L<legId>' eg 'L1').

Returns:

The previous trade data.

Type
Map

getPreviousState() → {String}

Returns the previous state that the trade was in.

See:
Returns:

The previous state.

Type
String

getRestoredFieldData() → {Map}

Returns the data that the trade will be restored with.

Returns:

The restored trade data.

Type
Map

getRestoreState() → {String}

Returns the state that the trade is restoring into.

See:
Returns:

The state the trade is restoring into.

Type
String

getTrade() → {module:ct-trading/trademodel/Trade}

Returns the trade that is being restored. This may be null if this is a module:ct-trading/restoration/TradeRestoredListener#beforeTradeRestored event and the trade currently does not exist on the client.

Returns:

The restored trade.

Type
module:ct-trading/trademodel/Trade