LongPort OpenAPI C++ SDK
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator
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  Min2,
136  Min3,
138  Min5,
140  Min10,
142  Min15,
144  Min20,
146  Min30,
148  Min45,
150  Min60,
152  Min120,
154  Min180,
156  Min240,
158  Day,
160  Week,
162  Month,
164  Quarter,
166  Year,
167 };
168 
171 {
173  std::string symbol;
177  std::vector<Period> candlesticks;
178 };
179 
181 enum class TradeSession
182 {
184  Intraday,
186  Pre,
188  Post,
190  Overnight,
191 };
192 
194 struct PushQuote
195 {
197  std::string symbol;
207  int64_t timestamp;
209  int64_t volume;
217  int64_t current_volume;
220 };
221 
222 struct Depth
223 {
225  int32_t position;
227  std::optional<Decimal> price;
229  int64_t volume;
231  int64_t order_num;
232 };
233 
235 struct PushDepth
236 {
238  std::string symbol;
240  std::vector<Depth> asks;
242  std::vector<Depth> bids;
243 };
244 
246 struct Brokers
247 {
249  int32_t position;
251  std::vector<int32_t> broker_ids;
252 };
253 
256 {
258  std::string symbol;
260  std::vector<Brokers> ask_brokers;
262  std::vector<Brokers> bid_brokers;
263 };
264 
266 enum class SecurityBoard
267 {
269  Unknown,
271  USMain,
273  USPink,
275  USDJI,
277  USNSDQ,
279  USSector,
281  USOption,
283  USOptionS,
285  HKEquity,
287  HKPreIPO,
289  HKWarrant,
291  HKHS,
293  HKSector,
299  SHSTAR,
301  CNIX,
303  CNSector,
309  SZGEMConnect,
313  SGMain,
315  STI,
317  SGSector,
318 };
319 
321 struct Security
322 {
324  std::string symbol;
326  std::string name_cn;
328  std::string name_en;
330  std::string name_hk;
331 };
332 
335 {
337  std::string symbol;
339  std::string name_cn;
341  std::string name_en;
343  std::string name_hk;
345  std::string exchange;
347  std::string currency;
349  int32_t lot_size;
351  int64_t total_shares;
355  int64_t hk_shares;
368 };
369 
371 enum class TradeStatus
372 {
374  Normal,
376  Halted,
378  Delisted,
380  Fuse,
382  PrepareList,
384  CodeMoved,
386  ToBeOpened,
390  Expired,
394  SuspendTrade,
395 };
396 
399 {
403  int64_t timestamp;
405  int64_t volume;
414 };
415 
418 {
420  std::string symbol;
432  int64_t timestamp;
434  int64_t volume;
440  std::optional<PrePostQuote> pre_market_quote;
442  std::optional<PrePostQuote> post_market_quote;
444  std::optional<PrePostQuote> overnight_quote;
445 };
446 
448 enum class OptionType
449 {
451  Unknown,
453  American,
455  Europe,
456 };
457 
459 enum class OptionDirection
460 {
462  Unknown,
464  Put,
466  Call,
467 };
468 
471 {
472  std::string symbol;
484  int64_t timestamp;
486  int64_t volume;
494  int64_t open_interest;
510  std::string underlying_symbol;
511 };
512 
514 enum class TradeDirection
515 {
517  Neutral,
519  Down,
521  Up
522 };
523 
525 struct Trade
526 {
528  int64_t volume;
529  int64_t timestamp;
530  std::string trade_type;
533 };
534 
537 {
539  std::string symbol;
541  std::vector<Trade> trades;
542 };
543 
546 {
556  int64_t volume;
560  int64_t timestamp;
563 };
564 
567 {
569  std::string symbol;
576 };
577 
579 enum class WarrantType
580 {
582  Unknown,
584  Call,
586  Put,
588  Bull,
590  Bear,
592  Inline
593 };
594 
597 {
598  std::string symbol;
610  int64_t timestamp;
612  int64_t volume;
640  std::string underlying_symbol;
641 };
642 
645 {
647  std::vector<Depth> asks;
649  std::vector<Depth> bids;
650 };
651 
654 {
656  std::vector<Brokers> ask_brokers;
658  std::vector<Brokers> bid_brokers;
659 };
660 
662 {
664  std::vector<int32_t> broker_ids;
666  std::string name_cn;
668  std::string name_en;
670  std::string name_hk;
671 };
672 
675 {
677  int64_t timestamp;
678  int64_t volume;
681 };
682 
684 enum class AdjustType
685 {
686  NoAdjust,
688 };
689 
692 {
696  std::string call_symbol;
698  std::string put_symbol;
700  bool standard;
701 };
702 
705 {
707  int32_t issuer_id;
709  std::string name_cn;
711  std::string name_en;
713  std::string name_hk;
714 };
715 
717 {
724 };
725 
728 {
732  std::vector<TradingSessionInfo> trade_session;
733 };
734 
737 {
739  std::vector<Date> trading_days;
741  std::vector<Date> half_trading_days;
742 };
743 
746 {
750  int64_t timestamp;
751 };
752 
755 {
762 };
763 
766 {
768  int64_t timestamp;
773 };
774 
777 {
779  std::string symbol;
783  std::string name;
785  std::optional<Decimal> watched_price;
787  int64_t watched_at;
788 };
789 
792 {
794  int64_t id;
796  std::string name;
798  std::vector<WatchlistSecurity> securities;
799 };
800 
803 {
805  Add,
807  Remove,
809  Replace,
810 };
811 
814 {
816  std::string name;
818  std::vector<std::string> securities;
819 };
820 
823 {
825  int64_t id;
827  std::optional<std::string> name;
829  std::optional<std::vector<std::string>> securities;
832 };
833 
836 {
838  std::string symbol;
848  int64_t timestamp;
850  int64_t volume;
855 };
856 
858 enum class CalcIndex
859 {
861  LastDone,
863  ChangeValue,
865  ChangeRate,
867  Volume,
869  Turnover,
873  TurnoverRate,
877  CapitalFlow,
879  Amplitude,
881  VolumeRatio,
883  PeTtmRatio,
885  PbRatio,
897  ExpiryDate,
899  StrikePrice,
909  Premium,
911  ItmOtm,
915  WarrantDelta,
917  CallPrice,
919  ToCallPrice,
927  BalancePoint,
929  OpenInterest,
931  Delta,
933  Gamma,
935  Theta,
937  Vega,
939  Rho,
940 };
941 
944 {
946  std::string symbol;
948  std::optional<Decimal> last_done;
950  std::optional<Decimal> change_value;
952  std::optional<Decimal> change_rate;
954  std::optional<int64_t> volume;
956  std::optional<Decimal> turnover;
958  std::optional<Decimal> ytd_change_rate;
960  std::optional<Decimal> turnover_rate;
962  std::optional<Decimal> total_market_value;
964  std::optional<Decimal> capital_flow;
966  std::optional<Decimal> amplitude;
968  std::optional<Decimal> volume_ratio;
970  std::optional<Decimal> pe_ttm_ratio;
972  std::optional<Decimal> pb_ratio;
974  std::optional<Decimal> dividend_ratio_ttm;
976  std::optional<Decimal> five_day_change_rate;
978  std::optional<Decimal> ten_day_change_rate;
980  std::optional<Decimal> half_year_change_rate;
982  std::optional<Decimal> five_minutes_change_rate;
984  std::optional<Date> expiry_date;
986  std::optional<Decimal> strike_price;
988  std::optional<Decimal> upper_strike_price;
990  std::optional<Decimal> lower_strike_price;
992  std::optional<int64_t> outstanding_qty;
994  std::optional<Decimal> outstanding_ratio;
996  std::optional<Decimal> premium;
998  std::optional<Decimal> itm_otm;
1000  std::optional<Decimal> implied_volatility;
1002  std::optional<Decimal> warrant_delta;
1004  std::optional<Decimal> call_price;
1006  std::optional<Decimal> to_call_price;
1008  std::optional<Decimal> effective_leverage;
1010  std::optional<Decimal> leverage_ratio;
1012  std::optional<Decimal> conversion_ratio;
1014  std::optional<Decimal> balance_point;
1016  std::optional<int64_t> open_interest;
1018  std::optional<Decimal> delta;
1020  std::optional<Decimal> gamma;
1022  std::optional<Decimal> theta;
1024  std::optional<Decimal> vega;
1026  std::optional<Decimal> rho;
1027 };
1028 
1030 enum class SortOrderType
1031 {
1033  Ascending,
1035  Descending,
1036 };
1037 
1039 enum class WarrantSortBy
1040 {
1042  LastDone,
1044  ChangeRate,
1046  ChangeValue,
1048  Volume,
1050  Turnover,
1052  ExpiryDate,
1054  StrikePrice,
1064  Premium,
1066  ItmOtm,
1070  Delta,
1072  CallPrice,
1074  ToCallPrice,
1078  LeverageRatio,
1082  BalancePoint,
1084  Status,
1085 };
1086 
1089 {
1091  LT_3,
1093  Between_3_6,
1095  Between_6_12,
1097  GT_12,
1098 };
1099 
1102 {
1104  In,
1106  Out,
1107 };
1108 
1110 enum class WarrantStatus
1111 {
1113  Suspend,
1115  PrepareList,
1117  Normal,
1118 };
1119 
1122 {
1124  std::string symbol;
1128  std::string name;
1136  int64_t volume;
1142  std::optional<Decimal> strike_price;
1144  std::optional<Decimal> upper_strike_price;
1146  std::optional<Decimal> lower_strike_price;
1154  std::optional<Decimal> itm_otm;
1156  std::optional<Decimal> implied_volatility;
1158  std::optional<Decimal> delta;
1160  std::optional<Decimal> call_price;
1162  std::optional<Decimal> to_call_price;
1164  std::optional<Decimal> effective_leverage;
1168  std::optional<Decimal> conversion_ratio;
1170  std::optional<Decimal> balance_point;
1173 };
1174 
1177 {
1179  Overnight,
1180 };
1181 
1184 {
1186  std::string key;
1188  std::string name;
1190  std::string description;
1192  int64_t start_at;
1194  int64_t end_at;
1195 };
1196 
1198 enum class TradeSessions
1199 {
1201  Intraday,
1203  All,
1204 };
1205 
1208 {
1210  int32_t temperature;
1212  std::string description;
1214  int32_t valuation;
1216  int32_t sentiment;
1218  int64_t timestamp;
1219 };
1220 
1223 {
1232 };
1233 
1236 {
1240  std::vector<MarketTemperature> records;
1241 };
1242 
1243 } // namespace quote
1244 
1245 namespace trade {
1246 
1248 enum class TopicType
1249 {
1251  Private,
1252 };
1253 
1256 {
1257  std::string order_id;
1258  std::string trade_id;
1259  std::string symbol;
1260  int64_t trade_done_at;
1263 };
1264 
1267 {
1269  std::optional<int64_t> start_at;
1271  std::optional<int64_t> end_at;
1273  std::optional<std::string> symbol;
1274 };
1275 
1278 {
1280  std::optional<std::string> symbol;
1282  std::optional<std::string> order_id;
1283 };
1284 
1286 enum class OrderStatus
1287 {
1289  Unknown,
1291  NotReported,
1299  Filled,
1301  WaitToNew,
1303  New,
1305  WaitToReplace,
1309  Replaced,
1311  PartialFilled,
1313  WaitToCancel,
1315  PendingCancel,
1317  Rejected,
1319  Canceled,
1321  Expired,
1324 };
1325 
1327 enum class OrderSide
1328 {
1330  Unknown,
1332  Buy,
1334  Sell,
1335 };
1336 
1338 enum class OrderType
1339 {
1341  Unknown,
1343  LO,
1345  ELO,
1347  MO,
1349  AO,
1351  ALO,
1353  ODD,
1355  LIT,
1357  MIT,
1359  TSLPAMT,
1361  TSLPPCT,
1363  TSMAMT,
1365  TSMPCT,
1367  SLO,
1368 };
1369 
1371 enum class OrderTag
1372 {
1374  Unknown,
1376  Normal,
1378  LongTerm,
1380  Grey,
1382  MarginCall,
1384  Offline,
1386  Creditor,
1388  Debtor,
1390  NonExercise,
1392  AllocatedSub,
1393 };
1394 
1397 {
1399  Unknown,
1401  Day,
1405  GoodTilDate,
1406 };
1407 
1409 enum class TriggerStatus
1410 {
1412  Unknown,
1414  Deactive,
1416  Active,
1418  Released,
1419 };
1420 
1422 enum class OutsideRTH
1423 {
1425  Unknown,
1427  RTHOnly,
1429  AnyTime,
1431  Overnight,
1432 };
1433 
1435 struct Order
1436 {
1438  std::string order_id;
1442  std::string stock_name;
1448  std::optional<Decimal> price;
1450  std::optional<Decimal> executed_price;
1452  int64_t submitted_at;
1456  std::string symbol;
1460  std::optional<Decimal> last_done;
1462  std::optional<Decimal> trigger_price;
1464  std::string msg;
1470  std::optional<Date> expire_date;
1472  std::optional<int64_t> updated_at;
1474  std::optional<int64_t> trigger_at;
1476  std::optional<Decimal> trailing_amount;
1478  std::optional<Decimal> trailing_percent;
1480  std::optional<Decimal> limit_offset;
1482  std::optional<TriggerStatus> trigger_status;
1484  std::string currency;
1486  std::optional<OutsideRTH> outside_rth;
1488  std::string remark;
1489 };
1490 
1493 {
1497  std::string stock_name;
1501  std::string symbol;
1509  std::optional<Decimal> executed_price;
1511  std::string order_id;
1513  std::string currency;
1517  int64_t submitted_at;
1519  int64_t updated_at;
1521  std::optional<Decimal> trigger_price;
1523  std::string msg;
1527  std::optional<TriggerStatus> trigger_status;
1529  std::optional<int64_t> trigger_at;
1531  std::optional<Decimal> trailing_amount;
1533  std::optional<Decimal> trailing_percent;
1535  std::optional<Decimal> limit_offset;
1537  std::string account_no;
1539  std::optional<Decimal> last_share;
1541  std::optional<Decimal> last_price;
1543  std::string remark;
1544 };
1545 
1548 {
1550  std::optional<std::string> symbol;
1552  std::optional<std::vector<OrderStatus>> status;
1554  std::optional<OrderSide> side;
1556  std::optional<Market> market;
1558  std::optional<int64_t> start_at;
1560  std::optional<int64_t> end_at;
1561 };
1562 
1565 {
1567  std::optional<std::string> symbol;
1569  std::optional<std::vector<OrderStatus>> status;
1571  std::optional<OrderSide> side;
1573  std::optional<Market> market;
1575  std::optional<std::string> order_id;
1576 };
1577 
1580 {
1582  std::string order_id;
1586  std::optional<Decimal> price;
1588  std::optional<Decimal> trigger_price;
1590  std::optional<Decimal> limit_offset;
1592  std::optional<Decimal> trailing_amount;
1594  std::optional<Decimal> trailing_percent;
1596  std::optional<std::string> remark;
1597 };
1598 
1601 {
1603  std::string symbol;
1613  std::optional<Decimal> submitted_price;
1615  std::optional<Decimal> trigger_price;
1617  std::optional<Decimal> limit_offset;
1619  std::optional<Decimal> trailing_amount;
1621  std::optional<Decimal> trailing_percent;
1624  std::optional<Date> expire_date;
1626  std::optional<OutsideRTH> outside_rth;
1628  std::optional<std::string> remark;
1629 };
1630 
1633 {
1635  std::string order_id;
1636 };
1637 
1639 struct CashInfo
1640 {
1650  std::string currency;
1651 };
1652 
1655 {
1663  int32_t risk_level;
1667  std::string currency;
1669  std::vector<CashInfo> cash_infos;
1678 };
1679 
1682 {
1684  Unknown,
1686  Out,
1688  In,
1689 };
1690 
1692 enum class BalanceType
1693 {
1695  Unknown,
1697  Cash,
1699  Stock,
1701  Fund,
1702 };
1703 
1705 struct CashFlow
1706 {
1716  std::string currency;
1718  int64_t business_time;
1720  std::optional<std::string> symbol;
1722  std::string description;
1723 };
1724 
1727 {
1729  int64_t start_at;
1731  int64_t end_at;
1733  std::optional<BalanceType> business_type;
1735  std::optional<std::string> symbol;
1737  std::optional<uintptr_t> page;
1739  std::optional<uintptr_t> size;
1740 };
1741 
1744 {
1746  std::optional<std::vector<std::string>> symbols;
1747 };
1748 
1751 {
1753  std::optional<std::vector<std::string>> symbols;
1754 };
1755 
1758 {
1760  std::string symbol;
1766  std::string symbol_name;
1768  std::string currency;
1773 };
1774 
1777 {
1779  std::string account_channel;
1781  std::vector<FundPosition> positions;
1782 };
1783 
1786 {
1788  std::vector<FundPositionChannel> channels;
1789 };
1790 
1793 {
1795  std::string symbol;
1797  std::string symbol_name;
1803  std::string currency;
1810  std::optional<Decimal> init_quantity;
1811 };
1812 
1815 {
1817  std::string account_channel;
1819  std::vector<StockPosition> positions;
1820 };
1821 
1824 {
1826  std::vector<StockPositionChannel> channels;
1827 };
1828 
1831 {
1838 };
1839 
1842 {
1843  Unknown,
1844  None,
1845  Calculated,
1846  Pending,
1847  Ready,
1848 };
1849 
1852 {
1853  Unknown,
1854  None,
1855  NoData,
1856  Pending,
1857  Done,
1858 };
1859 
1862 {
1863  Unknown,
1864  Broker,
1865  Third,
1866 };
1867 
1870 {
1880  std::string msg;
1882  int64_t time;
1883 };
1884 
1887 {
1889  std::string code;
1891  std::string name;
1895  std::string currency;
1896 };
1897 
1900 {
1904  std::string name;
1906  std::vector<OrderChargeFee> fees;
1907 };
1908 
1911 {
1915  std::string currency;
1917  std::vector<OrderChargeItem> items;
1918 };
1919 
1922 {
1924  std::string order_id;
1928  std::string stock_name;
1934  std::optional<Decimal> price;
1936  std::optional<Decimal> executed_price;
1938  int64_t submitted_at;
1942  std::string symbol;
1946  std::optional<Decimal> last_done;
1948  std::optional<Decimal> trigger_price;
1950  std::string msg;
1956  std::optional<Date> expire_date;
1958  std::optional<int64_t> updated_at;
1960  std::optional<int64_t> trigger_at;
1962  std::optional<Decimal> trailing_amount;
1964  std::optional<Decimal> trailing_percent;
1966  std::optional<Decimal> limit_offset;
1968  std::optional<TriggerStatus> trigger_status;
1970  std::string currency;
1972  std::optional<OutsideRTH> outside_rth;
1974  std::string remark;
1978  std::optional<Decimal> free_amount;
1980  std::optional<std::string> free_currency;
1984  std::optional<Decimal> deductions_amount;
1986  std::optional<std::string> deductions_currency;
1990  std::optional<Decimal> platform_deducted_amount;
1992  std::optional<std::string> platform_deducted_currency;
1994  std::vector<OrderHistoryDetail> history;
1997 };
1998 
2001 {
2003  std::string symbol;
2009  std::optional<Decimal> price;
2011  std::optional<std::string> currency;
2014  std::optional<std::string> order_id;
2017 };
2018 
2021 {
2026 };
2027 
2028 } // namespace trade
2029 
2030 } // 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:515
CalcIndex
Calc index.
Definition: types.hpp:859
@ 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:1223
@ Unknown
Unknown.
Definition: types.hpp:1225
@ Daily
Daily.
Definition: types.hpp:1227
@ Weekly
Weekly.
Definition: types.hpp:1229
@ Monthly
Monthly.
Definition: types.hpp:1231
OptionDirection
Option direction.
Definition: types.hpp:460
SecuritiesUpdateMode
Securities update mode.
Definition: types.hpp:803
FilterWarrantExpiryDate
Filter warrant expiry date type.
Definition: types.hpp:1089
Period
Candlestick period.
Definition: types.hpp:128
@ Min45
Forty-Five Minutes.
@ Min20
Twenty Minutes.
@ Min3
Three Minutes.
@ Min15
Fifteen Minutes.
@ Min30
Thirty Minutes.
TradeSession
Trade session.
Definition: types.hpp:182
TradeStatus
Trade status.
Definition: types.hpp:372
@ SplitStockHalts
Split Stock Halts.
@ WarrantPrepareList
Warrant To BeListed.
SecurityBoard
Security board.
Definition: types.hpp:267
@ 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:685
OptionType
Option type.
Definition: types.hpp:449
WarrantStatus
Warrant status.
Definition: types.hpp:1111
SecurityListCategory
Security list category.
Definition: types.hpp:1177
WarrantSortBy
Warrant sort by.
Definition: types.hpp:1040
@ 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:1102
WarrantType
Warrant type.
Definition: types.hpp:580
SortOrderType
Sort order type.
Definition: types.hpp:1031
TradeSessions
Trade sessions.
Definition: types.hpp:1199
TriggerStatus
Trigger status.
Definition: types.hpp:1410
OutsideRTH
Enable or disable outside regular trading hours.
Definition: types.hpp:1423
@ RTHOnly
Regular trading hour only.
OrderTag
Order tag.
Definition: types.hpp:1372
@ 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:1862
OrderType
Order type.
Definition: types.hpp:1339
@ 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:1328
TimeInForceType
Time in force Type.
Definition: types.hpp:1397
@ GoodTilDate
Good Til Date Order.
@ GoodTilCanceled
Good Til Canceled Order.
CommissionFreeStatus
Commission-free Status.
Definition: types.hpp:1842
CashFlowDirection
Cash flow direction.
Definition: types.hpp:1682
TopicType
Topic type.
Definition: types.hpp:1249
@ Private
Private notification for trade.
DeductionStatus
Deduction status.
Definition: types.hpp:1852
BalanceType
Balance type.
Definition: types.hpp:1693
OrderStatus
Order status.
Definition: types.hpp:1287
@ 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:247
int32_t position
Position.
Definition: types.hpp:249
std::vector< int32_t > broker_ids
Broker IDs.
Definition: types.hpp:251
Candlestick.
Definition: types.hpp:546
TradeSession trade_session
Trade session.
Definition: types.hpp:562
Decimal open
Open price.
Definition: types.hpp:550
Decimal high
High price.
Definition: types.hpp:554
Decimal low
Low price.
Definition: types.hpp:552
Decimal turnover
Turnover.
Definition: types.hpp:558
int64_t timestamp
Timestamp.
Definition: types.hpp:560
Decimal close
Close price.
Definition: types.hpp:548
int64_t volume
Volume.
Definition: types.hpp:556
Capital distribution.
Definition: types.hpp:755
Decimal small
Small order.
Definition: types.hpp:761
Decimal large
Large order.
Definition: types.hpp:757
Decimal medium
Medium order.
Definition: types.hpp:759
Capital distribution response.
Definition: types.hpp:766
CapitalDistribution capital_in
Inflow capital data.
Definition: types.hpp:770
CapitalDistribution capital_out
Outflow capital data.
Definition: types.hpp:772
int64_t timestamp
Time.
Definition: types.hpp:768
Capital flow line.
Definition: types.hpp:746
Decimal inflow
Inflow capital data.
Definition: types.hpp:748
int64_t timestamp
Time.
Definition: types.hpp:750
An request for create watchlist group.
Definition: types.hpp:814
std::vector< std::string > securities
Securities.
Definition: types.hpp:818
std::string name
Group name.
Definition: types.hpp:816
Definition: types.hpp:223
std::optional< Decimal > price
Price.
Definition: types.hpp:227
int64_t volume
Volume.
Definition: types.hpp:229
int64_t order_num
Number of orders.
Definition: types.hpp:231
int32_t position
Position.
Definition: types.hpp:225
Derivative type.
Definition: types.hpp:119
uint8_t value
Definition: types.hpp:120
History market temperature response.
Definition: types.hpp:1236
std::vector< MarketTemperature > records
Records.
Definition: types.hpp:1240
Granularity granularity
Granularity.
Definition: types.hpp:1238
Intraday line.
Definition: types.hpp:675
Decimal avg_price
Definition: types.hpp:680
Decimal turnover
Definition: types.hpp:679
int64_t volume
Definition: types.hpp:678
Decimal price
Definition: types.hpp:676
int64_t timestamp
Definition: types.hpp:677
Issuer info.
Definition: types.hpp:705
std::string name_en
Issuer name (en)
Definition: types.hpp:711
int32_t issuer_id
Issuer ID.
Definition: types.hpp:707
std::string name_hk
Issuer name (zh-HK)
Definition: types.hpp:713
std::string name_cn
Issuer name (zh-CN)
Definition: types.hpp:709
Market temperature.
Definition: types.hpp:1208
int32_t sentiment
Market sentiment.
Definition: types.hpp:1216
int32_t temperature
Temperature value.
Definition: types.hpp:1210
int32_t valuation
Market valuation.
Definition: types.hpp:1214
std::string description
Temperature description.
Definition: types.hpp:1212
int64_t timestamp
Time.
Definition: types.hpp:1218
Market trading days.
Definition: types.hpp:737
std::vector< Date > trading_days
Trading days.
Definition: types.hpp:739
std::vector< Date > half_trading_days
Half trading days.
Definition: types.hpp:741
Market trading session.
Definition: types.hpp:728
std::vector< TradingSessionInfo > trade_session
Trading session.
Definition: types.hpp:732
Market market
Market.
Definition: types.hpp:730
Quote of option.
Definition: types.hpp:471
Decimal strike_price
Strike price.
Definition: types.hpp:498
OptionType contract_type
Option type.
Definition: types.hpp:502
Date expiry_date
Exprity date.
Definition: types.hpp:496
Decimal high
High.
Definition: types.hpp:480
Decimal open
Open.
Definition: types.hpp:478
Decimal prev_close
Yesterday's close.
Definition: types.hpp:476
Decimal contract_size
Contract size.
Definition: types.hpp:504
Decimal turnover
Turnover.
Definition: types.hpp:488
Decimal low
Low.
Definition: types.hpp:482
Decimal implied_volatility
Implied volatility.
Definition: types.hpp:492
int64_t volume
Volume.
Definition: types.hpp:486
Decimal contract_multiplier
Contract multiplier.
Definition: types.hpp:500
TradeStatus trade_status
Security trading status.
Definition: types.hpp:490
std::string symbol
Security code.
Definition: types.hpp:472
int64_t open_interest
Number of open positions.
Definition: types.hpp:494
Decimal historical_volatility
Underlying security historical volatility of the option.
Definition: types.hpp:508
OptionDirection direction
Option direction.
Definition: types.hpp:506
int64_t timestamp
Time of latest price.
Definition: types.hpp:484
Decimal last_done
Latest price.
Definition: types.hpp:474
std::string underlying_symbol
Underlying security symbol of the option.
Definition: types.hpp:510
Definition: types.hpp:662
std::string name_en
Participant name (en)
Definition: types.hpp:668
std::string name_hk
Participant name (zh-HK)
Definition: types.hpp:670
std::vector< int32_t > broker_ids
Broker IDs.
Definition: types.hpp:664
std::string name_cn
Participant name (zh-CN)
Definition: types.hpp:666
Quote of US pre/post market.
Definition: types.hpp:399
Decimal high
High.
Definition: types.hpp:409
int64_t timestamp
Time of latest price.
Definition: types.hpp:403
Decimal prev_close
Close of the last trade session.
Definition: types.hpp:413
int64_t volume
Volume.
Definition: types.hpp:405
Decimal last_done
Latest price.
Definition: types.hpp:401
Decimal low
Low.
Definition: types.hpp:411
Decimal turnover
Turnover.
Definition: types.hpp:407
Brokers message.
Definition: types.hpp:256
std::vector< Brokers > ask_brokers
Ask brokers.
Definition: types.hpp:260
std::vector< Brokers > bid_brokers
Bid brokers.
Definition: types.hpp:262
std::string symbol
Security code.
Definition: types.hpp:258
Candlestick updated message.
Definition: types.hpp:567
std::string symbol
Security code.
Definition: types.hpp:569
bool is_confirmed
Is confirmed.
Definition: types.hpp:575
Candlestick candlestick
Candlestick.
Definition: types.hpp:573
Period period
Period type.
Definition: types.hpp:571
Depth message.
Definition: types.hpp:236
std::vector< Depth > bids
Bid depth.
Definition: types.hpp:242
std::vector< Depth > asks
Ask depth.
Definition: types.hpp:240
std::string symbol
Security code.
Definition: types.hpp:238
Quote message.
Definition: types.hpp:195
TradeSession trade_session
Trade session.
Definition: types.hpp:215
std::string symbol
Security code.
Definition: types.hpp:197
int64_t timestamp
Time of latest price.
Definition: types.hpp:207
int64_t current_volume
Increase volume between pushes.
Definition: types.hpp:217
Decimal low
Low.
Definition: types.hpp:205
Decimal high
High.
Definition: types.hpp:203
Decimal last_done
Latest price.
Definition: types.hpp:199
Decimal turnover
Turnover.
Definition: types.hpp:211
Decimal urrent_turnover
Increase turnover between pushes.
Definition: types.hpp:219
TradeStatus trade_status
Security trading status.
Definition: types.hpp:213
int64_t volume
Volume.
Definition: types.hpp:209
Decimal open
Open.
Definition: types.hpp:201
Trades message.
Definition: types.hpp:537
std::vector< Trade > trades
Trades data.
Definition: types.hpp:541
std::string symbol
Security code.
Definition: types.hpp:539
Quote package detail.
Definition: types.hpp:1184
std::string description
Description.
Definition: types.hpp:1190
std::string key
Key.
Definition: types.hpp:1186
int64_t end_at
End at.
Definition: types.hpp:1194
int64_t start_at
Start at.
Definition: types.hpp:1192
std::string name
Name.
Definition: types.hpp:1188
Real-time quote.
Definition: types.hpp:836
Decimal low
Low.
Definition: types.hpp:846
int64_t timestamp
Time of latest price.
Definition: types.hpp:848
Decimal high
High.
Definition: types.hpp:844
Decimal turnover
Turnover.
Definition: types.hpp:852
Decimal last_done
Latest price.
Definition: types.hpp:840
TradeStatus trade_status
Security trading status.
Definition: types.hpp:854
Decimal open
Open.
Definition: types.hpp:842
int64_t volume
Volume.
Definition: types.hpp:850
std::string symbol
Security code.
Definition: types.hpp:838
Security brokers.
Definition: types.hpp:654
std::vector< Brokers > ask_brokers
Ask brokers.
Definition: types.hpp:656
std::vector< Brokers > bid_brokers
Bid brokers.
Definition: types.hpp:658
Security calc index response.
Definition: types.hpp:944
std::optional< Decimal > outstanding_ratio
Outstanding ratio.
Definition: types.hpp:994
std::optional< Decimal > change_rate
Change ratio.
Definition: types.hpp:952
std::optional< Decimal > total_market_value
Total market value.
Definition: types.hpp:962
std::optional< Decimal > to_call_price
Price interval from the call price.
Definition: types.hpp:1006
std::optional< Decimal > balance_point
Breakeven point.
Definition: types.hpp:1014
std::optional< Decimal > pe_ttm_ratio
PE (TTM)
Definition: types.hpp:970
std::string symbol
Security code.
Definition: types.hpp:946
std::optional< Decimal > amplitude
Amplitude.
Definition: types.hpp:966
std::optional< Decimal > theta
Theta.
Definition: types.hpp:1022
std::optional< Decimal > delta
Delta.
Definition: types.hpp:1018
std::optional< Decimal > vega
Vega.
Definition: types.hpp:1024
std::optional< Decimal > call_price
Call price.
Definition: types.hpp:1004
std::optional< Decimal > pb_ratio
PB.
Definition: types.hpp:972
std::optional< Decimal > capital_flow
Capital flow.
Definition: types.hpp:964
std::optional< Decimal > leverage_ratio
Leverage ratio.
Definition: types.hpp:1010
std::optional< Decimal > lower_strike_price
Lower bound price.
Definition: types.hpp:990
std::optional< Decimal > rho
Rho.
Definition: types.hpp:1026
std::optional< Decimal > itm_otm
In/out of the bound.
Definition: types.hpp:998
std::optional< Decimal > implied_volatility
Implied volatility.
Definition: types.hpp:1000
std::optional< Decimal > five_minutes_change_rate
Five minutes change ratio.
Definition: types.hpp:982
std::optional< int64_t > outstanding_qty
Outstanding quantity.
Definition: types.hpp:992
std::optional< Decimal > five_day_change_rate
Five days change ratio.
Definition: types.hpp:976
std::optional< Decimal > dividend_ratio_ttm
Dividend ratio (TTM)
Definition: types.hpp:974
std::optional< Decimal > turnover_rate
Turnover rate.
Definition: types.hpp:960
std::optional< Decimal > turnover
Turnover.
Definition: types.hpp:956
std::optional< Decimal > conversion_ratio
Conversion ratio.
Definition: types.hpp:1012
std::optional< Decimal > half_year_change_rate
Half year change ratio.
Definition: types.hpp:980
std::optional< Decimal > ytd_change_rate
Year-to-date change ratio.
Definition: types.hpp:958
std::optional< Date > expiry_date
Expiry date.
Definition: types.hpp:984
std::optional< Decimal > volume_ratio
Volume ratio.
Definition: types.hpp:968
std::optional< Decimal > gamma
Gamma.
Definition: types.hpp:1020
std::optional< Decimal > warrant_delta
Warrant delta.
Definition: types.hpp:1002
std::optional< int64_t > open_interest
Open interest.
Definition: types.hpp:1016
std::optional< Decimal > upper_strike_price
Upper bound price.
Definition: types.hpp:988
std::optional< int64_t > volume
Volume.
Definition: types.hpp:954
std::optional< Decimal > change_value
Change value.
Definition: types.hpp:950
std::optional< Decimal > strike_price
Strike price.
Definition: types.hpp:986
std::optional< Decimal > ten_day_change_rate
Ten days change ratio.
Definition: types.hpp:978
std::optional< Decimal > effective_leverage
Effective leverage.
Definition: types.hpp:1008
std::optional< Decimal > premium
Premium.
Definition: types.hpp:996
std::optional< Decimal > last_done
Latest price.
Definition: types.hpp:948
Security depth.
Definition: types.hpp:645
std::vector< Depth > asks
Ask depth.
Definition: types.hpp:647
std::vector< Depth > bids
Bid depth.
Definition: types.hpp:649
Security.
Definition: types.hpp:322
std::string symbol
Security code.
Definition: types.hpp:324
std::string name_hk
Security name (zh-HK)
Definition: types.hpp:330
std::string name_cn
Security name (zh-CN)
Definition: types.hpp:326
std::string name_en
Security name (en)
Definition: types.hpp:328
Quote of securitity.
Definition: types.hpp:418
int64_t timestamp
Time of latest price.
Definition: types.hpp:432
Decimal turnover
Turnover.
Definition: types.hpp:436
Decimal last_done
Latest price.
Definition: types.hpp:422
std::optional< PrePostQuote > overnight_quote
Quote of US overnight market.
Definition: types.hpp:444
Decimal high
High.
Definition: types.hpp:428
Decimal prev_close
Yesterday's close.
Definition: types.hpp:424
TradeStatus trade_status
Security trading status.
Definition: types.hpp:438
int64_t volume
Volume.
Definition: types.hpp:434
std::optional< PrePostQuote > pre_market_quote
Quote of US pre market.
Definition: types.hpp:440
Decimal low
Low.
Definition: types.hpp:430
Decimal open
Open.
Definition: types.hpp:426
std::optional< PrePostQuote > post_market_quote
Quote of US post market.
Definition: types.hpp:442
std::string symbol
Security code.
Definition: types.hpp:420
The basic information of securities.
Definition: types.hpp:335
Decimal dividend_yield
Dividend yield.
Definition: types.hpp:363
int64_t hk_shares
HK shares (only HK stocks)
Definition: types.hpp:355
Decimal eps
Earnings per share.
Definition: types.hpp:357
std::string exchange
Exchange which the security belongs to.
Definition: types.hpp:345
int32_t lot_size
Lot size.
Definition: types.hpp:349
std::string name_hk
Security name (zh-HK)
Definition: types.hpp:343
std::string name_cn
Security name (zh-CN)
Definition: types.hpp:339
DerivativeType stock_derivatives
Types of supported derivatives.
Definition: types.hpp:365
std::string currency
Trading currency.
Definition: types.hpp:347
Decimal eps_ttm
Earnings per share (TTM)
Definition: types.hpp:359
std::string symbol
Security code.
Definition: types.hpp:337
std::string name_en
Security name (en)
Definition: types.hpp:341
int64_t circulating_shares
Circulating shares.
Definition: types.hpp:353
SecurityBoard board
Board.
Definition: types.hpp:367
int64_t total_shares
Total shares.
Definition: types.hpp:351
Decimal bps
Net assets per share.
Definition: types.hpp:361
Strike price info.
Definition: types.hpp:692
std::string call_symbol
Security code of call option.
Definition: types.hpp:696
bool standard
Is standard.
Definition: types.hpp:700
std::string put_symbol
Security code of put option.
Definition: types.hpp:698
Decimal price
Strike price.
Definition: types.hpp:694
Subscription.
Definition: types.hpp:171
SubFlags sub_types
Subscription flags.
Definition: types.hpp:175
std::vector< Period > candlesticks
Candlesticks.
Definition: types.hpp:177
std::string symbol
Security code.
Definition: types.hpp:173
Trade.
Definition: types.hpp:526
TradeSession trade_session
Definition: types.hpp:532
TradeDirection direction
Definition: types.hpp:531
int64_t volume
Definition: types.hpp:528
std::string trade_type
Definition: types.hpp:530
int64_t timestamp
Definition: types.hpp:529
Decimal price
Definition: types.hpp:527
Definition: types.hpp:717
Time begin_time
Being trading time.
Definition: types.hpp:719
Time end_time
End trading time.
Definition: types.hpp:721
TradeSession trade_session
Trading session.
Definition: types.hpp:723
An request for update watchlist group.
Definition: types.hpp:823
SecuritiesUpdateMode mode
Securities Update Mode.
Definition: types.hpp:831
std::optional< std::string > name
Group name.
Definition: types.hpp:827
std::optional< std::vector< std::string > > securities
Securities.
Definition: types.hpp:829
int64_t id
Group id.
Definition: types.hpp:825
Warrant info.
Definition: types.hpp:1122
Decimal change_rate
Quote change rate.
Definition: types.hpp:1132
int64_t volume
Volume.
Definition: types.hpp:1136
std::optional< Decimal > delta
Delta.
Definition: types.hpp:1158
Date expiry_date
Expiry date.
Definition: types.hpp:1140
std::optional< Decimal > upper_strike_price
Upper strike price.
Definition: types.hpp:1144
Decimal premium
Premium.
Definition: types.hpp:1152
Decimal last_done
Latest price.
Definition: types.hpp:1130
std::string symbol
Security code.
Definition: types.hpp:1124
WarrantType warrant_type
Warrant type.
Definition: types.hpp:1126
std::optional< Decimal > to_call_price
Price interval from the call price.
Definition: types.hpp:1162
std::optional< Decimal > effective_leverage
Effective leverage.
Definition: types.hpp:1164
std::optional< Decimal > itm_otm
In/out of the bound.
Definition: types.hpp:1154
std::optional< Decimal > strike_price
Strike price.
Definition: types.hpp:1142
std::optional< Decimal > conversion_ratio
Conversion ratio.
Definition: types.hpp:1168
Decimal turnover
Turnover.
Definition: types.hpp:1138
int64_t outstanding_qty
Outstanding quantity.
Definition: types.hpp:1148
WarrantStatus status
Status.
Definition: types.hpp:1172
std::optional< Decimal > lower_strike_price
Lower strike price.
Definition: types.hpp:1146
std::string name
Security name.
Definition: types.hpp:1128
std::optional< Decimal > balance_point
Breakeven point.
Definition: types.hpp:1170
Decimal change_value
Quote change.
Definition: types.hpp:1134
std::optional< Decimal > implied_volatility
Implied volatility.
Definition: types.hpp:1156
std::optional< Decimal > call_price
Call price.
Definition: types.hpp:1160
Decimal outstanding_ratio
Outstanding ratio.
Definition: types.hpp:1150
Decimal leverage_ratio
Leverage ratio.
Definition: types.hpp:1166
Quote of warrant.
Definition: types.hpp:597
Decimal outstanding_ratio
Outstanding ratio.
Definition: types.hpp:624
Decimal low
Low.
Definition: types.hpp:608
Date last_trade_date
Last tradalbe date.
Definition: types.hpp:622
std::string symbol
Security code.
Definition: types.hpp:598
Decimal lower_strike_price
Lower bound price.
Definition: types.hpp:636
Decimal implied_volatility
Implied volatility.
Definition: types.hpp:618
Decimal open
Open.
Definition: types.hpp:604
int64_t outstanding_quantity
Outstanding quantity.
Definition: types.hpp:626
Decimal call_price
Call price.
Definition: types.hpp:638
int64_t timestamp
Time of latest price.
Definition: types.hpp:610
Date expiry_date
Exprity date.
Definition: types.hpp:620
Decimal strike_price
Strike price.
Definition: types.hpp:632
Decimal high
High.
Definition: types.hpp:606
Decimal turnover
Turnover.
Definition: types.hpp:614
std::string underlying_symbol
Underlying security symbol of the warrant.
Definition: types.hpp:640
int64_t volume
Volume.
Definition: types.hpp:612
WarrantType category
Warrant type.
Definition: types.hpp:630
Decimal last_done
Latest price.
Definition: types.hpp:600
Decimal prev_close
Yesterday's close.
Definition: types.hpp:602
Decimal conversion_ratio
Conversion ratio.
Definition: types.hpp:628
Decimal upper_strike_price
Upper bound price.
Definition: types.hpp:634
TradeStatus trade_status
Security trading status.
Definition: types.hpp:616
Watchlist group.
Definition: types.hpp:792
std::vector< WatchlistSecurity > securities
Securities.
Definition: types.hpp:798
int64_t id
Group id.
Definition: types.hpp:794
std::string name
Group name.
Definition: types.hpp:796
Watchlist security.
Definition: types.hpp:777
int64_t watched_at
Watched time.
Definition: types.hpp:787
std::string name
Security name.
Definition: types.hpp:783
std::string symbol
Security symbol.
Definition: types.hpp:779
std::optional< Decimal > watched_price
Watched price.
Definition: types.hpp:785
Market market
Market.
Definition: types.hpp:781
Account balance.
Definition: types.hpp:1655
Decimal buy_power
Buy power.
Definition: types.hpp:1677
std::vector< CashInfo > cash_infos
Cash details.
Definition: types.hpp:1669
Decimal init_margin
Initial margin.
Definition: types.hpp:1673
Decimal remaining_finance_amount
Remaining financing amount.
Definition: types.hpp:1661
Decimal total_cash
Total cash.
Definition: types.hpp:1657
int32_t risk_level
Risk control level.
Definition: types.hpp:1663
Decimal max_finance_amount
Maximum financing amount.
Definition: types.hpp:1659
Decimal margin_call
Margin call.
Definition: types.hpp:1665
std::string currency
Currency.
Definition: types.hpp:1667
Decimal maintenance_margin
Maintenance margin.
Definition: types.hpp:1675
Decimal net_assets
Net assets.
Definition: types.hpp:1671
Cash flow.
Definition: types.hpp:1706
CashFlowDirection direction
Outflow direction.
Definition: types.hpp:1710
int64_t business_time
Business time.
Definition: types.hpp:1718
std::optional< std::string > symbol
Associated Stock code information.
Definition: types.hpp:1720
Decimal balance
Cash amount.
Definition: types.hpp:1714
std::string description
Cash flow description.
Definition: types.hpp:1722
std::string transaction_flow_name
Cash flow name.
Definition: types.hpp:1708
BalanceType business_type
Balance type.
Definition: types.hpp:1712
std::string currency
Cash currency.
Definition: types.hpp:1716
Cash info.
Definition: types.hpp:1640
std::string currency
Currency.
Definition: types.hpp:1650
Decimal available_cash
Available cash.
Definition: types.hpp:1644
Decimal settling_cash
Cash to be settled.
Definition: types.hpp:1648
Decimal frozen_cash
Frozen cash.
Definition: types.hpp:1646
Decimal withdraw_cash
Withdraw cash.
Definition: types.hpp:1642
Options for estimate maximum purchase quantity.
Definition: types.hpp:2001
bool fractional_shares
Get the maximum fractional share buying power.
Definition: types.hpp:2016
std::optional< std::string > currency
Settlement currency.
Definition: types.hpp:2011
std::optional< Decimal > price
Estimated order price.
Definition: types.hpp:2009
OrderSide side
Order side.
Definition: types.hpp:2007
std::optional< std::string > order_id
Definition: types.hpp:2014
std::string symbol
Security code.
Definition: types.hpp:2003
OrderType order_type
Order type.
Definition: types.hpp:2005
Response for estimate maximum purchase quantity.
Definition: types.hpp:2021
Decimal cash_max_qty
Cash available quantity.
Definition: types.hpp:2023
Decimal margin_max_qty
Margin available quantity.
Definition: types.hpp:2025
Exexution.
Definition: types.hpp:1256
int64_t trade_done_at
Definition: types.hpp:1260
Decimal quantity
Definition: types.hpp:1261
Decimal price
Definition: types.hpp:1262
std::string symbol
Definition: types.hpp:1259
std::string order_id
Definition: types.hpp:1257
std::string trade_id
Definition: types.hpp:1258
Fund position channel.
Definition: types.hpp:1777
std::string account_channel
Account type.
Definition: types.hpp:1779
std::vector< FundPosition > positions
Fund positions.
Definition: types.hpp:1781
Fund position.
Definition: types.hpp:1758
Decimal cost_net_asset_value
Net cost.
Definition: types.hpp:1770
Decimal current_net_asset_value
Current equity.
Definition: types.hpp:1762
Decimal holding_units
Holding units.
Definition: types.hpp:1772
int64_t net_asset_value_day
Current equity time.
Definition: types.hpp:1764
std::string symbol
Fund ISIN code.
Definition: types.hpp:1760
std::string symbol_name
Fund name.
Definition: types.hpp:1766
std::string currency
Currency.
Definition: types.hpp:1768
Fund positions response.
Definition: types.hpp:1786
std::vector< FundPositionChannel > channels
Channels.
Definition: types.hpp:1788
Options for submit order request.
Definition: types.hpp:1727
std::optional< uintptr_t > page
Page number.
Definition: types.hpp:1737
std::optional< std::string > symbol
Security symbol.
Definition: types.hpp:1735
int64_t end_at
End time.
Definition: types.hpp:1731
int64_t start_at
Start time.
Definition: types.hpp:1729
std::optional< BalanceType > business_type
Business type.
Definition: types.hpp:1733
std::optional< uintptr_t > size
Page size.
Definition: types.hpp:1739
Options for get fund positions request.
Definition: types.hpp:1744
std::optional< std::vector< std::string > > symbols
Fund symbols.
Definition: types.hpp:1746
Options for get history executions request.
Definition: types.hpp:1267
std::optional< int64_t > end_at
End time.
Definition: types.hpp:1271
std::optional< int64_t > start_at
Start time.
Definition: types.hpp:1269
std::optional< std::string > symbol
Security code.
Definition: types.hpp:1273
Options for get history orders request.
Definition: types.hpp:1548
std::optional< int64_t > end_at
End time.
Definition: types.hpp:1560
std::optional< OrderSide > side
Order side.
Definition: types.hpp:1554
std::optional< Market > market
Market.
Definition: types.hpp:1556
std::optional< std::string > symbol
Security symbol.
Definition: types.hpp:1550
std::optional< std::vector< OrderStatus > > status
Order status.
Definition: types.hpp:1552
std::optional< int64_t > start_at
Start time.
Definition: types.hpp:1558
Options for get stock positions request.
Definition: types.hpp:1751
std::optional< std::vector< std::string > > symbols
Stock symbols.
Definition: types.hpp:1753
Options for get today executions request.
Definition: types.hpp:1278
std::optional< std::string > symbol
Security code.
Definition: types.hpp:1280
std::optional< std::string > order_id
Order id.
Definition: types.hpp:1282
Options for get today orders request.
Definition: types.hpp:1565
std::optional< OrderSide > side
Order side.
Definition: types.hpp:1571
std::optional< Market > market
Market.
Definition: types.hpp:1573
std::optional< std::string > order_id
Order id.
Definition: types.hpp:1575
std::optional< std::vector< OrderStatus > > status
Order status.
Definition: types.hpp:1569
std::optional< std::string > symbol
Security symbol.
Definition: types.hpp:1567
Margin ratio.
Definition: types.hpp:1831
Decimal mm_factor
Maintain the initial margin ratio.
Definition: types.hpp:1835
Decimal im_factor
Initial margin ratio.
Definition: types.hpp:1833
Decimal fm_factor
Forced close-out margin ratio.
Definition: types.hpp:1837
Order charge detail.
Definition: types.hpp:1911
std::string currency
Settlement currency.
Definition: types.hpp:1915
Decimal total_amount
Total charges amount.
Definition: types.hpp:1913
std::vector< OrderChargeItem > items
Order charge items.
Definition: types.hpp:1917
Order charge fee.
Definition: types.hpp:1887
std::string name
Charge name.
Definition: types.hpp:1891
std::string code
Charge code.
Definition: types.hpp:1889
Decimal amount
Charge amount.
Definition: types.hpp:1893
std::string currency
Charge currency.
Definition: types.hpp:1895
Order charge item.
Definition: types.hpp:1900
std::string name
Charge category name.
Definition: types.hpp:1904
ChargeCategoryCode code
Charge category code.
Definition: types.hpp:1902
std::vector< OrderChargeFee > fees
Charge details.
Definition: types.hpp:1906
Order detail.
Definition: types.hpp:1922
OrderSide side
Order side.
Definition: types.hpp:1940
std::optional< Decimal > deductions_amount
Deduction amount.
Definition: types.hpp:1984
std::optional< int64_t > trigger_at
Conditional order trigger time.
Definition: types.hpp:1960
std::optional< Date > expire_date
Long term order expire date.
Definition: types.hpp:1956
CommissionFreeStatus free_status
Commission-free Status.
Definition: types.hpp:1976
std::optional< std::string > deductions_currency
Deduction currency.
Definition: types.hpp:1986
DeductionStatus deductions_status
Deduction status.
Definition: types.hpp:1982
std::optional< Decimal > platform_deducted_amount
Platform deduction amount.
Definition: types.hpp:1990
std::optional< Decimal > trigger_price
LIT / MIT Order Trigger Price
Definition: types.hpp:1948
std::optional< TriggerStatus > trigger_status
Conditional order trigger status.
Definition: types.hpp:1968
DeductionStatus platform_deducted_status
Platform fee deduction status.
Definition: types.hpp:1988
std::optional< int64_t > updated_at
Last updated time.
Definition: types.hpp:1958
OrderStatus status
Order status.
Definition: types.hpp:1926
std::optional< std::string > platform_deducted_currency
Platform deduction currency.
Definition: types.hpp:1992
std::optional< Decimal > free_amount
Commission-free amount.
Definition: types.hpp:1978
OrderChargeDetail charge_detail
Order charges.
Definition: types.hpp:1996
Decimal quantity
Submitted quantity.
Definition: types.hpp:1930
std::optional< Decimal > last_done
Last done.
Definition: types.hpp:1946
std::vector< OrderHistoryDetail > history
Order history details.
Definition: types.hpp:1994
std::string msg
Rejected Message or remark.
Definition: types.hpp:1950
Decimal executed_quantity
Executed quantity.
Definition: types.hpp:1932
std::optional< Decimal > price
Submitted price.
Definition: types.hpp:1934
std::string order_id
Order ID.
Definition: types.hpp:1924
std::optional< Decimal > trailing_amount
TSMAMT / TSLPAMT order trailing amount
Definition: types.hpp:1962
OrderTag tag
Order tag.
Definition: types.hpp:1952
std::optional< OutsideRTH > outside_rth
Enable or disable outside regular trading hours.
Definition: types.hpp:1972
std::optional< Decimal > limit_offset
TSLPAMT / TSLPPCT order limit offset amount
Definition: types.hpp:1966
std::optional< Decimal > trailing_percent
TSMPCT / TSLPPCT order trailing percent
Definition: types.hpp:1964
std::string remark
Remark.
Definition: types.hpp:1974
std::string symbol
Security code.
Definition: types.hpp:1942
OrderType order_type
Order type.
Definition: types.hpp:1944
TimeInForceType time_in_force
Time in force type.
Definition: types.hpp:1954
std::string currency
Currency.
Definition: types.hpp:1970
int64_t submitted_at
Submitted time.
Definition: types.hpp:1938
std::optional< std::string > free_currency
Commission-free currency.
Definition: types.hpp:1980
std::string stock_name
Stock name.
Definition: types.hpp:1928
std::optional< Decimal > executed_price
Executed price.
Definition: types.hpp:1936
Order history detail.
Definition: types.hpp:1870
Decimal quantity
Definition: types.hpp:1876
OrderStatus status
Order status.
Definition: types.hpp:1878
std::string msg
Execution or error message.
Definition: types.hpp:1880
Decimal price
Definition: types.hpp:1873
int64_t time
Occurrence time.
Definition: types.hpp:1882
Order.
Definition: types.hpp:1436
std::optional< Decimal > last_done
Last done.
Definition: types.hpp:1460
std::optional< Decimal > trailing_percent
TSMPCT / TSLPPCT order trailing percent
Definition: types.hpp:1478
std::optional< Date > expire_date
Long term order expire date.
Definition: types.hpp:1470
std::optional< OutsideRTH > outside_rth
Enable or disable outside regular trading hours.
Definition: types.hpp:1486
std::optional< Decimal > trigger_price
LIT / MIT Order Trigger Price
Definition: types.hpp:1462
TimeInForceType time_in_force
Time in force type.
Definition: types.hpp:1468
OrderSide side
Order side.
Definition: types.hpp:1454
std::optional< int64_t > updated_at
Last updated time.
Definition: types.hpp:1472
std::string remark
Remark.
Definition: types.hpp:1488
std::optional< int64_t > trigger_at
Conditional order trigger time.
Definition: types.hpp:1474
OrderTag tag
Order tag.
Definition: types.hpp:1466
std::string currency
Currency.
Definition: types.hpp:1484
std::optional< Decimal > trailing_amount
TSMAMT / TSLPAMT order trailing amount
Definition: types.hpp:1476
std::optional< TriggerStatus > trigger_status
Conditional order trigger status.
Definition: types.hpp:1482
std::string order_id
Order ID.
Definition: types.hpp:1438
OrderType order_type
Order type.
Definition: types.hpp:1458
std::string symbol
Security code.
Definition: types.hpp:1456
std::optional< Decimal > executed_price
Executed price.
Definition: types.hpp:1450
int64_t submitted_at
Submitted time.
Definition: types.hpp:1452
OrderStatus status
Order status.
Definition: types.hpp:1440
std::optional< Decimal > price
Submitted price.
Definition: types.hpp:1448
std::optional< Decimal > limit_offset
TSLPAMT / TSLPPCT order limit offset amount
Definition: types.hpp:1480
Decimal quantity
Submitted quantity.
Definition: types.hpp:1444
std::string stock_name
Stock name.
Definition: types.hpp:1442
std::string msg
Rejected Message or remark.
Definition: types.hpp:1464
Decimal executed_quantity
Executed quantity.
Definition: types.hpp:1446
Order changed message.
Definition: types.hpp:1493
std::string currency
Currency.
Definition: types.hpp:1513
std::optional< Decimal > executed_price
Executed price.
Definition: types.hpp:1509
std::string order_id
Order ID.
Definition: types.hpp:1511
Decimal executed_quantity
Executed quantity.
Definition: types.hpp:1507
int64_t submitted_at
Submitted time.
Definition: types.hpp:1517
std::optional< Decimal > trigger_price
Order trigger price.
Definition: types.hpp:1521
std::optional< Decimal > last_share
Last share.
Definition: types.hpp:1539
std::optional< Decimal > trailing_percent
Trailing percent.
Definition: types.hpp:1533
std::optional< Decimal > trailing_amount
Trailing amount.
Definition: types.hpp:1531
std::optional< Decimal > limit_offset
Limit offset amount.
Definition: types.hpp:1535
Decimal submitted_quantity
Submitted quantity.
Definition: types.hpp:1499
std::string account_no
Account no.
Definition: types.hpp:1537
OrderType order_type
Order type.
Definition: types.hpp:1503
OrderTag tag
Order tag.
Definition: types.hpp:1525
std::string stock_name
Stock name.
Definition: types.hpp:1497
std::string remark
Remark message.
Definition: types.hpp:1543
std::optional< int64_t > trigger_at
Conditional order trigger time.
Definition: types.hpp:1529
OrderStatus status
Order status.
Definition: types.hpp:1515
std::optional< TriggerStatus > trigger_status
Conditional order trigger status.
Definition: types.hpp:1527
OrderSide side
Order side.
Definition: types.hpp:1495
std::string msg
Rejected message or remark.
Definition: types.hpp:1523
std::string symbol
Order symbol.
Definition: types.hpp:1501
int64_t updated_at
Last updated time.
Definition: types.hpp:1519
Decimal submitted_price
Submitted price.
Definition: types.hpp:1505
std::optional< Decimal > last_price
Last price.
Definition: types.hpp:1541
Options for replace order request.
Definition: types.hpp:1580
std::string order_id
Order ID.
Definition: types.hpp:1582
std::optional< Decimal > trailing_percent
Trailing percent.
Definition: types.hpp:1594
Decimal quantity
Quantity.
Definition: types.hpp:1584
std::optional< std::string > remark
Remark.
Definition: types.hpp:1596
std::optional< Decimal > price
Price.
Definition: types.hpp:1586
std::optional< Decimal > trigger_price
Trigger price.
Definition: types.hpp:1588
std::optional< Decimal > trailing_amount
Trailing amount.
Definition: types.hpp:1592
std::optional< Decimal > limit_offset
Limit offset.
Definition: types.hpp:1590
Stock position channel.
Definition: types.hpp:1815
std::string account_channel
Account type.
Definition: types.hpp:1817
std::vector< StockPosition > positions
Stock positions.
Definition: types.hpp:1819
Stock position.
Definition: types.hpp:1793
Decimal cost_price
Definition: types.hpp:1806
Decimal quantity
The number of holdings.
Definition: types.hpp:1799
Market market
Market.
Definition: types.hpp:1808
std::optional< Decimal > init_quantity
Initial position before market opening.
Definition: types.hpp:1810
std::string symbol_name
Stock name.
Definition: types.hpp:1797
Decimal available_quantity
Available quantity.
Definition: types.hpp:1801
std::string currency
Currency.
Definition: types.hpp:1803
std::string symbol
Stock code.
Definition: types.hpp:1795
Stock positions response.
Definition: types.hpp:1824
std::vector< StockPositionChannel > channels
Channels.
Definition: types.hpp:1826
Options for submit order request.
Definition: types.hpp:1601
std::optional< Decimal > submitted_price
Submitted price.
Definition: types.hpp:1613
std::optional< Decimal > trigger_price
Trigger price (LIT / MIT Required)
Definition: types.hpp:1615
std::optional< std::string > remark
Remark (Maximum 64 characters)
Definition: types.hpp:1628
std::optional< Date > expire_date
Definition: types.hpp:1624
std::optional< Decimal > trailing_percent
Trailing percent (TSLPPCT / TSMAPCT Required)
Definition: types.hpp:1621
Decimal submitted_quantity
Submitted price.
Definition: types.hpp:1609
std::string symbol
Security symbol.
Definition: types.hpp:1603
OrderSide side
Order side.
Definition: types.hpp:1607
std::optional< Decimal > trailing_amount
Trailing amount (TSLPAMT / TSMAMT Required)
Definition: types.hpp:1619
std::optional< Decimal > limit_offset
Limit offset amount (TSLPAMT / TSLPPCT Required)
Definition: types.hpp:1617
std::optional< OutsideRTH > outside_rth
Enable or disable outside regular trading hours.
Definition: types.hpp:1626
OrderType order_type
Order type.
Definition: types.hpp:1605
TimeInForceType time_in_force
Time in force type.
Definition: types.hpp:1611
Response for submit order request.
Definition: types.hpp:1633
std::string order_id
Order id.
Definition: types.hpp:1635