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_language_t {
66 
80 
84 typedef enum lb_error_kind_t {
98 
102 typedef enum lb_trade_status_t {
148 
152 typedef enum lb_trade_session_t {
170 
174 typedef enum lb_trade_direction_t {
188 
192 typedef enum lb_period_t {
270 
274 typedef enum lb_trade_sessions_t {
284 
288 typedef enum lb_adjust_type_t {
298 
302 typedef enum lb_warrant_sort_by_t {
392 
396 typedef enum lb_sort_order_type_t {
406 
410 typedef enum lb_warrant_type_t {
436 
458 
472 
476 typedef enum lb_warrant_status_t {
490 
494 typedef enum lb_market_t {
520 
524 typedef enum lb_calc_index_t {
686 
704 
714 
718 typedef enum lb_order_side_t {
732 
736 typedef enum lb_order_type_t {
794 
798 typedef enum lb_order_status_t {
872 
876 typedef enum lb_order_tag_t {
918 
922 typedef enum lb_trigger_status_t {
940 
944 typedef enum lb_topic_type_t {
950 
972 
976 typedef enum lb_outside_rth_t {
994 
998 typedef enum lb_balance_type_t {
1016 
1020 typedef enum lb_security_board_t {
1130 
1134 typedef enum lb_option_type_t {
1148 
1166 
1184 
1210 
1236 
1254 
1258 typedef enum lb_granularity_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  lb_async_callback_t callback,
4002  void *userdata);
4003 
4008  const char *const *symbols,
4009  uintptr_t num_symbols,
4010  uint8_t sub_types,
4011  lb_async_callback_t callback,
4012  void *userdata);
4013 
4018  const char *symbol,
4019  enum lb_period_t period,
4020  enum lb_trade_sessions_t trade_sessions,
4021  lb_async_callback_t callback,
4022  void *userdata);
4023 
4028  const char *symbol,
4029  enum lb_period_t period,
4030  lb_async_callback_t callback,
4031  void *userdata);
4032 
4037  lb_async_callback_t callback,
4038  void *userdata);
4039 
4044  const char *const *symbols,
4045  uintptr_t num_symbols,
4046  lb_async_callback_t callback,
4047  void *userdata);
4048 
4053  const char *const *symbols,
4054  uintptr_t num_symbols,
4055  lb_async_callback_t callback,
4056  void *userdata);
4057 
4062  const char *const *symbols,
4063  uintptr_t num_symbols,
4064  lb_async_callback_t callback,
4065  void *userdata);
4066 
4071  const char *const *symbols,
4072  uintptr_t num_symbols,
4073  lb_async_callback_t callback,
4074  void *userdata);
4075 
4080  const char *symbol,
4081  lb_async_callback_t callback,
4082  void *userdata);
4083 
4088  const char *symbol,
4089  lb_async_callback_t callback,
4090  void *userdata);
4091 
4096  lb_async_callback_t callback,
4097  void *userdata);
4098 
4103  const char *symbol,
4104  uintptr_t count,
4105  lb_async_callback_t callback,
4106  void *userdata);
4107 
4112  const char *symbol,
4113  enum lb_trade_sessions_t trade_sessions,
4114  lb_async_callback_t callback,
4115  void *userdata);
4116 
4121  const char *symbol,
4122  enum lb_period_t period,
4123  uintptr_t count,
4124  enum lb_adjust_type_t adjust_type,
4125  enum lb_trade_sessions_t trade_sessions,
4126  lb_async_callback_t callback,
4127  void *userdata);
4128 
4133  const char *symbol,
4134  enum lb_period_t period,
4135  enum lb_adjust_type_t adjust_type,
4136  bool forward,
4137  const struct lb_datetime_t *time,
4138  uintptr_t count,
4139  enum lb_trade_sessions_t trade_sessions,
4140  lb_async_callback_t callback,
4141  void *userdata);
4142 
4147  const char *symbol,
4148  enum lb_period_t period,
4149  enum lb_adjust_type_t adjust_type,
4150  const struct lb_date_t *start,
4151  const struct lb_date_t *end,
4152  enum lb_trade_sessions_t trade_sessions,
4153  lb_async_callback_t callback,
4154  void *userdata);
4155 
4160  const char *symbol,
4161  lb_async_callback_t callback,
4162  void *userdata);
4163 
4168  const char *symbol,
4169  const struct lb_date_t *expiry_date,
4170  lb_async_callback_t callback,
4171  void *userdata);
4172 
4177  lb_async_callback_t callback,
4178  void *userdata);
4179 
4184  const char *symbol,
4185  enum lb_warrant_sort_by_t sort_by,
4186  enum lb_sort_order_type_t sort_order,
4187  const enum lb_warrant_type_t *warrant_type,
4188  uintptr_t num_warrant_type,
4189  const int32_t *issuer,
4190  uintptr_t num_issuer,
4191  const enum lb_filter_warrant_expiry_date_t *expiry_date,
4192  uintptr_t num_expiry_date,
4193  const enum lb_filter_warrant_in_out_bounds_type_t *price_type,
4194  uintptr_t num_price_type,
4195  const enum lb_warrant_status_t *status,
4196  uintptr_t num_status,
4197  lb_async_callback_t callback,
4198  void *userdata);
4199 
4204  lb_async_callback_t callback,
4205  void *userdata);
4206 
4211  enum lb_market_t market,
4212  const struct lb_date_t *begin,
4213  const struct lb_date_t *end,
4214  lb_async_callback_t callback,
4215  void *userdata);
4216 
4221  const char *symbol,
4222  lb_async_callback_t callback,
4223  void *userdata);
4224 
4229  const char *symbol,
4230  lb_async_callback_t callback,
4231  void *userdata);
4232 
4237  const char *const *symbols,
4238  uintptr_t num_symbols,
4239  const enum lb_calc_index_t *indexes,
4240  uintptr_t num_indexes,
4241  lb_async_callback_t callback,
4242  void *userdata);
4243 
4248  lb_async_callback_t callback,
4249  void *userdata);
4250 
4255  const struct lb_create_watchlist_group_t *req,
4256  lb_async_callback_t callback,
4257  void *userdata);
4258 
4263  int64_t id,
4264  bool purge,
4265  lb_async_callback_t callback,
4266  void *userdata);
4267 
4272  const struct lb_update_watchlist_group_t *req,
4273  lb_async_callback_t callback,
4274  void *userdata);
4275 
4283  const char *const *symbols,
4284  uintptr_t num_symbols,
4285  lb_async_callback_t callback,
4286  void *userdata);
4287 
4295  const char *symbol,
4296  lb_async_callback_t callback,
4297  void *userdata);
4298 
4306  const char *symbol,
4307  uintptr_t count,
4308  lb_async_callback_t callback,
4309  void *userdata);
4310 
4318  const char *symbol,
4319  lb_async_callback_t callback,
4320  void *userdata);
4321 
4329  const char *symbol,
4330  enum lb_period_t period,
4331  uintptr_t count,
4332  lb_async_callback_t callback,
4333  void *userdata);
4334 
4339  enum lb_market_t market,
4340  const enum lb_security_list_category_t *category,
4341  lb_async_callback_t callback,
4342  void *userdata);
4343 
4348  enum lb_market_t market,
4349  lb_async_callback_t callback,
4350  void *userdata);
4351 
4356  enum lb_market_t market,
4357  const struct lb_date_t *start,
4358  const struct lb_date_t *end,
4359  lb_async_callback_t callback,
4360  void *userdata);
4361 
4362 void lb_trade_context_new(const struct lb_config_t *config,
4363  lb_async_callback_t callback,
4364  void *userdata);
4365 
4367 
4369 
4370 uintptr_t lb_trade_context_ref_count(const struct lb_trade_context_t *ctx);
4371 
4372 void lb_trade_context_set_userdata(const struct lb_trade_context_t *ctx, void *userdata);
4373 
4375 
4378 
4384  lb_order_changed_callback_t callback,
4385  void *userdata,
4386  lb_free_userdata_func_t free_userdata);
4387 
4389  const enum lb_topic_type_t *topics,
4390  uintptr_t num_topics,
4391  lb_async_callback_t callback,
4392  void *userdata);
4393 
4395  const enum lb_topic_type_t *topics,
4396  uintptr_t num_topics,
4397  lb_async_callback_t callback,
4398  void *userdata);
4399 
4406  const struct lb_get_history_executions_options_t *opts,
4407  lb_async_callback_t callback,
4408  void *userdata);
4409 
4416  const struct lb_get_today_executions_options_t *opts,
4417  lb_async_callback_t callback,
4418  void *userdata);
4419 
4426  const struct lb_get_history_orders_options_t *opts,
4427  lb_async_callback_t callback,
4428  void *userdata);
4429 
4436  const struct lb_get_today_orders_options_t *opts,
4437  lb_async_callback_t callback,
4438  void *userdata);
4439 
4446  const struct lb_replace_order_options_t *opts,
4447  lb_async_callback_t callback,
4448  void *userdata);
4449 
4456  const struct lb_submit_order_options_t *opts,
4457  lb_async_callback_t callback,
4458  void *userdata);
4459 
4464  const char *order_id,
4465  lb_async_callback_t callback,
4466  void *userdata);
4467 
4472  const char *currency,
4473  lb_async_callback_t callback,
4474  void *userdata);
4475 
4482  const struct lb_get_cash_flow_options_t *opts,
4483  lb_async_callback_t callback,
4484  void *userdata);
4485 
4492  const struct lb_get_fund_positions_options_t *opts,
4493  lb_async_callback_t callback,
4494  void *userdata);
4495 
4502  const struct lb_get_stock_positions_options_t *opts,
4503  lb_async_callback_t callback,
4504  void *userdata);
4505 
4510  const char *symbol,
4511  lb_async_callback_t callback,
4512  void *userdata);
4513 
4518  const char *order_id,
4519  lb_async_callback_t callback,
4520  void *userdata);
4521 
4527  lb_async_callback_t callback,
4528  void *userdata);
4529 
4534 struct lb_decimal_t *lb_decimal_new(int64_t num, uint32_t scale);
4535 
4539 struct lb_decimal_t *lb_decimal_clone(const struct lb_decimal_t *value);
4540 
4544 struct lb_decimal_t *lb_decimal_from_str(const char *value);
4545 
4549 struct lb_decimal_t *lb_decimal_from_double(double value);
4550 
4554 void lb_decimal_free(struct lb_decimal_t *value);
4555 
4556 double lb_decimal_to_double(const struct lb_decimal_t *value);
4557 
4561 void lb_decimal_abs(struct lb_decimal_t *value);
4562 
4566 void lb_decimal_ceil(struct lb_decimal_t *value);
4567 
4571 void lb_decimal_floor(struct lb_decimal_t *value);
4572 
4576 void lb_decimal_fract(struct lb_decimal_t *value);
4577 
4581 bool lb_decimal_is_negative(const struct lb_decimal_t *value);
4582 
4586 bool lb_decimal_is_positive(const struct lb_decimal_t *value);
4587 
4591 bool lb_decimal_is_zero(const struct lb_decimal_t *value);
4592 
4596 const struct lb_decimal_t *lb_decimal_max(const struct lb_decimal_t *a,
4597  const struct lb_decimal_t *b);
4598 
4602 const struct lb_decimal_t *lb_decimal_min(const struct lb_decimal_t *a,
4603  const struct lb_decimal_t *b);
4604 
4609 
4615 void lb_decimal_round(struct lb_decimal_t *value);
4616 
4622 void lb_decimal_round_dp(struct lb_decimal_t *value, uint32_t dp);
4623 
4628 void lb_decimal_trunc(struct lb_decimal_t *value);
4629 
4633 void lb_decimal_add(struct lb_decimal_t *a, const struct lb_decimal_t *b);
4634 
4638 void lb_decimal_sub(struct lb_decimal_t *a, const struct lb_decimal_t *b);
4639 
4643 void lb_decimal_mul(struct lb_decimal_t *a, const struct lb_decimal_t *b);
4644 
4648 void lb_decimal_div(struct lb_decimal_t *a, const struct lb_decimal_t *b);
4649 
4653 void lb_decimal_rem(struct lb_decimal_t *a, const struct lb_decimal_t *b);
4654 
4658 void lb_decimal_neg(struct lb_decimal_t *value);
4659 
4664 bool lb_decimal_gt(const struct lb_decimal_t *a, const struct lb_decimal_t *b);
4665 
4670 bool lb_decimal_gte(const struct lb_decimal_t *a, const struct lb_decimal_t *b);
4671 
4676 bool lb_decimal_eq(const struct lb_decimal_t *a, const struct lb_decimal_t *b);
4677 
4682 bool lb_decimal_lt(const struct lb_decimal_t *a, const struct lb_decimal_t *b);
4683 
4688 bool lb_decimal_lte(const struct lb_decimal_t *a, const struct lb_decimal_t *b);
4689 
4701 int32_t lb_decimal_cmp(const struct lb_decimal_t *a, const struct lb_decimal_t *b);
4702 
4706 void lb_decimal_sin(struct lb_decimal_t *value);
4707 
4711 void lb_decimal_cos(struct lb_decimal_t *value);
4712 
4717 void lb_decimal_tan(struct lb_decimal_t *value);
4718 
4722 void lb_decimal_sqrt(struct lb_decimal_t *value);
4723 
4728 void lb_decimal_pow(struct lb_decimal_t *value, const struct lb_decimal_t *exp);
4729 
4734 void lb_decimal_ln(struct lb_decimal_t *value);
4735 
4739 void lb_decimal_log10(struct lb_decimal_t *value);
4740 
4745 void lb_decimal_exp(struct lb_decimal_t *value);
4746 
4754  const struct lb_decimal_t *tolerance);
4755 
4759 void lb_decimal_erf(struct lb_decimal_t *value);
4760 
4765 
4769 void lb_decimal_norm_pdf(struct lb_decimal_t *value);
4770 
4774 const char *lb_decimal_to_string(const struct lb_decimal_t *value);
4775 
4776 #ifdef __cplusplus
4777 } // extern "C"
4778 #endif // __cplusplus
4779 
4780 #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:152
@ TradeSessionPre
Definition: longport.h:160
@ TradeSessionOvernight
Definition: longport.h:168
@ TradeSessionIntraday
Definition: longport.h:156
@ TradeSessionPost
Definition: longport.h:164
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:302
@ WarrantSortByStrikePrice
Definition: longport.h:330
@ WarrantSortByLowerStrikePrice
Definition: longport.h:338
@ WarrantSortByConversionRatio
Definition: longport.h:382
@ WarrantSortByOutstandingQuantity
Definition: longport.h:342
@ WarrantSortByPremium
Definition: longport.h:350
@ WarrantSortByLeverageRatio
Definition: longport.h:378
@ WarrantSortByCallPrice
Definition: longport.h:366
@ WarrantSortByChangeValue
Definition: longport.h:314
@ WarrantSortByBalancePoint
Definition: longport.h:386
@ WarrantSortByImpliedVolatility
Definition: longport.h:358
@ WarrantSortByVolume
Definition: longport.h:318
@ WarrantSortByToCallPrice
Definition: longport.h:370
@ WarrantSortByItmOtm
Definition: longport.h:354
@ WarrantSortByTurnover
Definition: longport.h:322
@ WarrantSortByExpiryDate
Definition: longport.h:326
@ WarrantSortByOutstandingRatio
Definition: longport.h:346
@ WarrantSortByChangeRate
Definition: longport.h:310
@ WarrantSortByEffectiveLeverage
Definition: longport.h:374
@ WarrantSortByUpperStrikePrice
Definition: longport.h:334
@ WarrantSortByStatus
Definition: longport.h:390
@ WarrantSortByDelta
Definition: longport.h:362
@ WarrantSortByLastDone
Definition: longport.h:306
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:396
@ SortOrderDescending
Definition: longport.h:404
@ SortOrderAscending
Definition: longport.h:400
lb_cash_flow_direction_t
Definition: longport.h:1170
@ CashFlowDirectionOut
Definition: longport.h:1178
@ CashFlowDirectionUnknown
Definition: longport.h:1174
@ CashFlowDirectionIn
Definition: longport.h:1182
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:976
@ OutsideRTHOnly
Definition: longport.h:984
@ OutsideRTHOvernight
Definition: longport.h:992
@ OutsideRTHUnknown
Definition: longport.h:980
@ OutsideRTHAnyTime
Definition: longport.h:988
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:1214
@ DeductionStatusNoData
Definition: longport.h:1226
@ DeductionStatusDone
Definition: longport.h:1234
@ DeductionStatusNone
Definition: longport.h:1222
@ DeductionStatusPending
Definition: longport.h:1230
@ DeductionStatusUnknown
Definition: longport.h:1218
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:174
@ TradeDirectionNeutral
Definition: longport.h:178
@ TradeDirectionUp
Definition: longport.h:186
@ TradeDirectionDown
Definition: longport.h:182
lb_period_t
Definition: longport.h:192
@ PeriodQuarter
Definition: longport.h:264
@ PeriodMin120
Definition: longport.h:240
@ PeriodMin15
Definition: longport.h:220
@ PeriodYear
Definition: longport.h:268
@ PeriodMin5
Definition: longport.h:212
@ PeriodMin240
Definition: longport.h:248
@ PeriodMin3
Definition: longport.h:208
@ PeriodMin1
Definition: longport.h:200
@ PeriodMin2
Definition: longport.h:204
@ PeriodMin10
Definition: longport.h:216
@ PeriodMin60
Definition: longport.h:236
@ PeriodMin45
Definition: longport.h:232
@ PeriodDay
Definition: longport.h:252
@ PeriodMin20
Definition: longport.h:224
@ PeriodWeek
Definition: longport.h:256
@ PeriodUnknown
Definition: longport.h:196
@ PeriodMonth
Definition: longport.h:260
@ PeriodMin30
Definition: longport.h:228
@ PeriodMin180
Definition: longport.h:244
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:102
@ TradeStatusCodeMoved
Definition: longport.h:126
@ TradeStatusWarrantPrepareList
Definition: longport.h:142
@ TradeStatusDelisted
Definition: longport.h:114
@ TradeStatusFuse
Definition: longport.h:118
@ TradeStatusNormal
Definition: longport.h:106
@ TradeStatusPrepareList
Definition: longport.h:122
@ TradeStatusSuspendTrade
Definition: longport.h:146
@ TradeStatusHalted
Definition: longport.h:110
@ TradeStatusToBeOpened
Definition: longport.h:130
@ TradeStatusSplitStockHalts
Definition: longport.h:134
@ TradeStatusExpired
Definition: longport.h:138
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:274
@ TradeSessionsAll
Definition: longport.h:282
@ TradeSessionsIntraday
Definition: longport.h:278
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:494
@ MarketCN
Definition: longport.h:510
@ MarketHK
Definition: longport.h:506
@ MarketUnknown
Definition: longport.h:498
@ MarketSG
Definition: longport.h:514
@ MarketUS
Definition: longport.h:502
@ MarketCrypto
Definition: longport.h:518
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:462
@ WarrantInOutBoundsType_Out
Definition: longport.h:470
@ WarrantInOutBoundsType_In
Definition: longport.h:466
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)
void lb_quote_context_subscribe(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)
lb_calc_index_t
Definition: longport.h:524
@ CalcIndexCallPrice
Definition: longport.h:640
@ CalcIndexOutstandingQty
Definition: longport.h:616
@ CalcIndexDividendRatioTtm
Definition: longport.h:580
@ CalcIndexChangeRate
Definition: longport.h:536
@ CalcIndexOutstandingRatio
Definition: longport.h:620
@ CalcIndexLeverageRatio
Definition: longport.h:652
@ CalcIndexCapitalFlow
Definition: longport.h:560
@ CalcIndexDelta
Definition: longport.h:668
@ CalcIndexToCallPrice
Definition: longport.h:644
@ CalcIndexTheta
Definition: longport.h:676
@ CalcIndexChangeValue
Definition: longport.h:532
@ CalcIndexTurnoverRate
Definition: longport.h:552
@ CalcIndexVolume
Definition: longport.h:540
@ CalcIndexYtdChangeRate
Definition: longport.h:548
@ CalcIndexFiveMinutesChangeRate
Definition: longport.h:596
@ CalcIndexUpperStrikePrice
Definition: longport.h:608
@ CalcIndexPbRatio
Definition: longport.h:576
@ CalcIndexWarrantDelta
Definition: longport.h:636
@ CalcIndexOpenInterest
Definition: longport.h:664
@ CalcIndexBalancePoint
Definition: longport.h:660
@ CalcIndexVolumeRatio
Definition: longport.h:568
@ CalcIndexExpiryDate
Definition: longport.h:600
@ CalcIndexPeTtmRatio
Definition: longport.h:572
@ CalcIndexConversionRatio
Definition: longport.h:656
@ CalcIndexGamma
Definition: longport.h:672
@ CalcIndexFiveDayChangeRate
Definition: longport.h:584
@ CalcIndexVega
Definition: longport.h:680
@ CalcIndexPremium
Definition: longport.h:624
@ CalcIndexAmplitude
Definition: longport.h:564
@ CalcIndexItmOtm
Definition: longport.h:628
@ CalcIndexRho
Definition: longport.h:684
@ CalcIndexLastDone
Definition: longport.h:528
@ CalcIndexLowerStrikePrice
Definition: longport.h:612
@ CalcIndexTenDayChangeRate
Definition: longport.h:588
@ CalcIndexTurnover
Definition: longport.h:544
@ CalcIndexEffectiveLeverage
Definition: longport.h:648
@ CalcIndexHalfYearChangeRate
Definition: longport.h:592
@ CalcIndexTotalMarketValue
Definition: longport.h:556
@ CalcIndexStrikePrice
Definition: longport.h:604
@ CalcIndexImpliedVolatility
Definition: longport.h:632
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:690
@ SecuritiesUpdateModeAdd
Definition: longport.h:694
@ SecuritiesUpdateModeReplace
Definition: longport.h:702
@ SecuritiesUpdateModeRemove
Definition: longport.h:698
lb_warrant_status_t
Definition: longport.h:476
@ WarrantStatusPrepareList
Definition: longport.h:484
@ WarrantStatusSuspend
Definition: longport.h:480
@ WarrantStatusNormal
Definition: longport.h:488
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:440
@ WarrantExpiryDate_Between_6_12
Definition: longport.h:452
@ WarrantExpiryDate_LT_3
Definition: longport.h:444
@ WarrantExpiryDate_GT_12
Definition: longport.h:456
@ WarrantExpiryDate_Between_3_6
Definition: longport.h:448
lb_option_type_t
Definition: longport.h:1134
@ OptionTypeEurope
Definition: longport.h:1146
@ OptionTypeUnknown
Definition: longport.h:1138
@ OptionTypeAmerican
Definition: longport.h:1142
struct lb_push_candlestick_t lb_push_candlestick_t
lb_security_list_category_t
Definition: longport.h:708
@ SecurityListCategoryOvernight
Definition: longport.h:712
bool lb_decimal_is_positive(const struct lb_decimal_t *value)
lb_order_type_t
Definition: longport.h:736
@ OrderTypeUnknown
Definition: longport.h:740
@ OrderTypeTSMPCT
Definition: longport.h:788
@ OrderTypeELO
Definition: longport.h:748
@ OrderTypeAO
Definition: longport.h:756
@ OrderTypeMO
Definition: longport.h:752
@ OrderTypeTSMAMT
Definition: longport.h:784
@ OrderTypeSLO
Definition: longport.h:792
@ OrderTypeMIT
Definition: longport.h:772
@ OrderTypeLO
Definition: longport.h:744
@ OrderTypeLIT
Definition: longport.h:768
@ OrderTypeTSLPPCT
Definition: longport.h:780
@ OrderTypeODD
Definition: longport.h:764
@ OrderTypeALO
Definition: longport.h:760
@ OrderTypeTSLPAMT
Definition: longport.h:776
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:922
@ TriggerStatusUnknown
Definition: longport.h:926
@ TriggerStatusReleased
Definition: longport.h:938
@ TriggerStatusDeactive
Definition: longport.h:930
@ TriggerStatusActive
Definition: longport.h:934
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:84
@ ErrorKindHttp
Definition: longport.h:88
@ ErrorKindOpenApi
Definition: longport.h:92
@ ErrorKindOther
Definition: longport.h:96
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:1240
@ ChargeCategoryCodeThird
Definition: longport.h:1252
@ ChargeCategoryCodeBroker
Definition: longport.h:1248
@ ChargeCategoryCodeUnknown
Definition: longport.h:1244
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:70
@ PushCandlestickMode_Realtime
Definition: longport.h:74
@ PushCandlestickMode_Confirmed
Definition: longport.h:78
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:1020
@ SecurityBoardVIXIndex
Definition: longport.h:1128
@ SecurityBoardHKEquity
Definition: longport.h:1056
@ SecurityBoardUSOptionS
Definition: longport.h:1052
@ SecurityBoardSHMainConnect
Definition: longport.h:1076
@ SecurityBoardSZMainNonConnect
Definition: longport.h:1100
@ SecurityBoardSZGEMConnect
Definition: longport.h:1104
@ SecurityBoardSTI
Definition: longport.h:1116
@ SecurityBoardUSNSDQ
Definition: longport.h:1040
@ SecurityBoardSGMain
Definition: longport.h:1112
@ SecurityBoardUSOption
Definition: longport.h:1048
@ SecurityBoardSZMainConnect
Definition: longport.h:1096
@ SecurityBoardSZGEMNonConnect
Definition: longport.h:1108
@ SecurityBoardHKSector
Definition: longport.h:1072
@ SecurityBoardUSSector
Definition: longport.h:1044
@ SecurityBoardHKPreIPO
Definition: longport.h:1060
@ SecurityBoardCNIX
Definition: longport.h:1088
@ SecurityBoardSPXIndex
Definition: longport.h:1124
@ SecurityBoardUnknown
Definition: longport.h:1024
@ SecurityBoardUSDJI
Definition: longport.h:1036
@ SecurityBoardHKHS
Definition: longport.h:1068
@ SecurityBoardCNSector
Definition: longport.h:1092
@ SecurityBoardUSMain
Definition: longport.h:1028
@ SecurityBoardUSPink
Definition: longport.h:1032
@ SecurityBoardSHSTAR
Definition: longport.h:1084
@ SecurityBoardSGSector
Definition: longport.h:1120
@ SecurityBoardSHMainNonConnect
Definition: longport.h:1080
@ SecurityBoardHKWarrant
Definition: longport.h:1064
struct lb_submit_order_response_t lb_submit_order_response_t
lb_time_in_force_type_t
Definition: longport.h:954
@ TimeInForceUnknown
Definition: longport.h:958
@ TimeInForceGoodTilCanceled
Definition: longport.h:966
@ TimeInForceGoodTilDate
Definition: longport.h:970
@ TimeInForceDay
Definition: longport.h:962
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:718
@ OrderSideSell
Definition: longport.h:730
@ OrderSideBuy
Definition: longport.h:726
@ OrderSideUnknown
Definition: longport.h:722
const char * lb_http_result_response_body(const struct lb_http_result_t *http_result)
lb_commission_free_status_t
Definition: longport.h:1188
@ CommissionFreeStatusCalculated
Definition: longport.h:1200
@ CommissionFreeStatusUnknown
Definition: longport.h:1192
@ CommissionFreeStatusPending
Definition: longport.h:1204
@ CommissionFreeStatusReady
Definition: longport.h:1208
@ CommissionFreeStatusNone
Definition: longport.h:1196
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:998
@ BalanceTypeCash
Definition: longport.h:1006
@ BalanceTypeUnknown
Definition: longport.h:1002
@ BalanceTypeStock
Definition: longport.h:1010
@ BalanceTypeFund
Definition: longport.h:1014
struct lb_candlestick_t lb_candlestick_t
lb_warrant_type_t
Definition: longport.h:410
@ WarrantTypeBear
Definition: longport.h:430
@ WarrantTypeInline
Definition: longport.h:434
@ WarrantTypeBull
Definition: longport.h:426
@ WarrantTypeUnknown
Definition: longport.h:414
@ WarrantTypeCall
Definition: longport.h:422
@ WarrantTypePut
Definition: longport.h:418
struct lb_get_cash_flow_options_t lb_get_cash_flow_options_t
lb_topic_type_t
Definition: longport.h:944
@ TopicPrivate
Definition: longport.h:948
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:1258
@ GranularityDaily
Definition: longport.h:1266
@ GranularityWeekly
Definition: longport.h:1270
@ GranularityMonthly
Definition: longport.h:1274
@ GranularityUnknown
Definition: longport.h:1262
struct lb_prepost_quote_t lb_prepost_quote_t
lb_adjust_type_t
Definition: longport.h:288
@ AdjustTypeNoAdjust
Definition: longport.h:292
@ AdjustTypeForward
Definition: longport.h:296
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:52
@ Language_ZH_HK
Definition: longport.h:60
@ Language_ZH_CN
Definition: longport.h:56
@ Language_EN
Definition: longport.h:64
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)
lb_order_status_t
Definition: longport.h:798
@ OrderStatusExpired
Definition: longport.h:866
@ OrderStatusProtectedNotReported
Definition: longport.h:814
@ OrderStatusPendingCancel
Definition: longport.h:854
@ OrderStatusPartialWithdrawal
Definition: longport.h:870
@ OrderStatusReplacedNotReported
Definition: longport.h:810
@ OrderStatusWaitToCancel
Definition: longport.h:850
@ OrderStatusFilled
Definition: longport.h:822
@ OrderStatusCanceled
Definition: longport.h:862
@ OrderStatusPendingReplace
Definition: longport.h:838
@ OrderStatusRejected
Definition: longport.h:858
@ OrderStatusPartialFilled
Definition: longport.h:846
@ OrderStatusWaitToNew
Definition: longport.h:826
@ OrderStatusNew
Definition: longport.h:830
@ OrderStatusVarietiesNotReported
Definition: longport.h:818
@ OrderStatusUnknown
Definition: longport.h:802
@ OrderStatusWaitToReplace
Definition: longport.h:834
@ OrderStatusNotReported
Definition: longport.h:806
@ OrderStatusReplaced
Definition: longport.h:842
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:876
@ OrderTagNonExercise
Definition: longport.h:912
@ OrderTagOffline
Definition: longport.h:900
@ OrderTagDebtor
Definition: longport.h:908
@ OrderTagCreditor
Definition: longport.h:904
@ OrderTagUnknown
Definition: longport.h:880
@ OrderTagAllocatedSub
Definition: longport.h:916
@ OrderTagMarginCall
Definition: longport.h:896
@ OrderTagLongTerm
Definition: longport.h:888
@ OrderTagGrey
Definition: longport.h:892
@ OrderTagNormal
Definition: longport.h:884
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:1152
@ OptionDirectionPut
Definition: longport.h:1160
@ OptionDirectionUnknown
Definition: longport.h:1156
@ OptionDirectionCall
Definition: longport.h:1164
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