LongPort OpenAPI C++ SDK
types.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 #include "decimal.hpp"
4 #include <optional>
5 #include <vector>
6 
7 namespace longport {
8 
9 struct Date
10 {
11  int32_t year;
12  uint8_t month;
13  uint8_t day;
14 };
15 
16 struct Time
17 {
18  uint8_t hour;
19  uint8_t minute;
20  uint8_t second;
21 };
22 
23 struct DateTime
24 {
27 };
28 
30 enum class Language
31 {
33  ZH_CN,
35  ZH_HK,
37  EN,
38 };
39 
42 {
44  Realtime,
46  Confirmed,
47 };
48 
50 enum class Market
51 {
53  Unknown,
55  US,
57  HK,
59  CN,
61  SG,
62 };
63 
64 namespace quote {
65 
66 enum class TradeStatus;
67 
69 class SubFlags
70 {
71 private:
72  uint8_t value_;
73 
74 public:
75  inline SubFlags(uint8_t value) { value_ = value; }
76 
77  inline operator uint8_t() const { return value_; }
78 
79  inline SubFlags operator|(const SubFlags& other) const
80  {
81  return SubFlags(value_ | other.value_);
82  }
83 
84  inline SubFlags& operator|=(const SubFlags& other)
85  {
86  value_ |= other.value_;
87  return *this;
88  }
89 
90  inline SubFlags operator&(const SubFlags& other) const
91  {
92  return SubFlags(value_ & other.value_);
93  }
94 
95  inline SubFlags& operator&=(const SubFlags& other)
96  {
97  value_ &= other.value_;
98  return *this;
99  }
100 
101  inline bool operator==(const SubFlags& other) const
102  {
103  return value_ == other.value_;
104  }
105 
106  inline bool contains(const SubFlags& other) const
107  {
108  return (value_ & other.value_) > 0;
109  }
110 
111  static SubFlags QUOTE();
112  static SubFlags DEPTH();
113  static SubFlags BROKER();
114  static SubFlags TRADE();
115 };
116 
119 {
120  uint8_t value;
121 
122  bool has_option();
123  bool has_warrant();
124 };
125 
127 enum class Period
128 {
130  Unknown,
132  Min1,
134  Min5,
136  Min15,
138  Min30,
140  Min60,
142  Day,
144  Week,
146  Month,
148  Year,
149 };
150 
153 {
155  std::string symbol;
159  std::vector<Period> candlesticks;
160 };
161 
163 enum class TradeSession
164 {
166  Normal,
168  Pre,
170  Post,
172  Overnight,
173 };
174 
176 struct PushQuote
177 {
179  std::string symbol;
189  int64_t timestamp;
191  int64_t volume;
198 };
199 
200 struct Depth
201 {
203  int32_t position;
205  std::optional<Decimal> price;
207  int64_t volume;
209  int64_t order_num;
210 };
211 
213 struct PushDepth
214 {
216  std::string symbol;
218  std::vector<Depth> asks;
220  std::vector<Depth> bids;
221 };
222 
224 struct Brokers
225 {
227  int32_t position;
229  std::vector<int32_t> broker_ids;
230 };
231 
234 {
236  std::string symbol;
238  std::vector<Brokers> ask_brokers;
240  std::vector<Brokers> bid_brokers;
241 };
242 
244 enum class SecurityBoard
245 {
247  Unknown,
249  USMain,
251  USPink,
253  USDJI,
255  USNSDQ,
257  USSector,
259  USOption,
261  USOptionS,
263  HKEquity,
265  HKPreIPO,
267  HKWarrant,
269  HKHS,
271  HKSector,
277  SHSTAR,
279  CNIX,
281  CNSector,
287  SZGEMConnect,
291  SGMain,
293  STI,
295  SGSector,
296 };
297 
299 struct Security
300 {
302  std::string symbol;
304  std::string name_cn;
306  std::string name_en;
308  std::string name_hk;
309 };
310 
313 {
315  std::string symbol;
317  std::string name_cn;
319  std::string name_en;
321  std::string name_hk;
323  std::string exchange;
325  std::string currency;
327  int32_t lot_size;
329  int64_t total_shares;
333  int64_t hk_shares;
346 };
347 
349 enum class TradeStatus
350 {
352  Normal,
354  Halted,
356  Delisted,
358  Fuse,
360  PrepareList,
362  CodeMoved,
364  ToBeOpened,
368  Expired,
372  SuspendTrade,
373 };
374 
377 {
381  int64_t timestamp;
383  int64_t volume;
392 };
393 
396 {
398  std::string symbol;
410  int64_t timestamp;
412  int64_t volume;
418  std::optional<PrePostQuote> pre_market_quote;
420  std::optional<PrePostQuote> post_market_quote;
422  std::optional<PrePostQuote> overnight_quote;
423 };
424 
426 enum class OptionType
427 {
429  Unknown,
431  American,
433  Europe,
434 };
435 
437 enum class OptionDirection
438 {
440  Unknown,
442  Put,
444  Call,
445 };
446 
449 {
450  std::string symbol;
462  int64_t timestamp;
464  int64_t volume;
472  int64_t open_interest;
488  std::string underlying_symbol;
489 };
490 
492 enum class TradeDirection
493 {
495  Neutral,
497  Down,
499  Up
500 };
501 
503 struct Trade
504 {
506  int64_t volume;
507  int64_t timestamp;
508  std::string trade_type;
511 };
512 
515 {
517  std::string symbol;
519  std::vector<Trade> trades;
520 };
521 
524 {
534  int64_t volume;
538  int64_t timestamp;
539 };
540 
543 {
545  std::string symbol;
550 };
551 
553 enum class WarrantType
554 {
556  Unknown,
558  Call,
560  Put,
562  Bull,
564  Bear,
566  Inline
567 };
568 
571 {
572  std::string symbol;
584  int64_t timestamp;
586  int64_t volume;
614  std::string underlying_symbol;
615 };
616 
619 {
621  std::vector<Depth> asks;
623  std::vector<Depth> bids;
624 };
625 
628 {
630  std::vector<Brokers> ask_brokers;
632  std::vector<Brokers> bid_brokers;
633 };
634 
636 {
638  std::vector<int32_t> broker_ids;
640  std::string name_cn;
642  std::string name_en;
644  std::string name_hk;
645 };
646 
649 {
651  int64_t timestamp;
652  int64_t volume;
655 };
656 
658 enum class AdjustType
659 {
660  NoAdjust,
662 };
663 
666 {
670  std::string call_symbol;
672  std::string put_symbol;
674  bool standard;
675 };
676 
679 {
681  int32_t issuer_id;
683  std::string name_cn;
685  std::string name_en;
687  std::string name_hk;
688 };
689 
691 {
698 };
699 
702 {
706  std::vector<TradingSessionInfo> trade_session;
707 };
708 
711 {
713  std::vector<Date> trading_days;
715  std::vector<Date> half_trading_days;
716 };
717 
720 {
724  int64_t timestamp;
725 };
726 
729 {
736 };
737 
740 {
742  int64_t timestamp;
747 };
748 
751 {
753  std::string symbol;
757  std::string name;
759  std::optional<Decimal> watched_price;
761  int64_t watched_at;
762 };
763 
766 {
768  int64_t id;
770  std::string name;
772  std::vector<WatchlistSecurity> securities;
773 };
774 
777 {
779  Add,
781  Remove,
783  Replace,
784 };
785 
788 {
790  std::string name;
792  std::vector<std::string> securities;
793 };
794 
797 {
799  int64_t id;
801  std::optional<std::string> name;
803  std::optional<std::vector<std::string>> securities;
806 };
807 
810 {
812  std::string symbol;
822  int64_t timestamp;
824  int64_t volume;
829 };
830 
832 enum class CalcIndex
833 {
835  LastDone,
837  ChangeValue,
839  ChangeRate,
841  Volume,
843  Turnover,
847  TurnoverRate,
851  CapitalFlow,
853  Amplitude,
855  VolumeRatio,
857  PeTtmRatio,
859  PbRatio,
871  ExpiryDate,
873  StrikePrice,
883  Premium,
885  ItmOtm,
889  WarrantDelta,
891  CallPrice,
893  ToCallPrice,
901  BalancePoint,
903  OpenInterest,
905  Delta,
907  Gamma,
909  Theta,
911  Vega,
913  Rho,
914 };
915 
918 {
920  std::string symbol;
922  std::optional<Decimal> last_done;
924  std::optional<Decimal> change_value;
926  std::optional<Decimal> change_rate;
928  std::optional<int64_t> volume;
930  std::optional<Decimal> turnover;
932  std::optional<Decimal> ytd_change_rate;
934  std::optional<Decimal> turnover_rate;
936  std::optional<Decimal> total_market_value;
938  std::optional<Decimal> capital_flow;
940  std::optional<Decimal> amplitude;
942  std::optional<Decimal> volume_ratio;
944  std::optional<Decimal> pe_ttm_ratio;
946  std::optional<Decimal> pb_ratio;
948  std::optional<Decimal> dividend_ratio_ttm;
950  std::optional<Decimal> five_day_change_rate;
952  std::optional<Decimal> ten_day_change_rate;
954  std::optional<Decimal> half_year_change_rate;
956  std::optional<Decimal> five_minutes_change_rate;
958  std::optional<Date> expiry_date;
960  std::optional<Decimal> strike_price;
962  std::optional<Decimal> upper_strike_price;
964  std::optional<Decimal> lower_strike_price;
966  std::optional<int64_t> outstanding_qty;
968  std::optional<Decimal> outstanding_ratio;
970  std::optional<Decimal> premium;
972  std::optional<Decimal> itm_otm;
974  std::optional<Decimal> implied_volatility;
976  std::optional<Decimal> warrant_delta;
978  std::optional<Decimal> call_price;
980  std::optional<Decimal> to_call_price;
982  std::optional<Decimal> effective_leverage;
984  std::optional<Decimal> leverage_ratio;
986  std::optional<Decimal> conversion_ratio;
988  std::optional<Decimal> balance_point;
990  std::optional<int64_t> open_interest;
992  std::optional<Decimal> delta;
994  std::optional<Decimal> gamma;
996  std::optional<Decimal> theta;
998  std::optional<Decimal> vega;
1000  std::optional<Decimal> rho;
1001 };
1002 
1004 enum class SortOrderType
1005 {
1007  Ascending,
1009  Descending,
1010 };
1011 
1013 enum class WarrantSortBy
1014 {
1016  LastDone,
1018  ChangeRate,
1020  ChangeValue,
1022  Volume,
1024  Turnover,
1026  ExpiryDate,
1028  StrikePrice,
1038  Premium,
1040  ItmOtm,
1044  Delta,
1046  CallPrice,
1048  ToCallPrice,
1052  LeverageRatio,
1056  BalancePoint,
1058  Status,
1059 };
1060 
1063 {
1065  LT_3,
1067  Between_3_6,
1069  Between_6_12,
1071  GT_12,
1072 };
1073 
1076 {
1078  In,
1080  Out,
1081 };
1082 
1084 enum class WarrantStatus
1085 {
1087  Suspend,
1089  PrepareList,
1091  Normal,
1092 };
1093 
1096 {
1098  std::string symbol;
1102  std::string name;
1110  int64_t volume;
1116  std::optional<Decimal> strike_price;
1118  std::optional<Decimal> upper_strike_price;
1120  std::optional<Decimal> lower_strike_price;
1128  std::optional<Decimal> itm_otm;
1130  std::optional<Decimal> implied_volatility;
1132  std::optional<Decimal> delta;
1134  std::optional<Decimal> call_price;
1136  std::optional<Decimal> to_call_price;
1138  std::optional<Decimal> effective_leverage;
1142  std::optional<Decimal> conversion_ratio;
1144  std::optional<Decimal> balance_point;
1147 };
1148 
1151 {
1153  Overnight,
1154 };
1155 
1158 {
1160  std::string key;
1162  std::string name;
1164  std::string description;
1166  int64_t start_at;
1168  int64_t end_at;
1169 };
1170 
1171 } // namespace quote
1172 
1173 namespace trade {
1174 
1176 enum class TopicType
1177 {
1179  Private,
1180 };
1181 
1184 {
1185  std::string order_id;
1186  std::string trade_id;
1187  std::string symbol;
1188  int64_t trade_done_at;
1191 };
1192 
1195 {
1197  std::optional<int64_t> start_at;
1199  std::optional<int64_t> end_at;
1201  std::optional<std::string> symbol;
1202 };
1203 
1206 {
1208  std::optional<std::string> symbol;
1210  std::optional<std::string> order_id;
1211 };
1212 
1214 enum class OrderStatus
1215 {
1217  Unknown,
1219  NotReported,
1227  Filled,
1229  WaitToNew,
1231  New,
1233  WaitToReplace,
1237  Replaced,
1239  PartialFilled,
1241  WaitToCancel,
1243  PendingCancel,
1245  Rejected,
1247  Canceled,
1249  Expired,
1252 };
1253 
1255 enum class OrderSide
1256 {
1258  Unknown,
1260  Buy,
1262  Sell,
1263 };
1264 
1266 enum class OrderType
1267 {
1269  Unknown,
1271  LO,
1273  ELO,
1275  MO,
1277  AO,
1279  ALO,
1281  ODD,
1283  LIT,
1285  MIT,
1287  TSLPAMT,
1289  TSLPPCT,
1291  TSMAMT,
1293  TSMPCT,
1295  SLO,
1296 };
1297 
1299 enum class OrderTag
1300 {
1302  Unknown,
1304  Normal,
1306  LongTerm,
1308  Grey,
1310  MarginCall,
1312  Offline,
1314  Creditor,
1316  Debtor,
1318  NonExercise,
1320  AllocatedSub,
1321 };
1322 
1325 {
1327  Unknown,
1329  Day,
1333  GoodTilDate,
1334 };
1335 
1337 enum class TriggerStatus
1338 {
1340  Unknown,
1342  Deactive,
1344  Active,
1346  Released,
1347 };
1348 
1350 enum class OutsideRTH
1351 {
1353  Unknown,
1355  RTHOnly,
1357  AnyTime,
1359  Overnight,
1360 };
1361 
1363 struct Order
1364 {
1366  std::string order_id;
1370  std::string stock_name;
1376  std::optional<Decimal> price;
1378  std::optional<Decimal> executed_price;
1380  int64_t submitted_at;
1384  std::string symbol;
1388  std::optional<Decimal> last_done;
1390  std::optional<Decimal> trigger_price;
1392  std::string msg;
1398  std::optional<Date> expire_date;
1400  std::optional<int64_t> updated_at;
1402  std::optional<int64_t> trigger_at;
1404  std::optional<Decimal> trailing_amount;
1406  std::optional<Decimal> trailing_percent;
1408  std::optional<Decimal> limit_offset;
1410  std::optional<TriggerStatus> trigger_status;
1412  std::string currency;
1414  std::optional<OutsideRTH> outside_rth;
1416  std::string remark;
1417 };
1418 
1421 {
1425  std::string stock_name;
1429  std::string symbol;
1437  std::optional<Decimal> executed_price;
1439  std::string order_id;
1441  std::string currency;
1445  int64_t submitted_at;
1447  int64_t updated_at;
1449  std::optional<Decimal> trigger_price;
1451  std::string msg;
1455  std::optional<TriggerStatus> trigger_status;
1457  std::optional<int64_t> trigger_at;
1459  std::optional<Decimal> trailing_amount;
1461  std::optional<Decimal> trailing_percent;
1463  std::optional<Decimal> limit_offset;
1465  std::string account_no;
1467  std::optional<Decimal> last_share;
1469  std::optional<Decimal> last_price;
1471  std::string remark;
1472 };
1473 
1476 {
1478  std::optional<std::string> symbol;
1480  std::optional<std::vector<OrderStatus>> status;
1482  std::optional<OrderSide> side;
1484  std::optional<Market> market;
1486  std::optional<int64_t> start_at;
1488  std::optional<int64_t> end_at;
1489 };
1490 
1493 {
1495  std::optional<std::string> symbol;
1497  std::optional<std::vector<OrderStatus>> status;
1499  std::optional<OrderSide> side;
1501  std::optional<Market> market;
1503  std::optional<std::string> order_id;
1504 };
1505 
1508 {
1510  std::string order_id;
1514  std::optional<Decimal> price;
1516  std::optional<Decimal> trigger_price;
1518  std::optional<Decimal> limit_offset;
1520  std::optional<Decimal> trailing_amount;
1522  std::optional<Decimal> trailing_percent;
1524  std::optional<std::string> remark;
1525 };
1526 
1529 {
1531  std::string symbol;
1541  std::optional<Decimal> submitted_price;
1543  std::optional<Decimal> trigger_price;
1545  std::optional<Decimal> limit_offset;
1547  std::optional<Decimal> trailing_amount;
1549  std::optional<Decimal> trailing_percent;
1552  std::optional<Date> expire_date;
1554  std::optional<OutsideRTH> outside_rth;
1556  std::optional<std::string> remark;
1557 };
1558 
1561 {
1563  std::string order_id;
1564 };
1565 
1567 struct CashInfo
1568 {
1578  std::string currency;
1579 };
1580 
1583 {
1591  int32_t risk_level;
1595  std::string currency;
1597  std::vector<CashInfo> cash_infos;
1606 };
1607 
1610 {
1612  Unknown,
1614  Out,
1616  In,
1617 };
1618 
1620 enum class BalanceType
1621 {
1623  Unknown,
1625  Cash,
1627  Stock,
1629  Fund,
1630 };
1631 
1633 struct CashFlow
1634 {
1644  std::string currency;
1646  int64_t business_time;
1648  std::optional<std::string> symbol;
1650  std::string description;
1651 };
1652 
1655 {
1657  int64_t start_at;
1659  int64_t end_at;
1661  std::optional<BalanceType> business_type;
1663  std::optional<std::string> symbol;
1665  std::optional<uintptr_t> page;
1667  std::optional<uintptr_t> size;
1668 };
1669 
1672 {
1674  std::optional<std::vector<std::string>> symbols;
1675 };
1676 
1679 {
1681  std::optional<std::vector<std::string>> symbols;
1682 };
1683 
1686 {
1688  std::string symbol;
1694  std::string symbol_name;
1696  std::string currency;
1701 };
1702 
1705 {
1707  std::string account_channel;
1709  std::vector<FundPosition> positions;
1710 };
1711 
1714 {
1716  std::vector<FundPositionChannel> channels;
1717 };
1718 
1721 {
1723  std::string symbol;
1725  std::string symbol_name;
1731  std::string currency;
1738  std::optional<Decimal> init_quantity;
1739 };
1740 
1743 {
1745  std::string account_channel;
1747  std::vector<StockPosition> positions;
1748 };
1749 
1752 {
1754  std::vector<StockPositionChannel> channels;
1755 };
1756 
1759 {
1766 };
1767 
1770 {
1771  Unknown,
1772  None,
1773  Calculated,
1774  Pending,
1775  Ready,
1776 };
1777 
1780 {
1781  Unknown,
1782  None,
1783  NoData,
1784  Pending,
1785  Done,
1786 };
1787 
1790 {
1791  Unknown,
1792  Broker,
1793  Third,
1794 };
1795 
1798 {
1808  std::string msg;
1810  int64_t time;
1811 };
1812 
1815 {
1817  std::string code;
1819  std::string name;
1823  std::string currency;
1824 };
1825 
1828 {
1832  std::string name;
1834  std::vector<OrderChargeFee> fees;
1835 };
1836 
1839 {
1843  std::string currency;
1845  std::vector<OrderChargeItem> items;
1846 };
1847 
1850 {
1852  std::string order_id;
1856  std::string stock_name;
1862  std::optional<Decimal> price;
1864  std::optional<Decimal> executed_price;
1866  int64_t submitted_at;
1870  std::string symbol;
1874  std::optional<Decimal> last_done;
1876  std::optional<Decimal> trigger_price;
1878  std::string msg;
1884  std::optional<Date> expire_date;
1886  std::optional<int64_t> updated_at;
1888  std::optional<int64_t> trigger_at;
1890  std::optional<Decimal> trailing_amount;
1892  std::optional<Decimal> trailing_percent;
1894  std::optional<Decimal> limit_offset;
1896  std::optional<TriggerStatus> trigger_status;
1898  std::string currency;
1900  std::optional<OutsideRTH> outside_rth;
1902  std::string remark;
1906  std::optional<Decimal> free_amount;
1908  std::optional<std::string> free_currency;
1912  std::optional<Decimal> deductions_amount;
1914  std::optional<std::string> deductions_currency;
1918  std::optional<Decimal> platform_deducted_amount;
1920  std::optional<std::string> platform_deducted_currency;
1922  std::vector<OrderHistoryDetail> history;
1925 };
1926 
1929 {
1931  std::string symbol;
1937  std::optional<Decimal> price;
1939  std::optional<std::string> currency;
1942  std::optional<std::string> order_id;
1945 };
1946 
1949 {
1954 };
1955 
1956 } // namespace trade
1957 
1958 } // namespace longport
Definition: decimal.hpp:13
Subscription flags.
Definition: types.hpp:70
bool contains(const SubFlags &other) const
Definition: types.hpp:106
SubFlags & operator|=(const SubFlags &other)
Definition: types.hpp:84
SubFlags & operator&=(const SubFlags &other)
Definition: types.hpp:95
static SubFlags BROKER()
static SubFlags TRADE()
SubFlags operator|(const SubFlags &other) const
Definition: types.hpp:79
SubFlags operator&(const SubFlags &other) const
Definition: types.hpp:90
static SubFlags QUOTE()
SubFlags(uint8_t value)
Definition: types.hpp:75
bool operator==(const SubFlags &other) const
Definition: types.hpp:101
static SubFlags DEPTH()
TradeDirection
Trade direction.
Definition: types.hpp:493
CalcIndex
Calc index.
Definition: types.hpp:833
@ OutstandingQty
Outstanding quantity.
@ TenDayChangeRate
Ten days change ratio.
@ LeverageRatio
Leverage ratio.
@ LowerStrikePrice
Lower bound price.
@ EffectiveLeverage
Effective leverage.
@ ConversionRatio
Conversion ratio.
@ WarrantDelta
Warrant delta.
@ DividendRatioTtm
Dividend ratio (TTM)
@ ItmOtm
In/out of the bound.
@ CapitalFlow
Capital flow.
@ YtdChangeRate
Year-to-date change ratio.
@ FiveDayChangeRate
Five days change ratio.
@ StrikePrice
Strike price.
@ BalancePoint
Breakeven point.
@ ToCallPrice
Price interval from the call price.
@ TotalMarketValue
Total market value.
@ ChangeValue
Change value.
@ HalfYearChangeRate
Half year change ratio.
@ TurnoverRate
Turnover rate.
@ ImpliedVolatility
Implied volatility.
@ OutstandingRatio
Outstanding ratio.
@ FiveMinutesChangeRate
Five minutes change ratio.
@ UpperStrikePrice
Upper bound price.
@ VolumeRatio
Volume ratio.
@ OpenInterest
Open interest.
OptionDirection
Option direction.
Definition: types.hpp:438
SecuritiesUpdateMode
Securities update mode.
Definition: types.hpp:777
FilterWarrantExpiryDate
Filter warrant expiry date type.
Definition: types.hpp:1063
Period
Candlestick period.
Definition: types.hpp:128
@ Min15
Fifteen Minutes.
@ Min60
Sixty Minutes.
@ Min30
Thirty Minutes.
TradeSession
Trade session.
Definition: types.hpp:164
@ Overnight
Overnight-Trading.
TradeStatus
Trade status.
Definition: types.hpp:350
@ SplitStockHalts
Split Stock Halts.
@ WarrantPrepareList
Warrant To BeListed.
SecurityBoard
Security board.
Definition: types.hpp:245
@ STI
Singapore Straits Index.
@ USSector
US Industry Board.
@ HKPreIPO
HK PreIPO Security.
@ SHSTAR
SH Science and Technology Innovation Board.
@ SZMainNonConnect
SZ Main Board(Non Connect)
@ HKSector
HK Industry Board.
@ SZGEMNonConnect
SZ Gem Board(Non Connect)
@ SZMainConnect
SZ Main Board(Connect)
@ SHMainNonConnect
SH Main Board(Non Connect)
@ SHMainConnect
SH Main Board(Connect)
@ SZGEMConnect
SZ Gem Board(Connect)
@ USOptionS
US Sepecial Option.
@ SGSector
SG Industry Board.
@ HKEquity
Hong Kong Equity Securities.
@ USDJI
Dow Jones Industrial Average.
@ CNSector
CN Industry Board.
AdjustType
Adjust type.
Definition: types.hpp:659
OptionType
Option type.
Definition: types.hpp:427
WarrantStatus
Warrant status.
Definition: types.hpp:1085
SecurityListCategory
Security list category.
Definition: types.hpp:1151
WarrantSortBy
Warrant sort by.
Definition: types.hpp:1014
@ LeverageRatio
Leverage ratio.
@ LowerStrikePrice
Lower strike price.
@ EffectiveLeverage
Effective leverage.
@ ConversionRatio
Conversion ratio.
@ ItmOtm
In/out of the bound.
@ BalancePoint
Breakeven point.
@ ToCallPrice
Price interval from the call price.
@ ImpliedVolatility
Implied volatility.
@ Delta
Greek value Delta.
@ OutstandingRatio
Outstanding ratio.
@ OutstandingQuantity
Outstanding quantity.
@ UpperStrikePrice
Upper strike price.
FilterWarrantInOutBoundsType
Filter warrant in/out of the bounds type.
Definition: types.hpp:1076
WarrantType
Warrant type.
Definition: types.hpp:554
SortOrderType
Sort order type.
Definition: types.hpp:1005
TriggerStatus
Trigger status.
Definition: types.hpp:1338
OutsideRTH
Enable or disable outside regular trading hours.
Definition: types.hpp:1351
@ RTHOnly
Regular trading hour only.
OrderTag
Order tag.
Definition: types.hpp:1300
@ LongTerm
Long term Order.
@ MarginCall
Force Selling.
@ Creditor
Option Exercise Long.
@ NonExercise
Wavier Of Option Exercise.
@ AllocatedSub
Trade Allocation.
@ Debtor
Option Exercise Short.
ChargeCategoryCode
Charge category code.
Definition: types.hpp:1790
OrderType
Order type.
Definition: types.hpp:1267
@ TSLPAMT
Trailing Limit If Touched (Trailing Amount)
@ AO
At-auction Order.
@ ALO
At-auction Limit Order.
@ MIT
Market If Touched.
@ SLO
Special Limit Order.
@ LIT
Limit If Touched.
@ TSMAMT
Trailing Market If Touched (Trailing Amount)
@ ELO
Enhanced Limit Order.
@ TSLPPCT
Trailing Limit If Touched (Trailing Percent)
@ TSMPCT
Trailing Market If Touched (Trailing Percent)
OrderSide
Order side.
Definition: types.hpp:1256
TimeInForceType
Time in force Type.
Definition: types.hpp:1325
@ GoodTilDate
Good Til Date Order.
@ GoodTilCanceled
Good Til Canceled Order.
CommissionFreeStatus
Commission-free Status.
Definition: types.hpp:1770
CashFlowDirection
Cash flow direction.
Definition: types.hpp:1610
TopicType
Topic type.
Definition: types.hpp:1177
@ Private
Private notification for trade.
DeductionStatus
Deduction status.
Definition: types.hpp:1780
BalanceType
Balance type.
Definition: types.hpp:1621
OrderStatus
Order status.
Definition: types.hpp:1215
@ PartialWithdrawal
Partial Withdrawal.
@ ReplacedNotReported
Not reported (Replaced Order)
@ PendingCancel
Pending Cancel.
@ WaitToReplace
Wait To Replace.
@ PartialFilled
Partial Filled.
@ PendingReplace
Pending Replace.
@ VarietiesNotReported
Not reported (Conditional Order)
@ WaitToCancel
Wait To Cancel.
@ ProtectedNotReported
Not reported (Protected Order)
Definition: async_result.hpp:7
PushCandlestickMode
Push candlestick mode.
Definition: types.hpp:42
Market
Market.
Definition: types.hpp:51
@ SG
SG market.
@ CN
CN market.
@ HK
HK market.
@ US
US market.
@ Unknown
Unknown.
Language
Language identifer.
Definition: types.hpp:31
Definition: types.hpp:10
uint8_t day
Definition: types.hpp:13
int32_t year
Definition: types.hpp:11
uint8_t month
Definition: types.hpp:12
Definition: types.hpp:24
Date date
Definition: types.hpp:25
Time time
Definition: types.hpp:26
Definition: types.hpp:17
uint8_t minute
Definition: types.hpp:19
uint8_t second
Definition: types.hpp:20
uint8_t hour
Definition: types.hpp:18
Brokers.
Definition: types.hpp:225
int32_t position
Position.
Definition: types.hpp:227
std::vector< int32_t > broker_ids
Broker IDs.
Definition: types.hpp:229
Candlestick.
Definition: types.hpp:524
Decimal open
Open price.
Definition: types.hpp:528
Decimal high
High price.
Definition: types.hpp:532
Decimal low
Low price.
Definition: types.hpp:530
Decimal turnover
Turnover.
Definition: types.hpp:536
int64_t timestamp
Timestamp.
Definition: types.hpp:538
Decimal close
Close price.
Definition: types.hpp:526
int64_t volume
Volume.
Definition: types.hpp:534
Capital distribution.
Definition: types.hpp:729
Decimal small
Small order.
Definition: types.hpp:735
Decimal large
Large order.
Definition: types.hpp:731
Decimal medium
Medium order.
Definition: types.hpp:733
Capital distribution response.
Definition: types.hpp:740
CapitalDistribution capital_in
Inflow capital data.
Definition: types.hpp:744
CapitalDistribution capital_out
Outflow capital data.
Definition: types.hpp:746
int64_t timestamp
Time.
Definition: types.hpp:742
Capital flow line.
Definition: types.hpp:720
Decimal inflow
Inflow capital data.
Definition: types.hpp:722
int64_t timestamp
Time.
Definition: types.hpp:724
An request for create watchlist group.
Definition: types.hpp:788
std::vector< std::string > securities
Securities.
Definition: types.hpp:792
std::string name
Group name.
Definition: types.hpp:790
Definition: types.hpp:201
std::optional< Decimal > price
Price.
Definition: types.hpp:205
int64_t volume
Volume.
Definition: types.hpp:207
int64_t order_num
Number of orders.
Definition: types.hpp:209
int32_t position
Position.
Definition: types.hpp:203
Derivative type.
Definition: types.hpp:119
uint8_t value
Definition: types.hpp:120
Intraday line.
Definition: types.hpp:649
Decimal avg_price
Definition: types.hpp:654
Decimal turnover
Definition: types.hpp:653
int64_t volume
Definition: types.hpp:652
Decimal price
Definition: types.hpp:650
int64_t timestamp
Definition: types.hpp:651
Issuer info.
Definition: types.hpp:679
std::string name_en
Issuer name (en)
Definition: types.hpp:685
int32_t issuer_id
Issuer ID.
Definition: types.hpp:681
std::string name_hk
Issuer name (zh-HK)
Definition: types.hpp:687
std::string name_cn
Issuer name (zh-CN)
Definition: types.hpp:683
Market trading days.
Definition: types.hpp:711
std::vector< Date > trading_days
Trading days.
Definition: types.hpp:713
std::vector< Date > half_trading_days
Half trading days.
Definition: types.hpp:715
Market trading session.
Definition: types.hpp:702
std::vector< TradingSessionInfo > trade_session
Trading session.
Definition: types.hpp:706
Market market
Market.
Definition: types.hpp:704
Quote of option.
Definition: types.hpp:449
Decimal strike_price
Strike price.
Definition: types.hpp:476
OptionType contract_type
Option type.
Definition: types.hpp:480
Date expiry_date
Exprity date.
Definition: types.hpp:474
Decimal high
High.
Definition: types.hpp:458
Decimal open
Open.
Definition: types.hpp:456
Decimal prev_close
Yesterday's close.
Definition: types.hpp:454
Decimal contract_size
Contract size.
Definition: types.hpp:482
Decimal turnover
Turnover.
Definition: types.hpp:466
Decimal low
Low.
Definition: types.hpp:460
Decimal implied_volatility
Implied volatility.
Definition: types.hpp:470
int64_t volume
Volume.
Definition: types.hpp:464
Decimal contract_multiplier
Contract multiplier.
Definition: types.hpp:478
TradeStatus trade_status
Security trading status.
Definition: types.hpp:468
std::string symbol
Security code.
Definition: types.hpp:450
int64_t open_interest
Number of open positions.
Definition: types.hpp:472
Decimal historical_volatility
Underlying security historical volatility of the option.
Definition: types.hpp:486
OptionDirection direction
Option direction.
Definition: types.hpp:484
int64_t timestamp
Time of latest price.
Definition: types.hpp:462
Decimal last_done
Latest price.
Definition: types.hpp:452
std::string underlying_symbol
Underlying security symbol of the option.
Definition: types.hpp:488
Definition: types.hpp:636
std::string name_en
Participant name (en)
Definition: types.hpp:642
std::string name_hk
Participant name (zh-HK)
Definition: types.hpp:644
std::vector< int32_t > broker_ids
Broker IDs.
Definition: types.hpp:638
std::string name_cn
Participant name (zh-CN)
Definition: types.hpp:640
Quote of US pre/post market.
Definition: types.hpp:377
Decimal high
High.
Definition: types.hpp:387
int64_t timestamp
Time of latest price.
Definition: types.hpp:381
Decimal prev_close
Close of the last trade session.
Definition: types.hpp:391
int64_t volume
Volume.
Definition: types.hpp:383
Decimal last_done
Latest price.
Definition: types.hpp:379
Decimal low
Low.
Definition: types.hpp:389
Decimal turnover
Turnover.
Definition: types.hpp:385
Brokers message.
Definition: types.hpp:234
std::vector< Brokers > ask_brokers
Ask brokers.
Definition: types.hpp:238
std::vector< Brokers > bid_brokers
Bid brokers.
Definition: types.hpp:240
std::string symbol
Security code.
Definition: types.hpp:236
Candlestick updated message.
Definition: types.hpp:543
std::string symbol
Security code.
Definition: types.hpp:545
Candlestick candlestick
Candlestick.
Definition: types.hpp:549
Period period
Period type.
Definition: types.hpp:547
Depth message.
Definition: types.hpp:214
std::vector< Depth > bids
Bid depth.
Definition: types.hpp:220
std::vector< Depth > asks
Ask depth.
Definition: types.hpp:218
std::string symbol
Security code.
Definition: types.hpp:216
Quote message.
Definition: types.hpp:177
TradeSession trade_session
Trade session.
Definition: types.hpp:197
std::string symbol
Security code.
Definition: types.hpp:179
int64_t timestamp
Time of latest price.
Definition: types.hpp:189
Decimal low
Low.
Definition: types.hpp:187
Decimal high
High.
Definition: types.hpp:185
Decimal last_done
Latest price.
Definition: types.hpp:181
Decimal turnover
Turnover.
Definition: types.hpp:193
TradeStatus trade_status
Security trading status.
Definition: types.hpp:195
int64_t volume
Volume.
Definition: types.hpp:191
Decimal open
Open.
Definition: types.hpp:183
Trades message.
Definition: types.hpp:515
std::vector< Trade > trades
Trades data.
Definition: types.hpp:519
std::string symbol
Security code.
Definition: types.hpp:517
Quote package detail.
Definition: types.hpp:1158
std::string description
Description.
Definition: types.hpp:1164
std::string key
Key.
Definition: types.hpp:1160
int64_t end_at
End at.
Definition: types.hpp:1168
int64_t start_at
Start at.
Definition: types.hpp:1166
std::string name
Name.
Definition: types.hpp:1162
Real-time quote.
Definition: types.hpp:810
Decimal low
Low.
Definition: types.hpp:820
int64_t timestamp
Time of latest price.
Definition: types.hpp:822
Decimal high
High.
Definition: types.hpp:818
Decimal turnover
Turnover.
Definition: types.hpp:826
Decimal last_done
Latest price.
Definition: types.hpp:814
TradeStatus trade_status
Security trading status.
Definition: types.hpp:828
Decimal open
Open.
Definition: types.hpp:816
int64_t volume
Volume.
Definition: types.hpp:824
std::string symbol
Security code.
Definition: types.hpp:812
Security brokers.
Definition: types.hpp:628
std::vector< Brokers > ask_brokers
Ask brokers.
Definition: types.hpp:630
std::vector< Brokers > bid_brokers
Bid brokers.
Definition: types.hpp:632
Security calc index response.
Definition: types.hpp:918
std::optional< Decimal > outstanding_ratio
Outstanding ratio.
Definition: types.hpp:968
std::optional< Decimal > change_rate
Change ratio.
Definition: types.hpp:926
std::optional< Decimal > total_market_value
Total market value.
Definition: types.hpp:936
std::optional< Decimal > to_call_price
Price interval from the call price.
Definition: types.hpp:980
std::optional< Decimal > balance_point
Breakeven point.
Definition: types.hpp:988
std::optional< Decimal > pe_ttm_ratio
PE (TTM)
Definition: types.hpp:944
std::string symbol
Security code.
Definition: types.hpp:920
std::optional< Decimal > amplitude
Amplitude.
Definition: types.hpp:940
std::optional< Decimal > theta
Theta.
Definition: types.hpp:996
std::optional< Decimal > delta
Delta.
Definition: types.hpp:992
std::optional< Decimal > vega
Vega.
Definition: types.hpp:998
std::optional< Decimal > call_price
Call price.
Definition: types.hpp:978
std::optional< Decimal > pb_ratio
PB.
Definition: types.hpp:946
std::optional< Decimal > capital_flow
Capital flow.
Definition: types.hpp:938
std::optional< Decimal > leverage_ratio
Leverage ratio.
Definition: types.hpp:984
std::optional< Decimal > lower_strike_price
Lower bound price.
Definition: types.hpp:964
std::optional< Decimal > rho
Rho.
Definition: types.hpp:1000
std::optional< Decimal > itm_otm
In/out of the bound.
Definition: types.hpp:972
std::optional< Decimal > implied_volatility
Implied volatility.
Definition: types.hpp:974
std::optional< Decimal > five_minutes_change_rate
Five minutes change ratio.
Definition: types.hpp:956
std::optional< int64_t > outstanding_qty
Outstanding quantity.
Definition: types.hpp:966
std::optional< Decimal > five_day_change_rate
Five days change ratio.
Definition: types.hpp:950
std::optional< Decimal > dividend_ratio_ttm
Dividend ratio (TTM)
Definition: types.hpp:948
std::optional< Decimal > turnover_rate
Turnover rate.
Definition: types.hpp:934
std::optional< Decimal > turnover
Turnover.
Definition: types.hpp:930
std::optional< Decimal > conversion_ratio
Conversion ratio.
Definition: types.hpp:986
std::optional< Decimal > half_year_change_rate
Half year change ratio.
Definition: types.hpp:954
std::optional< Decimal > ytd_change_rate
Year-to-date change ratio.
Definition: types.hpp:932
std::optional< Date > expiry_date
Expiry date.
Definition: types.hpp:958
std::optional< Decimal > volume_ratio
Volume ratio.
Definition: types.hpp:942
std::optional< Decimal > gamma
Gamma.
Definition: types.hpp:994
std::optional< Decimal > warrant_delta
Warrant delta.
Definition: types.hpp:976
std::optional< int64_t > open_interest
Open interest.
Definition: types.hpp:990
std::optional< Decimal > upper_strike_price
Upper bound price.
Definition: types.hpp:962
std::optional< int64_t > volume
Volume.
Definition: types.hpp:928
std::optional< Decimal > change_value
Change value.
Definition: types.hpp:924
std::optional< Decimal > strike_price
Strike price.
Definition: types.hpp:960
std::optional< Decimal > ten_day_change_rate
Ten days change ratio.
Definition: types.hpp:952
std::optional< Decimal > effective_leverage
Effective leverage.
Definition: types.hpp:982
std::optional< Decimal > premium
Premium.
Definition: types.hpp:970
std::optional< Decimal > last_done
Latest price.
Definition: types.hpp:922
Security depth.
Definition: types.hpp:619
std::vector< Depth > asks
Ask depth.
Definition: types.hpp:621
std::vector< Depth > bids
Bid depth.
Definition: types.hpp:623
Security.
Definition: types.hpp:300
std::string symbol
Security code.
Definition: types.hpp:302
std::string name_hk
Security name (zh-HK)
Definition: types.hpp:308
std::string name_cn
Security name (zh-CN)
Definition: types.hpp:304
std::string name_en
Security name (en)
Definition: types.hpp:306
Quote of securitity.
Definition: types.hpp:396
int64_t timestamp
Time of latest price.
Definition: types.hpp:410
Decimal turnover
Turnover.
Definition: types.hpp:414
Decimal last_done
Latest price.
Definition: types.hpp:400
std::optional< PrePostQuote > overnight_quote
Quote of US overnight market.
Definition: types.hpp:422
Decimal high
High.
Definition: types.hpp:406
Decimal prev_close
Yesterday's close.
Definition: types.hpp:402
TradeStatus trade_status
Security trading status.
Definition: types.hpp:416
int64_t volume
Volume.
Definition: types.hpp:412
std::optional< PrePostQuote > pre_market_quote
Quote of US pre market.
Definition: types.hpp:418
Decimal low
Low.
Definition: types.hpp:408
Decimal open
Open.
Definition: types.hpp:404
std::optional< PrePostQuote > post_market_quote
Quote of US post market.
Definition: types.hpp:420
std::string symbol
Security code.
Definition: types.hpp:398
The basic information of securities.
Definition: types.hpp:313
Decimal dividend_yield
Dividend yield.
Definition: types.hpp:341
int64_t hk_shares
HK shares (only HK stocks)
Definition: types.hpp:333
Decimal eps
Earnings per share.
Definition: types.hpp:335
std::string exchange
Exchange which the security belongs to.
Definition: types.hpp:323
int32_t lot_size
Lot size.
Definition: types.hpp:327
std::string name_hk
Security name (zh-HK)
Definition: types.hpp:321
std::string name_cn
Security name (zh-CN)
Definition: types.hpp:317
DerivativeType stock_derivatives
Types of supported derivatives.
Definition: types.hpp:343
std::string currency
Trading currency.
Definition: types.hpp:325
Decimal eps_ttm
Earnings per share (TTM)
Definition: types.hpp:337
std::string symbol
Security code.
Definition: types.hpp:315
std::string name_en
Security name (en)
Definition: types.hpp:319
int64_t circulating_shares
Circulating shares.
Definition: types.hpp:331
SecurityBoard board
Board.
Definition: types.hpp:345
int64_t total_shares
Total shares.
Definition: types.hpp:329
Decimal bps
Net assets per share.
Definition: types.hpp:339
Strike price info.
Definition: types.hpp:666
std::string call_symbol
Security code of call option.
Definition: types.hpp:670
bool standard
Is standard.
Definition: types.hpp:674
std::string put_symbol
Security code of put option.
Definition: types.hpp:672
Decimal price
Strike price.
Definition: types.hpp:668
Subscription.
Definition: types.hpp:153
SubFlags sub_types
Subscription flags.
Definition: types.hpp:157
std::vector< Period > candlesticks
Candlesticks.
Definition: types.hpp:159
std::string symbol
Security code.
Definition: types.hpp:155
Trade.
Definition: types.hpp:504
TradeSession trade_session
Definition: types.hpp:510
TradeDirection direction
Definition: types.hpp:509
int64_t volume
Definition: types.hpp:506
std::string trade_type
Definition: types.hpp:508
int64_t timestamp
Definition: types.hpp:507
Decimal price
Definition: types.hpp:505
Definition: types.hpp:691
Time begin_time
Being trading time.
Definition: types.hpp:693
Time end_time
End trading time.
Definition: types.hpp:695
TradeSession trade_session
Trading session.
Definition: types.hpp:697
An request for update watchlist group.
Definition: types.hpp:797
SecuritiesUpdateMode mode
Securities Update Mode.
Definition: types.hpp:805
std::optional< std::string > name
Group name.
Definition: types.hpp:801
std::optional< std::vector< std::string > > securities
Securities.
Definition: types.hpp:803
int64_t id
Group id.
Definition: types.hpp:799
Warrant info.
Definition: types.hpp:1096
Decimal change_rate
Quote change rate.
Definition: types.hpp:1106
int64_t volume
Volume.
Definition: types.hpp:1110
std::optional< Decimal > delta
Delta.
Definition: types.hpp:1132
Date expiry_date
Expiry date.
Definition: types.hpp:1114
std::optional< Decimal > upper_strike_price
Upper strike price.
Definition: types.hpp:1118
Decimal premium
Premium.
Definition: types.hpp:1126
Decimal last_done
Latest price.
Definition: types.hpp:1104
std::string symbol
Security code.
Definition: types.hpp:1098
WarrantType warrant_type
Warrant type.
Definition: types.hpp:1100
std::optional< Decimal > to_call_price
Price interval from the call price.
Definition: types.hpp:1136
std::optional< Decimal > effective_leverage
Effective leverage.
Definition: types.hpp:1138
std::optional< Decimal > itm_otm
In/out of the bound.
Definition: types.hpp:1128
std::optional< Decimal > strike_price
Strike price.
Definition: types.hpp:1116
std::optional< Decimal > conversion_ratio
Conversion ratio.
Definition: types.hpp:1142
Decimal turnover
Turnover.
Definition: types.hpp:1112
int64_t outstanding_qty
Outstanding quantity.
Definition: types.hpp:1122
WarrantStatus status
Status.
Definition: types.hpp:1146
std::optional< Decimal > lower_strike_price
Lower strike price.
Definition: types.hpp:1120
std::string name
Security name.
Definition: types.hpp:1102
std::optional< Decimal > balance_point
Breakeven point.
Definition: types.hpp:1144
Decimal change_value
Quote change.
Definition: types.hpp:1108
std::optional< Decimal > implied_volatility
Implied volatility.
Definition: types.hpp:1130
std::optional< Decimal > call_price
Call price.
Definition: types.hpp:1134
Decimal outstanding_ratio
Outstanding ratio.
Definition: types.hpp:1124
Decimal leverage_ratio
Leverage ratio.
Definition: types.hpp:1140
Quote of warrant.
Definition: types.hpp:571
Decimal outstanding_ratio
Outstanding ratio.
Definition: types.hpp:598
Decimal low
Low.
Definition: types.hpp:582
Date last_trade_date
Last tradalbe date.
Definition: types.hpp:596
std::string symbol
Security code.
Definition: types.hpp:572
Decimal lower_strike_price
Lower bound price.
Definition: types.hpp:610
Decimal implied_volatility
Implied volatility.
Definition: types.hpp:592
Decimal open
Open.
Definition: types.hpp:578
int64_t outstanding_quantity
Outstanding quantity.
Definition: types.hpp:600
Decimal call_price
Call price.
Definition: types.hpp:612
int64_t timestamp
Time of latest price.
Definition: types.hpp:584
Date expiry_date
Exprity date.
Definition: types.hpp:594
Decimal strike_price
Strike price.
Definition: types.hpp:606
Decimal high
High.
Definition: types.hpp:580
Decimal turnover
Turnover.
Definition: types.hpp:588
std::string underlying_symbol
Underlying security symbol of the warrant.
Definition: types.hpp:614
int64_t volume
Volume.
Definition: types.hpp:586
WarrantType category
Warrant type.
Definition: types.hpp:604
Decimal last_done
Latest price.
Definition: types.hpp:574
Decimal prev_close
Yesterday's close.
Definition: types.hpp:576
Decimal conversion_ratio
Conversion ratio.
Definition: types.hpp:602
Decimal upper_strike_price
Upper bound price.
Definition: types.hpp:608
TradeStatus trade_status
Security trading status.
Definition: types.hpp:590
Watchlist group.
Definition: types.hpp:766
std::vector< WatchlistSecurity > securities
Securities.
Definition: types.hpp:772
int64_t id
Group id.
Definition: types.hpp:768
std::string name
Group name.
Definition: types.hpp:770
Watchlist security.
Definition: types.hpp:751
int64_t watched_at
Watched time.
Definition: types.hpp:761
std::string name
Security name.
Definition: types.hpp:757
std::string symbol
Security symbol.
Definition: types.hpp:753
std::optional< Decimal > watched_price
Watched price.
Definition: types.hpp:759
Market market
Market.
Definition: types.hpp:755
Account balance.
Definition: types.hpp:1583
Decimal buy_power
Buy power.
Definition: types.hpp:1605
std::vector< CashInfo > cash_infos
Cash details.
Definition: types.hpp:1597
Decimal init_margin
Initial margin.
Definition: types.hpp:1601
Decimal remaining_finance_amount
Remaining financing amount.
Definition: types.hpp:1589
Decimal total_cash
Total cash.
Definition: types.hpp:1585
int32_t risk_level
Risk control level.
Definition: types.hpp:1591
Decimal max_finance_amount
Maximum financing amount.
Definition: types.hpp:1587
Decimal margin_call
Margin call.
Definition: types.hpp:1593
std::string currency
Currency.
Definition: types.hpp:1595
Decimal maintenance_margin
Maintenance margin.
Definition: types.hpp:1603
Decimal net_assets
Net assets.
Definition: types.hpp:1599
Cash flow.
Definition: types.hpp:1634
CashFlowDirection direction
Outflow direction.
Definition: types.hpp:1638
int64_t business_time
Business time.
Definition: types.hpp:1646
std::optional< std::string > symbol
Associated Stock code information.
Definition: types.hpp:1648
Decimal balance
Cash amount.
Definition: types.hpp:1642
std::string description
Cash flow description.
Definition: types.hpp:1650
std::string transaction_flow_name
Cash flow name.
Definition: types.hpp:1636
BalanceType business_type
Balance type.
Definition: types.hpp:1640
std::string currency
Cash currency.
Definition: types.hpp:1644
Cash info.
Definition: types.hpp:1568
std::string currency
Currency.
Definition: types.hpp:1578
Decimal available_cash
Available cash.
Definition: types.hpp:1572
Decimal settling_cash
Cash to be settled.
Definition: types.hpp:1576
Decimal frozen_cash
Frozen cash.
Definition: types.hpp:1574
Decimal withdraw_cash
Withdraw cash.
Definition: types.hpp:1570
Options for estimate maximum purchase quantity.
Definition: types.hpp:1929
bool fractional_shares
Get the maximum fractional share buying power.
Definition: types.hpp:1944
std::optional< std::string > currency
Settlement currency.
Definition: types.hpp:1939
std::optional< Decimal > price
Estimated order price.
Definition: types.hpp:1937
OrderSide side
Order side.
Definition: types.hpp:1935
std::optional< std::string > order_id
Definition: types.hpp:1942
std::string symbol
Security code.
Definition: types.hpp:1931
OrderType order_type
Order type.
Definition: types.hpp:1933
Response for estimate maximum purchase quantity.
Definition: types.hpp:1949
Decimal cash_max_qty
Cash available quantity.
Definition: types.hpp:1951
Decimal margin_max_qty
Margin available quantity.
Definition: types.hpp:1953
Exexution.
Definition: types.hpp:1184
int64_t trade_done_at
Definition: types.hpp:1188
Decimal quantity
Definition: types.hpp:1189
Decimal price
Definition: types.hpp:1190
std::string symbol
Definition: types.hpp:1187
std::string order_id
Definition: types.hpp:1185
std::string trade_id
Definition: types.hpp:1186
Fund position channel.
Definition: types.hpp:1705
std::string account_channel
Account type.
Definition: types.hpp:1707
std::vector< FundPosition > positions
Fund positions.
Definition: types.hpp:1709
Fund position.
Definition: types.hpp:1686
Decimal cost_net_asset_value
Net cost.
Definition: types.hpp:1698
Decimal current_net_asset_value
Current equity.
Definition: types.hpp:1690
Decimal holding_units
Holding units.
Definition: types.hpp:1700
int64_t net_asset_value_day
Current equity time.
Definition: types.hpp:1692
std::string symbol
Fund ISIN code.
Definition: types.hpp:1688
std::string symbol_name
Fund name.
Definition: types.hpp:1694
std::string currency
Currency.
Definition: types.hpp:1696
Fund positions response.
Definition: types.hpp:1714
std::vector< FundPositionChannel > channels
Channels.
Definition: types.hpp:1716
Options for submit order request.
Definition: types.hpp:1655
std::optional< uintptr_t > page
Page number.
Definition: types.hpp:1665
std::optional< std::string > symbol
Security symbol.
Definition: types.hpp:1663
int64_t end_at
End time.
Definition: types.hpp:1659
int64_t start_at
Start time.
Definition: types.hpp:1657
std::optional< BalanceType > business_type
Business type.
Definition: types.hpp:1661
std::optional< uintptr_t > size
Page size.
Definition: types.hpp:1667
Options for get fund positions request.
Definition: types.hpp:1672
std::optional< std::vector< std::string > > symbols
Fund symbols.
Definition: types.hpp:1674
Options for get histroy executions request.
Definition: types.hpp:1195
std::optional< int64_t > end_at
End time.
Definition: types.hpp:1199
std::optional< int64_t > start_at
Start time.
Definition: types.hpp:1197
std::optional< std::string > symbol
Security code.
Definition: types.hpp:1201
Options for get history orders request.
Definition: types.hpp:1476
std::optional< int64_t > end_at
End time.
Definition: types.hpp:1488
std::optional< OrderSide > side
Order side.
Definition: types.hpp:1482
std::optional< Market > market
Market.
Definition: types.hpp:1484
std::optional< std::string > symbol
Security symbol.
Definition: types.hpp:1478
std::optional< std::vector< OrderStatus > > status
Order status.
Definition: types.hpp:1480
std::optional< int64_t > start_at
Start time.
Definition: types.hpp:1486
Options for get stock positions request.
Definition: types.hpp:1679
std::optional< std::vector< std::string > > symbols
Stock symbols.
Definition: types.hpp:1681
Options for get today executions request.
Definition: types.hpp:1206
std::optional< std::string > symbol
Security code.
Definition: types.hpp:1208
std::optional< std::string > order_id
Order id.
Definition: types.hpp:1210
Options for get today orders request.
Definition: types.hpp:1493
std::optional< OrderSide > side
Order side.
Definition: types.hpp:1499
std::optional< Market > market
Market.
Definition: types.hpp:1501
std::optional< std::string > order_id
Order id.
Definition: types.hpp:1503
std::optional< std::vector< OrderStatus > > status
Order status.
Definition: types.hpp:1497
std::optional< std::string > symbol
Security symbol.
Definition: types.hpp:1495
Margin ratio.
Definition: types.hpp:1759
Decimal mm_factor
Maintain the initial margin ratio.
Definition: types.hpp:1763
Decimal im_factor
Initial margin ratio.
Definition: types.hpp:1761
Decimal fm_factor
Forced close-out margin ratio.
Definition: types.hpp:1765
Order charge detail.
Definition: types.hpp:1839
std::string currency
Settlement currency.
Definition: types.hpp:1843
Decimal total_amount
Total charges amount.
Definition: types.hpp:1841
std::vector< OrderChargeItem > items
Order charge items.
Definition: types.hpp:1845
Order charge fee.
Definition: types.hpp:1815
std::string name
Charge name.
Definition: types.hpp:1819
std::string code
Charge code.
Definition: types.hpp:1817
Decimal amount
Charge amount.
Definition: types.hpp:1821
std::string currency
Charge currency.
Definition: types.hpp:1823
Order charge item.
Definition: types.hpp:1828
std::string name
Charge category name.
Definition: types.hpp:1832
ChargeCategoryCode code
Charge category code.
Definition: types.hpp:1830
std::vector< OrderChargeFee > fees
Charge details.
Definition: types.hpp:1834
Order detail.
Definition: types.hpp:1850
OrderSide side
Order side.
Definition: types.hpp:1868
std::optional< Decimal > deductions_amount
Deduction amount.
Definition: types.hpp:1912
std::optional< int64_t > trigger_at
Conditional order trigger time.
Definition: types.hpp:1888
std::optional< Date > expire_date
Long term order expire date.
Definition: types.hpp:1884
CommissionFreeStatus free_status
Commission-free Status.
Definition: types.hpp:1904
std::optional< std::string > deductions_currency
Deduction currency.
Definition: types.hpp:1914
DeductionStatus deductions_status
Deduction status.
Definition: types.hpp:1910
std::optional< Decimal > platform_deducted_amount
Platform deduction amount.
Definition: types.hpp:1918
std::optional< Decimal > trigger_price
LIT / MIT Order Trigger Price
Definition: types.hpp:1876
std::optional< TriggerStatus > trigger_status
Conditional order trigger status.
Definition: types.hpp:1896
DeductionStatus platform_deducted_status
Platform fee deduction status.
Definition: types.hpp:1916
std::optional< int64_t > updated_at
Last updated time.
Definition: types.hpp:1886
OrderStatus status
Order status.
Definition: types.hpp:1854
std::optional< std::string > platform_deducted_currency
Platform deduction currency.
Definition: types.hpp:1920
std::optional< Decimal > free_amount
Commission-free amount.
Definition: types.hpp:1906
OrderChargeDetail charge_detail
Order charges.
Definition: types.hpp:1924
Decimal quantity
Submitted quantity.
Definition: types.hpp:1858
std::optional< Decimal > last_done
Last done.
Definition: types.hpp:1874
std::vector< OrderHistoryDetail > history
Order history details.
Definition: types.hpp:1922
std::string msg
Rejected Message or remark.
Definition: types.hpp:1878
Decimal executed_quantity
Executed quantity.
Definition: types.hpp:1860
std::optional< Decimal > price
Submitted price.
Definition: types.hpp:1862
std::string order_id
Order ID.
Definition: types.hpp:1852
std::optional< Decimal > trailing_amount
TSMAMT / TSLPAMT order trailing amount
Definition: types.hpp:1890
OrderTag tag
Order tag.
Definition: types.hpp:1880
std::optional< OutsideRTH > outside_rth
Enable or disable outside regular trading hours.
Definition: types.hpp:1900
std::optional< Decimal > limit_offset
TSLPAMT / TSLPPCT order limit offset amount
Definition: types.hpp:1894
std::optional< Decimal > trailing_percent
TSMPCT / TSLPPCT order trailing percent
Definition: types.hpp:1892
std::string remark
Remark.
Definition: types.hpp:1902
std::string symbol
Security code.
Definition: types.hpp:1870
OrderType order_type
Order type.
Definition: types.hpp:1872
TimeInForceType time_in_force
Time in force type.
Definition: types.hpp:1882
std::string currency
Currency.
Definition: types.hpp:1898
int64_t submitted_at
Submitted time.
Definition: types.hpp:1866
std::optional< std::string > free_currency
Commission-free currency.
Definition: types.hpp:1908
std::string stock_name
Stock name.
Definition: types.hpp:1856
std::optional< Decimal > executed_price
Executed price.
Definition: types.hpp:1864
Order history detail.
Definition: types.hpp:1798
Decimal quantity
Definition: types.hpp:1804
OrderStatus status
Order status.
Definition: types.hpp:1806
std::string msg
Execution or error message.
Definition: types.hpp:1808
Decimal price
Definition: types.hpp:1801
int64_t time
Occurrence time.
Definition: types.hpp:1810
Order.
Definition: types.hpp:1364
std::optional< Decimal > last_done
Last done.
Definition: types.hpp:1388
std::optional< Decimal > trailing_percent
TSMPCT / TSLPPCT order trailing percent
Definition: types.hpp:1406
std::optional< Date > expire_date
Long term order expire date.
Definition: types.hpp:1398
std::optional< OutsideRTH > outside_rth
Enable or disable outside regular trading hours.
Definition: types.hpp:1414
std::optional< Decimal > trigger_price
LIT / MIT Order Trigger Price
Definition: types.hpp:1390
TimeInForceType time_in_force
Time in force type.
Definition: types.hpp:1396
OrderSide side
Order side.
Definition: types.hpp:1382
std::optional< int64_t > updated_at
Last updated time.
Definition: types.hpp:1400
std::string remark
Remark.
Definition: types.hpp:1416
std::optional< int64_t > trigger_at
Conditional order trigger time.
Definition: types.hpp:1402
OrderTag tag
Order tag.
Definition: types.hpp:1394
std::string currency
Currency.
Definition: types.hpp:1412
std::optional< Decimal > trailing_amount
TSMAMT / TSLPAMT order trailing amount
Definition: types.hpp:1404
std::optional< TriggerStatus > trigger_status
Conditional order trigger status.
Definition: types.hpp:1410
std::string order_id
Order ID.
Definition: types.hpp:1366
OrderType order_type
Order type.
Definition: types.hpp:1386
std::string symbol
Security code.
Definition: types.hpp:1384
std::optional< Decimal > executed_price
Executed price.
Definition: types.hpp:1378
int64_t submitted_at
Submitted time.
Definition: types.hpp:1380
OrderStatus status
Order status.
Definition: types.hpp:1368
std::optional< Decimal > price
Submitted price.
Definition: types.hpp:1376
std::optional< Decimal > limit_offset
TSLPAMT / TSLPPCT order limit offset amount
Definition: types.hpp:1408
Decimal quantity
Submitted quantity.
Definition: types.hpp:1372
std::string stock_name
Stock name.
Definition: types.hpp:1370
std::string msg
Rejected Message or remark.
Definition: types.hpp:1392
Decimal executed_quantity
Executed quantity.
Definition: types.hpp:1374
Order changed message.
Definition: types.hpp:1421
std::string currency
Currency.
Definition: types.hpp:1441
std::optional< Decimal > executed_price
Executed price.
Definition: types.hpp:1437
std::string order_id
Order ID.
Definition: types.hpp:1439
Decimal executed_quantity
Executed quantity.
Definition: types.hpp:1435
int64_t submitted_at
Submitted time.
Definition: types.hpp:1445
std::optional< Decimal > trigger_price
Order trigger price.
Definition: types.hpp:1449
std::optional< Decimal > last_share
Last share.
Definition: types.hpp:1467
std::optional< Decimal > trailing_percent
Trailing percent.
Definition: types.hpp:1461
std::optional< Decimal > trailing_amount
Trailing amount.
Definition: types.hpp:1459
std::optional< Decimal > limit_offset
Limit offset amount.
Definition: types.hpp:1463
Decimal submitted_quantity
Submitted quantity.
Definition: types.hpp:1427
std::string account_no
Account no.
Definition: types.hpp:1465
OrderType order_type
Order type.
Definition: types.hpp:1431
OrderTag tag
Order tag.
Definition: types.hpp:1453
std::string stock_name
Stock name.
Definition: types.hpp:1425
std::string remark
Remark message.
Definition: types.hpp:1471
std::optional< int64_t > trigger_at
Conditional order trigger time.
Definition: types.hpp:1457
OrderStatus status
Order status.
Definition: types.hpp:1443
std::optional< TriggerStatus > trigger_status
Conditional order trigger status.
Definition: types.hpp:1455
OrderSide side
Order side.
Definition: types.hpp:1423
std::string msg
Rejected message or remark.
Definition: types.hpp:1451
std::string symbol
Order symbol.
Definition: types.hpp:1429
int64_t updated_at
Last updated time.
Definition: types.hpp:1447
Decimal submitted_price
Submitted price.
Definition: types.hpp:1433
std::optional< Decimal > last_price
Last price.
Definition: types.hpp:1469
Options for replace order request.
Definition: types.hpp:1508
std::string order_id
Order ID.
Definition: types.hpp:1510
std::optional< Decimal > trailing_percent
Trailing percent.
Definition: types.hpp:1522
Decimal quantity
Quantity.
Definition: types.hpp:1512
std::optional< std::string > remark
Remark.
Definition: types.hpp:1524
std::optional< Decimal > price
Price.
Definition: types.hpp:1514
std::optional< Decimal > trigger_price
Trigger price.
Definition: types.hpp:1516
std::optional< Decimal > trailing_amount
Trailing amount.
Definition: types.hpp:1520
std::optional< Decimal > limit_offset
Limit offset.
Definition: types.hpp:1518
Stock position channel.
Definition: types.hpp:1743
std::string account_channel
Account type.
Definition: types.hpp:1745
std::vector< StockPosition > positions
Stock positions.
Definition: types.hpp:1747
Stock position.
Definition: types.hpp:1721
Decimal cost_price
Definition: types.hpp:1734
Decimal quantity
The number of holdings.
Definition: types.hpp:1727
Market market
Market.
Definition: types.hpp:1736
std::optional< Decimal > init_quantity
Initial position before market opening.
Definition: types.hpp:1738
std::string symbol_name
Stock name.
Definition: types.hpp:1725
Decimal available_quantity
Available quantity.
Definition: types.hpp:1729
std::string currency
Currency.
Definition: types.hpp:1731
std::string symbol
Stock code.
Definition: types.hpp:1723
Stock positions response.
Definition: types.hpp:1752
std::vector< StockPositionChannel > channels
Channels.
Definition: types.hpp:1754
Options for submit order request.
Definition: types.hpp:1529
std::optional< Decimal > submitted_price
Submitted price.
Definition: types.hpp:1541
std::optional< Decimal > trigger_price
Trigger price (LIT / MIT Required)
Definition: types.hpp:1543
std::optional< std::string > remark
Remark (Maximum 64 characters)
Definition: types.hpp:1556
std::optional< Date > expire_date
Definition: types.hpp:1552
std::optional< Decimal > trailing_percent
Trailing percent (TSLPPCT / TSMAPCT Required)
Definition: types.hpp:1549
Decimal submitted_quantity
Submitted price.
Definition: types.hpp:1537
std::string symbol
Security symbol.
Definition: types.hpp:1531
OrderSide side
Order side.
Definition: types.hpp:1535
std::optional< Decimal > trailing_amount
Trailing amount (TSLPAMT / TSMAMT Required)
Definition: types.hpp:1547
std::optional< Decimal > limit_offset
Limit offset amount (TSLPAMT / TSLPPCT Required)
Definition: types.hpp:1545
std::optional< OutsideRTH > outside_rth
Enable or disable outside regular trading hours.
Definition: types.hpp:1554
OrderType order_type
Order type.
Definition: types.hpp:1533
TimeInForceType time_in_force
Time in force type.
Definition: types.hpp:1539
Response for submit order request.
Definition: types.hpp:1561
std::string order_id
Order id.
Definition: types.hpp:1563