@grvt/client 1.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +0 -0
- package/MDG/index.d.ts +53 -0
- package/MDG/index.js +106 -0
- package/README.md +62 -0
- package/TDG/index.d.ts +118 -0
- package/TDG/index.js +253 -0
- package/index.d.ts +10 -0
- package/index.js +25 -0
- package/interfaces/codegen/data.interface.d.ts +1581 -0
- package/interfaces/codegen/data.interface.js +403 -0
- package/interfaces/codegen/enum-int.d.ts +23 -0
- package/interfaces/codegen/enum-int.js +207 -0
- package/interfaces/codegen/hex-string-map.d.ts +1 -0
- package/interfaces/codegen/hex-string-map.js +28 -0
- package/interfaces/codegen/index.d.ts +5 -0
- package/interfaces/codegen/index.js +21 -0
- package/interfaces/codegen/schema-maps/ack.d.ts +2 -0
- package/interfaces/codegen/schema-maps/ack.js +12 -0
- package/interfaces/codegen/schema-maps/ack_response.d.ts +2 -0
- package/interfaces/codegen/schema-maps/ack_response.js +13 -0
- package/interfaces/codegen/schema-maps/aggregated_account_summary.d.ts +2 -0
- package/interfaces/codegen/schema-maps/aggregated_account_summary.js +17 -0
- package/interfaces/codegen/schema-maps/api_aggregated_account_summary_response.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_aggregated_account_summary_response.js +13 -0
- package/interfaces/codegen/schema-maps/api_cancel_all_orders_request.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_cancel_all_orders_request.js +18 -0
- package/interfaces/codegen/schema-maps/api_cancel_all_orders_response.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_cancel_all_orders_response.js +12 -0
- package/interfaces/codegen/schema-maps/api_cancel_on_disconnect_request.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_cancel_on_disconnect_request.js +14 -0
- package/interfaces/codegen/schema-maps/api_cancel_order_request.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_cancel_order_request.js +18 -0
- package/interfaces/codegen/schema-maps/api_cancel_order_response.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_cancel_order_response.js +13 -0
- package/interfaces/codegen/schema-maps/api_candlestick_request.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_candlestick_request.js +24 -0
- package/interfaces/codegen/schema-maps/api_candlestick_response.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_candlestick_response.js +15 -0
- package/interfaces/codegen/schema-maps/api_category_affinity_score_request.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_category_affinity_score_request.js +14 -0
- package/interfaces/codegen/schema-maps/api_category_affinity_score_response.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_category_affinity_score_response.js +13 -0
- package/interfaces/codegen/schema-maps/api_create_bulk_orders_request.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_create_bulk_orders_request.js +13 -0
- package/interfaces/codegen/schema-maps/api_create_bulk_orders_response.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_create_bulk_orders_response.js +13 -0
- package/interfaces/codegen/schema-maps/api_create_order_request.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_create_order_request.js +13 -0
- package/interfaces/codegen/schema-maps/api_create_order_response.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_create_order_response.js +13 -0
- package/interfaces/codegen/schema-maps/api_dedust_position_request.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_dedust_position_request.js +13 -0
- package/interfaces/codegen/schema-maps/api_dedust_position_response.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_dedust_position_response.js +13 -0
- package/interfaces/codegen/schema-maps/api_deposit_history_request.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_deposit_history_request.js +22 -0
- package/interfaces/codegen/schema-maps/api_deposit_history_response.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_deposit_history_response.js +15 -0
- package/interfaces/codegen/schema-maps/api_drop_client_ws_request.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_drop_client_ws_request.js +12 -0
- package/interfaces/codegen/schema-maps/api_drop_client_ws_response.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_drop_client_ws_response.js +12 -0
- package/interfaces/codegen/schema-maps/api_fill_history_request.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_fill_history_request.js +26 -0
- package/interfaces/codegen/schema-maps/api_fill_history_response.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_fill_history_response.js +15 -0
- package/interfaces/codegen/schema-maps/api_find_ecosystem_epoch_metric_response.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_find_ecosystem_epoch_metric_response.js +23 -0
- package/interfaces/codegen/schema-maps/api_find_ecosystem_leaderboard_response.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_find_ecosystem_leaderboard_response.js +13 -0
- package/interfaces/codegen/schema-maps/api_find_first_epoch_metric_response.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_find_first_epoch_metric_response.js +23 -0
- package/interfaces/codegen/schema-maps/api_find_trader_epoch_metric_response.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_find_trader_epoch_metric_response.js +19 -0
- package/interfaces/codegen/schema-maps/api_find_trader_leaderboard_response.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_find_trader_leaderboard_response.js +13 -0
- package/interfaces/codegen/schema-maps/api_funding_account_summary_response.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_funding_account_summary_response.js +13 -0
- package/interfaces/codegen/schema-maps/api_funding_payment_history_request.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_funding_payment_history_request.js +22 -0
- package/interfaces/codegen/schema-maps/api_funding_payment_history_response.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_funding_payment_history_response.js +15 -0
- package/interfaces/codegen/schema-maps/api_funding_rate_request.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_funding_rate_request.js +20 -0
- package/interfaces/codegen/schema-maps/api_funding_rate_response.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_funding_rate_response.js +15 -0
- package/interfaces/codegen/schema-maps/api_get_all_initial_leverage_request.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_get_all_initial_leverage_request.js +12 -0
- package/interfaces/codegen/schema-maps/api_get_all_initial_leverage_response.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_get_all_initial_leverage_response.js +13 -0
- package/interfaces/codegen/schema-maps/api_get_all_instruments_request.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_get_all_instruments_request.js +12 -0
- package/interfaces/codegen/schema-maps/api_get_all_instruments_response.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_get_all_instruments_response.js +13 -0
- package/interfaces/codegen/schema-maps/api_get_ecosystem_leaderboard_request.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_get_ecosystem_leaderboard_request.js +14 -0
- package/interfaces/codegen/schema-maps/api_get_ecosystem_leaderboard_response.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_get_ecosystem_leaderboard_response.js +13 -0
- package/interfaces/codegen/schema-maps/api_get_ecosystem_referral_stat_response.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_get_ecosystem_referral_stat_response.js +18 -0
- package/interfaces/codegen/schema-maps/api_get_filtered_instruments_request.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_get_filtered_instruments_request.js +20 -0
- package/interfaces/codegen/schema-maps/api_get_filtered_instruments_response.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_get_filtered_instruments_response.js +13 -0
- package/interfaces/codegen/schema-maps/api_get_instrument_request.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_get_instrument_request.js +12 -0
- package/interfaces/codegen/schema-maps/api_get_instrument_response.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_get_instrument_response.js +13 -0
- package/interfaces/codegen/schema-maps/api_get_latest_lp_snapshot_request.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_get_latest_lp_snapshot_request.js +14 -0
- package/interfaces/codegen/schema-maps/api_get_latest_lp_snapshot_response.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_get_latest_lp_snapshot_response.js +13 -0
- package/interfaces/codegen/schema-maps/api_get_list_epoch_badge_response.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_get_list_epoch_badge_response.js +13 -0
- package/interfaces/codegen/schema-maps/api_get_list_flat_referral_request.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_get_list_flat_referral_request.js +18 -0
- package/interfaces/codegen/schema-maps/api_get_list_flat_referral_response.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_get_list_flat_referral_response.js +13 -0
- package/interfaces/codegen/schema-maps/api_get_list_reward_epoch_response.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_get_list_reward_epoch_response.js +15 -0
- package/interfaces/codegen/schema-maps/api_get_lp_info_request.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_get_lp_info_request.js +14 -0
- package/interfaces/codegen/schema-maps/api_get_lp_info_response.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_get_lp_info_response.js +26 -0
- package/interfaces/codegen/schema-maps/api_get_lp_leaderboard_request.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_get_lp_leaderboard_request.js +18 -0
- package/interfaces/codegen/schema-maps/api_get_lp_leaderboard_response.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_get_lp_leaderboard_response.js +13 -0
- package/interfaces/codegen/schema-maps/api_get_lp_point_request.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_get_lp_point_request.js +16 -0
- package/interfaces/codegen/schema-maps/api_get_lp_point_response.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_get_lp_point_response.js +15 -0
- package/interfaces/codegen/schema-maps/api_get_margin_tiers_response.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_get_margin_tiers_response.js +13 -0
- package/interfaces/codegen/schema-maps/api_get_order_group_request.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_get_order_group_request.js +12 -0
- package/interfaces/codegen/schema-maps/api_get_order_group_response.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_get_order_group_response.js +13 -0
- package/interfaces/codegen/schema-maps/api_get_order_request.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_get_order_request.js +16 -0
- package/interfaces/codegen/schema-maps/api_get_order_response.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_get_order_response.js +13 -0
- package/interfaces/codegen/schema-maps/api_get_trader_stat_response.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_get_trader_stat_response.js +12 -0
- package/interfaces/codegen/schema-maps/api_get_user_ecosystem_point_request.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_get_user_ecosystem_point_request.js +16 -0
- package/interfaces/codegen/schema-maps/api_get_user_ecosystem_point_response.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_get_user_ecosystem_point_response.js +13 -0
- package/interfaces/codegen/schema-maps/api_get_verified_ecosystem_leaderboard_request.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_get_verified_ecosystem_leaderboard_request.js +14 -0
- package/interfaces/codegen/schema-maps/api_latest_snap_sub_accounts_request.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_latest_snap_sub_accounts_request.js +12 -0
- package/interfaces/codegen/schema-maps/api_latest_snap_sub_accounts_response.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_latest_snap_sub_accounts_response.js +13 -0
- package/interfaces/codegen/schema-maps/api_list_aggregated_account_summary_request.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_list_aggregated_account_summary_request.js +12 -0
- package/interfaces/codegen/schema-maps/api_list_aggregated_account_summary_response.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_list_aggregated_account_summary_response.js +13 -0
- package/interfaces/codegen/schema-maps/api_mini_ticker_request.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_mini_ticker_request.js +12 -0
- package/interfaces/codegen/schema-maps/api_mini_ticker_response.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_mini_ticker_response.js +13 -0
- package/interfaces/codegen/schema-maps/api_open_orders_request.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_open_orders_request.js +18 -0
- package/interfaces/codegen/schema-maps/api_open_orders_response.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_open_orders_response.js +13 -0
- package/interfaces/codegen/schema-maps/api_order_history_request.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_order_history_request.js +26 -0
- package/interfaces/codegen/schema-maps/api_order_history_response.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_order_history_response.js +15 -0
- package/interfaces/codegen/schema-maps/api_order_state_request.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_order_state_request.js +16 -0
- package/interfaces/codegen/schema-maps/api_order_state_response.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_order_state_response.js +13 -0
- package/interfaces/codegen/schema-maps/api_orderbook_levels_request.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_orderbook_levels_request.js +14 -0
- package/interfaces/codegen/schema-maps/api_orderbook_levels_response.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_orderbook_levels_response.js +13 -0
- package/interfaces/codegen/schema-maps/api_position.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_position.js +40 -0
- package/interfaces/codegen/schema-maps/api_positions_request.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_positions_request.js +18 -0
- package/interfaces/codegen/schema-maps/api_positions_response.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_positions_response.js +13 -0
- package/interfaces/codegen/schema-maps/api_pre_deposit_check_request.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_pre_deposit_check_request.js +14 -0
- package/interfaces/codegen/schema-maps/api_pre_deposit_check_response.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_pre_deposit_check_response.js +14 -0
- package/interfaces/codegen/schema-maps/api_pre_order_check_request.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_pre_order_check_request.js +15 -0
- package/interfaces/codegen/schema-maps/api_pre_order_check_response.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_pre_order_check_response.js +13 -0
- package/interfaces/codegen/schema-maps/api_query_account_summary_request.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_query_account_summary_request.js +12 -0
- package/interfaces/codegen/schema-maps/api_query_account_summary_response.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_query_account_summary_response.js +15 -0
- package/interfaces/codegen/schema-maps/api_query_flat_referral_stat_request.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_query_flat_referral_stat_request.js +12 -0
- package/interfaces/codegen/schema-maps/api_query_flat_referral_stat_response.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_query_flat_referral_stat_response.js +14 -0
- package/interfaces/codegen/schema-maps/api_query_list_funding_account_summary_request.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_query_list_funding_account_summary_request.js +12 -0
- package/interfaces/codegen/schema-maps/api_query_list_funding_account_summary_response.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_query_list_funding_account_summary_response.js +15 -0
- package/interfaces/codegen/schema-maps/api_query_list_sub_account_summary_request.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_query_list_sub_account_summary_request.js +14 -0
- package/interfaces/codegen/schema-maps/api_query_list_sub_account_summary_response.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_query_list_sub_account_summary_response.js +15 -0
- package/interfaces/codegen/schema-maps/api_query_trading_performance_request.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_query_trading_performance_request.js +14 -0
- package/interfaces/codegen/schema-maps/api_query_trading_performance_response.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_query_trading_performance_response.js +14 -0
- package/interfaces/codegen/schema-maps/api_query_trading_performance_trend_request.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_query_trading_performance_trend_request.js +14 -0
- package/interfaces/codegen/schema-maps/api_query_trading_performance_trend_response.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_query_trading_performance_trend_response.js +15 -0
- package/interfaces/codegen/schema-maps/api_resolve_epoch_ecosystem_metric_response.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_resolve_epoch_ecosystem_metric_response.js +16 -0
- package/interfaces/codegen/schema-maps/api_set_initial_leverage_request.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_set_initial_leverage_request.js +16 -0
- package/interfaces/codegen/schema-maps/api_set_initial_leverage_response.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_set_initial_leverage_response.js +12 -0
- package/interfaces/codegen/schema-maps/api_settlement_price.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_settlement_price.js +18 -0
- package/interfaces/codegen/schema-maps/api_settlement_price_request.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_settlement_price_request.js +22 -0
- package/interfaces/codegen/schema-maps/api_settlement_price_response.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_settlement_price_response.js +15 -0
- package/interfaces/codegen/schema-maps/api_socialized_loss_status_response.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_socialized_loss_status_response.js +14 -0
- package/interfaces/codegen/schema-maps/api_spot_balance.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_spot_balance.js +16 -0
- package/interfaces/codegen/schema-maps/api_sub_account_history_request.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_sub_account_history_request.js +20 -0
- package/interfaces/codegen/schema-maps/api_sub_account_history_response.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_sub_account_history_response.js +15 -0
- package/interfaces/codegen/schema-maps/api_sub_account_summary_request.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_sub_account_summary_request.js +12 -0
- package/interfaces/codegen/schema-maps/api_sub_account_summary_response.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_sub_account_summary_response.js +13 -0
- package/interfaces/codegen/schema-maps/api_sub_account_trade_aggregation_request.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_sub_account_trade_aggregation_request.js +30 -0
- package/interfaces/codegen/schema-maps/api_sub_account_trade_aggregation_response.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_sub_account_trade_aggregation_response.js +15 -0
- package/interfaces/codegen/schema-maps/api_ticker_feed_data_v_1.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_ticker_feed_data_v_1.js +13 -0
- package/interfaces/codegen/schema-maps/api_ticker_request.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_ticker_request.js +12 -0
- package/interfaces/codegen/schema-maps/api_ticker_response.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_ticker_response.js +13 -0
- package/interfaces/codegen/schema-maps/api_timed_asset_exposure_request.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_timed_asset_exposure_request.js +16 -0
- package/interfaces/codegen/schema-maps/api_timed_asset_exposure_response.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_timed_asset_exposure_response.js +15 -0
- package/interfaces/codegen/schema-maps/api_trade_history_request.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_trade_history_request.js +20 -0
- package/interfaces/codegen/schema-maps/api_trade_history_response.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_trade_history_response.js +15 -0
- package/interfaces/codegen/schema-maps/api_trade_request.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_trade_request.js +14 -0
- package/interfaces/codegen/schema-maps/api_trade_response.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_trade_response.js +13 -0
- package/interfaces/codegen/schema-maps/api_trading_performance_trend.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_trading_performance_trend.js +16 -0
- package/interfaces/codegen/schema-maps/api_transfer_history_request.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_transfer_history_request.js +24 -0
- package/interfaces/codegen/schema-maps/api_transfer_history_response.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_transfer_history_response.js +15 -0
- package/interfaces/codegen/schema-maps/api_transfer_request.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_transfer_request.js +29 -0
- package/interfaces/codegen/schema-maps/api_user_category_affinity_score_request.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_user_category_affinity_score_request.js +16 -0
- package/interfaces/codegen/schema-maps/api_user_category_affinity_score_response.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_user_category_affinity_score_response.js +13 -0
- package/interfaces/codegen/schema-maps/api_withdrawal_history_request.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_withdrawal_history_request.js +22 -0
- package/interfaces/codegen/schema-maps/api_withdrawal_history_response.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_withdrawal_history_response.js +15 -0
- package/interfaces/codegen/schema-maps/api_withdrawal_request.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_withdrawal_request.js +21 -0
- package/interfaces/codegen/schema-maps/approximate_lp_point.d.ts +2 -0
- package/interfaces/codegen/schema-maps/approximate_lp_point.js +16 -0
- package/interfaces/codegen/schema-maps/approximate_lp_snapshot.d.ts +2 -0
- package/interfaces/codegen/schema-maps/approximate_lp_snapshot.js +24 -0
- package/interfaces/codegen/schema-maps/asset_exposure_summary.d.ts +2 -0
- package/interfaces/codegen/schema-maps/asset_exposure_summary.js +14 -0
- package/interfaces/codegen/schema-maps/asset_margin_tier_response.d.ts +2 -0
- package/interfaces/codegen/schema-maps/asset_margin_tier_response.js +15 -0
- package/interfaces/codegen/schema-maps/asset_max_qty.d.ts +2 -0
- package/interfaces/codegen/schema-maps/asset_max_qty.js +16 -0
- package/interfaces/codegen/schema-maps/cancel_status_feed.d.ts +2 -0
- package/interfaces/codegen/schema-maps/cancel_status_feed.js +22 -0
- package/interfaces/codegen/schema-maps/candlestick.d.ts +2 -0
- package/interfaces/codegen/schema-maps/candlestick.js +30 -0
- package/interfaces/codegen/schema-maps/claim_ecosystem_badge_response.d.ts +2 -0
- package/interfaces/codegen/schema-maps/claim_ecosystem_badge_response.js +13 -0
- package/interfaces/codegen/schema-maps/client_order_i_ds_by_group.d.ts +2 -0
- package/interfaces/codegen/schema-maps/client_order_i_ds_by_group.js +16 -0
- package/interfaces/codegen/schema-maps/deposit.d.ts +2 -0
- package/interfaces/codegen/schema-maps/deposit.js +18 -0
- package/interfaces/codegen/schema-maps/deposit_history.d.ts +2 -0
- package/interfaces/codegen/schema-maps/deposit_history.js +26 -0
- package/interfaces/codegen/schema-maps/ecosystem_leaderboard_user.d.ts +2 -0
- package/interfaces/codegen/schema-maps/ecosystem_leaderboard_user.js +18 -0
- package/interfaces/codegen/schema-maps/ecosystem_metric.d.ts +2 -0
- package/interfaces/codegen/schema-maps/ecosystem_metric.js +20 -0
- package/interfaces/codegen/schema-maps/ecosystem_point.d.ts +2 -0
- package/interfaces/codegen/schema-maps/ecosystem_point.js +42 -0
- package/interfaces/codegen/schema-maps/empty_request.d.ts +2 -0
- package/interfaces/codegen/schema-maps/empty_request.js +8 -0
- package/interfaces/codegen/schema-maps/epoch.d.ts +2 -0
- package/interfaces/codegen/schema-maps/epoch.js +16 -0
- package/interfaces/codegen/schema-maps/epoch_badge.d.ts +2 -0
- package/interfaces/codegen/schema-maps/epoch_badge.js +32 -0
- package/interfaces/codegen/schema-maps/epoch_badge_point_distribution.d.ts +2 -0
- package/interfaces/codegen/schema-maps/epoch_badge_point_distribution.js +28 -0
- package/interfaces/codegen/schema-maps/error.d.ts +2 -0
- package/interfaces/codegen/schema-maps/error.js +14 -0
- package/interfaces/codegen/schema-maps/flat_private_trade.d.ts +2 -0
- package/interfaces/codegen/schema-maps/flat_private_trade.js +54 -0
- package/interfaces/codegen/schema-maps/flat_public_trade.d.ts +2 -0
- package/interfaces/codegen/schema-maps/flat_public_trade.js +36 -0
- package/interfaces/codegen/schema-maps/flat_referral.d.ts +2 -0
- package/interfaces/codegen/schema-maps/flat_referral.js +32 -0
- package/interfaces/codegen/schema-maps/funding_account_summary.d.ts +2 -0
- package/interfaces/codegen/schema-maps/funding_account_summary.js +17 -0
- package/interfaces/codegen/schema-maps/funding_rate.d.ts +2 -0
- package/interfaces/codegen/schema-maps/funding_rate.js +20 -0
- package/interfaces/codegen/schema-maps/get_claimable_ecosystem_badge_response.d.ts +2 -0
- package/interfaces/codegen/schema-maps/get_claimable_ecosystem_badge_response.js +17 -0
- package/interfaces/codegen/schema-maps/index.d.ts +249 -0
- package/interfaces/codegen/schema-maps/index.js +265 -0
- package/interfaces/codegen/schema-maps/initial_leverage_result.d.ts +2 -0
- package/interfaces/codegen/schema-maps/initial_leverage_result.js +18 -0
- package/interfaces/codegen/schema-maps/instrument.d.ts +2 -0
- package/interfaces/codegen/schema-maps/instrument.js +42 -0
- package/interfaces/codegen/schema-maps/jsonrpc_request.d.ts +2 -0
- package/interfaces/codegen/schema-maps/jsonrpc_request.js +18 -0
- package/interfaces/codegen/schema-maps/jsonrpc_response.d.ts +2 -0
- package/interfaces/codegen/schema-maps/jsonrpc_response.js +21 -0
- package/interfaces/codegen/schema-maps/lp_point.d.ts +2 -0
- package/interfaces/codegen/schema-maps/lp_point.js +16 -0
- package/interfaces/codegen/schema-maps/lp_snapshot.d.ts +2 -0
- package/interfaces/codegen/schema-maps/lp_snapshot.js +26 -0
- package/interfaces/codegen/schema-maps/main_acc_id_request.d.ts +2 -0
- package/interfaces/codegen/schema-maps/main_acc_id_request.js +12 -0
- package/interfaces/codegen/schema-maps/margin_tier_response.d.ts +2 -0
- package/interfaces/codegen/schema-maps/margin_tier_response.js +14 -0
- package/interfaces/codegen/schema-maps/mini_ticker.d.ts +2 -0
- package/interfaces/codegen/schema-maps/mini_ticker.js +32 -0
- package/interfaces/codegen/schema-maps/msg_funding_payment.d.ts +2 -0
- package/interfaces/codegen/schema-maps/msg_funding_payment.js +22 -0
- package/interfaces/codegen/schema-maps/order.d.ts +2 -0
- package/interfaces/codegen/schema-maps/order.js +36 -0
- package/interfaces/codegen/schema-maps/order_leg.d.ts +2 -0
- package/interfaces/codegen/schema-maps/order_leg.js +18 -0
- package/interfaces/codegen/schema-maps/order_metadata.d.ts +2 -0
- package/interfaces/codegen/schema-maps/order_metadata.js +19 -0
- package/interfaces/codegen/schema-maps/order_state.d.ts +2 -0
- package/interfaces/codegen/schema-maps/order_state.js +22 -0
- package/interfaces/codegen/schema-maps/order_state_feed.d.ts +2 -0
- package/interfaces/codegen/schema-maps/order_state_feed.js +17 -0
- package/interfaces/codegen/schema-maps/orderbook_level.d.ts +2 -0
- package/interfaces/codegen/schema-maps/orderbook_level.js +16 -0
- package/interfaces/codegen/schema-maps/position_summary.d.ts +2 -0
- package/interfaces/codegen/schema-maps/position_summary.js +28 -0
- package/interfaces/codegen/schema-maps/pre_order_check_result.d.ts +2 -0
- package/interfaces/codegen/schema-maps/pre_order_check_result.js +21 -0
- package/interfaces/codegen/schema-maps/query_account_summary_request.d.ts +2 -0
- package/interfaces/codegen/schema-maps/query_account_summary_request.js +16 -0
- package/interfaces/codegen/schema-maps/query_epoch_badge_point_distribution_request.d.ts +2 -0
- package/interfaces/codegen/schema-maps/query_epoch_badge_point_distribution_request.js +14 -0
- package/interfaces/codegen/schema-maps/query_epoch_badge_point_distribution_response.d.ts +2 -0
- package/interfaces/codegen/schema-maps/query_epoch_badge_point_distribution_response.js +13 -0
- package/interfaces/codegen/schema-maps/query_epoch_badge_request.d.ts +2 -0
- package/interfaces/codegen/schema-maps/query_epoch_badge_request.js +20 -0
- package/interfaces/codegen/schema-maps/query_epoch_badge_response.d.ts +2 -0
- package/interfaces/codegen/schema-maps/query_epoch_badge_response.js +15 -0
- package/interfaces/codegen/schema-maps/query_find_epoch_request.d.ts +2 -0
- package/interfaces/codegen/schema-maps/query_find_epoch_request.js +14 -0
- package/interfaces/codegen/schema-maps/query_find_epoch_response.d.ts +2 -0
- package/interfaces/codegen/schema-maps/query_find_epoch_response.js +13 -0
- package/interfaces/codegen/schema-maps/query_get_latest_lp_snapshot_response.d.ts +2 -0
- package/interfaces/codegen/schema-maps/query_get_latest_lp_snapshot_response.js +13 -0
- package/interfaces/codegen/schema-maps/query_get_list_epoch_request.d.ts +2 -0
- package/interfaces/codegen/schema-maps/query_get_list_epoch_request.js +12 -0
- package/interfaces/codegen/schema-maps/query_get_list_epoch_response.d.ts +2 -0
- package/interfaces/codegen/schema-maps/query_get_list_epoch_response.js +13 -0
- package/interfaces/codegen/schema-maps/query_trading_performance_trend_request.d.ts +2 -0
- package/interfaces/codegen/schema-maps/query_trading_performance_trend_request.js +14 -0
- package/interfaces/codegen/schema-maps/query_trading_performance_trend_response.d.ts +2 -0
- package/interfaces/codegen/schema-maps/query_trading_performance_trend_response.js +15 -0
- package/interfaces/codegen/schema-maps/reward_epoch_info.d.ts +2 -0
- package/interfaces/codegen/schema-maps/reward_epoch_info.js +18 -0
- package/interfaces/codegen/schema-maps/session_information.d.ts +2 -0
- package/interfaces/codegen/schema-maps/session_information.js +20 -0
- package/interfaces/codegen/schema-maps/signature.d.ts +2 -0
- package/interfaces/codegen/schema-maps/signature.js +22 -0
- package/interfaces/codegen/schema-maps/snap_account_summary.d.ts +2 -0
- package/interfaces/codegen/schema-maps/snap_account_summary.js +14 -0
- package/interfaces/codegen/schema-maps/snap_funding_account_summary.d.ts +2 -0
- package/interfaces/codegen/schema-maps/snap_funding_account_summary.js +21 -0
- package/interfaces/codegen/schema-maps/snap_orderbook_levels.d.ts +2 -0
- package/interfaces/codegen/schema-maps/snap_orderbook_levels.js +19 -0
- package/interfaces/codegen/schema-maps/snap_sub_account.d.ts +2 -0
- package/interfaces/codegen/schema-maps/snap_sub_account.js +36 -0
- package/interfaces/codegen/schema-maps/snap_sub_account_summary.d.ts +2 -0
- package/interfaces/codegen/schema-maps/snap_sub_account_summary.js +23 -0
- package/interfaces/codegen/schema-maps/snap_ticker.d.ts +2 -0
- package/interfaces/codegen/schema-maps/snap_ticker.js +58 -0
- package/interfaces/codegen/schema-maps/stream_reference.d.ts +2 -0
- package/interfaces/codegen/schema-maps/stream_reference.js +14 -0
- package/interfaces/codegen/schema-maps/sub_account_trade_aggregation.d.ts +2 -0
- package/interfaces/codegen/schema-maps/sub_account_trade_aggregation.js +24 -0
- package/interfaces/codegen/schema-maps/timed_asset_exposure_summary.d.ts +2 -0
- package/interfaces/codegen/schema-maps/timed_asset_exposure_summary.js +15 -0
- package/interfaces/codegen/schema-maps/tpsl_order_metadata.d.ts +2 -0
- package/interfaces/codegen/schema-maps/tpsl_order_metadata.js +14 -0
- package/interfaces/codegen/schema-maps/trader_leaderboard_user.d.ts +2 -0
- package/interfaces/codegen/schema-maps/trader_leaderboard_user.js +18 -0
- package/interfaces/codegen/schema-maps/trader_metric.d.ts +2 -0
- package/interfaces/codegen/schema-maps/trader_metric.js +14 -0
- package/interfaces/codegen/schema-maps/trading_performance_point.d.ts +2 -0
- package/interfaces/codegen/schema-maps/trading_performance_point.js +16 -0
- package/interfaces/codegen/schema-maps/transfer_history.d.ts +2 -0
- package/interfaces/codegen/schema-maps/transfer_history.js +33 -0
- package/interfaces/codegen/schema-maps/trigger_order_metadata.d.ts +2 -0
- package/interfaces/codegen/schema-maps/trigger_order_metadata.js +15 -0
- package/interfaces/codegen/schema-maps/types.d.ts +7 -0
- package/interfaces/codegen/schema-maps/types.js +2 -0
- package/interfaces/codegen/schema-maps/user_category_affinity_score.d.ts +2 -0
- package/interfaces/codegen/schema-maps/user_category_affinity_score.js +16 -0
- package/interfaces/codegen/schema-maps/user_tracking_event.d.ts +2 -0
- package/interfaces/codegen/schema-maps/user_tracking_event.js +42 -0
- package/interfaces/codegen/schema-maps/user_vault_category_event_pay_load.d.ts +2 -0
- package/interfaces/codegen/schema-maps/user_vault_category_event_pay_load.js +18 -0
- package/interfaces/codegen/schema-maps/vault_params.d.ts +2 -0
- package/interfaces/codegen/schema-maps/vault_params.js +28 -0
- package/interfaces/codegen/schema-maps/withdrawal.d.ts +2 -0
- package/interfaces/codegen/schema-maps/withdrawal.js +21 -0
- package/interfaces/codegen/schema-maps/withdrawal_history.d.ts +2 -0
- package/interfaces/codegen/schema-maps/withdrawal_history.js +25 -0
- package/interfaces/codegen/schema-maps/ws_cancel_feed_data_v_1.d.ts +2 -0
- package/interfaces/codegen/schema-maps/ws_cancel_feed_data_v_1.js +21 -0
- package/interfaces/codegen/schema-maps/ws_cancel_feed_selector_v_1.d.ts +2 -0
- package/interfaces/codegen/schema-maps/ws_cancel_feed_selector_v_1.js +12 -0
- package/interfaces/codegen/schema-maps/ws_candlestick_feed_data_v_1.d.ts +2 -0
- package/interfaces/codegen/schema-maps/ws_candlestick_feed_data_v_1.js +21 -0
- package/interfaces/codegen/schema-maps/ws_candlestick_feed_selector_v_1.d.ts +2 -0
- package/interfaces/codegen/schema-maps/ws_candlestick_feed_selector_v_1.js +16 -0
- package/interfaces/codegen/schema-maps/ws_deposit_feed_data_v_1.d.ts +2 -0
- package/interfaces/codegen/schema-maps/ws_deposit_feed_data_v_1.js +21 -0
- package/interfaces/codegen/schema-maps/ws_deposit_feed_selector_v_1.d.ts +2 -0
- package/interfaces/codegen/schema-maps/ws_deposit_feed_selector_v_1.js +12 -0
- package/interfaces/codegen/schema-maps/ws_fill_feed_data_v_1.d.ts +2 -0
- package/interfaces/codegen/schema-maps/ws_fill_feed_data_v_1.js +21 -0
- package/interfaces/codegen/schema-maps/ws_fill_feed_selector_v_1.d.ts +2 -0
- package/interfaces/codegen/schema-maps/ws_fill_feed_selector_v_1.js +14 -0
- package/interfaces/codegen/schema-maps/ws_list_streams_params.d.ts +2 -0
- package/interfaces/codegen/schema-maps/ws_list_streams_params.js +8 -0
- package/interfaces/codegen/schema-maps/ws_list_streams_result.d.ts +2 -0
- package/interfaces/codegen/schema-maps/ws_list_streams_result.js +13 -0
- package/interfaces/codegen/schema-maps/ws_mini_ticker_feed_data_v_1.d.ts +2 -0
- package/interfaces/codegen/schema-maps/ws_mini_ticker_feed_data_v_1.js +21 -0
- package/interfaces/codegen/schema-maps/ws_mini_ticker_feed_selector_v_1.d.ts +2 -0
- package/interfaces/codegen/schema-maps/ws_mini_ticker_feed_selector_v_1.js +14 -0
- package/interfaces/codegen/schema-maps/ws_order_feed_data_v_1.d.ts +2 -0
- package/interfaces/codegen/schema-maps/ws_order_feed_data_v_1.js +21 -0
- package/interfaces/codegen/schema-maps/ws_order_feed_selector_v_1.d.ts +2 -0
- package/interfaces/codegen/schema-maps/ws_order_feed_selector_v_1.js +14 -0
- package/interfaces/codegen/schema-maps/ws_order_group_feed_data_v_1.d.ts +2 -0
- package/interfaces/codegen/schema-maps/ws_order_group_feed_data_v_1.js +21 -0
- package/interfaces/codegen/schema-maps/ws_order_group_feed_selector_v_1.d.ts +2 -0
- package/interfaces/codegen/schema-maps/ws_order_group_feed_selector_v_1.js +12 -0
- package/interfaces/codegen/schema-maps/ws_order_state_feed_data_v_1.d.ts +2 -0
- package/interfaces/codegen/schema-maps/ws_order_state_feed_data_v_1.js +21 -0
- package/interfaces/codegen/schema-maps/ws_order_state_feed_selector_v_1.d.ts +2 -0
- package/interfaces/codegen/schema-maps/ws_order_state_feed_selector_v_1.js +14 -0
- package/interfaces/codegen/schema-maps/ws_orderbook_levels_feed_data_v_1.d.ts +2 -0
- package/interfaces/codegen/schema-maps/ws_orderbook_levels_feed_data_v_1.js +21 -0
- package/interfaces/codegen/schema-maps/ws_orderbook_levels_feed_selector_v_1.d.ts +2 -0
- package/interfaces/codegen/schema-maps/ws_orderbook_levels_feed_selector_v_1.js +16 -0
- package/interfaces/codegen/schema-maps/ws_positions_feed_data_v_1.d.ts +2 -0
- package/interfaces/codegen/schema-maps/ws_positions_feed_data_v_1.js +21 -0
- package/interfaces/codegen/schema-maps/ws_positions_feed_selector_v_1.d.ts +2 -0
- package/interfaces/codegen/schema-maps/ws_positions_feed_selector_v_1.js +14 -0
- package/interfaces/codegen/schema-maps/ws_subscribe_params.d.ts +2 -0
- package/interfaces/codegen/schema-maps/ws_subscribe_params.js +16 -0
- package/interfaces/codegen/schema-maps/ws_subscribe_request_v_1_legacy.d.ts +2 -0
- package/interfaces/codegen/schema-maps/ws_subscribe_request_v_1_legacy.js +20 -0
- package/interfaces/codegen/schema-maps/ws_subscribe_response_v_1_legacy.d.ts +2 -0
- package/interfaces/codegen/schema-maps/ws_subscribe_response_v_1_legacy.js +24 -0
- package/interfaces/codegen/schema-maps/ws_subscribe_result.d.ts +2 -0
- package/interfaces/codegen/schema-maps/ws_subscribe_result.js +22 -0
- package/interfaces/codegen/schema-maps/ws_ticker_feed_data_v_1.d.ts +2 -0
- package/interfaces/codegen/schema-maps/ws_ticker_feed_data_v_1.js +21 -0
- package/interfaces/codegen/schema-maps/ws_ticker_feed_selector_v_1.d.ts +2 -0
- package/interfaces/codegen/schema-maps/ws_ticker_feed_selector_v_1.js +14 -0
- package/interfaces/codegen/schema-maps/ws_trade_feed_data_v_1.d.ts +2 -0
- package/interfaces/codegen/schema-maps/ws_trade_feed_data_v_1.js +21 -0
- package/interfaces/codegen/schema-maps/ws_trade_feed_selector_v_1.d.ts +2 -0
- package/interfaces/codegen/schema-maps/ws_trade_feed_selector_v_1.js +14 -0
- package/interfaces/codegen/schema-maps/ws_transfer_feed_data_v_1.d.ts +2 -0
- package/interfaces/codegen/schema-maps/ws_transfer_feed_data_v_1.js +21 -0
- package/interfaces/codegen/schema-maps/ws_transfer_feed_selector_v_1.d.ts +2 -0
- package/interfaces/codegen/schema-maps/ws_transfer_feed_selector_v_1.js +14 -0
- package/interfaces/codegen/schema-maps/ws_unsubscribe_all_params.d.ts +2 -0
- package/interfaces/codegen/schema-maps/ws_unsubscribe_all_params.js +8 -0
- package/interfaces/codegen/schema-maps/ws_unsubscribe_all_result.d.ts +2 -0
- package/interfaces/codegen/schema-maps/ws_unsubscribe_all_result.js +13 -0
- package/interfaces/codegen/schema-maps/ws_unsubscribe_params.d.ts +2 -0
- package/interfaces/codegen/schema-maps/ws_unsubscribe_params.js +16 -0
- package/interfaces/codegen/schema-maps/ws_unsubscribe_result.d.ts +2 -0
- package/interfaces/codegen/schema-maps/ws_unsubscribe_result.js +14 -0
- package/interfaces/codegen/schema-maps/ws_withdrawal_feed_data_v_1.d.ts +2 -0
- package/interfaces/codegen/schema-maps/ws_withdrawal_feed_data_v_1.js +21 -0
- package/interfaces/codegen/schema-maps/ws_withdrawal_feed_selector_v_1.d.ts +2 -0
- package/interfaces/codegen/schema-maps/ws_withdrawal_feed_selector_v_1.js +12 -0
- package/interfaces/config.interface.d.ts +7 -0
- package/interfaces/config.interface.js +13 -0
- package/interfaces/index.d.ts +2 -0
- package/interfaces/index.js +18 -0
- package/package.json +50 -0
- package/services/index.d.ts +1 -0
- package/services/index.js +17 -0
- package/services/restful.service.d.ts +1 -0
- package/services/restful.service.js +22 -0
- package/utils/index.d.ts +15 -0
- package/utils/index.js +87 -0
- package/utils/json.utils.d.ts +3 -0
- package/utils/json.utils.js +17 -0
- package/utils/string.utils.d.ts +7 -0
- package/utils/string.utils.js +23 -0
- package/ws/index.d.ts +2 -0
- package/ws/index.js +18 -0
- package/ws/interfaces.d.ts +119 -0
- package/ws/interfaces.js +22 -0
- package/ws/ws.d.ts +61 -0
- package/ws/ws.js +714 -0
package/LICENSE
ADDED
|
File without changes
|
package/MDG/index.d.ts
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { type AxiosRequestConfig } from 'axios';
|
|
2
|
+
import { type IApiCandlestickRequest, type IApiCandlestickResponse, type IApiFundingRateRequest, type IApiFundingRateResponse, type IApiGetAllInstrumentsRequest, type IApiGetAllInstrumentsResponse, type IApiGetFilteredInstrumentsRequest, type IApiGetFilteredInstrumentsResponse, type IApiGetInstrumentRequest, type IApiGetInstrumentResponse, type IApiMiniTickerRequest, type IApiMiniTickerResponse, type IApiOrderbookLevelsRequest, type IApiOrderbookLevelsResponse, type IApiSettlementPriceRequest, type IApiSettlementPriceResponse, type IApiTickerRequest, type IApiTickerResponse, type IApiTradeHistoryRequest, type IApiTradeHistoryResponse, type IApiTradeRequest, type IApiTradeResponse, type IConfig } from '../interfaces';
|
|
3
|
+
export declare class MDG {
|
|
4
|
+
private readonly _axios;
|
|
5
|
+
private readonly _fullUrl;
|
|
6
|
+
private readonly _liteUrl;
|
|
7
|
+
constructor(config: IConfig);
|
|
8
|
+
get axios(): import("axios").AxiosInstance;
|
|
9
|
+
/**
|
|
10
|
+
* @see https://api-docs.grvt.io/market_data_api/#get-instrument
|
|
11
|
+
*/
|
|
12
|
+
instrument(payload: IApiGetInstrumentRequest, config?: AxiosRequestConfig): Promise<IApiGetInstrumentResponse>;
|
|
13
|
+
/**
|
|
14
|
+
* @see https://api-docs.grvt.io/market_data_api/#get-instruments
|
|
15
|
+
*/
|
|
16
|
+
instruments(payload: IApiGetFilteredInstrumentsRequest, config?: AxiosRequestConfig): Promise<IApiGetFilteredInstrumentsResponse>;
|
|
17
|
+
/**
|
|
18
|
+
* @see https://api-docs.grvt.io/market_data_api/#get-all-instruments
|
|
19
|
+
*/
|
|
20
|
+
allInstruments(payload: IApiGetAllInstrumentsRequest, config?: AxiosRequestConfig): Promise<IApiGetAllInstrumentsResponse>;
|
|
21
|
+
/**
|
|
22
|
+
* @see https://api-docs.grvt.io/market_data_api/#mini-ticker
|
|
23
|
+
*/
|
|
24
|
+
miniTicker(payload: IApiMiniTickerRequest, config?: AxiosRequestConfig): Promise<IApiMiniTickerResponse>;
|
|
25
|
+
/**
|
|
26
|
+
* @see https://api-docs.grvt.io/market_data_api/#ticker
|
|
27
|
+
*/
|
|
28
|
+
ticker(payload: IApiTickerRequest, config?: AxiosRequestConfig): Promise<IApiTickerResponse>;
|
|
29
|
+
/**
|
|
30
|
+
* @see https://api-docs.grvt.io/market_data_api/#orderbook
|
|
31
|
+
*/
|
|
32
|
+
orderBook(payload: IApiOrderbookLevelsRequest, config?: AxiosRequestConfig): Promise<IApiOrderbookLevelsResponse>;
|
|
33
|
+
/**
|
|
34
|
+
* @see https://api-docs.grvt.io/market_data_api/#trade_1
|
|
35
|
+
*/
|
|
36
|
+
trade(payload: IApiTradeRequest, config?: AxiosRequestConfig): Promise<IApiTradeResponse>;
|
|
37
|
+
/**
|
|
38
|
+
* @see https://api-docs.grvt.io/market_data_api/#trade-history
|
|
39
|
+
*/
|
|
40
|
+
tradesHistory(payload: IApiTradeHistoryRequest, config?: AxiosRequestConfig): Promise<IApiTradeHistoryResponse>;
|
|
41
|
+
/**
|
|
42
|
+
* @see https://api-docs.grvt.io/market_data_api/#settlement-price
|
|
43
|
+
*/
|
|
44
|
+
settlement(payload: IApiSettlementPriceRequest, config?: AxiosRequestConfig): Promise<IApiSettlementPriceResponse>;
|
|
45
|
+
/**
|
|
46
|
+
* @see https://api-docs.grvt.io/market_data_api/#funding-rate
|
|
47
|
+
*/
|
|
48
|
+
funding(payload: IApiFundingRateRequest, config?: AxiosRequestConfig): Promise<IApiFundingRateResponse>;
|
|
49
|
+
/**
|
|
50
|
+
* @see https://api-docs.grvt.io/market_data_api/#candlestick
|
|
51
|
+
*/
|
|
52
|
+
candlestick(payload: IApiCandlestickRequest, config?: AxiosRequestConfig): Promise<IApiCandlestickResponse>;
|
|
53
|
+
}
|
package/MDG/index.js
ADDED
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MDG = void 0;
|
|
4
|
+
const interfaces_1 = require("../interfaces");
|
|
5
|
+
const services_1 = require("../services");
|
|
6
|
+
const utils_1 = require("../utils");
|
|
7
|
+
class MDG {
|
|
8
|
+
constructor(config) {
|
|
9
|
+
this._axios = (0, services_1.createAxiosInstance)();
|
|
10
|
+
const parseConfig = (0, interfaces_1.validConfig)(config);
|
|
11
|
+
this._fullUrl = `${parseConfig.host}/full/${parseConfig.version}`;
|
|
12
|
+
this._liteUrl = `${parseConfig.host}/lite/${parseConfig.version}`;
|
|
13
|
+
}
|
|
14
|
+
get axios() {
|
|
15
|
+
return this._axios;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* @see https://api-docs.grvt.io/market_data_api/#get-instrument
|
|
19
|
+
*/
|
|
20
|
+
instrument(payload, config) {
|
|
21
|
+
return this._axios.post(this._liteUrl + '/instrument', utils_1.Utils.schemaMap(payload, interfaces_1.API_GET_INSTRUMENT_REQUEST_MAP.FULL_TO_LITE, true), Object.assign(Object.assign({}, config), { withCredentials: false })).then((response) => {
|
|
22
|
+
return utils_1.Utils.schemaMap(response.data, interfaces_1.API_GET_INSTRUMENT_RESPONSE_MAP.LITE_TO_FULL);
|
|
23
|
+
}).catch(utils_1.Utils.coverApiError);
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* @see https://api-docs.grvt.io/market_data_api/#get-instruments
|
|
27
|
+
*/
|
|
28
|
+
instruments(payload, config) {
|
|
29
|
+
return this._axios.post(this._liteUrl + '/instruments', utils_1.Utils.schemaMap(payload, interfaces_1.API_GET_FILTERED_INSTRUMENTS_REQUEST_MAP.FULL_TO_LITE, true), Object.assign(Object.assign({}, config), { withCredentials: false })).then((response) => {
|
|
30
|
+
return utils_1.Utils.schemaMap(response.data, interfaces_1.API_GET_FILTERED_INSTRUMENTS_RESPONSE_MAP.LITE_TO_FULL);
|
|
31
|
+
}).catch(utils_1.Utils.coverApiError);
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* @see https://api-docs.grvt.io/market_data_api/#get-all-instruments
|
|
35
|
+
*/
|
|
36
|
+
allInstruments(payload, config) {
|
|
37
|
+
return this._axios.post(this._liteUrl + '/all_instruments', utils_1.Utils.schemaMap(payload, interfaces_1.API_GET_ALL_INSTRUMENTS_REQUEST_MAP.FULL_TO_LITE, true), Object.assign(Object.assign({}, config), { withCredentials: false })).then((response) => {
|
|
38
|
+
return utils_1.Utils.schemaMap(response.data, interfaces_1.API_GET_ALL_INSTRUMENTS_RESPONSE_MAP.LITE_TO_FULL);
|
|
39
|
+
}).catch(utils_1.Utils.coverApiError);
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* @see https://api-docs.grvt.io/market_data_api/#mini-ticker
|
|
43
|
+
*/
|
|
44
|
+
miniTicker(payload, config) {
|
|
45
|
+
return this._axios.post(this._liteUrl + '/mini', utils_1.Utils.schemaMap(payload, interfaces_1.API_MINI_TICKER_REQUEST_MAP.FULL_TO_LITE, true), Object.assign(Object.assign({}, config), { withCredentials: false })).then((response) => {
|
|
46
|
+
return utils_1.Utils.schemaMap(response.data, interfaces_1.API_MINI_TICKER_RESPONSE_MAP.LITE_TO_FULL);
|
|
47
|
+
}).catch(utils_1.Utils.coverApiError);
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* @see https://api-docs.grvt.io/market_data_api/#ticker
|
|
51
|
+
*/
|
|
52
|
+
ticker(payload, config) {
|
|
53
|
+
return this._axios.post(this._liteUrl + '/ticker', utils_1.Utils.schemaMap(payload, interfaces_1.API_TICKER_REQUEST_MAP.FULL_TO_LITE, true), Object.assign(Object.assign({}, config), { withCredentials: false })).then((response) => {
|
|
54
|
+
return utils_1.Utils.schemaMap(response.data, interfaces_1.API_TICKER_RESPONSE_MAP.LITE_TO_FULL);
|
|
55
|
+
}).catch(utils_1.Utils.coverApiError);
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* @see https://api-docs.grvt.io/market_data_api/#orderbook
|
|
59
|
+
*/
|
|
60
|
+
orderBook(payload, config) {
|
|
61
|
+
return this._axios.post(this._liteUrl + '/book', utils_1.Utils.schemaMap(payload, interfaces_1.API_ORDERBOOK_LEVELS_REQUEST_MAP.FULL_TO_LITE, true), Object.assign(Object.assign({}, config), { withCredentials: false })).then((response) => {
|
|
62
|
+
return utils_1.Utils.schemaMap(response.data, interfaces_1.API_ORDERBOOK_LEVELS_RESPONSE_MAP.LITE_TO_FULL);
|
|
63
|
+
}).catch(utils_1.Utils.coverApiError);
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* @see https://api-docs.grvt.io/market_data_api/#trade_1
|
|
67
|
+
*/
|
|
68
|
+
trade(payload, config) {
|
|
69
|
+
return this._axios.post(this._liteUrl + '/trade', utils_1.Utils.schemaMap(payload, interfaces_1.API_TRADE_REQUEST_MAP.FULL_TO_LITE, true), Object.assign(Object.assign({}, config), { withCredentials: false })).then((response) => {
|
|
70
|
+
return utils_1.Utils.schemaMap(response.data, interfaces_1.API_TRADE_RESPONSE_MAP.LITE_TO_FULL);
|
|
71
|
+
}).catch(utils_1.Utils.coverApiError);
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* @see https://api-docs.grvt.io/market_data_api/#trade-history
|
|
75
|
+
*/
|
|
76
|
+
tradesHistory(payload, config) {
|
|
77
|
+
return this._axios.post(this._liteUrl + '/trade_history', utils_1.Utils.schemaMap(payload, interfaces_1.API_TRADE_HISTORY_REQUEST_MAP.FULL_TO_LITE, true), Object.assign(Object.assign({}, config), { withCredentials: false })).then((response) => {
|
|
78
|
+
return utils_1.Utils.schemaMap(response.data, interfaces_1.API_TRADE_HISTORY_RESPONSE_MAP.LITE_TO_FULL);
|
|
79
|
+
}).catch(utils_1.Utils.coverApiError);
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* @see https://api-docs.grvt.io/market_data_api/#settlement-price
|
|
83
|
+
*/
|
|
84
|
+
settlement(payload, config) {
|
|
85
|
+
return this._axios.post(this._liteUrl + '/settlement', utils_1.Utils.schemaMap(payload, interfaces_1.API_SETTLEMENT_PRICE_REQUEST_MAP.FULL_TO_LITE, true), Object.assign(Object.assign({}, config), { withCredentials: false })).then((response) => {
|
|
86
|
+
return utils_1.Utils.schemaMap(response.data, interfaces_1.API_SETTLEMENT_PRICE_RESPONSE_MAP.LITE_TO_FULL);
|
|
87
|
+
}).catch(utils_1.Utils.coverApiError);
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* @see https://api-docs.grvt.io/market_data_api/#funding-rate
|
|
91
|
+
*/
|
|
92
|
+
funding(payload, config) {
|
|
93
|
+
return this._axios.post(this._liteUrl + '/funding', utils_1.Utils.schemaMap(payload, interfaces_1.API_FUNDING_RATE_REQUEST_MAP.FULL_TO_LITE, true), Object.assign(Object.assign({}, config), { withCredentials: false })).then((response) => {
|
|
94
|
+
return utils_1.Utils.schemaMap(response.data, interfaces_1.API_FUNDING_RATE_RESPONSE_MAP.LITE_TO_FULL);
|
|
95
|
+
}).catch(utils_1.Utils.coverApiError);
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* @see https://api-docs.grvt.io/market_data_api/#candlestick
|
|
99
|
+
*/
|
|
100
|
+
candlestick(payload, config) {
|
|
101
|
+
return this._axios.post(this._liteUrl + '/kline', utils_1.Utils.schemaMap(payload, interfaces_1.API_CANDLESTICK_REQUEST_MAP.FULL_TO_LITE, true), Object.assign(Object.assign({}, config), { withCredentials: false })).then((response) => {
|
|
102
|
+
return utils_1.Utils.schemaMap(response.data, interfaces_1.API_CANDLESTICK_RESPONSE_MAP.LITE_TO_FULL);
|
|
103
|
+
}).catch(utils_1.Utils.coverApiError);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
exports.MDG = MDG;
|
package/README.md
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# GRVT
|
|
2
|
+
|
|
3
|
+
Node.js & JavaScript client for GRVT REST APIs & WebSockets
|
|
4
|
+
|
|
5
|
+
## Installing
|
|
6
|
+
|
|
7
|
+
Using npm:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install @grvt/client
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Using yarn:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
yarn add @grvt/client
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Using pnpm:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
pnpm add @grvt/client
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Once the package is installed, you can import the library using `import` or `require` approach:
|
|
26
|
+
|
|
27
|
+
```js
|
|
28
|
+
import GRVT from '@grvt/client'
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
You can also use the default export, since the named export is just a re-export from the GRVT factory:
|
|
32
|
+
|
|
33
|
+
```js
|
|
34
|
+
import GRVT from '@grvt/client'
|
|
35
|
+
console.log(
|
|
36
|
+
new GRVT.MDG({
|
|
37
|
+
host: 'https://market-data.dev.gravitymarkets.io',
|
|
38
|
+
version: 'v1'
|
|
39
|
+
})
|
|
40
|
+
)
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
If you use `require` for importing:
|
|
44
|
+
|
|
45
|
+
```js
|
|
46
|
+
const GRVT = require('@grvt/client')
|
|
47
|
+
console.log(
|
|
48
|
+
new GRVT.MDG({
|
|
49
|
+
host: 'https://market-data.dev.gravitymarkets.io',
|
|
50
|
+
version: 'v1'
|
|
51
|
+
})
|
|
52
|
+
)
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## To use WebSocket (available only in browsers that support WebSocket)
|
|
56
|
+
|
|
57
|
+
[Browsers supported](https://caniuse.com/websockets)
|
|
58
|
+
|
|
59
|
+
```js
|
|
60
|
+
import { EStreamEndpoints, WS } from '@grvt/client/ws'
|
|
61
|
+
console.log(new WS('wss://market-data.dev.gravitymarkets.io/ws'))
|
|
62
|
+
```
|
package/TDG/index.d.ts
ADDED
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { type AxiosRequestConfig } from 'axios';
|
|
2
|
+
import { type IApiAggregatedAccountSummaryResponse, type IApiCancelAllOrdersRequest, type IApiCancelAllOrdersResponse, type IApiCancelOrderRequest, type IApiCancelOrderResponse, type IApiCreateBulkOrdersRequest, type IApiCreateBulkOrdersResponse, type IApiCreateOrderRequest, type IApiCreateOrderResponse, type IApiDedustPositionRequest, type IApiDedustPositionResponse, type IApiDepositHistoryRequest, type IApiDepositHistoryResponse, type IApiFillHistoryRequest, type IApiFillHistoryResponse, type IApiFundingAccountSummaryResponse, type IApiFundingPaymentHistoryRequest, type IApiFundingPaymentHistoryResponse, type IApiGetAllInitialLeverageRequest, type IApiGetAllInitialLeverageResponse, type IApiGetMarginTiersResponse, type IApiGetOrderGroupRequest, type IApiGetOrderGroupResponse, type IApiGetOrderRequest, type IApiGetOrderResponse, type IApiOpenOrdersRequest, type IApiOpenOrdersResponse, type IApiOrderHistoryRequest, type IApiOrderHistoryResponse, type IApiPositionsRequest, type IApiPositionsResponse, type IApiPreDepositCheckRequest, type IApiPreDepositCheckResponse, type IApiPreOrderCheckRequest, type IApiPreOrderCheckResponse, type IApiQueryListFundingAccountSummaryRequest, type IApiQueryListFundingAccountSummaryResponse, type IApiQueryListSubAccountSummaryRequest, type IApiQueryListSubAccountSummaryResponse, type IApiQueryTradingPerformanceRequest, type IApiQueryTradingPerformanceResponse, type IApiQueryTradingPerformanceTrendRequest, type IApiQueryTradingPerformanceTrendResponse, type IApiSetInitialLeverageRequest, type IApiSetInitialLeverageResponse, type IApiSocializedLossStatusResponse, type IApiSubAccountHistoryRequest, type IApiSubAccountHistoryResponse, type IApiSubAccountSummaryRequest, type IApiSubAccountSummaryResponse, type IApiTimedAssetExposureRequest, type IApiTimedAssetExposureResponse, type IApiTransferHistoryRequest, type IApiTransferHistoryResponse, type IApiTransferRequest, type IApiWithdrawalHistoryRequest, type IApiWithdrawalHistoryResponse, type IApiWithdrawalRequest, type IConfig } from '../interfaces';
|
|
3
|
+
export declare class TDG {
|
|
4
|
+
private readonly _axios;
|
|
5
|
+
private readonly _fullUrl;
|
|
6
|
+
private readonly _liteUrl;
|
|
7
|
+
constructor(config: IConfig);
|
|
8
|
+
get axios(): import("axios").AxiosInstance;
|
|
9
|
+
/** ===== TRANSFER ===== */
|
|
10
|
+
/**
|
|
11
|
+
* @see https://api-docs.grvt.io/trading_api/#predepositcheck
|
|
12
|
+
*/
|
|
13
|
+
preDepositCheck(payload: IApiPreDepositCheckRequest, config?: AxiosRequestConfig): Promise<IApiPreDepositCheckResponse>;
|
|
14
|
+
/**
|
|
15
|
+
* @see https://api-docs.grvt.io/trading_api/#deposit-history
|
|
16
|
+
*/
|
|
17
|
+
depositHistory(payload: IApiDepositHistoryRequest, config?: AxiosRequestConfig): Promise<IApiDepositHistoryResponse>;
|
|
18
|
+
/**
|
|
19
|
+
* TODO: missing response interface
|
|
20
|
+
* @see https://api-docs.grvt.io/trading_api/#transfer
|
|
21
|
+
*/
|
|
22
|
+
transfer(payload: IApiTransferRequest, config?: AxiosRequestConfig): Promise<{
|
|
23
|
+
acknowledgement: boolean;
|
|
24
|
+
}>;
|
|
25
|
+
/**
|
|
26
|
+
* @see https://api-docs.grvt.io/trading_api/#transfer-history
|
|
27
|
+
*/
|
|
28
|
+
transferHistory(payload: IApiTransferHistoryRequest, config?: AxiosRequestConfig): Promise<IApiTransferHistoryResponse>;
|
|
29
|
+
/**
|
|
30
|
+
* TODO: missing response interface
|
|
31
|
+
* @see https://api-docs.grvt.io/trading_api/#withdrawal
|
|
32
|
+
*/
|
|
33
|
+
withdrawal(payload: IApiWithdrawalRequest, config?: AxiosRequestConfig): Promise<{
|
|
34
|
+
acknowledgement: boolean;
|
|
35
|
+
}>;
|
|
36
|
+
socializedLossStatus(config?: AxiosRequestConfig): Promise<IApiSocializedLossStatusResponse>;
|
|
37
|
+
/**
|
|
38
|
+
* @see https://api-docs.grvt.io/trading_api/#withdrawal-history
|
|
39
|
+
*/
|
|
40
|
+
withdrawalHistory(payload: IApiWithdrawalHistoryRequest, config?: AxiosRequestConfig): Promise<IApiWithdrawalHistoryResponse>;
|
|
41
|
+
/** ===== ACCOUNT ===== */
|
|
42
|
+
/**
|
|
43
|
+
* @see https://api-docs.grvt.io/trading_api/#positions
|
|
44
|
+
*/
|
|
45
|
+
positions(payload: IApiPositionsRequest, config?: AxiosRequestConfig): Promise<IApiPositionsResponse>;
|
|
46
|
+
/**
|
|
47
|
+
* @see https://api-docs.grvt.io/trading_api/#sub-account-summary
|
|
48
|
+
*/
|
|
49
|
+
subAccountSummary(payload: IApiSubAccountSummaryRequest, config?: AxiosRequestConfig): Promise<IApiSubAccountSummaryResponse>;
|
|
50
|
+
subAccountSummaryHistory(payload: IApiQueryListSubAccountSummaryRequest, config?: AxiosRequestConfig): Promise<IApiQueryListSubAccountSummaryResponse>;
|
|
51
|
+
/**
|
|
52
|
+
* @see https://api-docs.grvt.io/trading_api/#sub-account-history
|
|
53
|
+
*/
|
|
54
|
+
subAccountHistory(payload: IApiSubAccountHistoryRequest, config?: AxiosRequestConfig): Promise<IApiSubAccountHistoryResponse>;
|
|
55
|
+
/**
|
|
56
|
+
* @see https://api-docs.grvt.io/market_data_api/#trade-history
|
|
57
|
+
*/
|
|
58
|
+
fillHistory(payload: IApiFillHistoryRequest, config?: AxiosRequestConfig): Promise<IApiFillHistoryResponse>;
|
|
59
|
+
/** ===== ORDER ===== */
|
|
60
|
+
/**
|
|
61
|
+
* @see https://api-docs.grvt.io/trading_api/#create-order
|
|
62
|
+
*/
|
|
63
|
+
createOrder(payload: IApiCreateOrderRequest, config?: AxiosRequestConfig): Promise<IApiCreateOrderResponse>;
|
|
64
|
+
createBulkOrders(payload: IApiCreateBulkOrdersRequest, config?: AxiosRequestConfig): Promise<IApiCreateBulkOrdersResponse>;
|
|
65
|
+
preOrderCheck(payload: IApiPreOrderCheckRequest, config?: AxiosRequestConfig): Promise<IApiPreOrderCheckResponse>;
|
|
66
|
+
dedustPosition(payload: IApiDedustPositionRequest, config?: AxiosRequestConfig): Promise<IApiDedustPositionResponse>;
|
|
67
|
+
/**
|
|
68
|
+
* @see https://api-docs.grvt.io/trading_api/#cancel-order
|
|
69
|
+
*/
|
|
70
|
+
cancelOrder(payload: IApiCancelOrderRequest, config?: AxiosRequestConfig): Promise<IApiCancelOrderResponse>;
|
|
71
|
+
/**
|
|
72
|
+
* @see https://api-docs.grvt.io/trading_api/#cancel-all-orders
|
|
73
|
+
*/
|
|
74
|
+
cancelAllOrders(payload: IApiCancelAllOrdersRequest, config?: AxiosRequestConfig): Promise<IApiCancelAllOrdersResponse>;
|
|
75
|
+
/**
|
|
76
|
+
* TODO: missing interfaces
|
|
77
|
+
* @see https://api-docs.grvt.io/trading_api/#cancel-all-session-orders
|
|
78
|
+
*/
|
|
79
|
+
cancelAllSessionOrders(): void;
|
|
80
|
+
/**
|
|
81
|
+
* @see https://api-docs.grvt.io/trading_api/#get-order
|
|
82
|
+
*/
|
|
83
|
+
order(payload: IApiGetOrderRequest, config?: AxiosRequestConfig): Promise<IApiGetOrderResponse>;
|
|
84
|
+
/**
|
|
85
|
+
* @see https://api-docs.grvt.io/trading_api/#open-orders
|
|
86
|
+
*/
|
|
87
|
+
openOrders(payload: IApiOpenOrdersRequest, config?: AxiosRequestConfig): Promise<IApiOpenOrdersResponse>;
|
|
88
|
+
orderGroup(payload: IApiGetOrderGroupRequest, config?: AxiosRequestConfig): Promise<IApiGetOrderGroupResponse>;
|
|
89
|
+
/**
|
|
90
|
+
* @see https://api-docs.grvt.io/trading_api/#order-history
|
|
91
|
+
*/
|
|
92
|
+
orderHistory(payload: IApiOrderHistoryRequest, config?: AxiosRequestConfig): Promise<IApiOrderHistoryResponse>;
|
|
93
|
+
/**
|
|
94
|
+
* @see https://api-docs.grvt.io/trading_api/#get-all-initial-leverage
|
|
95
|
+
*/
|
|
96
|
+
getAllInitialLeverage(payload: IApiGetAllInitialLeverageRequest, config?: AxiosRequestConfig): Promise<IApiGetAllInitialLeverageResponse>;
|
|
97
|
+
/**
|
|
98
|
+
* @see https://api-docs.grvt.io/trading_api/#set-initial-leverage
|
|
99
|
+
*/
|
|
100
|
+
setInitialLeverage(payload: IApiSetInitialLeverageRequest, config?: AxiosRequestConfig): Promise<IApiSetInitialLeverageResponse>;
|
|
101
|
+
getMarginTiers(config?: AxiosRequestConfig): Promise<IApiGetMarginTiersResponse>;
|
|
102
|
+
/**
|
|
103
|
+
* @see https://api-docs.grvt.io/trading_api/#funding-payment-history
|
|
104
|
+
*/
|
|
105
|
+
fundingPaymentHistory(payload: IApiFundingPaymentHistoryRequest, config?: AxiosRequestConfig): Promise<IApiFundingPaymentHistoryResponse>;
|
|
106
|
+
/**
|
|
107
|
+
* @see https://api-docs.grvt.io/trading_api/#funding-account-summary
|
|
108
|
+
*/
|
|
109
|
+
fundingAccountSummary(config?: AxiosRequestConfig): Promise<IApiFundingAccountSummaryResponse>;
|
|
110
|
+
fundingAccountSummaryHistory(payload: IApiQueryListFundingAccountSummaryRequest, config?: AxiosRequestConfig): Promise<IApiQueryListFundingAccountSummaryResponse>;
|
|
111
|
+
/**
|
|
112
|
+
* @see https://api-docs.grvt.io/trading_api/#aggregated-account-summary
|
|
113
|
+
*/
|
|
114
|
+
aggregatedAccountSummary(config?: AxiosRequestConfig): Promise<IApiAggregatedAccountSummaryResponse>;
|
|
115
|
+
tradingPerformance(payload: IApiQueryTradingPerformanceRequest, config?: AxiosRequestConfig): Promise<IApiQueryTradingPerformanceResponse>;
|
|
116
|
+
tradingPerformanceTrend(payload: IApiQueryTradingPerformanceTrendRequest, config?: AxiosRequestConfig): Promise<IApiQueryTradingPerformanceTrendResponse>;
|
|
117
|
+
assetExposure(payload: IApiTimedAssetExposureRequest, config?: AxiosRequestConfig): Promise<IApiTimedAssetExposureResponse>;
|
|
118
|
+
}
|
package/TDG/index.js
ADDED
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TDG = void 0;
|
|
4
|
+
const interfaces_1 = require("../interfaces");
|
|
5
|
+
const services_1 = require("../services");
|
|
6
|
+
const utils_1 = require("../utils");
|
|
7
|
+
class TDG {
|
|
8
|
+
constructor(config) {
|
|
9
|
+
this._axios = (0, services_1.createAxiosInstance)();
|
|
10
|
+
const parseConfig = (0, interfaces_1.validConfig)(config);
|
|
11
|
+
this._fullUrl = `${parseConfig.host}/full/${parseConfig.version}`;
|
|
12
|
+
this._liteUrl = `${parseConfig.host}/lite/${parseConfig.version}`;
|
|
13
|
+
}
|
|
14
|
+
get axios() {
|
|
15
|
+
return this._axios;
|
|
16
|
+
}
|
|
17
|
+
/** ===== TRANSFER ===== */
|
|
18
|
+
/**
|
|
19
|
+
* @see https://api-docs.grvt.io/trading_api/#predepositcheck
|
|
20
|
+
*/
|
|
21
|
+
preDepositCheck(payload, config) {
|
|
22
|
+
return this._axios.post(this._liteUrl + '/pre_deposit_check', utils_1.Utils.schemaMap(payload, interfaces_1.API_PRE_DEPOSIT_CHECK_REQUEST_MAP.FULL_TO_LITE, true), config).then((response) => {
|
|
23
|
+
return utils_1.Utils.schemaMap(response.data, interfaces_1.API_PRE_DEPOSIT_CHECK_RESPONSE_MAP.LITE_TO_FULL);
|
|
24
|
+
}).catch(utils_1.Utils.coverApiError);
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* @see https://api-docs.grvt.io/trading_api/#deposit-history
|
|
28
|
+
*/
|
|
29
|
+
depositHistory(payload, config) {
|
|
30
|
+
return this._axios.post(this._liteUrl + '/deposit_history', utils_1.Utils.schemaMap(payload, interfaces_1.API_DEPOSIT_HISTORY_REQUEST_MAP.FULL_TO_LITE, true), config).then((response) => {
|
|
31
|
+
return utils_1.Utils.schemaMap(response.data, interfaces_1.API_DEPOSIT_HISTORY_RESPONSE_MAP.LITE_TO_FULL);
|
|
32
|
+
}).catch(utils_1.Utils.coverApiError);
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* TODO: missing response interface
|
|
36
|
+
* @see https://api-docs.grvt.io/trading_api/#transfer
|
|
37
|
+
*/
|
|
38
|
+
transfer(payload, config) {
|
|
39
|
+
return this._axios.post(this._liteUrl + '/transfer', utils_1.Utils.schemaMap(payload, interfaces_1.API_TRANSFER_REQUEST_MAP.FULL_TO_LITE, true), config).then((response) => {
|
|
40
|
+
return utils_1.Utils.schemaMap(response.data, interfaces_1.ACK_RESPONSE_MAP.LITE_TO_FULL);
|
|
41
|
+
}).catch(utils_1.Utils.coverApiError);
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* @see https://api-docs.grvt.io/trading_api/#transfer-history
|
|
45
|
+
*/
|
|
46
|
+
transferHistory(payload, config) {
|
|
47
|
+
return this._axios.post(this._liteUrl + '/transfer_history', utils_1.Utils.schemaMap(payload, interfaces_1.API_TRANSFER_HISTORY_REQUEST_MAP.FULL_TO_LITE, true), config).then((response) => {
|
|
48
|
+
return utils_1.Utils.schemaMap(response.data, interfaces_1.API_TRANSFER_HISTORY_RESPONSE_MAP.LITE_TO_FULL);
|
|
49
|
+
}).catch(utils_1.Utils.coverApiError);
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* TODO: missing response interface
|
|
53
|
+
* @see https://api-docs.grvt.io/trading_api/#withdrawal
|
|
54
|
+
*/
|
|
55
|
+
withdrawal(payload, config) {
|
|
56
|
+
return this._axios.post(this._liteUrl + '/withdrawal', utils_1.Utils.schemaMap(payload, interfaces_1.API_WITHDRAWAL_REQUEST_MAP.FULL_TO_LITE, true), config).then((response) => {
|
|
57
|
+
return utils_1.Utils.schemaMap(response.data, interfaces_1.ACK_RESPONSE_MAP.LITE_TO_FULL);
|
|
58
|
+
}).catch(utils_1.Utils.coverApiError);
|
|
59
|
+
}
|
|
60
|
+
socializedLossStatus(config) {
|
|
61
|
+
return this._axios.post(this._liteUrl + '/socialized_loss_status', {}, config).then((response) => {
|
|
62
|
+
return utils_1.Utils.schemaMap(response.data, interfaces_1.API_SOCIALIZED_LOSS_STATUS_RESPONSE_MAP.LITE_TO_FULL);
|
|
63
|
+
}).catch(utils_1.Utils.coverApiError);
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* @see https://api-docs.grvt.io/trading_api/#withdrawal-history
|
|
67
|
+
*/
|
|
68
|
+
withdrawalHistory(payload, config) {
|
|
69
|
+
return this._axios.post(this._liteUrl + '/withdrawal_history', utils_1.Utils.schemaMap(payload, interfaces_1.API_WITHDRAWAL_HISTORY_REQUEST_MAP.FULL_TO_LITE, true), config).then((response) => {
|
|
70
|
+
return utils_1.Utils.schemaMap(response.data, interfaces_1.API_WITHDRAWAL_HISTORY_RESPONSE_MAP.LITE_TO_FULL);
|
|
71
|
+
}).catch(utils_1.Utils.coverApiError);
|
|
72
|
+
}
|
|
73
|
+
/** ===== ACCOUNT ===== */
|
|
74
|
+
/**
|
|
75
|
+
* @see https://api-docs.grvt.io/trading_api/#positions
|
|
76
|
+
*/
|
|
77
|
+
positions(payload, config) {
|
|
78
|
+
return this._axios.post(this._liteUrl + '/positions', utils_1.Utils.schemaMap(payload, interfaces_1.API_POSITIONS_REQUEST_MAP.FULL_TO_LITE, true), config).then((response) => {
|
|
79
|
+
return utils_1.Utils.schemaMap(response.data, interfaces_1.API_POSITIONS_RESPONSE_MAP.LITE_TO_FULL);
|
|
80
|
+
}).catch(utils_1.Utils.coverApiError);
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* @see https://api-docs.grvt.io/trading_api/#sub-account-summary
|
|
84
|
+
*/
|
|
85
|
+
subAccountSummary(payload, config) {
|
|
86
|
+
return this._axios.post(this._liteUrl + '/account_summary', utils_1.Utils.schemaMap(payload, interfaces_1.API_SUB_ACCOUNT_SUMMARY_REQUEST_MAP.FULL_TO_LITE, true), config).then((response) => {
|
|
87
|
+
return utils_1.Utils.schemaMap(response.data, interfaces_1.API_SUB_ACCOUNT_SUMMARY_RESPONSE_MAP.LITE_TO_FULL);
|
|
88
|
+
}).catch(utils_1.Utils.coverApiError);
|
|
89
|
+
}
|
|
90
|
+
subAccountSummaryHistory(payload, config) {
|
|
91
|
+
return this._axios.post(this._liteUrl + '/sub_account_summary_history', utils_1.Utils.schemaMap(payload, interfaces_1.API_QUERY_LIST_SUB_ACCOUNT_SUMMARY_REQUEST_MAP.FULL_TO_LITE, true), config).then((response) => {
|
|
92
|
+
return utils_1.Utils.schemaMap(response.data, interfaces_1.API_QUERY_LIST_SUB_ACCOUNT_SUMMARY_RESPONSE_MAP.LITE_TO_FULL);
|
|
93
|
+
}).catch(utils_1.Utils.coverApiError);
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* @see https://api-docs.grvt.io/trading_api/#sub-account-history
|
|
97
|
+
*/
|
|
98
|
+
subAccountHistory(payload, config) {
|
|
99
|
+
return this._axios.post(this._liteUrl + '/account_history', utils_1.Utils.schemaMap(payload, interfaces_1.API_SUB_ACCOUNT_HISTORY_REQUEST_MAP.FULL_TO_LITE, true), config).then((response) => {
|
|
100
|
+
return utils_1.Utils.schemaMap(response.data, interfaces_1.API_SUB_ACCOUNT_HISTORY_RESPONSE_MAP.LITE_TO_FULL);
|
|
101
|
+
}).catch(utils_1.Utils.coverApiError);
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* @see https://api-docs.grvt.io/market_data_api/#trade-history
|
|
105
|
+
*/
|
|
106
|
+
fillHistory(payload, config) {
|
|
107
|
+
return this._axios.post(this._liteUrl + '/fill_history', utils_1.Utils.schemaMap(payload, interfaces_1.API_FILL_HISTORY_REQUEST_MAP.FULL_TO_LITE, true), config).then((response) => {
|
|
108
|
+
return utils_1.Utils.schemaMap(response.data, interfaces_1.API_FILL_HISTORY_RESPONSE_MAP.LITE_TO_FULL);
|
|
109
|
+
}).catch(utils_1.Utils.coverApiError);
|
|
110
|
+
}
|
|
111
|
+
/** ===== ORDER ===== */
|
|
112
|
+
/**
|
|
113
|
+
* @see https://api-docs.grvt.io/trading_api/#create-order
|
|
114
|
+
*/
|
|
115
|
+
createOrder(payload, config) {
|
|
116
|
+
return this._axios.post(this._liteUrl + '/create_order', utils_1.Utils.schemaMap(payload, interfaces_1.API_CREATE_ORDER_REQUEST_MAP.FULL_TO_LITE, true), config).then((response) => {
|
|
117
|
+
return utils_1.Utils.schemaMap(response.data, interfaces_1.API_CREATE_ORDER_RESPONSE_MAP.LITE_TO_FULL);
|
|
118
|
+
}).catch(utils_1.Utils.coverApiError);
|
|
119
|
+
}
|
|
120
|
+
createBulkOrders(payload, config) {
|
|
121
|
+
return this._axios.post(this._liteUrl + '/create_bulk_orders', utils_1.Utils.schemaMap(payload, interfaces_1.API_CREATE_BULK_ORDERS_REQUEST_MAP.FULL_TO_LITE, true), config).then((response) => {
|
|
122
|
+
return utils_1.Utils.schemaMap(response.data, interfaces_1.API_CREATE_BULK_ORDERS_RESPONSE_MAP.LITE_TO_FULL);
|
|
123
|
+
}).catch(utils_1.Utils.coverApiError);
|
|
124
|
+
}
|
|
125
|
+
preOrderCheck(payload, config) {
|
|
126
|
+
return this._axios.post(this._liteUrl + '/pre_order_check', utils_1.Utils.schemaMap(payload, interfaces_1.API_PRE_ORDER_CHECK_REQUEST_MAP.FULL_TO_LITE, true), config).then((response) => {
|
|
127
|
+
return utils_1.Utils.schemaMap(response.data, interfaces_1.API_PRE_ORDER_CHECK_RESPONSE_MAP.LITE_TO_FULL);
|
|
128
|
+
}).catch(utils_1.Utils.coverApiError);
|
|
129
|
+
}
|
|
130
|
+
dedustPosition(payload, config) {
|
|
131
|
+
return this._axios.post(this._liteUrl + '/dedust_position', utils_1.Utils.schemaMap(payload, interfaces_1.API_DEDUST_POSITION_REQUEST_MAP.FULL_TO_LITE, true), config).then((response) => {
|
|
132
|
+
return utils_1.Utils.schemaMap(response.data, interfaces_1.API_DEDUST_POSITION_RESPONSE_MAP.LITE_TO_FULL);
|
|
133
|
+
}).catch(utils_1.Utils.coverApiError);
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* @see https://api-docs.grvt.io/trading_api/#cancel-order
|
|
137
|
+
*/
|
|
138
|
+
cancelOrder(payload, config) {
|
|
139
|
+
return this._axios.post(this._liteUrl + '/cancel_order', utils_1.Utils.schemaMap(payload, interfaces_1.API_CANCEL_ORDER_REQUEST_MAP.FULL_TO_LITE, true), config).then((response) => {
|
|
140
|
+
return utils_1.Utils.schemaMap(response.data, interfaces_1.API_CANCEL_ORDER_RESPONSE_MAP.LITE_TO_FULL);
|
|
141
|
+
}).catch(utils_1.Utils.coverApiError);
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* @see https://api-docs.grvt.io/trading_api/#cancel-all-orders
|
|
145
|
+
*/
|
|
146
|
+
cancelAllOrders(payload, config) {
|
|
147
|
+
return this._axios.post(this._liteUrl + '/cancel_all_orders', utils_1.Utils.schemaMap(payload, interfaces_1.API_CANCEL_ALL_ORDERS_REQUEST_MAP.FULL_TO_LITE, true), config).then((response) => {
|
|
148
|
+
return utils_1.Utils.schemaMap(response.data, interfaces_1.API_CANCEL_ALL_ORDERS_RESPONSE_MAP.LITE_TO_FULL);
|
|
149
|
+
}).catch(utils_1.Utils.coverApiError);
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* TODO: missing interfaces
|
|
153
|
+
* @see https://api-docs.grvt.io/trading_api/#cancel-all-session-orders
|
|
154
|
+
*/
|
|
155
|
+
cancelAllSessionOrders() {
|
|
156
|
+
throw new Error('This has been marked as a POST-LAUNCH feature, see https://api-docs.grvt.io/trading_api/#cancel-all-session-orders');
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* @see https://api-docs.grvt.io/trading_api/#get-order
|
|
160
|
+
*/
|
|
161
|
+
order(payload, config) {
|
|
162
|
+
return this._axios.post(this._liteUrl + '/order', utils_1.Utils.schemaMap(payload, interfaces_1.API_GET_ORDER_REQUEST_MAP.FULL_TO_LITE, true), config).then((response) => {
|
|
163
|
+
return utils_1.Utils.schemaMap(response.data, interfaces_1.API_GET_ORDER_RESPONSE_MAP.LITE_TO_FULL);
|
|
164
|
+
}).catch(utils_1.Utils.coverApiError);
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* @see https://api-docs.grvt.io/trading_api/#open-orders
|
|
168
|
+
*/
|
|
169
|
+
openOrders(payload, config) {
|
|
170
|
+
return this._axios.post(this._liteUrl + '/open_orders', utils_1.Utils.schemaMap(payload, interfaces_1.API_OPEN_ORDERS_REQUEST_MAP.FULL_TO_LITE, true), config).then((response) => {
|
|
171
|
+
return utils_1.Utils.schemaMap(response.data, interfaces_1.API_OPEN_ORDERS_RESPONSE_MAP.LITE_TO_FULL);
|
|
172
|
+
}).catch(utils_1.Utils.coverApiError);
|
|
173
|
+
}
|
|
174
|
+
orderGroup(payload, config) {
|
|
175
|
+
return this._axios.post(this._liteUrl + '/order_group', utils_1.Utils.schemaMap(payload, interfaces_1.API_GET_ORDER_GROUP_REQUEST_MAP.FULL_TO_LITE, true), config).then((response) => {
|
|
176
|
+
return utils_1.Utils.schemaMap(response.data, interfaces_1.API_GET_ORDER_GROUP_RESPONSE_MAP.LITE_TO_FULL);
|
|
177
|
+
}).catch(utils_1.Utils.coverApiError);
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* @see https://api-docs.grvt.io/trading_api/#order-history
|
|
181
|
+
*/
|
|
182
|
+
orderHistory(payload, config) {
|
|
183
|
+
return this._axios.post(this._liteUrl + '/order_history', utils_1.Utils.schemaMap(payload, interfaces_1.API_ORDER_HISTORY_REQUEST_MAP.FULL_TO_LITE, true), config).then((response) => {
|
|
184
|
+
return utils_1.Utils.schemaMap(response.data, interfaces_1.API_ORDER_HISTORY_RESPONSE_MAP.LITE_TO_FULL);
|
|
185
|
+
}).catch(utils_1.Utils.coverApiError);
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* @see https://api-docs.grvt.io/trading_api/#get-all-initial-leverage
|
|
189
|
+
*/
|
|
190
|
+
getAllInitialLeverage(payload, config) {
|
|
191
|
+
return this._axios.post(this._liteUrl + '/get_all_initial_leverage', utils_1.Utils.schemaMap(payload, interfaces_1.API_GET_ALL_INITIAL_LEVERAGE_REQUEST_MAP.FULL_TO_LITE, true), config).then((response) => {
|
|
192
|
+
return utils_1.Utils.schemaMap(response.data, interfaces_1.API_GET_ALL_INITIAL_LEVERAGE_RESPONSE_MAP.LITE_TO_FULL);
|
|
193
|
+
}).catch(utils_1.Utils.coverApiError);
|
|
194
|
+
}
|
|
195
|
+
/**
|
|
196
|
+
* @see https://api-docs.grvt.io/trading_api/#set-initial-leverage
|
|
197
|
+
*/
|
|
198
|
+
setInitialLeverage(payload, config) {
|
|
199
|
+
return this._axios.post(this._liteUrl + '/set_initial_leverage', utils_1.Utils.schemaMap(payload, interfaces_1.API_SET_INITIAL_LEVERAGE_REQUEST_MAP.FULL_TO_LITE, true), config).then((response) => {
|
|
200
|
+
return utils_1.Utils.schemaMap(response.data, interfaces_1.API_SET_INITIAL_LEVERAGE_RESPONSE_MAP.LITE_TO_FULL);
|
|
201
|
+
}).catch(utils_1.Utils.coverApiError);
|
|
202
|
+
}
|
|
203
|
+
getMarginTiers(config) {
|
|
204
|
+
return this._axios.post(this._liteUrl + '/get_margin_tiers', null, config).then((response) => {
|
|
205
|
+
return utils_1.Utils.schemaMap(response.data, interfaces_1.API_GET_MARGIN_TIERS_RESPONSE_MAP.LITE_TO_FULL);
|
|
206
|
+
}).catch(utils_1.Utils.coverApiError);
|
|
207
|
+
}
|
|
208
|
+
/**
|
|
209
|
+
* @see https://api-docs.grvt.io/trading_api/#funding-payment-history
|
|
210
|
+
*/
|
|
211
|
+
fundingPaymentHistory(payload, config) {
|
|
212
|
+
return this._axios.post(this._liteUrl + '/funding_payment_history', utils_1.Utils.schemaMap(payload, interfaces_1.API_FUNDING_PAYMENT_HISTORY_REQUEST_MAP.FULL_TO_LITE, true), config).then((response) => {
|
|
213
|
+
return utils_1.Utils.schemaMap(response.data, interfaces_1.API_FUNDING_PAYMENT_HISTORY_RESPONSE_MAP.LITE_TO_FULL);
|
|
214
|
+
}).catch(utils_1.Utils.coverApiError);
|
|
215
|
+
}
|
|
216
|
+
/**
|
|
217
|
+
* @see https://api-docs.grvt.io/trading_api/#funding-account-summary
|
|
218
|
+
*/
|
|
219
|
+
fundingAccountSummary(config) {
|
|
220
|
+
return this._axios.post(this._liteUrl + '/funding_account_summary', null, config).then((response) => {
|
|
221
|
+
return utils_1.Utils.schemaMap(response.data, interfaces_1.API_FUNDING_ACCOUNT_SUMMARY_RESPONSE_MAP.LITE_TO_FULL);
|
|
222
|
+
}).catch(utils_1.Utils.coverApiError);
|
|
223
|
+
}
|
|
224
|
+
fundingAccountSummaryHistory(payload, config) {
|
|
225
|
+
return this._axios.post(this._liteUrl + '/funding_account_summary_history', utils_1.Utils.schemaMap(payload, interfaces_1.API_QUERY_LIST_FUNDING_ACCOUNT_SUMMARY_REQUEST_MAP.FULL_TO_LITE, true), config).then((response) => {
|
|
226
|
+
return utils_1.Utils.schemaMap(response.data, interfaces_1.API_QUERY_LIST_FUNDING_ACCOUNT_SUMMARY_RESPONSE_MAP.LITE_TO_FULL);
|
|
227
|
+
}).catch(utils_1.Utils.coverApiError);
|
|
228
|
+
}
|
|
229
|
+
/**
|
|
230
|
+
* @see https://api-docs.grvt.io/trading_api/#aggregated-account-summary
|
|
231
|
+
*/
|
|
232
|
+
aggregatedAccountSummary(config) {
|
|
233
|
+
return this._axios.post(this._liteUrl + '/aggregated_account_summary', null, config).then((response) => {
|
|
234
|
+
return utils_1.Utils.schemaMap(response.data, interfaces_1.API_AGGREGATED_ACCOUNT_SUMMARY_RESPONSE_MAP.LITE_TO_FULL);
|
|
235
|
+
}).catch(utils_1.Utils.coverApiError);
|
|
236
|
+
}
|
|
237
|
+
tradingPerformance(payload, config) {
|
|
238
|
+
return this._axios.post(this._liteUrl + '/trading_performance', utils_1.Utils.schemaMap(payload, interfaces_1.API_QUERY_TRADING_PERFORMANCE_REQUEST_MAP.FULL_TO_LITE, true), config).then((response) => {
|
|
239
|
+
return utils_1.Utils.schemaMap(response.data, interfaces_1.API_QUERY_TRADING_PERFORMANCE_RESPONSE_MAP.LITE_TO_FULL);
|
|
240
|
+
}).catch(utils_1.Utils.coverApiError);
|
|
241
|
+
}
|
|
242
|
+
tradingPerformanceTrend(payload, config) {
|
|
243
|
+
return this._axios.post(this._liteUrl + '/trading_performance_trend', utils_1.Utils.schemaMap(payload, interfaces_1.API_QUERY_TRADING_PERFORMANCE_TREND_REQUEST_MAP.FULL_TO_LITE, true), config).then((response) => {
|
|
244
|
+
return utils_1.Utils.schemaMap(response.data, interfaces_1.API_QUERY_TRADING_PERFORMANCE_TREND_RESPONSE_MAP.LITE_TO_FULL);
|
|
245
|
+
}).catch(utils_1.Utils.coverApiError);
|
|
246
|
+
}
|
|
247
|
+
assetExposure(payload, config) {
|
|
248
|
+
return this._axios.post(this._liteUrl + '/asset_exposure', utils_1.Utils.schemaMap(payload, interfaces_1.API_TIMED_ASSET_EXPOSURE_REQUEST_MAP.FULL_TO_LITE, true), config).then((response) => {
|
|
249
|
+
return utils_1.Utils.schemaMap(response.data, interfaces_1.API_TIMED_ASSET_EXPOSURE_RESPONSE_MAP.LITE_TO_FULL);
|
|
250
|
+
}).catch(utils_1.Utils.coverApiError);
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
exports.TDG = TDG;
|
package/index.d.ts
ADDED
package/index.js
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
const MDG_1 = require("./MDG");
|
|
18
|
+
const TDG_1 = require("./TDG");
|
|
19
|
+
__exportStar(require("./MDG"), exports);
|
|
20
|
+
__exportStar(require("./TDG"), exports);
|
|
21
|
+
__exportStar(require("./interfaces"), exports);
|
|
22
|
+
exports.default = {
|
|
23
|
+
MDG: MDG_1.MDG,
|
|
24
|
+
TDG: TDG_1.TDG
|
|
25
|
+
};
|