Longbridge 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 longbridge {
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,
321  SPXIndex,
323  VIXIndex,
324 };
325 
327 struct Security
328 {
330  std::string symbol;
332  std::string name_cn;
334  std::string name_en;
336  std::string name_hk;
337 };
338 
341 {
343  std::string symbol;
345  std::string name_cn;
347  std::string name_en;
349  std::string name_hk;
351  std::string exchange;
353  std::string currency;
355  int32_t lot_size;
357  int64_t total_shares;
361  int64_t hk_shares;
374 };
375 
377 enum class TradeStatus
378 {
380  Normal,
382  Halted,
384  Delisted,
386  Fuse,
388  PrepareList,
390  CodeMoved,
392  ToBeOpened,
396  Expired,
400  SuspendTrade,
401 };
402 
405 {
409  int64_t timestamp;
411  int64_t volume;
420 };
421 
424 {
426  std::string symbol;
438  int64_t timestamp;
440  int64_t volume;
446  std::optional<PrePostQuote> pre_market_quote;
448  std::optional<PrePostQuote> post_market_quote;
450  std::optional<PrePostQuote> overnight_quote;
451 };
452 
454 enum class OptionType
455 {
457  Unknown,
459  American,
461  Europe,
462 };
463 
465 enum class OptionDirection
466 {
468  Unknown,
470  Put,
472  Call,
473 };
474 
477 {
478  std::string symbol;
490  int64_t timestamp;
492  int64_t volume;
500  int64_t open_interest;
516  std::string underlying_symbol;
517 };
518 
520 enum class TradeDirection
521 {
523  Neutral,
525  Down,
527  Up
528 };
529 
531 struct Trade
532 {
534  int64_t volume;
535  int64_t timestamp;
536  std::string trade_type;
539 };
540 
543 {
545  std::string symbol;
547  std::vector<Trade> trades;
548 };
549 
552 {
562  int64_t volume;
566  int64_t timestamp;
569 };
570 
573 {
575  std::string symbol;
582 };
583 
585 enum class WarrantType
586 {
588  Unknown,
590  Call,
592  Put,
594  Bull,
596  Bear,
598  Inline
599 };
600 
603 {
604  std::string symbol;
616  int64_t timestamp;
618  int64_t volume;
646  std::string underlying_symbol;
647 };
648 
651 {
653  std::vector<Depth> asks;
655  std::vector<Depth> bids;
656 };
657 
660 {
662  std::vector<Brokers> ask_brokers;
664  std::vector<Brokers> bid_brokers;
665 };
666 
668 {
670  std::vector<int32_t> broker_ids;
672  std::string name_cn;
674  std::string name_en;
676  std::string name_hk;
677 };
678 
681 {
683  int64_t timestamp;
684  int64_t volume;
687 };
688 
690 enum class AdjustType
691 {
692  NoAdjust,
694 };
695 
698 {
702  std::string call_symbol;
704  std::string put_symbol;
706  bool standard;
707 };
708 
711 {
713  int32_t issuer_id;
715  std::string name_cn;
717  std::string name_en;
719  std::string name_hk;
720 };
721 
723 {
730 };
731 
734 {
738  std::vector<TradingSessionInfo> trade_session;
739 };
740 
743 {
745  std::vector<Date> trading_days;
747  std::vector<Date> half_trading_days;
748 };
749 
752 {
756  int64_t timestamp;
757 };
758 
761 {
768 };
769 
772 {
774  int64_t timestamp;
779 };
780 
783 {
785  std::string symbol;
789  std::string name;
791  std::optional<Decimal> watched_price;
793  int64_t watched_at;
794 };
795 
798 {
800  int64_t id;
802  std::string name;
804  std::vector<WatchlistSecurity> securities;
805 };
806 
809 {
811  Add,
813  Remove,
815  Replace,
816 };
817 
820 {
822  std::string name;
824  std::vector<std::string> securities;
825 };
826 
829 {
831  int64_t id;
833  std::optional<std::string> name;
835  std::optional<std::vector<std::string>> securities;
838 };
839 
842 {
844  std::string symbol;
854  int64_t timestamp;
856  int64_t volume;
861 };
862 
864 enum class CalcIndex
865 {
867  LastDone,
869  ChangeValue,
871  ChangeRate,
873  Volume,
875  Turnover,
879  TurnoverRate,
883  CapitalFlow,
885  Amplitude,
887  VolumeRatio,
889  PeTtmRatio,
891  PbRatio,
903  ExpiryDate,
905  StrikePrice,
915  Premium,
917  ItmOtm,
921  WarrantDelta,
923  CallPrice,
925  ToCallPrice,
933  BalancePoint,
935  OpenInterest,
937  Delta,
939  Gamma,
941  Theta,
943  Vega,
945  Rho,
946 };
947 
950 {
952  std::string symbol;
954  std::optional<Decimal> last_done;
956  std::optional<Decimal> change_value;
958  std::optional<Decimal> change_rate;
960  std::optional<int64_t> volume;
962  std::optional<Decimal> turnover;
964  std::optional<Decimal> ytd_change_rate;
966  std::optional<Decimal> turnover_rate;
968  std::optional<Decimal> total_market_value;
970  std::optional<Decimal> capital_flow;
972  std::optional<Decimal> amplitude;
974  std::optional<Decimal> volume_ratio;
976  std::optional<Decimal> pe_ttm_ratio;
978  std::optional<Decimal> pb_ratio;
980  std::optional<Decimal> dividend_ratio_ttm;
982  std::optional<Decimal> five_day_change_rate;
984  std::optional<Decimal> ten_day_change_rate;
986  std::optional<Decimal> half_year_change_rate;
988  std::optional<Decimal> five_minutes_change_rate;
990  std::optional<Date> expiry_date;
992  std::optional<Decimal> strike_price;
994  std::optional<Decimal> upper_strike_price;
996  std::optional<Decimal> lower_strike_price;
998  std::optional<int64_t> outstanding_qty;
1000  std::optional<Decimal> outstanding_ratio;
1002  std::optional<Decimal> premium;
1004  std::optional<Decimal> itm_otm;
1006  std::optional<Decimal> implied_volatility;
1008  std::optional<Decimal> warrant_delta;
1010  std::optional<Decimal> call_price;
1012  std::optional<Decimal> to_call_price;
1014  std::optional<Decimal> effective_leverage;
1016  std::optional<Decimal> leverage_ratio;
1018  std::optional<Decimal> conversion_ratio;
1020  std::optional<Decimal> balance_point;
1022  std::optional<int64_t> open_interest;
1024  std::optional<Decimal> delta;
1026  std::optional<Decimal> gamma;
1028  std::optional<Decimal> theta;
1030  std::optional<Decimal> vega;
1032  std::optional<Decimal> rho;
1033 };
1034 
1036 enum class SortOrderType
1037 {
1039  Ascending,
1041  Descending,
1042 };
1043 
1045 enum class WarrantSortBy
1046 {
1048  LastDone,
1050  ChangeRate,
1052  ChangeValue,
1054  Volume,
1056  Turnover,
1058  ExpiryDate,
1060  StrikePrice,
1070  Premium,
1072  ItmOtm,
1076  Delta,
1078  CallPrice,
1080  ToCallPrice,
1084  LeverageRatio,
1088  BalancePoint,
1090  Status,
1091 };
1092 
1095 {
1097  LT_3,
1099  Between_3_6,
1101  Between_6_12,
1103  GT_12,
1104 };
1105 
1108 {
1110  In,
1112  Out,
1113 };
1114 
1116 enum class WarrantStatus
1117 {
1119  Suspend,
1121  PrepareList,
1123  Normal,
1124 };
1125 
1128 {
1130  std::string symbol;
1134  std::string name;
1142  int64_t volume;
1148  std::optional<Decimal> strike_price;
1150  std::optional<Decimal> upper_strike_price;
1152  std::optional<Decimal> lower_strike_price;
1160  std::optional<Decimal> itm_otm;
1162  std::optional<Decimal> implied_volatility;
1164  std::optional<Decimal> delta;
1166  std::optional<Decimal> call_price;
1168  std::optional<Decimal> to_call_price;
1170  std::optional<Decimal> effective_leverage;
1174  std::optional<Decimal> conversion_ratio;
1176  std::optional<Decimal> balance_point;
1179 };
1180 
1183 {
1185  Overnight,
1186 };
1187 
1190 {
1192  std::string key;
1194  std::string name;
1196  std::string description;
1198  int64_t start_at;
1200  int64_t end_at;
1201 };
1202 
1204 enum class TradeSessions
1205 {
1207  Intraday,
1209  All,
1210 };
1211 
1214 {
1216  int32_t temperature;
1218  std::string description;
1220  int32_t valuation;
1222  int32_t sentiment;
1224  int64_t timestamp;
1225 };
1226 
1229 {
1238 };
1239 
1242 {
1246  std::vector<MarketTemperature> records;
1247 };
1248 
1251 {
1253  std::string id;
1255  std::string title;
1257  std::string description;
1259  std::string file_name;
1261  std::vector<std::string> file_urls;
1263  int64_t published_at;
1264 };
1265 
1266 } // namespace quote
1267 
1268 namespace trade {
1269 
1271 enum class TopicType
1272 {
1274  Private,
1275 };
1276 
1279 {
1280  std::string order_id;
1281  std::string trade_id;
1282  std::string symbol;
1283  int64_t trade_done_at;
1286 };
1287 
1290 {
1292  std::optional<int64_t> start_at;
1294  std::optional<int64_t> end_at;
1296  std::optional<std::string> symbol;
1297 };
1298 
1301 {
1303  std::optional<std::string> symbol;
1305  std::optional<std::string> order_id;
1306 };
1307 
1309 enum class OrderStatus
1310 {
1312  Unknown,
1314  NotReported,
1322  Filled,
1324  WaitToNew,
1326  New,
1328  WaitToReplace,
1332  Replaced,
1334  PartialFilled,
1336  WaitToCancel,
1338  PendingCancel,
1340  Rejected,
1342  Canceled,
1344  Expired,
1347 };
1348 
1350 enum class OrderSide
1351 {
1353  Unknown,
1355  Buy,
1357  Sell,
1358 };
1359 
1361 enum class OrderType
1362 {
1364  Unknown,
1366  LO,
1368  ELO,
1370  MO,
1372  AO,
1374  ALO,
1376  ODD,
1378  LIT,
1380  MIT,
1382  TSLPAMT,
1384  TSLPPCT,
1386  TSMAMT,
1388  TSMPCT,
1390  SLO,
1391 };
1392 
1394 enum class OrderTag
1395 {
1397  Unknown,
1399  Normal,
1401  LongTerm,
1403  Grey,
1405  MarginCall,
1407  Offline,
1409  Creditor,
1411  Debtor,
1413  NonExercise,
1415  AllocatedSub,
1416 };
1417 
1420 {
1422  Unknown,
1424  Day,
1428  GoodTilDate,
1429 };
1430 
1432 enum class TriggerStatus
1433 {
1435  Unknown,
1437  Deactive,
1439  Active,
1441  Released,
1442 };
1443 
1445 enum class OutsideRTH
1446 {
1448  Unknown,
1450  RTHOnly,
1452  AnyTime,
1454  Overnight,
1455 };
1456 
1458 struct Order
1459 {
1461  std::string order_id;
1465  std::string stock_name;
1471  std::optional<Decimal> price;
1473  std::optional<Decimal> executed_price;
1475  int64_t submitted_at;
1479  std::string symbol;
1483  std::optional<Decimal> last_done;
1485  std::optional<Decimal> trigger_price;
1487  std::string msg;
1493  std::optional<Date> expire_date;
1495  std::optional<int64_t> updated_at;
1497  std::optional<int64_t> trigger_at;
1499  std::optional<Decimal> trailing_amount;
1501  std::optional<Decimal> trailing_percent;
1503  std::optional<Decimal> limit_offset;
1505  std::optional<TriggerStatus> trigger_status;
1507  std::string currency;
1509  std::optional<OutsideRTH> outside_rth;
1511  std::optional<int32_t> limit_depth_level;
1513  std::optional<int32_t> trigger_count;
1515  std::optional<Decimal> monitor_price;
1517  std::string remark;
1518 };
1519 
1522 {
1526  std::string stock_name;
1530  std::string symbol;
1538  std::optional<Decimal> executed_price;
1540  std::string order_id;
1542  std::string currency;
1546  int64_t submitted_at;
1548  int64_t updated_at;
1550  std::optional<Decimal> trigger_price;
1552  std::string msg;
1556  std::optional<TriggerStatus> trigger_status;
1558  std::optional<int64_t> trigger_at;
1560  std::optional<Decimal> trailing_amount;
1562  std::optional<Decimal> trailing_percent;
1564  std::optional<Decimal> limit_offset;
1566  std::string account_no;
1568  std::optional<Decimal> last_share;
1570  std::optional<Decimal> last_price;
1572  std::string remark;
1573 };
1574 
1577 {
1579  std::optional<std::string> symbol;
1581  std::optional<std::vector<OrderStatus>> status;
1583  std::optional<OrderSide> side;
1585  std::optional<Market> market;
1587  std::optional<int64_t> start_at;
1589  std::optional<int64_t> end_at;
1590 };
1591 
1594 {
1596  std::optional<std::string> symbol;
1598  std::optional<std::vector<OrderStatus>> status;
1600  std::optional<OrderSide> side;
1602  std::optional<Market> market;
1604  std::optional<std::string> order_id;
1605 };
1606 
1609 {
1611  std::string order_id;
1615  std::optional<Decimal> 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;
1625  std::optional<int32_t> limit_depth_level;
1627  std::optional<int32_t> trigger_count;
1629  std::optional<Decimal> monitor_price;
1631  std::optional<std::string> remark;
1632 };
1633 
1636 {
1638  std::string symbol;
1648  std::optional<Decimal> submitted_price;
1650  std::optional<Decimal> trigger_price;
1652  std::optional<Decimal> limit_offset;
1654  std::optional<Decimal> trailing_amount;
1656  std::optional<Decimal> trailing_percent;
1659  std::optional<Date> expire_date;
1661  std::optional<OutsideRTH> outside_rth;
1663  std::optional<int32_t> limit_depth_level;
1665  std::optional<int32_t> trigger_count;
1667  std::optional<Decimal> monitor_price;
1669  std::optional<std::string> remark;
1670 };
1671 
1674 {
1676  std::string order_id;
1677 };
1678 
1680 struct CashInfo
1681 {
1691  std::string currency;
1692 };
1693 
1696 {
1697  std::string currency;
1699 };
1700 
1703 {
1711  int32_t risk_level;
1715  std::string currency;
1717  std::vector<CashInfo> cash_infos;
1727  std::vector<FrozenTransactionFee> frozen_transaction_fees;
1728 };
1729 
1732 {
1734  Unknown,
1736  Out,
1738  In,
1739 };
1740 
1742 enum class BalanceType
1743 {
1745  Unknown,
1747  Cash,
1749  Stock,
1751  Fund,
1752 };
1753 
1755 struct CashFlow
1756 {
1766  std::string currency;
1768  int64_t business_time;
1770  std::optional<std::string> symbol;
1772  std::string description;
1773 };
1774 
1777 {
1779  int64_t start_at;
1781  int64_t end_at;
1783  std::optional<BalanceType> business_type;
1785  std::optional<std::string> symbol;
1787  std::optional<uintptr_t> page;
1789  std::optional<uintptr_t> size;
1790 };
1791 
1794 {
1796  std::optional<std::vector<std::string>> symbols;
1797 };
1798 
1801 {
1803  std::optional<std::vector<std::string>> symbols;
1804 };
1805 
1808 {
1810  std::string symbol;
1816  std::string symbol_name;
1818  std::string currency;
1823 };
1824 
1827 {
1829  std::string account_channel;
1831  std::vector<FundPosition> positions;
1832 };
1833 
1836 {
1838  std::vector<FundPositionChannel> channels;
1839 };
1840 
1843 {
1845  std::string symbol;
1847  std::string symbol_name;
1853  std::string currency;
1860  std::optional<Decimal> init_quantity;
1861 };
1862 
1865 {
1867  std::string account_channel;
1869  std::vector<StockPosition> positions;
1870 };
1871 
1874 {
1876  std::vector<StockPositionChannel> channels;
1877 };
1878 
1881 {
1888 };
1889 
1892 {
1893  Unknown,
1894  None,
1895  Calculated,
1896  Pending,
1897  Ready,
1898 };
1899 
1902 {
1903  Unknown,
1904  None,
1905  NoData,
1906  Pending,
1907  Done,
1908 };
1909 
1912 {
1913  Unknown,
1914  Broker,
1915  Third,
1916 };
1917 
1920 {
1930  std::string msg;
1932  int64_t time;
1933 };
1934 
1937 {
1939  std::string code;
1941  std::string name;
1945  std::string currency;
1946 };
1947 
1950 {
1954  std::string name;
1956  std::vector<OrderChargeFee> fees;
1957 };
1958 
1961 {
1965  std::string currency;
1967  std::vector<OrderChargeItem> items;
1968 };
1969 
1972 {
1974  std::string order_id;
1978  std::string stock_name;
1984  std::optional<Decimal> price;
1986  std::optional<Decimal> executed_price;
1988  int64_t submitted_at;
1992  std::string symbol;
1996  std::optional<Decimal> last_done;
1998  std::optional<Decimal> trigger_price;
2000  std::string msg;
2006  std::optional<Date> expire_date;
2008  std::optional<int64_t> updated_at;
2010  std::optional<int64_t> trigger_at;
2012  std::optional<Decimal> trailing_amount;
2014  std::optional<Decimal> trailing_percent;
2016  std::optional<Decimal> limit_offset;
2018  std::optional<TriggerStatus> trigger_status;
2020  std::string currency;
2022  std::optional<OutsideRTH> outside_rth;
2024  std::optional<int32_t> limit_depth_level;
2026  std::optional<int32_t> trigger_count;
2028  std::optional<Decimal> monitor_price;
2030  std::string remark;
2034  std::optional<Decimal> free_amount;
2036  std::optional<std::string> free_currency;
2040  std::optional<Decimal> deductions_amount;
2042  std::optional<std::string> deductions_currency;
2046  std::optional<Decimal> platform_deducted_amount;
2048  std::optional<std::string> platform_deducted_currency;
2050  std::vector<OrderHistoryDetail> history;
2053 };
2054 
2057 {
2059  std::string symbol;
2065  std::optional<Decimal> price;
2067  std::optional<std::string> currency;
2070  std::optional<std::string> order_id;
2073 };
2074 
2077 {
2082 };
2083 
2084 } // namespace trade
2085 
2086 namespace content {
2087 
2090 {
2092  std::string id;
2094  std::string title;
2096  std::string description;
2098  std::string url;
2100  int64_t published_at;
2104  int32_t likes_count;
2106  int32_t shares_count;
2107 };
2108 
2110 struct NewsItem
2111 {
2113  std::string id;
2115  std::string title;
2117  std::string description;
2119  std::string url;
2121  int64_t published_at;
2125  int32_t likes_count;
2127  int32_t shares_count;
2128 };
2129 
2130 } // namespace content
2131 
2132 } // namespace longbridge
Definition: decimal.hpp:13
Subscription flags.
Definition: types.hpp:72
static SubFlags QUOTE()
bool operator==(const SubFlags &other) const
Definition: types.hpp:103
static SubFlags BROKER()
static SubFlags DEPTH()
SubFlags(uint8_t value)
Definition: types.hpp:77
SubFlags & operator|=(const SubFlags &other)
Definition: types.hpp:86
SubFlags operator&(const SubFlags &other) const
Definition: types.hpp:92
static SubFlags TRADE()
bool contains(const SubFlags &other) const
Definition: types.hpp:108
SubFlags operator|(const SubFlags &other) const
Definition: types.hpp:81
SubFlags & operator&=(const SubFlags &other)
Definition: types.hpp:97
WarrantSortBy
Warrant sort by.
Definition: types.hpp:1046
@ LowerStrikePrice
Lower strike price.
@ EffectiveLeverage
Effective leverage.
@ ConversionRatio
Conversion ratio.
@ ItmOtm
In/out of the bound.
@ ToCallPrice
Price interval from the call price.
@ ImpliedVolatility
Implied volatility.
@ OutstandingRatio
Outstanding ratio.
@ OutstandingQuantity
Outstanding quantity.
@ UpperStrikePrice
Upper strike price.
TradeSessions
Trade sessions.
Definition: types.hpp:1205
SecuritiesUpdateMode
Securities update mode.
Definition: types.hpp:809
OptionDirection
Option direction.
Definition: types.hpp:466
Period
Candlestick period.
Definition: types.hpp:130
@ Min45
Forty-Five Minutes.
@ Min20
Twenty Minutes.
@ Min15
Fifteen Minutes.
@ Min30
Thirty Minutes.
TradeSession
Trade session.
Definition: types.hpp:184
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.
@ VIXIndex
CBOE Volatility Index.
@ CNSector
CN Industry Board.
FilterWarrantInOutBoundsType
Filter warrant in/out of the bounds type.
Definition: types.hpp:1108
TradeStatus
Trade status.
Definition: types.hpp:378
@ SplitStockHalts
Split Stock Halts.
@ WarrantPrepareList
Warrant To BeListed.
AdjustType
Adjust type.
Definition: types.hpp:691
TradeDirection
Trade direction.
Definition: types.hpp:521
WarrantType
Warrant type.
Definition: types.hpp:586
Granularity
Data granularity.
Definition: types.hpp:1229
@ Unknown
Unknown.
Definition: types.hpp:1231
@ Monthly
Monthly.
Definition: types.hpp:1237
@ Weekly
Weekly.
Definition: types.hpp:1235
@ Daily
Daily.
Definition: types.hpp:1233
SecurityListCategory
Security list category.
Definition: types.hpp:1183
WarrantStatus
Warrant status.
Definition: types.hpp:1117
CalcIndex
Calc index.
Definition: types.hpp:865
@ 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.
@ YtdChangeRate
Year-to-date change ratio.
@ FiveDayChangeRate
Five days change ratio.
@ BalancePoint
Breakeven point.
@ ToCallPrice
Price interval from the call price.
@ TotalMarketValue
Total market value.
@ HalfYearChangeRate
Half year change ratio.
@ TurnoverRate
Turnover rate.
@ ImpliedVolatility
Implied volatility.
@ OutstandingRatio
Outstanding ratio.
@ FiveMinutesChangeRate
Five minutes change ratio.
@ UpperStrikePrice
Upper bound price.
@ OpenInterest
Open interest.
SortOrderType
Sort order type.
Definition: types.hpp:1037
OptionType
Option type.
Definition: types.hpp:455
FilterWarrantExpiryDate
Filter warrant expiry date type.
Definition: types.hpp:1095
OrderTag
Order tag.
Definition: types.hpp:1395
@ LongTerm
Long term Order.
@ MarginCall
Force Selling.
@ Creditor
Option Exercise Long.
@ NonExercise
Wavier Of Option Exercise.
@ AllocatedSub
Trade Allocation.
@ Debtor
Option Exercise Short.
CashFlowDirection
Cash flow direction.
Definition: types.hpp:1732
OutsideRTH
Enable or disable outside regular trading hours.
Definition: types.hpp:1446
@ RTHOnly
Regular trading hour only.
TriggerStatus
Trigger status.
Definition: types.hpp:1433
TopicType
Topic type.
Definition: types.hpp:1272
@ Private
Private notification for trade.
BalanceType
Balance type.
Definition: types.hpp:1743
DeductionStatus
Deduction status.
Definition: types.hpp:1902
OrderSide
Order side.
Definition: types.hpp:1351
CommissionFreeStatus
Commission-free Status.
Definition: types.hpp:1892
ChargeCategoryCode
Charge category code.
Definition: types.hpp:1912
OrderStatus
Order status.
Definition: types.hpp:1310
@ 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)
@ ProtectedNotReported
Not reported (Protected Order)
OrderType
Order type.
Definition: types.hpp:1362
@ TSLPAMT
Trailing Limit If Touched (Trailing Amount)
@ 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)
TimeInForceType
Time in force Type.
Definition: types.hpp:1420
@ GoodTilDate
Good Til Date Order.
@ GoodTilCanceled
Good Til Canceled Order.
Definition: async_result.hpp:8
PushCandlestickMode
Push candlestick mode.
Definition: types.hpp:42
Market
Market.
Definition: types.hpp:51
@ Crypto
Crypto market.
Language
Language identifer.
Definition: types.hpp:31
Definition: types.hpp:10
uint8_t day
Definition: types.hpp:13
uint8_t month
Definition: types.hpp:12
int32_t year
Definition: types.hpp:11
Definition: types.hpp:24
Time time
Definition: types.hpp:26
Date date
Definition: types.hpp:25
Definition: types.hpp:17
uint8_t second
Definition: types.hpp:20
uint8_t minute
Definition: types.hpp:19
uint8_t hour
Definition: types.hpp:18
News item.
Definition: types.hpp:2111
std::string title
Title.
Definition: types.hpp:2115
int32_t likes_count
Likes count.
Definition: types.hpp:2125
std::string url
URL.
Definition: types.hpp:2119
int32_t shares_count
Shares count.
Definition: types.hpp:2127
std::string description
Description.
Definition: types.hpp:2117
int32_t comments_count
Comments count.
Definition: types.hpp:2123
int64_t published_at
Published time (Unix timestamp)
Definition: types.hpp:2121
std::string id
News ID.
Definition: types.hpp:2113
Topic item.
Definition: types.hpp:2090
std::string url
URL.
Definition: types.hpp:2098
int32_t likes_count
Likes count.
Definition: types.hpp:2104
std::string description
Description.
Definition: types.hpp:2096
std::string title
Title.
Definition: types.hpp:2094
int64_t published_at
Published time (Unix timestamp)
Definition: types.hpp:2100
int32_t shares_count
Shares count.
Definition: types.hpp:2106
std::string id
Topic ID.
Definition: types.hpp:2092
int32_t comments_count
Comments count.
Definition: types.hpp:2102
Brokers.
Definition: types.hpp:249
std::vector< int32_t > broker_ids
Broker IDs.
Definition: types.hpp:253
int32_t position
Position.
Definition: types.hpp:251
Candlestick.
Definition: types.hpp:552
int64_t timestamp
Timestamp.
Definition: types.hpp:566
TradeSession trade_session
Trade session.
Definition: types.hpp:568
Decimal turnover
Turnover.
Definition: types.hpp:564
Decimal close
Close price.
Definition: types.hpp:554
Decimal high
High price.
Definition: types.hpp:560
Decimal open
Open price.
Definition: types.hpp:556
int64_t volume
Volume.
Definition: types.hpp:562
Decimal low
Low price.
Definition: types.hpp:558
Capital distribution.
Definition: types.hpp:761
Decimal large
Large order.
Definition: types.hpp:763
Decimal small
Small order.
Definition: types.hpp:767
Decimal medium
Medium order.
Definition: types.hpp:765
Capital distribution response.
Definition: types.hpp:772
int64_t timestamp
Time.
Definition: types.hpp:774
CapitalDistribution capital_in
Inflow capital data.
Definition: types.hpp:776
CapitalDistribution capital_out
Outflow capital data.
Definition: types.hpp:778
Capital flow line.
Definition: types.hpp:752
Decimal inflow
Inflow capital data.
Definition: types.hpp:754
int64_t timestamp
Time.
Definition: types.hpp:756
An request for create watchlist group.
Definition: types.hpp:820
std::string name
Group name.
Definition: types.hpp:822
std::vector< std::string > securities
Securities.
Definition: types.hpp:824
Definition: types.hpp:225
std::optional< Decimal > price
Price.
Definition: types.hpp:229
int32_t position
Position.
Definition: types.hpp:227
int64_t volume
Volume.
Definition: types.hpp:231
int64_t order_num
Number of orders.
Definition: types.hpp:233
Derivative type.
Definition: types.hpp:121
uint8_t value
Definition: types.hpp:122
Filing item.
Definition: types.hpp:1251
std::string description
Description.
Definition: types.hpp:1257
std::string file_name
File name.
Definition: types.hpp:1259
std::string id
Filing ID.
Definition: types.hpp:1253
std::string title
Title.
Definition: types.hpp:1255
std::vector< std::string > file_urls
File URLs.
Definition: types.hpp:1261
int64_t published_at
Published time (Unix timestamp)
Definition: types.hpp:1263
History market temperature response.
Definition: types.hpp:1242
Granularity granularity
Granularity.
Definition: types.hpp:1244
std::vector< MarketTemperature > records
Records.
Definition: types.hpp:1246
Intraday line.
Definition: types.hpp:681
Decimal avg_price
Definition: types.hpp:686
Decimal turnover
Definition: types.hpp:685
int64_t timestamp
Definition: types.hpp:683
Decimal price
Definition: types.hpp:682
int64_t volume
Definition: types.hpp:684
Issuer info.
Definition: types.hpp:711
int32_t issuer_id
Issuer ID.
Definition: types.hpp:713
std::string name_en
Issuer name (en)
Definition: types.hpp:717
std::string name_cn
Issuer name (zh-CN)
Definition: types.hpp:715
std::string name_hk
Issuer name (zh-HK)
Definition: types.hpp:719
Market temperature.
Definition: types.hpp:1214
int32_t temperature
Temperature value.
Definition: types.hpp:1216
int32_t valuation
Market valuation.
Definition: types.hpp:1220
std::string description
Temperature description.
Definition: types.hpp:1218
int32_t sentiment
Market sentiment.
Definition: types.hpp:1222
int64_t timestamp
Time.
Definition: types.hpp:1224
Market trading days.
Definition: types.hpp:743
std::vector< Date > half_trading_days
Half trading days.
Definition: types.hpp:747
std::vector< Date > trading_days
Trading days.
Definition: types.hpp:745
Market trading session.
Definition: types.hpp:734
std::vector< TradingSessionInfo > trade_session
Trading session.
Definition: types.hpp:738
Market market
Market.
Definition: types.hpp:736
Quote of option.
Definition: types.hpp:477
Decimal prev_close
Yesterday's close.
Definition: types.hpp:482
TradeStatus trade_status
Security trading status.
Definition: types.hpp:496
OptionDirection direction
Option direction.
Definition: types.hpp:512
int64_t open_interest
Number of open positions.
Definition: types.hpp:500
int64_t timestamp
Time of latest price.
Definition: types.hpp:490
Decimal contract_size
Contract size.
Definition: types.hpp:510
Decimal contract_multiplier
Contract multiplier.
Definition: types.hpp:506
Decimal turnover
Turnover.
Definition: types.hpp:494
Decimal strike_price
Strike price.
Definition: types.hpp:504
OptionType contract_type
Option type.
Definition: types.hpp:508
Date expiry_date
Exprity date.
Definition: types.hpp:502
int64_t volume
Volume.
Definition: types.hpp:492
Decimal low
Low.
Definition: types.hpp:488
Decimal last_done
Latest price.
Definition: types.hpp:480
Decimal historical_volatility
Underlying security historical volatility of the option.
Definition: types.hpp:514
Decimal high
High.
Definition: types.hpp:486
Decimal implied_volatility
Implied volatility.
Definition: types.hpp:498
std::string symbol
Security code.
Definition: types.hpp:478
Decimal open
Open.
Definition: types.hpp:484
std::string underlying_symbol
Underlying security symbol of the option.
Definition: types.hpp:516
Definition: types.hpp:668
std::string name_hk
Participant name (zh-HK)
Definition: types.hpp:676
std::string name_en
Participant name (en)
Definition: types.hpp:674
std::vector< int32_t > broker_ids
Broker IDs.
Definition: types.hpp:670
std::string name_cn
Participant name (zh-CN)
Definition: types.hpp:672
Quote of US pre/post market.
Definition: types.hpp:405
int64_t timestamp
Time of latest price.
Definition: types.hpp:409
Decimal low
Low.
Definition: types.hpp:417
Decimal turnover
Turnover.
Definition: types.hpp:413
Decimal high
High.
Definition: types.hpp:415
int64_t volume
Volume.
Definition: types.hpp:411
Decimal last_done
Latest price.
Definition: types.hpp:407
Decimal prev_close
Close of the last trade session.
Definition: types.hpp:419
Brokers message.
Definition: types.hpp:258
std::vector< Brokers > bid_brokers
Bid brokers.
Definition: types.hpp:264
std::vector< Brokers > ask_brokers
Ask brokers.
Definition: types.hpp:262
std::string symbol
Security code.
Definition: types.hpp:260
Candlestick updated message.
Definition: types.hpp:573
Period period
Period type.
Definition: types.hpp:577
bool is_confirmed
Is confirmed.
Definition: types.hpp:581
std::string symbol
Security code.
Definition: types.hpp:575
Candlestick candlestick
Candlestick.
Definition: types.hpp:579
Depth message.
Definition: types.hpp:238
std::vector< Depth > asks
Ask depth.
Definition: types.hpp:242
std::string symbol
Security code.
Definition: types.hpp:240
std::vector< Depth > bids
Bid depth.
Definition: types.hpp:244
Quote message.
Definition: types.hpp:197
Decimal high
High.
Definition: types.hpp:205
TradeStatus trade_status
Security trading status.
Definition: types.hpp:215
int64_t timestamp
Time of latest price.
Definition: types.hpp:209
Decimal last_done
Latest price.
Definition: types.hpp:201
Decimal turnover
Turnover.
Definition: types.hpp:213
int64_t current_volume
Increase volume between pushes.
Definition: types.hpp:219
int64_t volume
Volume.
Definition: types.hpp:211
Decimal urrent_turnover
Increase turnover between pushes.
Definition: types.hpp:221
TradeSession trade_session
Trade session.
Definition: types.hpp:217
Decimal low
Low.
Definition: types.hpp:207
Decimal open
Open.
Definition: types.hpp:203
std::string symbol
Security code.
Definition: types.hpp:199
Trades message.
Definition: types.hpp:543
std::string symbol
Security code.
Definition: types.hpp:545
std::vector< Trade > trades
Trades data.
Definition: types.hpp:547
Quote package detail.
Definition: types.hpp:1190
int64_t start_at
Start at.
Definition: types.hpp:1198
std::string description
Description.
Definition: types.hpp:1196
std::string key
Key.
Definition: types.hpp:1192
int64_t end_at
End at.
Definition: types.hpp:1200
std::string name
Name.
Definition: types.hpp:1194
Real-time quote.
Definition: types.hpp:842
Decimal high
High.
Definition: types.hpp:850
Decimal open
Open.
Definition: types.hpp:848
std::string symbol
Security code.
Definition: types.hpp:844
Decimal turnover
Turnover.
Definition: types.hpp:858
int64_t timestamp
Time of latest price.
Definition: types.hpp:854
int64_t volume
Volume.
Definition: types.hpp:856
Decimal last_done
Latest price.
Definition: types.hpp:846
TradeStatus trade_status
Security trading status.
Definition: types.hpp:860
Decimal low
Low.
Definition: types.hpp:852
Security brokers.
Definition: types.hpp:660
std::vector< Brokers > bid_brokers
Bid brokers.
Definition: types.hpp:664
std::vector< Brokers > ask_brokers
Ask brokers.
Definition: types.hpp:662
Security calc index response.
Definition: types.hpp:950
std::optional< Decimal > balance_point
Breakeven point.
Definition: types.hpp:1020
std::optional< Decimal > change_rate
Change ratio.
Definition: types.hpp:958
std::optional< Decimal > lower_strike_price
Lower bound price.
Definition: types.hpp:996
std::optional< Date > expiry_date
Expiry date.
Definition: types.hpp:990
std::optional< Decimal > theta
Theta.
Definition: types.hpp:1028
std::optional< Decimal > conversion_ratio
Conversion ratio.
Definition: types.hpp:1018
std::optional< Decimal > leverage_ratio
Leverage ratio.
Definition: types.hpp:1016
std::optional< Decimal > five_day_change_rate
Five days change ratio.
Definition: types.hpp:982
std::optional< int64_t > open_interest
Open interest.
Definition: types.hpp:1022
std::optional< Decimal > ten_day_change_rate
Ten days change ratio.
Definition: types.hpp:984
std::optional< Decimal > volume_ratio
Volume ratio.
Definition: types.hpp:974
std::string symbol
Security code.
Definition: types.hpp:952
std::optional< Decimal > call_price
Call price.
Definition: types.hpp:1010
std::optional< Decimal > turnover
Turnover.
Definition: types.hpp:962
std::optional< Decimal > warrant_delta
Warrant delta.
Definition: types.hpp:1008
std::optional< Decimal > ytd_change_rate
Year-to-date change ratio.
Definition: types.hpp:964
std::optional< int64_t > volume
Volume.
Definition: types.hpp:960
std::optional< Decimal > capital_flow
Capital flow.
Definition: types.hpp:970
std::optional< int64_t > outstanding_qty
Outstanding quantity.
Definition: types.hpp:998
std::optional< Decimal > pe_ttm_ratio
PE (TTM)
Definition: types.hpp:976
std::optional< Decimal > last_done
Latest price.
Definition: types.hpp:954
std::optional< Decimal > delta
Delta.
Definition: types.hpp:1024
std::optional< Decimal > vega
Vega.
Definition: types.hpp:1030
std::optional< Decimal > itm_otm
In/out of the bound.
Definition: types.hpp:1004
std::optional< Decimal > outstanding_ratio
Outstanding ratio.
Definition: types.hpp:1000
std::optional< Decimal > strike_price
Strike price.
Definition: types.hpp:992
std::optional< Decimal > implied_volatility
Implied volatility.
Definition: types.hpp:1006
std::optional< Decimal > half_year_change_rate
Half year change ratio.
Definition: types.hpp:986
std::optional< Decimal > amplitude
Amplitude.
Definition: types.hpp:972
std::optional< Decimal > premium
Premium.
Definition: types.hpp:1002
std::optional< Decimal > effective_leverage
Effective leverage.
Definition: types.hpp:1014
std::optional< Decimal > turnover_rate
Turnover rate.
Definition: types.hpp:966
std::optional< Decimal > upper_strike_price
Upper bound price.
Definition: types.hpp:994
std::optional< Decimal > rho
Rho.
Definition: types.hpp:1032
std::optional< Decimal > dividend_ratio_ttm
Dividend ratio (TTM)
Definition: types.hpp:980
std::optional< Decimal > gamma
Gamma.
Definition: types.hpp:1026
std::optional< Decimal > change_value
Change value.
Definition: types.hpp:956
std::optional< Decimal > total_market_value
Total market value.
Definition: types.hpp:968
std::optional< Decimal > to_call_price
Price interval from the call price.
Definition: types.hpp:1012
std::optional< Decimal > five_minutes_change_rate
Five minutes change ratio.
Definition: types.hpp:988
std::optional< Decimal > pb_ratio
PB.
Definition: types.hpp:978
Security depth.
Definition: types.hpp:651
std::vector< Depth > asks
Ask depth.
Definition: types.hpp:653
std::vector< Depth > bids
Bid depth.
Definition: types.hpp:655
Security.
Definition: types.hpp:328
std::string name_hk
Security name (zh-HK)
Definition: types.hpp:336
std::string symbol
Security code.
Definition: types.hpp:330
std::string name_cn
Security name (zh-CN)
Definition: types.hpp:332
std::string name_en
Security name (en)
Definition: types.hpp:334
Quote of securitity.
Definition: types.hpp:424
Decimal last_done
Latest price.
Definition: types.hpp:428
Decimal turnover
Turnover.
Definition: types.hpp:442
Decimal prev_close
Yesterday's close.
Definition: types.hpp:430
std::string symbol
Security code.
Definition: types.hpp:426
TradeStatus trade_status
Security trading status.
Definition: types.hpp:444
Decimal high
High.
Definition: types.hpp:434
std::optional< PrePostQuote > post_market_quote
Quote of US post market.
Definition: types.hpp:448
std::optional< PrePostQuote > pre_market_quote
Quote of US pre market.
Definition: types.hpp:446
int64_t volume
Volume.
Definition: types.hpp:440
std::optional< PrePostQuote > overnight_quote
Quote of US overnight market.
Definition: types.hpp:450
int64_t timestamp
Time of latest price.
Definition: types.hpp:438
Decimal open
Open.
Definition: types.hpp:432
Decimal low
Low.
Definition: types.hpp:436
The basic information of securities.
Definition: types.hpp:341
std::string currency
Trading currency.
Definition: types.hpp:353
int64_t hk_shares
HK shares (only HK stocks)
Definition: types.hpp:361
std::string symbol
Security code.
Definition: types.hpp:343
std::string name_cn
Security name (zh-CN)
Definition: types.hpp:345
int64_t total_shares
Total shares.
Definition: types.hpp:357
Decimal eps
Earnings per share.
Definition: types.hpp:363
std::string name_hk
Security name (zh-HK)
Definition: types.hpp:349
Decimal eps_ttm
Earnings per share (TTM)
Definition: types.hpp:365
Decimal dividend_yield
Dividend yield.
Definition: types.hpp:369
SecurityBoard board
Board.
Definition: types.hpp:373
std::string exchange
Exchange which the security belongs to.
Definition: types.hpp:351
int32_t lot_size
Lot size.
Definition: types.hpp:355
DerivativeType stock_derivatives
Types of supported derivatives.
Definition: types.hpp:371
int64_t circulating_shares
Circulating shares.
Definition: types.hpp:359
std::string name_en
Security name (en)
Definition: types.hpp:347
Decimal bps
Net assets per share.
Definition: types.hpp:367
Strike price info.
Definition: types.hpp:698
std::string put_symbol
Security code of put option.
Definition: types.hpp:704
Decimal price
Strike price.
Definition: types.hpp:700
bool standard
Is standard.
Definition: types.hpp:706
std::string call_symbol
Security code of call option.
Definition: types.hpp:702
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:532
TradeSession trade_session
Definition: types.hpp:538
Decimal price
Definition: types.hpp:533
int64_t timestamp
Definition: types.hpp:535
std::string trade_type
Definition: types.hpp:536
int64_t volume
Definition: types.hpp:534
TradeDirection direction
Definition: types.hpp:537
Definition: types.hpp:723
Time end_time
End trading time.
Definition: types.hpp:727
Time begin_time
Being trading time.
Definition: types.hpp:725
TradeSession trade_session
Trading session.
Definition: types.hpp:729
An request for update watchlist group.
Definition: types.hpp:829
int64_t id
Group id.
Definition: types.hpp:831
std::optional< std::vector< std::string > > securities
Securities.
Definition: types.hpp:835
std::optional< std::string > name
Group name.
Definition: types.hpp:833
SecuritiesUpdateMode mode
Securities Update Mode.
Definition: types.hpp:837
Warrant info.
Definition: types.hpp:1128
std::optional< Decimal > conversion_ratio
Conversion ratio.
Definition: types.hpp:1174
std::string name
Security name.
Definition: types.hpp:1134
std::optional< Decimal > to_call_price
Price interval from the call price.
Definition: types.hpp:1168
std::optional< Decimal > upper_strike_price
Upper strike price.
Definition: types.hpp:1150
WarrantType warrant_type
Warrant type.
Definition: types.hpp:1132
std::string symbol
Security code.
Definition: types.hpp:1130
int64_t volume
Volume.
Definition: types.hpp:1142
Decimal turnover
Turnover.
Definition: types.hpp:1144
Date expiry_date
Expiry date.
Definition: types.hpp:1146
std::optional< Decimal > implied_volatility
Implied volatility.
Definition: types.hpp:1162
Decimal change_value
Quote change.
Definition: types.hpp:1140
std::optional< Decimal > delta
Delta.
Definition: types.hpp:1164
std::optional< Decimal > balance_point
Breakeven point.
Definition: types.hpp:1176
std::optional< Decimal > call_price
Call price.
Definition: types.hpp:1166
int64_t outstanding_qty
Outstanding quantity.
Definition: types.hpp:1154
Decimal change_rate
Quote change rate.
Definition: types.hpp:1138
WarrantStatus status
Status.
Definition: types.hpp:1178
Decimal leverage_ratio
Leverage ratio.
Definition: types.hpp:1172
Decimal last_done
Latest price.
Definition: types.hpp:1136
std::optional< Decimal > itm_otm
In/out of the bound.
Definition: types.hpp:1160
Decimal premium
Premium.
Definition: types.hpp:1158
std::optional< Decimal > strike_price
Strike price.
Definition: types.hpp:1148
std::optional< Decimal > effective_leverage
Effective leverage.
Definition: types.hpp:1170
std::optional< Decimal > lower_strike_price
Lower strike price.
Definition: types.hpp:1152
Decimal outstanding_ratio
Outstanding ratio.
Definition: types.hpp:1156
Quote of warrant.
Definition: types.hpp:603
Decimal strike_price
Strike price.
Definition: types.hpp:638
Date expiry_date
Exprity date.
Definition: types.hpp:626
Decimal open
Open.
Definition: types.hpp:610
Decimal turnover
Turnover.
Definition: types.hpp:620
int64_t volume
Volume.
Definition: types.hpp:618
WarrantType category
Warrant type.
Definition: types.hpp:636
Decimal low
Low.
Definition: types.hpp:614
TradeStatus trade_status
Security trading status.
Definition: types.hpp:622
Decimal upper_strike_price
Upper bound price.
Definition: types.hpp:640
int64_t outstanding_quantity
Outstanding quantity.
Definition: types.hpp:632
Decimal prev_close
Yesterday's close.
Definition: types.hpp:608
int64_t timestamp
Time of latest price.
Definition: types.hpp:616
Date last_trade_date
Last tradalbe date.
Definition: types.hpp:628
std::string symbol
Security code.
Definition: types.hpp:604
Decimal high
High.
Definition: types.hpp:612
Decimal lower_strike_price
Lower bound price.
Definition: types.hpp:642
Decimal last_done
Latest price.
Definition: types.hpp:606
Decimal conversion_ratio
Conversion ratio.
Definition: types.hpp:634
Decimal implied_volatility
Implied volatility.
Definition: types.hpp:624
Decimal outstanding_ratio
Outstanding ratio.
Definition: types.hpp:630
std::string underlying_symbol
Underlying security symbol of the warrant.
Definition: types.hpp:646
Decimal call_price
Call price.
Definition: types.hpp:644
Watchlist group.
Definition: types.hpp:798
int64_t id
Group id.
Definition: types.hpp:800
std::vector< WatchlistSecurity > securities
Securities.
Definition: types.hpp:804
std::string name
Group name.
Definition: types.hpp:802
Watchlist security.
Definition: types.hpp:783
std::string symbol
Security symbol.
Definition: types.hpp:785
std::optional< Decimal > watched_price
Watched price.
Definition: types.hpp:791
std::string name
Security name.
Definition: types.hpp:789
int64_t watched_at
Watched time.
Definition: types.hpp:793
Market market
Market.
Definition: types.hpp:787
Account balance.
Definition: types.hpp:1703
Decimal total_cash
Total cash.
Definition: types.hpp:1705
Decimal max_finance_amount
Maximum financing amount.
Definition: types.hpp:1707
std::vector< FrozenTransactionFee > frozen_transaction_fees
Frozen transaction fees.
Definition: types.hpp:1727
Decimal maintenance_margin
Maintenance margin.
Definition: types.hpp:1723
Decimal net_assets
Net assets.
Definition: types.hpp:1719
Decimal init_margin
Initial margin.
Definition: types.hpp:1721
std::string currency
Currency.
Definition: types.hpp:1715
Decimal buy_power
Buy power.
Definition: types.hpp:1725
Decimal margin_call
Margin call.
Definition: types.hpp:1713
Decimal remaining_finance_amount
Remaining financing amount.
Definition: types.hpp:1709
int32_t risk_level
Risk control level.
Definition: types.hpp:1711
std::vector< CashInfo > cash_infos
Cash details.
Definition: types.hpp:1717
Cash flow.
Definition: types.hpp:1756
std::optional< std::string > symbol
Associated Stock code information.
Definition: types.hpp:1770
std::string transaction_flow_name
Cash flow name.
Definition: types.hpp:1758
std::string description
Cash flow description.
Definition: types.hpp:1772
int64_t business_time
Business time.
Definition: types.hpp:1768
CashFlowDirection direction
Outflow direction.
Definition: types.hpp:1760
Decimal balance
Cash amount.
Definition: types.hpp:1764
BalanceType business_type
Balance type.
Definition: types.hpp:1762
std::string currency
Cash currency.
Definition: types.hpp:1766
Cash info.
Definition: types.hpp:1681
Decimal frozen_cash
Frozen cash.
Definition: types.hpp:1687
Decimal settling_cash
Cash to be settled.
Definition: types.hpp:1689
Decimal withdraw_cash
Withdraw cash.
Definition: types.hpp:1683
Decimal available_cash
Available cash.
Definition: types.hpp:1685
std::string currency
Currency.
Definition: types.hpp:1691
Options for estimate maximum purchase quantity.
Definition: types.hpp:2057
std::string symbol
Security code.
Definition: types.hpp:2059
OrderType order_type
Order type.
Definition: types.hpp:2061
bool fractional_shares
Get the maximum fractional share buying power.
Definition: types.hpp:2072
std::optional< Decimal > price
Estimated order price.
Definition: types.hpp:2065
OrderSide side
Order side.
Definition: types.hpp:2063
std::optional< std::string > currency
Settlement currency.
Definition: types.hpp:2067
std::optional< std::string > order_id
Definition: types.hpp:2070
Response for estimate maximum purchase quantity.
Definition: types.hpp:2077
Decimal margin_max_qty
Margin available quantity.
Definition: types.hpp:2081
Decimal cash_max_qty
Cash available quantity.
Definition: types.hpp:2079
Exexution.
Definition: types.hpp:1279
Decimal price
Definition: types.hpp:1285
Decimal quantity
Definition: types.hpp:1284
std::string trade_id
Definition: types.hpp:1281
std::string symbol
Definition: types.hpp:1282
std::string order_id
Definition: types.hpp:1280
int64_t trade_done_at
Definition: types.hpp:1283
Frozen transaction fee.
Definition: types.hpp:1696
std::string currency
Definition: types.hpp:1697
Decimal frozen_transaction_fee
Definition: types.hpp:1698
Fund position channel.
Definition: types.hpp:1827
std::string account_channel
Account type.
Definition: types.hpp:1829
std::vector< FundPosition > positions
Fund positions.
Definition: types.hpp:1831
Fund position.
Definition: types.hpp:1808
Decimal holding_units
Holding units.
Definition: types.hpp:1822
std::string currency
Currency.
Definition: types.hpp:1818
std::string symbol_name
Fund name.
Definition: types.hpp:1816
Decimal current_net_asset_value
Current equity.
Definition: types.hpp:1812
int64_t net_asset_value_day
Current equity time.
Definition: types.hpp:1814
Decimal cost_net_asset_value
Net cost.
Definition: types.hpp:1820
std::string symbol
Fund ISIN code.
Definition: types.hpp:1810
Fund positions response.
Definition: types.hpp:1836
std::vector< FundPositionChannel > channels
Channels.
Definition: types.hpp:1838
Options for submit order request.
Definition: types.hpp:1777
int64_t end_at
End time.
Definition: types.hpp:1781
std::optional< uintptr_t > page
Page number.
Definition: types.hpp:1787
int64_t start_at
Start time.
Definition: types.hpp:1779
std::optional< uintptr_t > size
Page size.
Definition: types.hpp:1789
std::optional< BalanceType > business_type
Business type.
Definition: types.hpp:1783
std::optional< std::string > symbol
Security symbol.
Definition: types.hpp:1785
Options for get fund positions request.
Definition: types.hpp:1794
std::optional< std::vector< std::string > > symbols
Fund symbols.
Definition: types.hpp:1796
Options for get history executions request.
Definition: types.hpp:1290
std::optional< std::string > symbol
Security code.
Definition: types.hpp:1296
std::optional< int64_t > end_at
End time.
Definition: types.hpp:1294
std::optional< int64_t > start_at
Start time.
Definition: types.hpp:1292
Options for get history orders request.
Definition: types.hpp:1577
std::optional< int64_t > end_at
End time.
Definition: types.hpp:1589
std::optional< OrderSide > side
Order side.
Definition: types.hpp:1583
std::optional< Market > market
Market.
Definition: types.hpp:1585
std::optional< std::string > symbol
Security symbol.
Definition: types.hpp:1579
std::optional< std::vector< OrderStatus > > status
Order status.
Definition: types.hpp:1581
std::optional< int64_t > start_at
Start time.
Definition: types.hpp:1587
Options for get stock positions request.
Definition: types.hpp:1801
std::optional< std::vector< std::string > > symbols
Stock symbols.
Definition: types.hpp:1803
Options for get today executions request.
Definition: types.hpp:1301
std::optional< std::string > order_id
Order id.
Definition: types.hpp:1305
std::optional< std::string > symbol
Security code.
Definition: types.hpp:1303
Options for get today orders request.
Definition: types.hpp:1594
std::optional< std::string > symbol
Security symbol.
Definition: types.hpp:1596
std::optional< std::string > order_id
Order id.
Definition: types.hpp:1604
std::optional< std::vector< OrderStatus > > status
Order status.
Definition: types.hpp:1598
std::optional< Market > market
Market.
Definition: types.hpp:1602
std::optional< OrderSide > side
Order side.
Definition: types.hpp:1600
Margin ratio.
Definition: types.hpp:1881
Decimal mm_factor
Maintain the initial margin ratio.
Definition: types.hpp:1885
Decimal im_factor
Initial margin ratio.
Definition: types.hpp:1883
Decimal fm_factor
Forced close-out margin ratio.
Definition: types.hpp:1887
Order charge detail.
Definition: types.hpp:1961
std::string currency
Settlement currency.
Definition: types.hpp:1965
std::vector< OrderChargeItem > items
Order charge items.
Definition: types.hpp:1967
Decimal total_amount
Total charges amount.
Definition: types.hpp:1963
Order charge fee.
Definition: types.hpp:1937
Decimal amount
Charge amount.
Definition: types.hpp:1943
std::string currency
Charge currency.
Definition: types.hpp:1945
std::string code
Charge code.
Definition: types.hpp:1939
std::string name
Charge name.
Definition: types.hpp:1941
Order charge item.
Definition: types.hpp:1950
std::string name
Charge category name.
Definition: types.hpp:1954
std::vector< OrderChargeFee > fees
Charge details.
Definition: types.hpp:1956
ChargeCategoryCode code
Charge category code.
Definition: types.hpp:1952
Order detail.
Definition: types.hpp:1972
int64_t submitted_at
Submitted time.
Definition: types.hpp:1988
std::optional< std::string > free_currency
Commission-free currency.
Definition: types.hpp:2036
std::optional< TriggerStatus > trigger_status
Conditional order trigger status.
Definition: types.hpp:2018
std::optional< OutsideRTH > outside_rth
Enable or disable outside regular trading hours.
Definition: types.hpp:2022
Decimal quantity
Submitted quantity.
Definition: types.hpp:1980
std::optional< std::string > deductions_currency
Deduction currency.
Definition: types.hpp:2042
std::string currency
Currency.
Definition: types.hpp:2020
OrderStatus status
Order status.
Definition: types.hpp:1976
std::optional< int32_t > trigger_count
Trigger count.
Definition: types.hpp:2026
OrderSide side
Order side.
Definition: types.hpp:1990
std::optional< Decimal > last_done
Last done.
Definition: types.hpp:1996
std::optional< Decimal > monitor_price
Monitor price.
Definition: types.hpp:2028
std::string msg
Rejected Message or remark.
Definition: types.hpp:2000
std::optional< int64_t > updated_at
Last updated time.
Definition: types.hpp:2008
std::optional< Decimal > platform_deducted_amount
Platform deduction amount.
Definition: types.hpp:2046
CommissionFreeStatus free_status
Commission-free Status.
Definition: types.hpp:2032
std::optional< int32_t > limit_depth_level
Limit depth level.
Definition: types.hpp:2024
std::string remark
Remark.
Definition: types.hpp:2030
OrderTag tag
Order tag.
Definition: types.hpp:2002
std::string order_id
Order ID.
Definition: types.hpp:1974
std::optional< Date > expire_date
Long term order expire date.
Definition: types.hpp:2006
std::optional< int64_t > trigger_at
Conditional order trigger time.
Definition: types.hpp:2010
std::optional< Decimal > free_amount
Commission-free amount.
Definition: types.hpp:2034
DeductionStatus deductions_status
Deduction status.
Definition: types.hpp:2038
std::string symbol
Security code.
Definition: types.hpp:1992
OrderChargeDetail charge_detail
Order charges.
Definition: types.hpp:2052
std::optional< Decimal > trigger_price
LIT / MIT Order Trigger Price
Definition: types.hpp:1998
std::string stock_name
Stock name.
Definition: types.hpp:1978
OrderType order_type
Order type.
Definition: types.hpp:1994
DeductionStatus platform_deducted_status
Platform fee deduction status.
Definition: types.hpp:2044
std::optional< Decimal > limit_offset
TSLPAMT / TSLPPCT order limit offset amount
Definition: types.hpp:2016
std::optional< Decimal > deductions_amount
Deduction amount.
Definition: types.hpp:2040
TimeInForceType time_in_force
Time in force type.
Definition: types.hpp:2004
std::optional< Decimal > trailing_percent
TSMPCT / TSLPPCT order trailing percent
Definition: types.hpp:2014
Decimal executed_quantity
Executed quantity.
Definition: types.hpp:1982
std::optional< Decimal > price
Submitted price.
Definition: types.hpp:1984
std::vector< OrderHistoryDetail > history
Order history details.
Definition: types.hpp:2050
std::optional< std::string > platform_deducted_currency
Platform deduction currency.
Definition: types.hpp:2048
std::optional< Decimal > executed_price
Executed price.
Definition: types.hpp:1986
std::optional< Decimal > trailing_amount
TSMAMT / TSLPAMT order trailing amount
Definition: types.hpp:2012
Order history detail.
Definition: types.hpp:1920
Decimal quantity
Definition: types.hpp:1926
Decimal price
Definition: types.hpp:1923
std::string msg
Execution or error message.
Definition: types.hpp:1930
OrderStatus status
Order status.
Definition: types.hpp:1928
int64_t time
Occurrence time.
Definition: types.hpp:1932
Order.
Definition: types.hpp:1459
Decimal quantity
Submitted quantity.
Definition: types.hpp:1467
int64_t submitted_at
Submitted time.
Definition: types.hpp:1475
std::optional< Decimal > trailing_amount
TSMAMT / TSLPAMT order trailing amount
Definition: types.hpp:1499
OrderTag tag
Order tag.
Definition: types.hpp:1489
std::optional< Decimal > trigger_price
LIT / MIT Order Trigger Price
Definition: types.hpp:1485
OrderStatus status
Order status.
Definition: types.hpp:1463
std::string currency
Currency.
Definition: types.hpp:1507
TimeInForceType time_in_force
Time in force type.
Definition: types.hpp:1491
std::optional< Decimal > monitor_price
Monitor price.
Definition: types.hpp:1515
std::string stock_name
Stock name.
Definition: types.hpp:1465
std::optional< Date > expire_date
Long term order expire date.
Definition: types.hpp:1493
OrderSide side
Order side.
Definition: types.hpp:1477
std::optional< Decimal > executed_price
Executed price.
Definition: types.hpp:1473
std::string symbol
Security code.
Definition: types.hpp:1479
std::optional< Decimal > price
Submitted price.
Definition: types.hpp:1471
std::optional< Decimal > trailing_percent
TSMPCT / TSLPPCT order trailing percent
Definition: types.hpp:1501
std::string msg
Rejected Message or remark.
Definition: types.hpp:1487
std::optional< TriggerStatus > trigger_status
Conditional order trigger status.
Definition: types.hpp:1505
std::optional< Decimal > last_done
Last done.
Definition: types.hpp:1483
std::string order_id
Order ID.
Definition: types.hpp:1461
std::optional< int64_t > updated_at
Last updated time.
Definition: types.hpp:1495
std::optional< OutsideRTH > outside_rth
Enable or disable outside regular trading hours.
Definition: types.hpp:1509
OrderType order_type
Order type.
Definition: types.hpp:1481
std::optional< int32_t > limit_depth_level
Limit depth level.
Definition: types.hpp:1511
std::string remark
Remark.
Definition: types.hpp:1517
Decimal executed_quantity
Executed quantity.
Definition: types.hpp:1469
std::optional< Decimal > limit_offset
TSLPAMT / TSLPPCT order limit offset amount
Definition: types.hpp:1503
std::optional< int64_t > trigger_at
Conditional order trigger time.
Definition: types.hpp:1497
std::optional< int32_t > trigger_count
Trigger count.
Definition: types.hpp:1513
Order changed message.
Definition: types.hpp:1522
std::string order_id
Order ID.
Definition: types.hpp:1540
Decimal submitted_quantity
Submitted quantity.
Definition: types.hpp:1528
int64_t submitted_at
Submitted time.
Definition: types.hpp:1546
std::optional< Decimal > trailing_percent
Trailing percent.
Definition: types.hpp:1562
std::optional< Decimal > trailing_amount
Trailing amount.
Definition: types.hpp:1560
std::string currency
Currency.
Definition: types.hpp:1542
std::optional< Decimal > executed_price
Executed price.
Definition: types.hpp:1538
std::string stock_name
Stock name.
Definition: types.hpp:1526
std::optional< Decimal > trigger_price
Order trigger price.
Definition: types.hpp:1550
OrderType order_type
Order type.
Definition: types.hpp:1532
std::optional< Decimal > last_price
Last price.
Definition: types.hpp:1570
std::optional< TriggerStatus > trigger_status
Conditional order trigger status.
Definition: types.hpp:1556
Decimal executed_quantity
Executed quantity.
Definition: types.hpp:1536
std::string msg
Rejected message or remark.
Definition: types.hpp:1552
int64_t updated_at
Last updated time.
Definition: types.hpp:1548
OrderSide side
Order side.
Definition: types.hpp:1524
std::optional< Decimal > limit_offset
Limit offset amount.
Definition: types.hpp:1564
OrderStatus status
Order status.
Definition: types.hpp:1544
std::string remark
Remark message.
Definition: types.hpp:1572
Decimal submitted_price
Submitted price.
Definition: types.hpp:1534
OrderTag tag
Order tag.
Definition: types.hpp:1554
std::optional< int64_t > trigger_at
Conditional order trigger time.
Definition: types.hpp:1558
std::string symbol
Order symbol.
Definition: types.hpp:1530
std::optional< Decimal > last_share
Last share.
Definition: types.hpp:1568
std::string account_no
Account no.
Definition: types.hpp:1566
Options for replace order request.
Definition: types.hpp:1609
std::string order_id
Order ID.
Definition: types.hpp:1611
std::optional< int32_t > limit_depth_level
Limit depth level.
Definition: types.hpp:1625
std::optional< Decimal > monitor_price
Monitor price.
Definition: types.hpp:1629
std::optional< Decimal > price
Price.
Definition: types.hpp:1615
std::optional< Decimal > trigger_price
Trigger price.
Definition: types.hpp:1617
Decimal quantity
Quantity.
Definition: types.hpp:1613
std::optional< int32_t > trigger_count
Trigger count.
Definition: types.hpp:1627
std::optional< Decimal > trailing_percent
Trailing percent.
Definition: types.hpp:1623
std::optional< Decimal > trailing_amount
Trailing amount.
Definition: types.hpp:1621
std::optional< Decimal > limit_offset
Limit offset.
Definition: types.hpp:1619
std::optional< std::string > remark
Remark.
Definition: types.hpp:1631
Stock position channel.
Definition: types.hpp:1865
std::string account_channel
Account type.
Definition: types.hpp:1867
std::vector< StockPosition > positions
Stock positions.
Definition: types.hpp:1869
Stock position.
Definition: types.hpp:1843
std::optional< Decimal > init_quantity
Initial position before market opening.
Definition: types.hpp:1860
Decimal quantity
The number of holdings.
Definition: types.hpp:1849
std::string symbol
Stock code.
Definition: types.hpp:1845
std::string symbol_name
Stock name.
Definition: types.hpp:1847
Decimal available_quantity
Available quantity.
Definition: types.hpp:1851
Decimal cost_price
Definition: types.hpp:1856
Market market
Market.
Definition: types.hpp:1858
std::string currency
Currency.
Definition: types.hpp:1853
Stock positions response.
Definition: types.hpp:1874
std::vector< StockPositionChannel > channels
Channels.
Definition: types.hpp:1876
Options for submit order request.
Definition: types.hpp:1636
std::optional< Decimal > trailing_percent
Trailing percent (TSLPPCT / TSMAPCT Required)
Definition: types.hpp:1656
std::optional< int32_t > limit_depth_level
Limit depth level.
Definition: types.hpp:1663
std::optional< int32_t > trigger_count
Trigger count.
Definition: types.hpp:1665
OrderType order_type
Order type.
Definition: types.hpp:1640
TimeInForceType time_in_force
Time in force type.
Definition: types.hpp:1646
std::optional< std::string > remark
Remark (Maximum 64 characters)
Definition: types.hpp:1669
OrderSide side
Order side.
Definition: types.hpp:1642
std::optional< Decimal > limit_offset
Limit offset amount (TSLPAMT / TSLPPCT Required)
Definition: types.hpp:1652
std::optional< Decimal > submitted_price
Submitted price.
Definition: types.hpp:1648
std::optional< Decimal > trailing_amount
Trailing amount (TSLPAMT / TSMAMT Required)
Definition: types.hpp:1654
std::string symbol
Security symbol.
Definition: types.hpp:1638
std::optional< Decimal > monitor_price
Monitor price.
Definition: types.hpp:1667
std::optional< Decimal > trigger_price
Trigger price (LIT / MIT Required)
Definition: types.hpp:1650
std::optional< OutsideRTH > outside_rth
Enable or disable outside regular trading hours.
Definition: types.hpp:1661
std::optional< Date > expire_date
Definition: types.hpp:1659
Decimal submitted_quantity
Submitted price.
Definition: types.hpp:1644
Response for submit order request.
Definition: types.hpp:1674
std::string order_id
Order id.
Definition: types.hpp:1676