5 #include "bittrexconfig.h" 11 namespace BittrexApi {
13 class Balance :
public Poco::RefCountedObject {
20 void readFile(
const std::string& _fileName);
22 void read(Poco::Dynamic::Var val);
28 void SetAvailable(
double val)
33 bool isSetAvailable() {
34 return (available != std::numeric_limits<double>::max());
39 void SetBalance(
double val)
45 return (balance != std::numeric_limits<double>::max());
50 void SetCryptoAddress(std::string val)
55 bool isSetCryptoAddress() {
56 return (cryptoAddress !=
"Empty");
59 std::string cryptoAddress;
61 void SetCurrency(std::string val)
66 bool isSetCurrency() {
67 return (currency !=
"Empty");
72 void SetPending(
double val)
78 return (pending != std::numeric_limits<double>::max());
83 void SetRequested(
bool val)
89 bool isSetRequested() {
90 return (requestedSet !=
false);
96 void SetUuid(std::string val)
102 return (uuid !=
"Empty");
108 : available(std::numeric_limits<double>::max())
109 , balance(std::numeric_limits<double>::max())
110 , cryptoAddress(
"Empty")
112 , pending(std::numeric_limits<double>::max())
114 , requestedSet(
false)
121 typedef std::vector<ResultArray> Result;
139 void readFile(
const std::string& _fileName);
141 void read(Poco::Dynamic::Var val);
146 void SetCurrency(std::string val)
151 bool isSetCurrency() {
152 return (currency !=
"Empty");
155 std::string currency;
167 class History :
public Poco::RefCountedObject {
174 void readFile(
const std::string& _fileName);
176 void read(Poco::Dynamic::Var val);
182 void SetFillType(std::string val)
184 std::regex valRegex(
"FILL|PARTIAL_FILL");
185 std::string valMatch(val);
186 if (std::regex_match(valMatch, valRegex))
192 throw Poco::RegularExpressionException(
"fillType invalid.");
196 bool isSetFillType() {
197 return (fillType !=
"Empty");
200 std::string fillType;
202 void SetId(Poco::Int32 val)
208 return (
id != std::numeric_limits<Poco::Int32>::max());
213 void SetOrderType(std::string val)
215 std::regex valRegex(
"BUY|SELL");
216 std::string valMatch(val);
217 if (std::regex_match(valMatch, valRegex))
223 throw Poco::RegularExpressionException(
"orderType invalid.");
227 bool isSetOrderType() {
228 return (orderType !=
"Empty");
231 std::string orderType;
233 void SetPrice(
double val)
239 return (price != std::numeric_limits<double>::max());
244 void SetQuantity(
double val)
249 bool isSetQuantity() {
250 return (quantity != std::numeric_limits<double>::max());
255 void SetTimeStamp(FormattedTime val)
260 void SetTimeStamp(
const std::string& val)
262 FormattedTime fmt(
"%Y-%m-%dT%H:%M:%S");
266 FormattedTime timeStamp;
268 void SetTotal(
double val)
274 return (total != std::numeric_limits<double>::max());
281 , id(std::numeric_limits<Poco::Int32>::max())
283 , price(std::numeric_limits<double>::max())
284 , quantity(std::numeric_limits<double>::max())
285 , timeStamp(
"%Y-%m-%dT%H:%M:%S")
286 , total(std::numeric_limits<double>::max())
292 typedef std::vector<ResultArray> Result;
310 void readFile(
const std::string& _fileName);
312 void read(Poco::Dynamic::Var val);
317 void SetMarket(std::string val)
323 return (market !=
"Empty");
338 class Markets :
public Poco::RefCountedObject {
345 void readFile(
const std::string& _fileName);
347 void read(Poco::Dynamic::Var val);
353 void SetBaseCurrency(std::string val)
358 bool isSetBaseCurrency() {
359 return (baseCurrency !=
"Empty");
362 std::string baseCurrency;
364 void SetBaseCurrencyLong(std::string val)
366 baseCurrencyLong = val;
369 bool isSetBaseCurrencyLong() {
370 return (baseCurrencyLong !=
"Empty");
373 std::string baseCurrencyLong;
375 void SetCreated(FormattedTime val)
380 void SetCreated(
const std::string& val)
382 FormattedTime fmt(
"%Y-%m-%dT%H:%M:%S");
386 FormattedTime created;
388 void SetIsActive(
bool val)
394 bool isSetIsActive() {
395 return (isActiveSet !=
false);
401 void SetLogoUrl(std::string val)
406 bool isSetLogoUrl() {
407 return (logoUrl !=
"Empty");
412 void SetMarketCurrency(std::string val)
414 marketCurrency = val;
417 bool isSetMarketCurrency() {
418 return (marketCurrency !=
"Empty");
421 std::string marketCurrency;
423 void SetMarketCurrencyLong(std::string val)
425 marketCurrencyLong = val;
428 bool isSetMarketCurrencyLong() {
429 return (marketCurrencyLong !=
"Empty");
432 std::string marketCurrencyLong;
434 void SetMarketName(std::string val)
439 bool isSetMarketName() {
440 return (marketName !=
"Empty");
443 std::string marketName;
445 void SetMinTradeSize(Poco::Int32 val)
450 bool isSetMinTradeSize() {
451 return (minTradeSize != std::numeric_limits<Poco::Int32>::max());
454 Poco::Int32 minTradeSize;
456 void SetNotice(std::string val)
462 return (notice !=
"Empty");
468 : baseCurrency(
"Empty")
469 , baseCurrencyLong(
"Empty")
470 , created(
"%Y-%m-%dT%H:%M:%S")
474 , marketCurrency(
"Empty")
475 , marketCurrencyLong(
"Empty")
476 , marketName(
"Empty")
477 , minTradeSize(std::numeric_limits<Poco::Int32>::max())
484 typedef std::vector<ResultArray> Result;
502 void readFile(
const std::string& _fileName);
504 void read(Poco::Dynamic::Var val);
510 void SetQuantity(
double val)
515 bool isSetQuantity() {
516 return (quantity != std::numeric_limits<double>::max());
521 void SetRate(
double val)
527 return (rate != std::numeric_limits<double>::max());
533 : quantity(std::numeric_limits<double>::max())
534 , rate(std::numeric_limits<double>::max())
540 typedef std::vector<ResultArray> Result;
558 void readFile(
const std::string& _fileName);
560 void read(Poco::Dynamic::Var val);
568 void SetQuantity(
double val)
573 bool isSetQuantity() {
574 return (quantity != std::numeric_limits<double>::max());
579 void SetRate(
double val)
585 return (rate != std::numeric_limits<double>::max());
591 : quantity(std::numeric_limits<double>::max())
592 , rate(std::numeric_limits<double>::max())
598 typedef std::vector<BuyArray> Buy;
602 void SetQuantity(
double val)
607 bool isSetQuantity() {
608 return (quantity != std::numeric_limits<double>::max());
613 void SetRate(
double val)
619 return (rate != std::numeric_limits<double>::max());
625 : quantity(std::numeric_limits<double>::max())
626 , rate(std::numeric_limits<double>::max())
632 typedef std::vector<SellArray> Sell;
657 void readFile(
const std::string& _fileName);
659 void read(Poco::Dynamic::Var val);
664 void SetMarket(std::string val)
670 return (market !=
"Empty");
676 void SetType(std::string val)
678 std::regex valRegex(
"buy|sell|both");
679 std::string valMatch(val);
680 if (std::regex_match(valMatch, valRegex))
686 throw Poco::RegularExpressionException(
"type invalid.");
691 return (type !=
"Empty");
714 void readFile(
const std::string& _fileName);
716 void read(Poco::Dynamic::Var val);
720 void SetMessage(std::string val)
725 bool isSetMessage() {
726 return (message !=
"Empty");
731 void SetSuccess(
bool val)
737 bool isSetSuccess() {
738 return (successSet !=
false);
765 Poco::AutoPtr<Markets> GetMarkets();
768 Poco::AutoPtr<Balance> GetBalance(Poco::AutoPtr<BalanceParams> balanceParams);
771 Poco::AutoPtr<History> GetMarketHistory(Poco::AutoPtr<HistoryParams> historyParams);
774 Poco::AutoPtr<OrderBook> GetOrderBook(Poco::AutoPtr<OrderBookParams> orderBookParams);
777 Poco::AutoPtr<OrderBookBoth> GetBothOrderBooks(Poco::AutoPtr<OrderBookParams> orderBookParams);
781 Poco::AutoPtr<trader::App> _app;
Definition: bittrexapi.h:180
Definition: bittrexapi.h:756
Definition: bittrexconfig.h:7
Definition: bittrexapi.h:551
Definition: bittrexapi.h:303
Definition: bittrexapi.h:13
Definition: bittrexapi.h:566
Definition: bittrexapi.h:132
Definition: bittrexapi.h:650
Definition: bittrexapi.h:143
Definition: bittrexapi.h:167
Definition: bittrexapi.h:338
Definition: bittrexapi.h:314
Definition: bittrexapi.h:562
Definition: bittrexapi.h:351
Definition: bittrexapi.h:26
Definition: bittrexapi.h:349
Definition: bittrexapi.h:718
Definition: bittrexapi.h:564
Definition: bittrexapi.h:495
Definition: bittrexapi.h:24
Definition: bittrexapi.h:707
Definition: bittrexapi.h:661
Definition: bittrexapi.h:506
Definition: bittrexapi.h:178
Definition: bittrexapi.h:600
Definition: bittrexapi.h:508