LongPort OpenAPI C SDK
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 
342 typedef enum lb_error_kind_t {
356 
378 
392 
396 typedef enum lb_granularity_t {
414 
418 typedef enum lb_language_t {
432 
436 typedef enum lb_market_t {
462 
466 typedef enum lb_option_direction_t {
480 
484 typedef enum lb_option_type_t {
498 
502 typedef enum lb_order_side_t {
516 
520 typedef enum lb_order_status_t {
594 
598 typedef enum lb_order_tag_t {
640 
644 typedef enum lb_order_type_t {
702 
706 typedef enum lb_outside_rth_t {
724 
728 typedef enum lb_period_t {
806 
820 
838 
842 typedef enum lb_security_board_t {
952 
962 
966 typedef enum lb_sort_order_type_t {
976 
998 
1002 typedef enum lb_topic_type_t {
1008 
1012 typedef enum lb_trade_direction_t {
1026 
1030 typedef enum lb_trade_session_t {
1048 
1052 typedef enum lb_trade_sessions_t {
1062 
1066 typedef enum lb_trade_status_t {
1112 
1116 typedef enum lb_trigger_status_t {
1134 
1138 typedef enum lb_warrant_sort_by_t {
1228 
1232 typedef enum lb_warrant_status_t {
1246 
1250 typedef enum lb_warrant_type_t {
1276 
1280 typedef struct lb_config_t lb_config_t;
1281 
1282 typedef struct lb_decimal_t lb_decimal_t;
1283 
1284 typedef struct lb_error_t lb_error_t;
1285 
1289 typedef struct lb_http_client_t lb_http_client_t;
1290 
1291 typedef struct lb_http_result_t lb_http_result_t;
1292 
1296 typedef struct lb_quote_context_t lb_quote_context_t;
1297 
1301 typedef struct lb_trade_context_t lb_trade_context_t;
1302 
1303 typedef struct lb_async_result_t {
1304  const void *ctx;
1305  const struct lb_error_t *error;
1306  void *data;
1307  uintptr_t length;
1308  void *userdata;
1310 
1311 typedef void (*lb_async_callback_t)(const struct lb_async_result_t*);
1312 
1316 typedef struct lb_http_header_t {
1317  const char *name;
1318  const char *value;
1320 
1321 typedef void (*lb_free_userdata_func_t)(void*);
1322 
1326 typedef struct lb_push_quote_t {
1330  const char *symbol;
1334  const struct lb_decimal_t *last_done;
1338  const struct lb_decimal_t *open;
1342  const struct lb_decimal_t *high;
1346  const struct lb_decimal_t *low;
1350  int64_t timestamp;
1354  int64_t volume;
1358  const struct lb_decimal_t *turnover;
1376 
1377 typedef void (*lb_quote_callback_t)(const struct lb_quote_context_t*,
1378  const struct lb_push_quote_t*,
1379  void*);
1380 
1384 typedef struct lb_depth_t {
1388  int32_t position;
1392  const struct lb_decimal_t *price;
1396  int64_t volume;
1400  int64_t order_num;
1402 
1406 typedef struct lb_push_depth_t {
1410  const char *symbol;
1414  const struct lb_depth_t *asks;
1418  uintptr_t num_asks;
1422  const struct lb_depth_t *bids;
1426  uintptr_t num_bids;
1428 
1429 typedef void (*lb_depth_callback_t)(const struct lb_quote_context_t*,
1430  const struct lb_push_depth_t*,
1431  void*);
1432 
1436 typedef struct lb_brokers_t {
1440  int32_t position;
1444  const int32_t *broker_ids;
1448  uintptr_t num_broker_ids;
1450 
1454 typedef struct lb_push_brokers_t {
1458  const char *symbol;
1462  const struct lb_brokers_t *ask_brokers;
1466  uintptr_t num_ask_brokers;
1470  const struct lb_brokers_t *bid_brokers;
1474  uintptr_t num_bid_brokers;
1476 
1477 typedef void (*lb_brokers_callback_t)(const struct lb_quote_context_t*,
1478  const struct lb_push_brokers_t*,
1479  void*);
1480 
1484 typedef struct lb_trade_t {
1488  const struct lb_decimal_t *price;
1492  int64_t volume;
1496  int64_t timestamp;
1531  const char *trade_type;
1541 
1545 typedef struct lb_push_trades_t {
1549  const char *symbol;
1553  const struct lb_trade_t *trades;
1557  uintptr_t num_trades;
1559 
1560 typedef void (*lb_trades_callback_t)(const struct lb_quote_context_t*,
1561  const struct lb_push_trades_t*,
1562  void*);
1563 
1567 typedef struct lb_candlestick_t {
1571  const struct lb_decimal_t *close;
1575  const struct lb_decimal_t *open;
1579  const struct lb_decimal_t *low;
1583  const struct lb_decimal_t *high;
1587  int64_t volume;
1591  const struct lb_decimal_t *turnover;
1595  int64_t timestamp;
1601 
1605 typedef struct lb_push_candlestick_t {
1609  const char *symbol;
1613  enum lb_period_t period;
1623 
1624 typedef void (*lb_candlestick_callback_t)(const struct lb_quote_context_t*,
1625  const struct lb_push_candlestick_t*,
1626  void*);
1627 
1628 typedef struct lb_date_t {
1629  int32_t year;
1630  uint8_t month;
1631  uint8_t day;
1633 
1634 typedef struct lb_time_t {
1635  uint8_t hour;
1636  uint8_t minute;
1637  uint8_t second;
1639 
1640 typedef struct lb_datetime_t {
1641  struct lb_date_t date;
1642  struct lb_time_t time;
1644 
1652  const char *name;
1656  const char *const *securities;
1660  uintptr_t num_securities;
1662 
1670  uint32_t flags;
1674  int64_t id;
1678  const char *name;
1682  const char *const *securities;
1686  uintptr_t num_securities;
1692 
1696 typedef struct lb_push_order_changed_t {
1700  enum lb_order_side_t side;
1704  const char *stock_name;
1712  const char *symbol;
1732  const char *order_id;
1736  const char *currency;
1744  int64_t submitted_at;
1748  int64_t updated_at;
1756  const char *msg;
1760  enum lb_order_tag_t tag;
1768  const int64_t *trigger_at;
1784  const char *account_no;
1788  const struct lb_decimal_t *last_share;
1792  const struct lb_decimal_t *last_price;
1796  const char *remark;
1798 
1799 typedef void (*lb_order_changed_callback_t)(const struct lb_trade_context_t*,
1800  const struct lb_push_order_changed_t*,
1801  void*);
1802 
1810  const int64_t *start_at;
1814  const int64_t *end_at;
1818  const char *symbol;
1820 
1828  const char *symbol;
1832  const char *order_id;
1834 
1842  const char *symbol;
1850  uintptr_t num_status;
1854  const enum lb_order_side_t *side;
1858  const enum lb_market_t *market;
1862  const int64_t *start_at;
1866  const int64_t *end_at;
1868 
1876  const char *symbol;
1884  uintptr_t num_status;
1888  const enum lb_order_side_t *side;
1892  const enum lb_market_t *market;
1896  const char *order_id;
1898 
1906  const char *order_id;
1910  const struct lb_decimal_t *quantity;
1914  const struct lb_decimal_t *price;
1934  const char *remark;
1936 
1944  const char *symbol;
1952  enum lb_order_side_t side;
1985  const struct lb_date_t *expire_date;
1993  const char *remark;
1995 
2003  int64_t start_at;
2007  int64_t end_at;
2015  const char *symbol;
2019  const uintptr_t *page;
2023  const uintptr_t *size;
2025 
2033  const char *const *symbols;
2037  uintptr_t num_symbols;
2039 
2047  const char *const *symbols;
2051  uintptr_t num_symbols;
2053 
2058  const char *symbol;
2060  const struct lb_decimal_t *price;
2061  enum lb_order_side_t side;
2062  const char *currency;
2063  const char *order_id;
2066 
2067 typedef struct lb_subscription_t {
2068  const char *symbol;
2069  uint8_t sub_types;
2071  uintptr_t num_candlesticks;
2073 
2077 typedef struct lb_security_t {
2081  const char *symbol;
2085  const char *name_cn;
2089  const char *name_en;
2093  const char *name_hk;
2095 
2103  const char *symbol;
2107  const char *name_cn;
2111  const char *name_en;
2115  const char *name_hk;
2119  const char *exchange;
2123  const char *currency;
2127  int32_t lot_size;
2131  int64_t total_shares;
2139  int64_t hk_shares;
2143  const struct lb_decimal_t *eps;
2147  const struct lb_decimal_t *eps_ttm;
2151  const struct lb_decimal_t *bps;
2165 
2169 typedef struct lb_prepost_quote_t {
2173  const struct lb_decimal_t *last_done;
2177  int64_t timestamp;
2181  int64_t volume;
2185  const struct lb_decimal_t *turnover;
2189  const struct lb_decimal_t *high;
2193  const struct lb_decimal_t *low;
2197  const struct lb_decimal_t *prev_close;
2199 
2203 typedef struct lb_security_quote_t {
2207  const char *symbol;
2211  const struct lb_decimal_t *last_done;
2215  const struct lb_decimal_t *prev_close;
2219  const struct lb_decimal_t *open;
2223  const struct lb_decimal_t *high;
2227  const struct lb_decimal_t *low;
2231  int64_t timestamp;
2235  int64_t volume;
2239  const struct lb_decimal_t *turnover;
2257 
2261 typedef struct lb_option_quote_t {
2265  const char *symbol;
2269  const struct lb_decimal_t *last_done;
2273  const struct lb_decimal_t *prev_close;
2277  const struct lb_decimal_t *open;
2281  const struct lb_decimal_t *high;
2285  const struct lb_decimal_t *low;
2289  int64_t timestamp;
2293  int64_t volume;
2297  const struct lb_decimal_t *turnover;
2309  int64_t open_interest;
2313  struct lb_date_t expiry_date;
2341  const char *underlying_symbol;
2343 
2347 typedef struct lb_warrant_quote_t {
2351  const char *symbol;
2355  const struct lb_decimal_t *last_done;
2359  const struct lb_decimal_t *prev_close;
2363  const struct lb_decimal_t *open;
2367  const struct lb_decimal_t *high;
2371  const struct lb_decimal_t *low;
2375  int64_t timestamp;
2379  int64_t volume;
2383  const struct lb_decimal_t *turnover;
2395  struct lb_date_t expiry_date;
2399  struct lb_date_t last_trade_date;
2431  const struct lb_decimal_t *call_price;
2435  const char *underlying_symbol;
2437 
2441 typedef struct lb_security_depth_t {
2445  const struct lb_depth_t *asks;
2449  uintptr_t num_asks;
2453  const struct lb_depth_t *bids;
2457  uintptr_t num_bids;
2459 
2463 typedef struct lb_security_brokers_t {
2467  const struct lb_brokers_t *ask_brokers;
2471  uintptr_t num_ask_brokers;
2475  const struct lb_brokers_t *bid_brokers;
2479  uintptr_t num_bid_brokers;
2481 
2485 typedef struct lb_participant_info_t {
2489  const int32_t *broker_ids;
2493  uintptr_t num_broker_ids;
2497  const char *name_cn;
2501  const char *name_en;
2505  const char *name_hk;
2507 
2511 typedef struct lb_intraday_line_t {
2515  const struct lb_decimal_t *price;
2519  int64_t timestamp;
2523  int64_t volume;
2527  const struct lb_decimal_t *turnover;
2531  const struct lb_decimal_t *avg_price;
2533 
2537 typedef struct lb_strike_price_info_t {
2541  const struct lb_decimal_t *price;
2545  const char *call_symbol;
2549  const char *put_symbol;
2553  bool standard;
2555 
2559 typedef struct lb_issuer_info_t {
2563  int32_t issuer_id;
2567  const char *name_cn;
2571  const char *name_en;
2575  const char *name_hk;
2577 
2585  struct lb_time_t begin_time;
2589  struct lb_time_t end_time;
2595 
2603  enum lb_market_t market;
2613 
2621  const struct lb_date_t *trading_days;
2625  uintptr_t num_trading_days;
2635 
2639 typedef struct lb_capital_flow_line_t {
2643  const struct lb_decimal_t *inflow;
2647  int64_t timestamp;
2649 
2657  const struct lb_decimal_t *large;
2661  const struct lb_decimal_t *medium;
2665  const struct lb_decimal_t *small;
2667 
2675  int64_t timestamp;
2685 
2689 typedef struct lb_realtime_quote_t {
2693  const char *symbol;
2697  const struct lb_decimal_t *last_done;
2701  const struct lb_decimal_t *open;
2705  const struct lb_decimal_t *high;
2709  const struct lb_decimal_t *low;
2713  int64_t timestamp;
2717  int64_t volume;
2721  const struct lb_decimal_t *turnover;
2727 
2731 typedef struct lb_execution_t {
2735  const char *order_id;
2739  const char *trade_id;
2743  const char *symbol;
2747  int64_t trade_done_at;
2751  const struct lb_decimal_t *quantity;
2755  const struct lb_decimal_t *price;
2757 
2761 typedef struct lb_order_t {
2765  const char *order_id;
2773  const char *stock_name;
2777  const struct lb_decimal_t *quantity;
2785  const struct lb_decimal_t *price;
2793  int64_t submitted_at;
2797  enum lb_order_side_t side;
2801  const char *symbol;
2809  const struct lb_decimal_t *last_done;
2817  const char *msg;
2821  enum lb_order_tag_t tag;
2829  const struct lb_date_t *expire_date;
2833  const int64_t *updated_at;
2837  const int64_t *trigger_at;
2857  const char *currency;
2865  const char *remark;
2867 
2875  const char *currency;
2881 
2885 typedef struct lb_cash_info_t {
2897  const struct lb_decimal_t *frozen_cash;
2905  const char *currency;
2907 
2911 typedef struct lb_account_balance_t {
2915  const struct lb_decimal_t *total_cash;
2927  int32_t risk_level;
2931  const struct lb_decimal_t *margin_call;
2935  const char *currency;
2943  uintptr_t num_cash_infos;
2947  const struct lb_decimal_t *net_assets;
2951  const struct lb_decimal_t *init_margin;
2959  const struct lb_decimal_t *buy_power;
2969 
2973 typedef struct lb_cash_flow_t {
2989  const struct lb_decimal_t *balance;
2993  const char *currency;
2997  int64_t business_time;
3001  const char *symbol;
3005  const char *description;
3007 
3011 typedef struct lb_fund_position_t {
3015  const char *symbol;
3027  const char *symbol_name;
3031  const char *currency;
3041 
3049  const char *account_channel;
3057  uintptr_t num_positions;
3059 
3071  uintptr_t num_channels;
3073 
3077 typedef struct lb_stock_position_t {
3081  const char *symbol;
3085  const char *symbol_name;
3089  const struct lb_decimal_t *quantity;
3097  const char *currency;
3102  const struct lb_decimal_t *cost_price;
3106  enum lb_market_t market;
3112 
3120  const char *account_channel;
3128  uintptr_t num_positions;
3130 
3142  uintptr_t num_channels;
3144 
3152  const char *order_id;
3154 
3158 typedef struct lb_watchlist_security_t {
3162  const char *symbol;
3166  enum lb_market_t market;
3170  const char *name;
3178  int64_t watched_at;
3180 
3184 typedef struct lb_watchlist_group_t {
3188  int64_t id;
3192  const char *name;
3200  uintptr_t num_securities;
3202 
3206 typedef struct lb_margin_ratio_t {
3210  const struct lb_decimal_t *im_factor;
3214  const struct lb_decimal_t *mm_factor;
3218  const struct lb_decimal_t *fm_factor;
3220 
3225  const struct lb_decimal_t *price;
3226  const struct lb_decimal_t *quantity;
3228  const char *msg;
3229  int64_t time;
3231 
3235 typedef struct lb_order_charge_fee_t {
3239  const char *code;
3243  const char *name;
3247  const struct lb_decimal_t *amount;
3251  const char *currency;
3253 
3257 typedef struct lb_order_charge_item_t {
3265  const char *name;
3273  uintptr_t num_fees;
3275 
3287  const char *currency;
3295  uintptr_t num_items;
3297 
3301 typedef struct lb_order_detail_t {
3305  const char *order_id;
3313  const char *stock_name;
3317  const struct lb_decimal_t *quantity;
3325  const struct lb_decimal_t *price;
3333  int64_t submitted_at;
3337  enum lb_order_side_t side;
3341  const char *symbol;
3349  const struct lb_decimal_t *last_done;
3357  const char *msg;
3361  enum lb_order_tag_t tag;
3369  const struct lb_date_t *expire_date;
3373  const int64_t *updated_at;
3377  const int64_t *trigger_at;
3397  const char *currency;
3405  const char *remark;
3413  const struct lb_decimal_t *free_amount;
3417  const char *free_currency;
3429  const char *deductions_currency;
3449  uintptr_t num_history;
3455 
3469 
3477  const char *symbol;
3481  const struct lb_decimal_t *last_done;
3489  const struct lb_decimal_t *change_rate;
3493  const int64_t *volume;
3497  const struct lb_decimal_t *turnover;
3517  const struct lb_decimal_t *amplitude;
3529  const struct lb_decimal_t *pb_ratio;
3553  const struct lb_date_t *expiry_date;
3569  const int64_t *outstanding_qty;
3577  const struct lb_decimal_t *premium;
3581  const struct lb_decimal_t *itm_otm;
3593  const struct lb_decimal_t *call_price;
3617  const int64_t *open_interest;
3621  const struct lb_decimal_t *delta;
3625  const struct lb_decimal_t *gamma;
3629  const struct lb_decimal_t *theta;
3633  const struct lb_decimal_t *vega;
3637  const struct lb_decimal_t *rho;
3639 
3643 typedef struct lb_warrant_info_t {
3647  const char *symbol;
3655  const char *name;
3659  const struct lb_decimal_t *last_done;
3663  const struct lb_decimal_t *change_rate;
3671  int64_t volume;
3675  const struct lb_decimal_t *turnover;
3679  struct lb_date_t expiry_date;
3703  const struct lb_decimal_t *premium;
3707  const struct lb_decimal_t *itm_otm;
3715  const struct lb_decimal_t *delta;
3719  const struct lb_decimal_t *call_price;
3745 
3753  const char *key;
3757  const char *name;
3761  const char *description;
3765  int64_t start_at;
3769  int64_t end_at;
3771 
3775 typedef struct lb_market_temperature_t {
3779  int32_t temperature;
3783  const char *description;
3787  int32_t valuation;
3791  int32_t sentiment;
3795  int64_t timestamp;
3797 
3810  uintptr_t num_records;
3812 
3813 #ifdef __cplusplus
3814 extern "C" {
3815 #endif // __cplusplus
3816 
3844 
3845 struct lb_config_t *lb_config_new(const char *app_key,
3846  const char *app_secret,
3847  const char *access_token,
3848  const char *http_url,
3849  const char *quote_ws_url,
3850  const char *trade_ws_url,
3851  const enum lb_language_t *language,
3852  bool enable_overight,
3853  const enum lb_push_candlestick_mode_t *push_candlestick_mode,
3854  bool enable_print_quote_packages,
3855  const char *log_path);
3856 
3860 void lb_config_free(struct lb_config_t *config);
3861 
3866  int64_t expired_at,
3867  lb_async_callback_t callback,
3868  void *userdata);
3869 
3873 void lb_error_free(struct lb_error_t *error);
3874 
3875 const char *lb_error_message(const struct lb_error_t *error);
3876 
3877 int64_t lb_error_code(const struct lb_error_t *error);
3878 
3879 enum lb_error_kind_t lb_error_kind(const struct lb_error_t *error);
3880 
3884 struct lb_http_client_t *lb_http_client_new(const char *http_url,
3885  const char *app_key,
3886  const char *app_secret,
3887  const char *access_token);
3888 
3892 void lb_http_client_free(struct lb_http_client_t *http_client);
3893 
3908 
3912 void lb_http_client_request(struct lb_http_client_t *http_client,
3913  const char *method,
3914  const char *path,
3915  const struct lb_http_header_t *headers,
3916  const char *request_body,
3917  lb_async_callback_t callback,
3918  void *userdata);
3919 
3923 void lb_http_result_free(struct lb_http_result_t *http_result);
3924 
3925 const char *lb_http_result_response_body(const struct lb_http_result_t *http_result);
3926 
3927 void lb_quote_context_new(const struct lb_config_t *config,
3928  lb_async_callback_t callback,
3929  void *userdata);
3930 
3932 
3934 
3935 uintptr_t lb_quote_context_ref_count(const struct lb_quote_context_t *ctx);
3936 
3937 void lb_quote_context_set_userdata(const struct lb_quote_context_t *ctx, void *userdata);
3938 
3940 
3943 
3945 
3946 const char *lb_quote_context_quote_level(const struct lb_quote_context_t *ctx);
3947 
3949  lb_async_callback_t callback,
3950  void *userdata);
3951 
3957  lb_quote_callback_t callback,
3958  void *userdata,
3959  lb_free_userdata_func_t free_userdata);
3960 
3966  lb_depth_callback_t callback,
3967  void *userdata,
3968  lb_free_userdata_func_t free_userdata);
3969 
3975  lb_brokers_callback_t callback,
3976  void *userdata,
3977  lb_free_userdata_func_t free_userdata);
3978 
3984  lb_trades_callback_t callback,
3985  void *userdata,
3986  lb_free_userdata_func_t free_userdata);
3987 
3993  lb_candlestick_callback_t callback,
3994  void *userdata,
3995  lb_free_userdata_func_t free_userdata);
3996 
3998  const char *const *symbols,
3999  uintptr_t num_symbols,
4000  uint8_t sub_types,
4001  bool is_first_push,
4002  lb_async_callback_t callback,
4003  void *userdata);
4004 
4009  const char *const *symbols,
4010  uintptr_t num_symbols,
4011  uint8_t sub_types,
4012  lb_async_callback_t callback,
4013  void *userdata);
4014 
4019  const char *symbol,
4020  enum lb_period_t period,
4021  enum lb_trade_sessions_t trade_sessions,
4022  lb_async_callback_t callback,
4023  void *userdata);
4024 
4029  const char *symbol,
4030  enum lb_period_t period,
4031  lb_async_callback_t callback,
4032  void *userdata);
4033 
4038  lb_async_callback_t callback,
4039  void *userdata);
4040 
4045  const char *const *symbols,
4046  uintptr_t num_symbols,
4047  lb_async_callback_t callback,
4048  void *userdata);
4049 
4054  const char *const *symbols,
4055  uintptr_t num_symbols,
4056  lb_async_callback_t callback,
4057  void *userdata);
4058 
4063  const char *const *symbols,
4064  uintptr_t num_symbols,
4065  lb_async_callback_t callback,
4066  void *userdata);
4067 
4072  const char *const *symbols,
4073  uintptr_t num_symbols,
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  lb_async_callback_t callback,
4091  void *userdata);
4092 
4097  lb_async_callback_t callback,
4098  void *userdata);
4099 
4104  const char *symbol,
4105  uintptr_t count,
4106  lb_async_callback_t callback,
4107  void *userdata);
4108 
4113  const char *symbol,
4114  enum lb_trade_sessions_t trade_sessions,
4115  lb_async_callback_t callback,
4116  void *userdata);
4117 
4122  const char *symbol,
4123  enum lb_period_t period,
4124  uintptr_t count,
4125  enum lb_adjust_type_t adjust_type,
4126  enum lb_trade_sessions_t trade_sessions,
4127  lb_async_callback_t callback,
4128  void *userdata);
4129 
4134  const char *symbol,
4135  enum lb_period_t period,
4136  enum lb_adjust_type_t adjust_type,
4137  bool forward,
4138  const struct lb_datetime_t *time,
4139  uintptr_t count,
4140  enum lb_trade_sessions_t trade_sessions,
4141  lb_async_callback_t callback,
4142  void *userdata);
4143 
4148  const char *symbol,
4149  enum lb_period_t period,
4150  enum lb_adjust_type_t adjust_type,
4151  const struct lb_date_t *start,
4152  const struct lb_date_t *end,
4153  enum lb_trade_sessions_t trade_sessions,
4154  lb_async_callback_t callback,
4155  void *userdata);
4156 
4161  const char *symbol,
4162  lb_async_callback_t callback,
4163  void *userdata);
4164 
4169  const char *symbol,
4170  const struct lb_date_t *expiry_date,
4171  lb_async_callback_t callback,
4172  void *userdata);
4173 
4178  lb_async_callback_t callback,
4179  void *userdata);
4180 
4185  const char *symbol,
4186  enum lb_warrant_sort_by_t sort_by,
4187  enum lb_sort_order_type_t sort_order,
4188  const enum lb_warrant_type_t *warrant_type,
4189  uintptr_t num_warrant_type,
4190  const int32_t *issuer,
4191  uintptr_t num_issuer,
4192  const enum lb_filter_warrant_expiry_date_t *expiry_date,
4193  uintptr_t num_expiry_date,
4194  const enum lb_filter_warrant_in_out_bounds_type_t *price_type,
4195  uintptr_t num_price_type,
4196  const enum lb_warrant_status_t *status,
4197  uintptr_t num_status,
4198  lb_async_callback_t callback,
4199  void *userdata);
4200 
4205  lb_async_callback_t callback,
4206  void *userdata);
4207 
4212  enum lb_market_t market,
4213  const struct lb_date_t *begin,
4214  const struct lb_date_t *end,
4215  lb_async_callback_t callback,
4216  void *userdata);
4217 
4222  const char *symbol,
4223  lb_async_callback_t callback,
4224  void *userdata);
4225 
4230  const char *symbol,
4231  lb_async_callback_t callback,
4232  void *userdata);
4233 
4238  const char *const *symbols,
4239  uintptr_t num_symbols,
4240  const enum lb_calc_index_t *indexes,
4241  uintptr_t num_indexes,
4242  lb_async_callback_t callback,
4243  void *userdata);
4244 
4249  lb_async_callback_t callback,
4250  void *userdata);
4251 
4256  const struct lb_create_watchlist_group_t *req,
4257  lb_async_callback_t callback,
4258  void *userdata);
4259 
4264  int64_t id,
4265  bool purge,
4266  lb_async_callback_t callback,
4267  void *userdata);
4268 
4273  const struct lb_update_watchlist_group_t *req,
4274  lb_async_callback_t callback,
4275  void *userdata);
4276 
4284  const char *const *symbols,
4285  uintptr_t num_symbols,
4286  lb_async_callback_t callback,
4287  void *userdata);
4288 
4296  const char *symbol,
4297  lb_async_callback_t callback,
4298  void *userdata);
4299 
4307  const char *symbol,
4308  uintptr_t count,
4309  lb_async_callback_t callback,
4310  void *userdata);
4311 
4319  const char *symbol,
4320  lb_async_callback_t callback,
4321  void *userdata);
4322 
4330  const char *symbol,
4331  enum lb_period_t period,
4332  uintptr_t count,
4333  lb_async_callback_t callback,
4334  void *userdata);
4335 
4340  enum lb_market_t market,
4341  const enum lb_security_list_category_t *category,
4342  lb_async_callback_t callback,
4343  void *userdata);
4344 
4349  enum lb_market_t market,
4350  lb_async_callback_t callback,
4351  void *userdata);
4352 
4357  enum lb_market_t market,
4358  const struct lb_date_t *start,
4359  const struct lb_date_t *end,
4360  lb_async_callback_t callback,
4361  void *userdata);
4362 
4363 void lb_trade_context_new(const struct lb_config_t *config,
4364  lb_async_callback_t callback,
4365  void *userdata);
4366 
4368 
4370 
4371 uintptr_t lb_trade_context_ref_count(const struct lb_trade_context_t *ctx);
4372 
4373 void lb_trade_context_set_userdata(const struct lb_trade_context_t *ctx, void *userdata);
4374 
4376 
4379 
4385  lb_order_changed_callback_t callback,
4386  void *userdata,
4387  lb_free_userdata_func_t free_userdata);
4388 
4390  const enum lb_topic_type_t *topics,
4391  uintptr_t num_topics,
4392  lb_async_callback_t callback,
4393  void *userdata);
4394 
4396  const enum lb_topic_type_t *topics,
4397  uintptr_t num_topics,
4398  lb_async_callback_t callback,
4399  void *userdata);
4400 
4407  const struct lb_get_history_executions_options_t *opts,
4408  lb_async_callback_t callback,
4409  void *userdata);
4410 
4417  const struct lb_get_today_executions_options_t *opts,
4418  lb_async_callback_t callback,
4419  void *userdata);
4420 
4427  const struct lb_get_history_orders_options_t *opts,
4428  lb_async_callback_t callback,
4429  void *userdata);
4430 
4437  const struct lb_get_today_orders_options_t *opts,
4438  lb_async_callback_t callback,
4439  void *userdata);
4440 
4447  const struct lb_replace_order_options_t *opts,
4448  lb_async_callback_t callback,
4449  void *userdata);
4450 
4457  const struct lb_submit_order_options_t *opts,
4458  lb_async_callback_t callback,
4459  void *userdata);
4460 
4465  const char *order_id,
4466  lb_async_callback_t callback,
4467  void *userdata);
4468 
4473  const char *currency,
4474  lb_async_callback_t callback,
4475  void *userdata);
4476 
4483  const struct lb_get_cash_flow_options_t *opts,
4484  lb_async_callback_t callback,
4485  void *userdata);
4486 
4493  const struct lb_get_fund_positions_options_t *opts,
4494  lb_async_callback_t callback,
4495  void *userdata);
4496 
4503  const struct lb_get_stock_positions_options_t *opts,
4504  lb_async_callback_t callback,
4505  void *userdata);
4506 
4511  const char *symbol,
4512  lb_async_callback_t callback,
4513  void *userdata);
4514 
4519  const char *order_id,
4520  lb_async_callback_t callback,
4521  void *userdata);
4522 
4528  lb_async_callback_t callback,
4529  void *userdata);
4530 
4535 struct lb_decimal_t *lb_decimal_new(int64_t num, uint32_t scale);
4536 
4540 struct lb_decimal_t *lb_decimal_clone(const struct lb_decimal_t *value);
4541 
4545 struct lb_decimal_t *lb_decimal_from_str(const char *value);
4546 
4550 struct lb_decimal_t *lb_decimal_from_double(double value);
4551 
4555 void lb_decimal_free(struct lb_decimal_t *value);
4556 
4557 double lb_decimal_to_double(const struct lb_decimal_t *value);
4558 
4562 void lb_decimal_abs(struct lb_decimal_t *value);
4563 
4567 void lb_decimal_ceil(struct lb_decimal_t *value);
4568 
4572 void lb_decimal_floor(struct lb_decimal_t *value);
4573 
4577 void lb_decimal_fract(struct lb_decimal_t *value);
4578 
4582 bool lb_decimal_is_negative(const struct lb_decimal_t *value);
4583 
4587 bool lb_decimal_is_positive(const struct lb_decimal_t *value);
4588 
4592 bool lb_decimal_is_zero(const struct lb_decimal_t *value);
4593 
4597 const struct lb_decimal_t *lb_decimal_max(const struct lb_decimal_t *a,
4598  const struct lb_decimal_t *b);
4599 
4603 const struct lb_decimal_t *lb_decimal_min(const struct lb_decimal_t *a,
4604  const struct lb_decimal_t *b);
4605 
4610 
4616 void lb_decimal_round(struct lb_decimal_t *value);
4617 
4623 void lb_decimal_round_dp(struct lb_decimal_t *value, uint32_t dp);
4624 
4629 void lb_decimal_trunc(struct lb_decimal_t *value);
4630 
4634 void lb_decimal_add(struct lb_decimal_t *a, const struct lb_decimal_t *b);
4635 
4639 void lb_decimal_sub(struct lb_decimal_t *a, const struct lb_decimal_t *b);
4640 
4644 void lb_decimal_mul(struct lb_decimal_t *a, const struct lb_decimal_t *b);
4645 
4649 void lb_decimal_div(struct lb_decimal_t *a, const struct lb_decimal_t *b);
4650 
4654 void lb_decimal_rem(struct lb_decimal_t *a, const struct lb_decimal_t *b);
4655 
4659 void lb_decimal_neg(struct lb_decimal_t *value);
4660 
4665 bool lb_decimal_gt(const struct lb_decimal_t *a, const struct lb_decimal_t *b);
4666 
4671 bool lb_decimal_gte(const struct lb_decimal_t *a, const struct lb_decimal_t *b);
4672 
4677 bool lb_decimal_eq(const struct lb_decimal_t *a, const struct lb_decimal_t *b);
4678 
4683 bool lb_decimal_lt(const struct lb_decimal_t *a, const struct lb_decimal_t *b);
4684 
4689 bool lb_decimal_lte(const struct lb_decimal_t *a, const struct lb_decimal_t *b);
4690 
4702 int32_t lb_decimal_cmp(const struct lb_decimal_t *a, const struct lb_decimal_t *b);
4703 
4707 void lb_decimal_sin(struct lb_decimal_t *value);
4708 
4712 void lb_decimal_cos(struct lb_decimal_t *value);
4713 
4718 void lb_decimal_tan(struct lb_decimal_t *value);
4719 
4723 void lb_decimal_sqrt(struct lb_decimal_t *value);
4724 
4729 void lb_decimal_pow(struct lb_decimal_t *value, const struct lb_decimal_t *exp);
4730 
4735 void lb_decimal_ln(struct lb_decimal_t *value);
4736 
4740 void lb_decimal_log10(struct lb_decimal_t *value);
4741 
4746 void lb_decimal_exp(struct lb_decimal_t *value);
4747 
4755  const struct lb_decimal_t *tolerance);
4756 
4760 void lb_decimal_erf(struct lb_decimal_t *value);
4761 
4766 
4770 void lb_decimal_norm_pdf(struct lb_decimal_t *value);
4771 
4775 const char *lb_decimal_to_string(const struct lb_decimal_t *value);
4776 
4777 #ifdef __cplusplus
4778 } // extern "C"
4779 #endif // __cplusplus
4780 
4781 #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:1560
lb_trade_session_t
Definition: longport.h:1030
@ TradeSessionPre
Definition: longport.h:1038
@ TradeSessionOvernight
Definition: longport.h:1046
@ TradeSessionIntraday
Definition: longport.h:1034
@ TradeSessionPost
Definition: longport.h:1042
struct lb_decimal_t lb_decimal_t
Definition: longport.h:1282
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:1138
@ WarrantSortByStrikePrice
Definition: longport.h:1166
@ WarrantSortByLowerStrikePrice
Definition: longport.h:1174
@ WarrantSortByConversionRatio
Definition: longport.h:1218
@ WarrantSortByOutstandingQuantity
Definition: longport.h:1178
@ WarrantSortByPremium
Definition: longport.h:1186
@ WarrantSortByLeverageRatio
Definition: longport.h:1214
@ WarrantSortByCallPrice
Definition: longport.h:1202
@ WarrantSortByChangeValue
Definition: longport.h:1150
@ WarrantSortByBalancePoint
Definition: longport.h:1222
@ WarrantSortByImpliedVolatility
Definition: longport.h:1194
@ WarrantSortByVolume
Definition: longport.h:1154
@ WarrantSortByToCallPrice
Definition: longport.h:1206
@ WarrantSortByItmOtm
Definition: longport.h:1190
@ WarrantSortByTurnover
Definition: longport.h:1158
@ WarrantSortByExpiryDate
Definition: longport.h:1162
@ WarrantSortByOutstandingRatio
Definition: longport.h:1182
@ WarrantSortByChangeRate
Definition: longport.h:1146
@ WarrantSortByEffectiveLeverage
Definition: longport.h:1210
@ WarrantSortByUpperStrikePrice
Definition: longport.h:1170
@ WarrantSortByStatus
Definition: longport.h:1226
@ WarrantSortByDelta
Definition: longport.h:1198
@ WarrantSortByLastDone
Definition: longport.h:1142
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:966
@ SortOrderDescending
Definition: longport.h:974
@ SortOrderAscending
Definition: longport.h:970
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:706
@ OutsideRTHOnly
Definition: longport.h:714
@ OutsideRTHOvernight
Definition: longport.h:722
@ OutsideRTHUnknown
Definition: longport.h:710
@ OutsideRTHAnyTime
Definition: longport.h:718
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:1624
struct lb_config_t lb_config_t
Definition: longport.h:1280
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:1477
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:1012
@ TradeDirectionNeutral
Definition: longport.h:1016
@ TradeDirectionUp
Definition: longport.h:1024
@ TradeDirectionDown
Definition: longport.h:1020
lb_period_t
Definition: longport.h:728
@ PeriodQuarter
Definition: longport.h:800
@ PeriodMin120
Definition: longport.h:776
@ PeriodMin15
Definition: longport.h:756
@ PeriodYear
Definition: longport.h:804
@ PeriodMin5
Definition: longport.h:748
@ PeriodMin240
Definition: longport.h:784
@ PeriodMin3
Definition: longport.h:744
@ PeriodMin1
Definition: longport.h:736
@ PeriodMin2
Definition: longport.h:740
@ PeriodMin10
Definition: longport.h:752
@ PeriodMin60
Definition: longport.h:772
@ PeriodMin45
Definition: longport.h:768
@ PeriodDay
Definition: longport.h:788
@ PeriodMin20
Definition: longport.h:760
@ PeriodWeek
Definition: longport.h:792
@ PeriodUnknown
Definition: longport.h:732
@ PeriodMonth
Definition: longport.h:796
@ PeriodMin30
Definition: longport.h:764
@ PeriodMin180
Definition: longport.h:780
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_quote_context_security_list(const struct lb_quote_context_t *ctx, enum lb_market_t market, const enum lb_security_list_category_t *category, lb_async_callback_t callback, void *userdata)
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:1066
@ TradeStatusCodeMoved
Definition: longport.h:1090
@ TradeStatusWarrantPrepareList
Definition: longport.h:1106
@ TradeStatusDelisted
Definition: longport.h:1078
@ TradeStatusFuse
Definition: longport.h:1082
@ TradeStatusNormal
Definition: longport.h:1070
@ TradeStatusPrepareList
Definition: longport.h:1086
@ TradeStatusSuspendTrade
Definition: longport.h:1110
@ TradeStatusHalted
Definition: longport.h:1074
@ TradeStatusToBeOpened
Definition: longport.h:1094
@ TradeStatusSplitStockHalts
Definition: longport.h:1098
@ TradeStatusExpired
Definition: longport.h:1102
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:1052
@ TradeSessionsAll
Definition: longport.h:1060
@ TradeSessionsIntraday
Definition: longport.h:1056
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:1296
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:436
@ MarketCN
Definition: longport.h:452
@ MarketHK
Definition: longport.h:448
@ MarketUnknown
Definition: longport.h:440
@ MarketSG
Definition: longport.h:456
@ MarketUS
Definition: longport.h:444
@ MarketCrypto
Definition: longport.h:460
void(* lb_quote_callback_t)(const struct lb_quote_context_t *, const struct lb_push_quote_t *, void *)
Definition: longport.h:1377
struct lb_market_trading_session_t lb_market_trading_session_t
lb_filter_warrant_in_out_bounds_type_t
Definition: longport.h:382
@ WarrantInOutBoundsType_Out
Definition: longport.h:390
@ WarrantInOutBoundsType_In
Definition: longport.h:386
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:1321
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
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:1289
void(* lb_async_callback_t)(const struct lb_async_result_t *)
Definition: longport.h:1311
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:824
@ SecuritiesUpdateModeAdd
Definition: longport.h:828
@ SecuritiesUpdateModeReplace
Definition: longport.h:836
@ SecuritiesUpdateModeRemove
Definition: longport.h:832
lb_warrant_status_t
Definition: longport.h:1232
@ WarrantStatusPrepareList
Definition: longport.h:1240
@ WarrantStatusSuspend
Definition: longport.h:1236
@ WarrantStatusNormal
Definition: longport.h:1244
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:360
@ WarrantExpiryDate_Between_6_12
Definition: longport.h:372
@ WarrantExpiryDate_LT_3
Definition: longport.h:364
@ WarrantExpiryDate_GT_12
Definition: longport.h:376
@ WarrantExpiryDate_Between_3_6
Definition: longport.h:368
lb_option_type_t
Definition: longport.h:484
@ OptionTypeEurope
Definition: longport.h:496
@ OptionTypeUnknown
Definition: longport.h:488
@ OptionTypeAmerican
Definition: longport.h:492
struct lb_push_candlestick_t lb_push_candlestick_t
lb_security_list_category_t
Definition: longport.h:956
@ SecurityListCategoryOvernight
Definition: longport.h:960
bool lb_decimal_is_positive(const struct lb_decimal_t *value)
lb_order_type_t
Definition: longport.h:644
@ OrderTypeUnknown
Definition: longport.h:648
@ OrderTypeTSMPCT
Definition: longport.h:696
@ OrderTypeELO
Definition: longport.h:656
@ OrderTypeAO
Definition: longport.h:664
@ OrderTypeMO
Definition: longport.h:660
@ OrderTypeTSMAMT
Definition: longport.h:692
@ OrderTypeSLO
Definition: longport.h:700
@ OrderTypeMIT
Definition: longport.h:680
@ OrderTypeLO
Definition: longport.h:652
@ OrderTypeLIT
Definition: longport.h:676
@ OrderTypeTSLPPCT
Definition: longport.h:688
@ OrderTypeODD
Definition: longport.h:672
@ OrderTypeALO
Definition: longport.h:668
@ OrderTypeTSLPAMT
Definition: longport.h:684
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:1116
@ TriggerStatusUnknown
Definition: longport.h:1120
@ TriggerStatusReleased
Definition: longport.h:1132
@ TriggerStatusDeactive
Definition: longport.h:1124
@ TriggerStatusActive
Definition: longport.h:1128
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:1284
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:1429
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_quote_context_intraday(const struct lb_quote_context_t *ctx, const char *symbol, enum lb_trade_sessions_t trade_sessions, lb_async_callback_t callback, void *userdata)
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:1301
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
lb_error_kind_t
Definition: longport.h:342
@ ErrorKindHttp
Definition: longport.h:346
@ ErrorKindOpenApi
Definition: longport.h:350
@ ErrorKindOther
Definition: longport.h:354
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:810
@ PushCandlestickMode_Realtime
Definition: longport.h:814
@ PushCandlestickMode_Confirmed
Definition: longport.h:818
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:842
@ SecurityBoardVIXIndex
Definition: longport.h:950
@ SecurityBoardHKEquity
Definition: longport.h:878
@ SecurityBoardUSOptionS
Definition: longport.h:874
@ SecurityBoardSHMainConnect
Definition: longport.h:898
@ SecurityBoardSZMainNonConnect
Definition: longport.h:922
@ SecurityBoardSZGEMConnect
Definition: longport.h:926
@ SecurityBoardSTI
Definition: longport.h:938
@ SecurityBoardUSNSDQ
Definition: longport.h:862
@ SecurityBoardSGMain
Definition: longport.h:934
@ SecurityBoardUSOption
Definition: longport.h:870
@ SecurityBoardSZMainConnect
Definition: longport.h:918
@ SecurityBoardSZGEMNonConnect
Definition: longport.h:930
@ SecurityBoardHKSector
Definition: longport.h:894
@ SecurityBoardUSSector
Definition: longport.h:866
@ SecurityBoardHKPreIPO
Definition: longport.h:882
@ SecurityBoardCNIX
Definition: longport.h:910
@ SecurityBoardSPXIndex
Definition: longport.h:946
@ SecurityBoardUnknown
Definition: longport.h:846
@ SecurityBoardUSDJI
Definition: longport.h:858
@ SecurityBoardHKHS
Definition: longport.h:890
@ SecurityBoardCNSector
Definition: longport.h:914
@ SecurityBoardUSMain
Definition: longport.h:850
@ SecurityBoardUSPink
Definition: longport.h:854
@ SecurityBoardSHSTAR
Definition: longport.h:906
@ SecurityBoardSGSector
Definition: longport.h:942
@ SecurityBoardSHMainNonConnect
Definition: longport.h:902
@ SecurityBoardHKWarrant
Definition: longport.h:886
struct lb_submit_order_response_t lb_submit_order_response_t
lb_time_in_force_type_t
Definition: longport.h:980
@ TimeInForceUnknown
Definition: longport.h:984
@ TimeInForceGoodTilCanceled
Definition: longport.h:992
@ TimeInForceGoodTilDate
Definition: longport.h:996
@ TimeInForceDay
Definition: longport.h:988
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:502
@ OrderSideSell
Definition: longport.h:514
@ OrderSideBuy
Definition: longport.h:510
@ OrderSideUnknown
Definition: longport.h:506
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:1291
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:1250
@ WarrantTypeBear
Definition: longport.h:1270
@ WarrantTypeInline
Definition: longport.h:1274
@ WarrantTypeBull
Definition: longport.h:1266
@ WarrantTypeUnknown
Definition: longport.h:1254
@ WarrantTypeCall
Definition: longport.h:1262
@ WarrantTypePut
Definition: longport.h:1258
struct lb_get_cash_flow_options_t lb_get_cash_flow_options_t
lb_topic_type_t
Definition: longport.h:1002
@ TopicPrivate
Definition: longport.h:1006
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:396
@ GranularityDaily
Definition: longport.h:404
@ GranularityWeekly
Definition: longport.h:408
@ GranularityMonthly
Definition: longport.h:412
@ GranularityUnknown
Definition: longport.h:400
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:1799
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:418
@ Language_ZH_HK
Definition: longport.h:426
@ Language_ZH_CN
Definition: longport.h:422
@ Language_EN
Definition: longport.h:430
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:520
@ OrderStatusExpired
Definition: longport.h:588
@ OrderStatusProtectedNotReported
Definition: longport.h:536
@ OrderStatusPendingCancel
Definition: longport.h:576
@ OrderStatusPartialWithdrawal
Definition: longport.h:592
@ OrderStatusReplacedNotReported
Definition: longport.h:532
@ OrderStatusWaitToCancel
Definition: longport.h:572
@ OrderStatusFilled
Definition: longport.h:544
@ OrderStatusCanceled
Definition: longport.h:584
@ OrderStatusPendingReplace
Definition: longport.h:560
@ OrderStatusRejected
Definition: longport.h:580
@ OrderStatusPartialFilled
Definition: longport.h:568
@ OrderStatusWaitToNew
Definition: longport.h:548
@ OrderStatusNew
Definition: longport.h:552
@ OrderStatusVarietiesNotReported
Definition: longport.h:540
@ OrderStatusUnknown
Definition: longport.h:524
@ OrderStatusWaitToReplace
Definition: longport.h:556
@ OrderStatusNotReported
Definition: longport.h:528
@ OrderStatusReplaced
Definition: longport.h:564
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:598
@ OrderTagNonExercise
Definition: longport.h:634
@ OrderTagOffline
Definition: longport.h:622
@ OrderTagDebtor
Definition: longport.h:630
@ OrderTagCreditor
Definition: longport.h:626
@ OrderTagUnknown
Definition: longport.h:602
@ OrderTagAllocatedSub
Definition: longport.h:638
@ OrderTagMarginCall
Definition: longport.h:618
@ OrderTagLongTerm
Definition: longport.h:610
@ OrderTagGrey
Definition: longport.h:614
@ OrderTagNormal
Definition: longport.h:606
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:466
@ OptionDirectionPut
Definition: longport.h:474
@ OptionDirectionUnknown
Definition: longport.h:470
@ OptionDirectionCall
Definition: longport.h:478
enum lb_error_kind_t lb_error_kind(const struct lb_error_t *error)
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:2911
const struct lb_decimal_t * total_cash
Definition: longport.h:2915
const struct lb_decimal_t * margin_call
Definition: longport.h:2931
const struct lb_decimal_t * buy_power
Definition: longport.h:2959
const struct lb_decimal_t * max_finance_amount
Definition: longport.h:2919
int32_t risk_level
Definition: longport.h:2927
const struct lb_decimal_t * maintenance_margin
Definition: longport.h:2955
uintptr_t num_frozen_transaction_fees
Definition: longport.h:2967
const struct lb_decimal_t * remaining_finance_amount
Definition: longport.h:2923
const struct lb_frozen_transaction_fee_t * frozen_transaction_fees
Definition: longport.h:2963
uintptr_t num_cash_infos
Definition: longport.h:2943
const struct lb_decimal_t * init_margin
Definition: longport.h:2951
const char * currency
Definition: longport.h:2935
const struct lb_decimal_t * net_assets
Definition: longport.h:2947
const struct lb_cash_info_t * cash_infos
Definition: longport.h:2939
Definition: longport.h:1303
const struct lb_error_t * error
Definition: longport.h:1305
uintptr_t length
Definition: longport.h:1307
void * data
Definition: longport.h:1306
const void * ctx
Definition: longport.h:1304
void * userdata
Definition: longport.h:1308
Definition: longport.h:1436
uintptr_t num_broker_ids
Definition: longport.h:1448
int32_t position
Definition: longport.h:1440
const int32_t * broker_ids
Definition: longport.h:1444
Definition: longport.h:1567
const struct lb_decimal_t * turnover
Definition: longport.h:1591
const struct lb_decimal_t * open
Definition: longport.h:1575
const struct lb_decimal_t * close
Definition: longport.h:1571
enum lb_trade_session_t trade_session
Definition: longport.h:1599
const struct lb_decimal_t * high
Definition: longport.h:1583
const struct lb_decimal_t * low
Definition: longport.h:1579
int64_t timestamp
Definition: longport.h:1595
int64_t volume
Definition: longport.h:1587
Definition: longport.h:2671
struct lb_capital_distribution_t capital_out
Definition: longport.h:2683
int64_t timestamp
Definition: longport.h:2675
struct lb_capital_distribution_t capital_in
Definition: longport.h:2679
Definition: longport.h:2653
const struct lb_decimal_t * large
Definition: longport.h:2657
const struct lb_decimal_t * medium
Definition: longport.h:2661
const struct lb_decimal_t * small
Definition: longport.h:2665
Definition: longport.h:2639
const struct lb_decimal_t * inflow
Definition: longport.h:2643
int64_t timestamp
Definition: longport.h:2647
Definition: longport.h:2973
const struct lb_decimal_t * balance
Definition: longport.h:2989
int64_t business_time
Definition: longport.h:2997
const char * description
Definition: longport.h:3005
const char * transaction_flow_name
Definition: longport.h:2977
const char * symbol
Definition: longport.h:3001
const char * currency
Definition: longport.h:2993
enum lb_balance_type_t business_type
Definition: longport.h:2985
enum lb_cash_flow_direction_t direction
Definition: longport.h:2981
Definition: longport.h:2885
const struct lb_decimal_t * available_cash
Definition: longport.h:2893
const struct lb_decimal_t * frozen_cash
Definition: longport.h:2897
const struct lb_decimal_t * withdraw_cash
Definition: longport.h:2889
const char * currency
Definition: longport.h:2905
const struct lb_decimal_t * settling_cash
Definition: longport.h:2901
Definition: longport.h:1648
uintptr_t num_securities
Definition: longport.h:1660
const char *const * securities
Definition: longport.h:1656
const char * name
Definition: longport.h:1652
Definition: longport.h:1628
uint8_t month
Definition: longport.h:1630
int32_t year
Definition: longport.h:1629
uint8_t day
Definition: longport.h:1631
Definition: longport.h:1640
struct lb_date_t date
Definition: longport.h:1641
struct lb_time_t time
Definition: longport.h:1642
Definition: longport.h:1384
const struct lb_decimal_t * price
Definition: longport.h:1392
int64_t order_num
Definition: longport.h:1400
int32_t position
Definition: longport.h:1388
int64_t volume
Definition: longport.h:1396
enum lb_order_side_t side
Definition: longport.h:2061
const struct lb_decimal_t * price
Definition: longport.h:2060
bool fractional_shares
Definition: longport.h:2064
enum lb_order_type_t order_type
Definition: longport.h:2059
const char * symbol
Definition: longport.h:2058
const char * currency
Definition: longport.h:2062
const char * order_id
Definition: longport.h:2063
const struct lb_decimal_t * margin_max_qty
Definition: longport.h:3467
const struct lb_decimal_t * cash_max_qty
Definition: longport.h:3463
Definition: longport.h:2731
const struct lb_decimal_t * quantity
Definition: longport.h:2751
const struct lb_decimal_t * price
Definition: longport.h:2755
const char * trade_id
Definition: longport.h:2739
const char * symbol
Definition: longport.h:2743
int64_t trade_done_at
Definition: longport.h:2747
const char * order_id
Definition: longport.h:2735
Definition: longport.h:2871
const struct lb_decimal_t * frozen_transaction_fee
Definition: longport.h:2879
const char * currency
Definition: longport.h:2875
Definition: longport.h:3045
const char * account_channel
Definition: longport.h:3049
uintptr_t num_positions
Definition: longport.h:3057
const struct lb_fund_position_t * positions
Definition: longport.h:3053
Definition: longport.h:3063
const struct lb_fund_position_channel_t * channels
Definition: longport.h:3067
uintptr_t num_channels
Definition: longport.h:3071
Definition: longport.h:3011
int64_t net_asset_value_day
Definition: longport.h:3023
const char * symbol_name
Definition: longport.h:3027
const struct lb_decimal_t * cost_net_asset_value
Definition: longport.h:3035
const char * symbol
Definition: longport.h:3015
const char * currency
Definition: longport.h:3031
const struct lb_decimal_t * holding_units
Definition: longport.h:3039
const struct lb_decimal_t * current_net_asset_value
Definition: longport.h:3019
Definition: longport.h:1999
const uintptr_t * size
Definition: longport.h:2023
enum lb_balance_type_t * business_type
Definition: longport.h:2011
int64_t end_at
Definition: longport.h:2007
int64_t start_at
Definition: longport.h:2003
const uintptr_t * page
Definition: longport.h:2019
const char * symbol
Definition: longport.h:2015
Definition: longport.h:2029
uintptr_t num_symbols
Definition: longport.h:2037
const char *const * symbols
Definition: longport.h:2033
Definition: longport.h:1806
const int64_t * start_at
Definition: longport.h:1810
const int64_t * end_at
Definition: longport.h:1814
const char * symbol
Definition: longport.h:1818
Definition: longport.h:1838
const int64_t * start_at
Definition: longport.h:1862
enum lb_market_t * market
Definition: longport.h:1858
enum lb_order_status_t * status
Definition: longport.h:1846
const int64_t * end_at
Definition: longport.h:1866
const char * symbol
Definition: longport.h:1842
enum lb_order_side_t * side
Definition: longport.h:1854
uintptr_t num_status
Definition: longport.h:1850
Definition: longport.h:2043
uintptr_t num_symbols
Definition: longport.h:2051
const char *const * symbols
Definition: longport.h:2047
Definition: longport.h:1824
const char * symbol
Definition: longport.h:1828
const char * order_id
Definition: longport.h:1832
Definition: longport.h:1872
enum lb_market_t * market
Definition: longport.h:1892
enum lb_order_status_t * status
Definition: longport.h:1880
const char * symbol
Definition: longport.h:1876
enum lb_order_side_t * side
Definition: longport.h:1888
uintptr_t num_status
Definition: longport.h:1884
const char * order_id
Definition: longport.h:1896
Definition: longport.h:3798
const struct lb_market_temperature_t * records
Definition: longport.h:3806
uintptr_t num_records
Definition: longport.h:3810
enum lb_granularity_t granularity
Definition: longport.h:3802
Definition: longport.h:1316
const char * value
Definition: longport.h:1318
const char * name
Definition: longport.h:1317
Definition: longport.h:2511
const struct lb_decimal_t * turnover
Definition: longport.h:2527
const struct lb_decimal_t * avg_price
Definition: longport.h:2531
const struct lb_decimal_t * price
Definition: longport.h:2515
int64_t timestamp
Definition: longport.h:2519
int64_t volume
Definition: longport.h:2523
Definition: longport.h:2559
int32_t issuer_id
Definition: longport.h:2563
const char * name_cn
Definition: longport.h:2567
const char * name_en
Definition: longport.h:2571
const char * name_hk
Definition: longport.h:2575
Definition: longport.h:3206
const struct lb_decimal_t * mm_factor
Definition: longport.h:3214
const struct lb_decimal_t * im_factor
Definition: longport.h:3210
const struct lb_decimal_t * fm_factor
Definition: longport.h:3218
Definition: longport.h:3775
int32_t temperature
Definition: longport.h:3779
const char * description
Definition: longport.h:3783
int32_t sentiment
Definition: longport.h:3791
int32_t valuation
Definition: longport.h:3787
int64_t timestamp
Definition: longport.h:3795
Definition: longport.h:2617
const struct lb_date_t * half_trading_days
Definition: longport.h:2629
uintptr_t num_trading_days
Definition: longport.h:2625
uintptr_t num_half_trading_days
Definition: longport.h:2633
const struct lb_date_t * trading_days
Definition: longport.h:2621
Definition: longport.h:2599
enum lb_market_t market
Definition: longport.h:2603
const struct lb_trading_session_info_t * trade_sessions
Definition: longport.h:2607
uintptr_t num_trade_sessions
Definition: longport.h:2611
Definition: longport.h:2261
const struct lb_decimal_t * turnover
Definition: longport.h:2297
const struct lb_decimal_t * open
Definition: longport.h:2277
const struct lb_decimal_t * prev_close
Definition: longport.h:2273
struct lb_date_t expiry_date
Definition: longport.h:2313
enum lb_option_type_t contract_type
Definition: longport.h:2325
const struct lb_decimal_t * contract_multiplier
Definition: longport.h:2321
const struct lb_decimal_t * high
Definition: longport.h:2281
const char * underlying_symbol
Definition: longport.h:2341
const struct lb_decimal_t * low
Definition: longport.h:2285
const struct lb_decimal_t * historical_volatility
Definition: longport.h:2337
const struct lb_decimal_t * implied_volatility
Definition: longport.h:2305
int64_t timestamp
Definition: longport.h:2289
const struct lb_decimal_t * strike_price
Definition: longport.h:2317
int64_t volume
Definition: longport.h:2293
const char * symbol
Definition: longport.h:2265
enum lb_trade_status_t trade_status
Definition: longport.h:2301
int64_t open_interest
Definition: longport.h:2309
const struct lb_decimal_t * contract_size
Definition: longport.h:2329
const struct lb_decimal_t * last_done
Definition: longport.h:2269
enum lb_option_direction_t direction
Definition: longport.h:2333
Definition: longport.h:3279
uintptr_t num_items
Definition: longport.h:3295
const struct lb_decimal_t * total_amount
Definition: longport.h:3283
const struct lb_order_charge_item_t * items
Definition: longport.h:3291
const char * currency
Definition: longport.h:3287
Definition: longport.h:3235
const char * name
Definition: longport.h:3243
const char * currency
Definition: longport.h:3251
const char * code
Definition: longport.h:3239
const struct lb_decimal_t * amount
Definition: longport.h:3247
Definition: longport.h:3257
uintptr_t num_fees
Definition: longport.h:3273
const struct lb_order_charge_fee_t * fees
Definition: longport.h:3269
enum lb_charge_category_code_t code
Definition: longport.h:3261
const char * name
Definition: longport.h:3265
Definition: longport.h:3301
enum lb_outside_rth_t * outside_rth
Definition: longport.h:3401
const struct lb_decimal_t * executed_quantity
Definition: longport.h:3321
const struct lb_decimal_t * quantity
Definition: longport.h:3317
enum lb_order_side_t side
Definition: longport.h:3337
const char * msg
Definition: longport.h:3357
const struct lb_decimal_t * price
Definition: longport.h:3325
const struct lb_decimal_t * deductions_amount
Definition: longport.h:3425
const int64_t * updated_at
Definition: longport.h:3373
enum lb_trigger_status_t * trigger_status
Definition: longport.h:3393
enum lb_commission_free_status_t free_status
Definition: longport.h:3409
const int64_t * trigger_at
Definition: longport.h:3377
enum lb_deduction_status_t platform_deducted_status
Definition: longport.h:3433
const struct lb_date_t * expire_date
Definition: longport.h:3369
const char * stock_name
Definition: longport.h:3313
const struct lb_decimal_t * platform_deducted_amount
Definition: longport.h:3437
const struct lb_order_history_detail_t * history
Definition: longport.h:3445
enum lb_deduction_status_t deductions_status
Definition: longport.h:3421
const struct lb_decimal_t * trailing_percent
Definition: longport.h:3385
const struct lb_decimal_t * trigger_price
Definition: longport.h:3353
enum lb_order_tag_t tag
Definition: longport.h:3361
enum lb_time_in_force_type_t time_in_force
Definition: longport.h:3365
const char * remark
Definition: longport.h:3405
enum lb_order_type_t order_type
Definition: longport.h:3345
uintptr_t num_history
Definition: longport.h:3449
const char * free_currency
Definition: longport.h:3417
const char * deductions_currency
Definition: longport.h:3429
const struct lb_decimal_t * limit_offset
Definition: longport.h:3389
const char * platform_deducted_currency
Definition: longport.h:3441
const char * symbol
Definition: longport.h:3341
const char * currency
Definition: longport.h:3397
const struct lb_decimal_t * trailing_amount
Definition: longport.h:3381
const struct lb_decimal_t * executed_price
Definition: longport.h:3329
struct lb_order_charge_detail_t charge_detail
Definition: longport.h:3453
int64_t submitted_at
Definition: longport.h:3333
enum lb_order_status_t status
Definition: longport.h:3309
const struct lb_decimal_t * last_done
Definition: longport.h:3349
const struct lb_decimal_t * free_amount
Definition: longport.h:3413
const char * order_id
Definition: longport.h:3305
Definition: longport.h:3224
const struct lb_decimal_t * quantity
Definition: longport.h:3226
const char * msg
Definition: longport.h:3228
const struct lb_decimal_t * price
Definition: longport.h:3225
int64_t time
Definition: longport.h:3229
enum lb_order_status_t status
Definition: longport.h:3227
Definition: longport.h:2761
enum lb_outside_rth_t * outside_rth
Definition: longport.h:2861
const struct lb_decimal_t * executed_quantity
Definition: longport.h:2781
const struct lb_decimal_t * quantity
Definition: longport.h:2777
enum lb_order_side_t side
Definition: longport.h:2797
const char * msg
Definition: longport.h:2817
const struct lb_decimal_t * price
Definition: longport.h:2785
const int64_t * updated_at
Definition: longport.h:2833
enum lb_trigger_status_t * trigger_status
Definition: longport.h:2853
const int64_t * trigger_at
Definition: longport.h:2837
const struct lb_date_t * expire_date
Definition: longport.h:2829
const char * stock_name
Definition: longport.h:2773
const struct lb_decimal_t * trailing_percent
Definition: longport.h:2845
const struct lb_decimal_t * trigger_price
Definition: longport.h:2813
enum lb_order_tag_t tag
Definition: longport.h:2821
enum lb_time_in_force_type_t time_in_force
Definition: longport.h:2825
const char * remark
Definition: longport.h:2865
enum lb_order_type_t order_type
Definition: longport.h:2805
const struct lb_decimal_t * limit_offset
Definition: longport.h:2849
const char * symbol
Definition: longport.h:2801
const char * currency
Definition: longport.h:2857
const struct lb_decimal_t * trailing_amount
Definition: longport.h:2841
const struct lb_decimal_t * executed_price
Definition: longport.h:2789
int64_t submitted_at
Definition: longport.h:2793
enum lb_order_status_t status
Definition: longport.h:2769
const struct lb_decimal_t * last_done
Definition: longport.h:2809
const char * order_id
Definition: longport.h:2765
Definition: longport.h:2485
uintptr_t num_broker_ids
Definition: longport.h:2493
const int32_t * broker_ids
Definition: longport.h:2489
const char * name_cn
Definition: longport.h:2497
const char * name_en
Definition: longport.h:2501
const char * name_hk
Definition: longport.h:2505
Definition: longport.h:2169
const struct lb_decimal_t * turnover
Definition: longport.h:2185
const struct lb_decimal_t * prev_close
Definition: longport.h:2197
const struct lb_decimal_t * high
Definition: longport.h:2189
const struct lb_decimal_t * low
Definition: longport.h:2193
int64_t timestamp
Definition: longport.h:2177
int64_t volume
Definition: longport.h:2181
const struct lb_decimal_t * last_done
Definition: longport.h:2173
Definition: longport.h:1454
uintptr_t num_ask_brokers
Definition: longport.h:1466
const struct lb_brokers_t * bid_brokers
Definition: longport.h:1470
uintptr_t num_bid_brokers
Definition: longport.h:1474
const struct lb_brokers_t * ask_brokers
Definition: longport.h:1462
const char * symbol
Definition: longport.h:1458
Definition: longport.h:1605
bool is_confirmed
Definition: longport.h:1621
enum lb_period_t period
Definition: longport.h:1613
const char * symbol
Definition: longport.h:1609
struct lb_candlestick_t candlestick
Definition: longport.h:1617
Definition: longport.h:1406
uintptr_t num_bids
Definition: longport.h:1426
const struct lb_depth_t * asks
Definition: longport.h:1414
const struct lb_depth_t * bids
Definition: longport.h:1422
const char * symbol
Definition: longport.h:1410
uintptr_t num_asks
Definition: longport.h:1418
Definition: longport.h:1696
const char * account_no
Definition: longport.h:1784
const struct lb_decimal_t * executed_quantity
Definition: longport.h:1724
enum lb_order_side_t side
Definition: longport.h:1700
const char * msg
Definition: longport.h:1756
enum lb_trigger_status_t * trigger_status
Definition: longport.h:1764
const int64_t * trigger_at
Definition: longport.h:1768
const char * stock_name
Definition: longport.h:1704
const struct lb_decimal_t * trailing_percent
Definition: longport.h:1776
const struct lb_decimal_t * trigger_price
Definition: longport.h:1752
enum lb_order_tag_t tag
Definition: longport.h:1760
int64_t updated_at
Definition: longport.h:1748
const char * remark
Definition: longport.h:1796
enum lb_order_type_t order_type
Definition: longport.h:1716
const struct lb_decimal_t * limit_offset
Definition: longport.h:1780
const struct lb_decimal_t * submitted_quantity
Definition: longport.h:1708
const char * symbol
Definition: longport.h:1712
const char * currency
Definition: longport.h:1736
const struct lb_decimal_t * trailing_amount
Definition: longport.h:1772
const struct lb_decimal_t * executed_price
Definition: longport.h:1728
int64_t submitted_at
Definition: longport.h:1744
const struct lb_decimal_t * last_price
Definition: longport.h:1792
enum lb_order_status_t status
Definition: longport.h:1740
const struct lb_decimal_t * last_share
Definition: longport.h:1788
const struct lb_decimal_t * submitted_price
Definition: longport.h:1720
const char * order_id
Definition: longport.h:1732
Definition: longport.h:1326
const struct lb_decimal_t * turnover
Definition: longport.h:1358
const struct lb_decimal_t * open
Definition: longport.h:1338
enum lb_trade_session_t trade_session
Definition: longport.h:1366
const struct lb_decimal_t * high
Definition: longport.h:1342
const struct lb_decimal_t * low
Definition: longport.h:1346
int64_t timestamp
Definition: longport.h:1350
int64_t current_volume
Definition: longport.h:1370
int64_t volume
Definition: longport.h:1354
const char * symbol
Definition: longport.h:1330
enum lb_trade_status_t trade_status
Definition: longport.h:1362
const struct lb_decimal_t * current_turnover
Definition: longport.h:1374
const struct lb_decimal_t * last_done
Definition: longport.h:1334
Definition: longport.h:1545
uintptr_t num_trades
Definition: longport.h:1557
const struct lb_trade_t * trades
Definition: longport.h:1553
const char * symbol
Definition: longport.h:1549
Definition: longport.h:3749
const char * description
Definition: longport.h:3761
const char * name
Definition: longport.h:3757
int64_t end_at
Definition: longport.h:3769
int64_t start_at
Definition: longport.h:3765
const char * key
Definition: longport.h:3753
Definition: longport.h:2689
const struct lb_decimal_t * turnover
Definition: longport.h:2721
const struct lb_decimal_t * open
Definition: longport.h:2701
const struct lb_decimal_t * high
Definition: longport.h:2705
const struct lb_decimal_t * low
Definition: longport.h:2709
int64_t timestamp
Definition: longport.h:2713
int64_t volume
Definition: longport.h:2717
const char * symbol
Definition: longport.h:2693
enum lb_trade_status_t trade_status
Definition: longport.h:2725
const struct lb_decimal_t * last_done
Definition: longport.h:2697
Definition: longport.h:1902
const struct lb_decimal_t * quantity
Definition: longport.h:1910
const struct lb_decimal_t * price
Definition: longport.h:1914
const struct lb_decimal_t * trailing_percent
Definition: longport.h:1930
const struct lb_decimal_t * trigger_price
Definition: longport.h:1918
const char * remark
Definition: longport.h:1934
const struct lb_decimal_t * limit_offset
Definition: longport.h:1922
const struct lb_decimal_t * trailing_amount
Definition: longport.h:1926
const char * order_id
Definition: longport.h:1906
Definition: longport.h:2463
uintptr_t num_ask_brokers
Definition: longport.h:2471
const struct lb_brokers_t * bid_brokers
Definition: longport.h:2475
uintptr_t num_bid_brokers
Definition: longport.h:2479
const struct lb_brokers_t * ask_brokers
Definition: longport.h:2467
Definition: longport.h:3473
const struct lb_decimal_t * change_value
Definition: longport.h:3485
const struct lb_decimal_t * to_call_price
Definition: longport.h:3597
const struct lb_decimal_t * turnover
Definition: longport.h:3497
const struct lb_decimal_t * change_rate
Definition: longport.h:3489
const struct lb_decimal_t * five_day_change_rate
Definition: longport.h:3537
const struct lb_decimal_t * gamma
Definition: longport.h:3625
const struct lb_decimal_t * balance_point
Definition: longport.h:3613
const struct lb_decimal_t * leverage_ratio
Definition: longport.h:3605
const struct lb_decimal_t * delta
Definition: longport.h:3621
const struct lb_decimal_t * conversion_ratio
Definition: longport.h:3609
const int64_t * outstanding_qty
Definition: longport.h:3569
const struct lb_decimal_t * ytd_change_rate
Definition: longport.h:3501
const struct lb_decimal_t * premium
Definition: longport.h:3577
const struct lb_decimal_t * rho
Definition: longport.h:3637
const struct lb_decimal_t * itm_otm
Definition: longport.h:3581
const struct lb_date_t * expiry_date
Definition: longport.h:3553
const struct lb_decimal_t * vega
Definition: longport.h:3633
const struct lb_decimal_t * volume_ratio
Definition: longport.h:3521
const struct lb_decimal_t * half_year_change_rate
Definition: longport.h:3545
const struct lb_decimal_t * five_minutes_change_rate
Definition: longport.h:3549
const struct lb_decimal_t * pb_ratio
Definition: longport.h:3529
const struct lb_decimal_t * implied_volatility
Definition: longport.h:3585
const struct lb_decimal_t * pe_ttm_ratio
Definition: longport.h:3525
const struct lb_decimal_t * strike_price
Definition: longport.h:3557
const struct lb_decimal_t * upper_strike_price
Definition: longport.h:3561
const struct lb_decimal_t * dividend_ratio_ttm
Definition: longport.h:3533
const struct lb_decimal_t * effective_leverage
Definition: longport.h:3601
const struct lb_decimal_t * lower_strike_price
Definition: longport.h:3565
const struct lb_decimal_t * warrant_delta
Definition: longport.h:3589
const struct lb_decimal_t * capital_flow
Definition: longport.h:3513
const char * symbol
Definition: longport.h:3477
const struct lb_decimal_t * amplitude
Definition: longport.h:3517
const int64_t * volume
Definition: longport.h:3493
const struct lb_decimal_t * theta
Definition: longport.h:3629
const struct lb_decimal_t * total_market_value
Definition: longport.h:3509
const int64_t * open_interest
Definition: longport.h:3617
const struct lb_decimal_t * last_done
Definition: longport.h:3481
const struct lb_decimal_t * outstanding_ratio
Definition: longport.h:3573
const struct lb_decimal_t * call_price
Definition: longport.h:3593
const struct lb_decimal_t * turnover_rate
Definition: longport.h:3505
const struct lb_decimal_t * ten_day_change_rate
Definition: longport.h:3541
Definition: longport.h:2441
uintptr_t num_bids
Definition: longport.h:2457
const struct lb_depth_t * asks
Definition: longport.h:2445
const struct lb_depth_t * bids
Definition: longport.h:2453
uintptr_t num_asks
Definition: longport.h:2449
Definition: longport.h:2203
const struct lb_decimal_t * turnover
Definition: longport.h:2239
const struct lb_decimal_t * open
Definition: longport.h:2219
const struct lb_decimal_t * prev_close
Definition: longport.h:2215
const struct lb_prepost_quote_t * overnight_quote
Definition: longport.h:2255
const struct lb_decimal_t * high
Definition: longport.h:2223
const struct lb_decimal_t * low
Definition: longport.h:2227
int64_t timestamp
Definition: longport.h:2231
int64_t volume
Definition: longport.h:2235
const char * symbol
Definition: longport.h:2207
enum lb_trade_status_t trade_status
Definition: longport.h:2243
const struct lb_prepost_quote_t * pre_market_quote
Definition: longport.h:2247
const struct lb_prepost_quote_t * post_market_quote
Definition: longport.h:2251
const struct lb_decimal_t * last_done
Definition: longport.h:2211
Definition: longport.h:2099
const struct lb_decimal_t * dividend_yield
Definition: longport.h:2155
int64_t total_shares
Definition: longport.h:2131
int32_t lot_size
Definition: longport.h:2127
const struct lb_decimal_t * eps_ttm
Definition: longport.h:2147
uint8_t stock_derivatives
Definition: longport.h:2159
const struct lb_decimal_t * eps
Definition: longport.h:2143
const struct lb_decimal_t * bps
Definition: longport.h:2151
enum lb_security_board_t board
Definition: longport.h:2163
int64_t hk_shares
Definition: longport.h:2139
int64_t circulating_shares
Definition: longport.h:2135
const char * name_cn
Definition: longport.h:2107
const char * symbol
Definition: longport.h:2103
const char * currency
Definition: longport.h:2123
const char * exchange
Definition: longport.h:2119
const char * name_en
Definition: longport.h:2111
const char * name_hk
Definition: longport.h:2115
Definition: longport.h:2077
const char * name_cn
Definition: longport.h:2085
const char * symbol
Definition: longport.h:2081
const char * name_en
Definition: longport.h:2089
const char * name_hk
Definition: longport.h:2093
Definition: longport.h:3116
const struct lb_stock_position_t * positions
Definition: longport.h:3124
const char * account_channel
Definition: longport.h:3120
uintptr_t num_positions
Definition: longport.h:3128
Definition: longport.h:3134
uintptr_t num_channels
Definition: longport.h:3142
const struct lb_stock_position_channel_t * channels
Definition: longport.h:3138
Definition: longport.h:3077
const struct lb_decimal_t * quantity
Definition: longport.h:3089
const char * symbol_name
Definition: longport.h:3085
const struct lb_decimal_t * init_quantity
Definition: longport.h:3110
const struct lb_decimal_t * available_quantity
Definition: longport.h:3093
const char * symbol
Definition: longport.h:3081
const char * currency
Definition: longport.h:3097
enum lb_market_t market
Definition: longport.h:3106
const struct lb_decimal_t * cost_price
Definition: longport.h:3102
Definition: longport.h:2537
const struct lb_decimal_t * price
Definition: longport.h:2541
const char * call_symbol
Definition: longport.h:2545
const char * put_symbol
Definition: longport.h:2549
bool standard
Definition: longport.h:2553
Definition: longport.h:1940
enum lb_outside_rth_t * outside_rth
Definition: longport.h:1989
enum lb_order_side_t side
Definition: longport.h:1952
const struct lb_date_t * expire_date
Definition: longport.h:1985
const struct lb_decimal_t * trailing_percent
Definition: longport.h:1980
const struct lb_decimal_t * trigger_price
Definition: longport.h:1968
enum lb_time_in_force_type_t time_in_force
Definition: longport.h:1960
const char * remark
Definition: longport.h:1993
enum lb_order_type_t order_type
Definition: longport.h:1948
const struct lb_decimal_t * limit_offset
Definition: longport.h:1972
const struct lb_decimal_t * submitted_quantity
Definition: longport.h:1956
const char * symbol
Definition: longport.h:1944
const struct lb_decimal_t * trailing_amount
Definition: longport.h:1976
const struct lb_decimal_t * submitted_price
Definition: longport.h:1964
Definition: longport.h:3148
const char * order_id
Definition: longport.h:3152
Definition: longport.h:2067
uintptr_t num_candlesticks
Definition: longport.h:2071
uint8_t sub_types
Definition: longport.h:2069
enum lb_period_t * candlesticks
Definition: longport.h:2070
const char * symbol
Definition: longport.h:2068
Definition: longport.h:1634
uint8_t second
Definition: longport.h:1637
uint8_t minute
Definition: longport.h:1636
uint8_t hour
Definition: longport.h:1635
Definition: longport.h:1484
const struct lb_decimal_t * price
Definition: longport.h:1488
enum lb_trade_session_t trade_session
Definition: longport.h:1539
int64_t timestamp
Definition: longport.h:1496
enum lb_trade_direction_t direction
Definition: longport.h:1535
const char * trade_type
Definition: longport.h:1531
int64_t volume
Definition: longport.h:1492
Definition: longport.h:2581
enum lb_trade_session_t trade_session
Definition: longport.h:2593
struct lb_time_t end_time
Definition: longport.h:2589
struct lb_time_t begin_time
Definition: longport.h:2585
Definition: longport.h:1666
uintptr_t num_securities
Definition: longport.h:1686
const char *const * securities
Definition: longport.h:1682
uint32_t flags
Definition: longport.h:1670
const char * name
Definition: longport.h:1678
enum lb_securities_update_mode_t mode
Definition: longport.h:1690
int64_t id
Definition: longport.h:1674
Definition: longport.h:3643
const struct lb_decimal_t * change_value
Definition: longport.h:3667
const struct lb_decimal_t * to_call_price
Definition: longport.h:3723
const struct lb_decimal_t * turnover
Definition: longport.h:3675
const struct lb_decimal_t * change_rate
Definition: longport.h:3663
const struct lb_decimal_t * balance_point
Definition: longport.h:3739
const struct lb_decimal_t * leverage_ratio
Definition: longport.h:3731
struct lb_date_t expiry_date
Definition: longport.h:3679
const struct lb_decimal_t * delta
Definition: longport.h:3715
const struct lb_decimal_t * conversion_ratio
Definition: longport.h:3735
const struct lb_decimal_t * premium
Definition: longport.h:3703
enum lb_warrant_status_t status
Definition: longport.h:3743
const struct lb_decimal_t * itm_otm
Definition: longport.h:3707
const struct lb_decimal_t * implied_volatility
Definition: longport.h:3711
const char * name
Definition: longport.h:3655
const struct lb_decimal_t * strike_price
Definition: longport.h:3683
const struct lb_decimal_t * upper_strike_price
Definition: longport.h:3687
enum lb_warrant_type_t warrant_type
Definition: longport.h:3651
const struct lb_decimal_t * effective_leverage
Definition: longport.h:3727
const struct lb_decimal_t * lower_strike_price
Definition: longport.h:3691
int64_t volume
Definition: longport.h:3671
const char * symbol
Definition: longport.h:3647
int64_t outstanding_qty
Definition: longport.h:3695
const struct lb_decimal_t * last_done
Definition: longport.h:3659
const struct lb_decimal_t * outstanding_ratio
Definition: longport.h:3699
const struct lb_decimal_t * call_price
Definition: longport.h:3719
Definition: longport.h:2347
const struct lb_decimal_t * turnover
Definition: longport.h:2383
const struct lb_decimal_t * open
Definition: longport.h:2363
const struct lb_decimal_t * prev_close
Definition: longport.h:2359
struct lb_date_t expiry_date
Definition: longport.h:2395
const struct lb_decimal_t * conversion_ratio
Definition: longport.h:2411
const struct lb_decimal_t * high
Definition: longport.h:2367
const char * underlying_symbol
Definition: longport.h:2435
const struct lb_decimal_t * low
Definition: longport.h:2371
enum lb_warrant_type_t category
Definition: longport.h:2415
const struct lb_decimal_t * implied_volatility
Definition: longport.h:2391
int64_t timestamp
Definition: longport.h:2375
struct lb_date_t last_trade_date
Definition: longport.h:2399
const struct lb_decimal_t * strike_price
Definition: longport.h:2419
const struct lb_decimal_t * upper_strike_price
Definition: longport.h:2423
const struct lb_decimal_t * lower_strike_price
Definition: longport.h:2427
int64_t volume
Definition: longport.h:2379
const char * symbol
Definition: longport.h:2351
enum lb_trade_status_t trade_status
Definition: longport.h:2387
int64_t outstanding_quantity
Definition: longport.h:2407
const struct lb_decimal_t * last_done
Definition: longport.h:2355
const struct lb_decimal_t * outstanding_ratio
Definition: longport.h:2403
const struct lb_decimal_t * call_price
Definition: longport.h:2431
Definition: longport.h:3184
uintptr_t num_securities
Definition: longport.h:3200
const char * name
Definition: longport.h:3192
int64_t id
Definition: longport.h:3188
const struct lb_watchlist_security_t * securities
Definition: longport.h:3196
Definition: longport.h:3158
int64_t watched_at
Definition: longport.h:3178
const char * name
Definition: longport.h:3170
const char * symbol
Definition: longport.h:3162
const struct lb_decimal_t * watched_price
Definition: longport.h:3174
enum lb_market_t market
Definition: longport.h:3166