com.apama.marketdata
Event Constants


Market data constants and actions to help process extra parameters e.g. the service, exchange and market ids.
Since:
CMF 1.1.0
Version:
10.0

Constant Summary
 constant stringCACHED_DEPTH := "MarketData.CachedDepth"

This extra parameter is to indicate a depth event is a repeated snapshot.
 constant stringEXCHANGE_EXTRA_PARAM := "Exchange"

The standard extra parameter used in Tick and Depth events to convey the exchange Id.
 constant stringMARKET_EXTRA_PARAM := "Market"

The standard extra parameter used in Tick and Depth events to convey the market Id.
 constant stringSERVICE_EXTRA_PARAM := "SERVICE_NAME"

The standard extra parameter used in Tick and Depth events to convey the service Id.
 constant stringSERVICE_NAME_EXTERNAL := "__SimpleMarketDataFirewallGatewayExternal"

The service id that should be used when writing applications that will be used with the firewall. The real adapter service id will be specified in the TARGET_SERVICE_EXTRA_PARAM extra parameter.
 constant stringSERVICE_NAME_INTERNAL := "__SimpleMarketDataFirewallGatewayInternal"

The service id that should be used when setting up listeners for firewall analytics. The real adapter service id will be specified in the TARGET_SERVICE_EXTRA_PARAM extra parameter.
 constant stringTARGET_SERVICE_EXTRA_PARAM := "Firewall.TargetService"

The standard extra parameter used in market data events to indicate the adapter service id that sent, or is to receive the events. The main service id being set to the internal or external firewall service id.
 
Action Summary
 booleanextraParamsMatch(dictionary<string, string > key, dictionary<string, string > instance)

This action is used by the market data key to ensure that the extra parameters e.g. from a depth event contain the same extra parameters that were in the initial subscription i.e. the key extra params.
 stringgetExchangeFromParams(dictionary<string, string > extraParams)

This action is used to extract the exchange id from the extra params of e.g. a Tick or Depth events.
 stringgetMarketFromParams(dictionary<string, string > extraParams)

This action is used to extract the market id from the extra params of e.g. a Tick or Depth events.
 stringgetServiceFromParams(dictionary<string, string > extraParams)

This action is used to extract the service id from the extra params of e.g. a Tick or Depth events.
 stringgetTargetServiceFromParams(dictionary<string, string > extraParams)

This action is used to extract the target service id from the extra params of e.g. a Tick or Depth events.
 
Constant Detail

CACHED_DEPTH

constant string CACHED_DEPTH := "MarketData.CachedDepth"
This extra parameter is to indicate a depth event is a repeated snapshot.

When a client subscribes to depth data, the latest depth event is re-routed so that the new subscriber doesn't have to wait for the next update. Some applications wont want to process this duplicated event, they can look at this extra parameter to see if the event is a repeat or not. Please note that not all adapters use the DepthPublisher and they may well not support this extra parameter. See the adapter documentation for details.
See Also:
com.apama.marketdata.DepthPublisher - The depth publisher will ensure that this extra parameter is added to snapshots.

EXCHANGE_EXTRA_PARAM

constant string EXCHANGE_EXTRA_PARAM := "Exchange"
The standard extra parameter used in Tick and Depth events to convey the exchange Id.
See Also:
com.apama.marketdata.MarketDataKey - If you are trying to test that a Tick or Depth event matches a subscription use the market data key, rather than using these constants directly

MARKET_EXTRA_PARAM

constant string MARKET_EXTRA_PARAM := "Market"
The standard extra parameter used in Tick and Depth events to convey the market Id.
See Also:
com.apama.marketdata.MarketDataKey - If you are trying to test that a Tick or Depth event matches a subscription use the market data key, rather than using these constants directly

SERVICE_EXTRA_PARAM

constant string SERVICE_EXTRA_PARAM := "SERVICE_NAME"
The standard extra parameter used in Tick and Depth events to convey the service Id.
See Also:
com.apama.marketdata.MarketDataKey - If you are trying to test that a Tick or Depth event matches a subscription use the market data key, rather than using these constants directly

SERVICE_NAME_EXTERNAL

constant string SERVICE_NAME_EXTERNAL := "__SimpleMarketDataFirewallGatewayExternal"
The service id that should be used when writing applications that will be used with the firewall. The real adapter service id will be specified in the TARGET_SERVICE_EXTRA_PARAM extra parameter.
See Also:
com.apama.marketdata.Constants#TARGET_SERVICE_EXTRA_PARAM - The extra parameter that will specify the adapter service id
com.apama.marketdata.MarketDataGateway - The gateway forwards events between the internal, external and adapter zones.

SERVICE_NAME_INTERNAL

constant string SERVICE_NAME_INTERNAL := "__SimpleMarketDataFirewallGatewayInternal"
The service id that should be used when setting up listeners for firewall analytics. The real adapter service id will be specified in the TARGET_SERVICE_EXTRA_PARAM extra parameter.
See Also:
com.apama.marketdata.Constants#TARGET_SERVICE_EXTRA_PARAM - The extra parameter that will specify the adapter service id
com.apama.marketdata.MarketDataGateway - The gateway forwards events between the internal, external and adapter zones.

TARGET_SERVICE_EXTRA_PARAM

constant string TARGET_SERVICE_EXTRA_PARAM := "Firewall.TargetService"
The standard extra parameter used in market data events to indicate the adapter service id that sent, or is to receive the events. The main service id being set to the internal or external firewall service id.
See Also:
#SERVICE_NAME_INTERNAL - The service id that is used by risk analytics
#SERVICE_NAME_EXTERNAL - The service id that should be used by the application, the real service id being in this extra param
com.apama.marketdata.MarketDataGateway - The service that forwards the events through the risk analytics

Action Detail

extraParamsMatch

boolean extraParamsMatch(dictionary<string, string > key, dictionary<string, string > instance)
This action is used by the market data key to ensure that the extra parameters e.g. from a depth event contain the same extra parameters that were in the initial subscription i.e. the key extra params.

The test is not for an exact match between the extra parameters. It tests only that the instance contains the same extra parameters as in the key, and that they have the same values.
Parameters:
key - The key extra parameters that must be in the instance
instance - The extra parameters that will be tested against the key.
Returns:
Whether the instance matches the key
See Also:
com.apama.marketdata.MarketDataKey - If you are trying to test that a Tick or Depth event matches a subscription use the market data key, rather than using these constants directly

getExchangeFromParams

string getExchangeFromParams(dictionary<string, string > extraParams)
This action is used to extract the exchange id from the extra params of e.g. a Tick or Depth events.
Parameters:
extraParams - The extra parameters to extract the exchange id from.
Returns:
The exchange id
See Also:
com.apama.marketdata.MarketDataKey - The market data key uses this action. If you are trying to match a tick or depth to a subscription, use the market data key instead.

getMarketFromParams

string getMarketFromParams(dictionary<string, string > extraParams)
This action is used to extract the market id from the extra params of e.g. a Tick or Depth events.
Parameters:
extraParams - The extra parameters to extract the market id from.
Returns:
The market id
See Also:
com.apama.marketdata.MarketDataKey - The market data key uses this action. If you are trying to match a tick or depth to a subscription, use the market data key instead.

getServiceFromParams

string getServiceFromParams(dictionary<string, string > extraParams)
This action is used to extract the service id from the extra params of e.g. a Tick or Depth events.
Parameters:
extraParams - The extra parameters to extract the service id from.
Returns:
The service id
See Also:
com.apama.marketdata.MarketDataKey - The market data key uses this action. If you are trying to match a tick or depth to a subscription, use the market data key instead.

getTargetServiceFromParams

string getTargetServiceFromParams(dictionary<string, string > extraParams)
This action is used to extract the target service id from the extra params of e.g. a Tick or Depth events.
Parameters:
extraParams - The extra parameters to extract the target service id from.
Returns:
The target service id
See Also:
com.apama.marketdata.MarketDataGateway - The service that uses the target service id.
com.apama.marketdata.MarketDataKey - The market data key uses this action. If you are trying to match a tick or depth to a subscription, use the market data key instead.