Page History
Once a connection to the Whisperer server is established, the Customer Application needs to make subscriptions to the Feeds and Markets in which it is interested. There are two types of subscriptions: pricing and trading. They differ in the following manner:
• Pricing subscribePricing(int feedID, String clSubID)
• Trading subscribeTrading(int feedID, String clSubID)
| Info | ||
|---|---|---|
| ||
When making a subscription to Pricing and/or Trading you will notice that the subscribe arguments above do not permit the user to specify individual MarketIDs. This is because a subscription is absolute (meaning that all MarketIDs associated with the Feed are either subscribed or the subscription is rejected). Individual MarketIDs can only be enabled or disabled by MarketFactory at the configuration level during the creation of a Feed or through MarketFactory maintenance windows. |
Note that the subscription request identifier clSubID should be used to track the subscription request. Once subscribed to both pricing and trading, the client will receive quote requests for instruments to stream to the venue.
When making subscriptions the Customer Application should check the return code. For example, if the provided feed id is invalid the method will return APIResult.INVALID_FEED and the subscription request will not be sent to the Whisperer server.
To stop receiving quote requests call the corresponding unsubscribePricing() or unsubscribeTrading()
method.
| Info | ||
|---|---|---|
| ||
When sending a quote stream, (if permitted by the venue) multiple tiers can be sent in a single message. However, where the message is inclusive of Counterparty information the customer application will need to construct a separate message for each counterparty. |
If the Customer Application is disconnected from the Whisperer server, all outstanding subscrip- tions subscriptions to both market-data and trading are automatically cancelled. Subscriptions do not persist across disconnections (unless the client is using sticky subsciptionssubscriptions).