LongPort OpenAPI C SDK
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
longport.h
Go to the documentation of this file.
1 #ifndef _LONGPORT_H_
2 #define _LONGPORT_H_
3 
4 #include <stdarg.h>
5 #include <stdbool.h>
6 #include <stdint.h>
7 #include <stdlib.h>
8 
12 #define LB_SUBFLAGS_QUOTE 1
13 
17 #define LB_SUBFLAGS_DEPTH 2
18 
22 #define LB_SUBFLAGS_BROKER 4
23 
27 #define LB_SUBFLAGS_TRADE 8
28 
32 #define LB_DERIVATIVE_TYPE_OPTION 1
33 
37 #define LB_DERIVATIVE_TYPE_WARRANT 2
38 
42 #define LB_WATCHLIST_GROUP_NAME 1
43 
47 #define LB_WATCHLIST_GROUP_SECURITIES 2
48 
52 typedef enum lb_adjust_type_t {
62 
66 typedef enum lb_balance_type_t {
84 
88 typedef enum lb_calc_index_t {
250 
268 
286 
312 
316 typedef enum lb_deduction_status_t {
338 
360 
374 
378 typedef enum lb_granularity_t {
396 
400 typedef enum lb_language_t {
414 
418 typedef enum lb_market_t {
440 
444 typedef enum lb_option_direction_t {
458 
462 typedef enum lb_option_type_t {
476 
480 typedef enum lb_order_side_t {
494 
498 typedef enum lb_order_status_t {
572 
576 typedef enum lb_order_tag_t {
618 
622 typedef enum lb_order_type_t {
680 
684 typedef enum lb_outside_rth_t {
702 
706 typedef enum lb_period_t {
784 
798 
816 
820 typedef enum lb_security_board_t {
922 
932 
936 typedef enum lb_sort_order_type_t {
946 
968 
972 typedef enum lb_topic_type_t {
978 
982 typedef enum lb_trade_direction_t {
996 
1000 typedef enum lb_trade_session_t {
1018 
1022 typedef enum lb_trade_sessions_t {
1032 
1036 typedef enum lb_trade_status_t {
1082 
1086 typedef enum lb_trigger_status_t {
1104 
1108 typedef enum lb_warrant_sort_by_t {
1198 
1202 typedef enum lb_warrant_status_t {
1216 
1220 typedef enum lb_warrant_type_t {
1246 
1250 typedef struct lb_config_t lb_config_t;
1251 
1252 typedef struct lb_decimal_t lb_decimal_t;
1253 
1254 typedef struct lb_error_t lb_error_t;
1255 
1259 typedef struct lb_http_client_t lb_http_client_t;
1260 
1261 typedef struct lb_http_result_t lb_http_result_t;
1262 
1266 typedef struct lb_quote_context_t lb_quote_context_t;
1267 
1271 typedef struct lb_trade_context_t lb_trade_context_t;
1272 
1273 typedef struct lb_async_result_t {
1274  const void *ctx;
1275  const struct lb_error_t *error;
1276  void *data;
1277  uintptr_t length;
1278  void *userdata;
1280 
1281 typedef void (*lb_async_callback_t)(const struct lb_async_result_t*);
1282 
1286 typedef struct lb_http_header_t {
1287  const char *name;
1288  const char *value;
1290 
1291 typedef void (*lb_free_userdata_func_t)(void*);
1292 
1296 typedef struct lb_push_quote_t {
1300  const char *symbol;
1304  const struct lb_decimal_t *last_done;
1308  const struct lb_decimal_t *open;
1312  const struct lb_decimal_t *high;
1316  const struct lb_decimal_t *low;
1320  int64_t timestamp;
1324  int64_t volume;
1328  const struct lb_decimal_t *turnover;
1346 
1347 typedef void (*lb_quote_callback_t)(const struct lb_quote_context_t*,
1348  const struct lb_push_quote_t*,
1349  void*);
1350 
1354 typedef struct lb_depth_t {
1358  int32_t position;
1362  const struct lb_decimal_t *price;
1366  int64_t volume;
1370  int64_t order_num;
1372 
1376 typedef struct lb_push_depth_t {
1380  const char *symbol;
1384  const struct lb_depth_t *asks;
1388  uintptr_t num_asks;
1392  const struct lb_depth_t *bids;
1396  uintptr_t num_bids;
1398 
1399 typedef void (*lb_depth_callback_t)(const struct lb_quote_context_t*,
1400  const struct lb_push_depth_t*,
1401  void*);
1402 
1406 typedef struct lb_brokers_t {
1410  int32_t position;
1414  const int32_t *broker_ids;
1418  uintptr_t num_broker_ids;
1420 
1424 typedef struct lb_push_brokers_t {
1428  const char *symbol;
1432  const struct lb_brokers_t *ask_brokers;
1436  uintptr_t num_ask_brokers;
1440  const struct lb_brokers_t *bid_brokers;
1444  uintptr_t num_bid_brokers;
1446 
1447 typedef void (*lb_brokers_callback_t)(const struct lb_quote_context_t*,
1448  const struct lb_push_brokers_t*,
1449  void*);
1450 
1454 typedef struct lb_trade_t {
1458  const struct lb_decimal_t *price;
1462  int64_t volume;
1466  int64_t timestamp;
1501  const char *trade_type;
1511 
1515 typedef struct lb_push_trades_t {
1519  const char *symbol;
1523  const struct lb_trade_t *trades;
1527  uintptr_t num_trades;
1529 
1530 typedef void (*lb_trades_callback_t)(const struct lb_quote_context_t*,
1531  const struct lb_push_trades_t*,
1532  void*);
1533 
1537 typedef struct lb_candlestick_t {
1541  const struct lb_decimal_t *close;
1545  const struct lb_decimal_t *open;
1549  const struct lb_decimal_t *low;
1553  const struct lb_decimal_t *high;
1557  int64_t volume;
1561  const struct lb_decimal_t *turnover;
1565  int64_t timestamp;
1571 
1575 typedef struct lb_push_candlestick_t {
1579  const char *symbol;
1583  enum lb_period_t period;
1593 
1594 typedef void (*lb_candlestick_callback_t)(const struct lb_quote_context_t*,
1595  const struct lb_push_candlestick_t*,
1596  void*);
1597 
1598 typedef struct lb_date_t {
1599  int32_t year;
1600  uint8_t month;
1601  uint8_t day;
1603 
1604 typedef struct lb_time_t {
1605  uint8_t hour;
1606  uint8_t minute;
1607  uint8_t second;
1609 
1610 typedef struct lb_datetime_t {
1611  struct lb_date_t date;
1612  struct lb_time_t time;
1614 
1622  const char *name;
1626  const char *const *securities;
1630  uintptr_t num_securities;
1632 
1640  uint32_t flags;
1644  int64_t id;
1648  const char *name;
1652  const char *const *securities;
1656  uintptr_t num_securities;
1662 
1666 typedef struct lb_push_order_changed_t {
1670  enum lb_order_side_t side;
1674  const char *stock_name;
1682  const char *symbol;
1702  const char *order_id;
1706  const char *currency;
1714  int64_t submitted_at;
1718  int64_t updated_at;
1726  const char *msg;
1730  enum lb_order_tag_t tag;
1738  const int64_t *trigger_at;
1754  const char *account_no;
1758  const struct lb_decimal_t *last_share;
1762  const struct lb_decimal_t *last_price;
1766  const char *remark;
1768 
1769 typedef void (*lb_order_changed_callback_t)(const struct lb_trade_context_t*,
1770  const struct lb_push_order_changed_t*,
1771  void*);
1772 
1780  const int64_t *start_at;
1784  const int64_t *end_at;
1788  const char *symbol;
1790 
1798  const char *symbol;
1802  const char *order_id;
1804 
1812  const char *symbol;
1820  uintptr_t num_status;
1824  const enum lb_order_side_t *side;
1828  const enum lb_market_t *market;
1832  const int64_t *start_at;
1836  const int64_t *end_at;
1838 
1846  const char *symbol;
1854  uintptr_t num_status;
1858  const enum lb_order_side_t *side;
1862  const enum lb_market_t *market;
1866  const char *order_id;
1868 
1876  const char *order_id;
1880  const struct lb_decimal_t *quantity;
1884  const struct lb_decimal_t *price;
1904  const char *remark;
1906 
1914  const char *symbol;
1922  enum lb_order_side_t side;
1955  const struct lb_date_t *expire_date;
1963  const char *remark;
1965 
1973  int64_t start_at;
1977  int64_t end_at;
1985  const char *symbol;
1989  const uintptr_t *page;
1993  const uintptr_t *size;
1995 
2003  const char *const *symbols;
2007  uintptr_t num_symbols;
2009 
2017  const char *const *symbols;
2021  uintptr_t num_symbols;
2023 
2028  const char *symbol;
2030  const struct lb_decimal_t *price;
2031  enum lb_order_side_t side;
2032  const char *currency;
2033  const char *order_id;
2036 
2037 typedef struct lb_subscription_t {
2038  const char *symbol;
2039  uint8_t sub_types;
2041  uintptr_t num_candlesticks;
2043 
2047 typedef struct lb_security_t {
2051  const char *symbol;
2055  const char *name_cn;
2059  const char *name_en;
2063  const char *name_hk;
2065 
2073  const char *symbol;
2077  const char *name_cn;
2081  const char *name_en;
2085  const char *name_hk;
2089  const char *exchange;
2093  const char *currency;
2097  int32_t lot_size;
2101  int64_t total_shares;
2109  int64_t hk_shares;
2113  const struct lb_decimal_t *eps;
2117  const struct lb_decimal_t *eps_ttm;
2121  const struct lb_decimal_t *bps;
2135 
2139 typedef struct lb_prepost_quote_t {
2143  const struct lb_decimal_t *last_done;
2147  int64_t timestamp;
2151  int64_t volume;
2155  const struct lb_decimal_t *turnover;
2159  const struct lb_decimal_t *high;
2163  const struct lb_decimal_t *low;
2167  const struct lb_decimal_t *prev_close;
2169 
2173 typedef struct lb_security_quote_t {
2177  const char *symbol;
2181  const struct lb_decimal_t *last_done;
2185  const struct lb_decimal_t *prev_close;
2189  const struct lb_decimal_t *open;
2193  const struct lb_decimal_t *high;
2197  const struct lb_decimal_t *low;
2201  int64_t timestamp;
2205  int64_t volume;
2209  const struct lb_decimal_t *turnover;
2227 
2231 typedef struct lb_option_quote_t {
2235  const char *symbol;
2239  const struct lb_decimal_t *last_done;
2243  const struct lb_decimal_t *prev_close;
2247  const struct lb_decimal_t *open;
2251  const struct lb_decimal_t *high;
2255  const struct lb_decimal_t *low;
2259  int64_t timestamp;
2263  int64_t volume;
2267  const struct lb_decimal_t *turnover;
2279  int64_t open_interest;
2283  struct lb_date_t expiry_date;
2311  const char *underlying_symbol;
2313 
2317 typedef struct lb_warrant_quote_t {
2321  const char *symbol;
2325  const struct lb_decimal_t *last_done;
2329  const struct lb_decimal_t *prev_close;
2333  const struct lb_decimal_t *open;
2337  const struct lb_decimal_t *high;
2341  const struct lb_decimal_t *low;
2345  int64_t timestamp;
2349  int64_t volume;
2353  const struct lb_decimal_t *turnover;
2365  struct lb_date_t expiry_date;
2369  struct lb_date_t last_trade_date;
2401  const struct lb_decimal_t *call_price;
2405  const char *underlying_symbol;
2407 
2411 typedef struct lb_security_depth_t {
2415  const struct lb_depth_t *asks;
2419  uintptr_t num_asks;
2423  const struct lb_depth_t *bids;
2427  uintptr_t num_bids;
2429 
2433 typedef struct lb_security_brokers_t {
2437  const struct lb_brokers_t *ask_brokers;
2441  uintptr_t num_ask_brokers;
2445  const struct lb_brokers_t *bid_brokers;
2449  uintptr_t num_bid_brokers;
2451 
2455 typedef struct lb_participant_info_t {
2459  const int32_t *broker_ids;
2463  uintptr_t num_broker_ids;
2467  const char *name_cn;
2471  const char *name_en;
2475  const char *name_hk;
2477 
2481 typedef struct lb_intraday_line_t {
2485  const struct lb_decimal_t *price;
2489  int64_t timestamp;
2493  int64_t volume;
2497  const struct lb_decimal_t *turnover;
2501  const struct lb_decimal_t *avg_price;
2503 
2507 typedef struct lb_strike_price_info_t {
2511  const struct lb_decimal_t *price;
2515  const char *call_symbol;
2519  const char *put_symbol;
2523  bool standard;
2525 
2529 typedef struct lb_issuer_info_t {
2533  int32_t issuer_id;
2537  const char *name_cn;
2541  const char *name_en;
2545  const char *name_hk;
2547 
2555  struct lb_time_t begin_time;
2559  struct lb_time_t end_time;
2565 
2573  enum lb_market_t market;
2583 
2591  const struct lb_date_t *trading_days;
2595  uintptr_t num_trading_days;
2605 
2609 typedef struct lb_capital_flow_line_t {
2613  const struct lb_decimal_t *inflow;
2617  int64_t timestamp;
2619 
2627  const struct lb_decimal_t *large;
2631  const struct lb_decimal_t *medium;
2635  const struct lb_decimal_t *small;
2637 
2645  int64_t timestamp;
2655 
2659 typedef struct lb_realtime_quote_t {
2663  const char *symbol;
2667  const struct lb_decimal_t *last_done;
2671  const struct lb_decimal_t *open;
2675  const struct lb_decimal_t *high;
2679  const struct lb_decimal_t *low;
2683  int64_t timestamp;
2687  int64_t volume;
2691  const struct lb_decimal_t *turnover;
2697 
2701 typedef struct lb_execution_t {
2705  const char *order_id;
2709  const char *trade_id;
2713  const char *symbol;
2717  int64_t trade_done_at;
2721  const struct lb_decimal_t *quantity;
2725  const struct lb_decimal_t *price;
2727 
2731 typedef struct lb_order_t {
2735  const char *order_id;
2743  const char *stock_name;
2747  const struct lb_decimal_t *quantity;
2755  const struct lb_decimal_t *price;
2763  int64_t submitted_at;
2767  enum lb_order_side_t side;
2771  const char *symbol;
2779  const struct lb_decimal_t *last_done;
2787  const char *msg;
2791  enum lb_order_tag_t tag;
2799  const struct lb_date_t *expire_date;
2803  const int64_t *updated_at;
2807  const int64_t *trigger_at;
2827  const char *currency;
2835  const char *remark;
2837 
2845  const char *currency;
2851 
2855 typedef struct lb_cash_info_t {
2867  const struct lb_decimal_t *frozen_cash;
2875  const char *currency;
2877 
2881 typedef struct lb_account_balance_t {
2885  const struct lb_decimal_t *total_cash;
2897  int32_t risk_level;
2901  const struct lb_decimal_t *margin_call;
2905  const char *currency;
2913  uintptr_t num_cash_infos;
2917  const struct lb_decimal_t *net_assets;
2921  const struct lb_decimal_t *init_margin;
2929  const struct lb_decimal_t *buy_power;
2939 
2943 typedef struct lb_cash_flow_t {
2959  const struct lb_decimal_t *balance;
2963  const char *currency;
2967  int64_t business_time;
2971  const char *symbol;
2975  const char *description;
2977 
2981 typedef struct lb_fund_position_t {
2985  const char *symbol;
2997  const char *symbol_name;
3001  const char *currency;
3011 
3019  const char *account_channel;
3027  uintptr_t num_positions;
3029 
3041  uintptr_t num_channels;
3043 
3047 typedef struct lb_stock_position_t {
3051  const char *symbol;
3055  const char *symbol_name;
3059  const struct lb_decimal_t *quantity;
3067  const char *currency;
3072  const struct lb_decimal_t *cost_price;
3076  enum lb_market_t market;
3082 
3090  const char *account_channel;
3098  uintptr_t num_positions;
3100 
3112  uintptr_t num_channels;
3114 
3122  const char *order_id;
3124 
3128 typedef struct lb_watchlist_security_t {
3132  const char *symbol;
3136  enum lb_market_t market;
3140  const char *name;
3148  int64_t watched_at;
3150 
3154 typedef struct lb_watchlist_group_t {
3158  int64_t id;
3162  const char *name;
3170  uintptr_t num_securities;
3172 
3176 typedef struct lb_margin_ratio_t {
3180  const struct lb_decimal_t *im_factor;
3184  const struct lb_decimal_t *mm_factor;
3188  const struct lb_decimal_t *fm_factor;
3190 
3195  const struct lb_decimal_t *price;
3196  const struct lb_decimal_t *quantity;
3198  const char *msg;
3199  int64_t time;
3201 
3205 typedef struct lb_order_charge_fee_t {
3209  const char *code;
3213  const char *name;
3217  const struct lb_decimal_t *amount;
3221  const char *currency;
3223 
3227 typedef struct lb_order_charge_item_t {
3235  const char *name;
3243  uintptr_t num_fees;
3245 
3257  const char *currency;
3265  uintptr_t num_items;
3267 
3271 typedef struct lb_order_detail_t {
3275  const char *order_id;
3283  const char *stock_name;
3287  const struct lb_decimal_t *quantity;
3295  const struct lb_decimal_t *price;
3303  int64_t submitted_at;
3307  enum lb_order_side_t side;
3311  const char *symbol;
3319  const struct lb_decimal_t *last_done;
3327  const char *msg;
3331  enum lb_order_tag_t tag;
3339  const struct lb_date_t *expire_date;
3343  const int64_t *updated_at;
3347  const int64_t *trigger_at;
3367  const char *currency;
3375  const char *remark;
3383  const struct lb_decimal_t *free_amount;
3387  const char *free_currency;
3399  const char *deductions_currency;
3419  uintptr_t num_history;
3425 
3439 
3447  const char *symbol;
3451  const struct lb_decimal_t *last_done;
3459  const struct lb_decimal_t *change_rate;
3463  const int64_t *volume;
3467  const struct lb_decimal_t *turnover;
3487  const struct lb_decimal_t *amplitude;
3499  const struct lb_decimal_t *pb_ratio;
3523  const struct lb_date_t *expiry_date;
3539  const int64_t *outstanding_qty;
3547  const struct lb_decimal_t *premium;
3551  const struct lb_decimal_t *itm_otm;
3563  const struct lb_decimal_t *call_price;
3587  const int64_t *open_interest;
3591  const struct lb_decimal_t *delta;
3595  const struct lb_decimal_t *gamma;
3599  const struct lb_decimal_t *theta;
3603  const struct lb_decimal_t *vega;
3607  const struct lb_decimal_t *rho;
3609 
3613 typedef struct lb_warrant_info_t {
3617  const char *symbol;
3625  const char *name;
3629  const struct lb_decimal_t *last_done;
3633  const struct lb_decimal_t *change_rate;
3641  int64_t volume;
3645  const struct lb_decimal_t *turnover;
3649  struct lb_date_t expiry_date;
3673  const struct lb_decimal_t *premium;
3677  const struct lb_decimal_t *itm_otm;
3685  const struct lb_decimal_t *delta;
3689  const struct lb_decimal_t *call_price;
3715 
3723  const char *key;
3727  const char *name;
3731  const char *description;
3735  int64_t start_at;
3739  int64_t end_at;
3741 
3745 typedef struct lb_market_temperature_t {
3749  int32_t temperature;
3753  const char *description;
3757  int32_t valuation;
3761  int32_t sentiment;
3765  int64_t timestamp;
3767 
3780  uintptr_t num_records;
3782 
3783 #ifdef __cplusplus
3784 extern "C" {
3785 #endif // __cplusplus
3786 
3814 
3815 struct lb_config_t *lb_config_new(const char *app_key,
3816  const char *app_secret,
3817  const char *access_token,
3818  const char *http_url,
3819  const char *quote_ws_url,
3820  const char *trade_ws_url,
3821  const enum lb_language_t *language,
3822  bool enable_overight,
3823  const enum lb_push_candlestick_mode_t *push_candlestick_mode,
3824  bool enable_print_quote_packages,
3825  const char *log_path);
3826 
3830 void lb_config_free(struct lb_config_t *config);
3831 
3836  int64_t expired_at,
3837  lb_async_callback_t callback,
3838  void *userdata);
3839 
3843 void lb_error_free(struct lb_error_t *error);
3844 
3845 const char *lb_error_message(const struct lb_error_t *error);
3846 
3847 int64_t lb_error_code(const struct lb_error_t *error);
3848 
3852 struct lb_http_client_t *lb_http_client_new(const char *http_url,
3853  const char *app_key,
3854  const char *app_secret,
3855  const char *access_token);
3856 
3860 void lb_http_client_free(struct lb_http_client_t *http_client);
3861 
3876 
3880 void lb_http_client_request(struct lb_http_client_t *http_client,
3881  const char *method,
3882  const char *path,
3883  const struct lb_http_header_t *headers,
3884  const char *request_body,
3885  lb_async_callback_t callback,
3886  void *userdata);
3887 
3891 void lb_http_result_free(struct lb_http_result_t *http_result);
3892 
3893 const char *lb_http_result_response_body(const struct lb_http_result_t *http_result);
3894 
3895 void lb_quote_context_new(const struct lb_config_t *config,
3896  lb_async_callback_t callback,
3897  void *userdata);
3898 
3900 
3902 
3903 uintptr_t lb_quote_context_ref_count(const struct lb_quote_context_t *ctx);
3904 
3905 void lb_quote_context_set_userdata(const struct lb_quote_context_t *ctx, void *userdata);
3906 
3908 
3911 
3913 
3914 const char *lb_quote_context_quote_level(const struct lb_quote_context_t *ctx);
3915 
3917  lb_async_callback_t callback,
3918  void *userdata);
3919 
3925  lb_quote_callback_t callback,
3926  void *userdata,
3927  lb_free_userdata_func_t free_userdata);
3928 
3934  lb_depth_callback_t callback,
3935  void *userdata,
3936  lb_free_userdata_func_t free_userdata);
3937 
3943  lb_brokers_callback_t callback,
3944  void *userdata,
3945  lb_free_userdata_func_t free_userdata);
3946 
3952  lb_trades_callback_t callback,
3953  void *userdata,
3954  lb_free_userdata_func_t free_userdata);
3955 
3961  lb_candlestick_callback_t callback,
3962  void *userdata,
3963  lb_free_userdata_func_t free_userdata);
3964 
3966  const char *const *symbols,
3967  uintptr_t num_symbols,
3968  uint8_t sub_types,
3969  bool is_first_push,
3970  lb_async_callback_t callback,
3971  void *userdata);
3972 
3977  const char *const *symbols,
3978  uintptr_t num_symbols,
3979  uint8_t sub_types,
3980  lb_async_callback_t callback,
3981  void *userdata);
3982 
3987  const char *symbol,
3988  enum lb_period_t period,
3989  enum lb_trade_sessions_t trade_sessions,
3990  lb_async_callback_t callback,
3991  void *userdata);
3992 
3997  const char *symbol,
3998  enum lb_period_t period,
3999  lb_async_callback_t callback,
4000  void *userdata);
4001 
4006  lb_async_callback_t callback,
4007  void *userdata);
4008 
4013  const char *const *symbols,
4014  uintptr_t num_symbols,
4015  lb_async_callback_t callback,
4016  void *userdata);
4017 
4022  const char *const *symbols,
4023  uintptr_t num_symbols,
4024  lb_async_callback_t callback,
4025  void *userdata);
4026 
4031  const char *const *symbols,
4032  uintptr_t num_symbols,
4033  lb_async_callback_t callback,
4034  void *userdata);
4035 
4040  const char *const *symbols,
4041  uintptr_t num_symbols,
4042  lb_async_callback_t callback,
4043  void *userdata);
4044 
4049  const char *symbol,
4050  lb_async_callback_t callback,
4051  void *userdata);
4052 
4057  const char *symbol,
4058  lb_async_callback_t callback,
4059  void *userdata);
4060 
4065  lb_async_callback_t callback,
4066  void *userdata);
4067 
4072  const char *symbol,
4073  uintptr_t count,
4074  lb_async_callback_t callback,
4075  void *userdata);
4076 
4081  const char *symbol,
4082  lb_async_callback_t callback,
4083  void *userdata);
4084 
4089  const char *symbol,
4090  enum lb_period_t period,
4091  uintptr_t count,
4092  enum lb_adjust_type_t adjust_type,
4093  enum lb_trade_sessions_t trade_sessions,
4094  lb_async_callback_t callback,
4095  void *userdata);
4096 
4101  const char *symbol,
4102  enum lb_period_t period,
4103  enum lb_adjust_type_t adjust_type,
4104  bool forward,
4105  const struct lb_datetime_t *time,
4106  uintptr_t count,
4107  enum lb_trade_sessions_t trade_sessions,
4108  lb_async_callback_t callback,
4109  void *userdata);
4110 
4115  const char *symbol,
4116  enum lb_period_t period,
4117  enum lb_adjust_type_t adjust_type,
4118  const struct lb_date_t *start,
4119  const struct lb_date_t *end,
4120  enum lb_trade_sessions_t trade_sessions,
4121  lb_async_callback_t callback,
4122  void *userdata);
4123 
4128  const char *symbol,
4129  lb_async_callback_t callback,
4130  void *userdata);
4131 
4136  const char *symbol,
4137  const struct lb_date_t *expiry_date,
4138  lb_async_callback_t callback,
4139  void *userdata);
4140 
4145  lb_async_callback_t callback,
4146  void *userdata);
4147 
4152  const char *symbol,
4153  enum lb_warrant_sort_by_t sort_by,
4154  enum lb_sort_order_type_t sort_order,
4155  const enum lb_warrant_type_t *warrant_type,
4156  uintptr_t num_warrant_type,
4157  const int32_t *issuer,
4158  uintptr_t num_issuer,
4159  const enum lb_filter_warrant_expiry_date_t *expiry_date,
4160  uintptr_t num_expiry_date,
4161  const enum lb_filter_warrant_in_out_bounds_type_t *price_type,
4162  uintptr_t num_price_type,
4163  const enum lb_warrant_status_t *status,
4164  uintptr_t num_status,
4165  lb_async_callback_t callback,
4166  void *userdata);
4167 
4172  lb_async_callback_t callback,
4173  void *userdata);
4174 
4179  enum lb_market_t market,
4180  const struct lb_date_t *begin,
4181  const struct lb_date_t *end,
4182  lb_async_callback_t callback,
4183  void *userdata);
4184 
4189  const char *symbol,
4190  lb_async_callback_t callback,
4191  void *userdata);
4192 
4197  const char *symbol,
4198  lb_async_callback_t callback,
4199  void *userdata);
4200 
4205  const char *const *symbols,
4206  uintptr_t num_symbols,
4207  const enum lb_calc_index_t *indexes,
4208  uintptr_t num_indexes,
4209  lb_async_callback_t callback,
4210  void *userdata);
4211 
4216  lb_async_callback_t callback,
4217  void *userdata);
4218 
4223  const struct lb_create_watchlist_group_t *req,
4224  lb_async_callback_t callback,
4225  void *userdata);
4226 
4231  int64_t id,
4232  bool purge,
4233  lb_async_callback_t callback,
4234  void *userdata);
4235 
4240  const struct lb_update_watchlist_group_t *req,
4241  lb_async_callback_t callback,
4242  void *userdata);
4243 
4251  const char *const *symbols,
4252  uintptr_t num_symbols,
4253  lb_async_callback_t callback,
4254  void *userdata);
4255 
4263  const char *symbol,
4264  lb_async_callback_t callback,
4265  void *userdata);
4266 
4274  const char *symbol,
4275  uintptr_t count,
4276  lb_async_callback_t callback,
4277  void *userdata);
4278 
4286  const char *symbol,
4287  lb_async_callback_t callback,
4288  void *userdata);
4289 
4297  const char *symbol,
4298  enum lb_period_t period,
4299  uintptr_t count,
4300  lb_async_callback_t callback,
4301  void *userdata);
4302 
4307  enum lb_market_t market,
4308  enum lb_security_list_category_t category,
4309  lb_async_callback_t callback,
4310  void *userdata);
4311 
4316  enum lb_market_t market,
4317  lb_async_callback_t callback,
4318  void *userdata);
4319 
4324  enum lb_market_t market,
4325  const struct lb_date_t *start,
4326  const struct lb_date_t *end,
4327  lb_async_callback_t callback,
4328  void *userdata);
4329 
4330 void lb_trade_context_new(const struct lb_config_t *config,
4331  lb_async_callback_t callback,
4332  void *userdata);
4333 
4335 
4337 
4338 uintptr_t lb_trade_context_ref_count(const struct lb_trade_context_t *ctx);
4339 
4340 void lb_trade_context_set_userdata(const struct lb_trade_context_t *ctx, void *userdata);
4341 
4343 
4346 
4352  lb_order_changed_callback_t callback,
4353  void *userdata,
4354  lb_free_userdata_func_t free_userdata);
4355 
4357  const enum lb_topic_type_t *topics,
4358  uintptr_t num_topics,
4359  lb_async_callback_t callback,
4360  void *userdata);
4361 
4363  const enum lb_topic_type_t *topics,
4364  uintptr_t num_topics,
4365  lb_async_callback_t callback,
4366  void *userdata);
4367 
4374  const struct lb_get_history_executions_options_t *opts,
4375  lb_async_callback_t callback,
4376  void *userdata);
4377 
4384  const struct lb_get_today_executions_options_t *opts,
4385  lb_async_callback_t callback,
4386  void *userdata);
4387 
4394  const struct lb_get_history_orders_options_t *opts,
4395  lb_async_callback_t callback,
4396  void *userdata);
4397 
4404  const struct lb_get_today_orders_options_t *opts,
4405  lb_async_callback_t callback,
4406  void *userdata);
4407 
4414  const struct lb_replace_order_options_t *opts,
4415  lb_async_callback_t callback,
4416  void *userdata);
4417 
4424  const struct lb_submit_order_options_t *opts,
4425  lb_async_callback_t callback,
4426  void *userdata);
4427 
4432  const char *order_id,
4433  lb_async_callback_t callback,
4434  void *userdata);
4435 
4440  const char *currency,
4441  lb_async_callback_t callback,
4442  void *userdata);
4443 
4450  const struct lb_get_cash_flow_options_t *opts,
4451  lb_async_callback_t callback,
4452  void *userdata);
4453 
4460  const struct lb_get_fund_positions_options_t *opts,
4461  lb_async_callback_t callback,
4462  void *userdata);
4463 
4470  const struct lb_get_stock_positions_options_t *opts,
4471  lb_async_callback_t callback,
4472  void *userdata);
4473 
4478  const char *symbol,
4479  lb_async_callback_t callback,
4480  void *userdata);
4481 
4486  const char *order_id,
4487  lb_async_callback_t callback,
4488  void *userdata);
4489 
4495  lb_async_callback_t callback,
4496  void *userdata);
4497 
4502 struct lb_decimal_t *lb_decimal_new(int64_t num, uint32_t scale);
4503 
4507 struct lb_decimal_t *lb_decimal_clone(const struct lb_decimal_t *value);
4508 
4512 struct lb_decimal_t *lb_decimal_from_str(const char *value);
4513 
4517 struct lb_decimal_t *lb_decimal_from_double(double value);
4518 
4522 void lb_decimal_free(struct lb_decimal_t *value);
4523 
4524 double lb_decimal_to_double(const struct lb_decimal_t *value);
4525 
4529 void lb_decimal_abs(struct lb_decimal_t *value);
4530 
4534 void lb_decimal_ceil(struct lb_decimal_t *value);
4535 
4539 void lb_decimal_floor(struct lb_decimal_t *value);
4540 
4544 void lb_decimal_fract(struct lb_decimal_t *value);
4545 
4549 bool lb_decimal_is_negative(const struct lb_decimal_t *value);
4550 
4554 bool lb_decimal_is_positive(const struct lb_decimal_t *value);
4555 
4559 bool lb_decimal_is_zero(const struct lb_decimal_t *value);
4560 
4564 const struct lb_decimal_t *lb_decimal_max(const struct lb_decimal_t *a,
4565  const struct lb_decimal_t *b);
4566 
4570 const struct lb_decimal_t *lb_decimal_min(const struct lb_decimal_t *a,
4571  const struct lb_decimal_t *b);
4572 
4577 
4583 void lb_decimal_round(struct lb_decimal_t *value);
4584 
4590 void lb_decimal_round_dp(struct lb_decimal_t *value, uint32_t dp);
4591 
4596 void lb_decimal_trunc(struct lb_decimal_t *value);
4597 
4601 void lb_decimal_add(struct lb_decimal_t *a, const struct lb_decimal_t *b);
4602 
4606 void lb_decimal_sub(struct lb_decimal_t *a, const struct lb_decimal_t *b);
4607 
4611 void lb_decimal_mul(struct lb_decimal_t *a, const struct lb_decimal_t *b);
4612 
4616 void lb_decimal_div(struct lb_decimal_t *a, const struct lb_decimal_t *b);
4617 
4621 void lb_decimal_rem(struct lb_decimal_t *a, const struct lb_decimal_t *b);
4622 
4626 void lb_decimal_neg(struct lb_decimal_t *value);
4627 
4632 bool lb_decimal_gt(const struct lb_decimal_t *a, const struct lb_decimal_t *b);
4633 
4638 bool lb_decimal_gte(const struct lb_decimal_t *a, const struct lb_decimal_t *b);
4639 
4644 bool lb_decimal_eq(const struct lb_decimal_t *a, const struct lb_decimal_t *b);
4645 
4650 bool lb_decimal_lt(const struct lb_decimal_t *a, const struct lb_decimal_t *b);
4651 
4656 bool lb_decimal_lte(const struct lb_decimal_t *a, const struct lb_decimal_t *b);
4657 
4669 int32_t lb_decimal_cmp(const struct lb_decimal_t *a, const struct lb_decimal_t *b);
4670 
4674 void lb_decimal_sin(struct lb_decimal_t *value);
4675 
4679 void lb_decimal_cos(struct lb_decimal_t *value);
4680 
4685 void lb_decimal_tan(struct lb_decimal_t *value);
4686 
4690 void lb_decimal_sqrt(struct lb_decimal_t *value);
4691 
4696 void lb_decimal_pow(struct lb_decimal_t *value, const struct lb_decimal_t *exp);
4697 
4702 void lb_decimal_ln(struct lb_decimal_t *value);
4703 
4707 void lb_decimal_log10(struct lb_decimal_t *value);
4708 
4713 void lb_decimal_exp(struct lb_decimal_t *value);
4714 
4722  const struct lb_decimal_t *tolerance);
4723 
4727 void lb_decimal_erf(struct lb_decimal_t *value);
4728 
4733 
4737 void lb_decimal_norm_pdf(struct lb_decimal_t *value);
4738 
4742 const char *lb_decimal_to_string(const struct lb_decimal_t *value);
4743 
4744 #ifdef __cplusplus
4745 } // extern "C"
4746 #endif // __cplusplus
4747 
4748 #endif /* _LONGPORT_H_ */
struct lb_push_quote_t lb_push_quote_t
struct lb_subscription_t lb_subscription_t
void(* lb_trades_callback_t)(const struct lb_quote_context_t *, const struct lb_push_trades_t *, void *)
Definition: longport.h:1530
lb_trade_session_t
Definition: longport.h:1000
@ TradeSessionPre
Definition: longport.h:1008
@ TradeSessionOvernight
Definition: longport.h:1016
@ TradeSessionIntraday
Definition: longport.h:1004
@ TradeSessionPost
Definition: longport.h:1012
struct lb_decimal_t lb_decimal_t
Definition: longport.h:1252
void lb_quote_context_trades(const struct lb_quote_context_t *ctx, const char *symbol, uintptr_t count, lb_async_callback_t callback, void *userdata)
uintptr_t lb_trade_context_ref_count(const struct lb_trade_context_t *ctx)
void lb_quote_context_history_market_temperature(const struct lb_quote_context_t *ctx, enum lb_market_t market, const struct lb_date_t *start, const struct lb_date_t *end, lb_async_callback_t callback, void *userdata)
void lb_trade_context_release(const struct lb_trade_context_t *ctx)
struct lb_decimal_t * lb_decimal_from_double(double value)
void lb_quote_context_set_on_brokers(const struct lb_quote_context_t *ctx, lb_brokers_callback_t callback, void *userdata, lb_free_userdata_func_t free_userdata)
void lb_quote_context_realtime_candlesticks(const struct lb_quote_context_t *ctx, const char *symbol, enum lb_period_t period, uintptr_t count, lb_async_callback_t callback, void *userdata)
lb_warrant_sort_by_t
Definition: longport.h:1108
@ WarrantSortByStrikePrice
Definition: longport.h:1136
@ WarrantSortByLowerStrikePrice
Definition: longport.h:1144
@ WarrantSortByConversionRatio
Definition: longport.h:1188
@ WarrantSortByOutstandingQuantity
Definition: longport.h:1148
@ WarrantSortByPremium
Definition: longport.h:1156
@ WarrantSortByLeverageRatio
Definition: longport.h:1184
@ WarrantSortByCallPrice
Definition: longport.h:1172
@ WarrantSortByChangeValue
Definition: longport.h:1120
@ WarrantSortByBalancePoint
Definition: longport.h:1192
@ WarrantSortByImpliedVolatility
Definition: longport.h:1164
@ WarrantSortByVolume
Definition: longport.h:1124
@ WarrantSortByToCallPrice
Definition: longport.h:1176
@ WarrantSortByItmOtm
Definition: longport.h:1160
@ WarrantSortByTurnover
Definition: longport.h:1128
@ WarrantSortByExpiryDate
Definition: longport.h:1132
@ WarrantSortByOutstandingRatio
Definition: longport.h:1152
@ WarrantSortByChangeRate
Definition: longport.h:1116
@ WarrantSortByEffectiveLeverage
Definition: longport.h:1180
@ WarrantSortByUpperStrikePrice
Definition: longport.h:1140
@ WarrantSortByStatus
Definition: longport.h:1196
@ WarrantSortByDelta
Definition: longport.h:1168
@ WarrantSortByLastDone
Definition: longport.h:1112
double lb_decimal_to_double(const struct lb_decimal_t *value)
void lb_decimal_add(struct lb_decimal_t *a, const struct lb_decimal_t *b)
struct lb_realtime_quote_t lb_realtime_quote_t
struct lb_estimate_max_purchase_quantity_options_t lb_estimate_max_purchase_quantity_options_t
void lb_decimal_neg(struct lb_decimal_t *value)
void lb_quote_context_option_chain_info_by_date(const struct lb_quote_context_t *ctx, const char *symbol, const struct lb_date_t *expiry_date, lb_async_callback_t callback, void *userdata)
lb_sort_order_type_t
Definition: longport.h:936
@ SortOrderDescending
Definition: longport.h:944
@ SortOrderAscending
Definition: longport.h:940
lb_cash_flow_direction_t
Definition: longport.h:254
@ CashFlowDirectionOut
Definition: longport.h:262
@ CashFlowDirectionUnknown
Definition: longport.h:258
@ CashFlowDirectionIn
Definition: longport.h:266
void lb_decimal_cos(struct lb_decimal_t *value)
struct lb_time_t lb_time_t
uintptr_t lb_quote_context_ref_count(const struct lb_quote_context_t *ctx)
struct lb_get_today_executions_options_t lb_get_today_executions_options_t
bool lb_decimal_gte(const struct lb_decimal_t *a, const struct lb_decimal_t *b)
struct lb_security_static_info_t lb_security_static_info_t
lb_outside_rth_t
Definition: longport.h:684
@ OutsideRTHOnly
Definition: longport.h:692
@ OutsideRTHOvernight
Definition: longport.h:700
@ OutsideRTHUnknown
Definition: longport.h:688
@ OutsideRTHAnyTime
Definition: longport.h:696
void lb_quote_context_subscrptions(const struct lb_quote_context_t *ctx, lb_async_callback_t callback, void *userdata)
void lb_http_result_free(struct lb_http_result_t *http_result)
int64_t lb_quote_context_member_id(const struct lb_quote_context_t *ctx)
void(* lb_candlestick_callback_t)(const struct lb_quote_context_t *, const struct lb_push_candlestick_t *, void *)
Definition: longport.h:1594
struct lb_config_t lb_config_t
Definition: longport.h:1250
void lb_decimal_trunc(struct lb_decimal_t *value)
lb_deduction_status_t
Definition: longport.h:316
@ DeductionStatusNoData
Definition: longport.h:328
@ DeductionStatusDone
Definition: longport.h:336
@ DeductionStatusNone
Definition: longport.h:324
@ DeductionStatusPending
Definition: longport.h:332
@ DeductionStatusUnknown
Definition: longport.h:320
void(* lb_brokers_callback_t)(const struct lb_quote_context_t *, const struct lb_push_brokers_t *, void *)
Definition: longport.h:1447
void lb_quote_context_delete_watchlist_group(const struct lb_quote_context_t *ctx, int64_t id, bool purge, lb_async_callback_t callback, void *userdata)
void lb_decimal_ceil(struct lb_decimal_t *value)
lb_trade_direction_t
Definition: longport.h:982
@ TradeDirectionNeutral
Definition: longport.h:986
@ TradeDirectionUp
Definition: longport.h:994
@ TradeDirectionDown
Definition: longport.h:990
lb_period_t
Definition: longport.h:706
@ PeriodQuarter
Definition: longport.h:778
@ PeriodMin120
Definition: longport.h:754
@ PeriodMin15
Definition: longport.h:734
@ PeriodYear
Definition: longport.h:782
@ PeriodMin5
Definition: longport.h:726
@ PeriodMin240
Definition: longport.h:762
@ PeriodMin3
Definition: longport.h:722
@ PeriodMin1
Definition: longport.h:714
@ PeriodMin2
Definition: longport.h:718
@ PeriodMin10
Definition: longport.h:730
@ PeriodMin60
Definition: longport.h:750
@ PeriodMin45
Definition: longport.h:746
@ PeriodDay
Definition: longport.h:766
@ PeriodMin20
Definition: longport.h:738
@ PeriodWeek
Definition: longport.h:770
@ PeriodUnknown
Definition: longport.h:710
@ PeriodMonth
Definition: longport.h:774
@ PeriodMin30
Definition: longport.h:742
@ PeriodMin180
Definition: longport.h:758
void lb_quote_context_capital_distribution(const struct lb_quote_context_t *ctx, const char *symbol, lb_async_callback_t callback, void *userdata)
void lb_error_free(struct lb_error_t *error)
void lb_decimal_erf(struct lb_decimal_t *value)
void lb_decimal_normalize(struct lb_decimal_t *value)
lb_trade_status_t
Definition: longport.h:1036
@ TradeStatusCodeMoved
Definition: longport.h:1060
@ TradeStatusWarrantPrepareList
Definition: longport.h:1076
@ TradeStatusDelisted
Definition: longport.h:1048
@ TradeStatusFuse
Definition: longport.h:1052
@ TradeStatusNormal
Definition: longport.h:1040
@ TradeStatusPrepareList
Definition: longport.h:1056
@ TradeStatusSuspendTrade
Definition: longport.h:1080
@ TradeStatusHalted
Definition: longport.h:1044
@ TradeStatusToBeOpened
Definition: longport.h:1064
@ TradeStatusSplitStockHalts
Definition: longport.h:1068
@ TradeStatusExpired
Definition: longport.h:1072
struct lb_capital_flow_line_t lb_capital_flow_line_t
struct lb_fund_position_t lb_fund_position_t
void lb_quote_context_calc_indexes(const struct lb_quote_context_t *ctx, const char *const *symbols, uintptr_t num_symbols, const enum lb_calc_index_t *indexes, uintptr_t num_indexes, lb_async_callback_t callback, void *userdata)
lb_trade_sessions_t
Definition: longport.h:1022
@ TradeSessionsAll
Definition: longport.h:1030
@ TradeSessionsIntraday
Definition: longport.h:1026
struct lb_replace_order_options_t lb_replace_order_options_t
void lb_config_free(struct lb_config_t *config)
void lb_quote_context_release(const struct lb_quote_context_t *ctx)
void lb_quote_context_history_candlesticks_by_offset(const struct lb_quote_context_t *ctx, const char *symbol, enum lb_period_t period, enum lb_adjust_type_t adjust_type, bool forward, const struct lb_datetime_t *time, uintptr_t count, enum lb_trade_sessions_t trade_sessions, lb_async_callback_t callback, void *userdata)
struct lb_quote_package_detail_t lb_quote_package_detail_t
struct lb_push_order_changed_t lb_push_order_changed_t
void lb_quote_context_update_watchlist_group(const struct lb_quote_context_t *ctx, const struct lb_update_watchlist_group_t *req, lb_async_callback_t callback, void *userdata)
void lb_quote_context_history_candlesticks_by_date(const struct lb_quote_context_t *ctx, const char *symbol, enum lb_period_t period, enum lb_adjust_type_t adjust_type, const struct lb_date_t *start, const struct lb_date_t *end, enum lb_trade_sessions_t trade_sessions, lb_async_callback_t callback, void *userdata)
struct lb_quote_context_t lb_quote_context_t
Definition: longport.h:1266
struct lb_order_history_detail_t lb_order_history_detail_t
struct lb_market_trading_days_t lb_market_trading_days_t
bool lb_decimal_eq(const struct lb_decimal_t *a, const struct lb_decimal_t *b)
void lb_decimal_abs(struct lb_decimal_t *value)
struct lb_warrant_quote_t lb_warrant_quote_t
lb_market_t
Definition: longport.h:418
@ MarketCN
Definition: longport.h:434
@ MarketHK
Definition: longport.h:430
@ MarketUnknown
Definition: longport.h:422
@ MarketSG
Definition: longport.h:438
@ MarketUS
Definition: longport.h:426
void(* lb_quote_callback_t)(const struct lb_quote_context_t *, const struct lb_push_quote_t *, void *)
Definition: longport.h:1347
struct lb_market_trading_session_t lb_market_trading_session_t
lb_filter_warrant_in_out_bounds_type_t
Definition: longport.h:364
@ WarrantInOutBoundsType_Out
Definition: longport.h:372
@ WarrantInOutBoundsType_In
Definition: longport.h:368
void lb_quote_context_set_on_candlestick(const struct lb_quote_context_t *ctx, lb_candlestick_callback_t callback, void *userdata, lb_free_userdata_func_t free_userdata)
struct lb_warrant_info_t lb_warrant_info_t
struct lb_fund_position_channel_t lb_fund_position_channel_t
void lb_trade_context_submit_order(const struct lb_trade_context_t *ctx, const struct lb_submit_order_options_t *opts, lb_async_callback_t callback, void *userdata)
void lb_trade_context_history_orders(const struct lb_trade_context_t *ctx, const struct lb_get_history_orders_options_t *opts, lb_async_callback_t callback, void *userdata)
struct lb_order_t lb_order_t
struct lb_stock_position_t lb_stock_position_t
void lb_trade_context_estimate_max_purchase_quantity(const struct lb_trade_context_t *ctx, const struct lb_estimate_max_purchase_quantity_options_t *opts, lb_async_callback_t callback, void *userdata)
void lb_quote_context_unsubscribe(const struct lb_quote_context_t *ctx, const char *const *symbols, uintptr_t num_symbols, uint8_t sub_types, lb_async_callback_t callback, void *userdata)
void(* lb_free_userdata_func_t)(void *)
Definition: longport.h:1291
struct lb_submit_order_options_t lb_submit_order_options_t
void lb_quote_context_realtime_depth(const struct lb_quote_context_t *ctx, const char *symbol, lb_async_callback_t callback, void *userdata)
void lb_quote_context_static_info(const struct lb_quote_context_t *ctx, const char *const *symbols, uintptr_t num_symbols, lb_async_callback_t callback, void *userdata)
struct lb_get_fund_positions_options_t lb_get_fund_positions_options_t
void lb_quote_context_watchlist(const struct lb_quote_context_t *ctx, lb_async_callback_t callback, void *userdata)
bool lb_decimal_lt(const struct lb_decimal_t *a, const struct lb_decimal_t *b)
struct lb_issuer_info_t lb_issuer_info_t
void lb_quote_context_create_watchlist_group(const struct lb_quote_context_t *ctx, const struct lb_create_watchlist_group_t *req, lb_async_callback_t callback, void *userdata)
struct lb_update_watchlist_group_t lb_update_watchlist_group_t
void lb_trade_context_subscribe(const struct lb_trade_context_t *ctx, const enum lb_topic_type_t *topics, uintptr_t num_topics, lb_async_callback_t callback, void *userdata)
void lb_decimal_exp(struct lb_decimal_t *value)
void lb_quote_context_option_quote(const struct lb_quote_context_t *ctx, const char *const *symbols, uintptr_t num_symbols, lb_async_callback_t callback, void *userdata)
lb_calc_index_t
Definition: longport.h:88
@ CalcIndexCallPrice
Definition: longport.h:204
@ CalcIndexOutstandingQty
Definition: longport.h:180
@ CalcIndexDividendRatioTtm
Definition: longport.h:144
@ CalcIndexChangeRate
Definition: longport.h:100
@ CalcIndexOutstandingRatio
Definition: longport.h:184
@ CalcIndexLeverageRatio
Definition: longport.h:216
@ CalcIndexCapitalFlow
Definition: longport.h:124
@ CalcIndexDelta
Definition: longport.h:232
@ CalcIndexToCallPrice
Definition: longport.h:208
@ CalcIndexTheta
Definition: longport.h:240
@ CalcIndexChangeValue
Definition: longport.h:96
@ CalcIndexTurnoverRate
Definition: longport.h:116
@ CalcIndexVolume
Definition: longport.h:104
@ CalcIndexYtdChangeRate
Definition: longport.h:112
@ CalcIndexFiveMinutesChangeRate
Definition: longport.h:160
@ CalcIndexUpperStrikePrice
Definition: longport.h:172
@ CalcIndexPbRatio
Definition: longport.h:140
@ CalcIndexWarrantDelta
Definition: longport.h:200
@ CalcIndexOpenInterest
Definition: longport.h:228
@ CalcIndexBalancePoint
Definition: longport.h:224
@ CalcIndexVolumeRatio
Definition: longport.h:132
@ CalcIndexExpiryDate
Definition: longport.h:164
@ CalcIndexPeTtmRatio
Definition: longport.h:136
@ CalcIndexConversionRatio
Definition: longport.h:220
@ CalcIndexGamma
Definition: longport.h:236
@ CalcIndexFiveDayChangeRate
Definition: longport.h:148
@ CalcIndexVega
Definition: longport.h:244
@ CalcIndexPremium
Definition: longport.h:188
@ CalcIndexAmplitude
Definition: longport.h:128
@ CalcIndexItmOtm
Definition: longport.h:192
@ CalcIndexRho
Definition: longport.h:248
@ CalcIndexLastDone
Definition: longport.h:92
@ CalcIndexLowerStrikePrice
Definition: longport.h:176
@ CalcIndexTenDayChangeRate
Definition: longport.h:152
@ CalcIndexTurnover
Definition: longport.h:108
@ CalcIndexEffectiveLeverage
Definition: longport.h:212
@ CalcIndexHalfYearChangeRate
Definition: longport.h:156
@ CalcIndexTotalMarketValue
Definition: longport.h:120
@ CalcIndexStrikePrice
Definition: longport.h:168
@ CalcIndexImpliedVolatility
Definition: longport.h:196
void lb_quote_context_intraday(const struct lb_quote_context_t *ctx, const char *symbol, lb_async_callback_t callback, void *userdata)
struct lb_account_balance_t lb_account_balance_t
void lb_http_client_request(struct lb_http_client_t *http_client, const char *method, const char *path, const struct lb_http_header_t *headers, const char *request_body, lb_async_callback_t callback, void *userdata)
struct lb_cash_flow_t lb_cash_flow_t
struct lb_security_quote_t lb_security_quote_t
struct lb_estimate_max_purchase_quantity_response_t lb_estimate_max_purchase_quantity_response_t
struct lb_intraday_line_t lb_intraday_line_t
void lb_quote_context_realtime_brokers(const struct lb_quote_context_t *ctx, const char *symbol, lb_async_callback_t callback, void *userdata)
void lb_trade_context_set_on_order_changed(const struct lb_trade_context_t *ctx, lb_order_changed_callback_t callback, void *userdata, lb_free_userdata_func_t free_userdata)
void lb_quote_context_realtime_quote(const struct lb_quote_context_t *ctx, const char *const *symbols, uintptr_t num_symbols, lb_async_callback_t callback, void *userdata)
void * lb_trade_context_userdata(const struct lb_trade_context_t *ctx)
struct lb_http_header_t lb_http_header_t
struct lb_decimal_t * lb_decimal_clone(const struct lb_decimal_t *value)
struct lb_http_client_t lb_http_client_t
Definition: longport.h:1259
void(* lb_async_callback_t)(const struct lb_async_result_t *)
Definition: longport.h:1281
void lb_quote_context_security_list(const struct lb_quote_context_t *ctx, enum lb_market_t market, enum lb_security_list_category_t category, lb_async_callback_t callback, void *userdata)
struct lb_create_watchlist_group_t lb_create_watchlist_group_t
void lb_decimal_sqrt(struct lb_decimal_t *value)
struct lb_push_depth_t lb_push_depth_t
void lb_quote_context_quote_package_details(const struct lb_quote_context_t *ctx, lb_async_callback_t callback, void *userdata)
lb_securities_update_mode_t
Definition: longport.h:802
@ SecuritiesUpdateModeAdd
Definition: longport.h:806
@ SecuritiesUpdateModeReplace
Definition: longport.h:814
@ SecuritiesUpdateModeRemove
Definition: longport.h:810
lb_warrant_status_t
Definition: longport.h:1202
@ WarrantStatusPrepareList
Definition: longport.h:1210
@ WarrantStatusSuspend
Definition: longport.h:1206
@ WarrantStatusNormal
Definition: longport.h:1214
void lb_quote_context_trading_days(const struct lb_quote_context_t *ctx, enum lb_market_t market, const struct lb_date_t *begin, const struct lb_date_t *end, lb_async_callback_t callback, void *userdata)
lb_filter_warrant_expiry_date_t
Definition: longport.h:342
@ WarrantExpiryDate_Between_6_12
Definition: longport.h:354
@ WarrantExpiryDate_LT_3
Definition: longport.h:346
@ WarrantExpiryDate_GT_12
Definition: longport.h:358
@ WarrantExpiryDate_Between_3_6
Definition: longport.h:350
lb_option_type_t
Definition: longport.h:462
@ OptionTypeEurope
Definition: longport.h:474
@ OptionTypeUnknown
Definition: longport.h:466
@ OptionTypeAmerican
Definition: longport.h:470
struct lb_push_candlestick_t lb_push_candlestick_t
lb_security_list_category_t
Definition: longport.h:926
@ SecurityListCategoryOvernight
Definition: longport.h:930
bool lb_decimal_is_positive(const struct lb_decimal_t *value)
lb_order_type_t
Definition: longport.h:622
@ OrderTypeUnknown
Definition: longport.h:626
@ OrderTypeTSMPCT
Definition: longport.h:674
@ OrderTypeELO
Definition: longport.h:634
@ OrderTypeAO
Definition: longport.h:642
@ OrderTypeMO
Definition: longport.h:638
@ OrderTypeTSMAMT
Definition: longport.h:670
@ OrderTypeSLO
Definition: longport.h:678
@ OrderTypeMIT
Definition: longport.h:658
@ OrderTypeLO
Definition: longport.h:630
@ OrderTypeLIT
Definition: longport.h:654
@ OrderTypeTSLPPCT
Definition: longport.h:666
@ OrderTypeODD
Definition: longport.h:650
@ OrderTypeALO
Definition: longport.h:646
@ OrderTypeTSLPAMT
Definition: longport.h:662
const struct lb_decimal_t * lb_decimal_max(const struct lb_decimal_t *a, const struct lb_decimal_t *b)
void lb_quote_context_retain(const struct lb_quote_context_t *ctx)
lb_trigger_status_t
Definition: longport.h:1086
@ TriggerStatusUnknown
Definition: longport.h:1090
@ TriggerStatusReleased
Definition: longport.h:1102
@ TriggerStatusDeactive
Definition: longport.h:1094
@ TriggerStatusActive
Definition: longport.h:1098
struct lb_get_history_executions_options_t lb_get_history_executions_options_t
void lb_decimal_norm_pdf(struct lb_decimal_t *value)
struct lb_http_client_t * lb_http_client_new(const char *http_url, const char *app_key, const char *app_secret, const char *access_token)
struct lb_date_t lb_date_t
const struct lb_decimal_t * lb_decimal_min(const struct lb_decimal_t *a, const struct lb_decimal_t *b)
struct lb_market_temperature_t lb_market_temperature_t
struct lb_error_t lb_error_t
Definition: longport.h:1254
struct lb_cash_info_t lb_cash_info_t
struct lb_async_result_t lb_async_result_t
void(* lb_depth_callback_t)(const struct lb_quote_context_t *, const struct lb_push_depth_t *, void *)
Definition: longport.h:1399
int64_t lb_error_code(const struct lb_error_t *error)
struct lb_http_client_t * lb_http_client_from_env(struct lb_error_t **error)
struct lb_security_brokers_t lb_security_brokers_t
void lb_quote_context_quote(const struct lb_quote_context_t *ctx, const char *const *symbols, uintptr_t num_symbols, lb_async_callback_t callback, void *userdata)
void lb_decimal_round(struct lb_decimal_t *value)
struct lb_capital_distribution_t lb_capital_distribution_t
struct lb_decimal_t * lb_decimal_new(int64_t num, uint32_t scale)
struct lb_strike_price_info_t lb_strike_price_info_t
void lb_trade_context_order_detail(const struct lb_trade_context_t *ctx, const char *order_id, lb_async_callback_t callback, void *userdata)
void lb_trade_context_cash_flow(const struct lb_trade_context_t *ctx, const struct lb_get_cash_flow_options_t *opts, lb_async_callback_t callback, void *userdata)
void lb_trade_context_set_userdata(const struct lb_trade_context_t *ctx, void *userdata)
struct lb_get_stock_positions_options_t lb_get_stock_positions_options_t
void lb_trade_context_replace_order(const struct lb_trade_context_t *ctx, const struct lb_replace_order_options_t *opts, lb_async_callback_t callback, void *userdata)
struct lb_get_history_orders_options_t lb_get_history_orders_options_t
struct lb_stock_position_response_t lb_stock_position_response_t
struct lb_trade_t lb_trade_t
void lb_trade_context_cancel_order(const struct lb_trade_context_t *ctx, const char *order_id, lb_async_callback_t callback, void *userdata)
void lb_decimal_sub(struct lb_decimal_t *a, const struct lb_decimal_t *b)
bool lb_decimal_gt(const struct lb_decimal_t *a, const struct lb_decimal_t *b)
void lb_trade_context_today_executions(const struct lb_trade_context_t *ctx, const struct lb_get_today_executions_options_t *opts, lb_async_callback_t callback, void *userdata)
bool lb_decimal_lte(const struct lb_decimal_t *a, const struct lb_decimal_t *b)
void lb_quote_context_trading_session(const struct lb_quote_context_t *ctx, lb_async_callback_t callback, void *userdata)
struct lb_trade_context_t lb_trade_context_t
Definition: longport.h:1271
struct lb_fund_position_response_t lb_fund_position_response_t
void lb_trade_context_account_balance(const struct lb_trade_context_t *ctx, const char *currency, lb_async_callback_t callback, void *userdata)
void * lb_quote_context_userdata(const struct lb_quote_context_t *ctx)
void lb_decimal_div(struct lb_decimal_t *a, const struct lb_decimal_t *b)
void lb_decimal_fract(struct lb_decimal_t *value)
void lb_quote_context_set_userdata(const struct lb_quote_context_t *ctx, void *userdata)
void lb_trade_context_history_executions(const struct lb_trade_context_t *ctx, const struct lb_get_history_executions_options_t *opts, lb_async_callback_t callback, void *userdata)
void lb_quote_context_set_on_trades(const struct lb_quote_context_t *ctx, lb_trades_callback_t callback, void *userdata, lb_free_userdata_func_t free_userdata)
void lb_config_refresh_access_token(struct lb_config_t *config, int64_t expired_at, lb_async_callback_t callback, void *userdata)
void lb_decimal_pow(struct lb_decimal_t *value, const struct lb_decimal_t *exp)
void lb_decimal_free(struct lb_decimal_t *value)
struct lb_capital_distribution_response_t lb_capital_distribution_response_t
struct lb_push_brokers_t lb_push_brokers_t
void lb_quote_context_realtime_trades(const struct lb_quote_context_t *ctx, const char *symbol, uintptr_t count, lb_async_callback_t callback, void *userdata)
struct lb_margin_ratio_t lb_margin_ratio_t
void lb_trade_context_retain(const struct lb_trade_context_t *ctx)
const char * lb_decimal_to_string(const struct lb_decimal_t *value)
struct lb_datetime_t lb_datetime_t
struct lb_depth_t lb_depth_t
void lb_quote_context_capital_flow(const struct lb_quote_context_t *ctx, const char *symbol, lb_async_callback_t callback, void *userdata)
void lb_trade_context_set_free_userdata_func(const struct lb_trade_context_t *ctx, lb_free_userdata_func_t f)
void lb_decimal_rem(struct lb_decimal_t *a, const struct lb_decimal_t *b)
void lb_quote_context_brokers(const struct lb_quote_context_t *ctx, const char *symbol, lb_async_callback_t callback, void *userdata)
void lb_decimal_exp_with_tolerance(struct lb_decimal_t *value, const struct lb_decimal_t *tolerance)
lb_charge_category_code_t
Definition: longport.h:272
@ ChargeCategoryCodeThird
Definition: longport.h:284
@ ChargeCategoryCodeBroker
Definition: longport.h:280
@ ChargeCategoryCodeUnknown
Definition: longport.h:276
struct lb_config_t * lb_config_new(const char *app_key, const char *app_secret, const char *access_token, const char *http_url, const char *quote_ws_url, const char *trade_ws_url, const enum lb_language_t *language, bool enable_overight, const enum lb_push_candlestick_mode_t *push_candlestick_mode, bool enable_print_quote_packages, const char *log_path)
void lb_decimal_sin(struct lb_decimal_t *value)
lb_push_candlestick_mode_t
Definition: longport.h:788
@ PushCandlestickMode_Realtime
Definition: longport.h:792
@ PushCandlestickMode_Confirmed
Definition: longport.h:796
struct lb_config_t * lb_config_from_env(struct lb_error_t **error)
void lb_quote_context_candlesticks(const struct lb_quote_context_t *ctx, const char *symbol, enum lb_period_t period, uintptr_t count, enum lb_adjust_type_t adjust_type, enum lb_trade_sessions_t trade_sessions, lb_async_callback_t callback, void *userdata)
lb_security_board_t
Definition: longport.h:820
@ SecurityBoardHKEquity
Definition: longport.h:856
@ SecurityBoardUSOptionS
Definition: longport.h:852
@ SecurityBoardSHMainConnect
Definition: longport.h:876
@ SecurityBoardSZMainNonConnect
Definition: longport.h:900
@ SecurityBoardSZGEMConnect
Definition: longport.h:904
@ SecurityBoardSTI
Definition: longport.h:916
@ SecurityBoardUSNSDQ
Definition: longport.h:840
@ SecurityBoardSGMain
Definition: longport.h:912
@ SecurityBoardUSOption
Definition: longport.h:848
@ SecurityBoardSZMainConnect
Definition: longport.h:896
@ SecurityBoardSZGEMNonConnect
Definition: longport.h:908
@ SecurityBoardHKSector
Definition: longport.h:872
@ SecurityBoardUSSector
Definition: longport.h:844
@ SecurityBoardHKPreIPO
Definition: longport.h:860
@ SecurityBoardCNIX
Definition: longport.h:888
@ SecurityBoardUnknown
Definition: longport.h:824
@ SecurityBoardUSDJI
Definition: longport.h:836
@ SecurityBoardHKHS
Definition: longport.h:868
@ SecurityBoardCNSector
Definition: longport.h:892
@ SecurityBoardUSMain
Definition: longport.h:828
@ SecurityBoardUSPink
Definition: longport.h:832
@ SecurityBoardSHSTAR
Definition: longport.h:884
@ SecurityBoardSGSector
Definition: longport.h:920
@ SecurityBoardSHMainNonConnect
Definition: longport.h:880
@ SecurityBoardHKWarrant
Definition: longport.h:864
struct lb_submit_order_response_t lb_submit_order_response_t
lb_time_in_force_type_t
Definition: longport.h:950
@ TimeInForceUnknown
Definition: longport.h:954
@ TimeInForceGoodTilCanceled
Definition: longport.h:962
@ TimeInForceGoodTilDate
Definition: longport.h:966
@ TimeInForceDay
Definition: longport.h:958
void lb_decimal_tan(struct lb_decimal_t *value)
bool lb_decimal_is_negative(const struct lb_decimal_t *value)
struct lb_brokers_t lb_brokers_t
lb_order_side_t
Definition: longport.h:480
@ OrderSideSell
Definition: longport.h:492
@ OrderSideBuy
Definition: longport.h:488
@ OrderSideUnknown
Definition: longport.h:484
const char * lb_http_result_response_body(const struct lb_http_result_t *http_result)
lb_commission_free_status_t
Definition: longport.h:290
@ CommissionFreeStatusCalculated
Definition: longport.h:302
@ CommissionFreeStatusUnknown
Definition: longport.h:294
@ CommissionFreeStatusPending
Definition: longport.h:306
@ CommissionFreeStatusReady
Definition: longport.h:310
@ CommissionFreeStatusNone
Definition: longport.h:298
struct lb_option_quote_t lb_option_quote_t
struct lb_push_trades_t lb_push_trades_t
int32_t lb_decimal_cmp(const struct lb_decimal_t *a, const struct lb_decimal_t *b)
void lb_quote_context_new(const struct lb_config_t *config, lb_async_callback_t callback, void *userdata)
struct lb_http_result_t lb_http_result_t
Definition: longport.h:1261
lb_balance_type_t
Definition: longport.h:66
@ BalanceTypeCash
Definition: longport.h:74
@ BalanceTypeUnknown
Definition: longport.h:70
@ BalanceTypeStock
Definition: longport.h:78
@ BalanceTypeFund
Definition: longport.h:82
struct lb_candlestick_t lb_candlestick_t
lb_warrant_type_t
Definition: longport.h:1220
@ WarrantTypeBear
Definition: longport.h:1240
@ WarrantTypeInline
Definition: longport.h:1244
@ WarrantTypeBull
Definition: longport.h:1236
@ WarrantTypeUnknown
Definition: longport.h:1224
@ WarrantTypeCall
Definition: longport.h:1232
@ WarrantTypePut
Definition: longport.h:1228
struct lb_get_cash_flow_options_t lb_get_cash_flow_options_t
lb_topic_type_t
Definition: longport.h:972
@ TopicPrivate
Definition: longport.h:976
void lb_http_client_free(struct lb_http_client_t *http_client)
void lb_trade_context_today_orders(const struct lb_trade_context_t *ctx, const struct lb_get_today_orders_options_t *opts, lb_async_callback_t callback, void *userdata)
void lb_quote_context_unsubscribe_candlesticks(const struct lb_quote_context_t *ctx, const char *symbol, enum lb_period_t period, lb_async_callback_t callback, void *userdata)
lb_granularity_t
Definition: longport.h:378
@ GranularityDaily
Definition: longport.h:386
@ GranularityWeekly
Definition: longport.h:390
@ GranularityMonthly
Definition: longport.h:394
@ GranularityUnknown
Definition: longport.h:382
struct lb_prepost_quote_t lb_prepost_quote_t
lb_adjust_type_t
Definition: longport.h:52
@ AdjustTypeNoAdjust
Definition: longport.h:56
@ AdjustTypeForward
Definition: longport.h:60
void lb_quote_context_set_on_quote(const struct lb_quote_context_t *ctx, lb_quote_callback_t callback, void *userdata, lb_free_userdata_func_t free_userdata)
void lb_quote_context_participants(const struct lb_quote_context_t *ctx, lb_async_callback_t callback, void *userdata)
void lb_trade_context_stock_positions(const struct lb_trade_context_t *ctx, const struct lb_get_stock_positions_options_t *opts, lb_async_callback_t callback, void *userdata)
struct lb_decimal_t * lb_decimal_from_str(const char *value)
void lb_decimal_floor(struct lb_decimal_t *value)
struct lb_security_calc_index_t lb_security_calc_index_t
void lb_quote_context_set_free_userdata_func(const struct lb_quote_context_t *ctx, lb_free_userdata_func_t f)
void(* lb_order_changed_callback_t)(const struct lb_trade_context_t *, const struct lb_push_order_changed_t *, void *)
Definition: longport.h:1769
void lb_trade_context_margin_ratio(const struct lb_trade_context_t *ctx, const char *symbol, lb_async_callback_t callback, void *userdata)
struct lb_stock_position_channel_t lb_stock_position_channel_t
struct lb_execution_t lb_execution_t
void lb_trade_context_fund_positions(const struct lb_trade_context_t *ctx, const struct lb_get_fund_positions_options_t *opts, lb_async_callback_t callback, void *userdata)
struct lb_participant_info_t lb_participant_info_t
void lb_quote_context_subscribe_candlesticks(const struct lb_quote_context_t *ctx, const char *symbol, enum lb_period_t period, enum lb_trade_sessions_t trade_sessions, lb_async_callback_t callback, void *userdata)
struct lb_security_depth_t lb_security_depth_t
struct lb_security_t lb_security_t
struct lb_order_charge_detail_t lb_order_charge_detail_t
bool lb_decimal_is_zero(const struct lb_decimal_t *value)
lb_language_t
Definition: longport.h:400
@ Language_ZH_HK
Definition: longport.h:408
@ Language_ZH_CN
Definition: longport.h:404
@ Language_EN
Definition: longport.h:412
void lb_quote_context_option_chain_expiry_date_list(const struct lb_quote_context_t *ctx, const char *symbol, lb_async_callback_t callback, void *userdata)
void lb_quote_context_set_on_depth(const struct lb_quote_context_t *ctx, lb_depth_callback_t callback, void *userdata, lb_free_userdata_func_t free_userdata)
void lb_quote_context_warrant_issuers(const struct lb_quote_context_t *ctx, lb_async_callback_t callback, void *userdata)
void lb_trade_context_new(const struct lb_config_t *config, lb_async_callback_t callback, void *userdata)
void lb_quote_context_subscribe(const struct lb_quote_context_t *ctx, const char *const *symbols, uintptr_t num_symbols, uint8_t sub_types, bool is_first_push, lb_async_callback_t callback, void *userdata)
lb_order_status_t
Definition: longport.h:498
@ OrderStatusExpired
Definition: longport.h:566
@ OrderStatusProtectedNotReported
Definition: longport.h:514
@ OrderStatusPendingCancel
Definition: longport.h:554
@ OrderStatusPartialWithdrawal
Definition: longport.h:570
@ OrderStatusReplacedNotReported
Definition: longport.h:510
@ OrderStatusWaitToCancel
Definition: longport.h:550
@ OrderStatusFilled
Definition: longport.h:522
@ OrderStatusCanceled
Definition: longport.h:562
@ OrderStatusPendingReplace
Definition: longport.h:538
@ OrderStatusRejected
Definition: longport.h:558
@ OrderStatusPartialFilled
Definition: longport.h:546
@ OrderStatusWaitToNew
Definition: longport.h:526
@ OrderStatusNew
Definition: longport.h:530
@ OrderStatusVarietiesNotReported
Definition: longport.h:518
@ OrderStatusUnknown
Definition: longport.h:502
@ OrderStatusWaitToReplace
Definition: longport.h:534
@ OrderStatusNotReported
Definition: longport.h:506
@ OrderStatusReplaced
Definition: longport.h:542
struct lb_order_charge_item_t lb_order_charge_item_t
const char * lb_error_message(const struct lb_error_t *error)
struct lb_order_detail_t lb_order_detail_t
void lb_quote_context_warrant_quote(const struct lb_quote_context_t *ctx, const char *const *symbols, uintptr_t num_symbols, lb_async_callback_t callback, void *userdata)
struct lb_trading_session_info_t lb_trading_session_info_t
void lb_quote_context_market_temperature(const struct lb_quote_context_t *ctx, enum lb_market_t market, lb_async_callback_t callback, void *userdata)
struct lb_get_today_orders_options_t lb_get_today_orders_options_t
lb_order_tag_t
Definition: longport.h:576
@ OrderTagNonExercise
Definition: longport.h:612
@ OrderTagOffline
Definition: longport.h:600
@ OrderTagDebtor
Definition: longport.h:608
@ OrderTagCreditor
Definition: longport.h:604
@ OrderTagUnknown
Definition: longport.h:580
@ OrderTagAllocatedSub
Definition: longport.h:616
@ OrderTagMarginCall
Definition: longport.h:596
@ OrderTagLongTerm
Definition: longport.h:588
@ OrderTagGrey
Definition: longport.h:592
@ OrderTagNormal
Definition: longport.h:584
void lb_decimal_round_dp(struct lb_decimal_t *value, uint32_t dp)
struct lb_history_market_temperature_response_t lb_history_market_temperature_response_t
const char * lb_quote_context_quote_level(const struct lb_quote_context_t *ctx)
void lb_quote_context_warrant_list(const struct lb_quote_context_t *ctx, const char *symbol, enum lb_warrant_sort_by_t sort_by, enum lb_sort_order_type_t sort_order, const enum lb_warrant_type_t *warrant_type, uintptr_t num_warrant_type, const int32_t *issuer, uintptr_t num_issuer, const enum lb_filter_warrant_expiry_date_t *expiry_date, uintptr_t num_expiry_date, const enum lb_filter_warrant_in_out_bounds_type_t *price_type, uintptr_t num_price_type, const enum lb_warrant_status_t *status, uintptr_t num_status, lb_async_callback_t callback, void *userdata)
void lb_decimal_log10(struct lb_decimal_t *value)
void lb_quote_context_depth(const struct lb_quote_context_t *ctx, const char *symbol, lb_async_callback_t callback, void *userdata)
struct lb_frozen_transaction_fee_t lb_frozen_transaction_fee_t
void lb_decimal_normal_cdf(struct lb_decimal_t *value)
void lb_decimal_mul(struct lb_decimal_t *a, const struct lb_decimal_t *b)
lb_option_direction_t
Definition: longport.h:444
@ OptionDirectionPut
Definition: longport.h:452
@ OptionDirectionUnknown
Definition: longport.h:448
@ OptionDirectionCall
Definition: longport.h:456
void lb_trade_context_unsubscribe(const struct lb_trade_context_t *ctx, const enum lb_topic_type_t *topics, uintptr_t num_topics, lb_async_callback_t callback, void *userdata)
struct lb_watchlist_group_t lb_watchlist_group_t
void lb_decimal_ln(struct lb_decimal_t *value)
struct lb_order_charge_fee_t lb_order_charge_fee_t
struct lb_watchlist_security_t lb_watchlist_security_t
Definition: longport.h:2881
const struct lb_decimal_t * total_cash
Definition: longport.h:2885
const struct lb_decimal_t * margin_call
Definition: longport.h:2901
const struct lb_decimal_t * buy_power
Definition: longport.h:2929
const struct lb_decimal_t * max_finance_amount
Definition: longport.h:2889
int32_t risk_level
Definition: longport.h:2897
const struct lb_decimal_t * maintenance_margin
Definition: longport.h:2925
uintptr_t num_frozen_transaction_fees
Definition: longport.h:2937
const struct lb_decimal_t * remaining_finance_amount
Definition: longport.h:2893
const struct lb_frozen_transaction_fee_t * frozen_transaction_fees
Definition: longport.h:2933
uintptr_t num_cash_infos
Definition: longport.h:2913
const struct lb_decimal_t * init_margin
Definition: longport.h:2921
const char * currency
Definition: longport.h:2905
const struct lb_decimal_t * net_assets
Definition: longport.h:2917
const struct lb_cash_info_t * cash_infos
Definition: longport.h:2909
Definition: longport.h:1273
const struct lb_error_t * error
Definition: longport.h:1275
uintptr_t length
Definition: longport.h:1277
void * data
Definition: longport.h:1276
const void * ctx
Definition: longport.h:1274
void * userdata
Definition: longport.h:1278
Definition: longport.h:1406
uintptr_t num_broker_ids
Definition: longport.h:1418
int32_t position
Definition: longport.h:1410
const int32_t * broker_ids
Definition: longport.h:1414
Definition: longport.h:1537
const struct lb_decimal_t * turnover
Definition: longport.h:1561
const struct lb_decimal_t * open
Definition: longport.h:1545
const struct lb_decimal_t * close
Definition: longport.h:1541
enum lb_trade_session_t trade_session
Definition: longport.h:1569
const struct lb_decimal_t * high
Definition: longport.h:1553
const struct lb_decimal_t * low
Definition: longport.h:1549
int64_t timestamp
Definition: longport.h:1565
int64_t volume
Definition: longport.h:1557
Definition: longport.h:2641
struct lb_capital_distribution_t capital_out
Definition: longport.h:2653
int64_t timestamp
Definition: longport.h:2645
struct lb_capital_distribution_t capital_in
Definition: longport.h:2649
Definition: longport.h:2623
const struct lb_decimal_t * large
Definition: longport.h:2627
const struct lb_decimal_t * medium
Definition: longport.h:2631
const struct lb_decimal_t * small
Definition: longport.h:2635
Definition: longport.h:2609
const struct lb_decimal_t * inflow
Definition: longport.h:2613
int64_t timestamp
Definition: longport.h:2617
Definition: longport.h:2943
const struct lb_decimal_t * balance
Definition: longport.h:2959
int64_t business_time
Definition: longport.h:2967
const char * description
Definition: longport.h:2975
const char * transaction_flow_name
Definition: longport.h:2947
const char * symbol
Definition: longport.h:2971
const char * currency
Definition: longport.h:2963
enum lb_balance_type_t business_type
Definition: longport.h:2955
enum lb_cash_flow_direction_t direction
Definition: longport.h:2951
Definition: longport.h:2855
const struct lb_decimal_t * available_cash
Definition: longport.h:2863
const struct lb_decimal_t * frozen_cash
Definition: longport.h:2867
const struct lb_decimal_t * withdraw_cash
Definition: longport.h:2859
const char * currency
Definition: longport.h:2875
const struct lb_decimal_t * settling_cash
Definition: longport.h:2871
Definition: longport.h:1618
uintptr_t num_securities
Definition: longport.h:1630
const char *const * securities
Definition: longport.h:1626
const char * name
Definition: longport.h:1622
Definition: longport.h:1598
uint8_t month
Definition: longport.h:1600
int32_t year
Definition: longport.h:1599
uint8_t day
Definition: longport.h:1601
Definition: longport.h:1610
struct lb_date_t date
Definition: longport.h:1611
struct lb_time_t time
Definition: longport.h:1612
Definition: longport.h:1354
const struct lb_decimal_t * price
Definition: longport.h:1362
int64_t order_num
Definition: longport.h:1370
int32_t position
Definition: longport.h:1358
int64_t volume
Definition: longport.h:1366
enum lb_order_side_t side
Definition: longport.h:2031
const struct lb_decimal_t * price
Definition: longport.h:2030
bool fractional_shares
Definition: longport.h:2034
enum lb_order_type_t order_type
Definition: longport.h:2029
const char * symbol
Definition: longport.h:2028
const char * currency
Definition: longport.h:2032
const char * order_id
Definition: longport.h:2033
const struct lb_decimal_t * margin_max_qty
Definition: longport.h:3437
const struct lb_decimal_t * cash_max_qty
Definition: longport.h:3433
Definition: longport.h:2701
const struct lb_decimal_t * quantity
Definition: longport.h:2721
const struct lb_decimal_t * price
Definition: longport.h:2725
const char * trade_id
Definition: longport.h:2709
const char * symbol
Definition: longport.h:2713
int64_t trade_done_at
Definition: longport.h:2717
const char * order_id
Definition: longport.h:2705
Definition: longport.h:2841
const struct lb_decimal_t * frozen_transaction_fee
Definition: longport.h:2849
const char * currency
Definition: longport.h:2845
Definition: longport.h:3015
const char * account_channel
Definition: longport.h:3019
uintptr_t num_positions
Definition: longport.h:3027
const struct lb_fund_position_t * positions
Definition: longport.h:3023
Definition: longport.h:3033
const struct lb_fund_position_channel_t * channels
Definition: longport.h:3037
uintptr_t num_channels
Definition: longport.h:3041
Definition: longport.h:2981
int64_t net_asset_value_day
Definition: longport.h:2993
const char * symbol_name
Definition: longport.h:2997
const struct lb_decimal_t * cost_net_asset_value
Definition: longport.h:3005
const char * symbol
Definition: longport.h:2985
const char * currency
Definition: longport.h:3001
const struct lb_decimal_t * holding_units
Definition: longport.h:3009
const struct lb_decimal_t * current_net_asset_value
Definition: longport.h:2989
Definition: longport.h:1969
const uintptr_t * size
Definition: longport.h:1993
enum lb_balance_type_t * business_type
Definition: longport.h:1981
int64_t end_at
Definition: longport.h:1977
int64_t start_at
Definition: longport.h:1973
const uintptr_t * page
Definition: longport.h:1989
const char * symbol
Definition: longport.h:1985
Definition: longport.h:1999
uintptr_t num_symbols
Definition: longport.h:2007
const char *const * symbols
Definition: longport.h:2003
Definition: longport.h:1776
const int64_t * start_at
Definition: longport.h:1780
const int64_t * end_at
Definition: longport.h:1784
const char * symbol
Definition: longport.h:1788
Definition: longport.h:1808
const int64_t * start_at
Definition: longport.h:1832
enum lb_market_t * market
Definition: longport.h:1828
enum lb_order_status_t * status
Definition: longport.h:1816
const int64_t * end_at
Definition: longport.h:1836
const char * symbol
Definition: longport.h:1812
enum lb_order_side_t * side
Definition: longport.h:1824
uintptr_t num_status
Definition: longport.h:1820
Definition: longport.h:2013
uintptr_t num_symbols
Definition: longport.h:2021
const char *const * symbols
Definition: longport.h:2017
Definition: longport.h:1794
const char * symbol
Definition: longport.h:1798
const char * order_id
Definition: longport.h:1802
Definition: longport.h:1842
enum lb_market_t * market
Definition: longport.h:1862
enum lb_order_status_t * status
Definition: longport.h:1850
const char * symbol
Definition: longport.h:1846
enum lb_order_side_t * side
Definition: longport.h:1858
uintptr_t num_status
Definition: longport.h:1854
const char * order_id
Definition: longport.h:1866
Definition: longport.h:3768
const struct lb_market_temperature_t * records
Definition: longport.h:3776
uintptr_t num_records
Definition: longport.h:3780
enum lb_granularity_t granularity
Definition: longport.h:3772
Definition: longport.h:1286
const char * value
Definition: longport.h:1288
const char * name
Definition: longport.h:1287
Definition: longport.h:2481
const struct lb_decimal_t * turnover
Definition: longport.h:2497
const struct lb_decimal_t * avg_price
Definition: longport.h:2501
const struct lb_decimal_t * price
Definition: longport.h:2485
int64_t timestamp
Definition: longport.h:2489
int64_t volume
Definition: longport.h:2493
Definition: longport.h:2529
int32_t issuer_id
Definition: longport.h:2533
const char * name_cn
Definition: longport.h:2537
const char * name_en
Definition: longport.h:2541
const char * name_hk
Definition: longport.h:2545
Definition: longport.h:3176
const struct lb_decimal_t * mm_factor
Definition: longport.h:3184
const struct lb_decimal_t * im_factor
Definition: longport.h:3180
const struct lb_decimal_t * fm_factor
Definition: longport.h:3188
Definition: longport.h:3745
int32_t temperature
Definition: longport.h:3749
const char * description
Definition: longport.h:3753
int32_t sentiment
Definition: longport.h:3761
int32_t valuation
Definition: longport.h:3757
int64_t timestamp
Definition: longport.h:3765
Definition: longport.h:2587
const struct lb_date_t * half_trading_days
Definition: longport.h:2599
uintptr_t num_trading_days
Definition: longport.h:2595
uintptr_t num_half_trading_days
Definition: longport.h:2603
const struct lb_date_t * trading_days
Definition: longport.h:2591
Definition: longport.h:2569
enum lb_market_t market
Definition: longport.h:2573
const struct lb_trading_session_info_t * trade_sessions
Definition: longport.h:2577
uintptr_t num_trade_sessions
Definition: longport.h:2581
Definition: longport.h:2231
const struct lb_decimal_t * turnover
Definition: longport.h:2267
const struct lb_decimal_t * open
Definition: longport.h:2247
const struct lb_decimal_t * prev_close
Definition: longport.h:2243
struct lb_date_t expiry_date
Definition: longport.h:2283
enum lb_option_type_t contract_type
Definition: longport.h:2295
const struct lb_decimal_t * contract_multiplier
Definition: longport.h:2291
const struct lb_decimal_t * high
Definition: longport.h:2251
const char * underlying_symbol
Definition: longport.h:2311
const struct lb_decimal_t * low
Definition: longport.h:2255
const struct lb_decimal_t * historical_volatility
Definition: longport.h:2307
const struct lb_decimal_t * implied_volatility
Definition: longport.h:2275
int64_t timestamp
Definition: longport.h:2259
const struct lb_decimal_t * strike_price
Definition: longport.h:2287
int64_t volume
Definition: longport.h:2263
const char * symbol
Definition: longport.h:2235
enum lb_trade_status_t trade_status
Definition: longport.h:2271
int64_t open_interest
Definition: longport.h:2279
const struct lb_decimal_t * contract_size
Definition: longport.h:2299
const struct lb_decimal_t * last_done
Definition: longport.h:2239
enum lb_option_direction_t direction
Definition: longport.h:2303
Definition: longport.h:3249
uintptr_t num_items
Definition: longport.h:3265
const struct lb_decimal_t * total_amount
Definition: longport.h:3253
const struct lb_order_charge_item_t * items
Definition: longport.h:3261
const char * currency
Definition: longport.h:3257
Definition: longport.h:3205
const char * name
Definition: longport.h:3213
const char * currency
Definition: longport.h:3221
const char * code
Definition: longport.h:3209
const struct lb_decimal_t * amount
Definition: longport.h:3217
Definition: longport.h:3227
uintptr_t num_fees
Definition: longport.h:3243
const struct lb_order_charge_fee_t * fees
Definition: longport.h:3239
enum lb_charge_category_code_t code
Definition: longport.h:3231
const char * name
Definition: longport.h:3235
Definition: longport.h:3271
enum lb_outside_rth_t * outside_rth
Definition: longport.h:3371
const struct lb_decimal_t * executed_quantity
Definition: longport.h:3291
const struct lb_decimal_t * quantity
Definition: longport.h:3287
enum lb_order_side_t side
Definition: longport.h:3307
const char * msg
Definition: longport.h:3327
const struct lb_decimal_t * price
Definition: longport.h:3295
const struct lb_decimal_t * deductions_amount
Definition: longport.h:3395
const int64_t * updated_at
Definition: longport.h:3343
enum lb_trigger_status_t * trigger_status
Definition: longport.h:3363
enum lb_commission_free_status_t free_status
Definition: longport.h:3379
const int64_t * trigger_at
Definition: longport.h:3347
enum lb_deduction_status_t platform_deducted_status
Definition: longport.h:3403
const struct lb_date_t * expire_date
Definition: longport.h:3339
const char * stock_name
Definition: longport.h:3283
const struct lb_decimal_t * platform_deducted_amount
Definition: longport.h:3407
const struct lb_order_history_detail_t * history
Definition: longport.h:3415
enum lb_deduction_status_t deductions_status
Definition: longport.h:3391
const struct lb_decimal_t * trailing_percent
Definition: longport.h:3355
const struct lb_decimal_t * trigger_price
Definition: longport.h:3323
enum lb_order_tag_t tag
Definition: longport.h:3331
enum lb_time_in_force_type_t time_in_force
Definition: longport.h:3335
const char * remark
Definition: longport.h:3375
enum lb_order_type_t order_type
Definition: longport.h:3315
uintptr_t num_history
Definition: longport.h:3419
const char * free_currency
Definition: longport.h:3387
const char * deductions_currency
Definition: longport.h:3399
const struct lb_decimal_t * limit_offset
Definition: longport.h:3359
const char * platform_deducted_currency
Definition: longport.h:3411
const char * symbol
Definition: longport.h:3311
const char * currency
Definition: longport.h:3367
const struct lb_decimal_t * trailing_amount
Definition: longport.h:3351
const struct lb_decimal_t * executed_price
Definition: longport.h:3299
struct lb_order_charge_detail_t charge_detail
Definition: longport.h:3423
int64_t submitted_at
Definition: longport.h:3303
enum lb_order_status_t status
Definition: longport.h:3279
const struct lb_decimal_t * last_done
Definition: longport.h:3319
const struct lb_decimal_t * free_amount
Definition: longport.h:3383
const char * order_id
Definition: longport.h:3275
Definition: longport.h:3194
const struct lb_decimal_t * quantity
Definition: longport.h:3196
const char * msg
Definition: longport.h:3198
const struct lb_decimal_t * price
Definition: longport.h:3195
int64_t time
Definition: longport.h:3199
enum lb_order_status_t status
Definition: longport.h:3197
Definition: longport.h:2731
enum lb_outside_rth_t * outside_rth
Definition: longport.h:2831
const struct lb_decimal_t * executed_quantity
Definition: longport.h:2751
const struct lb_decimal_t * quantity
Definition: longport.h:2747
enum lb_order_side_t side
Definition: longport.h:2767
const char * msg
Definition: longport.h:2787
const struct lb_decimal_t * price
Definition: longport.h:2755
const int64_t * updated_at
Definition: longport.h:2803
enum lb_trigger_status_t * trigger_status
Definition: longport.h:2823
const int64_t * trigger_at
Definition: longport.h:2807
const struct lb_date_t * expire_date
Definition: longport.h:2799
const char * stock_name
Definition: longport.h:2743
const struct lb_decimal_t * trailing_percent
Definition: longport.h:2815
const struct lb_decimal_t * trigger_price
Definition: longport.h:2783
enum lb_order_tag_t tag
Definition: longport.h:2791
enum lb_time_in_force_type_t time_in_force
Definition: longport.h:2795
const char * remark
Definition: longport.h:2835
enum lb_order_type_t order_type
Definition: longport.h:2775
const struct lb_decimal_t * limit_offset
Definition: longport.h:2819
const char * symbol
Definition: longport.h:2771
const char * currency
Definition: longport.h:2827
const struct lb_decimal_t * trailing_amount
Definition: longport.h:2811
const struct lb_decimal_t * executed_price
Definition: longport.h:2759
int64_t submitted_at
Definition: longport.h:2763
enum lb_order_status_t status
Definition: longport.h:2739
const struct lb_decimal_t * last_done
Definition: longport.h:2779
const char * order_id
Definition: longport.h:2735
Definition: longport.h:2455
uintptr_t num_broker_ids
Definition: longport.h:2463
const int32_t * broker_ids
Definition: longport.h:2459
const char * name_cn
Definition: longport.h:2467
const char * name_en
Definition: longport.h:2471
const char * name_hk
Definition: longport.h:2475
Definition: longport.h:2139
const struct lb_decimal_t * turnover
Definition: longport.h:2155
const struct lb_decimal_t * prev_close
Definition: longport.h:2167
const struct lb_decimal_t * high
Definition: longport.h:2159
const struct lb_decimal_t * low
Definition: longport.h:2163
int64_t timestamp
Definition: longport.h:2147
int64_t volume
Definition: longport.h:2151
const struct lb_decimal_t * last_done
Definition: longport.h:2143
Definition: longport.h:1424
uintptr_t num_ask_brokers
Definition: longport.h:1436
const struct lb_brokers_t * bid_brokers
Definition: longport.h:1440
uintptr_t num_bid_brokers
Definition: longport.h:1444
const struct lb_brokers_t * ask_brokers
Definition: longport.h:1432
const char * symbol
Definition: longport.h:1428
Definition: longport.h:1575
bool is_confirmed
Definition: longport.h:1591
enum lb_period_t period
Definition: longport.h:1583
const char * symbol
Definition: longport.h:1579
struct lb_candlestick_t candlestick
Definition: longport.h:1587
Definition: longport.h:1376
uintptr_t num_bids
Definition: longport.h:1396
const struct lb_depth_t * asks
Definition: longport.h:1384
const struct lb_depth_t * bids
Definition: longport.h:1392
const char * symbol
Definition: longport.h:1380
uintptr_t num_asks
Definition: longport.h:1388
Definition: longport.h:1666
const char * account_no
Definition: longport.h:1754
const struct lb_decimal_t * executed_quantity
Definition: longport.h:1694
enum lb_order_side_t side
Definition: longport.h:1670
const char * msg
Definition: longport.h:1726
enum lb_trigger_status_t * trigger_status
Definition: longport.h:1734
const int64_t * trigger_at
Definition: longport.h:1738
const char * stock_name
Definition: longport.h:1674
const struct lb_decimal_t * trailing_percent
Definition: longport.h:1746
const struct lb_decimal_t * trigger_price
Definition: longport.h:1722
enum lb_order_tag_t tag
Definition: longport.h:1730
int64_t updated_at
Definition: longport.h:1718
const char * remark
Definition: longport.h:1766
enum lb_order_type_t order_type
Definition: longport.h:1686
const struct lb_decimal_t * limit_offset
Definition: longport.h:1750
const struct lb_decimal_t * submitted_quantity
Definition: longport.h:1678
const char * symbol
Definition: longport.h:1682
const char * currency
Definition: longport.h:1706
const struct lb_decimal_t * trailing_amount
Definition: longport.h:1742
const struct lb_decimal_t * executed_price
Definition: longport.h:1698
int64_t submitted_at
Definition: longport.h:1714
const struct lb_decimal_t * last_price
Definition: longport.h:1762
enum lb_order_status_t status
Definition: longport.h:1710
const struct lb_decimal_t * last_share
Definition: longport.h:1758
const struct lb_decimal_t * submitted_price
Definition: longport.h:1690
const char * order_id
Definition: longport.h:1702
Definition: longport.h:1296
const struct lb_decimal_t * turnover
Definition: longport.h:1328
const struct lb_decimal_t * open
Definition: longport.h:1308
enum lb_trade_session_t trade_session
Definition: longport.h:1336
const struct lb_decimal_t * high
Definition: longport.h:1312
const struct lb_decimal_t * low
Definition: longport.h:1316
int64_t timestamp
Definition: longport.h:1320
int64_t current_volume
Definition: longport.h:1340
int64_t volume
Definition: longport.h:1324
const char * symbol
Definition: longport.h:1300
enum lb_trade_status_t trade_status
Definition: longport.h:1332
const struct lb_decimal_t * current_turnover
Definition: longport.h:1344
const struct lb_decimal_t * last_done
Definition: longport.h:1304
Definition: longport.h:1515
uintptr_t num_trades
Definition: longport.h:1527
const struct lb_trade_t * trades
Definition: longport.h:1523
const char * symbol
Definition: longport.h:1519
Definition: longport.h:3719
const char * description
Definition: longport.h:3731
const char * name
Definition: longport.h:3727
int64_t end_at
Definition: longport.h:3739
int64_t start_at
Definition: longport.h:3735
const char * key
Definition: longport.h:3723
Definition: longport.h:2659
const struct lb_decimal_t * turnover
Definition: longport.h:2691
const struct lb_decimal_t * open
Definition: longport.h:2671
const struct lb_decimal_t * high
Definition: longport.h:2675
const struct lb_decimal_t * low
Definition: longport.h:2679
int64_t timestamp
Definition: longport.h:2683
int64_t volume
Definition: longport.h:2687
const char * symbol
Definition: longport.h:2663
enum lb_trade_status_t trade_status
Definition: longport.h:2695
const struct lb_decimal_t * last_done
Definition: longport.h:2667
Definition: longport.h:1872
const struct lb_decimal_t * quantity
Definition: longport.h:1880
const struct lb_decimal_t * price
Definition: longport.h:1884
const struct lb_decimal_t * trailing_percent
Definition: longport.h:1900
const struct lb_decimal_t * trigger_price
Definition: longport.h:1888
const char * remark
Definition: longport.h:1904
const struct lb_decimal_t * limit_offset
Definition: longport.h:1892
const struct lb_decimal_t * trailing_amount
Definition: longport.h:1896
const char * order_id
Definition: longport.h:1876
Definition: longport.h:2433
uintptr_t num_ask_brokers
Definition: longport.h:2441
const struct lb_brokers_t * bid_brokers
Definition: longport.h:2445
uintptr_t num_bid_brokers
Definition: longport.h:2449
const struct lb_brokers_t * ask_brokers
Definition: longport.h:2437
Definition: longport.h:3443
const struct lb_decimal_t * change_value
Definition: longport.h:3455
const struct lb_decimal_t * to_call_price
Definition: longport.h:3567
const struct lb_decimal_t * turnover
Definition: longport.h:3467
const struct lb_decimal_t * change_rate
Definition: longport.h:3459
const struct lb_decimal_t * five_day_change_rate
Definition: longport.h:3507
const struct lb_decimal_t * gamma
Definition: longport.h:3595
const struct lb_decimal_t * balance_point
Definition: longport.h:3583
const struct lb_decimal_t * leverage_ratio
Definition: longport.h:3575
const struct lb_decimal_t * delta
Definition: longport.h:3591
const struct lb_decimal_t * conversion_ratio
Definition: longport.h:3579
const int64_t * outstanding_qty
Definition: longport.h:3539
const struct lb_decimal_t * ytd_change_rate
Definition: longport.h:3471
const struct lb_decimal_t * premium
Definition: longport.h:3547
const struct lb_decimal_t * rho
Definition: longport.h:3607
const struct lb_decimal_t * itm_otm
Definition: longport.h:3551
const struct lb_date_t * expiry_date
Definition: longport.h:3523
const struct lb_decimal_t * vega
Definition: longport.h:3603
const struct lb_decimal_t * volume_ratio
Definition: longport.h:3491
const struct lb_decimal_t * half_year_change_rate
Definition: longport.h:3515
const struct lb_decimal_t * five_minutes_change_rate
Definition: longport.h:3519
const struct lb_decimal_t * pb_ratio
Definition: longport.h:3499
const struct lb_decimal_t * implied_volatility
Definition: longport.h:3555
const struct lb_decimal_t * pe_ttm_ratio
Definition: longport.h:3495
const struct lb_decimal_t * strike_price
Definition: longport.h:3527
const struct lb_decimal_t * upper_strike_price
Definition: longport.h:3531
const struct lb_decimal_t * dividend_ratio_ttm
Definition: longport.h:3503
const struct lb_decimal_t * effective_leverage
Definition: longport.h:3571
const struct lb_decimal_t * lower_strike_price
Definition: longport.h:3535
const struct lb_decimal_t * warrant_delta
Definition: longport.h:3559
const struct lb_decimal_t * capital_flow
Definition: longport.h:3483
const char * symbol
Definition: longport.h:3447
const struct lb_decimal_t * amplitude
Definition: longport.h:3487
const int64_t * volume
Definition: longport.h:3463
const struct lb_decimal_t * theta
Definition: longport.h:3599
const struct lb_decimal_t * total_market_value
Definition: longport.h:3479
const int64_t * open_interest
Definition: longport.h:3587
const struct lb_decimal_t * last_done
Definition: longport.h:3451
const struct lb_decimal_t * outstanding_ratio
Definition: longport.h:3543
const struct lb_decimal_t * call_price
Definition: longport.h:3563
const struct lb_decimal_t * turnover_rate
Definition: longport.h:3475
const struct lb_decimal_t * ten_day_change_rate
Definition: longport.h:3511
Definition: longport.h:2411
uintptr_t num_bids
Definition: longport.h:2427
const struct lb_depth_t * asks
Definition: longport.h:2415
const struct lb_depth_t * bids
Definition: longport.h:2423
uintptr_t num_asks
Definition: longport.h:2419
Definition: longport.h:2173
const struct lb_decimal_t * turnover
Definition: longport.h:2209
const struct lb_decimal_t * open
Definition: longport.h:2189
const struct lb_decimal_t * prev_close
Definition: longport.h:2185
const struct lb_prepost_quote_t * overnight_quote
Definition: longport.h:2225
const struct lb_decimal_t * high
Definition: longport.h:2193
const struct lb_decimal_t * low
Definition: longport.h:2197
int64_t timestamp
Definition: longport.h:2201
int64_t volume
Definition: longport.h:2205
const char * symbol
Definition: longport.h:2177
enum lb_trade_status_t trade_status
Definition: longport.h:2213
const struct lb_prepost_quote_t * pre_market_quote
Definition: longport.h:2217
const struct lb_prepost_quote_t * post_market_quote
Definition: longport.h:2221
const struct lb_decimal_t * last_done
Definition: longport.h:2181
Definition: longport.h:2069
const struct lb_decimal_t * dividend_yield
Definition: longport.h:2125
int64_t total_shares
Definition: longport.h:2101
int32_t lot_size
Definition: longport.h:2097
const struct lb_decimal_t * eps_ttm
Definition: longport.h:2117
uint8_t stock_derivatives
Definition: longport.h:2129
const struct lb_decimal_t * eps
Definition: longport.h:2113
const struct lb_decimal_t * bps
Definition: longport.h:2121
enum lb_security_board_t board
Definition: longport.h:2133
int64_t hk_shares
Definition: longport.h:2109
int64_t circulating_shares
Definition: longport.h:2105
const char * name_cn
Definition: longport.h:2077
const char * symbol
Definition: longport.h:2073
const char * currency
Definition: longport.h:2093
const char * exchange
Definition: longport.h:2089
const char * name_en
Definition: longport.h:2081
const char * name_hk
Definition: longport.h:2085
Definition: longport.h:2047
const char * name_cn
Definition: longport.h:2055
const char * symbol
Definition: longport.h:2051
const char * name_en
Definition: longport.h:2059
const char * name_hk
Definition: longport.h:2063
Definition: longport.h:3086
const struct lb_stock_position_t * positions
Definition: longport.h:3094
const char * account_channel
Definition: longport.h:3090
uintptr_t num_positions
Definition: longport.h:3098
Definition: longport.h:3104
uintptr_t num_channels
Definition: longport.h:3112
const struct lb_stock_position_channel_t * channels
Definition: longport.h:3108
Definition: longport.h:3047
const struct lb_decimal_t * quantity
Definition: longport.h:3059
const char * symbol_name
Definition: longport.h:3055
const struct lb_decimal_t * init_quantity
Definition: longport.h:3080
const struct lb_decimal_t * available_quantity
Definition: longport.h:3063
const char * symbol
Definition: longport.h:3051
const char * currency
Definition: longport.h:3067
enum lb_market_t market
Definition: longport.h:3076
const struct lb_decimal_t * cost_price
Definition: longport.h:3072
Definition: longport.h:2507
const struct lb_decimal_t * price
Definition: longport.h:2511
const char * call_symbol
Definition: longport.h:2515
const char * put_symbol
Definition: longport.h:2519
bool standard
Definition: longport.h:2523
Definition: longport.h:1910
enum lb_outside_rth_t * outside_rth
Definition: longport.h:1959
enum lb_order_side_t side
Definition: longport.h:1922
const struct lb_date_t * expire_date
Definition: longport.h:1955
const struct lb_decimal_t * trailing_percent
Definition: longport.h:1950
const struct lb_decimal_t * trigger_price
Definition: longport.h:1938
enum lb_time_in_force_type_t time_in_force
Definition: longport.h:1930
const char * remark
Definition: longport.h:1963
enum lb_order_type_t order_type
Definition: longport.h:1918
const struct lb_decimal_t * limit_offset
Definition: longport.h:1942
const struct lb_decimal_t * submitted_quantity
Definition: longport.h:1926
const char * symbol
Definition: longport.h:1914
const struct lb_decimal_t * trailing_amount
Definition: longport.h:1946
const struct lb_decimal_t * submitted_price
Definition: longport.h:1934
Definition: longport.h:3118
const char * order_id
Definition: longport.h:3122
Definition: longport.h:2037
uintptr_t num_candlesticks
Definition: longport.h:2041
uint8_t sub_types
Definition: longport.h:2039
enum lb_period_t * candlesticks
Definition: longport.h:2040
const char * symbol
Definition: longport.h:2038
Definition: longport.h:1604
uint8_t second
Definition: longport.h:1607
uint8_t minute
Definition: longport.h:1606
uint8_t hour
Definition: longport.h:1605
Definition: longport.h:1454
const struct lb_decimal_t * price
Definition: longport.h:1458
enum lb_trade_session_t trade_session
Definition: longport.h:1509
int64_t timestamp
Definition: longport.h:1466
enum lb_trade_direction_t direction
Definition: longport.h:1505
const char * trade_type
Definition: longport.h:1501
int64_t volume
Definition: longport.h:1462
Definition: longport.h:2551
enum lb_trade_session_t trade_session
Definition: longport.h:2563
struct lb_time_t end_time
Definition: longport.h:2559
struct lb_time_t begin_time
Definition: longport.h:2555
Definition: longport.h:1636
uintptr_t num_securities
Definition: longport.h:1656
const char *const * securities
Definition: longport.h:1652
uint32_t flags
Definition: longport.h:1640
const char * name
Definition: longport.h:1648
enum lb_securities_update_mode_t mode
Definition: longport.h:1660
int64_t id
Definition: longport.h:1644
Definition: longport.h:3613
const struct lb_decimal_t * change_value
Definition: longport.h:3637
const struct lb_decimal_t * to_call_price
Definition: longport.h:3693
const struct lb_decimal_t * turnover
Definition: longport.h:3645
const struct lb_decimal_t * change_rate
Definition: longport.h:3633
const struct lb_decimal_t * balance_point
Definition: longport.h:3709
const struct lb_decimal_t * leverage_ratio
Definition: longport.h:3701
struct lb_date_t expiry_date
Definition: longport.h:3649
const struct lb_decimal_t * delta
Definition: longport.h:3685
const struct lb_decimal_t * conversion_ratio
Definition: longport.h:3705
const struct lb_decimal_t * premium
Definition: longport.h:3673
enum lb_warrant_status_t status
Definition: longport.h:3713
const struct lb_decimal_t * itm_otm
Definition: longport.h:3677
const struct lb_decimal_t * implied_volatility
Definition: longport.h:3681
const char * name
Definition: longport.h:3625
const struct lb_decimal_t * strike_price
Definition: longport.h:3653
const struct lb_decimal_t * upper_strike_price
Definition: longport.h:3657
enum lb_warrant_type_t warrant_type
Definition: longport.h:3621
const struct lb_decimal_t * effective_leverage
Definition: longport.h:3697
const struct lb_decimal_t * lower_strike_price
Definition: longport.h:3661
int64_t volume
Definition: longport.h:3641
const char * symbol
Definition: longport.h:3617
int64_t outstanding_qty
Definition: longport.h:3665
const struct lb_decimal_t * last_done
Definition: longport.h:3629
const struct lb_decimal_t * outstanding_ratio
Definition: longport.h:3669
const struct lb_decimal_t * call_price
Definition: longport.h:3689
Definition: longport.h:2317
const struct lb_decimal_t * turnover
Definition: longport.h:2353
const struct lb_decimal_t * open
Definition: longport.h:2333
const struct lb_decimal_t * prev_close
Definition: longport.h:2329
struct lb_date_t expiry_date
Definition: longport.h:2365
const struct lb_decimal_t * conversion_ratio
Definition: longport.h:2381
const struct lb_decimal_t * high
Definition: longport.h:2337
const char * underlying_symbol
Definition: longport.h:2405
const struct lb_decimal_t * low
Definition: longport.h:2341
enum lb_warrant_type_t category
Definition: longport.h:2385
const struct lb_decimal_t * implied_volatility
Definition: longport.h:2361
int64_t timestamp
Definition: longport.h:2345
struct lb_date_t last_trade_date
Definition: longport.h:2369
const struct lb_decimal_t * strike_price
Definition: longport.h:2389
const struct lb_decimal_t * upper_strike_price
Definition: longport.h:2393
const struct lb_decimal_t * lower_strike_price
Definition: longport.h:2397
int64_t volume
Definition: longport.h:2349
const char * symbol
Definition: longport.h:2321
enum lb_trade_status_t trade_status
Definition: longport.h:2357
int64_t outstanding_quantity
Definition: longport.h:2377
const struct lb_decimal_t * last_done
Definition: longport.h:2325
const struct lb_decimal_t * outstanding_ratio
Definition: longport.h:2373
const struct lb_decimal_t * call_price
Definition: longport.h:2401
Definition: longport.h:3154
uintptr_t num_securities
Definition: longport.h:3170
const char * name
Definition: longport.h:3162
int64_t id
Definition: longport.h:3158
const struct lb_watchlist_security_t * securities
Definition: longport.h:3166
Definition: longport.h:3128
int64_t watched_at
Definition: longport.h:3148
const char * name
Definition: longport.h:3140
const char * symbol
Definition: longport.h:3132
const struct lb_decimal_t * watched_price
Definition: longport.h:3144
enum lb_market_t market
Definition: longport.h:3136