Using SecurityDefinition query interface
To Query the SecurityDefinition Interface, following event has to be sent first.
(defined under com.apama.cme package)
event SessionConfiguration {
string connection;
dictionary<string,string> configuration;
}
The "connection" is the same as for the channel configuration. The channel on which the IAF is running should be specified in the configuration dictionary as the key value pair "channel":<channel name> . If channel name is not specified, the channel name specified in the transport configuration property IAF_CHANNEL is used. The session name should be specified in the configuration dictionary as the key value pair "sessionName":<session-name>. If session name is not specified default session name "CME" is used.
After sending the SessionConfiguration event, following event can be used to Query the SecurityDefinition Interface.
(defined under com.apama.cme package)
event SecurityDefinitionRequest {
string connection;
integer channel;
string symbol;
dictionary<string, string> extraParams;
}
The "connection" parameter is the same as for the channel configuration. The "channel" field holds the channel no that has the queried symbol. If the channel no is not known, then "channel" field should be set to -1. The "symbol" field holds the symbol decryption (FIX tag 107) for the security. The "extraParams" field holds any additional data needed for the lookup, although currently no keys are defined for this event.
For example to get the SecurityDefinition for the symbol "6EB3" on channel 11 following events has to be sent.
com.apama.cme.SessionConfiguration("CME_SBE_TRANSPORT",
{“channel”:”CME_CHANNEL”})
com.apama.cme.SecurityDefinitionRequest
("CME_SBE_TRANSPORT",11,"6BM3",{})
Each lookup request will route a com.apama.cme.SecurityDefinitionResponse event in reply:
event SecurityDefinitionResponse {
string connection;
integer channel;
string symbol;
boolean found;
SecurityDefinition record;
dictionary<string, string> extraParams;
}
The fields of this event will be identical to the request except that the "record" field - holding the returned security definition - is added, and the "found" field is set to "true" if the requested record was found. If the record was *not* found, "found" will be "false" and the "record" field should be ignored.