20 void readFile(
const std::string& _fileName);
22 void read(Poco::Dynamic::Var val);
26 void SetAccNo(Poco::Int32 val)
32 return (accNo != std::numeric_limits<Poco::Int32>::max());
37 void SetBtcBal(
double val)
43 return (btcBal != std::numeric_limits<double>::max());
48 void SetBtcDeposit(std::string val)
50 std::regex valRegex(
"^[13][a-km-zA-HJ-NP-Z1-9]{25,34}$");
51 std::string valMatch(val);
52 if (std::regex_match(valMatch, valRegex))
58 throw Poco::RegularExpressionException(
"btcDeposit invalid.");
62 bool isSetBtcDeposit() {
63 return (btcDeposit !=
"Empty");
66 std::string btcDeposit;
68 void SetEmail(std::string val)
70 std::regex valRegex(
"([\\w-\\.]+)@((?:[\\w]+\\.)+)([a-zA-Z]{2,4})");
71 std::string valMatch(val);
72 if (std::regex_match(valMatch, valRegex))
78 throw Poco::RegularExpressionException(
"email invalid.");
83 return (email !=
"Empty");
88 void SetError(Poco::Int32 val)
94 return (error != std::numeric_limits<Poco::Int32>::max());
99 void SetSgdBal(
double val)
105 return (sgdBal != std::numeric_limits<double>::max());
111 : accNo(std::numeric_limits<Poco::Int32>::max())
112 , btcBal(std::numeric_limits<double>::max())
113 , btcDeposit(
"Empty")
115 , error(std::numeric_limits<Poco::Int32>::max())
116 , sgdBal(std::numeric_limits<double>::max())
132 void readFile(
const std::string& _fileName);
134 void read(Poco::Dynamic::Var val);
139 void SetOrderNo(Poco::Int32 val)
144 bool isSetOrderNo() {
145 return (orderNo != std::numeric_limits<Poco::Int32>::max());
151 : orderNo(std::numeric_limits<Poco::Int32>::max())
167 void readFile(
const std::string& _fileName);
169 void read(Poco::Dynamic::Var val);
173 void SetError(std::string val)
179 return (error !=
"Empty");
201 void readFile(
const std::string& _fileName);
203 void read(Poco::Dynamic::Var val);
207 void SetError(Poco::Int32 val)
213 return (error != std::numeric_limits<Poco::Int32>::max());
219 : error(std::numeric_limits<Poco::Int32>::max())
235 void readFile(
const std::string& _fileName);
237 void read(Poco::Dynamic::Var val);
241 void SetError(Poco::Int32 val)
247 return (error != std::numeric_limits<Poco::Int32>::max());
252 void SetMsg(std::string val)
258 return (msg !=
"Empty");
264 : error(std::numeric_limits<Poco::Int32>::max())
281 void readFile(
const std::string& _fileName);
283 void read(Poco::Dynamic::Var val);
287 typedef double AsksArrayArray;
289 typedef std::vector<AsksArrayArray> AsksArray;
290 typedef std::vector<AsksArray> Asks;
292 typedef double BidsArrayArray;
294 typedef std::vector<BidsArrayArray> BidsArray;
295 typedef std::vector<BidsArray> Bids;
313 void readFile(
const std::string& _fileName);
315 void read(Poco::Dynamic::Var val);
319 void SetError(Poco::Int32 val)
325 return (error != std::numeric_limits<Poco::Int32>::max());
332 void SetDate_created(std::time_t val)
337 bool isSetDate_created() {
338 return (date_created != std::numeric_limits<time_t>::max());
341 std::time_t date_created;
343 void SetDate_executed(std::time_t val)
348 bool isSetDate_executed() {
349 return (date_executed != std::numeric_limits<time_t>::max());
352 std::time_t date_executed;
354 void SetPrice(std::string val)
360 return (price !=
"Empty");
365 void SetQty(std::string val)
371 return (qty !=
"Empty");
376 void SetStatus(std::string val)
382 return (status !=
"Empty");
387 void SetTicket(Poco::Int32 val)
393 return (ticket != std::numeric_limits<Poco::Int32>::max());
399 void SetType(
char val)
401 std::regex valRegex(
"B|S");
402 std::string valMatch(1, val);
403 if (std::regex_match(valMatch, valRegex))
409 throw Poco::RegularExpressionException(
"type invalid.");
414 return (type != std::numeric_limits<char>::max());
420 : date_created(std::numeric_limits<time_t>::max())
421 , date_executed(std::numeric_limits<time_t>::max())
425 , ticket(std::numeric_limits<Poco::Int32>::max())
426 , type(std::numeric_limits<char>::max())
432 typedef std::vector<OrdersArray> Orders;
435 : error(std::numeric_limits<Poco::Int32>::max())
451 void readFile(
const std::string& _fileName);
453 void read(Poco::Dynamic::Var val);
457 void SetLimit(Poco::Int32 val)
463 return (limit != std::numeric_limits<Poco::Int32>::max());
469 : limit(std::numeric_limits<Poco::Int32>::max())
485 void readFile(
const std::string& _fileName);
487 void read(Poco::Dynamic::Var val);
492 void SetPrice(
double val)
498 return (price != std::numeric_limits<double>::max());
504 void SetQty(
double val)
510 return (qty != std::numeric_limits<double>::max());
516 void SetType(
char val)
518 std::regex valRegex(
"B|S");
519 std::string valMatch(1, val);
520 if (std::regex_match(valMatch, valRegex))
526 throw Poco::RegularExpressionException(
"type invalid.");
531 return (type != std::numeric_limits<char>::max());
537 : price(std::numeric_limits<double>::max())
538 , qty(std::numeric_limits<double>::max())
539 , type(std::numeric_limits<char>::max())
555 void readFile(
const std::string& _fileName);
557 void read(Poco::Dynamic::Var val);
561 void SetError(Poco::Int32 val)
567 return (error != std::numeric_limits<Poco::Int32>::max());
572 void SetMsg(std::string val)
578 return (msg !=
"Empty");
583 void SetPending_oid(std::string val)
588 bool isSetPending_oid() {
589 return (pending_oid !=
"Empty");
592 std::string pending_oid;
595 : error(std::numeric_limits<Poco::Int32>::max())
597 , pending_oid(
"Empty")
613 void readFile(
const std::string& _fileName);
615 void read(Poco::Dynamic::Var val);
619 void SetError(Poco::Int32 val)
625 return (error != std::numeric_limits<Poco::Int32>::max());
632 void SetDate(std::time_t val)
638 return (date != std::numeric_limits<time_t>::max());
643 void SetPrice(
double val)
649 return (price != std::numeric_limits<double>::max());
654 void SetQty(
double val)
660 return (qty != std::numeric_limits<double>::max());
665 void SetTicket(Poco::Int32 val)
671 return (ticket != std::numeric_limits<Poco::Int32>::max());
677 void SetType(
char val)
679 std::regex valRegex(
"B|S");
680 std::string valMatch(1, val);
681 if (std::regex_match(valMatch, valRegex))
687 throw Poco::RegularExpressionException(
"type invalid.");
692 return (type != std::numeric_limits<char>::max());
698 : date(std::numeric_limits<time_t>::max())
699 , price(std::numeric_limits<double>::max())
700 , qty(std::numeric_limits<double>::max())
701 , ticket(std::numeric_limits<Poco::Int32>::max())
702 , type(std::numeric_limits<char>::max())
708 typedef std::vector<OrdersArray> Orders;
711 : error(std::numeric_limits<Poco::Int32>::max())
720 class Ticker :
public Poco::RefCountedObject {
727 void readFile(
const std::string& _fileName);
729 void read(Poco::Dynamic::Var val);
733 void SetAsk(
double val)
739 return (ask != std::numeric_limits<double>::max());
744 void SetBid(
double val)
750 return (bid != std::numeric_limits<double>::max());
756 : ask(std::numeric_limits<double>::max())
757 , bid(std::numeric_limits<double>::max())
773 void readFile(
const std::string& _fileName);
775 void read(Poco::Dynamic::Var val);
779 void SetAsk(
double val)
785 return (ask != std::numeric_limits<double>::max());
790 void SetBid(
double val)
796 return (bid != std::numeric_limits<double>::max());
801 void SetLast(
double val)
807 return (last != std::numeric_limits<double>::max());
812 void SetVol(
double val)
818 return (vol != std::numeric_limits<double>::max());
824 : ask(std::numeric_limits<double>::max())
825 , bid(std::numeric_limits<double>::max())
826 , last(std::numeric_limits<double>::max())
827 , vol(std::numeric_limits<double>::max())
836 class Trades :
public Poco::RefCountedObject {
843 void readFile(
const std::string& _fileName);
845 void read(Poco::Dynamic::Var val);
849 void SetAmount(
double val)
855 return (amount != std::numeric_limits<double>::max());
860 void SetDate(std::time_t val)
866 return (date != std::numeric_limits<time_t>::max());
871 void SetPrice(
double val)
877 return (price != std::numeric_limits<double>::max());
882 void SetTid(Poco::Int32 val)
888 return (tid != std::numeric_limits<Poco::Int32>::max());
894 : amount(std::numeric_limits<double>::max())
895 , date(std::numeric_limits<time_t>::max())
896 , price(std::numeric_limits<double>::max())
897 , tid(std::numeric_limits<Poco::Int32>::max())
903 typedef std::vector<DataArray> Data;
914 void readFile(
const std::string& _fileName);
916 void read(Poco::Dynamic::Var val);
921 void SetSince(Poco::Int32 val)
927 return (since != std::numeric_limits<Poco::Int32>::max());
933 : since(std::numeric_limits<Poco::Int32>::max())
949 void readFile(
const std::string& _fileName);
951 void read(Poco::Dynamic::Var val);
956 void SetAmount(
double val)
962 return (amount != std::numeric_limits<double>::max());
968 void SetDestination(std::string val)
970 std::regex valRegex(
"^[13][a-km-zA-HJ-NP-Z1-9]{25,34}$");
971 std::string valMatch(val);
972 if (std::regex_match(valMatch, valRegex))
978 throw Poco::RegularExpressionException(
"destination invalid.");
982 bool isSetDestination() {
983 return (destination !=
"Empty");
986 std::string destination;
989 void SetType(std::string val)
991 std::regex valRegex(
"BTC|XFERS");
992 std::string valMatch(val);
993 if (std::regex_match(valMatch, valRegex))
999 throw Poco::RegularExpressionException(
"type invalid.");
1004 return (type !=
"Empty");
1010 : amount(std::numeric_limits<double>::max())
1011 , destination(
"Empty")
1030 Poco::AutoPtr<Ticker> GetTicker();
1033 Poco::AutoPtr<TickerDetailed> GetTickerDetailed();
1036 Poco::AutoPtr<OrderBook> GetOrderBook();
1039 Poco::AutoPtr<Trades> GetTrades(Poco::AutoPtr<TradesParams> tradesParams);
1042 Poco::AutoPtr<ErrorMessage> Test();
1045 Poco::AutoPtr<AccountInfo> GetAccountInfo();
1048 Poco::AutoPtr<PendingOrders> GetPendingOrders();
1051 Poco::AutoPtr<OrderHistory> GetOrderHistory(Poco::AutoPtr<OrderHistoryParams> orderHistoryParams);
1054 Poco::AutoPtr<OrderStatus> PlaceOrder(Poco::AutoPtr<OrderParams> orderParams);
1057 Poco::AutoPtr<ErrorNumber> CancelOrder(Poco::AutoPtr<CancelOrderParams> cancelOrderParams);
1060 Poco::AutoPtr<ErrorNumberAndMessage> Withdraw(Poco::AutoPtr<WithdrawParams> withdrawParams);
1064 Poco::AutoPtr<trader::App> _app;
Definition: fybapi.h:1021
Definition: fybconfig.h:7