Longbridge OpenAPI C++ SDK
types.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 #include "decimal.hpp"
4 #include <map>
5 #include <optional>
6 #include <vector>
7 
8 namespace longbridge {
9 
10 struct Date
11 {
12  int32_t year;
13  uint8_t month;
14  uint8_t day;
15 };
16 
17 struct Time
18 {
19  uint8_t hour;
20  uint8_t minute;
21  uint8_t second;
22 };
23 
24 struct DateTime
25 {
28 };
29 
31 enum class Language
32 {
34  ZH_CN,
36  ZH_HK,
38  EN,
39 };
40 
43 {
45  Realtime,
47  Confirmed,
48 };
49 
51 enum class Market
52 {
54  Unknown,
56  US,
58  HK,
60  CN,
62  SG,
64  Crypto,
65 };
66 
67 namespace quote {
68 
69 enum class TradeStatus;
70 
72 class SubFlags
73 {
74 private:
75  uint8_t value_;
76 
77 public:
78  inline SubFlags(uint8_t value) { value_ = value; }
79 
80  inline operator uint8_t() const { return value_; }
81 
82  inline SubFlags operator|(const SubFlags& other) const
83  {
84  return SubFlags(value_ | other.value_);
85  }
86 
87  inline SubFlags& operator|=(const SubFlags& other)
88  {
89  value_ |= other.value_;
90  return *this;
91  }
92 
93  inline SubFlags operator&(const SubFlags& other) const
94  {
95  return SubFlags(value_ & other.value_);
96  }
97 
98  inline SubFlags& operator&=(const SubFlags& other)
99  {
100  value_ &= other.value_;
101  return *this;
102  }
103 
104  inline bool operator==(const SubFlags& other) const
105  {
106  return value_ == other.value_;
107  }
108 
109  inline bool contains(const SubFlags& other) const
110  {
111  return (value_ & other.value_) > 0;
112  }
113 
114  static SubFlags QUOTE();
115  static SubFlags DEPTH();
116  static SubFlags BROKER();
117  static SubFlags TRADE();
118 };
119 
122 {
123  uint8_t value;
124 
125  bool has_option();
126  bool has_warrant();
127 };
128 
130 enum class Period
131 {
133  Unknown,
135  Min1,
137  Min2,
139  Min3,
141  Min5,
143  Min10,
145  Min15,
147  Min20,
149  Min30,
151  Min45,
153  Min60,
155  Min120,
157  Min180,
159  Min240,
161  Day,
163  Week,
165  Month,
167  Quarter,
169  Year,
170 };
171 
174 {
176  std::string symbol;
180  std::vector<Period> candlesticks;
181 };
182 
184 enum class TradeSession
185 {
187  Intraday,
189  Pre,
191  Post,
193  Overnight,
194 };
195 
197 struct PushQuote
198 {
200  std::string symbol;
210  int64_t timestamp;
212  int64_t volume;
220  int64_t current_volume;
223 };
224 
225 struct Depth
226 {
228  int32_t position;
230  std::optional<Decimal> price;
232  int64_t volume;
234  int64_t order_num;
235 };
236 
238 struct PushDepth
239 {
241  std::string symbol;
243  std::vector<Depth> asks;
245  std::vector<Depth> bids;
246 };
247 
249 struct Brokers
250 {
252  int32_t position;
254  std::vector<int32_t> broker_ids;
255 };
256 
259 {
261  std::string symbol;
263  std::vector<Brokers> ask_brokers;
265  std::vector<Brokers> bid_brokers;
266 };
267 
269 enum class SecurityBoard
270 {
272  Unknown,
274  USMain,
276  USPink,
278  USDJI,
280  USNSDQ,
282  USSector,
284  USOption,
286  USOptionS,
288  HKEquity,
290  HKPreIPO,
292  HKWarrant,
294  HKHS,
296  HKSector,
302  SHSTAR,
304  CNIX,
306  CNSector,
312  SZGEMConnect,
316  SGMain,
318  STI,
320  SGSector,
322  SPXIndex,
324  VIXIndex,
325 };
326 
328 struct Security
329 {
331  std::string symbol;
333  std::string name_cn;
335  std::string name_en;
337  std::string name_hk;
338 };
339 
342 {
344  std::string symbol;
346  std::string name_cn;
348  std::string name_en;
350  std::string name_hk;
352  std::string exchange;
354  std::string currency;
356  int32_t lot_size;
358  int64_t total_shares;
362  int64_t hk_shares;
375 };
376 
378 enum class TradeStatus
379 {
381  Normal,
383  Halted,
385  Delisted,
387  Fuse,
389  PrepareList,
391  CodeMoved,
393  ToBeOpened,
397  Expired,
401  SuspendTrade,
402 };
403 
406 {
410  int64_t timestamp;
412  int64_t volume;
421 };
422 
425 {
427  std::string symbol;
439  int64_t timestamp;
441  int64_t volume;
447  std::optional<PrePostQuote> pre_market_quote;
449  std::optional<PrePostQuote> post_market_quote;
451  std::optional<PrePostQuote> overnight_quote;
452 };
453 
455 enum class OptionType
456 {
458  Unknown,
460  American,
462  Europe,
463 };
464 
466 enum class OptionDirection
467 {
469  Unknown,
471  Put,
473  Call,
474 };
475 
478 {
480  Unknown,
482  Monthly,
484  Weekly,
486  Quarterly,
487 };
488 
492 {
494  Unknown,
496  Normal,
498  Old,
499 };
500 
503 {
504  std::string symbol;
516  int64_t timestamp;
518  int64_t volume;
526  int64_t open_interest;
542  std::string underlying_symbol;
543 };
544 
546 enum class TradeDirection
547 {
549  Neutral,
551  Down,
553  Up
554 };
555 
557 struct Trade
558 {
560  int64_t volume;
561  int64_t timestamp;
562  std::string trade_type;
565 };
566 
569 {
571  std::string symbol;
573  std::vector<Trade> trades;
574 };
575 
578 {
588  int64_t volume;
592  int64_t timestamp;
595 };
596 
599 {
601  std::string symbol;
608 };
609 
611 enum class WarrantType
612 {
614  Unknown,
616  Call,
618  Put,
620  Bull,
622  Bear,
624  Inline
625 };
626 
629 {
630  std::string symbol;
642  int64_t timestamp;
644  int64_t volume;
672  std::string underlying_symbol;
673 };
674 
677 {
679  std::vector<Depth> asks;
681  std::vector<Depth> bids;
682 };
683 
686 {
688  std::vector<Brokers> ask_brokers;
690  std::vector<Brokers> bid_brokers;
691 };
692 
694 {
696  std::vector<int32_t> broker_ids;
698  std::string name_cn;
700  std::string name_en;
702  std::string name_hk;
703 };
704 
707 {
709  int64_t timestamp;
710  int64_t volume;
713 };
714 
716 enum class AdjustType
717 {
718  NoAdjust,
720 };
721 
727 {
729  std::string symbol;
743  int32_t days_to_expiry;
744 };
745 
748 {
750  int32_t issuer_id;
752  std::string name_cn;
754  std::string name_en;
756  std::string name_hk;
757 };
758 
760 {
767 };
768 
771 {
775  std::vector<TradingSessionInfo> trade_session;
776 };
777 
780 {
782  std::vector<Date> trading_days;
784  std::vector<Date> half_trading_days;
785 };
786 
789 {
793  int64_t timestamp;
794 };
795 
798 {
805 };
806 
809 {
811  int64_t timestamp;
816 };
817 
820 {
822  std::string symbol;
826  std::string name;
828  std::optional<Decimal> watched_price;
830  int64_t watched_at;
831 };
832 
835 {
837  int64_t id;
839  std::string name;
841  std::vector<WatchlistSecurity> securities;
842 };
843 
846 {
848  Add,
850  Remove,
852  Replace,
853 };
854 
857 {
859  std::string name;
861  std::vector<std::string> securities;
862 };
863 
866 {
868  int64_t id;
870  std::optional<std::string> name;
872  std::optional<std::vector<std::string>> securities;
875 };
876 
879 {
881  std::string symbol;
891  int64_t timestamp;
893  int64_t volume;
898 };
899 
901 enum class CalcIndex
902 {
904  LastDone,
906  ChangeValue,
908  ChangeRate,
910  Volume,
912  Turnover,
916  TurnoverRate,
920  CapitalFlow,
922  Amplitude,
924  VolumeRatio,
926  PeTtmRatio,
928  PbRatio,
940  ExpiryDate,
942  StrikePrice,
952  Premium,
954  ItmOtm,
958  WarrantDelta,
960  CallPrice,
962  ToCallPrice,
970  BalancePoint,
972  OpenInterest,
974  Delta,
976  Gamma,
978  Theta,
980  Vega,
982  Rho,
983 };
984 
987 {
989  std::string symbol;
991  std::optional<Decimal> last_done;
993  std::optional<Decimal> change_value;
995  std::optional<Decimal> change_rate;
997  std::optional<int64_t> volume;
999  std::optional<Decimal> turnover;
1001  std::optional<Decimal> ytd_change_rate;
1003  std::optional<Decimal> turnover_rate;
1005  std::optional<Decimal> total_market_value;
1007  std::optional<Decimal> capital_flow;
1009  std::optional<Decimal> amplitude;
1011  std::optional<Decimal> volume_ratio;
1013  std::optional<Decimal> pe_ttm_ratio;
1015  std::optional<Decimal> pb_ratio;
1017  std::optional<Decimal> dividend_ratio_ttm;
1019  std::optional<Decimal> five_day_change_rate;
1021  std::optional<Decimal> ten_day_change_rate;
1023  std::optional<Decimal> half_year_change_rate;
1025  std::optional<Decimal> five_minutes_change_rate;
1027  std::optional<Date> expiry_date;
1029  std::optional<Decimal> strike_price;
1031  std::optional<Decimal> upper_strike_price;
1033  std::optional<Decimal> lower_strike_price;
1035  std::optional<int64_t> outstanding_qty;
1037  std::optional<Decimal> outstanding_ratio;
1039  std::optional<Decimal> premium;
1041  std::optional<Decimal> itm_otm;
1043  std::optional<Decimal> implied_volatility;
1045  std::optional<Decimal> warrant_delta;
1047  std::optional<Decimal> call_price;
1049  std::optional<Decimal> to_call_price;
1051  std::optional<Decimal> effective_leverage;
1053  std::optional<Decimal> leverage_ratio;
1055  std::optional<Decimal> conversion_ratio;
1057  std::optional<Decimal> balance_point;
1059  std::optional<int64_t> open_interest;
1062  std::optional<Decimal> delta;
1065  std::optional<Decimal> gamma;
1069  std::optional<Decimal> theta;
1073  std::optional<Decimal> vega;
1077  std::optional<Decimal> rho;
1078 };
1079 
1081 enum class SortOrderType
1082 {
1084  Ascending,
1086  Descending,
1087 };
1088 
1090 enum class WarrantSortBy
1091 {
1093  LastDone,
1095  ChangeRate,
1097  ChangeValue,
1099  Volume,
1101  Turnover,
1103  ExpiryDate,
1105  StrikePrice,
1115  Premium,
1117  ItmOtm,
1121  Delta,
1123  CallPrice,
1125  ToCallPrice,
1129  LeverageRatio,
1133  BalancePoint,
1135  Status,
1136 };
1137 
1140 {
1142  LT_3,
1144  Between_3_6,
1146  Between_6_12,
1148  GT_12,
1149 };
1150 
1153 {
1155  In,
1157  Out,
1158 };
1159 
1161 enum class WarrantStatus
1162 {
1164  Unknown,
1166  Suspend,
1168  PrepareList,
1170  Normal,
1171 };
1172 
1175 {
1177  std::string symbol;
1181  std::string name;
1189  int64_t volume;
1196  std::optional<Date> expiry_date;
1198  std::optional<Decimal> strike_price;
1200  std::optional<Decimal> upper_strike_price;
1202  std::optional<Decimal> lower_strike_price;
1210  std::optional<Decimal> itm_otm;
1212  std::optional<Decimal> implied_volatility;
1214  std::optional<Decimal> delta;
1216  std::optional<Decimal> call_price;
1218  std::optional<Decimal> to_call_price;
1220  std::optional<Decimal> effective_leverage;
1224  std::optional<Decimal> conversion_ratio;
1226  std::optional<Decimal> balance_point;
1229 };
1230 
1233 {
1235  Overnight,
1236 };
1237 
1240 {
1242  std::string key;
1244  std::string name;
1246  std::string description;
1248  int64_t start_at;
1250  int64_t end_at;
1251 };
1252 
1254 enum class TradeSessions
1255 {
1257  Intraday,
1259  All,
1260 };
1261 
1264 {
1266  int32_t temperature;
1268  std::string description;
1270  int32_t valuation;
1272  int32_t sentiment;
1274  int64_t timestamp;
1275 };
1276 
1279 {
1288 };
1289 
1292 {
1296  std::vector<MarketTemperature> records;
1297 };
1298 
1301 {
1303  std::string id;
1305  std::string title;
1307  std::string description;
1309  std::string file_name;
1311  std::vector<std::string> file_urls;
1313  int64_t published_at;
1314 };
1315 
1318 {
1320  std::string timestamp;
1322  std::string rate;
1324  std::string close;
1330  std::string days_to_cover;
1332  std::string amount;
1334  std::string balance;
1336  std::string cost;
1337 };
1338 
1341 {
1343  std::vector<ShortPositionsItem> data;
1344 };
1345 
1348 {
1350  std::string timestamp;
1352  std::string rate;
1354  std::string close;
1356  std::string nus_amount;
1358  std::string ny_amount;
1360  std::string total_amount;
1362  std::string amount;
1364  std::string balance;
1365 };
1366 
1369 {
1371  std::vector<ShortTradesItem> data;
1372 };
1373 
1375 {
1376  std::string symbol;
1377  int64_t call_volume;
1378  int64_t put_volume;
1379 };
1380 
1382 {
1383  std::string symbol;
1385  int64_t call_volume;
1386  int64_t put_volume;
1389  int64_t total_volume;
1391  double pc_vol;
1392  double pc_oi;
1393 };
1394 
1396 {
1397  std::string symbol;
1398  std::vector<OptionVolumeDailyStat> stats;
1399 };
1400 
1401 } // namespace quote
1402 
1403 namespace trade {
1404 
1406 enum class TopicType
1407 {
1409  Private,
1410 };
1411 
1413 enum class OrderSide
1414 {
1416  Unknown,
1418  Buy,
1420  Sell,
1421 };
1422 
1425 {
1426  std::string order_id;
1427  std::string trade_id;
1428  std::string symbol;
1429  int64_t trade_done_at;
1434 };
1435 
1438 {
1440  std::optional<int64_t> start_at;
1442  std::optional<int64_t> end_at;
1444  std::optional<std::string> symbol;
1445 };
1446 
1449 {
1451  std::optional<std::string> symbol;
1453  std::optional<std::string> order_id;
1454 };
1455 
1458 {
1460  std::optional<std::string> symbol;
1462  std::optional<std::string> order_id;
1464  std::optional<int64_t> start_at;
1466  std::optional<int64_t> end_at;
1468  std::optional<uint64_t> page;
1469 };
1470 
1473 {
1475  bool has_more;
1477  std::vector<Execution> trades;
1478 };
1479 
1481 enum class OrderStatus
1482 {
1484  Unknown,
1486  NotReported,
1494  Filled,
1496  WaitToNew,
1498  New,
1500  WaitToReplace,
1504  Replaced,
1506  PartialFilled,
1508  WaitToCancel,
1510  PendingCancel,
1512  Rejected,
1514  Canceled,
1516  Expired,
1519 };
1520 
1522 enum class OrderType
1523 {
1525  Unknown,
1527  LO,
1529  ELO,
1531  MO,
1533  AO,
1535  ALO,
1537  ODD,
1539  LIT,
1541  MIT,
1543  TSLPAMT,
1545  TSLPPCT,
1547  TSMAMT,
1549  TSMPCT,
1551  SLO,
1552 };
1553 
1555 enum class OrderTag
1556 {
1558  Unknown,
1560  Normal,
1562  LongTerm,
1564  Grey,
1565 };
1566 
1569 {
1571  Unknown,
1573  Day,
1577  GoodTilDate,
1578 };
1579 
1581 enum class TriggerStatus
1582 {
1584  Unknown,
1586  Deactive,
1588  Active,
1590  Released,
1591 };
1592 
1594 enum class OutsideRTH
1595 {
1597  Unknown,
1599  RTHOnly,
1601  AnyTime,
1603  Overnight,
1606 };
1607 
1610 {
1612  Unknown,
1614  ProfitTaker,
1616  StopLoss,
1618  Bracket,
1619 };
1620 
1623 {
1624  std::string order_id;
1626  std::optional<Decimal> trigger_price;
1630  int64_t updated_at;
1632  std::optional<Date> gtd;
1634  std::string counter_id;
1635  std::optional<TriggerStatus> trigger_status;
1638  int64_t submitted_at;
1639  std::optional<Decimal> executed_price;
1640  std::optional<OutsideRTH> force_only_rth;
1641  bool reviewed;
1643  std::optional<OutsideRTH> activate_rth;
1644  std::optional<Decimal> submit_price;
1645 };
1646 
1649 {
1651  std::optional<Decimal> profit_taker_price;
1652  std::optional<Decimal> stop_loss_price;
1653  std::optional<TimeInForceType> time_in_force;
1654  std::optional<int64_t> expire_time;
1655  std::optional<OrderType> activate_order_type;
1656  std::optional<Decimal> profit_taker_submit_price;
1657  std::optional<Decimal> stop_loss_submit_price;
1658  std::optional<OutsideRTH> activate_rth;
1659 };
1660 
1663 {
1665  std::optional<Decimal> profit_taker_price;
1666  std::optional<Decimal> stop_loss_price;
1667  std::optional<TimeInForceType> time_in_force;
1668  std::optional<int64_t> expire_time;
1669  std::optional<OrderType> activate_order_type;
1670  std::optional<Decimal> profit_taker_submit_price;
1671  std::optional<Decimal> stop_loss_submit_price;
1672  std::optional<OutsideRTH> activate_rth;
1673  std::optional<int64_t> profit_taker_id;
1674  std::optional<int64_t> stop_loss_id;
1675  std::optional<bool> cancel_all_attached;
1676  std::optional<int64_t> main_id;
1677  std::optional<Decimal> quantity;
1678  std::optional<Decimal> market_price;
1679 };
1680 
1683 {
1685  Unknown,
1687  CoveredCall,
1689  CoveredPut,
1695  Collar,
1697  Straddle,
1699  Strangle,
1704 };
1705 
1708 {
1710  Unknown,
1712  Long,
1714  Short,
1715 };
1716 
1719 {
1721  Unknown,
1723  Call,
1725  Put,
1726 };
1727 
1730 {
1732  std::string symbol;
1740  std::optional<Decimal> strike_price;
1742  std::optional<Date> expire_date;
1745 };
1746 
1749 {
1753  std::string strategy_name;
1755  std::string multileg_id;
1757  std::string code;
1759  std::vector<MultiLegOrderLeg> legs;
1760 };
1761 
1763 struct Order
1764 {
1766  std::string order_id;
1770  std::string stock_name;
1776  std::optional<Decimal> price;
1778  std::optional<Decimal> executed_price;
1780  int64_t submitted_at;
1784  std::string symbol;
1788  std::optional<Decimal> last_done;
1790  std::optional<Decimal> trigger_price;
1792  std::string msg;
1798  std::optional<Date> expire_date;
1800  std::optional<int64_t> updated_at;
1802  std::optional<int64_t> trigger_at;
1804  std::optional<Decimal> trailing_amount;
1806  std::optional<Decimal> trailing_percent;
1808  std::optional<Decimal> limit_offset;
1810  std::optional<TriggerStatus> trigger_status;
1812  std::string currency;
1814  std::optional<OutsideRTH> outside_rth;
1816  std::optional<int32_t> limit_depth_level;
1818  std::optional<int32_t> trigger_count;
1820  std::optional<Decimal> monitor_price;
1822  std::string remark;
1824  std::vector<AttachedOrderDetail> attached_orders;
1827  std::optional<MultiLegInfo> multi_leg;
1828 };
1829 
1832 {
1836  std::string stock_name;
1840  std::string symbol;
1848  std::optional<Decimal> executed_price;
1850  std::string order_id;
1852  std::string currency;
1856  int64_t submitted_at;
1858  int64_t updated_at;
1860  std::optional<Decimal> trigger_price;
1862  std::string msg;
1866  std::optional<TriggerStatus> trigger_status;
1868  std::optional<int64_t> trigger_at;
1870  std::optional<Decimal> trailing_amount;
1872  std::optional<Decimal> trailing_percent;
1874  std::optional<Decimal> limit_offset;
1876  std::string account_no;
1878  std::optional<Decimal> last_share;
1880  std::optional<Decimal> last_price;
1882  std::string remark;
1885  std::optional<MultiLegInfo> multi_leg;
1886 };
1887 
1890 {
1892  std::optional<std::string> symbol;
1894  std::optional<std::vector<OrderStatus>> status;
1896  std::optional<OrderSide> side;
1898  std::optional<Market> market;
1900  std::optional<int64_t> start_at;
1902  std::optional<int64_t> end_at;
1903 };
1904 
1907 {
1909  std::optional<std::string> symbol;
1911  std::optional<std::vector<OrderStatus>> status;
1913  std::optional<OrderSide> side;
1915  std::optional<Market> market;
1917  std::optional<std::string> order_id;
1919  std::optional<bool> is_attached;
1920 };
1921 
1924 {
1926  std::string order_id;
1930  std::optional<Decimal> price;
1932  std::optional<Decimal> trigger_price;
1934  std::optional<Decimal> limit_offset;
1936  std::optional<Decimal> trailing_amount;
1938  std::optional<Decimal> trailing_percent;
1940  std::optional<int32_t> limit_depth_level;
1942  std::optional<int32_t> trigger_count;
1944  std::optional<Decimal> monitor_price;
1946  std::optional<std::string> remark;
1948  std::optional<ReplaceAttachedParams> attached_params;
1949 };
1950 
1953 {
1955  std::string symbol;
1965  std::optional<Decimal> submitted_price;
1967  std::optional<Decimal> trigger_price;
1969  std::optional<Decimal> limit_offset;
1971  std::optional<Decimal> trailing_amount;
1973  std::optional<Decimal> trailing_percent;
1976  std::optional<Date> expire_date;
1978  std::optional<OutsideRTH> outside_rth;
1980  std::optional<int32_t> limit_depth_level;
1982  std::optional<int32_t> trigger_count;
1984  std::optional<Decimal> monitor_price;
1986  std::optional<std::string> remark;
1990  std::optional<std::string> client_request_id;
1992  std::optional<SubmitAttachedParams> attached_params;
1993 };
1994 
1997 {
1999  std::string order_id;
2000 };
2001 
2004 {
2006  std::string symbol;
2012 };
2013 
2016 {
2026  std::vector<SubmitMultiLegOrderLeg> legs;
2028  std::optional<Decimal> submitted_price;
2030  std::optional<std::string> remark;
2034  std::optional<std::string> client_request_id;
2035 };
2036 
2038 struct CashInfo
2039 {
2049  std::string currency;
2050 };
2051 
2054 {
2055  std::string currency;
2057 };
2058 
2061 {
2069  int32_t risk_level;
2073  std::string currency;
2075  std::vector<CashInfo> cash_infos;
2085  std::vector<FrozenTransactionFee> frozen_transaction_fees;
2086 };
2087 
2090 {
2092  Unknown,
2094  Out,
2096  In,
2097 };
2098 
2100 enum class BalanceType
2101 {
2103  Unknown,
2105  Cash,
2107  Stock,
2109  Fund,
2110 };
2111 
2113 struct CashFlow
2114 {
2124  std::string currency;
2126  int64_t business_time;
2128  std::optional<std::string> symbol;
2130  std::string description;
2131 };
2132 
2135 {
2137  int64_t start_at;
2139  int64_t end_at;
2141  std::optional<BalanceType> business_type;
2143  std::optional<std::string> symbol;
2145  std::optional<uintptr_t> page;
2147  std::optional<uintptr_t> size;
2148 };
2149 
2152 {
2154  std::optional<std::vector<std::string>> symbols;
2155 };
2156 
2159 {
2161  std::optional<std::vector<std::string>> symbols;
2162 };
2163 
2166 {
2168  std::string symbol;
2174  std::string symbol_name;
2176  std::string currency;
2181 };
2182 
2185 {
2187  std::string account_channel;
2189  std::vector<FundPosition> positions;
2190 };
2191 
2194 {
2196  std::vector<FundPositionChannel> channels;
2197 };
2198 
2201 {
2203  std::string symbol;
2205  std::string symbol_name;
2211  std::string currency;
2218  std::optional<Decimal> init_quantity;
2219 };
2220 
2223 {
2225  std::string account_channel;
2227  std::vector<StockPosition> positions;
2228 };
2229 
2232 {
2234  std::vector<StockPositionChannel> channels;
2235 };
2236 
2239 {
2246 };
2247 
2250 {
2251  Unknown,
2252  None,
2253  Calculated,
2254  Pending,
2255  Ready,
2256 };
2257 
2260 {
2261  Unknown,
2262  None,
2263  NoData,
2264  Pending,
2265  Done,
2266 };
2267 
2270 {
2271  Unknown,
2272  Broker,
2273  Third,
2274 };
2275 
2278 {
2288  std::string msg;
2290  int64_t time;
2291 };
2292 
2295 {
2297  std::string code;
2299  std::string name;
2303  std::string currency;
2304 };
2305 
2308 {
2312  std::string name;
2314  std::vector<OrderChargeFee> fees;
2315 };
2316 
2319 {
2323  std::string currency;
2325  std::vector<OrderChargeItem> items;
2326 };
2327 
2330 {
2332  std::string order_id;
2336  std::string stock_name;
2342  std::optional<Decimal> price;
2344  std::optional<Decimal> executed_price;
2346  int64_t submitted_at;
2350  std::string symbol;
2354  std::optional<Decimal> last_done;
2356  std::optional<Decimal> trigger_price;
2358  std::string msg;
2364  std::optional<Date> expire_date;
2366  std::optional<int64_t> updated_at;
2368  std::optional<int64_t> trigger_at;
2370  std::optional<Decimal> trailing_amount;
2372  std::optional<Decimal> trailing_percent;
2374  std::optional<Decimal> limit_offset;
2376  std::optional<TriggerStatus> trigger_status;
2378  std::string currency;
2380  std::optional<OutsideRTH> outside_rth;
2382  std::optional<int32_t> limit_depth_level;
2384  std::optional<int32_t> trigger_count;
2386  std::optional<Decimal> monitor_price;
2388  std::string remark;
2392  std::optional<Decimal> free_amount;
2394  std::optional<std::string> free_currency;
2398  std::optional<Decimal> deductions_amount;
2400  std::optional<std::string> deductions_currency;
2404  std::optional<Decimal> platform_deducted_amount;
2406  std::optional<std::string> platform_deducted_currency;
2408  std::vector<OrderHistoryDetail> history;
2410  std::optional<OrderChargeDetail> charge_detail;
2412  std::vector<AttachedOrderDetail> attached_orders;
2415  std::optional<MultiLegInfo> multi_leg;
2416 };
2417 
2420 {
2422  std::string symbol;
2428  std::optional<Decimal> price;
2430  std::optional<std::string> currency;
2433  std::optional<std::string> order_id;
2436 };
2437 
2440 {
2445 };
2446 
2447 
2450 {
2452  std::string order_id;
2454  std::string status;
2456  std::string symbol;
2458  std::string suspend_reason;
2462  std::string current_base_price;
2464  std::string upper_limit_price;
2466  std::string lower_limit_price;
2470  std::string trigger_quantity;
2472  std::string settlement_currency;
2474  int32_t time_in_force;
2476  int32_t rth;
2478  std::string grid_order_type_up;
2481 };
2482 
2483 } // namespace trade
2484 
2485 namespace grid {
2486 
2488 enum class TriggerPriceType : int32_t
2489 {
2491  Unknown = 0,
2493  Spread = 1,
2495  Percent = 2,
2496 };
2497 
2500 enum class GridTimeInForce : int32_t
2501 {
2503  Day = 0,
2505  GoodTilCanceled = 1,
2507  GoodTilDate = 6,
2508 };
2509 
2511 enum class GridLimitEvent : int32_t
2512 {
2514  Unknown = 0,
2516  Ignore = 1,
2518  CloseAtLast = 2,
2519 };
2520 
2525 {
2527  enum class Kind
2528  {
2530  Percent,
2532  Spread,
2533  };
2540 
2543  {
2544  return GridTrigger{ Kind::Percent, up, down };
2545  }
2548  {
2549  return GridTrigger{ Kind::Spread, up, down };
2550  }
2551 };
2552 
2559 {
2561  std::optional<Decimal> submitted_base_price;
2563  std::optional<Decimal> upper_limit_price;
2565  std::optional<Decimal> lower_limit_price;
2567  std::optional<TriggerPriceType> trigger_price_type;
2569  std::optional<Decimal> trigger_spread_up;
2571  std::optional<Decimal> trigger_spread_down;
2573  std::optional<Decimal> trigger_percent_up;
2575  std::optional<Decimal> trigger_percent_down;
2577  std::optional<bool> multiple_trigger;
2579  std::optional<GridTimeInForce> time_in_force;
2581  std::optional<Decimal> upper_limit_quantity;
2583  std::optional<Decimal> lower_limit_quantity;
2585  std::optional<int64_t> expire_time;
2588  std::optional<GridLimitEvent> upper_limit_event;
2591  std::optional<GridLimitEvent> lower_limit_event;
2593  std::optional<int32_t> trigger_sell_depth;
2595  std::optional<int32_t> trigger_buy_depth;
2597  std::optional<Decimal> trigger_quantity;
2599  std::optional<bool> support_shortsell;
2601  std::optional<int32_t> rth;
2603  std::optional<std::string> grid_order_type_up;
2605  std::optional<std::string> grid_order_type_down;
2606 
2610  static GridTradeRule create(Decimal base_price,
2611  Decimal upper_price,
2612  Decimal lower_price,
2613  GridTrigger trigger,
2614  Decimal quantity,
2615  Decimal upper_quantity,
2616  Decimal lower_quantity,
2618  {
2619  GridTradeRule rule;
2620  rule.submitted_base_price = base_price;
2621  rule.upper_limit_price = upper_price;
2622  rule.lower_limit_price = lower_price;
2623  rule.trigger_quantity = quantity;
2624  rule.upper_limit_quantity = upper_quantity;
2625  rule.lower_limit_quantity = lower_quantity;
2627  if (trigger.kind == GridTrigger::Kind::Percent) {
2629  rule.trigger_percent_up = trigger.up;
2630  rule.trigger_percent_down = trigger.down;
2631  } else {
2633  rule.trigger_spread_up = trigger.up;
2634  rule.trigger_spread_down = trigger.down;
2635  }
2636  return rule;
2637  }
2638 
2641  {
2642  upper_limit_event = upper;
2643  lower_limit_event = lower;
2644  return *this;
2645  }
2646 
2648  GridTradeRule& with_depths(int32_t sell, int32_t buy)
2649  {
2650  trigger_sell_depth = sell;
2651  trigger_buy_depth = buy;
2652  return *this;
2653  }
2654 
2656  GridTradeRule& with_order_types(std::string up, std::string down)
2657  {
2658  grid_order_type_up = std::move(up);
2659  grid_order_type_down = std::move(down);
2660  return *this;
2661  }
2662 
2665  {
2666  multiple_trigger = value;
2667  return *this;
2668  }
2669 
2672  {
2673  support_shortsell = value;
2674  return *this;
2675  }
2676 
2678  GridTradeRule& with_rth(int32_t value)
2679  {
2680  rth = value;
2681  return *this;
2682  }
2683 
2685  GridTradeRule& with_expire_time(int64_t unix_seconds)
2686  {
2687  expire_time = unix_seconds;
2688  return *this;
2689  }
2690 };
2691 
2694 {
2696  std::string symbol;
2698  std::string settlement_currency;
2701 };
2702 
2705 {
2707  std::string order_id;
2710 };
2711 
2714 {
2716  std::optional<int32_t> page;
2718  std::optional<int32_t> limit;
2720  std::optional<Market> market;
2722  std::optional<std::string> status;
2724  std::optional<std::string> symbol;
2726  std::optional<std::string> sort_by;
2728  std::optional<std::string> sort_order;
2729 };
2730 
2733 {
2735  std::vector<std::string> order_ids;
2736 };
2737 
2740 {
2742  std::string order_id;
2744  std::optional<std::string> history_id;
2746  std::optional<int32_t> limit;
2747 };
2748 
2751 {
2753  std::string grid_order_id;
2755  std::optional<int32_t> page;
2757  std::optional<int32_t> limit;
2758 };
2759 
2762 {
2764  std::string order_id;
2765 };
2766 
2769 {
2771  std::string order_id;
2773  std::string symbol;
2775  std::string stock_name;
2777  std::string market;
2779  std::string status;
2781  std::string grid_status;
2783  std::optional<Decimal> submitted_base_price;
2785  std::optional<Decimal> current_base_price;
2787  std::optional<Decimal> pre_trigger_base_price;
2789  std::optional<Decimal> post_trigger_base_price;
2791  std::optional<Decimal> upper_limit_price;
2793  std::optional<Decimal> lower_limit_price;
2797  std::optional<Decimal> trigger_spread_up;
2799  std::optional<Decimal> trigger_spread_down;
2801  std::optional<Decimal> trigger_percent_up;
2803  std::optional<Decimal> trigger_percent_down;
2805  std::optional<Decimal> pullback_percent;
2807  std::optional<Decimal> pullback_spread;
2809  std::optional<Decimal> rebound_percent;
2811  std::optional<Decimal> rebound_spread;
2821  std::optional<Decimal> trigger_quantity;
2823  std::optional<Decimal> trigger_sell_quantity;
2825  std::optional<Decimal> trigger_buy_quantity;
2827  std::optional<Decimal> upper_limit_quantity;
2829  std::optional<Decimal> lower_limit_quantity;
2837  int32_t trigger_times;
2839  std::optional<Decimal> total_buy_quantity;
2841  std::optional<Decimal> total_sell_quantity;
2843  std::optional<Decimal> total_profit_balance;
2845  std::string settlement_currency;
2849  std::string gtd;
2851  std::optional<int64_t> created_at;
2853  int32_t rth;
2857  std::string grid_order_type_up;
2860 };
2861 
2864 {
2866  std::string id;
2868  std::optional<Decimal> price;
2870  std::string order_type;
2872  std::optional<Decimal> quantity;
2874  std::optional<Decimal> executed_qty;
2876  int32_t action;
2878  std::string status;
2880  std::optional<int64_t> submitted_at;
2882  int32_t rth;
2883 };
2884 
2887 {
2889  std::string history_id;
2891  std::optional<int64_t> created_at;
2893  std::string status;
2895  std::string suspend_reason;
2897  std::string reason;
2898 };
2899 
2902 {
2904  std::string order_id;
2906  std::string symbol;
2908  std::string stock_name;
2910  std::string status;
2912  std::string grid_status;
2914  std::string suspend_reason;
2916  std::string sleeping_reason;
2918  std::optional<Decimal> submitted_base_price;
2920  std::optional<Decimal> current_base_price;
2922  std::optional<Decimal> upper_limit_price;
2924  std::optional<Decimal> lower_limit_price;
2928  std::optional<Decimal> trigger_spread_up;
2930  std::optional<Decimal> trigger_spread_down;
2932  std::optional<Decimal> trigger_percent_up;
2934  std::optional<Decimal> trigger_percent_down;
2936  std::optional<Decimal> pullback_percent;
2938  std::optional<Decimal> pullback_spread;
2940  std::optional<Decimal> rebound_percent;
2942  std::optional<Decimal> rebound_spread;
2948  std::optional<Decimal> trigger_quantity;
2950  std::optional<Decimal> trigger_sell_quantity;
2952  std::optional<Decimal> trigger_buy_quantity;
2954  std::optional<Decimal> upper_limit_quantity;
2956  std::optional<Decimal> lower_limit_quantity;
2966  std::optional<int64_t> created_at;
2968  std::optional<int64_t> updated_at;
2970  std::string settlement_currency;
2972  std::optional<int64_t> expire_time;
2974  std::string gtd;
2976  std::vector<GridOrderSubOrder> grid_sub_orders;
2980  std::vector<GridOrderHistory> grid_order_history;
2986  int32_t rth;
2988  std::string grid_order_type_up;
2991 };
2992 
2995 {
2997  std::string id;
2999  std::string status;
3001  std::string name;
3003  std::string symbol;
3005  std::optional<Decimal> price;
3007  std::optional<Decimal> quantity;
3009  std::optional<Decimal> executed_price;
3011  std::optional<Decimal> executed_qty;
3013  std::optional<int64_t> submitted_at;
3015  int32_t action;
3017  std::string order_type;
3019  std::optional<Decimal> trigger_price;
3021  std::string msg;
3023  std::string currency;
3025  std::optional<Decimal> last_done;
3027  std::optional<int64_t> updated_at;
3031  std::string gtd;
3033  std::optional<int64_t> trigger_at;
3036 };
3037 
3040 {
3042  std::optional<Decimal> str_proceed;
3044  std::optional<Decimal> end_proceed;
3046  std::optional<Decimal> bid_size;
3047 };
3048 
3051 {
3057  std::string currency;
3059  std::vector<std::string> settlement_currency;
3060 };
3061 
3064 {
3066  std::string name;
3068  std::optional<Decimal> last_done;
3070  std::optional<Decimal> lot_size;
3072  std::optional<Decimal> buy_lot_size;
3074  std::optional<Decimal> sell_lot_size;
3076  std::vector<GridBidSize> bid_sizes;
3079 };
3080 
3083 {
3085  std::vector<GridOrder> grid_order;
3087  bool has_more;
3088 };
3089 
3092 {
3094  std::vector<TriggerOrder> trigger_orders;
3096  bool has_more;
3097 };
3098 } // namespace grid
3099 
3100 namespace content {
3101 
3104 {
3106  std::string id;
3108  std::string title;
3110  std::string description;
3112  std::string url;
3114  int64_t published_at;
3118  int32_t likes_count;
3120  int32_t shares_count;
3121 };
3122 
3124 struct NewsItem
3125 {
3127  std::string id;
3129  std::string title;
3131  std::string description;
3133  std::string url;
3135  int64_t published_at;
3139  int32_t likes_count;
3141  int32_t shares_count;
3142 };
3143 
3146 {
3148  std::string member_id;
3150  std::string name;
3152  std::string avatar;
3153 };
3154 
3157 {
3159  std::string url;
3161  std::string sm;
3163  std::string lg;
3164 };
3165 
3168 {
3170  std::string id;
3172  std::string title;
3174  std::string description;
3176  std::string body;
3180  std::vector<std::string> tickers;
3182  std::vector<std::string> hashtags;
3184  std::vector<TopicImage> images;
3186  int32_t likes_count;
3190  int32_t views_count;
3192  int32_t shares_count;
3194  std::string topic_type;
3196  std::string detail_url;
3198  int64_t created_at;
3200  int64_t updated_at;
3201 };
3202 
3205 {
3207  int32_t page = 0;
3209  int32_t size = 0;
3211  std::string topic_type;
3212 };
3213 
3216 {
3218  std::string title;
3220  std::string body;
3222  std::string topic_type;
3224  std::vector<std::string> tickers;
3226  std::vector<std::string> hashtags;
3227 };
3228 
3229 } // namespace content
3230 
3231 // ── MarketContext types ───────────────────────────────────────────
3232 namespace market {
3233 
3236 {
3238  int32_t trade_status;
3239  std::string timestamp;
3241  std::string delay_timestamp;
3242  int32_t sub_status;
3244 };
3245 
3248 {
3249  std::vector<MarketTimeItem> market_time;
3250 };
3251 
3254 {
3255  std::string name;
3256  std::string parti_number;
3257  std::string chg;
3258  bool strong;
3259 };
3260 
3263 {
3264  std::vector<BrokerHoldingEntry> buy;
3265  std::vector<BrokerHoldingEntry> sell;
3266  std::string updated_at;
3267 };
3268 
3271 {
3272  std::string value;
3273  std::string chg_1;
3274  std::string chg_5;
3275  std::string chg_20;
3276  std::string chg_60;
3277 };
3278 
3281 {
3282  std::string name;
3283  std::string parti_number;
3286  bool strong;
3287 };
3288 
3291 {
3292  std::vector<BrokerHoldingDetailItem> list;
3293  std::string updated_at;
3294 };
3295 
3298 {
3299  std::string date;
3300  std::string holding;
3301  std::string ratio;
3302  std::string chg;
3303 };
3304 
3307 {
3308  std::vector<BrokerHoldingDailyItem> list;
3309 };
3310 
3313 {
3314  std::string aprice;
3315  std::string apreclose;
3316  std::string hprice;
3317  std::string hpreclose;
3318  std::string currency_rate;
3319  std::string ahpremium_rate;
3320  std::string price_spread;
3321  int64_t timestamp;
3322 };
3323 
3326 {
3327  std::vector<AhPremiumKline> klines;
3328 };
3329 
3332 {
3333  std::vector<AhPremiumKline> klines;
3334 };
3335 
3338 {
3339  std::string buy_amount;
3340  std::string neutral_amount;
3341  std::string price;
3342  std::string sell_amount;
3343 };
3344 
3347 {
3348  std::string avgprice;
3349  std::string buy;
3350  std::string neutral;
3351  std::string preclose;
3352  std::string sell;
3353  std::string timestamp;
3354  std::string total_amount;
3355  std::vector<std::string> trade_date;
3356  std::string trades_count;
3357 };
3358 
3361 {
3363  std::vector<TradePriceLevel> trades;
3364 };
3365 
3368 {
3369  std::string symbol;
3370  std::string code;
3371  std::string name;
3372  std::string full_name;
3373  std::string change;
3374  std::string last_done;
3375  std::string market;
3376  std::string logo;
3377  std::vector<std::string> labels;
3378 };
3379 
3382 {
3383  std::string timestamp;
3384  std::string alert_reason;
3385  int64_t alert_type;
3387  std::string post;
3388 };
3389 
3392 {
3393  std::vector<TopMoversEvent> events;
3395  std::string next_params;
3396 };
3397 
3400 {
3401  std::string symbol;
3402  std::string code;
3403  std::string name;
3404  std::string last_done;
3405  std::string chg;
3406  std::string change;
3407  std::string inflow;
3408  std::string market_cap;
3409  std::string industry;
3410  std::string pre_post_price;
3411  std::string pre_post_chg;
3412  std::string amplitude;
3413  std::string five_day_chg;
3414  std::string turnover_rate;
3415  std::string volume_rate;
3416  std::string pb_ttm;
3417 };
3418 
3421 {
3422  bool bmp;
3423  std::vector<RankListItem> lists;
3424 };
3425 
3428 {
3430  std::string key;
3432  std::string name;
3434  std::string market;
3435 };
3436 
3439 {
3441  std::string key;
3443  std::string name;
3444  std::vector<RankSubCategory> sub_categories;
3445 };
3446 
3449 {
3450  std::vector<RankCategory> categories;
3451 };
3452 
3455 {
3456  std::string symbol;
3457  std::string name;
3458  std::string alert_name;
3459  int64_t alert_time;
3460  std::vector<std::string> change_values;
3461  int32_t emotion;
3462 };
3463 
3466 {
3467  bool all_off;
3468  std::vector<AnomalyItem> changes;
3469 };
3470 
3473 {
3474  std::string symbol;
3475  std::string name;
3476  std::string last_done;
3477  std::string prev_close;
3478  std::string inflow;
3479  std::string balance;
3480  std::string amount;
3481  std::string total_shares;
3482  std::vector<std::string> tags;
3483  std::string intro;
3484  std::string market;
3485  std::string circulating_shares;
3486  bool delay;
3487  std::string chg;
3488  int32_t trade_status;
3489 };
3490 
3493 {
3494  int32_t fall_num;
3495  int32_t flat_num;
3496  int32_t rise_num;
3497  std::vector<ConstituentStock> stocks;
3498 };
3499 
3500 } // namespace market
3501 
3502 // ── FundamentalContext types ──────────────────────────────────────
3503 namespace fundamental {
3504 
3507 {
3508  Unknown = 0,
3509  StrongBuy = 1,
3510  Buy = 2,
3511  Hold = 3,
3512  Sell = 4,
3513  StrongSell = 5,
3514  Underperform = 6,
3515 };
3516 
3519 {
3520  std::string symbol;
3521  std::string id;
3522  std::string desc;
3523  std::string record_date;
3524  std::string ex_date;
3525  std::string payment_date;
3526 };
3527 
3530 {
3531  std::vector<DividendItem> list;
3532 };
3533 
3536 {
3537  int32_t buy;
3538  int32_t over;
3539  int32_t hold;
3540  int32_t under;
3541  int32_t sell;
3542  int32_t no_opinion;
3543  int32_t total;
3544  std::string start_date;
3545  std::string end_date;
3546 };
3547 
3550 {
3551  std::string highest_price;
3552  std::string lowest_price;
3553  std::string prev_close;
3554  std::string start_date;
3555  std::string end_date;
3556 };
3557 
3560 {
3561  int32_t buy;
3562  std::string date;
3563  int32_t hold;
3564  int32_t sell;
3565  int32_t strong_buy;
3566  int32_t under;
3567 };
3568 
3571 {
3574  int64_t industry_id;
3575  std::string industry_name;
3576  int32_t industry_rank;
3578  int32_t industry_mean;
3580 };
3581 
3584 {
3585  std::string ccy_symbol;
3586  std::string change;
3589  std::string target;
3590  std::string updated_at;
3591 };
3592 
3595 {
3598 };
3599 
3602 {
3603  int32_t buy;
3604  std::string date;
3605  int32_t hold;
3606  int32_t sell;
3607  int32_t strong_buy;
3608  int32_t under;
3609 };
3610 
3613 {
3614  std::string avg_target;
3615  std::string date;
3616  std::string max_target;
3617  std::string min_target;
3618  bool meet;
3619  std::string price;
3620  std::string timestamp;
3621 };
3622 
3625 {
3626  std::string ccy_symbol;
3627  std::vector<InstitutionRatingDetailEvaluateItem> evaluate_list;
3628  std::string data_percent;
3629  std::string prediction_accuracy;
3630  std::string updated_at;
3631  std::vector<InstitutionRatingDetailTargetItem> target_list;
3632 };
3633 
3636 {
3637  std::string forecast_eps_median;
3638  std::string forecast_eps_mean;
3639  std::string forecast_eps_lowest;
3646 };
3647 
3650 {
3651  std::vector<ForecastEpsItem> items;
3652 };
3653 
3656 {
3657  int64_t timestamp;
3658  std::string value;
3659 };
3660 
3663 {
3664  std::string desc;
3665  std::string high;
3666  std::string low;
3667  std::string median;
3668  std::vector<ValuationPoint> list;
3669 };
3670 
3673 {
3674  std::optional<ValuationMetricData> pe;
3675  std::optional<ValuationMetricData> pb;
3676  std::optional<ValuationMetricData> ps;
3677  std::optional<ValuationMetricData> dvd_yld;
3678 };
3679 
3682 {
3684 };
3685 
3688 {
3689  std::optional<ValuationMetricData> pe;
3690  std::optional<ValuationMetricData> pb;
3691  std::optional<ValuationMetricData> ps;
3692 };
3693 
3696 {
3697  std::string name;
3698  std::string company_name;
3699  std::string founded;
3700  std::string listing_date;
3701  std::string market;
3702  std::string region;
3703  std::string address;
3704  std::string office_address;
3705  std::string website;
3706  std::string issue_price;
3707  std::string shares_offered;
3708  std::string chairman;
3709  std::string secretary;
3710  std::string audit_inst;
3711  std::string category;
3712  std::string year_end;
3713  std::string employees;
3714  std::string phone;
3715  std::string fax;
3716  std::string email;
3717  std::string legal_repr;
3718  std::string manager;
3719  std::string ticker;
3720  std::string profile;
3721  int32_t sector;
3722 };
3723 
3726 {
3727  std::string symbol;
3728  std::string code;
3729  std::string market;
3730  std::string chg;
3731 };
3732 
3735 {
3736  std::string shareholder_id;
3737  std::string shareholder_name;
3738  std::string institution_type;
3739  std::string percent_of_shares;
3740  std::string shares_changed;
3741  std::string report_date;
3742  std::vector<ShareholderStock> stocks;
3743 };
3744 
3747 {
3748  std::vector<Shareholder> shareholder_list;
3749  std::string forward_url;
3750  int32_t total;
3751 };
3752 
3755 {
3756  std::string code;
3757  std::string symbol;
3758  std::string currency;
3759  std::string name;
3760  std::string position_ratio;
3761  std::string report_date;
3762 };
3763 
3766 {
3767  std::vector<FundHolder> lists;
3768 };
3769 
3772 {
3773  std::string id;
3774  std::string date;
3775  std::string date_str;
3776  std::string date_type;
3777  std::string date_zone;
3778  std::string act_type;
3779  std::string act_desc;
3780  std::string action;
3781  bool recent;
3782  bool is_delay;
3783  std::string delay_content;
3784 };
3785 
3788 {
3789  std::vector<CorpActionItem> items;
3790 };
3791 
3794 {
3795  std::string company_id;
3796  std::string company_name;
3797  std::string company_name_en;
3798  std::string company_name_zhcn;
3799  std::string symbol;
3800  std::string currency;
3801  std::string percent_of_shares;
3802  std::string shares_rank;
3803  std::string shares_value;
3804 };
3805 
3808 {
3809  std::string forward_url;
3810  std::vector<InvestSecurity> invest_securities;
3811 };
3812 
3815 {
3816  std::string field_name;
3817  std::string indicator_name;
3818  std::string indicator_value;
3819  std::string yoy;
3820 };
3821 
3824 {
3825  std::string id;
3826  std::string report;
3827  std::string title;
3828  std::string txt;
3829  bool latest;
3830  std::string web_url;
3831  std::string financial_currency;
3832  std::string financial_name;
3833  std::string financial_region;
3834  std::string financial_report;
3835  std::vector<OperatingIndicator> indicators;
3836 };
3837 
3840 {
3841  std::vector<OperatingItem> list;
3842 };
3843 
3846 {
3847  std::string list_json;
3848 };
3849 
3852 {
3853  std::string key;
3854  std::string name;
3855  std::string description;
3856  std::string actual;
3857  std::string estimate;
3858  std::string comp_value;
3859  std::string comp_desc;
3860  std::string comp;
3862 };
3863 
3866 {
3867  int32_t fiscal_year;
3868  std::string fiscal_period;
3869  std::string period_text;
3870  std::vector<ConsensusDetail> details;
3871 };
3872 
3875 {
3876  std::vector<ConsensusReport> list;
3877  int32_t current_index;
3878  std::string currency;
3879  std::vector<std::string> opt_periods;
3880  std::string current_period;
3881 };
3882 
3885 {
3886  std::string date;
3887  std::string pe;
3888  std::string pb;
3889  std::string ps;
3890 };
3891 
3894 {
3895  std::string symbol;
3896  std::string name;
3897  std::string currency;
3898  std::string assets;
3899  std::string bps;
3900  std::string eps;
3901  std::string dps;
3902  std::string div_yld;
3903  std::string div_payout_ratio;
3904  std::string five_y_avg_dps;
3905  std::string pe;
3906  std::vector<IndustryValuationHistory> history;
3907 };
3908 
3911 {
3912  std::vector<IndustryValuationItem> list;
3913 };
3914 
3917 {
3918  std::string low;
3919  std::string high;
3920  std::string median;
3921  std::string value;
3922  std::string ranking;
3923  std::string rank_index;
3924  std::string rank_total;
3925 };
3926 
3929 {
3930  std::optional<ValuationDist> pe;
3931  std::optional<ValuationDist> pb;
3932  std::optional<ValuationDist> ps;
3933 };
3934 
3937 {
3938  std::string id;
3939  std::string name;
3940  std::string name_zhcn;
3941  std::string name_en;
3942  std::string title;
3943  std::string biography;
3944  std::string photo;
3945  std::string wiki_url;
3946 };
3947 
3950 {
3951  std::string symbol;
3952  std::string forward_url;
3953  int32_t total;
3954  std::vector<Professional> professionals;
3955 };
3956 
3959 {
3960  std::vector<ExecutiveGroup> professional_list;
3961 };
3962 
3965 {
3966  std::string currency;
3967  std::string net_buyback_ttm;
3969 };
3970 
3973 {
3974  std::string fiscal_year;
3975  std::string fiscal_year_range;
3976  std::string net_buyback;
3977  std::string net_buyback_yield;
3979  std::string currency;
3980 };
3981 
3984 {
3987 };
3988 
3991 {
3992  std::optional<RecentBuybacks> recent_buybacks;
3993  std::vector<BuybackHistoryItem> buyback_history;
3994  std::vector<BuybackRatios> buyback_ratios;
3995 };
3996 
3999 {
4000  std::string name;
4001  std::string value;
4002  std::string value_type;
4003  std::string score;
4004  std::string letter;
4005 };
4006 
4009 {
4010  std::string name;
4011  std::string score;
4012  std::string letter;
4013 };
4014 
4017 {
4019  std::vector<RatingLeafIndicator> sub_indicators;
4020 };
4021 
4024 {
4025  int32_t kind;
4026  std::vector<RatingSubIndicatorGroup> sub_indicators;
4027 };
4028 
4031 {
4032  std::string style_txt_name;
4033  std::string scale_txt_name;
4034  std::string report_period_txt;
4035  std::string multi_score;
4036  std::string multi_letter;
4038  std::string industry_name;
4039  std::string industry_rank;
4040  std::string industry_total;
4041  std::string industry_mean_score;
4043  std::vector<RatingCategory> ratings;
4044 };
4045 
4048 {
4049  std::string name;
4050  std::string percent;
4051 };
4052 
4055 {
4056  std::string date;
4057  std::string total;
4058  std::string currency;
4059  std::vector<BusinessSegmentItem> business;
4060 };
4061 
4064 {
4065  std::string name;
4066  std::string percent;
4067  std::string value;
4068 };
4069 
4072 {
4073  std::string date;
4074  std::string total;
4075  std::string currency;
4076  std::vector<BusinessSegmentHistoryItem> business;
4077  std::vector<BusinessSegmentHistoryItem> regionals;
4078 };
4079 
4082 {
4083  std::vector<BusinessSegmentsHistoricalItem> historical;
4084 };
4085 
4088 {
4089  std::string date;
4090  std::string buy;
4091  std::string over;
4092  std::string hold;
4093  std::string under;
4094  std::string sell;
4095  std::string total;
4096 };
4097 
4100 {
4101  std::vector<InstitutionRatingViewItem> elist;
4102 };
4103 
4106 {
4107  std::string name;
4108  std::string symbol;
4109  std::string chg;
4110  std::string leading_name;
4111  std::string leading_ticker;
4112  std::string leading_chg;
4113  std::string value_name;
4114  std::string value_data;
4115 };
4116 
4119 {
4120  std::vector<IndustryRankItem> lists;
4121 };
4122 
4125 {
4126  std::vector<IndustryRankGroup> items;
4127 };
4128 
4131 {
4132  std::string name;
4133  std::string market;
4134 };
4135 
4140 {
4141  std::string name;
4142  std::string symbol;
4143  int32_t stock_num;
4144  std::string chg;
4145  std::string ytd_chg;
4146  std::string next_json;
4147 };
4148 
4151 {
4152  std::optional<IndustryPeersTop> top;
4153  std::optional<IndustryPeerNode> chain;
4154 };
4155 
4158 {
4159  std::string value;
4160  std::string yoy;
4161  std::string cmp_desc;
4162  std::string est_value;
4163 };
4164 
4167 {
4168  std::string value;
4169  std::string yoy;
4170 };
4171 
4174 {
4175  std::string name;
4176  std::string ticker;
4177  std::string fp_start;
4178  std::string fp_end;
4179  std::string currency;
4180  std::string report_desc;
4181  std::optional<SnapshotForecastMetric> fo_revenue;
4182  std::optional<SnapshotForecastMetric> fo_ebit;
4183  std::optional<SnapshotForecastMetric> fo_eps;
4184  std::optional<SnapshotReportedMetric> fr_revenue;
4185  std::optional<SnapshotReportedMetric> fr_profit;
4186  std::optional<SnapshotReportedMetric> fr_operate_cash;
4187  std::optional<SnapshotReportedMetric> fr_invest_cash;
4188  std::optional<SnapshotReportedMetric> fr_finance_cash;
4189  std::optional<SnapshotReportedMetric> fr_total_assets;
4190  std::optional<SnapshotReportedMetric> fr_total_liability;
4191  std::string fr_roe_ttm;
4192  std::string fr_profit_margin;
4194  std::string fr_asset_turn_ttm;
4195  std::string fr_leverage_ttm;
4197 };
4198 
4201 {
4202  std::string date;
4203  std::string pe;
4204  std::string pb;
4205  std::string ps;
4206 };
4207 
4210 {
4211  std::string symbol;
4212  std::string name;
4213  std::string currency;
4214  std::string market_value;
4215  std::string price_close;
4216  std::string pe;
4217  std::string pb;
4218  std::string ps;
4219  std::string roe;
4220  std::string eps;
4221  std::string bps;
4222  std::string dps;
4223  std::string div_yld;
4224  std::string assets;
4225  std::vector<ValuationHistoryPoint> history;
4226 };
4227 
4230 {
4231  std::vector<ValuationComparisonItem> list;
4232 };
4233 
4235 enum class ElementType
4236 {
4238  Unknown,
4240  Holdings,
4242  Regional,
4244  AssetClass,
4246  Industry,
4247 };
4248 
4251 {
4253  std::string industry_id;
4255  std::string industry_name;
4257  std::string index;
4259  std::string index_name;
4261  std::string holding_type;
4263  std::string holding_type_name;
4264 };
4265 
4268 {
4270  std::string name;
4272  std::string code;
4274  std::string position_ratio;
4276  std::string symbol;
4278  std::map<std::string, std::string> name_locales;
4280  std::optional<HoldingDetail> holding_detail;
4281 };
4282 
4285 {
4287  std::string report_date;
4291  std::vector<AssetAllocationItem> lists;
4292 };
4293 
4296 {
4298  std::vector<AssetAllocationGroup> info;
4299 };
4300 
4301 } // namespace fundamental
4302 
4303 namespace alert {
4304 
4309 {
4311  std::string price;
4313  std::optional<double> chg;
4314 };
4315 
4317 {
4319  std::string id;
4321  std::string indicator_id;
4323  bool enabled;
4325  int32_t frequency;
4327  int32_t scope;
4329  std::string text;
4331  std::vector<int32_t> state;
4334 };
4335 
4338 {
4340  std::string symbol;
4342  std::string code;
4344  std::string market;
4346  std::string name;
4348  std::string price;
4350  std::string chg;
4352  std::string p_chg;
4354  std::string product;
4356  std::vector<AlertItem> indicators;
4357 };
4358 
4361 {
4363  std::vector<AlertSymbolGroup> lists;
4364 };
4365 
4366 } // namespace alert
4367 
4368 namespace dca {
4369 
4371 enum class DCAFrequency
4372 {
4373  Daily = 0,
4374  Weekly = 1,
4375  Fortnightly = 2,
4376  Monthly = 3,
4377 };
4378 
4380 enum class DCAStatus
4381 {
4382  Active = 0,
4383  Suspended = 1,
4384  Finished = 2,
4385 };
4386 
4388 struct DcaPlan
4389 {
4391  std::string plan_id;
4395  std::string symbol;
4397  std::string member_id;
4399  std::string aaid;
4401  std::string account_channel;
4403  std::string display_account;
4407  std::string per_invest_amount;
4411  std::string invest_day_of_week;
4413  std::string invest_day_of_month;
4417  std::string alter_hours;
4419  std::string created_at;
4421  std::string updated_at;
4423  std::string next_trd_date;
4425  std::string stock_name;
4427  std::string cum_amount;
4429  int64_t issue_number;
4431  std::string average_cost;
4433  std::string cum_profit;
4434 };
4435 
4437 struct DcaList
4438 {
4440  std::vector<DcaPlan> plans;
4441 };
4442 
4444 struct DcaStats
4445 {
4447  std::string active_count;
4449  std::string finished_count;
4451  std::string suspended_count;
4453  std::vector<DcaPlan> nearest_plans;
4455  std::string rest_days;
4457  std::string total_amount;
4459  std::string total_profit;
4460 };
4461 
4464 {
4466  std::string symbol;
4469 };
4470 
4473 {
4475  std::vector<DcaSupportInfo> infos;
4476 };
4477 
4480 {
4482  std::string trade_date;
4483 };
4484 
4487 {
4489  std::string plan_id;
4490 };
4491 
4494 {
4495  std::string created_at;
4496  std::string order_id;
4497  std::string status;
4498  std::string action;
4499  std::string order_type;
4500  std::string executed_qty;
4501  std::string executed_price;
4502  std::string executed_amount;
4503  std::string rejected_reason;
4504  std::string symbol;
4505 };
4506 
4509 {
4510  std::vector<DcaHistoryRecord> records;
4511  bool has_more;
4512 };
4513 
4514 } // namespace dca
4515 
4516 namespace sharelist {
4517 
4520 {
4522  std::string symbol;
4524  std::string name;
4526  std::string market;
4528  std::string code;
4530  std::string intro;
4534  std::optional<std::string> change;
4536  std::optional<std::string> last_done;
4538  std::optional<int32_t> trade_status;
4539 };
4540 
4543 {
4547  bool is_self;
4548 };
4549 
4552 {
4554  int64_t id;
4556  std::string name;
4558  std::string description;
4560  std::string cover;
4564  int64_t created_at;
4566  int64_t edited_at;
4568  std::string this_year_chg;
4570  std::string creator;
4572  std::vector<SharelistStock> stocks;
4576  std::string chg;
4580  std::string industry_code;
4581 };
4582 
4585 {
4587  std::vector<SharelistInfo> sharelists;
4589  std::vector<SharelistInfo> subscribed_sharelists;
4591  std::string tail_mark;
4592 };
4593 
4596 {
4601 };
4602 
4603 } // namespace sharelist
4604 
4605 namespace agent {
4606 
4609 {
4611  std::string id;
4613  std::string name;
4615  int64_t created_at;
4617  int64_t updated_at;
4618 };
4619 
4622 {
4624  std::vector<Workspace> workspaces;
4625 };
4626 
4628 struct Agent
4629 {
4631  std::string uid;
4633  std::string name;
4635  std::string description;
4637  std::string mode;
4639  std::string icon;
4643  int64_t published_at;
4645  int64_t created_at;
4647  int64_t updated_at;
4648 };
4649 
4652 {
4654  std::vector<Agent> agents;
4656  int32_t total;
4657 };
4658 
4661 {
4663  std::optional<int32_t> page;
4665  std::optional<int32_t> limit;
4667  std::optional<std::string> name;
4668 };
4669 
4672 {
4674  int32_t index;
4678  std::string ref_type;
4680  std::string id;
4682  std::string title;
4684  std::string url;
4686  std::string content_json;
4687 };
4688 
4691 {
4693  std::string label;
4695  std::string description;
4696 };
4697 
4699 struct Question
4700 {
4702  std::string question;
4704  std::vector<QuestionOption> options;
4707 };
4708 
4711 {
4713  std::string tool_call_id;
4715  std::string interrupt_id;
4717  std::string interaction_type;
4719  std::string tool_name;
4721  std::vector<Question> questions;
4723  std::string tool_args_json;
4724 };
4725 
4729 {
4731  std::string node_id;
4733  std::string tool_call_id;
4735  std::vector<Question> questions;
4737  std::vector<HumanInteraction> interactions;
4739  int64_t message_id;
4741  int64_t chat_id;
4742 };
4743 
4746 {
4748  int32_t code;
4750  std::string message;
4751 };
4752 
4755 {
4757  Succeeded,
4759  Interrupted,
4761  Failed,
4763  Stopped,
4764 };
4765 
4769 {
4772  std::string chat_uid;
4774  std::string message_id;
4778  std::string answer;
4780  std::vector<Reference> references;
4782  std::vector<std::string> further_questions;
4786  std::optional<Interrupt> interrupt;
4788  std::optional<AgentError> error;
4789 };
4790 
4793 {
4795  std::string chat_uid;
4797  int64_t chat_id;
4799  std::string message_id;
4801  std::string error;
4803  std::string error_message;
4804 };
4805 
4810 {
4812  std::string text;
4815  std::string message_type;
4819  std::string key;
4821  int64_t started_at;
4823  std::string stage;
4826  std::string stage_title;
4832  std::string outputs_json;
4833 };
4834 
4837 {
4839  int64_t chat_id;
4841  std::string chat_uid;
4843  std::string message_id;
4845  std::string query;
4846 };
4847 
4851 {
4857  int64_t started_at;
4859  int64_t workflow_id;
4860 };
4861 
4867 {
4869  int64_t started_at;
4870 };
4871 
4876 {
4878  int64_t finished_at;
4880  int32_t elapsed_time;
4881 };
4882 
4887 {
4889  std::string tool_use_id;
4891  std::string tool_name;
4894  std::string tool_func_name;
4896  std::string tool_args;
4899  std::string tips;
4901  std::vector<std::string> tip_chips;
4904  int32_t iteration;
4906  int64_t started_at;
4907 };
4908 
4912 {
4914  std::vector<Reference> references;
4916  std::vector<std::string> reference_domains;
4918  std::string query;
4920  std::string text;
4922  std::string tool_args_json;
4925  std::string data_json;
4926 };
4927 
4931 {
4933  std::string tool_use_id;
4935  std::string status;
4937  std::string error;
4941  int64_t started_at;
4943  std::string tool_name;
4945  std::string tool_func_name;
4947  std::string tool_args;
4949  std::string tool_type;
4951  std::string tips;
4953  std::vector<std::string> tip_chips;
4955  int32_t iteration;
4960 };
4961 
4966 {
4968  std::string node_id;
4970  std::string tool_use_id;
4972  int64_t started_at;
4974  std::string goal;
4976  std::string prompt;
4978  std::string subagent_id;
4981  std::string tools_json;
4982 };
4983 
4988 {
4990  std::string node_id;
4992  std::string parent_tool_call_id;
4994  std::string subagent_tool_name;
4996  std::string subagent_tool_args;
4998  std::string subagent_status;
5004  int64_t started_at;
5005 };
5006 
5009 {
5011  std::string goal;
5013  std::string result;
5016  std::string subagent_tools_json;
5017 };
5018 
5021 {
5023  std::string node_id;
5025  std::string tool_use_id;
5027  std::string status;
5029  int64_t started_at;
5033  std::string error;
5036 };
5037 
5042 {
5044  std::string node_id;
5046  std::string tool_use_id;
5048  std::string agent_tool_name;
5050  std::string title;
5052  int64_t started_at;
5054  std::string tool_args;
5056  std::string tool_name;
5058  std::string tips;
5060  std::vector<std::string> tip_chips;
5063 };
5064 
5068 {
5070  std::string node_id;
5072  std::string parent_tool_call_id;
5074  std::string agent_tool_name;
5076  std::string inner_tool_name;
5078  std::string inner_tool_args;
5080  std::string status;
5082  int64_t duration_ms;
5084  int64_t started_at;
5087 };
5088 
5091 {
5093  std::string node_id;
5095  std::string tool_use_id;
5097  std::string agent_tool_name;
5099  std::string status;
5101  int64_t started_at;
5105  std::string error;
5107  std::string tool_args;
5109  std::string outputs_json;
5111  std::string tool_type;
5113  std::string tips;
5115  std::vector<std::string> tip_chips;
5118 };
5119 
5124 {
5126  std::string raw_query;
5128  std::string masked_query;
5129 };
5130 
5134 {
5136  std::string node_id;
5138  int64_t started_at;
5140  std::string outputs_json;
5142  std::string tool_name;
5143 };
5144 
5150 {
5152  std::string started_at;
5154  std::string inputs_json;
5155 };
5156 
5160 {
5162  std::string created_at;
5164  std::string inputs_json;
5166  std::string outputs_json;
5167 };
5168 
5173 {
5175  int64_t chat_id;
5177  std::string chat_uid;
5179  std::string message_id;
5181  std::string error;
5183  std::string error_message;
5184 };
5185 
5191 {
5193  int64_t chat_id;
5195  std::string chat_uid;
5197  std::string source;
5199  std::string title;
5201  int64_t updated_at;
5202 };
5203 
5207 {
5209  ChatStarted,
5214  Message,
5218  Ping,
5255  QueryMasked,
5258  PlanChanged,
5267  ChatFinished,
5277  Other,
5278 };
5279 
5290 {
5294  std::optional<ChatStartedPayload> chat_started;
5297  std::optional<WorkflowStartedPayload> workflow_started;
5299  std::optional<MessagePayload> message;
5302  std::optional<ThinkingStartedPayload> thinking_started;
5305  std::optional<ThinkingFinishedPayload> thinking_finished;
5308  std::optional<NodeToolUseStartedPayload> node_tool_use_started;
5311  std::optional<NodeToolUseFinishedPayload> node_tool_use_finished;
5314  std::optional<SubagentStartedPayload> subagent_started;
5317  std::optional<SubagentProgressPayload> subagent_progress;
5320  std::optional<SubagentFinishedPayload> subagent_finished;
5323  std::optional<AgentToolStartedPayload> agent_tool_started;
5326  std::optional<AgentToolProgressPayload> agent_tool_progress;
5329  std::optional<AgentToolFinishedPayload> agent_tool_finished;
5334  std::optional<ConversationResponse> human_interaction_required;
5337  std::optional<QueryMaskedPayload> query_masked;
5340  std::optional<PlanChangedPayload> plan_changed;
5343  std::optional<ContextCompressStartedPayload> context_compress_started;
5346  std::optional<ContextCompressFinishedPayload> context_compress_finished;
5349  std::optional<ChatFinishedPayload> chat_finished;
5355  std::optional<ConversationResponse> workflow_finished;
5358  std::optional<ChatTitleUpdatedPayload> chat_title_updated;
5361  std::optional<std::string> other_event;
5364  std::optional<std::string> other_json;
5365 };
5366 
5367 } // namespace agent
5368 
5369 } // namespace longbridge
Definition: decimal.hpp:13
Subscription flags.
Definition: types.hpp:73
static SubFlags QUOTE()
bool operator==(const SubFlags &other) const
Definition: types.hpp:104
static SubFlags BROKER()
static SubFlags DEPTH()
SubFlags(uint8_t value)
Definition: types.hpp:78
SubFlags & operator|=(const SubFlags &other)
Definition: types.hpp:87
SubFlags operator&(const SubFlags &other) const
Definition: types.hpp:93
static SubFlags TRADE()
bool contains(const SubFlags &other) const
Definition: types.hpp:109
SubFlags operator|(const SubFlags &other) const
Definition: types.hpp:82
SubFlags & operator&=(const SubFlags &other)
Definition: types.hpp:98
ConversationStatus
Final run status of a conversation.
Definition: types.hpp:4755
@ Interrupted
The run is paused, waiting for AgentContext::continue_conversation.
@ Succeeded
The run completed successfully.
ConversationStreamEventKind
Definition: types.hpp:5207
@ Message
An incremental piece of the answer; message is populated.
@ ThinkingFinished
The reasoning phase is over; thinking_finished is populated.
@ ChatStarted
The run has started; chat_started is populated.
DCAStatus
DCA plan status.
Definition: types.hpp:4381
DCAFrequency
DCA investment frequency.
Definition: types.hpp:4372
InstitutionRecommend
Institutional analyst recommendation.
Definition: types.hpp:3507
ElementType
ETF asset allocation element type.
Definition: types.hpp:4236
TriggerPriceType
How grid trigger thresholds are interpreted (wire: int32_t).
Definition: types.hpp:2489
@ Spread
Trigger by absolute price spread.
GridTimeInForce
Definition: types.hpp:2501
@ GoodTilCanceled
Good-til-canceled.
GridLimitEvent
Action taken when a grid boundary is reached (wire: int32_t).
Definition: types.hpp:2512
@ CloseAtLast
Close the position at the last price.
@ Ignore
Ignore — keep the grid running.
WarrantSortBy
Warrant sort by.
Definition: types.hpp:1091
@ 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:1255
SecuritiesUpdateMode
Securities update mode.
Definition: types.hpp:846
OptionDirection
Option direction.
Definition: types.hpp:467
Period
Candlestick period.
Definition: types.hpp:131
@ Min45
Forty-Five Minutes.
@ Min20
Twenty Minutes.
@ Min15
Fifteen Minutes.
@ Min30
Thirty Minutes.
TradeSession
Trade session.
Definition: types.hpp:185
SecurityBoard
Security board.
Definition: types.hpp:270
@ 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:1153
TradeStatus
Trade status.
Definition: types.hpp:379
@ SplitStockHalts
Split Stock Halts.
@ WarrantPrepareList
Warrant To BeListed.
AdjustType
Adjust type.
Definition: types.hpp:717
OptionStandardAttr
Definition: types.hpp:492
@ Normal
A normal, active contract.
@ Old
A legacy contract produced by a corporate action.
TradeDirection
Trade direction.
Definition: types.hpp:547
WarrantType
Warrant type.
Definition: types.hpp:612
Granularity
Data granularity.
Definition: types.hpp:1279
@ Unknown
Unknown.
Definition: types.hpp:1281
@ Monthly
Monthly.
Definition: types.hpp:1287
@ Weekly
Weekly.
Definition: types.hpp:1285
@ Daily
Daily.
Definition: types.hpp:1283
SecurityListCategory
Security list category.
Definition: types.hpp:1233
WarrantStatus
Warrant status.
Definition: types.hpp:1162
CalcIndex
Calc index.
Definition: types.hpp:902
@ 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.
OptionExpiryCycleType
Special expiration cycle of an option contract.
Definition: types.hpp:478
@ Quarterly
Quarterly option, expires quarterly.
SortOrderType
Sort order type.
Definition: types.hpp:1082
OptionType
Option type.
Definition: types.hpp:456
FilterWarrantExpiryDate
Filter warrant expiry date type.
Definition: types.hpp:1140
ContractDirection
Option contract type.
Definition: types.hpp:1719
OrderTag
Order tag.
Definition: types.hpp:1556
@ LongTerm
Long term Order.
CashFlowDirection
Cash flow direction.
Definition: types.hpp:2090
OutsideRTH
Enable or disable outside regular trading hours.
Definition: types.hpp:1595
@ RTHOnly
Regular trading hour only.
@ OptionPreMarket
Overnight option.
TriggerStatus
Trigger status.
Definition: types.hpp:1582
TopicType
Topic type.
Definition: types.hpp:1407
@ Private
Private notification for trade.
BalanceType
Balance type.
Definition: types.hpp:2101
DeductionStatus
Deduction status.
Definition: types.hpp:2260
AttachedOrderType
Attached order type.
Definition: types.hpp:1610
OrderSide
Order side.
Definition: types.hpp:1414
CommissionFreeStatus
Commission-free Status.
Definition: types.hpp:2250
ChargeCategoryCode
Charge category code.
Definition: types.hpp:2270
OrderStatus
Order status.
Definition: types.hpp:1482
@ 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:1523
@ 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)
MultiLegPosition
Multi-leg position direction.
Definition: types.hpp:1708
MultiLegStrategy
Multi-leg strategy.
Definition: types.hpp:1683
@ CoveredPut
Covered put (covered stock)
@ VerticalCallSpread
Vertical call spread.
@ CalendarCallSpread
Calendar call spread.
@ CalendarPutSpread
Calendar put spread.
@ VerticalPutSpread
Vertical put spread.
@ CoveredCall
Covered call (covered stock)
TimeInForceType
Time in force Type.
Definition: types.hpp:1569
@ GoodTilDate
Good Til Date Order.
@ GoodTilCanceled
Good Til Canceled Order.
Definition: agent_context.hpp:13
PushCandlestickMode
Push candlestick mode.
Definition: types.hpp:43
Market
Market.
Definition: types.hpp:52
@ Crypto
Crypto market.
Language
Language identifer.
Definition: types.hpp:32
Definition: types.hpp:11
uint8_t day
Definition: types.hpp:14
uint8_t month
Definition: types.hpp:13
int32_t year
Definition: types.hpp:12
Definition: types.hpp:25
Time time
Definition: types.hpp:27
Date date
Definition: types.hpp:26
Definition: types.hpp:18
uint8_t second
Definition: types.hpp:21
uint8_t minute
Definition: types.hpp:20
uint8_t hour
Definition: types.hpp:19
Present when a conversation run failed.
Definition: types.hpp:4746
int32_t code
Error code.
Definition: types.hpp:4748
std::string message
Error message.
Definition: types.hpp:4750
An Agent in a Workspace.
Definition: types.hpp:4629
int64_t created_at
Creation time, Unix timestamp in seconds.
Definition: types.hpp:4645
int64_t published_at
Publish time, Unix timestamp in seconds; 0 if unpublished.
Definition: types.hpp:4643
bool is_published
Whether published; only published Agents can start conversations.
Definition: types.hpp:4641
std::string mode
Agent mode, e.g. "chat".
Definition: types.hpp:4637
std::string icon
Icon URL.
Definition: types.hpp:4639
int64_t updated_at
Last updated time, Unix timestamp in seconds.
Definition: types.hpp:4647
std::string description
Agent description.
Definition: types.hpp:4635
std::string uid
Agent UID, used as the path parameter of AgentContext::conversation.
Definition: types.hpp:4631
std::string name
Agent name.
Definition: types.hpp:4633
Payload of an AgentToolFinished conversation stream event.
Definition: types.hpp:5091
std::string node_id
ID of the calling node.
Definition: types.hpp:5093
std::string tips
Progress text; may be empty.
Definition: types.hpp:5113
int64_t started_at
Start time, Unix timestamp in seconds.
Definition: types.hpp:5101
std::vector< std::string > tip_chips
Short tags; may be empty.
Definition: types.hpp:5115
std::string tool_use_id
Matches the tool_use_id of AgentToolStarted.
Definition: types.hpp:5095
std::string error
Error description on failure.
Definition: types.hpp:5105
std::string agent_tool_name
Identifier of the Agent being called.
Definition: types.hpp:5097
std::string outputs_json
Result of the delegated Agent, as a JSON string; empty when absent.
Definition: types.hpp:5109
std::string status
succeeded / failed
Definition: types.hpp:5099
std::string tool_type
Tool category.
Definition: types.hpp:5111
bool is_thinking
true if during the thinking phase
Definition: types.hpp:5117
std::string tool_args
Call arguments as a JSON string.
Definition: types.hpp:5107
double elapsed_time
Total duration in seconds.
Definition: types.hpp:5103
int64_t started_at
Start time, Unix timestamp in seconds.
Definition: types.hpp:5084
bool is_thinking
true if during the thinking phase
Definition: types.hpp:5086
std::string agent_tool_name
Identifier of the Agent being called.
Definition: types.hpp:5074
std::string node_id
ID of the calling node.
Definition: types.hpp:5070
int64_t duration_ms
Duration of the inner call in milliseconds.
Definition: types.hpp:5082
std::string inner_tool_args
Arguments of that inner call, as a JSON string.
Definition: types.hpp:5078
std::string inner_tool_name
Name of the inner tool the delegated Agent called.
Definition: types.hpp:5076
std::string status
Status of the inner call: running / succeeded / failed.
Definition: types.hpp:5080
std::string parent_tool_call_id
tool_use_id of the owning AgentToolStarted event
Definition: types.hpp:5072
std::string tool_args
Call arguments as a JSON string.
Definition: types.hpp:5054
std::string agent_tool_name
Identifier of the Agent being called.
Definition: types.hpp:5048
std::string node_id
ID of the calling node.
Definition: types.hpp:5044
std::string tool_use_id
Unique ID of this call; matches the finished event.
Definition: types.hpp:5046
int64_t started_at
Start time, Unix timestamp in seconds.
Definition: types.hpp:5052
bool is_thinking
true if called during the thinking phase
Definition: types.hpp:5062
std::string title
Display title; may be empty.
Definition: types.hpp:5050
std::string tips
Progress text; may be empty.
Definition: types.hpp:5058
std::vector< std::string > tip_chips
Short tags; may be empty.
Definition: types.hpp:5060
std::string tool_name
Localized display name.
Definition: types.hpp:5056
Response for AgentContext::agents.
Definition: types.hpp:4652
int32_t total
Total number of matching Agents.
Definition: types.hpp:4656
std::vector< Agent > agents
Agent list.
Definition: types.hpp:4654
Definition: types.hpp:5173
std::string error
Empty string in every run observed so far.
Definition: types.hpp:5181
std::string chat_uid
Conversation identifier.
Definition: types.hpp:5177
std::string error_message
Empty string in every run observed so far.
Definition: types.hpp:5183
std::string message_id
Message ID of this round.
Definition: types.hpp:5179
int64_t chat_id
ID of the owning conversation.
Definition: types.hpp:5175
Payload of a ChatStarted conversation stream event.
Definition: types.hpp:4793
std::string chat_uid
Conversation identifier.
Definition: types.hpp:4795
std::string error_message
Error message; empty when absent.
Definition: types.hpp:4803
std::string message_id
Message ID of this round.
Definition: types.hpp:4799
int64_t chat_id
Numeric conversation identifier.
Definition: types.hpp:4797
std::string error
Error code; empty when absent.
Definition: types.hpp:4801
std::string title
The new (possibly truncated) title.
Definition: types.hpp:5199
int64_t chat_id
ID of the owning conversation.
Definition: types.hpp:5193
std::string source
Where the title came from, e.g. "ai_generated".
Definition: types.hpp:5197
std::string chat_uid
Conversation identifier.
Definition: types.hpp:5195
int64_t updated_at
Unix timestamp in seconds.
Definition: types.hpp:5201
std::string inputs_json
Compression input summary, as a JSON string; empty when absent.
Definition: types.hpp:5164
std::string created_at
Finish time, RFC 3339.
Definition: types.hpp:5162
std::string outputs_json
Compression result summary, as a JSON string; empty when absent.
Definition: types.hpp:5166
std::string started_at
Start time, RFC 3339.
Definition: types.hpp:5152
std::string inputs_json
Compression input summary, as a JSON string; empty when absent.
Definition: types.hpp:5154
Definition: types.hpp:4769
std::string chat_uid
Definition: types.hpp:4772
std::optional< Interrupt > interrupt
Present only when status is ConversationStatus::Interrupted.
Definition: types.hpp:4786
ConversationStatus status
Final run status.
Definition: types.hpp:4776
std::vector< Reference > references
Sources referenced by the answer.
Definition: types.hpp:4780
double elapsed_time
Run duration in seconds.
Definition: types.hpp:4784
std::string message_id
Message ID of this round.
Definition: types.hpp:4774
std::vector< std::string > further_questions
Suggested follow-up questions ("you might also ask"); empty when absent.
Definition: types.hpp:4782
std::optional< AgentError > error
Present only when the run failed.
Definition: types.hpp:4788
std::string answer
Final answer text; valid when status is ConversationStatus::Succeeded.
Definition: types.hpp:4778
ConversationStreamEventKind kind
Discriminant, tells you which field below is populated.
Definition: types.hpp:5292
std::optional< NodeToolUseFinishedPayload > node_tool_use_finished
Definition: types.hpp:5311
std::optional< ThinkingStartedPayload > thinking_started
Definition: types.hpp:5302
std::optional< ConversationResponse > workflow_finished
Definition: types.hpp:5355
std::optional< ConversationResponse > human_interaction_required
Definition: types.hpp:5334
std::optional< AgentToolProgressPayload > agent_tool_progress
Definition: types.hpp:5326
std::optional< WorkflowStartedPayload > workflow_started
Definition: types.hpp:5297
std::optional< ChatStartedPayload > chat_started
Populated when kind is ChatStarted
Definition: types.hpp:5294
std::optional< SubagentStartedPayload > subagent_started
Definition: types.hpp:5314
std::optional< ContextCompressStartedPayload > context_compress_started
Definition: types.hpp:5343
std::optional< NodeToolUseStartedPayload > node_tool_use_started
Definition: types.hpp:5308
std::optional< PlanChangedPayload > plan_changed
Definition: types.hpp:5340
std::optional< ThinkingFinishedPayload > thinking_finished
Definition: types.hpp:5305
std::optional< MessagePayload > message
Populated when kind is Message
Definition: types.hpp:5299
std::optional< std::string > other_json
Definition: types.hpp:5364
std::optional< SubagentProgressPayload > subagent_progress
Definition: types.hpp:5317
std::optional< AgentToolStartedPayload > agent_tool_started
Definition: types.hpp:5323
std::optional< std::string > other_event
Definition: types.hpp:5361
std::optional< ContextCompressFinishedPayload > context_compress_finished
Definition: types.hpp:5346
std::optional< AgentToolFinishedPayload > agent_tool_finished
Definition: types.hpp:5329
std::optional< ChatTitleUpdatedPayload > chat_title_updated
Definition: types.hpp:5358
std::optional< ChatFinishedPayload > chat_finished
Definition: types.hpp:5349
std::optional< QueryMaskedPayload > query_masked
Definition: types.hpp:5337
std::optional< SubagentFinishedPayload > subagent_finished
Definition: types.hpp:5320
Options for AgentContext::agents (all fields optional).
Definition: types.hpp:4661
std::optional< int32_t > page
Page number, starts at 1.
Definition: types.hpp:4663
std::optional< int32_t > limit
Page size.
Definition: types.hpp:4665
std::optional< std::string > name
Fuzzy search by Agent name.
Definition: types.hpp:4667
A single interaction requested while an Agent workflow is paused.
Definition: types.hpp:4711
std::string interaction_type
Interaction type such as ask_human or trade_password
Definition: types.hpp:4717
std::string tool_args_json
Original tool arguments as a JSON string; empty when absent.
Definition: types.hpp:4723
std::string tool_call_id
Tool call that requested the interaction.
Definition: types.hpp:4713
std::string tool_name
Human-readable tool name.
Definition: types.hpp:4719
std::vector< Question > questions
Questions and answer options presented to the user.
Definition: types.hpp:4721
std::string interrupt_id
Stable key expected by the answers map when continuing.
Definition: types.hpp:4715
Definition: types.hpp:4729
int64_t chat_id
ID of the owning conversation.
Definition: types.hpp:4741
std::string tool_call_id
Tool call ID of this inquiry; used as the answer key when continuing.
Definition: types.hpp:4733
int64_t message_id
ID of the paused message.
Definition: types.hpp:4739
std::vector< HumanInteraction > interactions
Full interaction descriptors used to render and answer the pause.
Definition: types.hpp:4737
std::string node_id
ID of the node that triggered the interrupt.
Definition: types.hpp:4731
std::vector< Question > questions
Questions you need to answer.
Definition: types.hpp:4735
Definition: types.hpp:4810
std::string stage_title
Definition: types.hpp:4826
std::string outputs_json
Definition: types.hpp:4832
std::string stage_finished_title
Definition: types.hpp:4829
std::string message_type
Definition: types.hpp:4815
std::string stage
Stage identifier; only present when message_type is "process".
Definition: types.hpp:4823
std::string text
Incremental text fragment.
Definition: types.hpp:4812
std::string key
Definition: types.hpp:4819
int64_t started_at
Time this segment started, Unix timestamp in seconds.
Definition: types.hpp:4821
bool is_thinking
true if the call happened during the thinking phase
Definition: types.hpp:4957
std::string tool_type
Tool category.
Definition: types.hpp:4949
double elapsed_time
Call duration in seconds.
Definition: types.hpp:4939
std::string error
Error description on failure.
Definition: types.hpp:4937
std::vector< std::string > tip_chips
Short tags; may be empty.
Definition: types.hpp:4953
std::string tool_args
Call arguments as a JSON string.
Definition: types.hpp:4947
int64_t started_at
Start time, Unix timestamp in seconds.
Definition: types.hpp:4941
std::string tips
Progress text.
Definition: types.hpp:4951
NodeToolUseOutputs outputs
Filtered call results, for display.
Definition: types.hpp:4959
int32_t iteration
Round number.
Definition: types.hpp:4955
std::string tool_name
Localized display name.
Definition: types.hpp:4943
std::string tool_use_id
Matches the tool_use_id of the started event.
Definition: types.hpp:4933
std::string tool_func_name
Locale-stable tool identifier.
Definition: types.hpp:4945
std::string status
succeeded / failed
Definition: types.hpp:4935
Definition: types.hpp:4912
std::string text
Raw response text of the tool; empty when absent.
Definition: types.hpp:4920
std::string query
The query the tool executed; empty when absent.
Definition: types.hpp:4918
std::string tool_args_json
Parsed request arguments, as a JSON string; empty when absent.
Definition: types.hpp:4922
std::vector< std::string > reference_domains
Domains of the referenced sources.
Definition: types.hpp:4916
std::string data_json
Definition: types.hpp:4925
std::vector< Reference > references
Sources referenced by the tool result.
Definition: types.hpp:4914
int64_t started_at
Start time, Unix timestamp in seconds.
Definition: types.hpp:4906
std::string tool_func_name
Definition: types.hpp:4894
int32_t iteration
Definition: types.hpp:4904
std::string tool_args
Call arguments as a JSON string.
Definition: types.hpp:4896
std::string tool_use_id
Unique ID of this call; matches the finished event.
Definition: types.hpp:4889
std::vector< std::string > tip_chips
Short tags accompanying tips; may be empty.
Definition: types.hpp:4901
std::string tips
Definition: types.hpp:4899
std::string tool_name
Localized display name of the tool.
Definition: types.hpp:4891
Definition: types.hpp:5134
std::string outputs_json
The current plan content, as a JSON string; empty when absent.
Definition: types.hpp:5140
std::string tool_name
Identifies the planning tool.
Definition: types.hpp:5142
int64_t started_at
Time of the change, Unix timestamp in seconds.
Definition: types.hpp:5138
std::string node_id
ID of the planning node.
Definition: types.hpp:5136
Definition: types.hpp:5124
std::string masked_query
The masked query.
Definition: types.hpp:5128
std::string raw_query
The original user query.
Definition: types.hpp:5126
One question the Agent needs you to answer.
Definition: types.hpp:4700
bool multi_select
Whether multiple options may be selected.
Definition: types.hpp:4706
std::string question
Question text.
Definition: types.hpp:4702
std::vector< QuestionOption > options
Options; empty means free-form answer.
Definition: types.hpp:4704
One option of a Question.
Definition: types.hpp:4691
std::string description
Option text.
Definition: types.hpp:4695
std::string label
Short UI label for the option.
Definition: types.hpp:4693
A source referenced by the answer.
Definition: types.hpp:4672
int32_t original_index
Original reference index as provided by the source.
Definition: types.hpp:4676
std::string content_json
Full nested reference payload, as a JSON string; empty when absent.
Definition: types.hpp:4686
std::string title
Reference title.
Definition: types.hpp:4682
std::string ref_type
Reference type (wire field type)
Definition: types.hpp:4678
std::string id
Reference identifier.
Definition: types.hpp:4680
int32_t index
Reference index.
Definition: types.hpp:4674
std::string url
Reference URL.
Definition: types.hpp:4684
Payload of a SubagentFinished conversation stream event.
Definition: types.hpp:5021
std::string status
succeeded / failed
Definition: types.hpp:5027
std::string node_id
ID of the node that spawned the subagent.
Definition: types.hpp:5023
SubagentOutputs outputs
Subagent result: goal, result, and the timeline of tool calls it made.
Definition: types.hpp:5035
std::string error
Error description on failure.
Definition: types.hpp:5033
std::string tool_use_id
Matches the tool_use_id of SubagentStarted.
Definition: types.hpp:5025
double elapsed_time
Total subagent duration in seconds.
Definition: types.hpp:5031
int64_t started_at
Start time, Unix timestamp in seconds.
Definition: types.hpp:5029
outputs of a SubagentFinished conversation stream event.
Definition: types.hpp:5009
std::string result
The subagent's result; empty when absent.
Definition: types.hpp:5013
std::string goal
The goal that was assigned to the subagent; empty when absent.
Definition: types.hpp:5011
std::string subagent_tools_json
Definition: types.hpp:5016
std::string subagent_tool_name
Name of the tool the subagent called.
Definition: types.hpp:4994
std::string subagent_status
Status of that call: running / succeeded / failed.
Definition: types.hpp:4998
std::string subagent_tool_args
Arguments of that call, as a JSON string.
Definition: types.hpp:4996
int32_t subagent_iteration
The subagent's internal round number.
Definition: types.hpp:5002
std::string node_id
ID of the node that spawned the subagent.
Definition: types.hpp:4990
int64_t started_at
Start time, Unix timestamp in seconds.
Definition: types.hpp:5004
std::string parent_tool_call_id
tool_use_id of the owning SubagentStarted event
Definition: types.hpp:4992
int64_t subagent_duration_ms
Duration of that call in milliseconds.
Definition: types.hpp:5000
std::string tool_use_id
Unique ID of this spawn; matches the finished event.
Definition: types.hpp:4970
int64_t started_at
Start time, Unix timestamp in seconds.
Definition: types.hpp:4972
std::string prompt
Full task prompt given to the subagent.
Definition: types.hpp:4976
std::string tools_json
Definition: types.hpp:4981
std::string subagent_id
Subagent identifier; may be empty.
Definition: types.hpp:4978
std::string goal
Goal assigned to the subagent.
Definition: types.hpp:4974
std::string node_id
ID of the node that spawned the subagent.
Definition: types.hpp:4968
int32_t elapsed_time
Reasoning duration in seconds.
Definition: types.hpp:4880
int64_t finished_at
Finish time, Unix timestamp in seconds.
Definition: types.hpp:4878
int64_t started_at
Start time, Unix timestamp in seconds.
Definition: types.hpp:4869
inputs of a WorkflowStarted conversation stream event.
Definition: types.hpp:4837
std::string message_id
Message ID of this round.
Definition: types.hpp:4843
std::string chat_uid
Conversation identifier.
Definition: types.hpp:4841
int64_t chat_id
ID of the owning conversation.
Definition: types.hpp:4839
std::string query
The question that was asked.
Definition: types.hpp:4845
int64_t workflow_id
Internal workflow run ID.
Definition: types.hpp:4859
int64_t started_at
Unix timestamp in seconds.
Definition: types.hpp:4857
WorkflowStartedInputs inputs
Echoes the run's inputs.
Definition: types.hpp:4855
bool hit_cache
Whether this run's answer was served from a cache.
Definition: types.hpp:4853
A Workspace the current account belongs to.
Definition: types.hpp:4609
std::string name
Workspace name.
Definition: types.hpp:4613
int64_t created_at
Creation time, Unix timestamp in seconds.
Definition: types.hpp:4615
std::string id
Workspace ID.
Definition: types.hpp:4611
int64_t updated_at
Last updated time, Unix timestamp in seconds.
Definition: types.hpp:4617
Response for AgentContext::workspaces.
Definition: types.hpp:4622
std::vector< Workspace > workspaces
Workspaces the current account belongs to.
Definition: types.hpp:4624
Definition: types.hpp:4317
int32_t scope
Scope.
Definition: types.hpp:4327
int32_t frequency
Trigger frequency: 1=daily, 2=every_time, 3=once.
Definition: types.hpp:4325
std::string id
Alert ID.
Definition: types.hpp:4319
std::string indicator_id
Condition: "1"=price_rise, "2"=price_fall, "3"=pct_rise, "4"=pct_fall.
Definition: types.hpp:4321
AlertValueMap value_map
Trigger threshold.
Definition: types.hpp:4333
bool enabled
Whether the alert is currently active.
Definition: types.hpp:4323
std::string text
Human-readable description of the trigger condition.
Definition: types.hpp:4329
std::vector< int32_t > state
Trigger state flags.
Definition: types.hpp:4331
Response for AlertContext::list — alerts grouped by security.
Definition: types.hpp:4361
std::vector< AlertSymbolGroup > lists
Alert groups, one per security.
Definition: types.hpp:4363
All price alerts for one security.
Definition: types.hpp:4338
std::string p_chg
Day change percentage.
Definition: types.hpp:4352
std::vector< AlertItem > indicators
Alert items for this security.
Definition: types.hpp:4356
std::string name
Security name.
Definition: types.hpp:4346
std::string code
Ticker code (without market)
Definition: types.hpp:4342
std::string market
Market, e.g. "HK".
Definition: types.hpp:4344
std::string chg
Day change amount.
Definition: types.hpp:4350
std::string price
Latest price.
Definition: types.hpp:4348
std::string product
Product type (may be empty)
Definition: types.hpp:4354
std::string symbol
Security symbol.
Definition: types.hpp:4340
Definition: types.hpp:4309
std::optional< double > chg
Percentage-change threshold (nullopt if not set)
Definition: types.hpp:4313
std::string price
Absolute price threshold as a decimal string (empty if not set)
Definition: types.hpp:4311
Options for creating a topic.
Definition: types.hpp:3216
std::vector< std::string > tickers
Related stock tickers, format: {symbol}.{market}, max 10.
Definition: types.hpp:3224
std::string body
Topic body in Markdown format (required)
Definition: types.hpp:3220
std::string title
Topic title (required)
Definition: types.hpp:3218
std::vector< std::string > hashtags
Hashtag names, max 5.
Definition: types.hpp:3226
std::string topic_type
Content type: "article" or "post" (empty = default "post")
Definition: types.hpp:3222
Options for listing topics created by the current authenticated user.
Definition: types.hpp:3205
int32_t page
Page number (0 = default 1)
Definition: types.hpp:3207
int32_t size
Records per page, range 1~500 (0 = default 50)
Definition: types.hpp:3209
std::string topic_type
Filter by content type: "article" or "post" (empty = all)
Definition: types.hpp:3211
News item.
Definition: types.hpp:3125
std::string title
Title.
Definition: types.hpp:3129
int32_t likes_count
Likes count.
Definition: types.hpp:3139
std::string url
URL.
Definition: types.hpp:3133
int32_t shares_count
Shares count.
Definition: types.hpp:3141
std::string description
Description.
Definition: types.hpp:3131
int32_t comments_count
Comments count.
Definition: types.hpp:3137
int64_t published_at
Published time (Unix timestamp)
Definition: types.hpp:3135
std::string id
News ID.
Definition: types.hpp:3127
My topic item (created by the current authenticated user)
Definition: types.hpp:3168
std::vector< std::string > hashtags
Hashtag names.
Definition: types.hpp:3182
int32_t comments_count
Comments count.
Definition: types.hpp:3188
std::string title
Title.
Definition: types.hpp:3172
int32_t views_count
Views count.
Definition: types.hpp:3190
std::string id
Topic ID.
Definition: types.hpp:3170
int64_t updated_at
Updated time (Unix timestamp)
Definition: types.hpp:3200
std::vector< std::string > tickers
Related stock tickers.
Definition: types.hpp:3180
int64_t created_at
Created time (Unix timestamp)
Definition: types.hpp:3198
std::string description
Plain text excerpt.
Definition: types.hpp:3174
int32_t shares_count
Shares count.
Definition: types.hpp:3192
std::vector< TopicImage > images
Images.
Definition: types.hpp:3184
int32_t likes_count
Likes count.
Definition: types.hpp:3186
std::string detail_url
URL to the full topic page.
Definition: types.hpp:3196
std::string topic_type
Content type: "article" or "post".
Definition: types.hpp:3194
TopicAuthor author
Author.
Definition: types.hpp:3178
std::string body
Markdown body.
Definition: types.hpp:3176
Topic author.
Definition: types.hpp:3146
std::string member_id
Member ID.
Definition: types.hpp:3148
std::string avatar
Avatar URL.
Definition: types.hpp:3152
std::string name
Display name.
Definition: types.hpp:3150
Topic image.
Definition: types.hpp:3157
std::string lg
Large image URL.
Definition: types.hpp:3163
std::string url
Original image URL.
Definition: types.hpp:3159
std::string sm
Small thumbnail URL.
Definition: types.hpp:3161
Topic item.
Definition: types.hpp:3104
std::string url
URL.
Definition: types.hpp:3112
int32_t likes_count
Likes count.
Definition: types.hpp:3118
std::string description
Description.
Definition: types.hpp:3110
std::string title
Title.
Definition: types.hpp:3108
int64_t published_at
Published time (Unix timestamp)
Definition: types.hpp:3114
int32_t shares_count
Shares count.
Definition: types.hpp:3120
std::string id
Topic ID.
Definition: types.hpp:3106
int32_t comments_count
Comments count.
Definition: types.hpp:3116
Response for DCAContext::calc_date — next projected trade date.
Definition: types.hpp:4480
std::string trade_date
Next projected trade date (unix timestamp string)
Definition: types.hpp:4482
Response for DCAContext::create_dca and DCAContext::update_dca.
Definition: types.hpp:4487
std::string plan_id
The plan ID of the created or updated DCA plan.
Definition: types.hpp:4489
One DCA execution history record.
Definition: types.hpp:4494
std::string order_id
Definition: types.hpp:4496
std::string action
Definition: types.hpp:4498
std::string order_type
Definition: types.hpp:4499
std::string created_at
Definition: types.hpp:4495
std::string rejected_reason
Definition: types.hpp:4503
std::string executed_price
Definition: types.hpp:4501
std::string executed_amount
Definition: types.hpp:4502
std::string symbol
Definition: types.hpp:4504
std::string executed_qty
Definition: types.hpp:4500
std::string status
Definition: types.hpp:4497
Paginated DCA execution history response.
Definition: types.hpp:4509
bool has_more
Definition: types.hpp:4511
std::vector< DcaHistoryRecord > records
Definition: types.hpp:4510
Response for DCAContext::list and write operations.
Definition: types.hpp:4438
std::vector< DcaPlan > plans
DCA plans.
Definition: types.hpp:4440
One DCA (dollar-cost averaging) investment plan.
Definition: types.hpp:4389
std::string updated_at
Last updated time.
Definition: types.hpp:4421
std::string average_cost
Average cost.
Definition: types.hpp:4431
DCAFrequency invest_frequency
Investment frequency.
Definition: types.hpp:4409
std::string aaid
Account ID.
Definition: types.hpp:4399
std::string next_trd_date
Next investment date.
Definition: types.hpp:4423
std::string cum_amount
Cumulative invested amount.
Definition: types.hpp:4427
std::string invest_day_of_week
Day of week for weekly plans (e.g. "Mon")
Definition: types.hpp:4411
std::string stock_name
Security name.
Definition: types.hpp:4425
std::string alter_hours
Advance reminder hours ("1", "6", or "12")
Definition: types.hpp:4417
bool allow_margin_finance
Whether margin finance is allowed.
Definition: types.hpp:4415
std::string symbol
Security symbol.
Definition: types.hpp:4395
DCAStatus status
Plan status.
Definition: types.hpp:4393
int64_t issue_number
Number of completed investment periods.
Definition: types.hpp:4429
std::string display_account
Display account.
Definition: types.hpp:4403
std::string plan_id
Plan ID.
Definition: types.hpp:4391
std::string created_at
Creation time.
Definition: types.hpp:4419
std::string account_channel
Account channel.
Definition: types.hpp:4401
std::string per_invest_amount
Investment amount per period.
Definition: types.hpp:4407
std::string invest_day_of_month
Day of month for monthly plans.
Definition: types.hpp:4413
std::string member_id
Member ID.
Definition: types.hpp:4397
std::string cum_profit
Cumulative profit/loss.
Definition: types.hpp:4433
longbridge::Market market
Market.
Definition: types.hpp:4405
Response for DCAContext::stats — aggregate DCA statistics.
Definition: types.hpp:4445
std::string suspended_count
Number of suspended plans.
Definition: types.hpp:4451
std::string finished_count
Number of finished plans.
Definition: types.hpp:4449
std::vector< DcaPlan > nearest_plans
Nearest upcoming plans.
Definition: types.hpp:4453
std::string active_count
Number of active plans.
Definition: types.hpp:4447
std::string total_amount
Total invested amount.
Definition: types.hpp:4457
std::string total_profit
Total profit/loss.
Definition: types.hpp:4459
std::string rest_days
Days until next investment.
Definition: types.hpp:4455
DCA support info for one security.
Definition: types.hpp:4464
std::string symbol
Security symbol.
Definition: types.hpp:4466
bool support_regular_saving
Whether DCA is supported for this security.
Definition: types.hpp:4468
Response for DCAContext::check_support.
Definition: types.hpp:4473
std::vector< DcaSupportInfo > infos
Support info per security.
Definition: types.hpp:4475
One ETF asset allocation group (grouped by element type)
Definition: types.hpp:4285
ElementType asset_type
Element type of this group.
Definition: types.hpp:4289
std::string report_date
Report date (e.g. 20260601)
Definition: types.hpp:4287
std::vector< AssetAllocationItem > lists
Elements.
Definition: types.hpp:4291
One element of an ETF asset allocation group.
Definition: types.hpp:4268
std::string symbol
Security symbol (holdings only, e.g. NVDA.US)
Definition: types.hpp:4276
std::string position_ratio
Position ratio (e.g. 0.0861114)
Definition: types.hpp:4274
std::optional< HoldingDetail > holding_detail
Holding detail (holdings only)
Definition: types.hpp:4280
std::string name
Element name.
Definition: types.hpp:4270
std::map< std::string, std::string > name_locales
Localized names (locale → name)
Definition: types.hpp:4278
std::string code
Security code (holdings only, e.g. NVDA)
Definition: types.hpp:4272
ETF asset allocation response.
Definition: types.hpp:4296
std::vector< AssetAllocationGroup > info
Asset allocation groups.
Definition: types.hpp:4298
One business/regional segment item in a historical snapshot.
Definition: types.hpp:4064
std::string percent
Definition: types.hpp:4066
std::string value
Definition: types.hpp:4067
std::string name
Definition: types.hpp:4065
One business segment item (latest snapshot).
Definition: types.hpp:4048
std::string percent
Definition: types.hpp:4050
std::string name
Definition: types.hpp:4049
One historical business segments snapshot.
Definition: types.hpp:4072
std::string date
Definition: types.hpp:4073
std::vector< BusinessSegmentHistoryItem > business
Definition: types.hpp:4076
std::string currency
Definition: types.hpp:4075
std::string total
Definition: types.hpp:4074
std::vector< BusinessSegmentHistoryItem > regionals
Definition: types.hpp:4077
Business segments history response.
Definition: types.hpp:4082
std::vector< BusinessSegmentsHistoricalItem > historical
Definition: types.hpp:4083
Business segments response.
Definition: types.hpp:4055
std::string currency
Definition: types.hpp:4058
std::vector< BusinessSegmentItem > business
Definition: types.hpp:4059
std::string total
Definition: types.hpp:4057
std::string date
Definition: types.hpp:4056
Buyback data response.
Definition: types.hpp:3991
std::vector< BuybackHistoryItem > buyback_history
Definition: types.hpp:3993
std::optional< RecentBuybacks > recent_buybacks
Definition: types.hpp:3992
std::vector< BuybackRatios > buyback_ratios
Definition: types.hpp:3994
Historical annual buyback data point.
Definition: types.hpp:3973
std::string fiscal_year_range
Definition: types.hpp:3975
std::string currency
Definition: types.hpp:3979
std::string net_buyback_growth_rate
Definition: types.hpp:3978
std::string fiscal_year
Definition: types.hpp:3974
std::string net_buyback_yield
Definition: types.hpp:3977
std::string net_buyback
Definition: types.hpp:3976
Buyback payout and cash-flow ratios.
Definition: types.hpp:3984
std::string net_buyback_to_cashflow_ratio
Definition: types.hpp:3986
std::string net_buyback_payout_ratio
Definition: types.hpp:3985
Company overview and profile information.
Definition: types.hpp:3696
std::string fax
Definition: types.hpp:3715
std::string founded
Definition: types.hpp:3699
std::string address
Definition: types.hpp:3703
std::string website
Definition: types.hpp:3705
std::string ticker
Definition: types.hpp:3719
std::string year_end
Definition: types.hpp:3712
std::string profile
Definition: types.hpp:3720
std::string audit_inst
Definition: types.hpp:3710
int32_t sector
Definition: types.hpp:3721
std::string listing_date
Definition: types.hpp:3700
std::string category
Definition: types.hpp:3711
std::string chairman
Definition: types.hpp:3708
std::string name
Definition: types.hpp:3697
std::string phone
Definition: types.hpp:3714
std::string email
Definition: types.hpp:3716
std::string issue_price
Definition: types.hpp:3706
std::string employees
Definition: types.hpp:3713
std::string manager
Definition: types.hpp:3718
std::string legal_repr
Definition: types.hpp:3717
std::string region
Definition: types.hpp:3702
std::string office_address
Definition: types.hpp:3704
std::string secretary
Definition: types.hpp:3709
std::string company_name
Definition: types.hpp:3698
std::string shares_offered
Definition: types.hpp:3707
std::string market
Definition: types.hpp:3701
One consensus estimate detail for a financial metric.
Definition: types.hpp:3852
std::string comp_desc
Definition: types.hpp:3859
std::string key
Definition: types.hpp:3853
std::string estimate
Definition: types.hpp:3857
std::string description
Definition: types.hpp:3855
std::string name
Definition: types.hpp:3854
std::string comp
Definition: types.hpp:3860
bool is_released
Definition: types.hpp:3861
std::string actual
Definition: types.hpp:3856
std::string comp_value
Definition: types.hpp:3858
Consensus report for one fiscal period.
Definition: types.hpp:3866
std::string period_text
Definition: types.hpp:3869
int32_t fiscal_year
Definition: types.hpp:3867
std::vector< ConsensusDetail > details
Definition: types.hpp:3870
std::string fiscal_period
Definition: types.hpp:3868
One corporate action event (dividend, split, etc.).
Definition: types.hpp:3772
std::string id
Definition: types.hpp:3773
bool is_delay
Definition: types.hpp:3782
std::string date_str
Definition: types.hpp:3775
std::string act_desc
Definition: types.hpp:3779
std::string date_zone
Definition: types.hpp:3777
std::string act_type
Definition: types.hpp:3778
bool recent
Definition: types.hpp:3781
std::string date_type
Definition: types.hpp:3776
std::string date
Definition: types.hpp:3774
std::string action
Definition: types.hpp:3780
std::string delay_content
Definition: types.hpp:3783
Collection of corporate action events.
Definition: types.hpp:3788
std::vector< CorpActionItem > items
Definition: types.hpp:3789
One dividend event for a security.
Definition: types.hpp:3519
std::string symbol
Definition: types.hpp:3520
std::string record_date
Definition: types.hpp:3523
std::string desc
Definition: types.hpp:3522
std::string ex_date
Definition: types.hpp:3524
std::string id
Definition: types.hpp:3521
std::string payment_date
Definition: types.hpp:3525
List of dividend events.
Definition: types.hpp:3530
std::vector< DividendItem > list
Definition: types.hpp:3531
Executives for one security.
Definition: types.hpp:3950
std::string symbol
Definition: types.hpp:3951
int32_t total
Definition: types.hpp:3953
std::vector< Professional > professionals
Definition: types.hpp:3954
std::string forward_url
Definition: types.hpp:3952
List of executive groups per security.
Definition: types.hpp:3959
std::vector< ExecutiveGroup > professional_list
Definition: types.hpp:3960
Financial consensus response.
Definition: types.hpp:3875
int32_t current_index
Definition: types.hpp:3877
std::string current_period
Definition: types.hpp:3880
std::vector< ConsensusReport > list
Definition: types.hpp:3876
std::string currency
Definition: types.hpp:3878
std::vector< std::string > opt_periods
Definition: types.hpp:3879
Financial report snapshot response.
Definition: types.hpp:4174
std::string fr_asset_turn_ttm
Definition: types.hpp:4194
std::optional< SnapshotForecastMetric > fo_ebit
Definition: types.hpp:4182
std::string fp_end
Definition: types.hpp:4178
std::string name
Definition: types.hpp:4175
std::optional< SnapshotReportedMetric > fr_invest_cash
Definition: types.hpp:4187
std::string currency
Definition: types.hpp:4179
std::string fp_start
Definition: types.hpp:4177
std::string fr_leverage_ttm
Definition: types.hpp:4195
std::string report_desc
Definition: types.hpp:4180
std::optional< SnapshotReportedMetric > fr_profit
Definition: types.hpp:4185
std::optional< SnapshotReportedMetric > fr_operate_cash
Definition: types.hpp:4186
std::optional< SnapshotReportedMetric > fr_total_assets
Definition: types.hpp:4189
std::optional< SnapshotReportedMetric > fr_revenue
Definition: types.hpp:4184
std::string fr_roe_ttm
Definition: types.hpp:4191
std::optional< SnapshotForecastMetric > fo_eps
Definition: types.hpp:4183
std::string fr_profit_margin_ttm
Definition: types.hpp:4193
std::string fr_profit_margin
Definition: types.hpp:4192
std::optional< SnapshotForecastMetric > fo_revenue
Definition: types.hpp:4181
std::optional< SnapshotReportedMetric > fr_finance_cash
Definition: types.hpp:4188
std::optional< SnapshotReportedMetric > fr_total_liability
Definition: types.hpp:4190
std::string fr_debt_assets_ratio
Definition: types.hpp:4196
std::string ticker
Definition: types.hpp:4176
Financial reports — list_json contains serialized JSON.
Definition: types.hpp:3846
std::string list_json
Definition: types.hpp:3847
Collection of forecast EPS items.
Definition: types.hpp:3650
std::vector< ForecastEpsItem > items
Definition: types.hpp:3651
Forecast EPS data point from institutional analysts.
Definition: types.hpp:3636
std::string forecast_eps_highest
Definition: types.hpp:3640
std::string forecast_eps_median
Definition: types.hpp:3637
int64_t forecast_start_date
Definition: types.hpp:3644
int32_t institution_total
Definition: types.hpp:3641
std::string forecast_eps_mean
Definition: types.hpp:3638
int32_t institution_up
Definition: types.hpp:3642
int64_t forecast_end_date
Definition: types.hpp:3645
std::string forecast_eps_lowest
Definition: types.hpp:3639
int32_t institution_down
Definition: types.hpp:3643
One fund's holding record for a security.
Definition: types.hpp:3755
std::string code
Definition: types.hpp:3756
std::string name
Definition: types.hpp:3759
std::string currency
Definition: types.hpp:3758
std::string report_date
Definition: types.hpp:3761
std::string position_ratio
Definition: types.hpp:3760
std::string symbol
Definition: types.hpp:3757
Collection of fund holders for a security.
Definition: types.hpp:3766
std::vector< FundHolder > lists
Definition: types.hpp:3767
Holding detail of an ETF asset allocation element (holdings only)
Definition: types.hpp:4251
std::string industry_id
Industry ID.
Definition: types.hpp:4253
std::string index_name
Index name.
Definition: types.hpp:4259
std::string industry_name
Industry name.
Definition: types.hpp:4255
std::string holding_type_name
Holding type name.
Definition: types.hpp:4263
std::string holding_type
Holding type (e.g. E for stock)
Definition: types.hpp:4261
std::string index
Index counter ID (e.g. BK/US/CP99000)
Definition: types.hpp:4257
std::string ytd_chg
Definition: types.hpp:4145
std::string chg
Definition: types.hpp:4144
std::string symbol
Definition: types.hpp:4142
std::string next_json
Definition: types.hpp:4146
std::string name
Definition: types.hpp:4141
int32_t stock_num
Definition: types.hpp:4143
Industry peers response.
Definition: types.hpp:4151
std::optional< IndustryPeersTop > top
Definition: types.hpp:4152
std::optional< IndustryPeerNode > chain
Definition: types.hpp:4153
Top-level industry info in the peers response.
Definition: types.hpp:4131
std::string name
Definition: types.hpp:4132
std::string market
Definition: types.hpp:4133
A group of ranked industry items.
Definition: types.hpp:4119
std::vector< IndustryRankItem > lists
Definition: types.hpp:4120
One ranked industry item.
Definition: types.hpp:4106
std::string leading_ticker
Definition: types.hpp:4111
std::string leading_name
Definition: types.hpp:4110
std::string symbol
Definition: types.hpp:4108
std::string value_name
Definition: types.hpp:4113
std::string value_data
Definition: types.hpp:4114
std::string leading_chg
Definition: types.hpp:4112
std::string chg
Definition: types.hpp:4109
std::string name
Definition: types.hpp:4107
Industry rank response.
Definition: types.hpp:4125
std::vector< IndustryRankGroup > items
Definition: types.hpp:4126
Industry valuation distribution for PE, PB, PS ratios.
Definition: types.hpp:3929
std::optional< ValuationDist > pb
Definition: types.hpp:3931
std::optional< ValuationDist > pe
Definition: types.hpp:3930
std::optional< ValuationDist > ps
Definition: types.hpp:3932
Historical valuation snapshot for an industry peer.
Definition: types.hpp:3885
std::string ps
Definition: types.hpp:3889
std::string date
Definition: types.hpp:3886
std::string pe
Definition: types.hpp:3887
std::string pb
Definition: types.hpp:3888
Valuation data for one industry peer security.
Definition: types.hpp:3894
std::string currency
Definition: types.hpp:3897
std::string five_y_avg_dps
Definition: types.hpp:3904
std::string dps
Definition: types.hpp:3901
std::string div_yld
Definition: types.hpp:3902
std::string pe
Definition: types.hpp:3905
std::string assets
Definition: types.hpp:3898
std::vector< IndustryValuationHistory > history
Definition: types.hpp:3906
std::string bps
Definition: types.hpp:3899
std::string div_payout_ratio
Definition: types.hpp:3903
std::string name
Definition: types.hpp:3896
std::string eps
Definition: types.hpp:3900
std::string symbol
Definition: types.hpp:3895
List of industry valuation items.
Definition: types.hpp:3911
std::vector< IndustryValuationItem > list
Definition: types.hpp:3912
One evaluation data point in an institutional rating detail series.
Definition: types.hpp:3602
Detailed institutional rating including historical evaluate and target series.
Definition: types.hpp:3625
std::string prediction_accuracy
Definition: types.hpp:3629
std::string updated_at
Definition: types.hpp:3630
std::vector< InstitutionRatingDetailTargetItem > target_list
Definition: types.hpp:3631
std::string ccy_symbol
Definition: types.hpp:3626
std::string data_percent
Definition: types.hpp:3628
std::vector< InstitutionRatingDetailEvaluateItem > evaluate_list
Definition: types.hpp:3627
One target price data point in an institutional rating detail series.
Definition: types.hpp:3613
std::string min_target
Definition: types.hpp:3617
std::string avg_target
Definition: types.hpp:3614
std::string max_target
Definition: types.hpp:3616
std::string timestamp
Definition: types.hpp:3620
Combined latest and summary institutional rating data.
Definition: types.hpp:3595
InstitutionRatingLatest latest
Definition: types.hpp:3596
InstitutionRatingSummary summary
Definition: types.hpp:3597
Latest institutional rating data including industry comparison.
Definition: types.hpp:3571
RatingEvaluate evaluate
Definition: types.hpp:3572
int32_t industry_median
Definition: types.hpp:3579
RatingTarget target
Definition: types.hpp:3573
int32_t industry_rank
Definition: types.hpp:3576
std::string industry_name
Definition: types.hpp:3575
int32_t industry_mean
Definition: types.hpp:3578
int32_t industry_total
Definition: types.hpp:3577
int64_t industry_id
Definition: types.hpp:3574
Institutional rating summary with current recommendation and target price.
Definition: types.hpp:3584
std::string updated_at
Definition: types.hpp:3590
std::string target
Definition: types.hpp:3589
std::string change
Definition: types.hpp:3586
std::string ccy_symbol
Definition: types.hpp:3585
RatingSummaryEvaluate evaluate
Definition: types.hpp:3587
InstitutionRecommend recommend
Definition: types.hpp:3588
One historical rating distribution snapshot.
Definition: types.hpp:4088
std::string sell
Definition: types.hpp:4094
std::string over
Definition: types.hpp:4091
std::string under
Definition: types.hpp:4093
std::string hold
Definition: types.hpp:4092
std::string total
Definition: types.hpp:4095
std::string buy
Definition: types.hpp:4090
std::string date
Definition: types.hpp:4089
Institution rating views response.
Definition: types.hpp:4100
std::vector< InstitutionRatingViewItem > elist
Definition: types.hpp:4101
Investment relationship data including parent/subsidiary securities.
Definition: types.hpp:3808
std::string forward_url
Definition: types.hpp:3809
std::vector< InvestSecurity > invest_securities
Definition: types.hpp:3810
One security in an investment relationship (parent/subsidiary holding).
Definition: types.hpp:3794
std::string company_name_en
Definition: types.hpp:3797
std::string company_id
Definition: types.hpp:3795
std::string symbol
Definition: types.hpp:3799
std::string shares_value
Definition: types.hpp:3803
std::string percent_of_shares
Definition: types.hpp:3801
std::string company_name
Definition: types.hpp:3796
std::string currency
Definition: types.hpp:3800
std::string company_name_zhcn
Definition: types.hpp:3798
std::string shares_rank
Definition: types.hpp:3802
One operating indicator from a financial report.
Definition: types.hpp:3815
std::string indicator_value
Definition: types.hpp:3818
std::string indicator_name
Definition: types.hpp:3817
std::string field_name
Definition: types.hpp:3816
std::string yoy
Definition: types.hpp:3819
One operating report item with associated indicators.
Definition: types.hpp:3824
std::vector< OperatingIndicator > indicators
Definition: types.hpp:3835
std::string txt
Definition: types.hpp:3828
std::string financial_currency
Definition: types.hpp:3831
std::string title
Definition: types.hpp:3827
bool latest
Definition: types.hpp:3829
std::string financial_region
Definition: types.hpp:3833
std::string web_url
Definition: types.hpp:3830
std::string financial_name
Definition: types.hpp:3832
std::string financial_report
Definition: types.hpp:3834
std::string id
Definition: types.hpp:3825
std::string report
Definition: types.hpp:3826
List of operating report items.
Definition: types.hpp:3840
std::vector< OperatingItem > list
Definition: types.hpp:3841
One executive or board member.
Definition: types.hpp:3937
std::string title
Definition: types.hpp:3942
std::string id
Definition: types.hpp:3938
std::string name_en
Definition: types.hpp:3941
std::string photo
Definition: types.hpp:3944
std::string name
Definition: types.hpp:3939
std::string name_zhcn
Definition: types.hpp:3940
std::string biography
Definition: types.hpp:3943
std::string wiki_url
Definition: types.hpp:3945
One rating category (e.g. growth, profitability).
Definition: types.hpp:4024
int32_t kind
Definition: types.hpp:4025
std::vector< RatingSubIndicatorGroup > sub_indicators
Definition: types.hpp:4026
Buy/sell/hold evaluation counts from institutional analysts.
Definition: types.hpp:3536
std::string end_date
Definition: types.hpp:3545
int32_t total
Definition: types.hpp:3543
int32_t under
Definition: types.hpp:3540
int32_t buy
Definition: types.hpp:3537
int32_t over
Definition: types.hpp:3538
int32_t hold
Definition: types.hpp:3539
int32_t sell
Definition: types.hpp:3541
std::string start_date
Definition: types.hpp:3544
int32_t no_opinion
Definition: types.hpp:3542
A rating indicator node (parent or leaf).
Definition: types.hpp:4009
std::string letter
Definition: types.hpp:4012
std::string name
Definition: types.hpp:4010
std::string score
Definition: types.hpp:4011
A leaf rating indicator with a raw value.
Definition: types.hpp:3999
std::string value_type
Definition: types.hpp:4002
std::string score
Definition: types.hpp:4003
std::string name
Definition: types.hpp:4000
std::string letter
Definition: types.hpp:4004
std::string value
Definition: types.hpp:4001
A group of sub-indicators under one category indicator.
Definition: types.hpp:4017
RatingIndicator indicator
Definition: types.hpp:4018
std::vector< RatingLeafIndicator > sub_indicators
Definition: types.hpp:4019
Summary evaluation counts for one rating period.
Definition: types.hpp:3560
int32_t under
Definition: types.hpp:3566
int32_t sell
Definition: types.hpp:3564
int32_t strong_buy
Definition: types.hpp:3565
std::string date
Definition: types.hpp:3562
int32_t buy
Definition: types.hpp:3561
int32_t hold
Definition: types.hpp:3563
Analyst price target range.
Definition: types.hpp:3550
std::string prev_close
Definition: types.hpp:3553
std::string start_date
Definition: types.hpp:3554
std::string end_date
Definition: types.hpp:3555
std::string lowest_price
Definition: types.hpp:3552
std::string highest_price
Definition: types.hpp:3551
TTM (trailing twelve months) buyback summary.
Definition: types.hpp:3965
std::string net_buyback_yield_ttm
Definition: types.hpp:3968
std::string currency
Definition: types.hpp:3966
std::string net_buyback_ttm
Definition: types.hpp:3967
One institutional or major shareholder record.
Definition: types.hpp:3735
std::string percent_of_shares
Definition: types.hpp:3739
std::vector< ShareholderStock > stocks
Definition: types.hpp:3742
std::string shares_changed
Definition: types.hpp:3740
std::string shareholder_name
Definition: types.hpp:3737
std::string institution_type
Definition: types.hpp:3738
std::string report_date
Definition: types.hpp:3741
std::string shareholder_id
Definition: types.hpp:3736
Paginated list of shareholders.
Definition: types.hpp:3747
std::string forward_url
Definition: types.hpp:3749
int32_t total
Definition: types.hpp:3750
std::vector< Shareholder > shareholder_list
Definition: types.hpp:3748
A security held by a shareholder.
Definition: types.hpp:3726
std::string market
Definition: types.hpp:3729
std::string chg
Definition: types.hpp:3730
std::string symbol
Definition: types.hpp:3727
std::string code
Definition: types.hpp:3728
A forecast metric in the financial report snapshot.
Definition: types.hpp:4158
std::string est_value
Definition: types.hpp:4162
std::string cmp_desc
Definition: types.hpp:4161
std::string yoy
Definition: types.hpp:4160
std::string value
Definition: types.hpp:4159
A reported metric in the financial report snapshot.
Definition: types.hpp:4167
std::string yoy
Definition: types.hpp:4169
std::string value
Definition: types.hpp:4168
Stock ratings response.
Definition: types.hpp:4031
int32_t multi_score_change
Definition: types.hpp:4037
std::string multi_score
Definition: types.hpp:4035
std::string industry_rank
Definition: types.hpp:4039
std::string multi_letter
Definition: types.hpp:4036
std::string style_txt_name
Definition: types.hpp:4032
std::string industry_median_score
Definition: types.hpp:4042
std::string industry_total
Definition: types.hpp:4040
std::vector< RatingCategory > ratings
Definition: types.hpp:4043
std::string scale_txt_name
Definition: types.hpp:4033
std::string report_period_txt
Definition: types.hpp:4034
std::string industry_name
Definition: types.hpp:4038
std::string industry_mean_score
Definition: types.hpp:4041
One security's valuation comparison item.
Definition: types.hpp:4210
std::string currency
Definition: types.hpp:4213
std::string pb
Definition: types.hpp:4217
std::string market_value
Definition: types.hpp:4214
std::string assets
Definition: types.hpp:4224
std::string eps
Definition: types.hpp:4220
std::string pe
Definition: types.hpp:4216
std::string symbol
Definition: types.hpp:4211
std::string name
Definition: types.hpp:4212
std::vector< ValuationHistoryPoint > history
Definition: types.hpp:4225
std::string ps
Definition: types.hpp:4218
std::string price_close
Definition: types.hpp:4215
std::string dps
Definition: types.hpp:4222
std::string roe
Definition: types.hpp:4219
std::string div_yld
Definition: types.hpp:4223
std::string bps
Definition: types.hpp:4221
Valuation comparison response.
Definition: types.hpp:4230
std::vector< ValuationComparisonItem > list
Definition: types.hpp:4231
Valuation data container.
Definition: types.hpp:3682
ValuationMetricsData metrics
Definition: types.hpp:3683
Distribution statistics for one valuation metric within an industry.
Definition: types.hpp:3917
std::string ranking
Definition: types.hpp:3922
std::string rank_total
Definition: types.hpp:3924
std::string high
Definition: types.hpp:3919
std::string low
Definition: types.hpp:3918
std::string value
Definition: types.hpp:3921
std::string rank_index
Definition: types.hpp:3923
std::string median
Definition: types.hpp:3920
One historical valuation data point.
Definition: types.hpp:4201
std::string ps
Definition: types.hpp:4205
std::string pe
Definition: types.hpp:4203
std::string date
Definition: types.hpp:4202
std::string pb
Definition: types.hpp:4204
Historical valuation response (PE, PB, PS without dividend yield).
Definition: types.hpp:3688
std::optional< ValuationMetricData > pe
Definition: types.hpp:3689
std::optional< ValuationMetricData > ps
Definition: types.hpp:3691
std::optional< ValuationMetricData > pb
Definition: types.hpp:3690
Historical data for one valuation metric (PE, PB, PS, or dividend yield).
Definition: types.hpp:3663
std::vector< ValuationPoint > list
Definition: types.hpp:3668
std::string high
Definition: types.hpp:3665
std::string low
Definition: types.hpp:3666
std::string desc
Definition: types.hpp:3664
std::string median
Definition: types.hpp:3667
All valuation metrics for a security.
Definition: types.hpp:3673
std::optional< ValuationMetricData > dvd_yld
Definition: types.hpp:3677
std::optional< ValuationMetricData > ps
Definition: types.hpp:3676
std::optional< ValuationMetricData > pb
Definition: types.hpp:3675
std::optional< ValuationMetricData > pe
Definition: types.hpp:3674
One data point in a valuation time series.
Definition: types.hpp:3656
int64_t timestamp
Definition: types.hpp:3657
std::string value
Definition: types.hpp:3658
Options for get grid trading order detail request.
Definition: types.hpp:2740
std::optional< int32_t > limit
Page size.
Definition: types.hpp:2746
std::string order_id
Grid master order ID.
Definition: types.hpp:2742
std::optional< std::string > history_id
History cursor for paging through the trigger history.
Definition: types.hpp:2744
Options for query grid trading orders by IDs request.
Definition: types.hpp:2733
std::vector< std::string > order_ids
Grid master order IDs.
Definition: types.hpp:2735
Options for get grid trading orders (list) request.
Definition: types.hpp:2714
std::optional< int32_t > limit
Page size.
Definition: types.hpp:2718
std::optional< std::string > sort_order
Sort order.
Definition: types.hpp:2728
std::optional< std::string > status
Comma-joined status filter (e.g. Performing,Suspended)
Definition: types.hpp:2722
std::optional< int32_t > page
Page number.
Definition: types.hpp:2716
std::optional< Market > market
Market.
Definition: types.hpp:2720
std::optional< std::string > sort_by
Sort field.
Definition: types.hpp:2726
std::optional< std::string > symbol
Security symbol filter (e.g. 700.HK)
Definition: types.hpp:2724
Options for get grid trading trigger history request.
Definition: types.hpp:2751
std::optional< int32_t > page
Page number.
Definition: types.hpp:2755
std::string grid_order_id
Grid master order ID.
Definition: types.hpp:2753
std::optional< int32_t > limit
Page size.
Definition: types.hpp:2757
A price-step (bid-size) rule entry from the symbol-info response.
Definition: types.hpp:3040
std::optional< Decimal > end_proceed
Range end price.
Definition: types.hpp:3044
std::optional< Decimal > str_proceed
Range start price (inclusive)
Definition: types.hpp:3042
std::optional< Decimal > bid_size
Price step within the range.
Definition: types.hpp:3046
Channel / authorization info nested in the symbol-info response.
Definition: types.hpp:3051
bool strategy_granted
Whether the strategy compliance authorization has been granted.
Definition: types.hpp:3053
std::string currency
Trading currency.
Definition: types.hpp:3057
std::vector< std::string > settlement_currency
Supported settlement currencies.
Definition: types.hpp:3059
bool support_rth
Whether the RTH toggle is supported.
Definition: types.hpp:3055
Detail of a grid trading order.
Definition: types.hpp:2902
GridLimitEvent upper_limit_event
Action at the upper bound.
Definition: types.hpp:2958
bool sub_has_more
Whether there are more sub-orders to page.
Definition: types.hpp:2978
std::string grid_status
Grid running status.
Definition: types.hpp:2912
std::optional< Decimal > pullback_spread
Pullback spread.
Definition: types.hpp:2938
std::vector< GridOrderHistory > grid_order_history
Lifecycle history entries.
Definition: types.hpp:2980
std::optional< Decimal > trigger_percent_up
Upward trigger percent.
Definition: types.hpp:2932
std::optional< int64_t > created_at
Created time (unix timestamp)
Definition: types.hpp:2966
std::vector< GridOrderSubOrder > grid_sub_orders
Triggered sub-orders.
Definition: types.hpp:2976
std::string stock_name
Stock name.
Definition: types.hpp:2908
GridLimitEvent lower_limit_event
Action at the lower bound.
Definition: types.hpp:2960
std::string status
Order status.
Definition: types.hpp:2910
std::string sleeping_reason
Sleeping reason, if any.
Definition: types.hpp:2916
std::string order_id
Grid master order ID.
Definition: types.hpp:2904
std::optional< int64_t > expire_time
Expiry time (unix timestamp)
Definition: types.hpp:2972
std::optional< Decimal > current_base_price
Current base price.
Definition: types.hpp:2920
std::optional< Decimal > lower_limit_price
Lower price bound.
Definition: types.hpp:2924
std::optional< Decimal > rebound_spread
Rebound spread.
Definition: types.hpp:2942
std::string grid_order_type_up
Sell-side grid order type (GMO / GLO / GTG)
Definition: types.hpp:2988
std::optional< int64_t > updated_at
Last updated time (unix timestamp)
Definition: types.hpp:2968
std::optional< Decimal > trigger_spread_down
Downward trigger spread.
Definition: types.hpp:2930
std::string gtd
Expiry date (YYYY-MM-DD, GTD)
Definition: types.hpp:2974
std::string settlement_currency
Settlement currency.
Definition: types.hpp:2970
std::optional< Decimal > upper_limit_price
Upper price bound.
Definition: types.hpp:2922
GridTimeInForce time_in_force
Time in force.
Definition: types.hpp:2946
int32_t trigger_buy_depth
Buy-side order-book depth.
Definition: types.hpp:2964
std::optional< Decimal > trigger_sell_quantity
Quantity per sell trigger.
Definition: types.hpp:2950
bool history_has_more
Whether there are more history entries to page.
Definition: types.hpp:2982
std::string suspend_reason
Suspend reason, if any.
Definition: types.hpp:2914
std::optional< Decimal > upper_limit_quantity
Quantity handled at the upper bound.
Definition: types.hpp:2954
int32_t trigger_sell_depth
Sell-side order-book depth.
Definition: types.hpp:2962
std::string symbol
Security symbol (e.g. 700.HK)
Definition: types.hpp:2906
std::optional< Decimal > trigger_spread_up
Upward trigger spread.
Definition: types.hpp:2928
std::optional< Decimal > trigger_percent_down
Downward trigger percent.
Definition: types.hpp:2934
TriggerPriceType trigger_price_type
Trigger price type.
Definition: types.hpp:2926
int32_t rth
Regular trading hours flag.
Definition: types.hpp:2986
bool multiple_trigger
Whether a single grid level may trigger multiple times.
Definition: types.hpp:2944
std::optional< Decimal > rebound_percent
Rebound percent.
Definition: types.hpp:2940
std::optional< Decimal > trigger_quantity
Quantity per trigger.
Definition: types.hpp:2948
std::optional< Decimal > pullback_percent
Pullback percent.
Definition: types.hpp:2936
std::optional< Decimal > lower_limit_quantity
Quantity handled at the lower bound.
Definition: types.hpp:2956
std::optional< Decimal > submitted_base_price
Submitted base price.
Definition: types.hpp:2918
std::string grid_order_type_down
Buy-side grid order type (GMO / GLO / GTG)
Definition: types.hpp:2990
std::optional< Decimal > trigger_buy_quantity
Quantity per buy trigger.
Definition: types.hpp:2952
bool support_shortsell
Whether short selling is allowed.
Definition: types.hpp:2984
A grid order lifecycle-history entry carried in the grid order detail.
Definition: types.hpp:2887
std::optional< int64_t > created_at
Created time (unix timestamp)
Definition: types.hpp:2891
std::string reason
Additional reason detail, if any.
Definition: types.hpp:2897
std::string history_id
History entry ID (paging cursor)
Definition: types.hpp:2889
std::string status
Status at this point.
Definition: types.hpp:2893
std::string suspend_reason
Suspend reason, if any.
Definition: types.hpp:2895
A grid trading order (element of the list / by-ids responses).
Definition: types.hpp:2769
std::optional< Decimal > current_base_price
Current base price.
Definition: types.hpp:2785
int32_t trigger_times
Number of times the grid has triggered.
Definition: types.hpp:2837
std::string symbol
Security symbol (e.g. 700.HK)
Definition: types.hpp:2773
std::string status
Order status.
Definition: types.hpp:2779
std::optional< Decimal > total_sell_quantity
Accumulated sold quantity.
Definition: types.hpp:2841
std::string settlement_currency
Settlement currency.
Definition: types.hpp:2845
std::optional< Decimal > submitted_base_price
Submitted base price.
Definition: types.hpp:2783
std::string order_id
Grid master order ID.
Definition: types.hpp:2771
GridLimitEvent upper_limit_event
Action at the upper bound.
Definition: types.hpp:2831
std::optional< Decimal > lower_limit_quantity
Quantity handled at the lower bound.
Definition: types.hpp:2829
std::optional< Decimal > rebound_percent
Rebound percent.
Definition: types.hpp:2809
bool support_shortsell
Whether short selling is allowed.
Definition: types.hpp:2855
std::optional< Decimal > lower_limit_price
Lower price bound.
Definition: types.hpp:2793
GridLimitEvent lower_limit_event
Action at the lower bound.
Definition: types.hpp:2833
std::optional< Decimal > post_trigger_base_price
Base price after the last trigger.
Definition: types.hpp:2789
std::optional< Decimal > pullback_percent
Pullback percent.
Definition: types.hpp:2805
int32_t rth
Regular trading hours flag.
Definition: types.hpp:2853
std::optional< Decimal > trigger_percent_down
Downward trigger percent.
Definition: types.hpp:2803
std::string grid_order_type_up
Sell-side grid order type (GMO / GLO / GTG)
Definition: types.hpp:2857
std::optional< Decimal > rebound_spread
Rebound spread.
Definition: types.hpp:2811
std::string trigger_buy_order_type
Buy-side execution order type (e.g. MO)
Definition: types.hpp:2815
std::optional< Decimal > trigger_quantity
Quantity per trigger.
Definition: types.hpp:2821
std::optional< Decimal > upper_limit_quantity
Quantity handled at the upper bound.
Definition: types.hpp:2827
std::string grid_order_type_down
Buy-side grid order type (GMO / GLO / GTG)
Definition: types.hpp:2859
std::optional< Decimal > pre_trigger_base_price
Base price before the last trigger.
Definition: types.hpp:2787
std::optional< Decimal > trigger_buy_quantity
Quantity per buy trigger.
Definition: types.hpp:2825
std::optional< Decimal > trigger_spread_up
Upward trigger spread.
Definition: types.hpp:2797
std::optional< Decimal > trigger_spread_down
Downward trigger spread.
Definition: types.hpp:2799
std::optional< Decimal > total_profit_balance
Accumulated profit balance.
Definition: types.hpp:2843
std::string stock_name
Stock name.
Definition: types.hpp:2775
bool multiple_trigger
Whether a single grid level may trigger multiple times.
Definition: types.hpp:2835
int32_t trigger_buy_depth
Buy-side order-book depth.
Definition: types.hpp:2819
std::string market
Market.
Definition: types.hpp:2777
std::string gtd
Expiry date (YYYY-MM-DD, GTD)
Definition: types.hpp:2849
std::optional< Decimal > trigger_percent_up
Upward trigger percent.
Definition: types.hpp:2801
GridTimeInForce time_in_force
Time in force.
Definition: types.hpp:2847
std::optional< Decimal > total_buy_quantity
Accumulated bought quantity.
Definition: types.hpp:2839
std::optional< Decimal > pullback_spread
Pullback spread.
Definition: types.hpp:2807
std::string grid_status
Grid running status.
Definition: types.hpp:2781
std::string trigger_sell_order_type
Sell-side execution order type (e.g. MO)
Definition: types.hpp:2813
std::optional< int64_t > created_at
Created time (unix timestamp)
Definition: types.hpp:2851
TriggerPriceType trigger_price_type
Trigger price type.
Definition: types.hpp:2795
std::optional< Decimal > trigger_sell_quantity
Quantity per sell trigger.
Definition: types.hpp:2823
std::optional< Decimal > upper_limit_price
Upper price bound.
Definition: types.hpp:2791
int32_t trigger_sell_depth
Sell-side order-book depth.
Definition: types.hpp:2817
A triggered sub-order carried in the grid order detail.
Definition: types.hpp:2864
std::string id
Sub-order ID.
Definition: types.hpp:2866
std::optional< Decimal > executed_qty
Executed quantity.
Definition: types.hpp:2874
std::optional< Decimal > price
Order price.
Definition: types.hpp:2868
std::optional< int64_t > submitted_at
Submitted time (unix timestamp)
Definition: types.hpp:2880
std::optional< Decimal > quantity
Order quantity.
Definition: types.hpp:2872
std::string order_type
Order type.
Definition: types.hpp:2870
std::string status
Order status.
Definition: types.hpp:2878
int32_t rth
Regular trading hours flag.
Definition: types.hpp:2882
int32_t action
Buy / sell direction.
Definition: types.hpp:2876
Response for get grid trading orders (list) request.
Definition: types.hpp:3083
std::vector< GridOrder > grid_order
Grid orders.
Definition: types.hpp:3085
bool has_more
Whether there are more pages.
Definition: types.hpp:3087
Security (symbol) info used to build a grid order.
Definition: types.hpp:3064
std::vector< GridBidSize > bid_sizes
Price-step (bid-size) rule table.
Definition: types.hpp:3076
std::optional< Decimal > lot_size
Board lot size.
Definition: types.hpp:3070
std::optional< Decimal > sell_lot_size
Sell-side board lot size.
Definition: types.hpp:3074
GridChannelInfo channel_info
Channel / authorization info (strategy grant, RTH, currencies)
Definition: types.hpp:3078
std::optional< Decimal > last_done
Latest quote price.
Definition: types.hpp:3068
std::string name
Security name.
Definition: types.hpp:3066
std::optional< Decimal > buy_lot_size
Buy-side board lot size.
Definition: types.hpp:3072
Definition: types.hpp:2559
std::optional< GridLimitEvent > lower_limit_event
Definition: types.hpp:2591
std::optional< bool > support_shortsell
Whether short selling is allowed.
Definition: types.hpp:2599
GridTradeRule & with_depths(int32_t sell, int32_t buy)
Set the sell / buy order-book depths (0 = use the order type).
Definition: types.hpp:2648
GridTradeRule & with_expire_time(int64_t unix_seconds)
Set the expiry time (unix seconds), used with a GTD time-in-force.
Definition: types.hpp:2685
std::optional< Decimal > submitted_base_price
Base price the grid is anchored to.
Definition: types.hpp:2561
std::optional< std::string > grid_order_type_down
Buy-side order type when depth is 0 (GMO / GLO / GTG)
Definition: types.hpp:2605
std::optional< int32_t > trigger_sell_depth
Sell-side order-book depth (-5..5, 0 = use grid_order_type_up)
Definition: types.hpp:2593
GridTradeRule & with_order_types(std::string up, std::string down)
Set the sell / buy order types (GMO / GLO / GTG).
Definition: types.hpp:2656
std::optional< Decimal > upper_limit_price
Upper price bound.
Definition: types.hpp:2563
std::optional< Decimal > trigger_spread_down
Downward trigger spread (absolute)
Definition: types.hpp:2571
std::optional< GridTimeInForce > time_in_force
Time in force (Day / GoodTilCanceled / GoodTilDate)
Definition: types.hpp:2579
std::optional< bool > multiple_trigger
Whether a single grid level may trigger multiple times.
Definition: types.hpp:2577
std::optional< Decimal > lower_limit_price
Lower price bound.
Definition: types.hpp:2565
std::optional< int32_t > trigger_buy_depth
Buy-side order-book depth (-5..5, 0 = use grid_order_type_down)
Definition: types.hpp:2595
std::optional< GridLimitEvent > upper_limit_event
Definition: types.hpp:2588
std::optional< int64_t > expire_time
Expiry time (unix seconds), used with GTD.
Definition: types.hpp:2585
static GridTradeRule create(Decimal base_price, Decimal upper_price, Decimal lower_price, GridTrigger trigger, Decimal quantity, Decimal upper_quantity, Decimal lower_quantity, GridTimeInForce time_in_force)
Definition: types.hpp:2610
std::optional< std::string > grid_order_type_up
Sell-side order type when depth is 0 (GMO / GLO / GTG)
Definition: types.hpp:2603
GridTradeRule & with_multiple_trigger(bool value)
Allow a single grid level to trigger multiple times.
Definition: types.hpp:2664
std::optional< TriggerPriceType > trigger_price_type
Trigger price type (only Spread / Percent allowed)
Definition: types.hpp:2567
std::optional< Decimal > lower_limit_quantity
Quantity handled when the lower bound is reached.
Definition: types.hpp:2583
GridTradeRule & with_support_shortsell(bool value)
Allow short selling.
Definition: types.hpp:2671
std::optional< Decimal > trigger_quantity
Quantity per trigger.
Definition: types.hpp:2597
std::optional< Decimal > upper_limit_quantity
Quantity handled when the upper bound is reached.
Definition: types.hpp:2581
GridTradeRule & with_limit_events(GridLimitEvent upper, GridLimitEvent lower)
Set the actions taken at the upper / lower bounds.
Definition: types.hpp:2640
std::optional< Decimal > trigger_spread_up
Upward trigger spread (absolute)
Definition: types.hpp:2569
GridTradeRule & with_rth(int32_t value)
Set the regular-trading-hours flag (0 / 1 / 2).
Definition: types.hpp:2678
std::optional< Decimal > trigger_percent_down
Downward trigger percent.
Definition: types.hpp:2575
std::optional< Decimal > trigger_percent_up
Upward trigger percent.
Definition: types.hpp:2573
std::optional< int32_t > rth
Regular trading hours flag (0 / 1 / 2)
Definition: types.hpp:2601
Response for get grid trading trigger history request.
Definition: types.hpp:3092
std::vector< TriggerOrder > trigger_orders
Trigger history entries.
Definition: types.hpp:3094
bool has_more
Whether there are more pages.
Definition: types.hpp:3096
Definition: types.hpp:2525
Decimal up
Upward trigger threshold.
Definition: types.hpp:2537
Kind
Threshold interpretation kind.
Definition: types.hpp:2528
@ Spread
Trigger by absolute price spread.
Decimal down
Downward trigger threshold.
Definition: types.hpp:2539
static GridTrigger spread(Decimal up, Decimal down)
Trigger by absolute price spread (up, down).
Definition: types.hpp:2547
Kind kind
Which interpretation the up / down values use.
Definition: types.hpp:2535
static GridTrigger percent(Decimal up, Decimal down)
Trigger by percent (up, down).
Definition: types.hpp:2542
Options for replace grid trading order request.
Definition: types.hpp:2705
GridTradeRule grid_trading_rule
Grid trading rule.
Definition: types.hpp:2709
std::string order_id
Grid master order ID.
Definition: types.hpp:2707
Options for submit grid trading order request.
Definition: types.hpp:2694
GridTradeRule grid_trading_rule
Grid trading rule.
Definition: types.hpp:2700
std::string symbol
Security symbol (e.g. 700.HK)
Definition: types.hpp:2696
std::string settlement_currency
Settlement currency.
Definition: types.hpp:2698
Response for submit grid trading order request.
Definition: types.hpp:2762
std::string order_id
Grid master order id.
Definition: types.hpp:2764
A grid trigger-history entry (one triggered order).
Definition: types.hpp:2995
GridTimeInForce time_in_force
Time in force.
Definition: types.hpp:3029
std::string status
Order status.
Definition: types.hpp:2999
std::string msg
Rejection reason, if any.
Definition: types.hpp:3021
std::optional< Decimal > executed_qty
Executed total quantity.
Definition: types.hpp:3011
std::string currency
Settlement currency.
Definition: types.hpp:3023
int32_t trigger_status
Conditional trigger status.
Definition: types.hpp:3035
std::optional< Decimal > executed_price
Executed average price.
Definition: types.hpp:3009
std::optional< Decimal > quantity
Order quantity.
Definition: types.hpp:3007
std::optional< int64_t > trigger_at
Trigger time (unix timestamp)
Definition: types.hpp:3033
std::optional< int64_t > submitted_at
Submitted time (unix timestamp)
Definition: types.hpp:3013
int32_t action
Buy / sell direction.
Definition: types.hpp:3015
std::optional< Decimal > last_done
Latest quote price.
Definition: types.hpp:3025
std::string id
Triggered order ID.
Definition: types.hpp:2997
std::string name
Stock name.
Definition: types.hpp:3001
std::optional< int64_t > updated_at
Last updated time (unix timestamp)
Definition: types.hpp:3027
std::string order_type
Order type.
Definition: types.hpp:3017
std::optional< Decimal > price
Order price.
Definition: types.hpp:3005
std::string symbol
Security symbol (e.g. 700.HK)
Definition: types.hpp:3003
std::string gtd
Expiry date (YYYY-MM-DD, GTD)
Definition: types.hpp:3031
std::optional< Decimal > trigger_price
Trigger price.
Definition: types.hpp:3019
Intraday A/H premium kline series.
Definition: types.hpp:3332
std::vector< AhPremiumKline > klines
Definition: types.hpp:3333
A/H premium candlestick data point.
Definition: types.hpp:3313
std::string currency_rate
Definition: types.hpp:3318
std::string hprice
Definition: types.hpp:3316
std::string hpreclose
Definition: types.hpp:3317
int64_t timestamp
Definition: types.hpp:3321
std::string price_spread
Definition: types.hpp:3320
std::string ahpremium_rate
Definition: types.hpp:3319
std::string aprice
Definition: types.hpp:3314
std::string apreclose
Definition: types.hpp:3315
Historical A/H premium kline series.
Definition: types.hpp:3326
std::vector< AhPremiumKline > klines
Definition: types.hpp:3327
A single anomaly (unusual market movement) alert item.
Definition: types.hpp:3455
std::string alert_name
Definition: types.hpp:3458
int64_t alert_time
Definition: types.hpp:3459
std::string symbol
Definition: types.hpp:3456
std::string name
Definition: types.hpp:3457
int32_t emotion
Definition: types.hpp:3461
std::vector< std::string > change_values
Definition: types.hpp:3460
Response containing anomaly alert items.
Definition: types.hpp:3466
std::vector< AnomalyItem > changes
Definition: types.hpp:3468
bool all_off
Definition: types.hpp:3467
Holding change figures over multiple periods for a broker.
Definition: types.hpp:3271
std::string chg_5
Definition: types.hpp:3274
std::string chg_60
Definition: types.hpp:3276
std::string chg_1
Definition: types.hpp:3273
std::string chg_20
Definition: types.hpp:3275
std::string value
Definition: types.hpp:3272
Historical daily broker holding series.
Definition: types.hpp:3307
std::vector< BrokerHoldingDailyItem > list
Definition: types.hpp:3308
One day's broker holding snapshot.
Definition: types.hpp:3298
std::string chg
Definition: types.hpp:3302
std::string holding
Definition: types.hpp:3300
std::string ratio
Definition: types.hpp:3301
std::string date
Definition: types.hpp:3299
Full broker holding detail with historical change data.
Definition: types.hpp:3291
std::vector< BrokerHoldingDetailItem > list
Definition: types.hpp:3292
std::string updated_at
Definition: types.hpp:3293
Detailed holding entry for one broker including ratio and share changes.
Definition: types.hpp:3281
std::string name
Definition: types.hpp:3282
BrokerHoldingChanges ratio
Definition: types.hpp:3284
bool strong
Definition: types.hpp:3286
BrokerHoldingChanges shares
Definition: types.hpp:3285
std::string parti_number
Definition: types.hpp:3283
One broker's holding entry in a top-holders list.
Definition: types.hpp:3254
bool strong
Definition: types.hpp:3258
std::string name
Definition: types.hpp:3255
std::string parti_number
Definition: types.hpp:3256
std::string chg
Definition: types.hpp:3257
Top broker holders (buy and sell sides).
Definition: types.hpp:3263
std::vector< BrokerHoldingEntry > sell
Definition: types.hpp:3265
std::string updated_at
Definition: types.hpp:3266
std::vector< BrokerHoldingEntry > buy
Definition: types.hpp:3264
One constituent stock of an index.
Definition: types.hpp:3473
bool delay
Definition: types.hpp:3486
std::string last_done
Definition: types.hpp:3476
std::vector< std::string > tags
Definition: types.hpp:3482
std::string intro
Definition: types.hpp:3483
std::string prev_close
Definition: types.hpp:3477
std::string amount
Definition: types.hpp:3480
std::string circulating_shares
Definition: types.hpp:3485
int32_t trade_status
Definition: types.hpp:3488
std::string symbol
Definition: types.hpp:3474
std::string name
Definition: types.hpp:3475
std::string market
Definition: types.hpp:3484
std::string inflow
Definition: types.hpp:3478
std::string total_shares
Definition: types.hpp:3481
std::string balance
Definition: types.hpp:3479
std::string chg
Definition: types.hpp:3487
Index constituent stocks with rise/fall/flat counts.
Definition: types.hpp:3493
std::vector< ConstituentStock > stocks
Definition: types.hpp:3497
int32_t fall_num
Definition: types.hpp:3494
int32_t rise_num
Definition: types.hpp:3496
int32_t flat_num
Definition: types.hpp:3495
Response containing trading status for all markets.
Definition: types.hpp:3248
std::vector< MarketTimeItem > market_time
Definition: types.hpp:3249
Current trading status and timestamps for one market.
Definition: types.hpp:3236
int32_t delay_trade_status
Definition: types.hpp:3240
int32_t delay_sub_status
Definition: types.hpp:3243
longbridge::Market market
Definition: types.hpp:3237
int32_t sub_status
Definition: types.hpp:3242
std::string delay_timestamp
Definition: types.hpp:3241
int32_t trade_status
Definition: types.hpp:3238
std::string timestamp
Definition: types.hpp:3239
Response for rank_categories.
Definition: types.hpp:3449
std::vector< RankCategory > categories
Definition: types.hpp:3450
A top-level rank category grouping sub-categories.
Definition: types.hpp:3439
std::string name
Display name (e.g. "热度排行")
Definition: types.hpp:3443
std::string key
Top-level key (e.g. "hot")
Definition: types.hpp:3441
std::vector< RankSubCategory > sub_categories
Definition: types.hpp:3444
One ranked security item.
Definition: types.hpp:3400
std::string volume_rate
Definition: types.hpp:3415
std::string change
Definition: types.hpp:3406
std::string pb_ttm
Definition: types.hpp:3416
std::string pre_post_chg
Definition: types.hpp:3411
std::string turnover_rate
Definition: types.hpp:3414
std::string code
Definition: types.hpp:3402
std::string last_done
Definition: types.hpp:3404
std::string pre_post_price
Definition: types.hpp:3410
std::string name
Definition: types.hpp:3403
std::string industry
Definition: types.hpp:3409
std::string chg
Definition: types.hpp:3405
std::string market_cap
Definition: types.hpp:3408
std::string amplitude
Definition: types.hpp:3412
std::string symbol
Definition: types.hpp:3401
std::string inflow
Definition: types.hpp:3407
std::string five_day_chg
Definition: types.hpp:3413
Response for rank_list.
Definition: types.hpp:3421
bool bmp
Definition: types.hpp:3422
std::vector< RankListItem > lists
Definition: types.hpp:3423
One leaf rank sub-category.
Definition: types.hpp:3428
std::string key
Sub-category key (e.g. "hot_all-us"). Pass to rank_list.
Definition: types.hpp:3430
std::string market
Market code (e.g. "US", "HK")
Definition: types.hpp:3434
std::string name
Display name.
Definition: types.hpp:3432
One top-movers event entry.
Definition: types.hpp:3382
std::string post
Definition: types.hpp:3387
TopMoversStock stock
Definition: types.hpp:3386
int64_t alert_type
Definition: types.hpp:3385
std::string alert_reason
Definition: types.hpp:3384
std::string timestamp
Definition: types.hpp:3383
Response for top_movers.
Definition: types.hpp:3392
std::string next_params
Pagination cursor (empty string means no more pages)
Definition: types.hpp:3395
std::vector< TopMoversEvent > events
Definition: types.hpp:3393
Stock information within a top-movers event.
Definition: types.hpp:3368
std::string symbol
Definition: types.hpp:3369
std::vector< std::string > labels
Definition: types.hpp:3377
std::string name
Definition: types.hpp:3371
std::string code
Definition: types.hpp:3370
std::string change
Definition: types.hpp:3373
std::string full_name
Definition: types.hpp:3372
std::string last_done
Definition: types.hpp:3374
std::string market
Definition: types.hpp:3375
std::string logo
Definition: types.hpp:3376
Trade volume and amount aggregated at one price level.
Definition: types.hpp:3338
std::string buy_amount
Definition: types.hpp:3339
std::string price
Definition: types.hpp:3341
std::string sell_amount
Definition: types.hpp:3342
std::string neutral_amount
Definition: types.hpp:3340
Aggregate buy/sell/neutral trade statistics for a security.
Definition: types.hpp:3347
std::string total_amount
Definition: types.hpp:3354
std::string timestamp
Definition: types.hpp:3353
std::string trades_count
Definition: types.hpp:3356
std::string preclose
Definition: types.hpp:3351
std::string neutral
Definition: types.hpp:3350
std::string buy
Definition: types.hpp:3349
std::string sell
Definition: types.hpp:3352
std::vector< std::string > trade_date
Definition: types.hpp:3355
std::string avgprice
Definition: types.hpp:3348
Response for trade statistics including per-price-level breakdown.
Definition: types.hpp:3361
std::vector< TradePriceLevel > trades
Definition: types.hpp:3363
TradeStatistics statistics
Definition: types.hpp:3362
Brokers.
Definition: types.hpp:250
std::vector< int32_t > broker_ids
Broker IDs.
Definition: types.hpp:254
int32_t position
Position.
Definition: types.hpp:252
Candlestick.
Definition: types.hpp:578
int64_t timestamp
Timestamp.
Definition: types.hpp:592
TradeSession trade_session
Trade session.
Definition: types.hpp:594
Decimal turnover
Turnover.
Definition: types.hpp:590
Decimal close
Close price.
Definition: types.hpp:580
Decimal high
High price.
Definition: types.hpp:586
Decimal open
Open price.
Definition: types.hpp:582
int64_t volume
Volume.
Definition: types.hpp:588
Decimal low
Low price.
Definition: types.hpp:584
Capital distribution.
Definition: types.hpp:798
Decimal large
Large order.
Definition: types.hpp:800
Decimal small
Small order.
Definition: types.hpp:804
Decimal medium
Medium order.
Definition: types.hpp:802
Capital distribution response.
Definition: types.hpp:809
int64_t timestamp
Time.
Definition: types.hpp:811
CapitalDistribution capital_in
Inflow capital data.
Definition: types.hpp:813
CapitalDistribution capital_out
Outflow capital data.
Definition: types.hpp:815
Capital flow line.
Definition: types.hpp:789
Decimal inflow
Inflow capital data.
Definition: types.hpp:791
int64_t timestamp
Time.
Definition: types.hpp:793
An request for create watchlist group.
Definition: types.hpp:857
std::string name
Group name.
Definition: types.hpp:859
std::vector< std::string > securities
Securities.
Definition: types.hpp:861
Definition: types.hpp:226
std::optional< Decimal > price
Price.
Definition: types.hpp:230
int32_t position
Position.
Definition: types.hpp:228
int64_t volume
Volume.
Definition: types.hpp:232
int64_t order_num
Number of orders.
Definition: types.hpp:234
Derivative type.
Definition: types.hpp:122
uint8_t value
Definition: types.hpp:123
Filing item.
Definition: types.hpp:1301
std::string description
Description.
Definition: types.hpp:1307
std::string file_name
File name.
Definition: types.hpp:1309
std::string id
Filing ID.
Definition: types.hpp:1303
std::string title
Title.
Definition: types.hpp:1305
std::vector< std::string > file_urls
File URLs.
Definition: types.hpp:1311
int64_t published_at
Published time (Unix timestamp)
Definition: types.hpp:1313
History market temperature response.
Definition: types.hpp:1292
Granularity granularity
Granularity.
Definition: types.hpp:1294
std::vector< MarketTemperature > records
Records.
Definition: types.hpp:1296
Intraday line.
Definition: types.hpp:707
Decimal avg_price
Definition: types.hpp:712
Decimal turnover
Definition: types.hpp:711
int64_t timestamp
Definition: types.hpp:709
Decimal price
Definition: types.hpp:708
int64_t volume
Definition: types.hpp:710
Issuer info.
Definition: types.hpp:748
int32_t issuer_id
Issuer ID.
Definition: types.hpp:750
std::string name_en
Issuer name (en)
Definition: types.hpp:754
std::string name_cn
Issuer name (zh-CN)
Definition: types.hpp:752
std::string name_hk
Issuer name (zh-HK)
Definition: types.hpp:756
Market temperature.
Definition: types.hpp:1264
int32_t temperature
Temperature value.
Definition: types.hpp:1266
int32_t valuation
Market valuation.
Definition: types.hpp:1270
std::string description
Temperature description.
Definition: types.hpp:1268
int32_t sentiment
Market sentiment.
Definition: types.hpp:1272
int64_t timestamp
Time.
Definition: types.hpp:1274
Market trading days.
Definition: types.hpp:780
std::vector< Date > half_trading_days
Half trading days.
Definition: types.hpp:784
std::vector< Date > trading_days
Trading days.
Definition: types.hpp:782
Market trading session.
Definition: types.hpp:771
std::vector< TradingSessionInfo > trade_session
Trading session.
Definition: types.hpp:775
Market market
Market.
Definition: types.hpp:773
Decimal strike_price
Strike price.
Definition: types.hpp:733
int32_t days_to_expiry
Definition: types.hpp:743
std::string symbol
Option contract code, in ticker.region format.
Definition: types.hpp:729
Date expiry_date
Expiry date, in US Eastern time.
Definition: types.hpp:731
OptionDirection direction
Contract direction.
Definition: types.hpp:735
OptionStandardAttr standard_attr
Definition: types.hpp:740
OptionExpiryCycleType option_type
Special expiration cycle of the contract.
Definition: types.hpp:737
Quote of option.
Definition: types.hpp:503
Decimal prev_close
Yesterday's close.
Definition: types.hpp:508
TradeStatus trade_status
Security trading status.
Definition: types.hpp:522
OptionDirection direction
Option direction.
Definition: types.hpp:538
int64_t open_interest
Number of open positions.
Definition: types.hpp:526
int64_t timestamp
Time of latest price.
Definition: types.hpp:516
Decimal contract_size
Contract size.
Definition: types.hpp:536
Decimal contract_multiplier
Contract multiplier.
Definition: types.hpp:532
Decimal turnover
Turnover.
Definition: types.hpp:520
Decimal strike_price
Strike price.
Definition: types.hpp:530
OptionType contract_type
Option type.
Definition: types.hpp:534
Date expiry_date
Exprity date.
Definition: types.hpp:528
int64_t volume
Volume.
Definition: types.hpp:518
Decimal low
Low.
Definition: types.hpp:514
Decimal last_done
Latest price.
Definition: types.hpp:506
Decimal historical_volatility
Underlying security historical volatility of the option.
Definition: types.hpp:540
Decimal high
High.
Definition: types.hpp:512
Decimal implied_volatility
Implied volatility.
Definition: types.hpp:524
std::string symbol
Security code.
Definition: types.hpp:504
Decimal open
Open.
Definition: types.hpp:510
std::string underlying_symbol
Underlying security symbol of the option.
Definition: types.hpp:542
Definition: types.hpp:1396
std::string symbol
Definition: types.hpp:1397
std::vector< OptionVolumeDailyStat > stats
Definition: types.hpp:1398
int64_t total_open_interest
Definition: types.hpp:1390
std::string symbol
Definition: types.hpp:1383
int64_t put_open_interest
Definition: types.hpp:1388
double pc_oi
Definition: types.hpp:1392
int64_t put_volume
Definition: types.hpp:1386
double pc_vol
Definition: types.hpp:1391
Date date
Definition: types.hpp:1384
int64_t call_volume
Definition: types.hpp:1385
int64_t call_open_interest
Definition: types.hpp:1387
int64_t total_volume
Definition: types.hpp:1389
Definition: types.hpp:1375
std::string symbol
Definition: types.hpp:1376
int64_t call_volume
Definition: types.hpp:1377
int64_t put_volume
Definition: types.hpp:1378
Definition: types.hpp:694
std::string name_hk
Participant name (zh-HK)
Definition: types.hpp:702
std::string name_en
Participant name (en)
Definition: types.hpp:700
std::vector< int32_t > broker_ids
Broker IDs.
Definition: types.hpp:696
std::string name_cn
Participant name (zh-CN)
Definition: types.hpp:698
Quote of US pre/post market.
Definition: types.hpp:406
int64_t timestamp
Time of latest price.
Definition: types.hpp:410
Decimal low
Low.
Definition: types.hpp:418
Decimal turnover
Turnover.
Definition: types.hpp:414
Decimal high
High.
Definition: types.hpp:416
int64_t volume
Volume.
Definition: types.hpp:412
Decimal last_done
Latest price.
Definition: types.hpp:408
Decimal prev_close
Close of the last trade session.
Definition: types.hpp:420
Brokers message.
Definition: types.hpp:259
std::vector< Brokers > bid_brokers
Bid brokers.
Definition: types.hpp:265
std::vector< Brokers > ask_brokers
Ask brokers.
Definition: types.hpp:263
std::string symbol
Security code.
Definition: types.hpp:261
Candlestick updated message.
Definition: types.hpp:599
Period period
Period type.
Definition: types.hpp:603
bool is_confirmed
Is confirmed.
Definition: types.hpp:607
std::string symbol
Security code.
Definition: types.hpp:601
Candlestick candlestick
Candlestick.
Definition: types.hpp:605
Depth message.
Definition: types.hpp:239
std::vector< Depth > asks
Ask depth.
Definition: types.hpp:243
std::string symbol
Security code.
Definition: types.hpp:241
std::vector< Depth > bids
Bid depth.
Definition: types.hpp:245
Quote message.
Definition: types.hpp:198
Decimal high
High.
Definition: types.hpp:206
TradeStatus trade_status
Security trading status.
Definition: types.hpp:216
int64_t timestamp
Time of latest price.
Definition: types.hpp:210
Decimal last_done
Latest price.
Definition: types.hpp:202
Decimal turnover
Turnover.
Definition: types.hpp:214
int64_t current_volume
Increase volume between pushes.
Definition: types.hpp:220
int64_t volume
Volume.
Definition: types.hpp:212
Decimal urrent_turnover
Increase turnover between pushes.
Definition: types.hpp:222
TradeSession trade_session
Trade session.
Definition: types.hpp:218
Decimal low
Low.
Definition: types.hpp:208
Decimal open
Open.
Definition: types.hpp:204
std::string symbol
Security code.
Definition: types.hpp:200
Trades message.
Definition: types.hpp:569
std::string symbol
Security code.
Definition: types.hpp:571
std::vector< Trade > trades
Trades data.
Definition: types.hpp:573
Quote package detail.
Definition: types.hpp:1240
int64_t start_at
Start at.
Definition: types.hpp:1248
std::string description
Description.
Definition: types.hpp:1246
std::string key
Key.
Definition: types.hpp:1242
int64_t end_at
End at.
Definition: types.hpp:1250
std::string name
Name.
Definition: types.hpp:1244
Real-time quote.
Definition: types.hpp:879
Decimal high
High.
Definition: types.hpp:887
Decimal open
Open.
Definition: types.hpp:885
std::string symbol
Security code.
Definition: types.hpp:881
Decimal turnover
Turnover.
Definition: types.hpp:895
int64_t timestamp
Time of latest price.
Definition: types.hpp:891
int64_t volume
Volume.
Definition: types.hpp:893
Decimal last_done
Latest price.
Definition: types.hpp:883
TradeStatus trade_status
Security trading status.
Definition: types.hpp:897
Decimal low
Low.
Definition: types.hpp:889
Security brokers.
Definition: types.hpp:686
std::vector< Brokers > bid_brokers
Bid brokers.
Definition: types.hpp:690
std::vector< Brokers > ask_brokers
Ask brokers.
Definition: types.hpp:688
Security calc index response.
Definition: types.hpp:987
std::optional< Decimal > balance_point
Breakeven point.
Definition: types.hpp:1057
std::optional< Decimal > change_rate
Change ratio.
Definition: types.hpp:995
std::optional< Decimal > lower_strike_price
Lower bound price.
Definition: types.hpp:1033
std::optional< Date > expiry_date
Expiry date.
Definition: types.hpp:1027
std::optional< Decimal > theta
Definition: types.hpp:1069
std::optional< Decimal > conversion_ratio
Conversion ratio.
Definition: types.hpp:1055
std::optional< Decimal > leverage_ratio
Leverage ratio.
Definition: types.hpp:1053
std::optional< Decimal > five_day_change_rate
Five days change ratio.
Definition: types.hpp:1019
std::optional< int64_t > open_interest
Open interest.
Definition: types.hpp:1059
std::optional< Decimal > ten_day_change_rate
Ten days change ratio.
Definition: types.hpp:1021
std::optional< Decimal > volume_ratio
Volume ratio.
Definition: types.hpp:1011
std::string symbol
Security code.
Definition: types.hpp:989
std::optional< Decimal > call_price
Call price.
Definition: types.hpp:1047
std::optional< Decimal > turnover
Turnover.
Definition: types.hpp:999
std::optional< Decimal > warrant_delta
Warrant delta.
Definition: types.hpp:1045
std::optional< Decimal > ytd_change_rate
Year-to-date change ratio.
Definition: types.hpp:1001
std::optional< int64_t > volume
Volume.
Definition: types.hpp:997
std::optional< Decimal > capital_flow
Capital flow.
Definition: types.hpp:1007
std::optional< int64_t > outstanding_qty
Outstanding quantity.
Definition: types.hpp:1035
std::optional< Decimal > pe_ttm_ratio
PE (TTM)
Definition: types.hpp:1013
std::optional< Decimal > last_done
Latest price.
Definition: types.hpp:991
std::optional< Decimal > delta
Definition: types.hpp:1062
std::optional< Decimal > vega
Definition: types.hpp:1073
std::optional< Decimal > itm_otm
In/out of the bound.
Definition: types.hpp:1041
std::optional< Decimal > outstanding_ratio
Outstanding ratio.
Definition: types.hpp:1037
std::optional< Decimal > strike_price
Strike price.
Definition: types.hpp:1029
std::optional< Decimal > implied_volatility
Implied volatility.
Definition: types.hpp:1043
std::optional< Decimal > half_year_change_rate
Half year change ratio.
Definition: types.hpp:1023
std::optional< Decimal > amplitude
Amplitude.
Definition: types.hpp:1009
std::optional< Decimal > premium
Premium.
Definition: types.hpp:1039
std::optional< Decimal > effective_leverage
Effective leverage.
Definition: types.hpp:1051
std::optional< Decimal > turnover_rate
Turnover rate.
Definition: types.hpp:1003
std::optional< Decimal > upper_strike_price
Upper bound price.
Definition: types.hpp:1031
std::optional< Decimal > rho
Definition: types.hpp:1077
std::optional< Decimal > dividend_ratio_ttm
Dividend ratio (TTM)
Definition: types.hpp:1017
std::optional< Decimal > gamma
Definition: types.hpp:1065
std::optional< Decimal > change_value
Change value.
Definition: types.hpp:993
std::optional< Decimal > total_market_value
Total market value.
Definition: types.hpp:1005
std::optional< Decimal > to_call_price
Price interval from the call price.
Definition: types.hpp:1049
std::optional< Decimal > five_minutes_change_rate
Five minutes change ratio.
Definition: types.hpp:1025
std::optional< Decimal > pb_ratio
PB.
Definition: types.hpp:1015
Security depth.
Definition: types.hpp:677
std::vector< Depth > asks
Ask depth.
Definition: types.hpp:679
std::vector< Depth > bids
Bid depth.
Definition: types.hpp:681
Security.
Definition: types.hpp:329
std::string name_hk
Security name (zh-HK)
Definition: types.hpp:337
std::string symbol
Security code.
Definition: types.hpp:331
std::string name_cn
Security name (zh-CN)
Definition: types.hpp:333
std::string name_en
Security name (en)
Definition: types.hpp:335
Quote of securitity.
Definition: types.hpp:425
Decimal last_done
Latest price.
Definition: types.hpp:429
Decimal turnover
Turnover.
Definition: types.hpp:443
Decimal prev_close
Yesterday's close.
Definition: types.hpp:431
std::string symbol
Security code.
Definition: types.hpp:427
TradeStatus trade_status
Security trading status.
Definition: types.hpp:445
Decimal high
High.
Definition: types.hpp:435
std::optional< PrePostQuote > post_market_quote
Quote of US post market.
Definition: types.hpp:449
std::optional< PrePostQuote > pre_market_quote
Quote of US pre market.
Definition: types.hpp:447
int64_t volume
Volume.
Definition: types.hpp:441
std::optional< PrePostQuote > overnight_quote
Quote of US overnight market.
Definition: types.hpp:451
int64_t timestamp
Time of latest price.
Definition: types.hpp:439
Decimal open
Open.
Definition: types.hpp:433
Decimal low
Low.
Definition: types.hpp:437
The basic information of securities.
Definition: types.hpp:342
std::string currency
Trading currency.
Definition: types.hpp:354
int64_t hk_shares
HK shares (only HK stocks)
Definition: types.hpp:362
std::string symbol
Security code.
Definition: types.hpp:344
std::string name_cn
Security name (zh-CN)
Definition: types.hpp:346
int64_t total_shares
Total shares.
Definition: types.hpp:358
Decimal eps
Earnings per share.
Definition: types.hpp:364
std::string name_hk
Security name (zh-HK)
Definition: types.hpp:350
Decimal eps_ttm
Earnings per share (TTM)
Definition: types.hpp:366
Decimal dividend_yield
Dividend (per share), not the dividend yield (ratio).
Definition: types.hpp:370
SecurityBoard board
Board.
Definition: types.hpp:374
std::string exchange
Exchange which the security belongs to.
Definition: types.hpp:352
int32_t lot_size
Lot size.
Definition: types.hpp:356
DerivativeType stock_derivatives
Types of supported derivatives.
Definition: types.hpp:372
int64_t circulating_shares
Circulating shares.
Definition: types.hpp:360
std::string name_en
Security name (en)
Definition: types.hpp:348
Decimal bps
Net assets per share.
Definition: types.hpp:368
One short-position record, unified for US and HK markets.
Definition: types.hpp:1318
std::string timestamp
Trading date in RFC 3339 format.
Definition: types.hpp:1320
std::string close
Closing price.
Definition: types.hpp:1324
std::string days_to_cover
[US] Days-to-cover ratio
Definition: types.hpp:1330
std::string cost
[HK] Closing price (HK naming)
Definition: types.hpp:1336
std::string current_shares_short
[US] Number of short shares outstanding
Definition: types.hpp:1326
std::string rate
Short ratio.
Definition: types.hpp:1322
std::string balance
[HK] Short position balance
Definition: types.hpp:1334
std::string amount
[HK] Short sale amount (HKD)
Definition: types.hpp:1332
std::string avg_daily_share_volume
[US] Average daily share volume
Definition: types.hpp:1328
Short interest / positions response (HK or US).
Definition: types.hpp:1341
std::vector< ShortPositionsItem > data
Short position records.
Definition: types.hpp:1343
One short-trade record, unified for US and HK markets.
Definition: types.hpp:1348
std::string rate
Short ratio.
Definition: types.hpp:1352
std::string total_amount
[US] Total short amount
Definition: types.hpp:1360
std::string balance
[HK] Short position balance
Definition: types.hpp:1364
std::string amount
[HK] Short sale turnover amount (HKD)
Definition: types.hpp:1362
std::string close
Closing price.
Definition: types.hpp:1354
std::string timestamp
Trading date in RFC 3339 format.
Definition: types.hpp:1350
std::string ny_amount
[US] NYSE short sale volume
Definition: types.hpp:1358
std::string nus_amount
[US] NASDAQ short sale volume
Definition: types.hpp:1356
Short trade records response (HK or US).
Definition: types.hpp:1369
std::vector< ShortTradesItem > data
Short trade records.
Definition: types.hpp:1371
Subscription.
Definition: types.hpp:174
SubFlags sub_types
Subscription flags.
Definition: types.hpp:178
std::vector< Period > candlesticks
Candlesticks.
Definition: types.hpp:180
std::string symbol
Security code.
Definition: types.hpp:176
Trade.
Definition: types.hpp:558
TradeSession trade_session
Definition: types.hpp:564
Decimal price
Definition: types.hpp:559
int64_t timestamp
Definition: types.hpp:561
std::string trade_type
Definition: types.hpp:562
int64_t volume
Definition: types.hpp:560
TradeDirection direction
Definition: types.hpp:563
Definition: types.hpp:760
Time end_time
End trading time.
Definition: types.hpp:764
Time begin_time
Being trading time.
Definition: types.hpp:762
TradeSession trade_session
Trading session.
Definition: types.hpp:766
An request for update watchlist group.
Definition: types.hpp:866
int64_t id
Group id.
Definition: types.hpp:868
std::optional< std::vector< std::string > > securities
Securities.
Definition: types.hpp:872
std::optional< std::string > name
Group name.
Definition: types.hpp:870
SecuritiesUpdateMode mode
Securities Update Mode.
Definition: types.hpp:874
Warrant info.
Definition: types.hpp:1175
std::optional< Decimal > conversion_ratio
Conversion ratio.
Definition: types.hpp:1224
std::string name
Security name.
Definition: types.hpp:1181
std::optional< Decimal > to_call_price
Price interval from the call price.
Definition: types.hpp:1218
std::optional< Decimal > upper_strike_price
Upper strike price.
Definition: types.hpp:1200
WarrantType warrant_type
Warrant type.
Definition: types.hpp:1179
std::string symbol
Security code.
Definition: types.hpp:1177
int64_t volume
Volume.
Definition: types.hpp:1189
Decimal turnover
Turnover.
Definition: types.hpp:1191
std::optional< Decimal > implied_volatility
Implied volatility.
Definition: types.hpp:1212
Decimal change_value
Quote change.
Definition: types.hpp:1187
std::optional< Decimal > delta
Delta.
Definition: types.hpp:1214
std::optional< Decimal > balance_point
Breakeven point.
Definition: types.hpp:1226
std::optional< Decimal > call_price
Call price.
Definition: types.hpp:1216
int64_t outstanding_qty
Outstanding quantity.
Definition: types.hpp:1204
Decimal change_rate
Quote change rate.
Definition: types.hpp:1185
std::optional< Date > expiry_date
Definition: types.hpp:1196
WarrantStatus status
Status.
Definition: types.hpp:1228
Decimal leverage_ratio
Leverage ratio.
Definition: types.hpp:1222
Decimal last_done
Latest price.
Definition: types.hpp:1183
std::optional< Decimal > itm_otm
In/out of the bound.
Definition: types.hpp:1210
Decimal premium
Premium.
Definition: types.hpp:1208
std::optional< Decimal > strike_price
Strike price.
Definition: types.hpp:1198
std::optional< Decimal > effective_leverage
Effective leverage.
Definition: types.hpp:1220
std::optional< Decimal > lower_strike_price
Lower strike price.
Definition: types.hpp:1202
Decimal outstanding_ratio
Outstanding ratio.
Definition: types.hpp:1206
Quote of warrant.
Definition: types.hpp:629
Decimal strike_price
Strike price.
Definition: types.hpp:664
Date expiry_date
Exprity date.
Definition: types.hpp:652
Decimal open
Open.
Definition: types.hpp:636
Decimal turnover
Turnover.
Definition: types.hpp:646
int64_t volume
Volume.
Definition: types.hpp:644
WarrantType category
Warrant type.
Definition: types.hpp:662
Decimal low
Low.
Definition: types.hpp:640
TradeStatus trade_status
Security trading status.
Definition: types.hpp:648
Decimal upper_strike_price
Upper bound price.
Definition: types.hpp:666
int64_t outstanding_quantity
Outstanding quantity.
Definition: types.hpp:658
Decimal prev_close
Yesterday's close.
Definition: types.hpp:634
int64_t timestamp
Time of latest price.
Definition: types.hpp:642
Date last_trade_date
Last tradalbe date.
Definition: types.hpp:654
std::string symbol
Security code.
Definition: types.hpp:630
Decimal high
High.
Definition: types.hpp:638
Decimal lower_strike_price
Lower bound price.
Definition: types.hpp:668
Decimal last_done
Latest price.
Definition: types.hpp:632
Decimal conversion_ratio
Conversion ratio.
Definition: types.hpp:660
Decimal implied_volatility
Implied volatility.
Definition: types.hpp:650
Decimal outstanding_ratio
Outstanding ratio.
Definition: types.hpp:656
std::string underlying_symbol
Underlying security symbol of the warrant.
Definition: types.hpp:672
Decimal call_price
Call price.
Definition: types.hpp:670
Watchlist group.
Definition: types.hpp:835
int64_t id
Group id.
Definition: types.hpp:837
std::vector< WatchlistSecurity > securities
Securities.
Definition: types.hpp:841
std::string name
Group name.
Definition: types.hpp:839
Watchlist security.
Definition: types.hpp:820
std::string symbol
Security symbol.
Definition: types.hpp:822
std::optional< Decimal > watched_price
Watched price.
Definition: types.hpp:828
std::string name
Security name.
Definition: types.hpp:826
int64_t watched_at
Watched time.
Definition: types.hpp:830
Market market
Market.
Definition: types.hpp:824
Response for SharelistContext::detail.
Definition: types.hpp:4596
SharelistScopes scopes
Subscription scope flags for the current user.
Definition: types.hpp:4600
SharelistInfo sharelist
Sharelist info including constituent stocks.
Definition: types.hpp:4598
Sharelist metadata and constituent stocks.
Definition: types.hpp:4552
int64_t subscribers_count
Number of subscribers.
Definition: types.hpp:4562
int64_t created_at
Creation time (Unix timestamp)
Definition: types.hpp:4564
std::string this_year_chg
YTD change percentage.
Definition: types.hpp:4568
std::string description
Description.
Definition: types.hpp:4558
int64_t id
Sharelist ID.
Definition: types.hpp:4554
std::string cover
Cover image URL.
Definition: types.hpp:4560
std::vector< SharelistStock > stocks
Constituent stocks.
Definition: types.hpp:4572
int32_t sharelist_type
Sharelist type: 0=regular, 3=official, 4=industry.
Definition: types.hpp:4578
std::string name
Name.
Definition: types.hpp:4556
bool subscribed
Whether the current user is subscribed.
Definition: types.hpp:4574
std::string creator
Creator info (serialised JSON)
Definition: types.hpp:4570
int64_t edited_at
Last stock edit time (Unix timestamp)
Definition: types.hpp:4566
std::string industry_code
Industry code (for industry sharelists)
Definition: types.hpp:4580
std::string chg
Day change percentage.
Definition: types.hpp:4576
Response for SharelistContext::list and SharelistContext::popular.
Definition: types.hpp:4585
std::vector< SharelistInfo > sharelists
User's own and followed sharelists.
Definition: types.hpp:4587
std::vector< SharelistInfo > subscribed_sharelists
Subscribed sharelists (may be empty in popular response)
Definition: types.hpp:4589
std::string tail_mark
Pagination cursor for the subscribed list.
Definition: types.hpp:4591
Subscription scope flags for a sharelist.
Definition: types.hpp:4543
bool subscription
Whether the current user is subscribed to this sharelist.
Definition: types.hpp:4545
bool is_self
Whether the current user is the creator of this sharelist.
Definition: types.hpp:4547
A security constituent of a sharelist.
Definition: types.hpp:4520
std::string unread_change_log_category
Unread change log category.
Definition: types.hpp:4532
std::string name
Security name.
Definition: types.hpp:4524
std::string market
Market, e.g. "HK".
Definition: types.hpp:4526
std::optional< std::string > change
Day change percentage (absent when quote unavailable)
Definition: types.hpp:4534
std::string intro
Brief description.
Definition: types.hpp:4530
std::string code
Ticker code.
Definition: types.hpp:4528
std::string symbol
Security symbol.
Definition: types.hpp:4522
std::optional< std::string > last_done
Latest price (absent when quote unavailable)
Definition: types.hpp:4536
std::optional< int32_t > trade_status
Trade status code (absent when quote unavailable)
Definition: types.hpp:4538
Account balance.
Definition: types.hpp:2061
Decimal total_cash
Total cash.
Definition: types.hpp:2063
Decimal max_finance_amount
Maximum financing amount.
Definition: types.hpp:2065
std::vector< FrozenTransactionFee > frozen_transaction_fees
Frozen transaction fees.
Definition: types.hpp:2085
Decimal maintenance_margin
Maintenance margin.
Definition: types.hpp:2081
Decimal net_assets
Net assets.
Definition: types.hpp:2077
Decimal init_margin
Initial margin.
Definition: types.hpp:2079
std::string currency
Currency.
Definition: types.hpp:2073
Decimal buy_power
Buy power.
Definition: types.hpp:2083
Decimal margin_call
Margin call.
Definition: types.hpp:2071
Decimal remaining_finance_amount
Remaining financing amount.
Definition: types.hpp:2067
int32_t risk_level
Risk control level.
Definition: types.hpp:2069
std::vector< CashInfo > cash_infos
Cash details.
Definition: types.hpp:2075
All executions response.
Definition: types.hpp:1473
bool has_more
Has more records.
Definition: types.hpp:1475
std::vector< Execution > trades
Executions.
Definition: types.hpp:1477
Attached order detail.
Definition: types.hpp:1623
Decimal quantity
Definition: types.hpp:1627
std::optional< OutsideRTH > force_only_rth
Definition: types.hpp:1640
Decimal executed_amount
Definition: types.hpp:1636
std::string counter_id
Definition: types.hpp:1634
bool withdrawn
Definition: types.hpp:1631
std::optional< Decimal > trigger_price
Definition: types.hpp:1626
std::optional< OutsideRTH > activate_rth
Definition: types.hpp:1643
OrderType activate_order_type
Definition: types.hpp:1642
std::string order_id
Definition: types.hpp:1624
int64_t updated_at
Definition: types.hpp:1630
std::optional< Decimal > executed_price
Definition: types.hpp:1639
Decimal executed_qty
Definition: types.hpp:1628
AttachedOrderType attached_type_display
Definition: types.hpp:1625
std::optional< Date > gtd
Definition: types.hpp:1632
TimeInForceType time_in_force
Definition: types.hpp:1633
std::optional< Decimal > submit_price
Definition: types.hpp:1644
OrderTag tag
Definition: types.hpp:1637
std::optional< TriggerStatus > trigger_status
Definition: types.hpp:1635
int64_t submitted_at
Definition: types.hpp:1638
bool reviewed
Definition: types.hpp:1641
OrderStatus status
Definition: types.hpp:1629
Cash flow.
Definition: types.hpp:2114
std::optional< std::string > symbol
Associated Stock code information.
Definition: types.hpp:2128
std::string transaction_flow_name
Cash flow name.
Definition: types.hpp:2116
std::string description
Cash flow description.
Definition: types.hpp:2130
int64_t business_time
Business time.
Definition: types.hpp:2126
CashFlowDirection direction
Outflow direction.
Definition: types.hpp:2118
Decimal balance
Cash amount.
Definition: types.hpp:2122
BalanceType business_type
Balance type.
Definition: types.hpp:2120
std::string currency
Cash currency.
Definition: types.hpp:2124
Cash info.
Definition: types.hpp:2039
Decimal frozen_cash
Frozen cash.
Definition: types.hpp:2045
Decimal settling_cash
Cash to be settled.
Definition: types.hpp:2047
Decimal withdraw_cash
Withdraw cash.
Definition: types.hpp:2041
Decimal available_cash
Available cash.
Definition: types.hpp:2043
std::string currency
Currency.
Definition: types.hpp:2049
Options for estimate maximum purchase quantity.
Definition: types.hpp:2420
std::string symbol
Security code.
Definition: types.hpp:2422
OrderType order_type
Order type.
Definition: types.hpp:2424
bool fractional_shares
Get the maximum fractional share buying power.
Definition: types.hpp:2435
std::optional< Decimal > price
Estimated order price.
Definition: types.hpp:2428
OrderSide side
Order side.
Definition: types.hpp:2426
std::optional< std::string > currency
Settlement currency.
Definition: types.hpp:2430
std::optional< std::string > order_id
Definition: types.hpp:2433
Response for estimate maximum purchase quantity.
Definition: types.hpp:2440
Decimal margin_max_qty
Margin available quantity.
Definition: types.hpp:2444
Decimal cash_max_qty
Cash available quantity.
Definition: types.hpp:2442
Exexution.
Definition: types.hpp:1425
Decimal price
Definition: types.hpp:1431
Decimal quantity
Definition: types.hpp:1430
OrderSide side
Order side.
Definition: types.hpp:1433
std::string trade_id
Definition: types.hpp:1427
std::string symbol
Definition: types.hpp:1428
std::string order_id
Definition: types.hpp:1426
int64_t trade_done_at
Definition: types.hpp:1429
Frozen transaction fee.
Definition: types.hpp:2054
std::string currency
Definition: types.hpp:2055
Decimal frozen_transaction_fee
Definition: types.hpp:2056
Fund position channel.
Definition: types.hpp:2185
std::string account_channel
Account type.
Definition: types.hpp:2187
std::vector< FundPosition > positions
Fund positions.
Definition: types.hpp:2189
Fund position.
Definition: types.hpp:2166
Decimal holding_units
Holding units.
Definition: types.hpp:2180
std::string currency
Currency.
Definition: types.hpp:2176
std::string symbol_name
Fund name.
Definition: types.hpp:2174
Decimal current_net_asset_value
Current equity.
Definition: types.hpp:2170
int64_t net_asset_value_day
Current equity time.
Definition: types.hpp:2172
Decimal cost_net_asset_value
Net cost.
Definition: types.hpp:2178
std::string symbol
Fund ISIN code.
Definition: types.hpp:2168
Fund positions response.
Definition: types.hpp:2194
std::vector< FundPositionChannel > channels
Channels.
Definition: types.hpp:2196
Options for get all executions request.
Definition: types.hpp:1458
std::optional< uint64_t > page
Page number.
Definition: types.hpp:1468
std::optional< int64_t > start_at
Start time.
Definition: types.hpp:1464
std::optional< std::string > order_id
Order id.
Definition: types.hpp:1462
std::optional< int64_t > end_at
End time.
Definition: types.hpp:1466
std::optional< std::string > symbol
Security code.
Definition: types.hpp:1460
Options for submit order request.
Definition: types.hpp:2135
int64_t end_at
End time.
Definition: types.hpp:2139
std::optional< uintptr_t > page
Page number.
Definition: types.hpp:2145
int64_t start_at
Start time.
Definition: types.hpp:2137
std::optional< uintptr_t > size
Page size.
Definition: types.hpp:2147
std::optional< BalanceType > business_type
Business type.
Definition: types.hpp:2141
std::optional< std::string > symbol
Security symbol.
Definition: types.hpp:2143
Options for get fund positions request.
Definition: types.hpp:2152
std::optional< std::vector< std::string > > symbols
Fund symbols.
Definition: types.hpp:2154
Options for get history executions request.
Definition: types.hpp:1438
std::optional< std::string > symbol
Security code.
Definition: types.hpp:1444
std::optional< int64_t > end_at
End time.
Definition: types.hpp:1442
std::optional< int64_t > start_at
Start time.
Definition: types.hpp:1440
Options for get history orders request.
Definition: types.hpp:1890
std::optional< int64_t > end_at
End time.
Definition: types.hpp:1902
std::optional< OrderSide > side
Order side.
Definition: types.hpp:1896
std::optional< Market > market
Market.
Definition: types.hpp:1898
std::optional< std::string > symbol
Security symbol.
Definition: types.hpp:1892
std::optional< std::vector< OrderStatus > > status
Order status.
Definition: types.hpp:1894
std::optional< int64_t > start_at
Start time.
Definition: types.hpp:1900
Options for get stock positions request.
Definition: types.hpp:2159
std::optional< std::vector< std::string > > symbols
Stock symbols.
Definition: types.hpp:2161
Options for get today executions request.
Definition: types.hpp:1449
std::optional< std::string > order_id
Order id.
Definition: types.hpp:1453
std::optional< std::string > symbol
Security code.
Definition: types.hpp:1451
Options for get today orders request.
Definition: types.hpp:1907
std::optional< std::string > symbol
Security symbol.
Definition: types.hpp:1909
std::optional< bool > is_attached
Whether to include attached orders.
Definition: types.hpp:1919
std::optional< std::string > order_id
Order id.
Definition: types.hpp:1917
std::optional< std::vector< OrderStatus > > status
Order status.
Definition: types.hpp:1911
std::optional< Market > market
Market.
Definition: types.hpp:1915
std::optional< OrderSide > side
Order side.
Definition: types.hpp:1913
Margin ratio.
Definition: types.hpp:2239
Decimal mm_factor
Maintain the initial margin ratio.
Definition: types.hpp:2243
Decimal im_factor
Initial margin ratio.
Definition: types.hpp:2241
Decimal fm_factor
Forced close-out margin ratio.
Definition: types.hpp:2245
Multi-leg strategy information.
Definition: types.hpp:1749
std::string code
Multi-leg combination code.
Definition: types.hpp:1757
std::string multileg_id
Multi-leg combination ID.
Definition: types.hpp:1755
std::vector< MultiLegOrderLeg > legs
Legs of the combination order.
Definition: types.hpp:1759
MultiLegStrategy strategy
Multi-leg strategy.
Definition: types.hpp:1751
std::string strategy_name
Strategy name.
Definition: types.hpp:1753
A leg of a multi-leg combination order.
Definition: types.hpp:1730
std::optional< Date > expire_date
Option expiry date.
Definition: types.hpp:1742
ContractDirection contract_direction
Contract type.
Definition: types.hpp:1744
MultiLegPosition position
Position direction.
Definition: types.hpp:1736
Decimal ratio_quantity
Leg ratio quantity.
Definition: types.hpp:1738
OrderSide side
Order side.
Definition: types.hpp:1734
std::optional< Decimal > strike_price
Strike price.
Definition: types.hpp:1740
std::string symbol
Option symbol, in ticker.region format.
Definition: types.hpp:1732
Order charge detail.
Definition: types.hpp:2319
std::string currency
Settlement currency.
Definition: types.hpp:2323
std::vector< OrderChargeItem > items
Order charge items.
Definition: types.hpp:2325
Decimal total_amount
Total charges amount.
Definition: types.hpp:2321
Order charge fee.
Definition: types.hpp:2295
Decimal amount
Charge amount.
Definition: types.hpp:2301
std::string currency
Charge currency.
Definition: types.hpp:2303
std::string code
Charge code.
Definition: types.hpp:2297
std::string name
Charge name.
Definition: types.hpp:2299
Order charge item.
Definition: types.hpp:2308
std::string name
Charge category name.
Definition: types.hpp:2312
std::vector< OrderChargeFee > fees
Charge details.
Definition: types.hpp:2314
ChargeCategoryCode code
Charge category code.
Definition: types.hpp:2310
Order detail.
Definition: types.hpp:2330
int64_t submitted_at
Submitted time.
Definition: types.hpp:2346
std::optional< std::string > free_currency
Commission-free currency.
Definition: types.hpp:2394
std::optional< TriggerStatus > trigger_status
Conditional order trigger status.
Definition: types.hpp:2376
std::optional< OutsideRTH > outside_rth
Enable or disable outside regular trading hours.
Definition: types.hpp:2380
Decimal quantity
Submitted quantity.
Definition: types.hpp:2338
std::optional< std::string > deductions_currency
Deduction currency.
Definition: types.hpp:2400
std::string currency
Currency.
Definition: types.hpp:2378
OrderStatus status
Order status.
Definition: types.hpp:2334
std::optional< int32_t > trigger_count
Trigger count.
Definition: types.hpp:2384
OrderSide side
Order side.
Definition: types.hpp:2348
std::optional< Decimal > last_done
Last done.
Definition: types.hpp:2354
std::optional< Decimal > monitor_price
Monitor price.
Definition: types.hpp:2386
std::string msg
Rejected Message or remark.
Definition: types.hpp:2358
std::optional< int64_t > updated_at
Last updated time.
Definition: types.hpp:2366
std::optional< Decimal > platform_deducted_amount
Platform deduction amount.
Definition: types.hpp:2404
CommissionFreeStatus free_status
Commission-free Status.
Definition: types.hpp:2390
std::optional< int32_t > limit_depth_level
Limit depth level.
Definition: types.hpp:2382
std::string remark
Remark.
Definition: types.hpp:2388
OrderTag tag
Order tag.
Definition: types.hpp:2360
std::string order_id
Order ID.
Definition: types.hpp:2332
std::optional< Date > expire_date
Long term order expire date.
Definition: types.hpp:2364
std::optional< int64_t > trigger_at
Conditional order trigger time.
Definition: types.hpp:2368
std::optional< Decimal > free_amount
Commission-free amount.
Definition: types.hpp:2392
DeductionStatus deductions_status
Deduction status.
Definition: types.hpp:2396
std::string symbol
Security code.
Definition: types.hpp:2350
std::optional< Decimal > trigger_price
LIT / MIT Order Trigger Price
Definition: types.hpp:2356
std::vector< AttachedOrderDetail > attached_orders
Attached orders.
Definition: types.hpp:2412
std::string stock_name
Stock name.
Definition: types.hpp:2336
OrderType order_type
Order type.
Definition: types.hpp:2352
DeductionStatus platform_deducted_status
Platform fee deduction status.
Definition: types.hpp:2402
std::optional< Decimal > limit_offset
TSLPAMT / TSLPPCT order limit offset amount
Definition: types.hpp:2374
std::optional< MultiLegInfo > multi_leg
Definition: types.hpp:2415
std::optional< Decimal > deductions_amount
Deduction amount.
Definition: types.hpp:2398
TimeInForceType time_in_force
Time in force type.
Definition: types.hpp:2362
std::optional< Decimal > trailing_percent
TSMPCT / TSLPPCT order trailing percent
Definition: types.hpp:2372
Decimal executed_quantity
Executed quantity.
Definition: types.hpp:2340
std::optional< Decimal > price
Submitted price.
Definition: types.hpp:2342
std::vector< OrderHistoryDetail > history
Order history details.
Definition: types.hpp:2408
std::optional< std::string > platform_deducted_currency
Platform deduction currency.
Definition: types.hpp:2406
std::optional< Decimal > executed_price
Executed price.
Definition: types.hpp:2344
std::optional< Decimal > trailing_amount
TSMAMT / TSLPAMT order trailing amount
Definition: types.hpp:2370
std::optional< OrderChargeDetail > charge_detail
Order charges (maybe null)
Definition: types.hpp:2410
Order history detail.
Definition: types.hpp:2278
Decimal quantity
Definition: types.hpp:2284
Decimal price
Definition: types.hpp:2281
std::string msg
Execution or error message.
Definition: types.hpp:2288
OrderStatus status
Order status.
Definition: types.hpp:2286
int64_t time
Occurrence time.
Definition: types.hpp:2290
Order.
Definition: types.hpp:1764
Decimal quantity
Submitted quantity.
Definition: types.hpp:1772
int64_t submitted_at
Submitted time.
Definition: types.hpp:1780
std::optional< Decimal > trailing_amount
TSMAMT / TSLPAMT order trailing amount
Definition: types.hpp:1804
OrderTag tag
Order tag.
Definition: types.hpp:1794
std::optional< Decimal > trigger_price
LIT / MIT Order Trigger Price
Definition: types.hpp:1790
OrderStatus status
Order status.
Definition: types.hpp:1768
std::string currency
Currency.
Definition: types.hpp:1812
TimeInForceType time_in_force
Time in force type.
Definition: types.hpp:1796
std::optional< Decimal > monitor_price
Monitor price.
Definition: types.hpp:1820
std::string stock_name
Stock name.
Definition: types.hpp:1770
std::optional< Date > expire_date
Long term order expire date.
Definition: types.hpp:1798
OrderSide side
Order side.
Definition: types.hpp:1782
std::optional< Decimal > executed_price
Executed price.
Definition: types.hpp:1778
std::string symbol
Security code.
Definition: types.hpp:1784
std::optional< Decimal > price
Submitted price.
Definition: types.hpp:1776
std::optional< MultiLegInfo > multi_leg
Definition: types.hpp:1827
std::optional< Decimal > trailing_percent
TSMPCT / TSLPPCT order trailing percent
Definition: types.hpp:1806
std::string msg
Rejected Message or remark.
Definition: types.hpp:1792
std::optional< TriggerStatus > trigger_status
Conditional order trigger status.
Definition: types.hpp:1810
std::optional< Decimal > last_done
Last done.
Definition: types.hpp:1788
std::string order_id
Order ID.
Definition: types.hpp:1766
std::optional< int64_t > updated_at
Last updated time.
Definition: types.hpp:1800
std::optional< OutsideRTH > outside_rth
Enable or disable outside regular trading hours.
Definition: types.hpp:1814
OrderType order_type
Order type.
Definition: types.hpp:1786
std::optional< int32_t > limit_depth_level
Limit depth level.
Definition: types.hpp:1816
std::string remark
Remark.
Definition: types.hpp:1822
Decimal executed_quantity
Executed quantity.
Definition: types.hpp:1774
std::optional< Decimal > limit_offset
TSLPAMT / TSLPPCT order limit offset amount
Definition: types.hpp:1808
std::optional< int64_t > trigger_at
Conditional order trigger time.
Definition: types.hpp:1802
std::vector< AttachedOrderDetail > attached_orders
Attached orders.
Definition: types.hpp:1824
std::optional< int32_t > trigger_count
Trigger count.
Definition: types.hpp:1818
Grid trading master-order changed message.
Definition: types.hpp:2450
std::string current_base_price
Current base price.
Definition: types.hpp:2462
std::string grid_order_type_down
Buy-side order type when depth is 0.
Definition: types.hpp:2480
std::string trigger_quantity
Quantity per trigger.
Definition: types.hpp:2470
std::string submitted_base_price
Submitted base price.
Definition: types.hpp:2460
std::string suspend_reason
Suspend reason, if any.
Definition: types.hpp:2458
int32_t time_in_force
Time in force (0 = Day, 1 = GTC, 6 = GTD)
Definition: types.hpp:2474
std::string symbol
Security symbol (e.g. 700.HK)
Definition: types.hpp:2456
int32_t rth
Regular trading hours flag.
Definition: types.hpp:2476
std::string order_id
Grid master order ID.
Definition: types.hpp:2452
std::string status
Order status.
Definition: types.hpp:2454
std::string upper_limit_price
Upper price bound.
Definition: types.hpp:2464
std::string settlement_currency
Settlement currency.
Definition: types.hpp:2472
int32_t trigger_price_type
Trigger price type.
Definition: types.hpp:2468
std::string grid_order_type_up
Sell-side order type when depth is 0.
Definition: types.hpp:2478
std::string lower_limit_price
Lower price bound.
Definition: types.hpp:2466
Order changed message.
Definition: types.hpp:1832
std::string order_id
Order ID.
Definition: types.hpp:1850
Decimal submitted_quantity
Submitted quantity.
Definition: types.hpp:1838
int64_t submitted_at
Submitted time.
Definition: types.hpp:1856
std::optional< Decimal > trailing_percent
Trailing percent.
Definition: types.hpp:1872
std::optional< Decimal > trailing_amount
Trailing amount.
Definition: types.hpp:1870
std::string currency
Currency.
Definition: types.hpp:1852
std::optional< Decimal > executed_price
Executed price.
Definition: types.hpp:1848
std::string stock_name
Stock name.
Definition: types.hpp:1836
std::optional< Decimal > trigger_price
Order trigger price.
Definition: types.hpp:1860
OrderType order_type
Order type.
Definition: types.hpp:1842
std::optional< Decimal > last_price
Last price.
Definition: types.hpp:1880
std::optional< TriggerStatus > trigger_status
Conditional order trigger status.
Definition: types.hpp:1866
Decimal executed_quantity
Executed quantity.
Definition: types.hpp:1846
std::string msg
Rejected message or remark.
Definition: types.hpp:1862
int64_t updated_at
Last updated time.
Definition: types.hpp:1858
OrderSide side
Order side.
Definition: types.hpp:1834
std::optional< Decimal > limit_offset
Limit offset amount.
Definition: types.hpp:1874
OrderStatus status
Order status.
Definition: types.hpp:1854
std::string remark
Remark message.
Definition: types.hpp:1882
std::optional< MultiLegInfo > multi_leg
Definition: types.hpp:1885
Decimal submitted_price
Submitted price.
Definition: types.hpp:1844
OrderTag tag
Order tag.
Definition: types.hpp:1864
std::optional< int64_t > trigger_at
Conditional order trigger time.
Definition: types.hpp:1868
std::string symbol
Order symbol.
Definition: types.hpp:1840
std::optional< Decimal > last_share
Last share.
Definition: types.hpp:1878
std::string account_no
Account no.
Definition: types.hpp:1876
Replace attached order params.
Definition: types.hpp:1663
std::optional< int64_t > expire_time
Definition: types.hpp:1668
std::optional< Decimal > stop_loss_submit_price
Definition: types.hpp:1671
std::optional< Decimal > stop_loss_price
Definition: types.hpp:1666
std::optional< bool > cancel_all_attached
Definition: types.hpp:1675
std::optional< int64_t > main_id
Definition: types.hpp:1676
std::optional< OrderType > activate_order_type
Definition: types.hpp:1669
std::optional< Decimal > market_price
Definition: types.hpp:1678
std::optional< TimeInForceType > time_in_force
Definition: types.hpp:1667
std::optional< int64_t > stop_loss_id
Definition: types.hpp:1674
std::optional< Decimal > profit_taker_submit_price
Definition: types.hpp:1670
AttachedOrderType attached_order_type
Definition: types.hpp:1664
std::optional< Decimal > profit_taker_price
Definition: types.hpp:1665
std::optional< int64_t > profit_taker_id
Definition: types.hpp:1673
std::optional< OutsideRTH > activate_rth
Definition: types.hpp:1672
std::optional< Decimal > quantity
Definition: types.hpp:1677
Options for replace order request.
Definition: types.hpp:1924
std::string order_id
Order ID.
Definition: types.hpp:1926
std::optional< int32_t > limit_depth_level
Limit depth level.
Definition: types.hpp:1940
std::optional< Decimal > monitor_price
Monitor price.
Definition: types.hpp:1944
std::optional< Decimal > price
Price.
Definition: types.hpp:1930
std::optional< Decimal > trigger_price
Trigger price.
Definition: types.hpp:1932
Decimal quantity
Quantity.
Definition: types.hpp:1928
std::optional< int32_t > trigger_count
Trigger count.
Definition: types.hpp:1942
std::optional< Decimal > trailing_percent
Trailing percent.
Definition: types.hpp:1938
std::optional< Decimal > trailing_amount
Trailing amount.
Definition: types.hpp:1936
std::optional< Decimal > limit_offset
Limit offset.
Definition: types.hpp:1934
std::optional< std::string > remark
Remark.
Definition: types.hpp:1946
std::optional< ReplaceAttachedParams > attached_params
Attached order params.
Definition: types.hpp:1948
Stock position channel.
Definition: types.hpp:2223
std::string account_channel
Account type.
Definition: types.hpp:2225
std::vector< StockPosition > positions
Stock positions.
Definition: types.hpp:2227
Stock position.
Definition: types.hpp:2201
std::optional< Decimal > init_quantity
Initial position before market opening.
Definition: types.hpp:2218
Decimal quantity
The number of holdings.
Definition: types.hpp:2207
std::string symbol
Stock code.
Definition: types.hpp:2203
std::string symbol_name
Stock name.
Definition: types.hpp:2205
Decimal available_quantity
Available quantity.
Definition: types.hpp:2209
Decimal cost_price
Definition: types.hpp:2214
Market market
Market.
Definition: types.hpp:2216
std::string currency
Currency.
Definition: types.hpp:2211
Stock positions response.
Definition: types.hpp:2232
std::vector< StockPositionChannel > channels
Channels.
Definition: types.hpp:2234
Submit attached order params.
Definition: types.hpp:1649
std::optional< OrderType > activate_order_type
Definition: types.hpp:1655
std::optional< int64_t > expire_time
Definition: types.hpp:1654
std::optional< Decimal > profit_taker_submit_price
Definition: types.hpp:1656
std::optional< TimeInForceType > time_in_force
Definition: types.hpp:1653
AttachedOrderType attached_order_type
Definition: types.hpp:1650
std::optional< Decimal > stop_loss_submit_price
Definition: types.hpp:1657
std::optional< Decimal > stop_loss_price
Definition: types.hpp:1652
std::optional< Decimal > profit_taker_price
Definition: types.hpp:1651
std::optional< OutsideRTH > activate_rth
Definition: types.hpp:1658
A leg of a multi-leg combination order to submit.
Definition: types.hpp:2004
Decimal ratio_quantity
Definition: types.hpp:2011
std::string symbol
Option symbol, in ticker.region format (e.g. QQQ260731C764000.US)
Definition: types.hpp:2006
Options for submit multi-leg order request.
Definition: types.hpp:2016
std::optional< std::string > remark
Remark (Maximum 255 characters)
Definition: types.hpp:2030
Decimal submitted_quantity
Submitted quantity (number of combinations)
Definition: types.hpp:2022
std::optional< std::string > client_request_id
Definition: types.hpp:2034
MultiLegStrategy strategy
Multi-leg strategy.
Definition: types.hpp:2024
std::vector< SubmitMultiLegOrderLeg > legs
Legs of the combination order.
Definition: types.hpp:2026
std::optional< Decimal > submitted_price
Submitted price (required for limit order types such as LO)
Definition: types.hpp:2028
OrderSide side
Order side.
Definition: types.hpp:2018
OrderType order_type
Order type.
Definition: types.hpp:2020
Options for submit order request.
Definition: types.hpp:1953
std::optional< Decimal > trailing_percent
Trailing percent (TSLPPCT / TSMAPCT Required)
Definition: types.hpp:1973
std::optional< int32_t > limit_depth_level
Limit depth level.
Definition: types.hpp:1980
std::optional< std::string > client_request_id
Definition: types.hpp:1990
std::optional< int32_t > trigger_count
Trigger count.
Definition: types.hpp:1982
OrderType order_type
Order type.
Definition: types.hpp:1957
TimeInForceType time_in_force
Time in force type.
Definition: types.hpp:1963
std::optional< std::string > remark
Remark (Maximum 64 characters)
Definition: types.hpp:1986
OrderSide side
Order side.
Definition: types.hpp:1959
std::optional< Decimal > limit_offset
Limit offset amount (TSLPAMT / TSLPPCT Required)
Definition: types.hpp:1969
std::optional< Decimal > submitted_price
Submitted price.
Definition: types.hpp:1965
std::optional< Decimal > trailing_amount
Trailing amount (TSLPAMT / TSMAMT Required)
Definition: types.hpp:1971
std::string symbol
Security symbol.
Definition: types.hpp:1955
std::optional< Decimal > monitor_price
Monitor price.
Definition: types.hpp:1984
std::optional< SubmitAttachedParams > attached_params
Attached order params.
Definition: types.hpp:1992
std::optional< Decimal > trigger_price
Trigger price (LIT / MIT Required)
Definition: types.hpp:1967
std::optional< OutsideRTH > outside_rth
Enable or disable outside regular trading hours.
Definition: types.hpp:1978
std::optional< Date > expire_date
Definition: types.hpp:1976
Decimal submitted_quantity
Submitted price.
Definition: types.hpp:1961
Response for submit order request.
Definition: types.hpp:1997
std::string order_id
Order id.
Definition: types.hpp:1999