136 #ifndef OPENTXS_CORE_TRADE_OTTRADE_HPP
137 #define OPENTXS_CORE_TRADE_OTTRADE_HPP
141 #include "../cron/OTCronItem.hpp"
191 bool hasTradeActivated_;
199 int32_t tradesAlreadyDone_;
206 const int64_t& newTransactionNumber,
213 int64_t stopPrice = 0);
219 offer.
Set(marketOffer_);
220 if (marketOffer_.
Exists()) {
228 if ((stopSign_ ==
'<') || (stopSign_ ==
'>')) {
241 if (stopSign_ ==
'>') {
249 if (stopSign_ ==
'<') {
261 return currencyTypeID_;
266 currencyTypeID_ = currencyId;
271 return currencyAcctID_;
276 currencyAcctID_ = currencyAcctID;
281 tradesAlreadyDone_++;
286 return tradesAlreadyDone_;
307 mapOfNyms* preloadedMap =
nullptr)
const;
334 #endif // OPENTXS_CORE_TRADE_OTTRADE_HPP
virtual bool SaveContractWallet(std::ofstream &ofs) const
int32_t GetCompletedCount()
virtual bool VerifyNymAsAgent(OTPseudonym &nym, OTPseudonym &signerNym, mapOfNyms *preloadedMap=nullptr) const
bool IsGreaterThan() const
virtual int64_t GetClosingNumber(const OTIdentifier &acctId) const
std::map< std::string, OTPseudonym * > mapOfNyms
const OTIdentifier & GetCurrencyAcctID() const
const int64_t & GetStopPrice() const
EXPORT bool IssueTrade(OTOffer &offer, char stopSign=0, int64_t stopPrice=0)
void IncrementTradesAlreadyDone()
virtual EXPORT ~OTTrade()
EXPORT bool Exists() const
EXPORT bool VerifyOffer(OTOffer &offer) const
virtual void onRemovalFromCron()
virtual void onFinalReceipt(OTCronItem &origCronItem, const int64_t &newTransactionNumber, OTPseudonym &originator, OTPseudonym *remover)
EXPORT void Set(const char *data, uint32_t enforcedMaxLength=0)
virtual bool ProcessCron()
void SetCurrencyAcctID(const OTIdentifier ¤cyAcctID)
const OTIdentifier & GetCurrencyID() const
void SetCurrencyID(const OTIdentifier ¤cyId)
virtual bool CanRemoveItemFromCron(OTPseudonym &nym)
EXPORT int64_t GetCurrencyAcctClosingNum() const
EXPORT int64_t GetAssetAcctClosingNum() const
bool GetOfferString(OTString &offer)
virtual bool VerifyNymAsAgentForAccount(OTPseudonym &nym, OTAccount &account) const
virtual int32_t ProcessXMLNode(irr::io::IrrXMLReader *&xml)
OTOffer * GetOffer(OTIdentifier *offerMarketId=nullptr, OTMarket **market=nullptr)
virtual void UpdateContents()