137 #ifndef OPENTXS_CORE_TRADE_OTMARKET_HPP
138 #define OPENTXS_CORE_TRADE_OTMARKET_HPP
141 #include "../cron/OTCron.hpp"
142 #include "../OTStorage.hpp"
149 #define MAX_MARKET_QUERY_DEPTH \
150 50 // todo add this to the ini file. (Now that we actually have one.)
193 int64_t m_lLastSalePrice;
194 std::string m_strLastSaleDate;
221 int32_t& nOfferCount);
223 int32_t& nTradeCount);
228 int32_t& nNymOfferCount);
245 return m_mapBids.size();
249 return m_mapAsks.size();
253 m_ASSET_TYPE_ID = ASSET_ID;
257 m_CURRENCY_TYPE_ID = CURRENCY_ID;
261 m_SERVER_ID = SERVER_ID;
266 return m_ASSET_TYPE_ID;
270 return m_CURRENCY_TYPE_ID;
284 if (m_lScale < 1) m_lScale = 1;
289 if (m_lLastSalePrice < 1) m_lLastSalePrice = 1;
290 return m_lLastSalePrice;
294 m_lLastSalePrice = lLastSalePrice;
295 if (m_lLastSalePrice < 1) m_lLastSalePrice = 1;
300 return m_strLastSaleDate;
306 const OTIdentifier& CURRENCY_TYPE_ID,
const int64_t& lScale);
340 #endif // OPENTXS_CORE_TRADE_OTMARKET_HPP
void SetCurrencyID(const OTIdentifier &CURRENCY_ID)
bool AddOffer(OTTrade *pTrade, OTOffer &theOffer, bool bSaveFile=true, time64_t tDateAddedToMarket=OT_TIME_ZERO)
OTOffer * GetOffer(const int64_t &lTransactionNum)
void SetAssetID(const OTIdentifier &ASSET_ID)
void SetLastSalePrice(const int64_t &lLastSalePrice)
bool GetNym_OfferList(const OTIdentifier &NYM_ID, OTDB::OfferListNym &theOutputList, int32_t &nNymOfferCount)
mapOfOffers::size_type GetBidCount()
const OTIdentifier & GetCurrencyID() const
int64_t GetLowestAskPrice()
const OTIdentifier & GetServerID() const
const OTIdentifier & GetAssetID() const
virtual void UpdateContents()
std::map< int64_t, OTOffer * > mapOfOffersTrnsNum
std::multimap< int64_t, OTOffer * > mapOfOffers
virtual void GetIdentifier(OTIdentifier &theIdentifier) const
virtual int32_t ProcessXMLNode(irr::io::IrrXMLReader *&xml)
bool ValidateOfferForMarket(OTOffer &theOffer, OTString *pReason=nullptr)
virtual bool SaveContractWallet(std::ofstream &ofs) const
void SetServerID(const OTIdentifier &SERVER_ID)
const int64_t & GetScale() const
EXPORT bool GetRecentTradeList(OTASCIIArmor &ascOutput, int32_t &nTradeCount)
mapOfOffers::size_type GetAskCount()
void ProcessTrade(OTTrade &theTrade, OTOffer &theOffer, OTOffer &theOtherOffer)
int64_t GetHighestBidPrice()
void SetScale(const int64_t &lScale)
EXPORT bool GetOfferList(OTASCIIArmor &ascOutput, int64_t lDepth, int32_t &nOfferCount)
int64_t GetTotalAvailableAssets()
const int64_t & GetLastSalePrice()
const std::string & GetLastSaleDate()
bool RemoveOffer(const int64_t &lTransactionNum)
void SetCronPointer(OTCron &theCron)