@grvt/client 1.4.30 → 1.5.0-alpha.0

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/TDG/index.js CHANGED
@@ -2,6 +2,80 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.TDG = void 0;
4
4
  const interfaces_1 = require("../interfaces");
5
+ const ack_response_1 = require("../interfaces/codegen/schema-maps/ack_response");
6
+ const api_aggregated_account_summary_response_1 = require("../interfaces/codegen/schema-maps/api_aggregated_account_summary_response");
7
+ const api_cancel_all_orders_request_1 = require("../interfaces/codegen/schema-maps/api_cancel_all_orders_request");
8
+ const api_cancel_all_orders_response_1 = require("../interfaces/codegen/schema-maps/api_cancel_all_orders_response");
9
+ const api_cancel_order_request_1 = require("../interfaces/codegen/schema-maps/api_cancel_order_request");
10
+ const api_cancel_order_response_1 = require("../interfaces/codegen/schema-maps/api_cancel_order_response");
11
+ const api_create_bulk_orders_request_1 = require("../interfaces/codegen/schema-maps/api_create_bulk_orders_request");
12
+ const api_create_bulk_orders_response_1 = require("../interfaces/codegen/schema-maps/api_create_bulk_orders_response");
13
+ const api_create_order_request_1 = require("../interfaces/codegen/schema-maps/api_create_order_request");
14
+ const api_create_order_response_1 = require("../interfaces/codegen/schema-maps/api_create_order_response");
15
+ const api_dedust_position_request_1 = require("../interfaces/codegen/schema-maps/api_dedust_position_request");
16
+ const api_dedust_position_response_1 = require("../interfaces/codegen/schema-maps/api_dedust_position_response");
17
+ const api_deposit_history_request_1 = require("../interfaces/codegen/schema-maps/api_deposit_history_request");
18
+ const api_deposit_history_response_1 = require("../interfaces/codegen/schema-maps/api_deposit_history_response");
19
+ const api_fill_history_request_1 = require("../interfaces/codegen/schema-maps/api_fill_history_request");
20
+ const api_fill_history_response_1 = require("../interfaces/codegen/schema-maps/api_fill_history_response");
21
+ const api_funding_account_summary_response_1 = require("../interfaces/codegen/schema-maps/api_funding_account_summary_response");
22
+ const api_funding_payment_history_request_1 = require("../interfaces/codegen/schema-maps/api_funding_payment_history_request");
23
+ const api_funding_payment_history_response_1 = require("../interfaces/codegen/schema-maps/api_funding_payment_history_response");
24
+ const api_get_all_initial_leverage_request_1 = require("../interfaces/codegen/schema-maps/api_get_all_initial_leverage_request");
25
+ const api_get_all_initial_leverage_response_1 = require("../interfaces/codegen/schema-maps/api_get_all_initial_leverage_response");
26
+ const api_get_margin_tiers_response_1 = require("../interfaces/codegen/schema-maps/api_get_margin_tiers_response");
27
+ const api_get_order_group_request_1 = require("../interfaces/codegen/schema-maps/api_get_order_group_request");
28
+ const api_get_order_group_response_1 = require("../interfaces/codegen/schema-maps/api_get_order_group_response");
29
+ const api_get_order_request_1 = require("../interfaces/codegen/schema-maps/api_get_order_request");
30
+ const api_get_order_response_1 = require("../interfaces/codegen/schema-maps/api_get_order_response");
31
+ const api_open_orders_request_1 = require("../interfaces/codegen/schema-maps/api_open_orders_request");
32
+ const api_open_orders_response_1 = require("../interfaces/codegen/schema-maps/api_open_orders_response");
33
+ const api_order_history_request_1 = require("../interfaces/codegen/schema-maps/api_order_history_request");
34
+ const api_order_history_response_1 = require("../interfaces/codegen/schema-maps/api_order_history_response");
35
+ const api_positions_request_1 = require("../interfaces/codegen/schema-maps/api_positions_request");
36
+ const api_positions_response_1 = require("../interfaces/codegen/schema-maps/api_positions_response");
37
+ const api_pre_deposit_check_request_1 = require("../interfaces/codegen/schema-maps/api_pre_deposit_check_request");
38
+ const api_pre_deposit_check_response_1 = require("../interfaces/codegen/schema-maps/api_pre_deposit_check_response");
39
+ const api_pre_order_check_request_1 = require("../interfaces/codegen/schema-maps/api_pre_order_check_request");
40
+ const api_pre_order_check_response_1 = require("../interfaces/codegen/schema-maps/api_pre_order_check_response");
41
+ const api_query_list_funding_account_summary_request_1 = require("../interfaces/codegen/schema-maps/api_query_list_funding_account_summary_request");
42
+ const api_query_list_funding_account_summary_response_1 = require("../interfaces/codegen/schema-maps/api_query_list_funding_account_summary_response");
43
+ const api_query_list_sub_account_summary_request_1 = require("../interfaces/codegen/schema-maps/api_query_list_sub_account_summary_request");
44
+ const api_query_list_sub_account_summary_response_1 = require("../interfaces/codegen/schema-maps/api_query_list_sub_account_summary_response");
45
+ const api_query_trading_performance_request_1 = require("../interfaces/codegen/schema-maps/api_query_trading_performance_request");
46
+ const api_query_trading_performance_response_1 = require("../interfaces/codegen/schema-maps/api_query_trading_performance_response");
47
+ const api_query_trading_performance_trend_request_1 = require("../interfaces/codegen/schema-maps/api_query_trading_performance_trend_request");
48
+ const api_query_trading_performance_trend_response_1 = require("../interfaces/codegen/schema-maps/api_query_trading_performance_trend_response");
49
+ const api_query_vault_investor_history_request_1 = require("../interfaces/codegen/schema-maps/api_query_vault_investor_history_request");
50
+ const api_query_vault_investor_history_response_1 = require("../interfaces/codegen/schema-maps/api_query_vault_investor_history_response");
51
+ const api_query_vault_manager_investor_history_request_1 = require("../interfaces/codegen/schema-maps/api_query_vault_manager_investor_history_request");
52
+ const api_query_vault_manager_investor_history_response_1 = require("../interfaces/codegen/schema-maps/api_query_vault_manager_investor_history_response");
53
+ const api_replace_orders_request_1 = require("../interfaces/codegen/schema-maps/api_replace_orders_request");
54
+ const api_replace_orders_response_1 = require("../interfaces/codegen/schema-maps/api_replace_orders_response");
55
+ const api_set_initial_leverage_request_1 = require("../interfaces/codegen/schema-maps/api_set_initial_leverage_request");
56
+ const api_set_initial_leverage_response_1 = require("../interfaces/codegen/schema-maps/api_set_initial_leverage_response");
57
+ const api_socialized_loss_status_response_1 = require("../interfaces/codegen/schema-maps/api_socialized_loss_status_response");
58
+ const api_sub_account_history_request_1 = require("../interfaces/codegen/schema-maps/api_sub_account_history_request");
59
+ const api_sub_account_history_response_1 = require("../interfaces/codegen/schema-maps/api_sub_account_history_response");
60
+ const api_sub_account_summary_request_1 = require("../interfaces/codegen/schema-maps/api_sub_account_summary_request");
61
+ const api_sub_account_summary_response_1 = require("../interfaces/codegen/schema-maps/api_sub_account_summary_response");
62
+ const api_timed_asset_exposure_request_1 = require("../interfaces/codegen/schema-maps/api_timed_asset_exposure_request");
63
+ const api_timed_asset_exposure_response_1 = require("../interfaces/codegen/schema-maps/api_timed_asset_exposure_response");
64
+ const api_transfer_history_request_1 = require("../interfaces/codegen/schema-maps/api_transfer_history_request");
65
+ const api_transfer_history_response_1 = require("../interfaces/codegen/schema-maps/api_transfer_history_response");
66
+ const api_transfer_request_1 = require("../interfaces/codegen/schema-maps/api_transfer_request");
67
+ const api_transfer_response_1 = require("../interfaces/codegen/schema-maps/api_transfer_response");
68
+ const api_vault_burn_tokens_request_1 = require("../interfaces/codegen/schema-maps/api_vault_burn_tokens_request");
69
+ const api_vault_invest_request_1 = require("../interfaces/codegen/schema-maps/api_vault_invest_request");
70
+ const api_vault_investor_summary_request_1 = require("../interfaces/codegen/schema-maps/api_vault_investor_summary_request");
71
+ const api_vault_investor_summary_response_1 = require("../interfaces/codegen/schema-maps/api_vault_investor_summary_response");
72
+ const api_vault_redeem_cancel_request_1 = require("../interfaces/codegen/schema-maps/api_vault_redeem_cancel_request");
73
+ const api_vault_redeem_request_1 = require("../interfaces/codegen/schema-maps/api_vault_redeem_request");
74
+ const api_vault_view_redemption_queue_request_1 = require("../interfaces/codegen/schema-maps/api_vault_view_redemption_queue_request");
75
+ const api_vault_view_redemption_queue_response_1 = require("../interfaces/codegen/schema-maps/api_vault_view_redemption_queue_response");
76
+ const api_withdrawal_history_request_1 = require("../interfaces/codegen/schema-maps/api_withdrawal_history_request");
77
+ const api_withdrawal_history_response_1 = require("../interfaces/codegen/schema-maps/api_withdrawal_history_response");
78
+ const api_withdrawal_request_1 = require("../interfaces/codegen/schema-maps/api_withdrawal_request");
5
79
  const services_1 = require("../services");
6
80
  const utils_1 = require("../utils");
7
81
  class TDG {
@@ -19,53 +93,53 @@ class TDG {
19
93
  * @see https://api-docs.grvt.io/trading_api/#predepositcheck
20
94
  */
21
95
  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);
96
+ return this._axios.post(this._liteUrl + '/pre_deposit_check', utils_1.Utils.schemaMap(payload, api_pre_deposit_check_request_1.API_PRE_DEPOSIT_CHECK_REQUEST_MAP.FULL_TO_LITE, true), config).then((response) => {
97
+ return utils_1.Utils.schemaMap(response.data, api_pre_deposit_check_response_1.API_PRE_DEPOSIT_CHECK_RESPONSE_MAP.LITE_TO_FULL);
24
98
  }).catch(utils_1.Utils.coverApiError);
25
99
  }
26
100
  /**
27
101
  * @see https://api-docs.grvt.io/trading_api/#deposit-history
28
102
  */
29
103
  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);
104
+ return this._axios.post(this._liteUrl + '/deposit_history', utils_1.Utils.schemaMap(payload, api_deposit_history_request_1.API_DEPOSIT_HISTORY_REQUEST_MAP.FULL_TO_LITE, true), config).then((response) => {
105
+ return utils_1.Utils.schemaMap(response.data, api_deposit_history_response_1.API_DEPOSIT_HISTORY_RESPONSE_MAP.LITE_TO_FULL);
32
106
  }).catch(utils_1.Utils.coverApiError);
33
107
  }
34
108
  /**
35
109
  * @see https://api-docs.grvt.io/trading_api/#transfer
36
110
  */
37
111
  transfer(payload, config) {
38
- 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) => {
39
- return utils_1.Utils.schemaMap(response.data, interfaces_1.API_TRANSFER_RESPONSE_MAP.LITE_TO_FULL);
112
+ return this._axios.post(this._liteUrl + '/transfer', utils_1.Utils.schemaMap(payload, api_transfer_request_1.API_TRANSFER_REQUEST_MAP.FULL_TO_LITE, true), config).then((response) => {
113
+ return utils_1.Utils.schemaMap(response.data, api_transfer_response_1.API_TRANSFER_RESPONSE_MAP.LITE_TO_FULL);
40
114
  }).catch(utils_1.Utils.coverApiError);
41
115
  }
42
116
  /**
43
117
  * @see https://api-docs.grvt.io/trading_api/#transfer-history
44
118
  */
45
119
  transferHistory(payload, config) {
46
- 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) => {
47
- return utils_1.Utils.schemaMap(response.data, interfaces_1.API_TRANSFER_HISTORY_RESPONSE_MAP.LITE_TO_FULL);
120
+ return this._axios.post(this._liteUrl + '/transfer_history', utils_1.Utils.schemaMap(payload, api_transfer_history_request_1.API_TRANSFER_HISTORY_REQUEST_MAP.FULL_TO_LITE, true), config).then((response) => {
121
+ return utils_1.Utils.schemaMap(response.data, api_transfer_history_response_1.API_TRANSFER_HISTORY_RESPONSE_MAP.LITE_TO_FULL);
48
122
  }).catch(utils_1.Utils.coverApiError);
49
123
  }
50
124
  /**
51
125
  * @see https://api-docs.grvt.io/trading_api/#withdrawal
52
126
  */
53
127
  withdrawal(payload, config) {
54
- 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) => {
55
- return utils_1.Utils.schemaMap(response.data, interfaces_1.ACK_RESPONSE_MAP.LITE_TO_FULL);
128
+ return this._axios.post(this._liteUrl + '/withdrawal', utils_1.Utils.schemaMap(payload, api_withdrawal_request_1.API_WITHDRAWAL_REQUEST_MAP.FULL_TO_LITE, true), config).then((response) => {
129
+ return utils_1.Utils.schemaMap(response.data, ack_response_1.ACK_RESPONSE_MAP.LITE_TO_FULL);
56
130
  }).catch(utils_1.Utils.coverApiError);
57
131
  }
58
132
  socializedLossStatus(config) {
59
133
  return this._axios.post(this._liteUrl + '/socialized_loss_status', {}, config).then((response) => {
60
- return utils_1.Utils.schemaMap(response.data, interfaces_1.API_SOCIALIZED_LOSS_STATUS_RESPONSE_MAP.LITE_TO_FULL);
134
+ return utils_1.Utils.schemaMap(response.data, api_socialized_loss_status_response_1.API_SOCIALIZED_LOSS_STATUS_RESPONSE_MAP.LITE_TO_FULL);
61
135
  }).catch(utils_1.Utils.coverApiError);
62
136
  }
63
137
  /**
64
138
  * @see https://api-docs.grvt.io/trading_api/#withdrawal-history
65
139
  */
66
140
  withdrawalHistory(payload, config) {
67
- 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) => {
68
- return utils_1.Utils.schemaMap(response.data, interfaces_1.API_WITHDRAWAL_HISTORY_RESPONSE_MAP.LITE_TO_FULL);
141
+ return this._axios.post(this._liteUrl + '/withdrawal_history', utils_1.Utils.schemaMap(payload, api_withdrawal_history_request_1.API_WITHDRAWAL_HISTORY_REQUEST_MAP.FULL_TO_LITE, true), config).then((response) => {
142
+ return utils_1.Utils.schemaMap(response.data, api_withdrawal_history_response_1.API_WITHDRAWAL_HISTORY_RESPONSE_MAP.LITE_TO_FULL);
69
143
  }).catch(utils_1.Utils.coverApiError);
70
144
  }
71
145
  /** ===== ACCOUNT ===== */
@@ -73,37 +147,37 @@ class TDG {
73
147
  * @see https://api-docs.grvt.io/trading_api/#positions
74
148
  */
75
149
  positions(payload, config) {
76
- 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) => {
77
- return utils_1.Utils.schemaMap(response.data, interfaces_1.API_POSITIONS_RESPONSE_MAP.LITE_TO_FULL);
150
+ return this._axios.post(this._liteUrl + '/positions', utils_1.Utils.schemaMap(payload, api_positions_request_1.API_POSITIONS_REQUEST_MAP.FULL_TO_LITE, true), config).then((response) => {
151
+ return utils_1.Utils.schemaMap(response.data, api_positions_response_1.API_POSITIONS_RESPONSE_MAP.LITE_TO_FULL);
78
152
  }).catch(utils_1.Utils.coverApiError);
79
153
  }
80
154
  /**
81
155
  * @see https://api-docs.grvt.io/trading_api/#sub-account-summary
82
156
  */
83
157
  subAccountSummary(payload, config) {
84
- 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) => {
85
- return utils_1.Utils.schemaMap(response.data, interfaces_1.API_SUB_ACCOUNT_SUMMARY_RESPONSE_MAP.LITE_TO_FULL);
158
+ return this._axios.post(this._liteUrl + '/account_summary', utils_1.Utils.schemaMap(payload, api_sub_account_summary_request_1.API_SUB_ACCOUNT_SUMMARY_REQUEST_MAP.FULL_TO_LITE, true), config).then((response) => {
159
+ return utils_1.Utils.schemaMap(response.data, api_sub_account_summary_response_1.API_SUB_ACCOUNT_SUMMARY_RESPONSE_MAP.LITE_TO_FULL);
86
160
  }).catch(utils_1.Utils.coverApiError);
87
161
  }
88
162
  subAccountSummaryHistory(payload, config) {
89
- 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) => {
90
- return utils_1.Utils.schemaMap(response.data, interfaces_1.API_QUERY_LIST_SUB_ACCOUNT_SUMMARY_RESPONSE_MAP.LITE_TO_FULL);
163
+ return this._axios.post(this._liteUrl + '/sub_account_summary_history', utils_1.Utils.schemaMap(payload, api_query_list_sub_account_summary_request_1.API_QUERY_LIST_SUB_ACCOUNT_SUMMARY_REQUEST_MAP.FULL_TO_LITE, true), config).then((response) => {
164
+ return utils_1.Utils.schemaMap(response.data, api_query_list_sub_account_summary_response_1.API_QUERY_LIST_SUB_ACCOUNT_SUMMARY_RESPONSE_MAP.LITE_TO_FULL);
91
165
  }).catch(utils_1.Utils.coverApiError);
92
166
  }
93
167
  /**
94
168
  * @see https://api-docs.grvt.io/trading_api/#sub-account-history
95
169
  */
96
170
  subAccountHistory(payload, config) {
97
- 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) => {
98
- return utils_1.Utils.schemaMap(response.data, interfaces_1.API_SUB_ACCOUNT_HISTORY_RESPONSE_MAP.LITE_TO_FULL);
171
+ return this._axios.post(this._liteUrl + '/account_history', utils_1.Utils.schemaMap(payload, api_sub_account_history_request_1.API_SUB_ACCOUNT_HISTORY_REQUEST_MAP.FULL_TO_LITE, true), config).then((response) => {
172
+ return utils_1.Utils.schemaMap(response.data, api_sub_account_history_response_1.API_SUB_ACCOUNT_HISTORY_RESPONSE_MAP.LITE_TO_FULL);
99
173
  }).catch(utils_1.Utils.coverApiError);
100
174
  }
101
175
  /**
102
176
  * @see https://api-docs.grvt.io/market_data_api/#trade-history
103
177
  */
104
178
  fillHistory(payload, config) {
105
- 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) => {
106
- return utils_1.Utils.schemaMap(response.data, interfaces_1.API_FILL_HISTORY_RESPONSE_MAP.LITE_TO_FULL);
179
+ return this._axios.post(this._liteUrl + '/fill_history', utils_1.Utils.schemaMap(payload, api_fill_history_request_1.API_FILL_HISTORY_REQUEST_MAP.FULL_TO_LITE, true), config).then((response) => {
180
+ return utils_1.Utils.schemaMap(response.data, api_fill_history_response_1.API_FILL_HISTORY_RESPONSE_MAP.LITE_TO_FULL);
107
181
  }).catch(utils_1.Utils.coverApiError);
108
182
  }
109
183
  /** ===== ORDER ===== */
@@ -111,105 +185,105 @@ class TDG {
111
185
  * @see https://api-docs.grvt.io/trading_api/#create-order
112
186
  */
113
187
  createOrder(payload, config) {
114
- 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) => {
115
- return utils_1.Utils.schemaMap(response.data, interfaces_1.API_CREATE_ORDER_RESPONSE_MAP.LITE_TO_FULL);
188
+ return this._axios.post(this._liteUrl + '/create_order', utils_1.Utils.schemaMap(payload, api_create_order_request_1.API_CREATE_ORDER_REQUEST_MAP.FULL_TO_LITE, true), config).then((response) => {
189
+ return utils_1.Utils.schemaMap(response.data, api_create_order_response_1.API_CREATE_ORDER_RESPONSE_MAP.LITE_TO_FULL);
116
190
  }).catch(utils_1.Utils.coverApiError);
117
191
  }
118
192
  createBulkOrders(payload, config) {
119
- 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) => {
120
- return utils_1.Utils.schemaMap(response.data, interfaces_1.API_CREATE_BULK_ORDERS_RESPONSE_MAP.LITE_TO_FULL);
193
+ return this._axios.post(this._liteUrl + '/create_bulk_orders', utils_1.Utils.schemaMap(payload, api_create_bulk_orders_request_1.API_CREATE_BULK_ORDERS_REQUEST_MAP.FULL_TO_LITE, true), config).then((response) => {
194
+ return utils_1.Utils.schemaMap(response.data, api_create_bulk_orders_response_1.API_CREATE_BULK_ORDERS_RESPONSE_MAP.LITE_TO_FULL);
121
195
  }).catch(utils_1.Utils.coverApiError);
122
196
  }
123
197
  preOrderCheck(payload, config) {
124
- 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) => {
125
- return utils_1.Utils.schemaMap(response.data, interfaces_1.API_PRE_ORDER_CHECK_RESPONSE_MAP.LITE_TO_FULL);
198
+ return this._axios.post(this._liteUrl + '/pre_order_check', utils_1.Utils.schemaMap(payload, api_pre_order_check_request_1.API_PRE_ORDER_CHECK_REQUEST_MAP.FULL_TO_LITE, true), config).then((response) => {
199
+ return utils_1.Utils.schemaMap(response.data, api_pre_order_check_response_1.API_PRE_ORDER_CHECK_RESPONSE_MAP.LITE_TO_FULL);
126
200
  }).catch(utils_1.Utils.coverApiError);
127
201
  }
128
202
  dedustPosition(payload, config) {
129
- 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) => {
130
- return utils_1.Utils.schemaMap(response.data, interfaces_1.API_DEDUST_POSITION_RESPONSE_MAP.LITE_TO_FULL);
203
+ return this._axios.post(this._liteUrl + '/dedust_position', utils_1.Utils.schemaMap(payload, api_dedust_position_request_1.API_DEDUST_POSITION_REQUEST_MAP.FULL_TO_LITE, true), config).then((response) => {
204
+ return utils_1.Utils.schemaMap(response.data, api_dedust_position_response_1.API_DEDUST_POSITION_RESPONSE_MAP.LITE_TO_FULL);
131
205
  }).catch(utils_1.Utils.coverApiError);
132
206
  }
133
207
  /**
134
208
  * @see https://api-docs.grvt.io/trading_api/#cancel-order
135
209
  */
136
210
  cancelOrder(payload, config) {
137
- 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) => {
138
- return utils_1.Utils.schemaMap(response.data, interfaces_1.API_CANCEL_ORDER_RESPONSE_MAP.LITE_TO_FULL);
211
+ return this._axios.post(this._liteUrl + '/cancel_order', utils_1.Utils.schemaMap(payload, api_cancel_order_request_1.API_CANCEL_ORDER_REQUEST_MAP.FULL_TO_LITE, true), config).then((response) => {
212
+ return utils_1.Utils.schemaMap(response.data, api_cancel_order_response_1.API_CANCEL_ORDER_RESPONSE_MAP.LITE_TO_FULL);
139
213
  }).catch(utils_1.Utils.coverApiError);
140
214
  }
141
215
  /**
142
216
  * @see https://api-docs.grvt.io/trading_api/#cancel-all-orders
143
217
  */
144
218
  cancelAllOrders(payload, config) {
145
- 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) => {
146
- return utils_1.Utils.schemaMap(response.data, interfaces_1.API_CANCEL_ALL_ORDERS_RESPONSE_MAP.LITE_TO_FULL);
219
+ return this._axios.post(this._liteUrl + '/cancel_all_orders', utils_1.Utils.schemaMap(payload, api_cancel_all_orders_request_1.API_CANCEL_ALL_ORDERS_REQUEST_MAP.FULL_TO_LITE, true), config).then((response) => {
220
+ return utils_1.Utils.schemaMap(response.data, api_cancel_all_orders_response_1.API_CANCEL_ALL_ORDERS_RESPONSE_MAP.LITE_TO_FULL);
147
221
  }).catch(utils_1.Utils.coverApiError);
148
222
  }
149
223
  /**
150
224
  * @see https://api-docs.grvt.io/trading_api/#get-order
151
225
  */
152
226
  order(payload, config) {
153
- 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) => {
154
- return utils_1.Utils.schemaMap(response.data, interfaces_1.API_GET_ORDER_RESPONSE_MAP.LITE_TO_FULL);
227
+ return this._axios.post(this._liteUrl + '/order', utils_1.Utils.schemaMap(payload, api_get_order_request_1.API_GET_ORDER_REQUEST_MAP.FULL_TO_LITE, true), config).then((response) => {
228
+ return utils_1.Utils.schemaMap(response.data, api_get_order_response_1.API_GET_ORDER_RESPONSE_MAP.LITE_TO_FULL);
155
229
  }).catch(utils_1.Utils.coverApiError);
156
230
  }
157
231
  /**
158
232
  * @see https://api-docs.grvt.io/trading_api/#open-orders
159
233
  */
160
234
  openOrders(payload, config) {
161
- 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) => {
162
- return utils_1.Utils.schemaMap(response.data, interfaces_1.API_OPEN_ORDERS_RESPONSE_MAP.LITE_TO_FULL);
235
+ return this._axios.post(this._liteUrl + '/open_orders', utils_1.Utils.schemaMap(payload, api_open_orders_request_1.API_OPEN_ORDERS_REQUEST_MAP.FULL_TO_LITE, true), config).then((response) => {
236
+ return utils_1.Utils.schemaMap(response.data, api_open_orders_response_1.API_OPEN_ORDERS_RESPONSE_MAP.LITE_TO_FULL);
163
237
  }).catch(utils_1.Utils.coverApiError);
164
238
  }
165
239
  orderGroup(payload, config) {
166
- 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) => {
167
- return utils_1.Utils.schemaMap(response.data, interfaces_1.API_GET_ORDER_GROUP_RESPONSE_MAP.LITE_TO_FULL);
240
+ return this._axios.post(this._liteUrl + '/order_group', utils_1.Utils.schemaMap(payload, api_get_order_group_request_1.API_GET_ORDER_GROUP_REQUEST_MAP.FULL_TO_LITE, true), config).then((response) => {
241
+ return utils_1.Utils.schemaMap(response.data, api_get_order_group_response_1.API_GET_ORDER_GROUP_RESPONSE_MAP.LITE_TO_FULL);
168
242
  }).catch(utils_1.Utils.coverApiError);
169
243
  }
170
244
  /**
171
245
  * Replace position's TP/SL orders
172
246
  */
173
247
  replaceOrders(payload, config) {
174
- return this._axios.post(this._liteUrl + '/replace_orders', utils_1.Utils.schemaMap(payload, interfaces_1.API_REPLACE_ORDERS_REQUEST_MAP.FULL_TO_LITE, true), config).then((response) => {
175
- return utils_1.Utils.schemaMap(response.data, interfaces_1.API_REPLACE_ORDERS_RESPONSE_MAP.LITE_TO_FULL);
248
+ return this._axios.post(this._liteUrl + '/replace_orders', utils_1.Utils.schemaMap(payload, api_replace_orders_request_1.API_REPLACE_ORDERS_REQUEST_MAP.FULL_TO_LITE, true), config).then((response) => {
249
+ return utils_1.Utils.schemaMap(response.data, api_replace_orders_response_1.API_REPLACE_ORDERS_RESPONSE_MAP.LITE_TO_FULL);
176
250
  }).catch(utils_1.Utils.coverApiError);
177
251
  }
178
252
  /**
179
253
  * @see https://api-docs.grvt.io/trading_api/#order-history
180
254
  */
181
255
  orderHistory(payload, config) {
182
- 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) => {
183
- return utils_1.Utils.schemaMap(response.data, interfaces_1.API_ORDER_HISTORY_RESPONSE_MAP.LITE_TO_FULL);
256
+ return this._axios.post(this._liteUrl + '/order_history', utils_1.Utils.schemaMap(payload, api_order_history_request_1.API_ORDER_HISTORY_REQUEST_MAP.FULL_TO_LITE, true), config).then((response) => {
257
+ return utils_1.Utils.schemaMap(response.data, api_order_history_response_1.API_ORDER_HISTORY_RESPONSE_MAP.LITE_TO_FULL);
184
258
  }).catch(utils_1.Utils.coverApiError);
185
259
  }
186
260
  /**
187
261
  * @see https://api-docs.grvt.io/trading_api/#get-all-initial-leverage
188
262
  */
189
263
  getAllInitialLeverage(payload, config) {
190
- 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) => {
191
- return utils_1.Utils.schemaMap(response.data, interfaces_1.API_GET_ALL_INITIAL_LEVERAGE_RESPONSE_MAP.LITE_TO_FULL);
264
+ return this._axios.post(this._liteUrl + '/get_all_initial_leverage', utils_1.Utils.schemaMap(payload, api_get_all_initial_leverage_request_1.API_GET_ALL_INITIAL_LEVERAGE_REQUEST_MAP.FULL_TO_LITE, true), config).then((response) => {
265
+ return utils_1.Utils.schemaMap(response.data, api_get_all_initial_leverage_response_1.API_GET_ALL_INITIAL_LEVERAGE_RESPONSE_MAP.LITE_TO_FULL);
192
266
  }).catch(utils_1.Utils.coverApiError);
193
267
  }
194
268
  /**
195
269
  * @see https://api-docs.grvt.io/trading_api/#set-initial-leverage
196
270
  */
197
271
  setInitialLeverage(payload, config) {
198
- 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) => {
199
- return utils_1.Utils.schemaMap(response.data, interfaces_1.API_SET_INITIAL_LEVERAGE_RESPONSE_MAP.LITE_TO_FULL);
272
+ return this._axios.post(this._liteUrl + '/set_initial_leverage', utils_1.Utils.schemaMap(payload, api_set_initial_leverage_request_1.API_SET_INITIAL_LEVERAGE_REQUEST_MAP.FULL_TO_LITE, true), config).then((response) => {
273
+ return utils_1.Utils.schemaMap(response.data, api_set_initial_leverage_response_1.API_SET_INITIAL_LEVERAGE_RESPONSE_MAP.LITE_TO_FULL);
200
274
  }).catch(utils_1.Utils.coverApiError);
201
275
  }
202
276
  getMarginTiers(config) {
203
277
  return this._axios.post(this._liteUrl + '/get_margin_tiers', null, config).then((response) => {
204
- return utils_1.Utils.schemaMap(response.data, interfaces_1.API_GET_MARGIN_TIERS_RESPONSE_MAP.LITE_TO_FULL);
278
+ return utils_1.Utils.schemaMap(response.data, api_get_margin_tiers_response_1.API_GET_MARGIN_TIERS_RESPONSE_MAP.LITE_TO_FULL);
205
279
  }).catch(utils_1.Utils.coverApiError);
206
280
  }
207
281
  /**
208
282
  * @see https://api-docs.grvt.io/trading_api/#funding-payment-history
209
283
  */
210
284
  fundingPaymentHistory(payload, config) {
211
- 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) => {
212
- return utils_1.Utils.schemaMap(response.data, interfaces_1.API_FUNDING_PAYMENT_HISTORY_RESPONSE_MAP.LITE_TO_FULL);
285
+ return this._axios.post(this._liteUrl + '/funding_payment_history', utils_1.Utils.schemaMap(payload, api_funding_payment_history_request_1.API_FUNDING_PAYMENT_HISTORY_REQUEST_MAP.FULL_TO_LITE, true), config).then((response) => {
286
+ return utils_1.Utils.schemaMap(response.data, api_funding_payment_history_response_1.API_FUNDING_PAYMENT_HISTORY_RESPONSE_MAP.LITE_TO_FULL);
213
287
  }).catch(utils_1.Utils.coverApiError);
214
288
  }
215
289
  /**
@@ -217,12 +291,12 @@ class TDG {
217
291
  */
218
292
  fundingAccountSummary(config) {
219
293
  return this._axios.post(this._liteUrl + '/funding_account_summary', null, config).then((response) => {
220
- return utils_1.Utils.schemaMap(response.data, interfaces_1.API_FUNDING_ACCOUNT_SUMMARY_RESPONSE_MAP.LITE_TO_FULL);
294
+ return utils_1.Utils.schemaMap(response.data, api_funding_account_summary_response_1.API_FUNDING_ACCOUNT_SUMMARY_RESPONSE_MAP.LITE_TO_FULL);
221
295
  }).catch(utils_1.Utils.coverApiError);
222
296
  }
223
297
  fundingAccountSummaryHistory(payload, config) {
224
- 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) => {
225
- return utils_1.Utils.schemaMap(response.data, interfaces_1.API_QUERY_LIST_FUNDING_ACCOUNT_SUMMARY_RESPONSE_MAP.LITE_TO_FULL);
298
+ return this._axios.post(this._liteUrl + '/funding_account_summary_history', utils_1.Utils.schemaMap(payload, api_query_list_funding_account_summary_request_1.API_QUERY_LIST_FUNDING_ACCOUNT_SUMMARY_REQUEST_MAP.FULL_TO_LITE, true), config).then((response) => {
299
+ return utils_1.Utils.schemaMap(response.data, api_query_list_funding_account_summary_response_1.API_QUERY_LIST_FUNDING_ACCOUNT_SUMMARY_RESPONSE_MAP.LITE_TO_FULL);
226
300
  }).catch(utils_1.Utils.coverApiError);
227
301
  }
228
302
  /**
@@ -230,137 +304,65 @@ class TDG {
230
304
  */
231
305
  aggregatedAccountSummary(config) {
232
306
  return this._axios.post(this._liteUrl + '/aggregated_account_summary', null, config).then((response) => {
233
- return utils_1.Utils.schemaMap(response.data, interfaces_1.API_AGGREGATED_ACCOUNT_SUMMARY_RESPONSE_MAP.LITE_TO_FULL);
307
+ return utils_1.Utils.schemaMap(response.data, api_aggregated_account_summary_response_1.API_AGGREGATED_ACCOUNT_SUMMARY_RESPONSE_MAP.LITE_TO_FULL);
234
308
  }).catch(utils_1.Utils.coverApiError);
235
309
  }
236
310
  tradingPerformance(payload, config) {
237
- 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) => {
238
- return utils_1.Utils.schemaMap(response.data, interfaces_1.API_QUERY_TRADING_PERFORMANCE_RESPONSE_MAP.LITE_TO_FULL);
311
+ return this._axios.post(this._liteUrl + '/trading_performance', utils_1.Utils.schemaMap(payload, api_query_trading_performance_request_1.API_QUERY_TRADING_PERFORMANCE_REQUEST_MAP.FULL_TO_LITE, true), config).then((response) => {
312
+ return utils_1.Utils.schemaMap(response.data, api_query_trading_performance_response_1.API_QUERY_TRADING_PERFORMANCE_RESPONSE_MAP.LITE_TO_FULL);
239
313
  }).catch(utils_1.Utils.coverApiError);
240
314
  }
241
315
  tradingPerformanceTrend(payload, config) {
242
- 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) => {
243
- return utils_1.Utils.schemaMap(response.data, interfaces_1.API_QUERY_TRADING_PERFORMANCE_TREND_RESPONSE_MAP.LITE_TO_FULL);
316
+ return this._axios.post(this._liteUrl + '/trading_performance_trend', utils_1.Utils.schemaMap(payload, api_query_trading_performance_trend_request_1.API_QUERY_TRADING_PERFORMANCE_TREND_REQUEST_MAP.FULL_TO_LITE, true), config).then((response) => {
317
+ return utils_1.Utils.schemaMap(response.data, api_query_trading_performance_trend_response_1.API_QUERY_TRADING_PERFORMANCE_TREND_RESPONSE_MAP.LITE_TO_FULL);
244
318
  }).catch(utils_1.Utils.coverApiError);
245
319
  }
246
320
  assetExposure(payload, config) {
247
- 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) => {
248
- return utils_1.Utils.schemaMap(response.data, interfaces_1.API_TIMED_ASSET_EXPOSURE_RESPONSE_MAP.LITE_TO_FULL);
321
+ return this._axios.post(this._liteUrl + '/asset_exposure', utils_1.Utils.schemaMap(payload, api_timed_asset_exposure_request_1.API_TIMED_ASSET_EXPOSURE_REQUEST_MAP.FULL_TO_LITE, true), config).then((response) => {
322
+ return utils_1.Utils.schemaMap(response.data, api_timed_asset_exposure_response_1.API_TIMED_ASSET_EXPOSURE_RESPONSE_MAP.LITE_TO_FULL);
249
323
  }).catch(utils_1.Utils.coverApiError);
250
324
  }
251
325
  /**
252
326
  * START: Vault
253
327
  */
254
328
  vaultBurnTokens(payload, config) {
255
- return this._axios.post(this._liteUrl + '/vault_burn_tokens', utils_1.Utils.schemaMap(payload, interfaces_1.API_VAULT_BURN_TOKENS_REQUEST_MAP.FULL_TO_LITE, true), config).then((response) => {
256
- return utils_1.Utils.schemaMap(response.data, interfaces_1.ACK_RESPONSE_MAP.LITE_TO_FULL);
329
+ return this._axios.post(this._liteUrl + '/vault_burn_tokens', utils_1.Utils.schemaMap(payload, api_vault_burn_tokens_request_1.API_VAULT_BURN_TOKENS_REQUEST_MAP.FULL_TO_LITE, true), config).then((response) => {
330
+ return utils_1.Utils.schemaMap(response.data, ack_response_1.ACK_RESPONSE_MAP.LITE_TO_FULL);
257
331
  }).catch(utils_1.Utils.coverApiError);
258
332
  }
259
333
  vaultInvest(payload, config) {
260
- return this._axios.post(this._liteUrl + '/vault_invest', utils_1.Utils.schemaMap(payload, interfaces_1.API_VAULT_INVEST_REQUEST_MAP.FULL_TO_LITE, true), config).then((response) => {
261
- return utils_1.Utils.schemaMap(response.data, interfaces_1.ACK_RESPONSE_MAP.LITE_TO_FULL);
334
+ return this._axios.post(this._liteUrl + '/vault_invest', utils_1.Utils.schemaMap(payload, api_vault_invest_request_1.API_VAULT_INVEST_REQUEST_MAP.FULL_TO_LITE, true), config).then((response) => {
335
+ return utils_1.Utils.schemaMap(response.data, ack_response_1.ACK_RESPONSE_MAP.LITE_TO_FULL);
262
336
  }).catch(utils_1.Utils.coverApiError);
263
337
  }
264
338
  vaultInvestorSummary(payload, config) {
265
- return this._axios.post(this._liteUrl + '/vault_investor_summary', utils_1.Utils.schemaMap(payload, interfaces_1.API_VAULT_INVESTOR_SUMMARY_REQUEST_MAP.FULL_TO_LITE, true), config).then((response) => {
266
- return utils_1.Utils.schemaMap(response.data, interfaces_1.API_VAULT_INVESTOR_SUMMARY_RESPONSE_MAP.LITE_TO_FULL);
339
+ return this._axios.post(this._liteUrl + '/vault_investor_summary', utils_1.Utils.schemaMap(payload, api_vault_investor_summary_request_1.API_VAULT_INVESTOR_SUMMARY_REQUEST_MAP.FULL_TO_LITE, true), config).then((response) => {
340
+ return utils_1.Utils.schemaMap(response.data, api_vault_investor_summary_response_1.API_VAULT_INVESTOR_SUMMARY_RESPONSE_MAP.LITE_TO_FULL);
267
341
  }).catch(utils_1.Utils.coverApiError);
268
342
  }
269
343
  vaultRedeem(payload, config) {
270
- return this._axios.post(this._liteUrl + '/vault_redeem', utils_1.Utils.schemaMap(payload, interfaces_1.API_VAULT_REDEEM_REQUEST_MAP.FULL_TO_LITE, true), config).then((response) => {
271
- return utils_1.Utils.schemaMap(response.data, interfaces_1.ACK_RESPONSE_MAP.LITE_TO_FULL);
344
+ return this._axios.post(this._liteUrl + '/vault_redeem', utils_1.Utils.schemaMap(payload, api_vault_redeem_request_1.API_VAULT_REDEEM_REQUEST_MAP.FULL_TO_LITE, true), config).then((response) => {
345
+ return utils_1.Utils.schemaMap(response.data, ack_response_1.ACK_RESPONSE_MAP.LITE_TO_FULL);
272
346
  }).catch(utils_1.Utils.coverApiError);
273
347
  }
274
348
  vaultRedeemCancel(payload, config) {
275
- return this._axios.post(this._liteUrl + '/vault_redeem_cancel', utils_1.Utils.schemaMap(payload, interfaces_1.API_VAULT_REDEEM_CANCEL_REQUEST_MAP.FULL_TO_LITE, true), config).then((response) => {
276
- return utils_1.Utils.schemaMap(response.data, interfaces_1.ACK_RESPONSE_MAP.LITE_TO_FULL);
349
+ return this._axios.post(this._liteUrl + '/vault_redeem_cancel', utils_1.Utils.schemaMap(payload, api_vault_redeem_cancel_request_1.API_VAULT_REDEEM_CANCEL_REQUEST_MAP.FULL_TO_LITE, true), config).then((response) => {
350
+ return utils_1.Utils.schemaMap(response.data, ack_response_1.ACK_RESPONSE_MAP.LITE_TO_FULL);
277
351
  }).catch(utils_1.Utils.coverApiError);
278
352
  }
279
353
  vaultViewRedemptionQueue(payload, config) {
280
- return this._axios.post(this._liteUrl + '/vault_view_redemption_queue', utils_1.Utils.schemaMap(payload, interfaces_1.API_VAULT_VIEW_REDEMPTION_QUEUE_REQUEST_MAP.FULL_TO_LITE, true), config).then((response) => {
281
- return utils_1.Utils.schemaMap(response.data, interfaces_1.API_VAULT_VIEW_REDEMPTION_QUEUE_RESPONSE_MAP.LITE_TO_FULL);
282
- }).catch(utils_1.Utils.coverApiError);
283
- }
284
- /**
285
- * @deprecated
286
- * Use MDG
287
- */
288
- vaultPerformance(payload, config) {
289
- return this._axios.post(this._liteUrl + '/vault_performance', utils_1.Utils.schemaMap(payload, interfaces_1.API_QUERY_VAULT_PERFORMANCE_REQUEST_MAP.FULL_TO_LITE, true), config).then((response) => {
290
- return utils_1.Utils.schemaMap(response.data, interfaces_1.API_QUERY_VAULT_PERFORMANCE_RESPONSE_MAP.LITE_TO_FULL);
291
- }).catch(utils_1.Utils.coverApiError);
292
- }
293
- /**
294
- * @deprecated
295
- * Use MDG
296
- */
297
- vaultPerformanceTrend(payload, config) {
298
- return this._axios.post(this._liteUrl + '/vault_performance_trend', utils_1.Utils.schemaMap(payload, interfaces_1.API_QUERY_VAULT_PERFORMANCE_TREND_REQUEST_MAP.FULL_TO_LITE, true), config).then((response) => {
299
- return utils_1.Utils.schemaMap(response.data, interfaces_1.API_QUERY_VAULT_PERFORMANCE_TREND_RESPONSE_MAP.LITE_TO_FULL);
300
- }).catch(utils_1.Utils.coverApiError);
301
- }
302
- /**
303
- * @deprecated
304
- * Use MDG
305
- */
306
- vaultRiskMetric(payload, config) {
307
- return this._axios.post(this._liteUrl + '/vault_risk_metric', utils_1.Utils.schemaMap(payload, interfaces_1.API_QUERY_VAULT_RISK_METRIC_REQUEST_MAP.FULL_TO_LITE, true), config).then((response) => {
308
- return utils_1.Utils.schemaMap(response.data, interfaces_1.API_QUERY_VAULT_RISK_METRIC_RESPONSE_MAP.LITE_TO_FULL);
309
- }).catch(utils_1.Utils.coverApiError);
310
- }
311
- /**
312
- * @deprecated
313
- * Use MDG
314
- */
315
- vaultSummaryHistory(payload, config) {
316
- return this._axios.post(this._liteUrl + '/vault_summary_history', utils_1.Utils.schemaMap(payload, interfaces_1.API_QUERY_VAULT_SUMMARY_HISTORY_REQUEST_MAP.FULL_TO_LITE, true), config).then((response) => {
317
- return utils_1.Utils.schemaMap(response.data, interfaces_1.API_QUERY_VAULT_SUMMARY_HISTORY_RESPONSE_MAP.LITE_TO_FULL);
318
- }).catch(utils_1.Utils.coverApiError);
319
- }
320
- /**
321
- * @deprecated
322
- * Use MDG
323
- */
324
- vaultSubAccountSummaryHistory(payload, config) {
325
- return this._axios.post(this._liteUrl + '/vault_sub_account_summary_history', utils_1.Utils.schemaMap(payload, interfaces_1.API_QUERY_LIST_VAULT_SUB_ACCOUNT_SUMMARY_REQUEST_MAP.FULL_TO_LITE, true), config).then((response) => {
326
- return utils_1.Utils.schemaMap(response.data, interfaces_1.API_QUERY_LIST_VAULT_SUB_ACCOUNT_SUMMARY_RESPONSE_MAP.LITE_TO_FULL);
354
+ return this._axios.post(this._liteUrl + '/vault_view_redemption_queue', utils_1.Utils.schemaMap(payload, api_vault_view_redemption_queue_request_1.API_VAULT_VIEW_REDEMPTION_QUEUE_REQUEST_MAP.FULL_TO_LITE, true), config).then((response) => {
355
+ return utils_1.Utils.schemaMap(response.data, api_vault_view_redemption_queue_response_1.API_VAULT_VIEW_REDEMPTION_QUEUE_RESPONSE_MAP.LITE_TO_FULL);
327
356
  }).catch(utils_1.Utils.coverApiError);
328
357
  }
329
358
  vaultInvestorHistory(payload, config) {
330
- return this._axios.post(this._liteUrl + '/vault_investor_history', utils_1.Utils.schemaMap(payload, interfaces_1.API_QUERY_VAULT_INVESTOR_HISTORY_REQUEST_MAP.FULL_TO_LITE, true), config).then((response) => {
331
- return utils_1.Utils.schemaMap(response.data, interfaces_1.API_QUERY_VAULT_INVESTOR_HISTORY_RESPONSE_MAP.LITE_TO_FULL);
332
- }).catch(utils_1.Utils.coverApiError);
333
- }
334
- /**
335
- * @deprecated
336
- * Use MDG
337
- */
338
- vaultAssetExposure(payload, config) {
339
- return this._axios.post(this._liteUrl + '/vault_asset_exposure', utils_1.Utils.schemaMap(payload, interfaces_1.API_TIMED_VAULT_ASSET_EXPOSURE_REQUEST_MAP.FULL_TO_LITE, true), config).then((response) => {
340
- return utils_1.Utils.schemaMap(response.data, interfaces_1.API_TIMED_ASSET_EXPOSURE_RESPONSE_MAP.LITE_TO_FULL);
341
- }).catch(utils_1.Utils.coverApiError);
342
- }
343
- /**
344
- * @deprecated
345
- * Use MDG
346
- */
347
- snapVaultPosition(payload, config) {
348
- return this._axios.post(this._liteUrl + '/snap_vault_position', utils_1.Utils.schemaMap(payload, interfaces_1.API_QUERY_SNAP_VAULT_POSITION_REQUEST_MAP.FULL_TO_LITE, true), config).then((response) => {
349
- return utils_1.Utils.schemaMap(response.data, interfaces_1.API_QUERY_SNAP_VAULT_POSITION_RESPONSE_MAP.LITE_TO_FULL);
350
- }).catch(utils_1.Utils.coverApiError);
351
- }
352
- /**
353
- * @deprecated
354
- * Use MDG
355
- */
356
- vaultDetail(payload, config) {
357
- return this._axios.post(this._liteUrl + '/vault_detail', utils_1.Utils.schemaMap(payload, interfaces_1.API_VAULT_DETAIL_REQUEST_MAP.FULL_TO_LITE, true), config).then((response) => {
358
- return utils_1.Utils.schemaMap(response.data, interfaces_1.API_VAULT_DETAIL_RESPONSE_MAP.LITE_TO_FULL);
359
+ return this._axios.post(this._liteUrl + '/vault_investor_history', utils_1.Utils.schemaMap(payload, api_query_vault_investor_history_request_1.API_QUERY_VAULT_INVESTOR_HISTORY_REQUEST_MAP.FULL_TO_LITE, true), config).then((response) => {
360
+ return utils_1.Utils.schemaMap(response.data, api_query_vault_investor_history_response_1.API_QUERY_VAULT_INVESTOR_HISTORY_RESPONSE_MAP.LITE_TO_FULL);
359
361
  }).catch(utils_1.Utils.coverApiError);
360
362
  }
361
363
  vaultManagerInvestorHistory(payload, config) {
362
- return this._axios.post(this._liteUrl + '/vault_manager_investor_history', utils_1.Utils.schemaMap(payload, interfaces_1.API_QUERY_VAULT_MANAGER_INVESTOR_HISTORY_REQUEST_MAP.FULL_TO_LITE, true), config).then((response) => {
363
- return utils_1.Utils.schemaMap(response.data, interfaces_1.API_QUERY_VAULT_MANAGER_INVESTOR_HISTORY_RESPONSE_MAP.LITE_TO_FULL);
364
+ return this._axios.post(this._liteUrl + '/vault_manager_investor_history', utils_1.Utils.schemaMap(payload, api_query_vault_manager_investor_history_request_1.API_QUERY_VAULT_MANAGER_INVESTOR_HISTORY_REQUEST_MAP.FULL_TO_LITE, true), config).then((response) => {
365
+ return utils_1.Utils.schemaMap(response.data, api_query_vault_manager_investor_history_response_1.API_QUERY_VAULT_MANAGER_INVESTOR_HISTORY_RESPONSE_MAP.LITE_TO_FULL);
364
366
  }).catch(utils_1.Utils.coverApiError);
365
367
  }
366
368
  }
package/index.d.ts CHANGED
@@ -2,7 +2,6 @@ import { MDG } from './MDG';
2
2
  import { TDG } from './TDG';
3
3
  export * from './MDG';
4
4
  export * from './TDG';
5
- export * from './interfaces';
6
5
  declare const _default: {
7
6
  MDG: typeof MDG;
8
7
  TDG: typeof TDG;
package/index.js CHANGED
@@ -18,7 +18,6 @@ const MDG_1 = require("./MDG");
18
18
  const TDG_1 = require("./TDG");
19
19
  __exportStar(require("./MDG"), exports);
20
20
  __exportStar(require("./TDG"), exports);
21
- __exportStar(require("./interfaces"), exports);
22
21
  exports.default = {
23
22
  MDG: MDG_1.MDG,
24
23
  TDG: TDG_1.TDG
@@ -1,5 +1,4 @@
1
1
  export * from './data.interface';
2
2
  export * from './enum-int';
3
3
  export * from './hex-string-map';
4
- export * from './schema-maps';
5
4
  export * from './schema-maps/types';
@@ -17,5 +17,4 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./data.interface"), exports);
18
18
  __exportStar(require("./enum-int"), exports);
19
19
  __exportStar(require("./hex-string-map"), exports);
20
- __exportStar(require("./schema-maps"), exports);
21
20
  __exportStar(require("./schema-maps/types"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@grvt/client",
3
- "version": "1.4.30",
3
+ "version": "1.5.0-alpha.0",
4
4
  "description": "Node.js & JavaScript client for GRVT REST APIs & WebSockets",
5
5
  "repository": {
6
6
  "type": "git",
package/utils/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { type AxiosError } from 'axios';
2
- import { type SchemaMap } from '../interfaces';
1
+ import type { AxiosError } from 'axios';
2
+ import type { SchemaMap } from '../interfaces';
3
3
  export * from './json.utils';
4
4
  export * from './string.utils';
5
5
  export declare class Utils {
package/utils/index.js CHANGED
@@ -16,6 +16,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  exports.Utils = void 0;
18
18
  const interfaces_1 = require("../interfaces");
19
+ const error_1 = require("../interfaces/codegen/schema-maps/error");
19
20
  __exportStar(require("./json.utils"), exports);
20
21
  __exportStar(require("./string.utils"), exports);
21
22
  class Utils {
@@ -79,7 +80,7 @@ class Utils {
79
80
  static coverApiError(error) {
80
81
  var _a;
81
82
  if ((_a = error === null || error === void 0 ? void 0 : error.response) === null || _a === void 0 ? void 0 : _a.data) {
82
- error.response.data = Utils.schemaMap(error.response.data, interfaces_1.ERROR_MAP.LITE_TO_FULL);
83
+ error.response.data = Utils.schemaMap(error.response.data, error_1.ERROR_MAP.LITE_TO_FULL);
83
84
  }
84
85
  throw error;
85
86
  }
package/ws/ws.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { type TWSRequest } from './interfaces';
1
+ import type { TWSRequest } from './interfaces';
2
2
  interface IOptions {
3
3
  url: string | URL;
4
4
  protocols?: string | string[];