Apama Capital Markets Foundation  10.3.1.0
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Connectivity_MDPublisher.h
1 
10 #ifndef _SAG_MD_PUBLISHER_INTERFACE_H_
11 #define _SAG_MD_PUBLISHER_INTERFACE_H_
13 
14 namespace com {
15  namespace softwareag {
16  namespace marketdata {
17 
18 
22  class SAG_MDM_API MarketDataPublisher
23  {
24  public:
25 
32  MarketDataPublisher(void* dataManagerPtr)
33  : dataManagerPtr_(dataManagerPtr)
34  {
35  };
36 
37  virtual ~MarketDataPublisher()
38  {
39  };
40 
51  void SetExtraParam(const std::string& subKey, const std::string& paramName, const std::string& type, const std::string& value, const std::string& description);
52 
60  void SetExtraParams(const std::string &subKey, const ExtraParamList &extraParamList);
61 
70  void SetExtraParamValue(const std::string& subKey, const std::string& paramName, const std::string& value);
71 
79  void SetExtraParamsValue(const std::string &subKey, const ExtraParamValueList &extraParamValueList);
80 
89  void RemoveExtraParam(const std::string& subKey, const std::string& paramName, bool permanent = false);
90 
99  void RemoveExtraParams(const std::string &subKey, const StringList &paramNames, bool permanent = false);
100 
101  //protected:
102  //virtual void start() = 0;
103  //virtual void stop() = 0;
104 
105  protected:
108  };
109 
111  class SAG_MDM_API BBAPublisher : public MarketDataPublisher
112  {
113  public:
120  BBAPublisher(void* dataManagerPtr)
121  : MarketDataPublisher(dataManagerPtr)
122  {}
123 
124  ~BBAPublisher(){}
125 
136  void SetBBAData(const std::string& subKey, double bidPrice, int64_t bidQty, double askPrice, int64_t askQty);
137 
138  };
139 
141  class SAG_MDM_API TradePublisher : public MarketDataPublisher
142  {
143  public:
150  TradePublisher(void* dataManagerPtr)
151  : MarketDataPublisher(dataManagerPtr)
152  {}
153 
154  ~TradePublisher() {}
155 
167  void SetTradeData(const std::string& subKey, double price, int64_t quantity, const std::string& taker, const std::string& receiver, const std::string& currency);
168  };
169 
171  class SAG_MDM_API DepthPublisher : public MarketDataPublisher
172  {
173  public:
180  DepthPublisher(void* dataManagerPtr)
181  : MarketDataPublisher(dataManagerPtr)
182  {}
183 
184  ~DepthPublisher() {}
185 
199  void SetBidDepthData(const std::string& subKey, const std::string& depthId, double price, int64_t quantity, const StringDictionary &epValues);
200 
214  void SetAskDepthData(const std::string& subKey, const std::string& depthId, double price, int64_t quantity, const StringDictionary &epValues);
215 
230  void InsertBidDepthData(const std::string& subKey, const std::string& depthId, double price, int64_t quantity, const StringDictionary &epValues);
231 
244  void InsertAskDepthData(const std::string& subKey, const std::string& depthId, double price, int64_t quantity, const StringDictionary &epValues);
245 
256  void DeleteBidDepthData(const std::string& subKey, const std::string& depthId);
257 
267  void DeleteAskDepthData(const std::string& subKey, const std::string& depthId);
268 
277  const char* GetBidDepthIdAtLevel(const std::string& subKey, int64_t level);
278 
287  const char* GetAskDepthIdAtLevel(const std::string& subKey, int64_t level);
288  };
289 
291  class SAG_MDM_API OrderPublisher : public MarketDataPublisher
292  {
293  public:
300  OrderPublisher(void* dataManagerPtr)
301  : MarketDataPublisher(dataManagerPtr)
302  {}
303 
304  ~OrderPublisher() {}
305 
320  void SetBidOrderBookData(const std::string& subKey, const std::string& orderId, double price, int64_t quantity, const std::string& party, const StringDictionary &epValues);
321 
338  void SetAskOrderBookData(const std::string& subKey, const std::string& orderId, double price, int64_t quantity, const std::string& party, const StringDictionary &epValues);
339 
355  void InsertBidOrderBookData(const std::string& subKey, const std::string& orderId, double price, int64_t quantity, const std::string& party, const StringDictionary &epValues);
356 
372  void InsertAskOrderBookData(const std::string& subKey, const std::string& orderId, double price, int64_t quantity, const std::string& party, const StringDictionary &epValues);
373 
384  void DeleteBidOrderBookData(const std::string& subKey, const std::string& orderId);
385 
396  void DeleteAskOrderBookData(const std::string& subKey, const std::string& orderId);
397 
406  const char* GetBidOrderIdAtLevel(const std::string& subKey, int64_t level);
407 
416  const char* GetAskOrderIdAtLevel(const std::string& subKey, int64_t level);
417  };
418 
420  class SAG_MDM_API QuotebookPublisher : public MarketDataPublisher
421  {
422  public:
429  QuotebookPublisher(void* dataManagerPtr)
430  : MarketDataPublisher(dataManagerPtr)
431  {}
432 
433  ~QuotebookPublisher() {}
434 
451  void SetBidQuotebookData(const std::string& subKey, const std::string& quoteId, int64_t quantity, double price, const std::string& party,
452  const std::string& requestId, const bool tradable, const StringDictionary &epValues);
453 
470  void SetAskQuotebookData(const std::string& subKey, const std::string& quoteId, int64_t quantity, double price, const std::string& party,
471  const std::string& requestId, const bool tradable, const StringDictionary &epValues);
472 
488  void InsertBidQuotebookData(const std::string& subKey, const std::string& quoteId, int64_t quantity, double price, const std::string& party,
489  const std::string& requestId, const bool tradable, const StringDictionary &epValues);
490 
506  void InsertAskQuotebookData(const std::string& subKey, const std::string& quoteId, int64_t quantity, double price, const std::string& party,
507  const std::string& requestId, const bool tradable, const StringDictionary &epValues);
508 
519  void DeleteBidQuotebookData(const std::string& subKey, const std::string& quoteId, int64_t quantity);
520 
531  void DeleteAskQuotebookData(const std::string& subKey, const std::string& quoteId, int64_t quantity);
532 
542  void DeleteMultipleBidQuotebookData(const std::string& subKey, const std::string& quoteId);
543 
553  void DeleteMultipleAskQuotebookData(const std::string& subKey, const std::string& quoteId);
554 
563  const char* GetBidQuotebookIdAtLevel(const std::string& subKey, int64_t level);
564 
573  const char* GetAskQuotebookIdAtLevel(const std::string& subKey, int64_t level);
574  };
575 
577  class SAG_MDM_API NewsDataPublisher : public MarketDataPublisher
578  {
579  public:
586  NewsDataPublisher(void* dataManagerPtr)
587  : MarketDataPublisher(dataManagerPtr)
588  {}
589 
590  ~NewsDataPublisher() {}
591 
607  void SetNewsData(const std::string& subKey, const std::string& newsId, const StringSet &symbolSet,
608  int64_t updateType, const std::string& headline, const std::string& story, const double sourceTimestamp, const NewsDataList &newsDataList, const double value = MDM_DEFAULT_FLOAT);
609 
621  void DeleteNewsData(const std::string& subKey, const std::string& newsId, const StringSet &symbolSet,
622  const double sourceTimestamp, const NewsDataList &newsDataList);
623 
631  void DefineNewsSchema(const std::string& subKey, const NewsDataList &newsDataList);
632  };
633 
635  class SAG_MDM_API EPPublisher : public MarketDataPublisher
636  {
637  public:
644  EPPublisher(void* dataManagerPtr)
645  : MarketDataPublisher(dataManagerPtr)
646  {}
647 
648  ~EPPublisher() {}
649  };
650 
651 
652  } //marketdata
653  } //softwareag
654 }//com
655 
656 #endif //_SAG_MD_PUBLISHER_INTERFACE_H_
std::vector< StringPair > StringDictionary
Definition: MDM_MarketDataInterface.h:231
TradePublisher(void *dataManagerPtr)
Definition: Connectivity_MDPublisher.h:150
Definition: Connectivity_MDPublisher.h:22
#define MDM_DEFAULT_FLOAT
Definition: Connectivity_MDInterfaces.h:87
Definition: Connectivity_MDPublisher.h:577
Definition: Connectivity_MDInterfaces.h:59
DepthPublisher(void *dataManagerPtr)
Definition: Connectivity_MDPublisher.h:180
BBAPublisher(void *dataManagerPtr)
Definition: Connectivity_MDPublisher.h:120
Definition: Connectivity_MDPublisher.h:420
std::list< NewsData > NewsDataList
Definition: MDM_MarketDataInterface.h:228
std::set< std::string > StringSet
Definition: MDM_MarketDataInterface.h:181
OrderPublisher(void *dataManagerPtr)
Definition: Connectivity_MDPublisher.h:300
void * dataManagerPtr_
Definition: Connectivity_MDPublisher.h:107
EPPublisher(void *dataManagerPtr)
Definition: Connectivity_MDPublisher.h:644
Definition: Connectivity_MDPublisher.h:141
Definition: Connectivity_MDPublisher.h:635
Definition: Connectivity_MDPublisher.h:291
std::vector< std::string > StringList
Definition: MDM_MarketDataInterface.h:180
QuotebookPublisher(void *dataManagerPtr)
Definition: Connectivity_MDPublisher.h:429
MarketData interfaces.
Definition: Connectivity_MDPublisher.h:171
NewsDataPublisher(void *dataManagerPtr)
Definition: Connectivity_MDPublisher.h:586
Definition: Connectivity_MDPublisher.h:111
std::list< ExtraParamValue > ExtraParamValueList
Definition: MDM_MarketDataInterface.h:225
MarketDataPublisher(void *dataManagerPtr)
Definition: Connectivity_MDPublisher.h:32
std::list< ExtraParam > ExtraParamList
Definition: MDM_MarketDataInterface.h:224