1 #ifndef SG_COMMON_MKDATAH
2 #define SG_COMMON_MKDATAH
3 #include <cmdDefines.h>
4 #include <apiStructs.h>
6 #include <sharedCommands.h>
7 #include <boost/date_time/gregorian/gregorian.hpp>
8 #include <boost/date_time/posix_time/posix_time.hpp>
16 namespace API2 {
namespace COMMON {
89 CREATE_FIELD(DATA_TYPES::PRICE, Price);
90 CREATE_FIELD(DATA_TYPES::QTY, Qty);
91 CREATE_FIELD(UNSIGNED_LONG, Timestamp);
102 const DATA_TYPES::PRICE &price,
103 const DATA_TYPES::QTY &qty,
104 const UNSIGNED_LONG ×tamp
109 _Timestamp(timestamp)
124 DATA_TYPES::SYMBOL_ID _symbolId;
135 CREATE_FIELD(
bool, IsSnapShot);
140 CREATE_FIELD(
int, multiplier);
145 TBTDATA::SymbolData *_tbtData;
147 CREATE_FIELD(std::queue<TradeTick>, TradeTicks);
152 volatile unsigned long _LatestIndexCounter;
157 int _LatestTickIndex;
167 const DATA_TYPES::OrderMode & mode);
176 const DATA_TYPES::OrderMode & mode);
238 DATA_TYPES::PRICE getPrice(
size_t position,
const DATA_TYPES::OrderMode & mode);
246 DATA_TYPES::QTY getQty(
size_t position,
const DATA_TYPES::OrderMode & mode);
282 bool subscribe(DATA_TYPES::SYMBOL_ID symbol,
bool isSnapshot);
294 MktData(DATA_TYPES::SYMBOL_ID symbolId,
bool isSnapshot =
true);
318 bool checkUpdateStatus(time_t lastProcessTime);
325 bool checkUpdateStatus(boost::posix_time::ptime lastProcessTime);
DATA_TYPES::PRICE getLowPrice()
getLowPrice
bool checkForModification(time_t lastProcessTimeStamp)
checkForModification
void operator()()
operator ()
DATA_TYPES::QTY getLastTradeQty()
getLastTradeQty
DATA_TYPES::PRICE getBidPrice(size_t pos)
getBidPrice
DATA_TYPES::QTY getBidQty(size_t pos)
getBidQty
DATA_TYPES::QTY getAskQty(size_t pos)
getAskQty
void unsubscribe()
unsubscribe
DATA_TYPES::PRICE getAverageOhlcPrice()
getAverageOhlcPrice
DATA_TYPES::PRICE getHighPrice()
getHighPrice
The MktData class, The wrapper class for getting Market Feed for both Snapshot and Tick-By-Tick...
Definition: sgMktData.h:118
The TradeTick struct.
Definition: sgMktData.h:87
DATA_TYPES::PRICE getOpenPrice()
getOpenPrice
MktData(DATA_TYPES::SYMBOL_ID symbolId, bool isSnapshot=true)
MktData.
DATA_TYPES::PRICE getLastTradePrice()
getLastTradePrice
DATA_TYPES::PRICE getClosePrice()
getClosePrice
time_t getLastProcessTimestamp()
getLastProcessTimestamp
OhlcQuote(UNSIGNED_LONG symbolId)
OhlcQuote.
The MarketDepthWrapper class will store Bid Ask Price at particular level.
Definition: apiStructs.h:13
bool updateTbtTradeTicks()
updateTbtTradeTicks
DATA_TYPES::PRICE getHighPrice()
getHighPrice
DATA_TYPES::PRICE getLowPrice()
getLowPrice
The OhlcQuote class.
Definition: sgMktData.h:23
DATA_TYPES::PRICE getClosePrice()
getClosePrice
DATA_TYPES::PRICE getOpenPrice()
getOpenPrice
DATA_TYPES::VOLUME getVolume()
getVolume
DATA_TYPES::PRICE getAskPrice(size_t pos)
getAskPrice
bool subscribe(DATA_TYPES::SYMBOL_ID symbol, bool isSnapshot)
subscribe
TradeTick(const DATA_TYPES::PRICE &price, const DATA_TYPES::QTY &qty, const UNSIGNED_LONG ×tamp)
TradeTick.
Definition: sgMktData.h:101
The MarketDataWrapper class will contain the Snapshot/TBT Market Data.
Definition: apiStructs.h:47