Caplin Trader 5.1.0

Class: module:ct-fx/providers/PermissionedCurrencyPairService

module:ct-fx/providers/PermissionedCurrencyPairService(currencyNamespaceopt)

new module:ct-fx/providers/PermissionedCurrencyPairService(currencyNamespaceopt)

Defines an implementation of a ct-fx/services/CurrencyPairService that uses the permission service for a source of currency pairs.

Parameters:
Name Type Attributes Default Description
currencyNamespace String <optional>
'CurrencyPair'

The permission namespace to use to get the currency pairs.

Implements:

Methods

addCurrencyPairListener(sCurrencyPair, fCallback)

Registers a function that is executed whenever the available currency pairs for the logged in user change.

Parameters:
Name Type Description
sCurrencyPair String

oTradeRestoredListener The listener to add.

fCallback function

Function with 2 parameters: 1) The user that the currency pairs are for 2) An array of Currency Pairs.

Implements:
See:

removeCurrencyPairListener(fCallback)

Removes the previously registered CurrencyPairListener.

Parameters:
Name Type Description
fCallback function

The previously registered callback function for removal.

Implements:
See: