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,
63  Crypto,
64 };
65 
66 namespace quote {
67 
68 enum class TradeStatus;
69 
71 class SubFlags
72 {
73 private:
74  uint8_t value_;
75 
76 public:
77  inline SubFlags(uint8_t value) { value_ = value; }
78 
79  inline operator uint8_t() const { return value_; }
80 
81  inline SubFlags operator|(const SubFlags& other) const
82  {
83  return SubFlags(value_ | other.value_);
84  }
85 
86  inline SubFlags& operator|=(const SubFlags& other)
87  {
88  value_ |= other.value_;
89  return *this;
90  }
91 
92  inline SubFlags operator&(const SubFlags& other) const
93  {
94  return SubFlags(value_ & other.value_);
95  }
96 
97  inline SubFlags& operator&=(const SubFlags& other)
98  {
99  value_ &= other.value_;
100  return *this;
101  }
102 
103  inline bool operator==(const SubFlags& other) const
104  {
105  return value_ == other.value_;
106  }
107 
108  inline bool contains(const SubFlags& other) const
109  {
110  return (value_ & other.value_) > 0;
111  }
112 
113  static SubFlags QUOTE();
114  static SubFlags DEPTH();
115  static SubFlags BROKER();
116  static SubFlags TRADE();
117 };
118 
121 {
122  uint8_t value;
123 
124  bool has_option();
125  bool has_warrant();
126 };
127 
129 enum class Period
130 {
132  Unknown,
134  Min1,
136  Min2,
138  Min3,
140  Min5,
142  Min10,
144  Min15,
146  Min20,
148  Min30,
150  Min45,
152  Min60,
154  Min120,
156  Min180,
158  Min240,
160  Day,
162  Week,
164  Month,
166  Quarter,
168  Year,
169 };
170 
173 {
175  std::string symbol;
179  std::vector<Period> candlesticks;
180 };
181 
183 enum class TradeSession
184 {
186  Intraday,
188  Pre,
190  Post,
192  Overnight,
193 };
194 
196 struct PushQuote
197 {
199  std::string symbol;
209  int64_t timestamp;
211  int64_t volume;
219  int64_t current_volume;
222 };
223 
224 struct Depth
225 {
227  int32_t position;
229  std::optional<Decimal> price;
231  int64_t volume;
233  int64_t order_num;
234 };
235 
237 struct PushDepth
238 {
240  std::string symbol;
242  std::vector<Depth> asks;
244  std::vector<Depth> bids;
245 };
246 
248 struct Brokers
249 {
251  int32_t position;
253  std::vector<int32_t> broker_ids;
254 };
255 
258 {
260  std::string symbol;
262  std::vector<Brokers> ask_brokers;
264  std::vector<Brokers> bid_brokers;
265 };
266 
268 enum class SecurityBoard
269 {
271  Unknown,
273  USMain,
275  USPink,
277  USDJI,
279  USNSDQ,
281  USSector,
283  USOption,
285  USOptionS,
287  HKEquity,
289  HKPreIPO,
291  HKWarrant,
293  HKHS,
295  HKSector,
301  SHSTAR,
303  CNIX,
305  CNSector,
311  SZGEMConnect,
315  SGMain,
317  STI,
319  SGSector,
320 };
321 
323 struct Security
324 {
326  std::string symbol;
328  std::string name_cn;
330  std::string name_en;
332  std::string name_hk;
333 };
334 
337 {
339  std::string symbol;
341  std::string name_cn;
343  std::string name_en;
345  std::string name_hk;
347  std::string exchange;
349  std::string currency;
351  int32_t lot_size;
353  int64_t total_shares;
357  int64_t hk_shares;
370 };
371 
373 enum class TradeStatus
374 {
376  Normal,
378  Halted,
380  Delisted,
382  Fuse,
384  PrepareList,
386  CodeMoved,
388  ToBeOpened,
392  Expired,
396  SuspendTrade,
397 };
398 
401 {
405  int64_t timestamp;
407  int64_t volume;
416 };
417 
420 {
422  std::string symbol;
434  int64_t timestamp;
436  int64_t volume;
442  std::optional<PrePostQuote> pre_market_quote;
444  std::optional<PrePostQuote> post_market_quote;
446  std::optional<PrePostQuote> overnight_quote;
447 };
448 
450 enum class OptionType
451 {
453  Unknown,
455  American,
457  Europe,
458 };
459 
461 enum class OptionDirection
462 {
464  Unknown,
466  Put,
468  Call,
469 };
470 
473 {
474  std::string symbol;
486  int64_t timestamp;
488  int64_t volume;
496  int64_t open_interest;
512  std::string underlying_symbol;
513 };
514 
516 enum class TradeDirection
517 {
519  Neutral,
521  Down,
523  Up
524 };
525 
527 struct Trade
528 {
530  int64_t volume;
531  int64_t timestamp;
532  std::string trade_type;
535 };
536 
539 {
541  std::string symbol;
543  std::vector<Trade> trades;
544 };
545 
548 {
558  int64_t volume;
562  int64_t timestamp;
565 };
566 
569 {
571  std::string symbol;
578 };
579 
581 enum class WarrantType
582 {
584  Unknown,
586  Call,
588  Put,
590  Bull,
592  Bear,
594  Inline
595 };
596 
599 {
600  std::string symbol;
612  int64_t timestamp;
614  int64_t volume;
642  std::string underlying_symbol;
643 };
644 
647 {
649  std::vector<Depth> asks;
651  std::vector<Depth> bids;
652 };
653 
656 {
658  std::vector<Brokers> ask_brokers;
660  std::vector<Brokers> bid_brokers;
661 };
662 
664 {
666  std::vector<int32_t> broker_ids;
668  std::string name_cn;
670  std::string name_en;
672  std::string name_hk;
673 };
674 
677 {
679  int64_t timestamp;
680  int64_t volume;
683 };
684 
686 enum class AdjustType
687 {
688  NoAdjust,
690 };
691 
694 {
698  std::string call_symbol;
700  std::string put_symbol;
702  bool standard;
703 };
704 
707 {
709  int32_t issuer_id;
711  std::string name_cn;
713  std::string name_en;
715  std::string name_hk;
716 };
717 
719 {
726 };
727 
730 {
734  std::vector<TradingSessionInfo> trade_session;
735 };
736 
739 {
741  std::vector<Date> trading_days;
743  std::vector<Date> half_trading_days;
744 };
745 
748 {
752  int64_t timestamp;
753 };
754 
757 {
764 };
765 
768 {
770  int64_t timestamp;
775 };
776 
779 {
781  std::string symbol;
785  std::string name;
787  std::optional<Decimal> watched_price;
789  int64_t watched_at;
790 };
791 
794 {
796  int64_t id;
798  std::string name;
800  std::vector<WatchlistSecurity> securities;
801 };
802 
805 {
807  Add,
809  Remove,
811  Replace,
812 };
813 
816 {
818  std::string name;
820  std::vector<std::string> securities;
821 };
822 
825 {
827  int64_t id;
829  std::optional<std::string> name;
831  std::optional<std::vector<std::string>> securities;
834 };
835 
838 {
840  std::string symbol;
850  int64_t timestamp;
852  int64_t volume;
857 };
858 
860 enum class CalcIndex
861 {
863  LastDone,
865  ChangeValue,
867  ChangeRate,
869  Volume,
871  Turnover,
875  TurnoverRate,
879  CapitalFlow,
881  Amplitude,
883  VolumeRatio,
885  PeTtmRatio,
887  PbRatio,
899  ExpiryDate,
901  StrikePrice,
911  Premium,
913  ItmOtm,
917  WarrantDelta,
919  CallPrice,
921  ToCallPrice,
929  BalancePoint,
931  OpenInterest,
933  Delta,
935  Gamma,
937  Theta,
939  Vega,
941  Rho,
942 };
943 
946 {
948  std::string symbol;
950  std::optional<Decimal> last_done;
952  std::optional<Decimal> change_value;
954  std::optional<Decimal> change_rate;
956  std::optional<int64_t> volume;
958  std::optional<Decimal> turnover;
960  std::optional<Decimal> ytd_change_rate;
962  std::optional<Decimal> turnover_rate;
964  std::optional<Decimal> total_market_value;
966  std::optional<Decimal> capital_flow;
968  std::optional<Decimal> amplitude;
970  std::optional<Decimal> volume_ratio;
972  std::optional<Decimal> pe_ttm_ratio;
974  std::optional<Decimal> pb_ratio;
976  std::optional<Decimal> dividend_ratio_ttm;
978  std::optional<Decimal> five_day_change_rate;
980  std::optional<Decimal> ten_day_change_rate;
982  std::optional<Decimal> half_year_change_rate;
984  std::optional<Decimal> five_minutes_change_rate;
986  std::optional<Date> expiry_date;
988  std::optional<Decimal> strike_price;
990  std::optional<Decimal> upper_strike_price;
992  std::optional<Decimal> lower_strike_price;
994  std::optional<int64_t> outstanding_qty;
996  std::optional<Decimal> outstanding_ratio;
998  std::optional<Decimal> premium;
1000  std::optional<Decimal> itm_otm;
1002  std::optional<Decimal> implied_volatility;
1004  std::optional<Decimal> warrant_delta;
1006  std::optional<Decimal> call_price;
1008  std::optional<Decimal> to_call_price;
1010  std::optional<Decimal> effective_leverage;
1012  std::optional<Decimal> leverage_ratio;
1014  std::optional<Decimal> conversion_ratio;
1016  std::optional<Decimal> balance_point;
1018  std::optional<int64_t> open_interest;
1020  std::optional<Decimal> delta;
1022  std::optional<Decimal> gamma;
1024  std::optional<Decimal> theta;
1026  std::optional<Decimal> vega;
1028  std::optional<Decimal> rho;
1029 };
1030 
1032 enum class SortOrderType
1033 {
1035  Ascending,
1037  Descending,
1038 };
1039 
1041 enum class WarrantSortBy
1042 {
1044  LastDone,
1046  ChangeRate,
1048  ChangeValue,
1050  Volume,
1052  Turnover,
1054  ExpiryDate,
1056  StrikePrice,
1066  Premium,
1068  ItmOtm,
1072  Delta,
1074  CallPrice,
1076  ToCallPrice,
1080  LeverageRatio,
1084  BalancePoint,
1086  Status,
1087 };
1088 
1091 {
1093  LT_3,
1095  Between_3_6,
1097  Between_6_12,
1099  GT_12,
1100 };
1101 
1104 {
1106  In,
1108  Out,
1109 };
1110 
1112 enum class WarrantStatus
1113 {
1115  Suspend,
1117  PrepareList,
1119  Normal,
1120 };
1121 
1124 {
1126  std::string symbol;
1130  std::string name;
1138  int64_t volume;
1144  std::optional<Decimal> strike_price;
1146  std::optional<Decimal> upper_strike_price;
1148  std::optional<Decimal> lower_strike_price;
1156  std::optional<Decimal> itm_otm;
1158  std::optional<Decimal> implied_volatility;
1160  std::optional<Decimal> delta;
1162  std::optional<Decimal> call_price;
1164  std::optional<Decimal> to_call_price;
1166  std::optional<Decimal> effective_leverage;
1170  std::optional<Decimal> conversion_ratio;
1172  std::optional<Decimal> balance_point;
1175 };
1176 
1179 {
1181  Overnight,
1182 };
1183 
1186 {
1188  std::string key;
1190  std::string name;
1192  std::string description;
1194  int64_t start_at;
1196  int64_t end_at;
1197 };
1198 
1200 enum class TradeSessions
1201 {
1203  Intraday,
1205  All,
1206 };
1207 
1210 {
1212  int32_t temperature;
1214  std::string description;
1216  int32_t valuation;
1218  int32_t sentiment;
1220  int64_t timestamp;
1221 };
1222 
1225 {
1234 };
1235 
1238 {
1242  std::vector<MarketTemperature> records;
1243 };
1244 
1245 } // namespace quote
1246 
1247 namespace trade {
1248 
1250 enum class TopicType
1251 {
1253  Private,
1254 };
1255 
1258 {
1259  std::string order_id;
1260  std::string trade_id;
1261  std::string symbol;
1262  int64_t trade_done_at;
1265 };
1266 
1269 {
1271  std::optional<int64_t> start_at;
1273  std::optional<int64_t> end_at;
1275  std::optional<std::string> symbol;
1276 };
1277 
1280 {
1282  std::optional<std::string> symbol;
1284  std::optional<std::string> order_id;
1285 };
1286 
1288 enum class OrderStatus
1289 {
1291  Unknown,
1293  NotReported,
1301  Filled,
1303  WaitToNew,
1305  New,
1307  WaitToReplace,
1311  Replaced,
1313  PartialFilled,
1315  WaitToCancel,
1317  PendingCancel,
1319  Rejected,
1321  Canceled,
1323  Expired,
1326 };
1327 
1329 enum class OrderSide
1330 {
1332  Unknown,
1334  Buy,
1336  Sell,
1337 };
1338 
1340 enum class OrderType
1341 {
1343  Unknown,
1345  LO,
1347  ELO,
1349  MO,
1351  AO,
1353  ALO,
1355  ODD,
1357  LIT,
1359  MIT,
1361  TSLPAMT,
1363  TSLPPCT,
1365  TSMAMT,
1367  TSMPCT,
1369  SLO,
1370 };
1371 
1373 enum class OrderTag
1374 {
1376  Unknown,
1378  Normal,
1380  LongTerm,
1382  Grey,
1384  MarginCall,
1386  Offline,
1388  Creditor,
1390  Debtor,
1392  NonExercise,
1394  AllocatedSub,
1395 };
1396 
1399 {
1401  Unknown,
1403  Day,
1407  GoodTilDate,
1408 };
1409 
1411 enum class TriggerStatus
1412 {
1414  Unknown,
1416  Deactive,
1418  Active,
1420  Released,
1421 };
1422 
1424 enum class OutsideRTH
1425 {
1427  Unknown,
1429  RTHOnly,
1431  AnyTime,
1433  Overnight,
1434 };
1435 
1437 struct Order
1438 {
1440  std::string order_id;
1444  std::string stock_name;
1450  std::optional<Decimal> price;
1452  std::optional<Decimal> executed_price;
1454  int64_t submitted_at;
1458  std::string symbol;
1462  std::optional<Decimal> last_done;
1464  std::optional<Decimal> trigger_price;
1466  std::string msg;
1472  std::optional<Date> expire_date;
1474  std::optional<int64_t> updated_at;
1476  std::optional<int64_t> trigger_at;
1478  std::optional<Decimal> trailing_amount;
1480  std::optional<Decimal> trailing_percent;
1482  std::optional<Decimal> limit_offset;
1484  std::optional<TriggerStatus> trigger_status;
1486  std::string currency;
1488  std::optional<OutsideRTH> outside_rth;
1490  std::string remark;
1491 };
1492 
1495 {
1499  std::string stock_name;
1503  std::string symbol;
1511  std::optional<Decimal> executed_price;
1513  std::string order_id;
1515  std::string currency;
1519  int64_t submitted_at;
1521  int64_t updated_at;
1523  std::optional<Decimal> trigger_price;
1525  std::string msg;
1529  std::optional<TriggerStatus> trigger_status;
1531  std::optional<int64_t> trigger_at;
1533  std::optional<Decimal> trailing_amount;
1535  std::optional<Decimal> trailing_percent;
1537  std::optional<Decimal> limit_offset;
1539  std::string account_no;
1541  std::optional<Decimal> last_share;
1543  std::optional<Decimal> last_price;
1545  std::string remark;
1546 };
1547 
1550 {
1552  std::optional<std::string> symbol;
1554  std::optional<std::vector<OrderStatus>> status;
1556  std::optional<OrderSide> side;
1558  std::optional<Market> market;
1560  std::optional<int64_t> start_at;
1562  std::optional<int64_t> end_at;
1563 };
1564 
1567 {
1569  std::optional<std::string> symbol;
1571  std::optional<std::vector<OrderStatus>> status;
1573  std::optional<OrderSide> side;
1575  std::optional<Market> market;
1577  std::optional<std::string> order_id;
1578 };
1579 
1582 {
1584  std::string order_id;
1588  std::optional<Decimal> price;
1590  std::optional<Decimal> trigger_price;
1592  std::optional<Decimal> limit_offset;
1594  std::optional<Decimal> trailing_amount;
1596  std::optional<Decimal> trailing_percent;
1598  std::optional<std::string> remark;
1599 };
1600 
1603 {
1605  std::string symbol;
1615  std::optional<Decimal> submitted_price;
1617  std::optional<Decimal> trigger_price;
1619  std::optional<Decimal> limit_offset;
1621  std::optional<Decimal> trailing_amount;
1623  std::optional<Decimal> trailing_percent;
1626  std::optional<Date> expire_date;
1628  std::optional<OutsideRTH> outside_rth;
1630  std::optional<std::string> remark;
1631 };
1632 
1635 {
1637  std::string order_id;
1638 };
1639 
1641 struct CashInfo
1642 {
1652  std::string currency;
1653 };
1654 
1657 {
1658  std::string currency;
1660 };
1661 
1664 {
1672  int32_t risk_level;
1676  std::string currency;
1678  std::vector<CashInfo> cash_infos;
1688  std::vector<FrozenTransactionFee> frozen_transaction_fees;
1689 };
1690 
1693 {
1695  Unknown,
1697  Out,
1699  In,
1700 };
1701 
1703 enum class BalanceType
1704 {
1706  Unknown,
1708  Cash,
1710  Stock,
1712  Fund,
1713 };
1714 
1716 struct CashFlow
1717 {
1727  std::string currency;
1729  int64_t business_time;
1731  std::optional<std::string> symbol;
1733  std::string description;
1734 };
1735 
1738 {
1740  int64_t start_at;
1742  int64_t end_at;
1744  std::optional<BalanceType> business_type;
1746  std::optional<std::string> symbol;
1748  std::optional<uintptr_t> page;
1750  std::optional<uintptr_t> size;
1751 };
1752 
1755 {
1757  std::optional<std::vector<std::string>> symbols;
1758 };
1759 
1762 {
1764  std::optional<std::vector<std::string>> symbols;
1765 };
1766 
1769 {
1771  std::string symbol;
1777  std::string symbol_name;
1779  std::string currency;
1784 };
1785 
1788 {
1790  std::string account_channel;
1792  std::vector<FundPosition> positions;
1793 };
1794 
1797 {
1799  std::vector<FundPositionChannel> channels;
1800 };
1801 
1804 {
1806  std::string symbol;
1808  std::string symbol_name;
1814  std::string currency;
1821  std::optional<Decimal> init_quantity;
1822 };
1823 
1826 {
1828  std::string account_channel;
1830  std::vector<StockPosition> positions;
1831 };
1832 
1835 {
1837  std::vector<StockPositionChannel> channels;
1838 };
1839 
1842 {
1849 };
1850 
1853 {
1854  Unknown,
1855  None,
1856  Calculated,
1857  Pending,
1858  Ready,
1859 };
1860 
1863 {
1864  Unknown,
1865  None,
1866  NoData,
1867  Pending,
1868  Done,
1869 };
1870 
1873 {
1874  Unknown,
1875  Broker,
1876  Third,
1877 };
1878 
1881 {
1891  std::string msg;
1893  int64_t time;
1894 };
1895 
1898 {
1900  std::string code;
1902  std::string name;
1906  std::string currency;
1907 };
1908 
1911 {
1915  std::string name;
1917  std::vector<OrderChargeFee> fees;
1918 };
1919 
1922 {
1926  std::string currency;
1928  std::vector<OrderChargeItem> items;
1929 };
1930 
1933 {
1935  std::string order_id;
1939  std::string stock_name;
1945  std::optional<Decimal> price;
1947  std::optional<Decimal> executed_price;
1949  int64_t submitted_at;
1953  std::string symbol;
1957  std::optional<Decimal> last_done;
1959  std::optional<Decimal> trigger_price;
1961  std::string msg;
1967  std::optional<Date> expire_date;
1969  std::optional<int64_t> updated_at;
1971  std::optional<int64_t> trigger_at;
1973  std::optional<Decimal> trailing_amount;
1975  std::optional<Decimal> trailing_percent;
1977  std::optional<Decimal> limit_offset;
1979  std::optional<TriggerStatus> trigger_status;
1981  std::string currency;
1983  std::optional<OutsideRTH> outside_rth;
1985  std::string remark;
1989  std::optional<Decimal> free_amount;
1991  std::optional<std::string> free_currency;
1995  std::optional<Decimal> deductions_amount;
1997  std::optional<std::string> deductions_currency;
2001  std::optional<Decimal> platform_deducted_amount;
2003  std::optional<std::string> platform_deducted_currency;
2005  std::vector<OrderHistoryDetail> history;
2008 };
2009 
2012 {
2014  std::string symbol;
2020  std::optional<Decimal> price;
2022  std::optional<std::string> currency;
2025  std::optional<std::string> order_id;
2028 };
2029 
2032 {
2037 };
2038 
2039 } // namespace trade
2040 
2041 } // namespace longport
Definition: decimal.hpp:13
Subscription flags.
Definition: types.hpp:72
bool contains(const SubFlags &other) const
Definition: types.hpp:108
SubFlags & operator|=(const SubFlags &other)
Definition: types.hpp:86
SubFlags & operator&=(const SubFlags &other)
Definition: types.hpp:97
static SubFlags BROKER()
static SubFlags TRADE()
SubFlags operator|(const SubFlags &other) const
Definition: types.hpp:81
SubFlags operator&(const SubFlags &other) const
Definition: types.hpp:92
static SubFlags QUOTE()
SubFlags(uint8_t value)
Definition: types.hpp:77
bool operator==(const SubFlags &other) const
Definition: types.hpp:103
static SubFlags DEPTH()
TradeDirection
Trade direction.
Definition: types.hpp:517
CalcIndex
Calc index.
Definition: types.hpp:861
@ 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.
Granularity
Data granularity.
Definition: types.hpp:1225
@ Unknown
Unknown.
Definition: types.hpp:1227
@ Daily
Daily.
Definition: types.hpp:1229
@ Weekly
Weekly.
Definition: types.hpp:1231
@ Monthly
Monthly.
Definition: types.hpp:1233
OptionDirection
Option direction.
Definition: types.hpp:462
SecuritiesUpdateMode
Securities update mode.
Definition: types.hpp:805
FilterWarrantExpiryDate
Filter warrant expiry date type.
Definition: types.hpp:1091
Period
Candlestick period.
Definition: types.hpp:130
@ Min45
Forty-Five Minutes.
@ Min20
Twenty Minutes.
@ Min3
Three Minutes.
@ Min15
Fifteen Minutes.
@ Min30
Thirty Minutes.
TradeSession
Trade session.
Definition: types.hpp:184
TradeStatus
Trade status.
Definition: types.hpp:374
@ SplitStockHalts
Split Stock Halts.
@ WarrantPrepareList
Warrant To BeListed.
SecurityBoard
Security board.
Definition: types.hpp:269
@ 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:687
OptionType
Option type.
Definition: types.hpp:451
WarrantStatus
Warrant status.
Definition: types.hpp:1113
SecurityListCategory
Security list category.
Definition: types.hpp:1179
WarrantSortBy
Warrant sort by.
Definition: types.hpp:1042
@ 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:1104
WarrantType
Warrant type.
Definition: types.hpp:582
SortOrderType
Sort order type.
Definition: types.hpp:1033
TradeSessions
Trade sessions.
Definition: types.hpp:1201
TriggerStatus
Trigger status.
Definition: types.hpp:1412
OutsideRTH
Enable or disable outside regular trading hours.
Definition: types.hpp:1425
@ RTHOnly
Regular trading hour only.
OrderTag
Order tag.
Definition: types.hpp:1374
@ 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:1873
OrderType
Order type.
Definition: types.hpp:1341
@ 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:1330
TimeInForceType
Time in force Type.
Definition: types.hpp:1399
@ GoodTilDate
Good Til Date Order.
@ GoodTilCanceled
Good Til Canceled Order.
CommissionFreeStatus
Commission-free Status.
Definition: types.hpp:1853
CashFlowDirection
Cash flow direction.
Definition: types.hpp:1693
TopicType
Topic type.
Definition: types.hpp:1251
@ Private
Private notification for trade.
DeductionStatus
Deduction status.
Definition: types.hpp:1863
BalanceType
Balance type.
Definition: types.hpp:1704
OrderStatus
Order status.
Definition: types.hpp:1289
@ 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.
@ Crypto
Crypto 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:249
int32_t position
Position.
Definition: types.hpp:251
std::vector< int32_t > broker_ids
Broker IDs.
Definition: types.hpp:253
Candlestick.
Definition: types.hpp:548
TradeSession trade_session
Trade session.
Definition: types.hpp:564
Decimal open
Open price.
Definition: types.hpp:552
Decimal high
High price.
Definition: types.hpp:556
Decimal low
Low price.
Definition: types.hpp:554
Decimal turnover
Turnover.
Definition: types.hpp:560
int64_t timestamp
Timestamp.
Definition: types.hpp:562
Decimal close
Close price.
Definition: types.hpp:550
int64_t volume
Volume.
Definition: types.hpp:558
Capital distribution.
Definition: types.hpp:757
Decimal small
Small order.
Definition: types.hpp:763
Decimal large
Large order.
Definition: types.hpp:759
Decimal medium
Medium order.
Definition: types.hpp:761
Capital distribution response.
Definition: types.hpp:768
CapitalDistribution capital_in
Inflow capital data.
Definition: types.hpp:772
CapitalDistribution capital_out
Outflow capital data.
Definition: types.hpp:774
int64_t timestamp
Time.
Definition: types.hpp:770
Capital flow line.
Definition: types.hpp:748
Decimal inflow
Inflow capital data.
Definition: types.hpp:750
int64_t timestamp
Time.
Definition: types.hpp:752
An request for create watchlist group.
Definition: types.hpp:816
std::vector< std::string > securities
Securities.
Definition: types.hpp:820
std::string name
Group name.
Definition: types.hpp:818
Definition: types.hpp:225
std::optional< Decimal > price
Price.
Definition: types.hpp:229
int64_t volume
Volume.
Definition: types.hpp:231
int64_t order_num
Number of orders.
Definition: types.hpp:233
int32_t position
Position.
Definition: types.hpp:227
Derivative type.
Definition: types.hpp:121
uint8_t value
Definition: types.hpp:122
History market temperature response.
Definition: types.hpp:1238
std::vector< MarketTemperature > records
Records.
Definition: types.hpp:1242
Granularity granularity
Granularity.
Definition: types.hpp:1240
Intraday line.
Definition: types.hpp:677
Decimal avg_price
Definition: types.hpp:682
Decimal turnover
Definition: types.hpp:681
int64_t volume
Definition: types.hpp:680
Decimal price
Definition: types.hpp:678
int64_t timestamp
Definition: types.hpp:679
Issuer info.
Definition: types.hpp:707
std::string name_en
Issuer name (en)
Definition: types.hpp:713
int32_t issuer_id
Issuer ID.
Definition: types.hpp:709
std::string name_hk
Issuer name (zh-HK)
Definition: types.hpp:715
std::string name_cn
Issuer name (zh-CN)
Definition: types.hpp:711
Market temperature.
Definition: types.hpp:1210
int32_t sentiment
Market sentiment.
Definition: types.hpp:1218
int32_t temperature
Temperature value.
Definition: types.hpp:1212
int32_t valuation
Market valuation.
Definition: types.hpp:1216
std::string description
Temperature description.
Definition: types.hpp:1214
int64_t timestamp
Time.
Definition: types.hpp:1220
Market trading days.
Definition: types.hpp:739
std::vector< Date > trading_days
Trading days.
Definition: types.hpp:741
std::vector< Date > half_trading_days
Half trading days.
Definition: types.hpp:743
Market trading session.
Definition: types.hpp:730
std::vector< TradingSessionInfo > trade_session
Trading session.
Definition: types.hpp:734
Market market
Market.
Definition: types.hpp:732
Quote of option.
Definition: types.hpp:473
Decimal strike_price
Strike price.
Definition: types.hpp:500
OptionType contract_type
Option type.
Definition: types.hpp:504
Date expiry_date
Exprity date.
Definition: types.hpp:498
Decimal high
High.
Definition: types.hpp:482
Decimal open
Open.
Definition: types.hpp:480
Decimal prev_close
Yesterday's close.
Definition: types.hpp:478
Decimal contract_size
Contract size.
Definition: types.hpp:506
Decimal turnover
Turnover.
Definition: types.hpp:490
Decimal low
Low.
Definition: types.hpp:484
Decimal implied_volatility
Implied volatility.
Definition: types.hpp:494
int64_t volume
Volume.
Definition: types.hpp:488
Decimal contract_multiplier
Contract multiplier.
Definition: types.hpp:502
TradeStatus trade_status
Security trading status.
Definition: types.hpp:492
std::string symbol
Security code.
Definition: types.hpp:474
int64_t open_interest
Number of open positions.
Definition: types.hpp:496
Decimal historical_volatility
Underlying security historical volatility of the option.
Definition: types.hpp:510
OptionDirection direction
Option direction.
Definition: types.hpp:508
int64_t timestamp
Time of latest price.
Definition: types.hpp:486
Decimal last_done
Latest price.
Definition: types.hpp:476
std::string underlying_symbol
Underlying security symbol of the option.
Definition: types.hpp:512
Definition: types.hpp:664
std::string name_en
Participant name (en)
Definition: types.hpp:670
std::string name_hk
Participant name (zh-HK)
Definition: types.hpp:672
std::vector< int32_t > broker_ids
Broker IDs.
Definition: types.hpp:666
std::string name_cn
Participant name (zh-CN)
Definition: types.hpp:668
Quote of US pre/post market.
Definition: types.hpp:401
Decimal high
High.
Definition: types.hpp:411
int64_t timestamp
Time of latest price.
Definition: types.hpp:405
Decimal prev_close
Close of the last trade session.
Definition: types.hpp:415
int64_t volume
Volume.
Definition: types.hpp:407
Decimal last_done
Latest price.
Definition: types.hpp:403
Decimal low
Low.
Definition: types.hpp:413
Decimal turnover
Turnover.
Definition: types.hpp:409
Brokers message.
Definition: types.hpp:258
std::vector< Brokers > ask_brokers
Ask brokers.
Definition: types.hpp:262
std::vector< Brokers > bid_brokers
Bid brokers.
Definition: types.hpp:264
std::string symbol
Security code.
Definition: types.hpp:260
Candlestick updated message.
Definition: types.hpp:569
std::string symbol
Security code.
Definition: types.hpp:571
bool is_confirmed
Is confirmed.
Definition: types.hpp:577
Candlestick candlestick
Candlestick.
Definition: types.hpp:575
Period period
Period type.
Definition: types.hpp:573
Depth message.
Definition: types.hpp:238
std::vector< Depth > bids
Bid depth.
Definition: types.hpp:244
std::vector< Depth > asks
Ask depth.
Definition: types.hpp:242
std::string symbol
Security code.
Definition: types.hpp:240
Quote message.
Definition: types.hpp:197
TradeSession trade_session
Trade session.
Definition: types.hpp:217
std::string symbol
Security code.
Definition: types.hpp:199
int64_t timestamp
Time of latest price.
Definition: types.hpp:209
int64_t current_volume
Increase volume between pushes.
Definition: types.hpp:219
Decimal low
Low.
Definition: types.hpp:207
Decimal high
High.
Definition: types.hpp:205
Decimal last_done
Latest price.
Definition: types.hpp:201
Decimal turnover
Turnover.
Definition: types.hpp:213
Decimal urrent_turnover
Increase turnover between pushes.
Definition: types.hpp:221
TradeStatus trade_status
Security trading status.
Definition: types.hpp:215
int64_t volume
Volume.
Definition: types.hpp:211
Decimal open
Open.
Definition: types.hpp:203
Trades message.
Definition: types.hpp:539
std::vector< Trade > trades
Trades data.
Definition: types.hpp:543
std::string symbol
Security code.
Definition: types.hpp:541
Quote package detail.
Definition: types.hpp:1186
std::string description
Description.
Definition: types.hpp:1192
std::string key
Key.
Definition: types.hpp:1188
int64_t end_at
End at.
Definition: types.hpp:1196
int64_t start_at
Start at.
Definition: types.hpp:1194
std::string name
Name.
Definition: types.hpp:1190
Real-time quote.
Definition: types.hpp:838
Decimal low
Low.
Definition: types.hpp:848
int64_t timestamp
Time of latest price.
Definition: types.hpp:850
Decimal high
High.
Definition: types.hpp:846
Decimal turnover
Turnover.
Definition: types.hpp:854
Decimal last_done
Latest price.
Definition: types.hpp:842
TradeStatus trade_status
Security trading status.
Definition: types.hpp:856
Decimal open
Open.
Definition: types.hpp:844
int64_t volume
Volume.
Definition: types.hpp:852
std::string symbol
Security code.
Definition: types.hpp:840
Security brokers.
Definition: types.hpp:656
std::vector< Brokers > ask_brokers
Ask brokers.
Definition: types.hpp:658
std::vector< Brokers > bid_brokers
Bid brokers.
Definition: types.hpp:660
Security calc index response.
Definition: types.hpp:946
std::optional< Decimal > outstanding_ratio
Outstanding ratio.
Definition: types.hpp:996
std::optional< Decimal > change_rate
Change ratio.
Definition: types.hpp:954
std::optional< Decimal > total_market_value
Total market value.
Definition: types.hpp:964
std::optional< Decimal > to_call_price
Price interval from the call price.
Definition: types.hpp:1008
std::optional< Decimal > balance_point
Breakeven point.
Definition: types.hpp:1016
std::optional< Decimal > pe_ttm_ratio
PE (TTM)
Definition: types.hpp:972
std::string symbol
Security code.
Definition: types.hpp:948
std::optional< Decimal > amplitude
Amplitude.
Definition: types.hpp:968
std::optional< Decimal > theta
Theta.
Definition: types.hpp:1024
std::optional< Decimal > delta
Delta.
Definition: types.hpp:1020
std::optional< Decimal > vega
Vega.
Definition: types.hpp:1026
std::optional< Decimal > call_price
Call price.
Definition: types.hpp:1006
std::optional< Decimal > pb_ratio
PB.
Definition: types.hpp:974
std::optional< Decimal > capital_flow
Capital flow.
Definition: types.hpp:966
std::optional< Decimal > leverage_ratio
Leverage ratio.
Definition: types.hpp:1012
std::optional< Decimal > lower_strike_price
Lower bound price.
Definition: types.hpp:992
std::optional< Decimal > rho
Rho.
Definition: types.hpp:1028
std::optional< Decimal > itm_otm
In/out of the bound.
Definition: types.hpp:1000
std::optional< Decimal > implied_volatility
Implied volatility.
Definition: types.hpp:1002
std::optional< Decimal > five_minutes_change_rate
Five minutes change ratio.
Definition: types.hpp:984
std::optional< int64_t > outstanding_qty
Outstanding quantity.
Definition: types.hpp:994
std::optional< Decimal > five_day_change_rate
Five days change ratio.
Definition: types.hpp:978
std::optional< Decimal > dividend_ratio_ttm
Dividend ratio (TTM)
Definition: types.hpp:976
std::optional< Decimal > turnover_rate
Turnover rate.
Definition: types.hpp:962
std::optional< Decimal > turnover
Turnover.
Definition: types.hpp:958
std::optional< Decimal > conversion_ratio
Conversion ratio.
Definition: types.hpp:1014
std::optional< Decimal > half_year_change_rate
Half year change ratio.
Definition: types.hpp:982
std::optional< Decimal > ytd_change_rate
Year-to-date change ratio.
Definition: types.hpp:960
std::optional< Date > expiry_date
Expiry date.
Definition: types.hpp:986
std::optional< Decimal > volume_ratio
Volume ratio.
Definition: types.hpp:970
std::optional< Decimal > gamma
Gamma.
Definition: types.hpp:1022
std::optional< Decimal > warrant_delta
Warrant delta.
Definition: types.hpp:1004
std::optional< int64_t > open_interest
Open interest.
Definition: types.hpp:1018
std::optional< Decimal > upper_strike_price
Upper bound price.
Definition: types.hpp:990
std::optional< int64_t > volume
Volume.
Definition: types.hpp:956
std::optional< Decimal > change_value
Change value.
Definition: types.hpp:952
std::optional< Decimal > strike_price
Strike price.
Definition: types.hpp:988
std::optional< Decimal > ten_day_change_rate
Ten days change ratio.
Definition: types.hpp:980
std::optional< Decimal > effective_leverage
Effective leverage.
Definition: types.hpp:1010
std::optional< Decimal > premium
Premium.
Definition: types.hpp:998
std::optional< Decimal > last_done
Latest price.
Definition: types.hpp:950
Security depth.
Definition: types.hpp:647
std::vector< Depth > asks
Ask depth.
Definition: types.hpp:649
std::vector< Depth > bids
Bid depth.
Definition: types.hpp:651
Security.
Definition: types.hpp:324
std::string symbol
Security code.
Definition: types.hpp:326
std::string name_hk
Security name (zh-HK)
Definition: types.hpp:332
std::string name_cn
Security name (zh-CN)
Definition: types.hpp:328
std::string name_en
Security name (en)
Definition: types.hpp:330
Quote of securitity.
Definition: types.hpp:420
int64_t timestamp
Time of latest price.
Definition: types.hpp:434
Decimal turnover
Turnover.
Definition: types.hpp:438
Decimal last_done
Latest price.
Definition: types.hpp:424
std::optional< PrePostQuote > overnight_quote
Quote of US overnight market.
Definition: types.hpp:446
Decimal high
High.
Definition: types.hpp:430
Decimal prev_close
Yesterday's close.
Definition: types.hpp:426
TradeStatus trade_status
Security trading status.
Definition: types.hpp:440
int64_t volume
Volume.
Definition: types.hpp:436
std::optional< PrePostQuote > pre_market_quote
Quote of US pre market.
Definition: types.hpp:442
Decimal low
Low.
Definition: types.hpp:432
Decimal open
Open.
Definition: types.hpp:428
std::optional< PrePostQuote > post_market_quote
Quote of US post market.
Definition: types.hpp:444
std::string symbol
Security code.
Definition: types.hpp:422
The basic information of securities.
Definition: types.hpp:337
Decimal dividend_yield
Dividend yield.
Definition: types.hpp:365
int64_t hk_shares
HK shares (only HK stocks)
Definition: types.hpp:357
Decimal eps
Earnings per share.
Definition: types.hpp:359
std::string exchange
Exchange which the security belongs to.
Definition: types.hpp:347
int32_t lot_size
Lot size.
Definition: types.hpp:351
std::string name_hk
Security name (zh-HK)
Definition: types.hpp:345
std::string name_cn
Security name (zh-CN)
Definition: types.hpp:341
DerivativeType stock_derivatives
Types of supported derivatives.
Definition: types.hpp:367
std::string currency
Trading currency.
Definition: types.hpp:349
Decimal eps_ttm
Earnings per share (TTM)
Definition: types.hpp:361
std::string symbol
Security code.
Definition: types.hpp:339
std::string name_en
Security name (en)
Definition: types.hpp:343
int64_t circulating_shares
Circulating shares.
Definition: types.hpp:355
SecurityBoard board
Board.
Definition: types.hpp:369
int64_t total_shares
Total shares.
Definition: types.hpp:353
Decimal bps
Net assets per share.
Definition: types.hpp:363
Strike price info.
Definition: types.hpp:694
std::string call_symbol
Security code of call option.
Definition: types.hpp:698
bool standard
Is standard.
Definition: types.hpp:702
std::string put_symbol
Security code of put option.
Definition: types.hpp:700
Decimal price
Strike price.
Definition: types.hpp:696
Subscription.
Definition: types.hpp:173
SubFlags sub_types
Subscription flags.
Definition: types.hpp:177
std::vector< Period > candlesticks
Candlesticks.
Definition: types.hpp:179
std::string symbol
Security code.
Definition: types.hpp:175
Trade.
Definition: types.hpp:528
TradeSession trade_session
Definition: types.hpp:534
TradeDirection direction
Definition: types.hpp:533
int64_t volume
Definition: types.hpp:530
std::string trade_type
Definition: types.hpp:532
int64_t timestamp
Definition: types.hpp:531
Decimal price
Definition: types.hpp:529
Definition: types.hpp:719
Time begin_time
Being trading time.
Definition: types.hpp:721
Time end_time
End trading time.
Definition: types.hpp:723
TradeSession trade_session
Trading session.
Definition: types.hpp:725
An request for update watchlist group.
Definition: types.hpp:825
SecuritiesUpdateMode mode
Securities Update Mode.
Definition: types.hpp:833
std::optional< std::string > name
Group name.
Definition: types.hpp:829
std::optional< std::vector< std::string > > securities
Securities.
Definition: types.hpp:831
int64_t id
Group id.
Definition: types.hpp:827
Warrant info.
Definition: types.hpp:1124
Decimal change_rate
Quote change rate.
Definition: types.hpp:1134
int64_t volume
Volume.
Definition: types.hpp:1138
std::optional< Decimal > delta
Delta.
Definition: types.hpp:1160
Date expiry_date
Expiry date.
Definition: types.hpp:1142
std::optional< Decimal > upper_strike_price
Upper strike price.
Definition: types.hpp:1146
Decimal premium
Premium.
Definition: types.hpp:1154
Decimal last_done
Latest price.
Definition: types.hpp:1132
std::string symbol
Security code.
Definition: types.hpp:1126
WarrantType warrant_type
Warrant type.
Definition: types.hpp:1128
std::optional< Decimal > to_call_price
Price interval from the call price.
Definition: types.hpp:1164
std::optional< Decimal > effective_leverage
Effective leverage.
Definition: types.hpp:1166
std::optional< Decimal > itm_otm
In/out of the bound.
Definition: types.hpp:1156
std::optional< Decimal > strike_price
Strike price.
Definition: types.hpp:1144
std::optional< Decimal > conversion_ratio
Conversion ratio.
Definition: types.hpp:1170
Decimal turnover
Turnover.
Definition: types.hpp:1140
int64_t outstanding_qty
Outstanding quantity.
Definition: types.hpp:1150
WarrantStatus status
Status.
Definition: types.hpp:1174
std::optional< Decimal > lower_strike_price
Lower strike price.
Definition: types.hpp:1148
std::string name
Security name.
Definition: types.hpp:1130
std::optional< Decimal > balance_point
Breakeven point.
Definition: types.hpp:1172
Decimal change_value
Quote change.
Definition: types.hpp:1136
std::optional< Decimal > implied_volatility
Implied volatility.
Definition: types.hpp:1158
std::optional< Decimal > call_price
Call price.
Definition: types.hpp:1162
Decimal outstanding_ratio
Outstanding ratio.
Definition: types.hpp:1152
Decimal leverage_ratio
Leverage ratio.
Definition: types.hpp:1168
Quote of warrant.
Definition: types.hpp:599
Decimal outstanding_ratio
Outstanding ratio.
Definition: types.hpp:626
Decimal low
Low.
Definition: types.hpp:610
Date last_trade_date
Last tradalbe date.
Definition: types.hpp:624
std::string symbol
Security code.
Definition: types.hpp:600
Decimal lower_strike_price
Lower bound price.
Definition: types.hpp:638
Decimal implied_volatility
Implied volatility.
Definition: types.hpp:620
Decimal open
Open.
Definition: types.hpp:606
int64_t outstanding_quantity
Outstanding quantity.
Definition: types.hpp:628
Decimal call_price
Call price.
Definition: types.hpp:640
int64_t timestamp
Time of latest price.
Definition: types.hpp:612
Date expiry_date
Exprity date.
Definition: types.hpp:622
Decimal strike_price
Strike price.
Definition: types.hpp:634
Decimal high
High.
Definition: types.hpp:608
Decimal turnover
Turnover.
Definition: types.hpp:616
std::string underlying_symbol
Underlying security symbol of the warrant.
Definition: types.hpp:642
int64_t volume
Volume.
Definition: types.hpp:614
WarrantType category
Warrant type.
Definition: types.hpp:632
Decimal last_done
Latest price.
Definition: types.hpp:602
Decimal prev_close
Yesterday's close.
Definition: types.hpp:604
Decimal conversion_ratio
Conversion ratio.
Definition: types.hpp:630
Decimal upper_strike_price
Upper bound price.
Definition: types.hpp:636
TradeStatus trade_status
Security trading status.
Definition: types.hpp:618
Watchlist group.
Definition: types.hpp:794
std::vector< WatchlistSecurity > securities
Securities.
Definition: types.hpp:800
int64_t id
Group id.
Definition: types.hpp:796
std::string name
Group name.
Definition: types.hpp:798
Watchlist security.
Definition: types.hpp:779
int64_t watched_at
Watched time.
Definition: types.hpp:789
std::string name
Security name.
Definition: types.hpp:785
std::string symbol
Security symbol.
Definition: types.hpp:781
std::optional< Decimal > watched_price
Watched price.
Definition: types.hpp:787
Market market
Market.
Definition: types.hpp:783
Account balance.
Definition: types.hpp:1664
Decimal buy_power
Buy power.
Definition: types.hpp:1686
std::vector< CashInfo > cash_infos
Cash details.
Definition: types.hpp:1678
Decimal init_margin
Initial margin.
Definition: types.hpp:1682
Decimal remaining_finance_amount
Remaining financing amount.
Definition: types.hpp:1670
Decimal total_cash
Total cash.
Definition: types.hpp:1666
std::vector< FrozenTransactionFee > frozen_transaction_fees
Frozen transaction fees.
Definition: types.hpp:1688
int32_t risk_level
Risk control level.
Definition: types.hpp:1672
Decimal max_finance_amount
Maximum financing amount.
Definition: types.hpp:1668
Decimal margin_call
Margin call.
Definition: types.hpp:1674
std::string currency
Currency.
Definition: types.hpp:1676
Decimal maintenance_margin
Maintenance margin.
Definition: types.hpp:1684
Decimal net_assets
Net assets.
Definition: types.hpp:1680
Cash flow.
Definition: types.hpp:1717
CashFlowDirection direction
Outflow direction.
Definition: types.hpp:1721
int64_t business_time
Business time.
Definition: types.hpp:1729
std::optional< std::string > symbol
Associated Stock code information.
Definition: types.hpp:1731
Decimal balance
Cash amount.
Definition: types.hpp:1725
std::string description
Cash flow description.
Definition: types.hpp:1733
std::string transaction_flow_name
Cash flow name.
Definition: types.hpp:1719
BalanceType business_type
Balance type.
Definition: types.hpp:1723
std::string currency
Cash currency.
Definition: types.hpp:1727
Cash info.
Definition: types.hpp:1642
std::string currency
Currency.
Definition: types.hpp:1652
Decimal available_cash
Available cash.
Definition: types.hpp:1646
Decimal settling_cash
Cash to be settled.
Definition: types.hpp:1650
Decimal frozen_cash
Frozen cash.
Definition: types.hpp:1648
Decimal withdraw_cash
Withdraw cash.
Definition: types.hpp:1644
Options for estimate maximum purchase quantity.
Definition: types.hpp:2012
bool fractional_shares
Get the maximum fractional share buying power.
Definition: types.hpp:2027
std::optional< std::string > currency
Settlement currency.
Definition: types.hpp:2022
std::optional< Decimal > price
Estimated order price.
Definition: types.hpp:2020
OrderSide side
Order side.
Definition: types.hpp:2018
std::optional< std::string > order_id
Definition: types.hpp:2025
std::string symbol
Security code.
Definition: types.hpp:2014
OrderType order_type
Order type.
Definition: types.hpp:2016
Response for estimate maximum purchase quantity.
Definition: types.hpp:2032
Decimal cash_max_qty
Cash available quantity.
Definition: types.hpp:2034
Decimal margin_max_qty
Margin available quantity.
Definition: types.hpp:2036
Exexution.
Definition: types.hpp:1258
int64_t trade_done_at
Definition: types.hpp:1262
Decimal quantity
Definition: types.hpp:1263
Decimal price
Definition: types.hpp:1264
std::string symbol
Definition: types.hpp:1261
std::string order_id
Definition: types.hpp:1259
std::string trade_id
Definition: types.hpp:1260
Frozen transaction fee.
Definition: types.hpp:1657
std::string currency
Definition: types.hpp:1658
Decimal frozen_transaction_fee
Definition: types.hpp:1659
Fund position channel.
Definition: types.hpp:1788
std::string account_channel
Account type.
Definition: types.hpp:1790
std::vector< FundPosition > positions
Fund positions.
Definition: types.hpp:1792
Fund position.
Definition: types.hpp:1769
Decimal cost_net_asset_value
Net cost.
Definition: types.hpp:1781
Decimal current_net_asset_value
Current equity.
Definition: types.hpp:1773
Decimal holding_units
Holding units.
Definition: types.hpp:1783
int64_t net_asset_value_day
Current equity time.
Definition: types.hpp:1775
std::string symbol
Fund ISIN code.
Definition: types.hpp:1771
std::string symbol_name
Fund name.
Definition: types.hpp:1777
std::string currency
Currency.
Definition: types.hpp:1779
Fund positions response.
Definition: types.hpp:1797
std::vector< FundPositionChannel > channels
Channels.
Definition: types.hpp:1799
Options for submit order request.
Definition: types.hpp:1738
std::optional< uintptr_t > page
Page number.
Definition: types.hpp:1748
std::optional< std::string > symbol
Security symbol.
Definition: types.hpp:1746
int64_t end_at
End time.
Definition: types.hpp:1742
int64_t start_at
Start time.
Definition: types.hpp:1740
std::optional< BalanceType > business_type
Business type.
Definition: types.hpp:1744
std::optional< uintptr_t > size
Page size.
Definition: types.hpp:1750
Options for get fund positions request.
Definition: types.hpp:1755
std::optional< std::vector< std::string > > symbols
Fund symbols.
Definition: types.hpp:1757
Options for get history executions request.
Definition: types.hpp:1269
std::optional< int64_t > end_at
End time.
Definition: types.hpp:1273
std::optional< int64_t > start_at
Start time.
Definition: types.hpp:1271
std::optional< std::string > symbol
Security code.
Definition: types.hpp:1275
Options for get history orders request.
Definition: types.hpp:1550
std::optional< int64_t > end_at
End time.
Definition: types.hpp:1562
std::optional< OrderSide > side
Order side.
Definition: types.hpp:1556
std::optional< Market > market
Market.
Definition: types.hpp:1558
std::optional< std::string > symbol
Security symbol.
Definition: types.hpp:1552
std::optional< std::vector< OrderStatus > > status
Order status.
Definition: types.hpp:1554
std::optional< int64_t > start_at
Start time.
Definition: types.hpp:1560
Options for get stock positions request.
Definition: types.hpp:1762
std::optional< std::vector< std::string > > symbols
Stock symbols.
Definition: types.hpp:1764
Options for get today executions request.
Definition: types.hpp:1280
std::optional< std::string > symbol
Security code.
Definition: types.hpp:1282
std::optional< std::string > order_id
Order id.
Definition: types.hpp:1284
Options for get today orders request.
Definition: types.hpp:1567
std::optional< OrderSide > side
Order side.
Definition: types.hpp:1573
std::optional< Market > market
Market.
Definition: types.hpp:1575
std::optional< std::string > order_id
Order id.
Definition: types.hpp:1577
std::optional< std::vector< OrderStatus > > status
Order status.
Definition: types.hpp:1571
std::optional< std::string > symbol
Security symbol.
Definition: types.hpp:1569
Margin ratio.
Definition: types.hpp:1842
Decimal mm_factor
Maintain the initial margin ratio.
Definition: types.hpp:1846
Decimal im_factor
Initial margin ratio.
Definition: types.hpp:1844
Decimal fm_factor
Forced close-out margin ratio.
Definition: types.hpp:1848
Order charge detail.
Definition: types.hpp:1922
std::string currency
Settlement currency.
Definition: types.hpp:1926
Decimal total_amount
Total charges amount.
Definition: types.hpp:1924
std::vector< OrderChargeItem > items
Order charge items.
Definition: types.hpp:1928
Order charge fee.
Definition: types.hpp:1898
std::string name
Charge name.
Definition: types.hpp:1902
std::string code
Charge code.
Definition: types.hpp:1900
Decimal amount
Charge amount.
Definition: types.hpp:1904
std::string currency
Charge currency.
Definition: types.hpp:1906
Order charge item.
Definition: types.hpp:1911
std::string name
Charge category name.
Definition: types.hpp:1915
ChargeCategoryCode code
Charge category code.
Definition: types.hpp:1913
std::vector< OrderChargeFee > fees
Charge details.
Definition: types.hpp:1917
Order detail.
Definition: types.hpp:1933
OrderSide side
Order side.
Definition: types.hpp:1951
std::optional< Decimal > deductions_amount
Deduction amount.
Definition: types.hpp:1995
std::optional< int64_t > trigger_at
Conditional order trigger time.
Definition: types.hpp:1971
std::optional< Date > expire_date
Long term order expire date.
Definition: types.hpp:1967
CommissionFreeStatus free_status
Commission-free Status.
Definition: types.hpp:1987
std::optional< std::string > deductions_currency
Deduction currency.
Definition: types.hpp:1997
DeductionStatus deductions_status
Deduction status.
Definition: types.hpp:1993
std::optional< Decimal > platform_deducted_amount
Platform deduction amount.
Definition: types.hpp:2001
std::optional< Decimal > trigger_price
LIT / MIT Order Trigger Price
Definition: types.hpp:1959
std::optional< TriggerStatus > trigger_status
Conditional order trigger status.
Definition: types.hpp:1979
DeductionStatus platform_deducted_status
Platform fee deduction status.
Definition: types.hpp:1999
std::optional< int64_t > updated_at
Last updated time.
Definition: types.hpp:1969
OrderStatus status
Order status.
Definition: types.hpp:1937
std::optional< std::string > platform_deducted_currency
Platform deduction currency.
Definition: types.hpp:2003
std::optional< Decimal > free_amount
Commission-free amount.
Definition: types.hpp:1989
OrderChargeDetail charge_detail
Order charges.
Definition: types.hpp:2007
Decimal quantity
Submitted quantity.
Definition: types.hpp:1941
std::optional< Decimal > last_done
Last done.
Definition: types.hpp:1957
std::vector< OrderHistoryDetail > history
Order history details.
Definition: types.hpp:2005
std::string msg
Rejected Message or remark.
Definition: types.hpp:1961
Decimal executed_quantity
Executed quantity.
Definition: types.hpp:1943
std::optional< Decimal > price
Submitted price.
Definition: types.hpp:1945
std::string order_id
Order ID.
Definition: types.hpp:1935
std::optional< Decimal > trailing_amount
TSMAMT / TSLPAMT order trailing amount
Definition: types.hpp:1973
OrderTag tag
Order tag.
Definition: types.hpp:1963
std::optional< OutsideRTH > outside_rth
Enable or disable outside regular trading hours.
Definition: types.hpp:1983
std::optional< Decimal > limit_offset
TSLPAMT / TSLPPCT order limit offset amount
Definition: types.hpp:1977
std::optional< Decimal > trailing_percent
TSMPCT / TSLPPCT order trailing percent
Definition: types.hpp:1975
std::string remark
Remark.
Definition: types.hpp:1985
std::string symbol
Security code.
Definition: types.hpp:1953
OrderType order_type
Order type.
Definition: types.hpp:1955
TimeInForceType time_in_force
Time in force type.
Definition: types.hpp:1965
std::string currency
Currency.
Definition: types.hpp:1981
int64_t submitted_at
Submitted time.
Definition: types.hpp:1949
std::optional< std::string > free_currency
Commission-free currency.
Definition: types.hpp:1991
std::string stock_name
Stock name.
Definition: types.hpp:1939
std::optional< Decimal > executed_price
Executed price.
Definition: types.hpp:1947
Order history detail.
Definition: types.hpp:1881
Decimal quantity
Definition: types.hpp:1887
OrderStatus status
Order status.
Definition: types.hpp:1889
std::string msg
Execution or error message.
Definition: types.hpp:1891
Decimal price
Definition: types.hpp:1884
int64_t time
Occurrence time.
Definition: types.hpp:1893
Order.
Definition: types.hpp:1438
std::optional< Decimal > last_done
Last done.
Definition: types.hpp:1462
std::optional< Decimal > trailing_percent
TSMPCT / TSLPPCT order trailing percent
Definition: types.hpp:1480
std::optional< Date > expire_date
Long term order expire date.
Definition: types.hpp:1472
std::optional< OutsideRTH > outside_rth
Enable or disable outside regular trading hours.
Definition: types.hpp:1488
std::optional< Decimal > trigger_price
LIT / MIT Order Trigger Price
Definition: types.hpp:1464
TimeInForceType time_in_force
Time in force type.
Definition: types.hpp:1470
OrderSide side
Order side.
Definition: types.hpp:1456
std::optional< int64_t > updated_at
Last updated time.
Definition: types.hpp:1474
std::string remark
Remark.
Definition: types.hpp:1490
std::optional< int64_t > trigger_at
Conditional order trigger time.
Definition: types.hpp:1476
OrderTag tag
Order tag.
Definition: types.hpp:1468
std::string currency
Currency.
Definition: types.hpp:1486
std::optional< Decimal > trailing_amount
TSMAMT / TSLPAMT order trailing amount
Definition: types.hpp:1478
std::optional< TriggerStatus > trigger_status
Conditional order trigger status.
Definition: types.hpp:1484
std::string order_id
Order ID.
Definition: types.hpp:1440
OrderType order_type
Order type.
Definition: types.hpp:1460
std::string symbol
Security code.
Definition: types.hpp:1458
std::optional< Decimal > executed_price
Executed price.
Definition: types.hpp:1452
int64_t submitted_at
Submitted time.
Definition: types.hpp:1454
OrderStatus status
Order status.
Definition: types.hpp:1442
std::optional< Decimal > price
Submitted price.
Definition: types.hpp:1450
std::optional< Decimal > limit_offset
TSLPAMT / TSLPPCT order limit offset amount
Definition: types.hpp:1482
Decimal quantity
Submitted quantity.
Definition: types.hpp:1446
std::string stock_name
Stock name.
Definition: types.hpp:1444
std::string msg
Rejected Message or remark.
Definition: types.hpp:1466
Decimal executed_quantity
Executed quantity.
Definition: types.hpp:1448
Order changed message.
Definition: types.hpp:1495
std::string currency
Currency.
Definition: types.hpp:1515
std::optional< Decimal > executed_price
Executed price.
Definition: types.hpp:1511
std::string order_id
Order ID.
Definition: types.hpp:1513
Decimal executed_quantity
Executed quantity.
Definition: types.hpp:1509
int64_t submitted_at
Submitted time.
Definition: types.hpp:1519
std::optional< Decimal > trigger_price
Order trigger price.
Definition: types.hpp:1523
std::optional< Decimal > last_share
Last share.
Definition: types.hpp:1541
std::optional< Decimal > trailing_percent
Trailing percent.
Definition: types.hpp:1535
std::optional< Decimal > trailing_amount
Trailing amount.
Definition: types.hpp:1533
std::optional< Decimal > limit_offset
Limit offset amount.
Definition: types.hpp:1537
Decimal submitted_quantity
Submitted quantity.
Definition: types.hpp:1501
std::string account_no
Account no.
Definition: types.hpp:1539
OrderType order_type
Order type.
Definition: types.hpp:1505
OrderTag tag
Order tag.
Definition: types.hpp:1527
std::string stock_name
Stock name.
Definition: types.hpp:1499
std::string remark
Remark message.
Definition: types.hpp:1545
std::optional< int64_t > trigger_at
Conditional order trigger time.
Definition: types.hpp:1531
OrderStatus status
Order status.
Definition: types.hpp:1517
std::optional< TriggerStatus > trigger_status
Conditional order trigger status.
Definition: types.hpp:1529
OrderSide side
Order side.
Definition: types.hpp:1497
std::string msg
Rejected message or remark.
Definition: types.hpp:1525
std::string symbol
Order symbol.
Definition: types.hpp:1503
int64_t updated_at
Last updated time.
Definition: types.hpp:1521
Decimal submitted_price
Submitted price.
Definition: types.hpp:1507
std::optional< Decimal > last_price
Last price.
Definition: types.hpp:1543
Options for replace order request.
Definition: types.hpp:1582
std::string order_id
Order ID.
Definition: types.hpp:1584
std::optional< Decimal > trailing_percent
Trailing percent.
Definition: types.hpp:1596
Decimal quantity
Quantity.
Definition: types.hpp:1586
std::optional< std::string > remark
Remark.
Definition: types.hpp:1598
std::optional< Decimal > price
Price.
Definition: types.hpp:1588
std::optional< Decimal > trigger_price
Trigger price.
Definition: types.hpp:1590
std::optional< Decimal > trailing_amount
Trailing amount.
Definition: types.hpp:1594
std::optional< Decimal > limit_offset
Limit offset.
Definition: types.hpp:1592
Stock position channel.
Definition: types.hpp:1826
std::string account_channel
Account type.
Definition: types.hpp:1828
std::vector< StockPosition > positions
Stock positions.
Definition: types.hpp:1830
Stock position.
Definition: types.hpp:1804
Decimal cost_price
Definition: types.hpp:1817
Decimal quantity
The number of holdings.
Definition: types.hpp:1810
Market market
Market.
Definition: types.hpp:1819
std::optional< Decimal > init_quantity
Initial position before market opening.
Definition: types.hpp:1821
std::string symbol_name
Stock name.
Definition: types.hpp:1808
Decimal available_quantity
Available quantity.
Definition: types.hpp:1812
std::string currency
Currency.
Definition: types.hpp:1814
std::string symbol
Stock code.
Definition: types.hpp:1806
Stock positions response.
Definition: types.hpp:1835
std::vector< StockPositionChannel > channels
Channels.
Definition: types.hpp:1837
Options for submit order request.
Definition: types.hpp:1603
std::optional< Decimal > submitted_price
Submitted price.
Definition: types.hpp:1615
std::optional< Decimal > trigger_price
Trigger price (LIT / MIT Required)
Definition: types.hpp:1617
std::optional< std::string > remark
Remark (Maximum 64 characters)
Definition: types.hpp:1630
std::optional< Date > expire_date
Definition: types.hpp:1626
std::optional< Decimal > trailing_percent
Trailing percent (TSLPPCT / TSMAPCT Required)
Definition: types.hpp:1623
Decimal submitted_quantity
Submitted price.
Definition: types.hpp:1611
std::string symbol
Security symbol.
Definition: types.hpp:1605
OrderSide side
Order side.
Definition: types.hpp:1609
std::optional< Decimal > trailing_amount
Trailing amount (TSLPAMT / TSMAMT Required)
Definition: types.hpp:1621
std::optional< Decimal > limit_offset
Limit offset amount (TSLPAMT / TSLPPCT Required)
Definition: types.hpp:1619
std::optional< OutsideRTH > outside_rth
Enable or disable outside regular trading hours.
Definition: types.hpp:1628
OrderType order_type
Order type.
Definition: types.hpp:1607
TimeInForceType time_in_force
Time in force type.
Definition: types.hpp:1613
Response for submit order request.
Definition: types.hpp:1635
std::string order_id
Order id.
Definition: types.hpp:1637