com.apama.marketdata
Event DepthKey


Deprecated:
The market data key should be used instead
The depth data key represents a source of depth data. It stores information required to identify that data from that source as well as actions that perform those tests.

This event should always be used when subscribing to a source of depth data. It is only possible to filter events based on symbol. All the other parameters e.g. service id are kept in the extra parameters. This event implements the test to see if the depth or tick event came from the source that was subscribed to. This is particularly important when more than one adapter publishes data for the same symbol.

The depth data key is a utility event object that can be used to ensure that depth data subscriptions, unsubscriptions and events match the key of symbol, service, exchange and market as well as any other key extraParameters (e.g. for specifying aggregated vs. non aggregated depth). That key can be initialised from explicit parameters or those garnered from an example event.
Since:
CMF 1.1.0
Version:
10.11
See Also:
com.apama.marketdata.MarketDataKey - For most uses the market data key should be used not the depth key

Member summary
 com.apama.marketdata.MarketDataKeyMDKey

The market data key.
 com.apama.marketdata.InnerDepthKeyinnerDepthKey

The symbol, service, exchange and market for this source of market data.
 
Action summary
 string_toString()

This action returns a string representation of this key that is shorter than the standard toString action.
 stringgetExchange()

This action returns the exchange for this depth data source.
 com.apama.marketdata.InnerDepthKeygetInnerKey()

This action returns the inner key, which does not contain key extra parameters. This is useful e.g. for using as a key in a dictionary.
 dictionary<string, string>getKeyExtraParams()

This action returns any key extra parameters for this depth data source.
 stringgetMarket()

This action returns the market for this depth data source.
 stringgetService()

This action returns the service for this depth data source.
 stringgetSymbol()

This action returns the symbol for this depth data source.
 booleanmatches(com.apama.marketdata.Depth depth)

This action tests a depth event to establish whether it came from the source the key represents.
 booleanmatchesKey(com.apama.marketdata.DepthKey otherKey)

Tests whether two depth data keys are the same.
 booleanmatchesSub(com.apama.marketdata.SubscribeDepth sub)

This action tests if a subscription is for the source this key represents.
 booleanmatchesUnsub(com.apama.marketdata.UnsubscribeDepth unsub)

This action tests if an unsubscription is for the source this key represents.
 voidset(string symbol, string service, string exchange, string market, dictionary<string, string> keyExtraParams)

This constructor is used to set a depth data key by specifying each field explicitly.
 voidsetFromDepth(com.apama.marketdata.Depth d)

This constructor is used to set a depth data key from a depth event by extracting the extra parameters from it.
 voidsetFromMDKey(com.apama.marketdata.MarketDataKey key)

This constructor is used to create a depth data key from a market data key.
 voidsetFromSub(com.apama.marketdata.SubscribeDepth sub)

This constructor is used to set a depth data key from a subscription event.
 voidsetFromUnsub(com.apama.marketdata.UnsubscribeDepth unsub)

This constructor is used to set a depth data key from an unsubscription event.
 
Member detail

innerDepthKey

            com.apama.marketdata.InnerDepthKey innerDepthKey
        
The symbol, service, exchange and market for this source of market data.

MDKey

            com.apama.marketdata.MarketDataKey MDKey
        
The market data key.
Action detail

_toString

            string _toString()
        
This action returns a string representation of this key that is shorter than the standard toString action.
Returns:
The string representation

getExchange

            string getExchange()
        
This action returns the exchange for this depth data source.
Returns:
The exchange

getInnerKey

            com.apama.marketdata.InnerDepthKey getInnerKey()
        
This action returns the inner key, which does not contain key extra parameters. This is useful e.g. for using as a key in a dictionary.
Returns:
The inner depth data key

getKeyExtraParams

            dictionary<string, string> getKeyExtraParams()
        
This action returns any key extra parameters for this depth data source.
Returns:
The key extra parameters

getMarket

            string getMarket()
        
This action returns the market for this depth data source.
Returns:
The market

getService

            string getService()
        
This action returns the service for this depth data source.
Returns:
The service

getSymbol

            string getSymbol()
        
This action returns the symbol for this depth data source.
Returns:
The symbol

matches

            boolean matches(com.apama.marketdata.Depth depth)
        
This action tests a depth event to establish whether it came from the source the key represents.
Parameters:
depth - The depth event to test matches the key
Returns:
Whether the depth event matches the key

matchesKey

            boolean matchesKey(com.apama.marketdata.DepthKey otherKey)
        
Tests whether two depth data keys are the same.
Parameters:
otherKey - The other key
Returns:
Whether the keys represent the same source

matchesSub

            boolean matchesSub(com.apama.marketdata.SubscribeDepth sub)
        
This action tests if a subscription is for the source this key represents.
Parameters:
sub - The subscription
Returns:
Whether the depth subscription event matches the key

matchesUnsub

            boolean matchesUnsub(com.apama.marketdata.UnsubscribeDepth unsub)
        
This action tests if an unsubscription is for the source this key represents.
Parameters:
unsub - The unsubscription
Returns:
Whether the depth unsubscription event matches the key

set

            void set(string symbol, string service, string exchange, string market, dictionary<string, string> keyExtraParams)
        
This constructor is used to set a depth data key by specifying each field explicitly.
Parameters:
symbol - The symbol for the source of depth data
service - The service id of the depth data source
exchange - The exchange id of the depth data source
market - The market id of the depth data source
keyExtraParams - Any additional key extra parameters that need to be used to discriminate a particular depth data source

setFromDepth

            void setFromDepth(com.apama.marketdata.Depth d)
        
This constructor is used to set a depth data key from a depth event by extracting the extra parameters from it.
Parameters:
d

setFromMDKey

            void setFromMDKey(com.apama.marketdata.MarketDataKey key)
        
This constructor is used to create a depth data key from a market data key.
Parameters:
key - The market data key that contains details of the depth source

setFromSub

            void setFromSub(com.apama.marketdata.SubscribeDepth sub)
        
This constructor is used to set a depth data key from a subscription event.
Parameters:
sub - The subscription event that specifies the key fields

setFromUnsub

            void setFromUnsub(com.apama.marketdata.UnsubscribeDepth unsub)
        
This constructor is used to set a depth data key from an unsubscription event.
Parameters:
unsub - The unsubscription event that specifies the key fields