@grvt/client 1.6.11 → 1.6.13
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.d.ts +11 -2
- package/TDG/index.js +45 -3
- package/interfaces/codegen/data.interface.d.ts +109 -4
- package/interfaces/codegen/enums/cluster-config-type.d.ts +2 -1
- package/interfaces/codegen/enums/cluster-config-type.js +4 -1
- package/interfaces/codegen/enums/order-reject-reason.d.ts +5 -1
- package/interfaces/codegen/enums/order-reject-reason.js +13 -1
- package/interfaces/codegen/enums/transaction-type.d.ts +2 -1
- package/interfaces/codegen/enums/transaction-type.js +3 -1
- package/interfaces/codegen/hex-string-map.js +3 -0
- package/interfaces/codegen/schema-maps/aggregated_account_performance.js +14 -2
- package/interfaces/codegen/schema-maps/api_account_performance_trend.js +4 -4
- package/interfaces/codegen/schema-maps/api_authorize_builder_request.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_authorize_builder_request.js +21 -0
- package/interfaces/codegen/schema-maps/api_authorized_builder.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_authorized_builder.js +16 -0
- package/interfaces/codegen/schema-maps/api_builder_fill_history_request.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_builder_fill_history_request.js +20 -0
- package/interfaces/codegen/schema-maps/api_builder_fill_history_response.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_builder_fill_history_response.js +15 -0
- package/interfaces/codegen/schema-maps/api_create_account_multiplier_request.js +4 -2
- package/interfaces/codegen/schema-maps/api_find_account_multiplier_request.js +6 -2
- package/interfaces/codegen/schema-maps/api_find_account_multiplier_response.js +8 -2
- package/interfaces/codegen/schema-maps/api_get_authorized_builders_response.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_get_authorized_builders_response.js +13 -0
- package/interfaces/codegen/schema-maps/api_get_isolated_position_margin_limits_request.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_get_isolated_position_margin_limits_request.js +14 -0
- package/interfaces/codegen/schema-maps/api_get_isolated_position_margin_limits_response.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_get_isolated_position_margin_limits_response.js +16 -0
- package/interfaces/codegen/schema-maps/api_position.js +10 -2
- package/interfaces/codegen/schema-maps/{api_query_account_today_performance_request.d.ts → api_query_account_daily_performance_request.d.ts} +1 -1
- package/interfaces/codegen/schema-maps/api_query_account_daily_performance_request.js +14 -0
- package/interfaces/codegen/schema-maps/api_query_account_daily_performance_response.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_query_account_daily_performance_response.js +13 -0
- package/interfaces/codegen/schema-maps/api_query_account_performance_response.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_query_account_performance_response.js +14 -0
- package/interfaces/codegen/schema-maps/api_query_sub_account_daily_performance_request.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_query_sub_account_daily_performance_request.js +16 -0
- package/interfaces/codegen/schema-maps/api_query_sub_account_daily_performance_response.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_query_sub_account_daily_performance_response.js +13 -0
- package/interfaces/codegen/schema-maps/api_set_builder_code_config.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_set_builder_code_config.js +16 -0
- package/interfaces/codegen/schema-maps/api_sub_account_daily_performance.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_sub_account_daily_performance.js +14 -0
- package/interfaces/codegen/schema-maps/builder_fill_history.d.ts +2 -0
- package/interfaces/codegen/schema-maps/builder_fill_history.js +32 -0
- package/interfaces/codegen/schema-maps/flat_private_trade.js +8 -2
- package/interfaces/codegen/schema-maps/order.js +6 -2
- package/interfaces/codegen/schema-maps/query_list_sub_account_history_request.js +6 -2
- package/interfaces/codegen/schema-maps/query_list_sub_account_history_response.js +3 -3
- package/interfaces/codegen/schema-maps/reward_account_multiplier.js +4 -2
- package/interfaces/codegen/schema-maps/snap_sub_account_history.d.ts +2 -0
- package/interfaces/codegen/schema-maps/snap_sub_account_history.js +20 -0
- package/package.json +2 -2
- package/interfaces/codegen/schema-maps/api_query_account_today_performance_request.js +0 -8
package/TDG/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { AxiosRequestConfig } from 'axios';
|
|
2
|
-
import type { IAckResponse, IApiAggregatedAccountSummaryResponse, IApiCancelAllOrdersRequest, IApiCancelAllOrdersResponse, IApiCancelOrderRequest, IApiCancelOrderResponse, IApiCreateBulkOrdersRequest, IApiCreateBulkOrdersResponse, IApiCreateOrderRequest, IApiCreateOrderResponse, IApiCrossExchVaultAttestEquityRequest, IApiCrossExchVaultGetInvestorAllocationStatsResponse, IApiCrossExchVaultInvestCancelRequest, IApiCrossExchVaultLockRequest, IApiCrossExchVaultPreInternalTransferCheckRequest, IApiCrossExchVaultPreInternalTransferCheckResponse, IApiCrossExchVaultPreWithdrawCheckRequest, IApiCrossExchVaultPreWithdrawCheckResponse, IApiCrossExchVaultTriggerRedemptionRequest, IApiCrossExchVaultUnlockRequest, IApiCrossExchVaultViewInvestmentQueueRequest, IApiCrossExchVaultViewInvestmentQueueResponse, IApiCrossExchVaultViewPendingInvestmentRequest, IApiCrossExchVaultViewPendingInvestmentResponse, IApiDedustPositionRequest, IApiDedustPositionResponse, IApiDepositHistoryRequest, IApiDepositHistoryResponse, IApiFillHistoryRequest, IApiFillHistoryResponse, IApiFundingAccountSummaryResponse, IApiFundingPaymentHistoryRequest, IApiFundingPaymentHistoryResponse, IApiGetAllInitialLeverageRequest, IApiGetAllInitialLeverageResponse, IApiGetMarginTiersResponse, IApiGetOrderGroupRequest, IApiGetOrderGroupResponse, IApiGetOrderRequest, IApiGetOrderResponse, IApiGetPriceProtectionBandsResponse, IApiOpenOrdersRequest, IApiOpenOrdersResponse, IApiOrderHistoryRequest, IApiOrderHistoryResponse, IApiPositionsRequest, IApiPositionsResponse, IApiPreDepositCheckRequest, IApiPreDepositCheckResponse, IApiPreOrderCheckRequest, IApiPreOrderCheckResponse, IApiQueryAccountPerformanceTrendRequest, IApiQueryAccountPerformanceTrendResponse,
|
|
2
|
+
import type { IAckResponse, IApiAddIsolatedPositionMarginRequest, IApiAddIsolatedPositionMarginResponse, IApiAggregatedAccountSummaryResponse, IApiAuthorizeBuilderRequest, IApiBuilderFillHistoryRequest, IApiBuilderFillHistoryResponse, IApiCancelAllOrdersRequest, IApiCancelAllOrdersResponse, IApiCancelOrderRequest, IApiCancelOrderResponse, IApiCreateBulkOrdersRequest, IApiCreateBulkOrdersResponse, IApiCreateOrderRequest, IApiCreateOrderResponse, IApiCrossExchVaultAttestEquityRequest, IApiCrossExchVaultGetInvestorAllocationStatsResponse, IApiCrossExchVaultInvestCancelRequest, IApiCrossExchVaultLockRequest, IApiCrossExchVaultPreInternalTransferCheckRequest, IApiCrossExchVaultPreInternalTransferCheckResponse, IApiCrossExchVaultPreWithdrawCheckRequest, IApiCrossExchVaultPreWithdrawCheckResponse, IApiCrossExchVaultTriggerRedemptionRequest, IApiCrossExchVaultUnlockRequest, IApiCrossExchVaultViewInvestmentQueueRequest, IApiCrossExchVaultViewInvestmentQueueResponse, IApiCrossExchVaultViewPendingInvestmentRequest, IApiCrossExchVaultViewPendingInvestmentResponse, IApiDedustPositionRequest, IApiDedustPositionResponse, IApiDepositHistoryRequest, IApiDepositHistoryResponse, IApiFillHistoryRequest, IApiFillHistoryResponse, IApiFundingAccountSummaryResponse, IApiFundingPaymentHistoryRequest, IApiFundingPaymentHistoryResponse, IApiGetAllInitialLeverageRequest, IApiGetAllInitialLeverageResponse, IApiGetAuthorizedBuildersResponse, IApiGetIsolatedPositionMarginLimitsRequest, IApiGetIsolatedPositionMarginLimitsResponse, IApiGetMarginTiersResponse, IApiGetOrderGroupRequest, IApiGetOrderGroupResponse, IApiGetOrderRequest, IApiGetOrderResponse, IApiGetPriceProtectionBandsResponse, IApiOpenOrdersRequest, IApiOpenOrdersResponse, IApiOrderHistoryRequest, IApiOrderHistoryResponse, IApiPositionsRequest, IApiPositionsResponse, IApiPreDepositCheckRequest, IApiPreDepositCheckResponse, IApiPreOrderCheckRequest, IApiPreOrderCheckResponse, IApiQueryAccountPerformanceTrendRequest, IApiQueryAccountPerformanceTrendResponse, IApiQueryAccountTodayPerformanceResponse, IApiQueryListFundingAccountSummaryRequest, IApiQueryListFundingAccountSummaryResponse, IApiQueryListSubAccountSummaryRequest, IApiQueryListSubAccountSummaryResponse, IApiQueryTradingAccountRiskMetricRequest, IApiQueryTradingAccountRiskMetricResponse, IApiQueryTradingPerformanceRequest, IApiQueryTradingPerformanceResponse, IApiQueryTradingPerformanceSummaryRequest, IApiQueryTradingPerformanceSummaryResponse, IApiQueryTradingPerformanceTrendRequest, IApiQueryTradingPerformanceTrendResponse, IApiQueryVaultInvestorHistoryRequest, IApiQueryVaultInvestorHistoryResponse, IApiQueryVaultInvestorHistoryStatsRequest, IApiQueryVaultInvestorHistoryStatsResponse, IApiQueryVaultManagerInvestorHistoryRequest, IApiQueryVaultManagerInvestorHistoryResponse, IApiReplaceOrdersRequest, IApiReplaceOrdersResponse, IApiSetInitialLeverageRequest, IApiSetInitialLeverageResponse, IApiSetSubAccountPositionMarginConfigRequest, IApiSetSubAccountPositionMarginConfigResponse, IApiSocializedLossStatusResponse, IApiSubAccountHistoryRequest, IApiSubAccountHistoryResponse, IApiSubAccountSummaryRequest, IApiSubAccountSummaryResponse, IApiTimedAssetExposureRequest, IApiTimedAssetExposureResponse, IApiTransferHistoryRequest, IApiTransferHistoryResponse, IApiTransferRequest, IApiTransferResponse, IApiVaultBurnTokensRequest, IApiVaultInvestorSummaryRequest, IApiVaultInvestorSummaryResponse, IApiVaultInvestRequest, IApiVaultRedeemCancelRequest, IApiVaultRedeemRequest, IApiVaultViewRedemptionQueueRequest, IApiVaultViewRedemptionQueueResponse, IApiWithdrawalHistoryRequest, IApiWithdrawalHistoryResponse, IApiWithdrawalRequest, IConfig } from '../interfaces';
|
|
3
3
|
export declare class TDG {
|
|
4
4
|
private readonly _axios;
|
|
5
5
|
private readonly _fullUrl;
|
|
@@ -37,6 +37,15 @@ export declare class TDG {
|
|
|
37
37
|
* @see https://api-docs.grvt.io/trading_api/#positions
|
|
38
38
|
*/
|
|
39
39
|
positions(payload: IApiPositionsRequest, config?: AxiosRequestConfig): Promise<IApiPositionsResponse>;
|
|
40
|
+
setPositionConfig(payload: IApiSetSubAccountPositionMarginConfigRequest, config?: AxiosRequestConfig): Promise<IApiSetSubAccountPositionMarginConfigResponse>;
|
|
41
|
+
addPositionMargin(payload: IApiAddIsolatedPositionMarginRequest, config?: AxiosRequestConfig): Promise<IApiAddIsolatedPositionMarginResponse>;
|
|
42
|
+
getPositionMarginLimits(payload: IApiGetIsolatedPositionMarginLimitsRequest, config?: AxiosRequestConfig): Promise<IApiGetIsolatedPositionMarginLimitsResponse>;
|
|
43
|
+
/**
|
|
44
|
+
* APIs for Builder
|
|
45
|
+
*/
|
|
46
|
+
authorizeBuilder(payload: IApiAuthorizeBuilderRequest, config?: AxiosRequestConfig): Promise<IAckResponse>;
|
|
47
|
+
getAuthorizedBuilders(config?: AxiosRequestConfig): Promise<IApiGetAuthorizedBuildersResponse>;
|
|
48
|
+
builderFillHistory(payload: IApiBuilderFillHistoryRequest, config?: AxiosRequestConfig): Promise<IApiBuilderFillHistoryResponse>;
|
|
40
49
|
/**
|
|
41
50
|
* @see https://api-docs.grvt.io/trading_api/#sub-account-summary
|
|
42
51
|
*/
|
|
@@ -143,7 +152,7 @@ export declare class TDG {
|
|
|
143
152
|
/**
|
|
144
153
|
* START: Portfolio
|
|
145
154
|
*/
|
|
146
|
-
accountTodayPerformance(
|
|
155
|
+
accountTodayPerformance(config?: AxiosRequestConfig): Promise<IApiQueryAccountTodayPerformanceResponse>;
|
|
147
156
|
accountPerformanceTrend(payload: IApiQueryAccountPerformanceTrendRequest, config?: AxiosRequestConfig): Promise<IApiQueryAccountPerformanceTrendResponse>;
|
|
148
157
|
tradingPerformanceSummary(payload: IApiQueryTradingPerformanceSummaryRequest, config?: AxiosRequestConfig): Promise<IApiQueryTradingPerformanceSummaryResponse>;
|
|
149
158
|
subAccountRiskMetric(payload: IApiQueryTradingAccountRiskMetricRequest, config?: AxiosRequestConfig): Promise<IApiQueryTradingAccountRiskMetricResponse>;
|
package/TDG/index.js
CHANGED
|
@@ -3,7 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.TDG = void 0;
|
|
4
4
|
const interfaces_1 = require("../interfaces");
|
|
5
5
|
const ack_response_1 = require("../interfaces/codegen/schema-maps/ack_response");
|
|
6
|
+
const api_add_isolated_position_margin_request_1 = require("../interfaces/codegen/schema-maps/api_add_isolated_position_margin_request");
|
|
7
|
+
const api_add_isolated_position_margin_response_1 = require("../interfaces/codegen/schema-maps/api_add_isolated_position_margin_response");
|
|
6
8
|
const api_aggregated_account_summary_response_1 = require("../interfaces/codegen/schema-maps/api_aggregated_account_summary_response");
|
|
9
|
+
const api_authorize_builder_request_1 = require("../interfaces/codegen/schema-maps/api_authorize_builder_request");
|
|
10
|
+
const api_builder_fill_history_request_1 = require("../interfaces/codegen/schema-maps/api_builder_fill_history_request");
|
|
11
|
+
const api_builder_fill_history_response_1 = require("../interfaces/codegen/schema-maps/api_builder_fill_history_response");
|
|
7
12
|
const api_cancel_all_orders_request_1 = require("../interfaces/codegen/schema-maps/api_cancel_all_orders_request");
|
|
8
13
|
const api_cancel_all_orders_response_1 = require("../interfaces/codegen/schema-maps/api_cancel_all_orders_response");
|
|
9
14
|
const api_cancel_order_request_1 = require("../interfaces/codegen/schema-maps/api_cancel_order_request");
|
|
@@ -37,6 +42,9 @@ const api_funding_payment_history_request_1 = require("../interfaces/codegen/sch
|
|
|
37
42
|
const api_funding_payment_history_response_1 = require("../interfaces/codegen/schema-maps/api_funding_payment_history_response");
|
|
38
43
|
const api_get_all_initial_leverage_request_1 = require("../interfaces/codegen/schema-maps/api_get_all_initial_leverage_request");
|
|
39
44
|
const api_get_all_initial_leverage_response_1 = require("../interfaces/codegen/schema-maps/api_get_all_initial_leverage_response");
|
|
45
|
+
const api_get_authorized_builders_response_1 = require("../interfaces/codegen/schema-maps/api_get_authorized_builders_response");
|
|
46
|
+
const api_get_isolated_position_margin_limits_request_1 = require("../interfaces/codegen/schema-maps/api_get_isolated_position_margin_limits_request");
|
|
47
|
+
const api_get_isolated_position_margin_limits_response_1 = require("../interfaces/codegen/schema-maps/api_get_isolated_position_margin_limits_response");
|
|
40
48
|
const api_get_margin_tiers_response_1 = require("../interfaces/codegen/schema-maps/api_get_margin_tiers_response");
|
|
41
49
|
const api_get_order_group_request_1 = require("../interfaces/codegen/schema-maps/api_get_order_group_request");
|
|
42
50
|
const api_get_order_group_response_1 = require("../interfaces/codegen/schema-maps/api_get_order_group_response");
|
|
@@ -55,7 +63,6 @@ const api_pre_order_check_request_1 = require("../interfaces/codegen/schema-maps
|
|
|
55
63
|
const api_pre_order_check_response_1 = require("../interfaces/codegen/schema-maps/api_pre_order_check_response");
|
|
56
64
|
const api_query_account_performance_trend_request_1 = require("../interfaces/codegen/schema-maps/api_query_account_performance_trend_request");
|
|
57
65
|
const api_query_account_performance_trend_response_1 = require("../interfaces/codegen/schema-maps/api_query_account_performance_trend_response");
|
|
58
|
-
const api_query_account_today_performance_request_1 = require("../interfaces/codegen/schema-maps/api_query_account_today_performance_request");
|
|
59
66
|
const api_query_account_today_performance_response_1 = require("../interfaces/codegen/schema-maps/api_query_account_today_performance_response");
|
|
60
67
|
const api_query_list_funding_account_summary_request_1 = require("../interfaces/codegen/schema-maps/api_query_list_funding_account_summary_request");
|
|
61
68
|
const api_query_list_funding_account_summary_response_1 = require("../interfaces/codegen/schema-maps/api_query_list_funding_account_summary_response");
|
|
@@ -79,6 +86,8 @@ const api_replace_orders_request_1 = require("../interfaces/codegen/schema-maps/
|
|
|
79
86
|
const api_replace_orders_response_1 = require("../interfaces/codegen/schema-maps/api_replace_orders_response");
|
|
80
87
|
const api_set_initial_leverage_request_1 = require("../interfaces/codegen/schema-maps/api_set_initial_leverage_request");
|
|
81
88
|
const api_set_initial_leverage_response_1 = require("../interfaces/codegen/schema-maps/api_set_initial_leverage_response");
|
|
89
|
+
const api_set_sub_account_position_margin_config_request_1 = require("../interfaces/codegen/schema-maps/api_set_sub_account_position_margin_config_request");
|
|
90
|
+
const api_set_sub_account_position_margin_config_response_1 = require("../interfaces/codegen/schema-maps/api_set_sub_account_position_margin_config_response");
|
|
82
91
|
const api_socialized_loss_status_response_1 = require("../interfaces/codegen/schema-maps/api_socialized_loss_status_response");
|
|
83
92
|
const api_sub_account_history_request_1 = require("../interfaces/codegen/schema-maps/api_sub_account_history_request");
|
|
84
93
|
const api_sub_account_history_response_1 = require("../interfaces/codegen/schema-maps/api_sub_account_history_response");
|
|
@@ -176,6 +185,39 @@ class TDG {
|
|
|
176
185
|
return utils_1.Utils.schemaMap(response.data, api_positions_response_1.API_POSITIONS_RESPONSE_MAP.LITE_TO_FULL);
|
|
177
186
|
}).catch(utils_1.Utils.coverApiError);
|
|
178
187
|
}
|
|
188
|
+
setPositionConfig(payload, config) {
|
|
189
|
+
return this._axios.post(this._liteUrl + '/set_position_config', utils_1.Utils.schemaMap(payload, api_set_sub_account_position_margin_config_request_1.API_SET_SUB_ACCOUNT_POSITION_MARGIN_CONFIG_REQUEST_MAP.FULL_TO_LITE, true), config).then((response) => {
|
|
190
|
+
return utils_1.Utils.schemaMap(response.data, api_set_sub_account_position_margin_config_response_1.API_SET_SUB_ACCOUNT_POSITION_MARGIN_CONFIG_RESPONSE_MAP.LITE_TO_FULL);
|
|
191
|
+
}).catch(utils_1.Utils.coverApiError);
|
|
192
|
+
}
|
|
193
|
+
addPositionMargin(payload, config) {
|
|
194
|
+
return this._axios.post(this._liteUrl + '/add_position_margin', utils_1.Utils.schemaMap(payload, api_add_isolated_position_margin_request_1.API_ADD_ISOLATED_POSITION_MARGIN_REQUEST_MAP.FULL_TO_LITE, true), config).then((response) => {
|
|
195
|
+
return utils_1.Utils.schemaMap(response.data, api_add_isolated_position_margin_response_1.API_ADD_ISOLATED_POSITION_MARGIN_RESPONSE_MAP.LITE_TO_FULL);
|
|
196
|
+
}).catch(utils_1.Utils.coverApiError);
|
|
197
|
+
}
|
|
198
|
+
getPositionMarginLimits(payload, config) {
|
|
199
|
+
return this._axios.post(this._liteUrl + '/get_position_margin_limits', utils_1.Utils.schemaMap(payload, api_get_isolated_position_margin_limits_request_1.API_GET_ISOLATED_POSITION_MARGIN_LIMITS_REQUEST_MAP.FULL_TO_LITE, true), config).then((response) => {
|
|
200
|
+
return utils_1.Utils.schemaMap(response.data, api_get_isolated_position_margin_limits_response_1.API_GET_ISOLATED_POSITION_MARGIN_LIMITS_RESPONSE_MAP.LITE_TO_FULL);
|
|
201
|
+
}).catch(utils_1.Utils.coverApiError);
|
|
202
|
+
}
|
|
203
|
+
/**
|
|
204
|
+
* APIs for Builder
|
|
205
|
+
*/
|
|
206
|
+
authorizeBuilder(payload, config) {
|
|
207
|
+
return this._axios.post(this._liteUrl + '/authorize_builder', utils_1.Utils.schemaMap(payload, api_authorize_builder_request_1.API_AUTHORIZE_BUILDER_REQUEST_MAP.FULL_TO_LITE, true), config).then((response) => {
|
|
208
|
+
return utils_1.Utils.schemaMap(response.data, ack_response_1.ACK_RESPONSE_MAP.LITE_TO_FULL);
|
|
209
|
+
}).catch(utils_1.Utils.coverApiError);
|
|
210
|
+
}
|
|
211
|
+
getAuthorizedBuilders(config) {
|
|
212
|
+
return this._axios.post(this._liteUrl + '/get_authorized_builders', null, config).then((response) => {
|
|
213
|
+
return utils_1.Utils.schemaMap(response.data, api_get_authorized_builders_response_1.API_GET_AUTHORIZED_BUILDERS_RESPONSE_MAP.LITE_TO_FULL);
|
|
214
|
+
}).catch(utils_1.Utils.coverApiError);
|
|
215
|
+
}
|
|
216
|
+
builderFillHistory(payload, config) {
|
|
217
|
+
return this._axios.post(this._liteUrl + '/builder_fill_history', utils_1.Utils.schemaMap(payload, api_builder_fill_history_request_1.API_BUILDER_FILL_HISTORY_REQUEST_MAP.FULL_TO_LITE, true), config).then((response) => {
|
|
218
|
+
return utils_1.Utils.schemaMap(response.data, api_builder_fill_history_response_1.API_BUILDER_FILL_HISTORY_RESPONSE_MAP.LITE_TO_FULL);
|
|
219
|
+
}).catch(utils_1.Utils.coverApiError);
|
|
220
|
+
}
|
|
179
221
|
/**
|
|
180
222
|
* @see https://api-docs.grvt.io/trading_api/#sub-account-summary
|
|
181
223
|
*/
|
|
@@ -462,8 +504,8 @@ class TDG {
|
|
|
462
504
|
/**
|
|
463
505
|
* START: Portfolio
|
|
464
506
|
*/
|
|
465
|
-
accountTodayPerformance(
|
|
466
|
-
return this._axios.post(this._liteUrl + '/account_today_performance',
|
|
507
|
+
accountTodayPerformance(config) {
|
|
508
|
+
return this._axios.post(this._liteUrl + '/account_today_performance', null, config).then((response) => {
|
|
467
509
|
return utils_1.Utils.schemaMap(response.data, api_query_account_today_performance_response_1.API_QUERY_ACCOUNT_TODAY_PERFORMANCE_RESPONSE_MAP.LITE_TO_FULL);
|
|
468
510
|
}).catch(utils_1.Utils.coverApiError);
|
|
469
511
|
}
|
|
@@ -78,6 +78,12 @@ export interface IAggregatedAccountPerformance {
|
|
|
78
78
|
main_account_id?: string;
|
|
79
79
|
aggregated_pnl?: string;
|
|
80
80
|
investment_pnl?: string;
|
|
81
|
+
equity_start?: string;
|
|
82
|
+
equity_end?: string;
|
|
83
|
+
net_transfer?: string;
|
|
84
|
+
investment_balance_start?: string;
|
|
85
|
+
investment_balance_end?: string;
|
|
86
|
+
net_investment?: string;
|
|
81
87
|
}
|
|
82
88
|
export interface IAggregatedAccountSummary {
|
|
83
89
|
main_account_id?: string;
|
|
@@ -92,8 +98,8 @@ export interface IAggregatedAccountSummary {
|
|
|
92
98
|
}
|
|
93
99
|
export interface IApiAccountPerformanceTrend {
|
|
94
100
|
start_interval?: string;
|
|
95
|
-
end_interval?: string;
|
|
96
101
|
aggregated_pnl?: string;
|
|
102
|
+
investment_pnl?: string;
|
|
97
103
|
}
|
|
98
104
|
export interface IApiAddIsolatedPositionMarginRequest {
|
|
99
105
|
sub_account_id?: string;
|
|
@@ -107,6 +113,18 @@ export interface IApiAddIsolatedPositionMarginResponse {
|
|
|
107
113
|
export interface IApiAggregatedAccountSummaryResponse {
|
|
108
114
|
result?: IAggregatedAccountSummary;
|
|
109
115
|
}
|
|
116
|
+
export interface IApiAuthorizeBuilderRequest {
|
|
117
|
+
main_account_id?: string;
|
|
118
|
+
builder_account_id?: string;
|
|
119
|
+
max_futures_fee_rate?: string;
|
|
120
|
+
max_spot_fee_rate?: string;
|
|
121
|
+
signature?: ISignature;
|
|
122
|
+
}
|
|
123
|
+
export interface IApiAuthorizedBuilder {
|
|
124
|
+
builder_account_id?: string;
|
|
125
|
+
max_futures_fee_rate?: string;
|
|
126
|
+
max_spot_fee_rate?: string;
|
|
127
|
+
}
|
|
110
128
|
export interface IApiBatchQueryVaultDetailRequest {
|
|
111
129
|
vault_i_ds?: string[];
|
|
112
130
|
}
|
|
@@ -125,6 +143,17 @@ export interface IApiBatchQueryVaultRiskMetricRequest {
|
|
|
125
143
|
export interface IApiBatchQueryVaultRiskMetricResponse {
|
|
126
144
|
result?: IVaultRiskMetric[];
|
|
127
145
|
}
|
|
146
|
+
export interface IApiBuilderFillHistoryRequest {
|
|
147
|
+
builder_main_account_id?: string;
|
|
148
|
+
start_time?: string;
|
|
149
|
+
end_time?: string;
|
|
150
|
+
limit?: number;
|
|
151
|
+
cursor?: string;
|
|
152
|
+
}
|
|
153
|
+
export interface IApiBuilderFillHistoryResponse {
|
|
154
|
+
result?: IBuilderFillHistory[];
|
|
155
|
+
next?: string;
|
|
156
|
+
}
|
|
128
157
|
export interface IApiBulkOrdersRequest {
|
|
129
158
|
sub_account_id?: string;
|
|
130
159
|
orders?: IOrder[];
|
|
@@ -193,6 +222,7 @@ export interface IApiCreateAccountMultiplierRequest {
|
|
|
193
222
|
multiplier?: number;
|
|
194
223
|
effective_epoch_start?: number;
|
|
195
224
|
effective_epoch_end?: number;
|
|
225
|
+
reserve_multiplier?: number;
|
|
196
226
|
}
|
|
197
227
|
export interface IApiCreateAccountMultiplierResponse {
|
|
198
228
|
id?: string;
|
|
@@ -379,9 +409,14 @@ export interface IApiFindAccountMultiplierRequest {
|
|
|
379
409
|
metric?: EMetricType;
|
|
380
410
|
epoch?: number;
|
|
381
411
|
status?: EAccountMultiplierStatus;
|
|
412
|
+
page?: number;
|
|
413
|
+
limit?: number;
|
|
382
414
|
}
|
|
383
415
|
export interface IApiFindAccountMultiplierResponse {
|
|
384
416
|
result?: IRewardAccountMultiplier[];
|
|
417
|
+
page?: number;
|
|
418
|
+
limit?: number;
|
|
419
|
+
total?: number;
|
|
385
420
|
}
|
|
386
421
|
export interface IApiFindConflictAccountMultiplierResponse {
|
|
387
422
|
result?: IRewardAccountMultiplier[];
|
|
@@ -500,6 +535,9 @@ export interface IApiGetAllInstrumentsRequest {
|
|
|
500
535
|
export interface IApiGetAllInstrumentsResponse {
|
|
501
536
|
result?: IInstrumentDisplay[];
|
|
502
537
|
}
|
|
538
|
+
export interface IApiGetAuthorizedBuildersResponse {
|
|
539
|
+
results?: IApiAuthorizedBuilder[];
|
|
540
|
+
}
|
|
503
541
|
export interface IApiGetCEVAccessTiersResponse {
|
|
504
542
|
enabled?: boolean;
|
|
505
543
|
tiers?: ICEVAccessTier[];
|
|
@@ -562,6 +600,15 @@ export interface IApiGetInstrumentRequest {
|
|
|
562
600
|
export interface IApiGetInstrumentResponse {
|
|
563
601
|
result?: IInstrumentDisplay;
|
|
564
602
|
}
|
|
603
|
+
export interface IApiGetIsolatedPositionMarginLimitsRequest {
|
|
604
|
+
sub_account_id?: string;
|
|
605
|
+
instrument?: string;
|
|
606
|
+
}
|
|
607
|
+
export interface IApiGetIsolatedPositionMarginLimitsResponse {
|
|
608
|
+
instrument?: string;
|
|
609
|
+
max_addable_amount?: string;
|
|
610
|
+
max_removable_amount?: string;
|
|
611
|
+
}
|
|
565
612
|
export interface IApiGetLPInfoRequest {
|
|
566
613
|
kind?: EKind;
|
|
567
614
|
base?: string;
|
|
@@ -829,6 +876,17 @@ export interface IApiPreOrderCheckRequest {
|
|
|
829
876
|
export interface IApiPreOrderCheckResponse {
|
|
830
877
|
results?: IPreOrderCheckResult[];
|
|
831
878
|
}
|
|
879
|
+
export interface IApiQueryAccountDailyPerformanceRequest {
|
|
880
|
+
start_time?: string;
|
|
881
|
+
end_time?: string;
|
|
882
|
+
}
|
|
883
|
+
export interface IApiQueryAccountDailyPerformanceResponse {
|
|
884
|
+
result?: IApiAccountPerformanceTrend[];
|
|
885
|
+
}
|
|
886
|
+
export interface IApiQueryAccountPerformanceResponse {
|
|
887
|
+
aggregated_pnl?: string;
|
|
888
|
+
investment_pnl?: string;
|
|
889
|
+
}
|
|
832
890
|
export interface IApiQueryAccountPerformanceTrendRequest {
|
|
833
891
|
time_interval?: ETimeInterval;
|
|
834
892
|
start_time?: string;
|
|
@@ -844,8 +902,6 @@ export interface IApiQueryAccountSummaryResponse {
|
|
|
844
902
|
result?: ISnapAccountSummary[];
|
|
845
903
|
next?: string;
|
|
846
904
|
}
|
|
847
|
-
export interface IApiQueryAccountTodayPerformanceRequest {
|
|
848
|
-
}
|
|
849
905
|
export interface IApiQueryAccountTodayPerformanceResponse {
|
|
850
906
|
aggregated_pnl?: string;
|
|
851
907
|
investment_pnl?: string;
|
|
@@ -888,6 +944,14 @@ export interface IApiQuerySnapVaultPositionResponse {
|
|
|
888
944
|
event_time?: string;
|
|
889
945
|
positions?: IPositionSummary[];
|
|
890
946
|
}
|
|
947
|
+
export interface IApiQuerySubAccountDailyPerformanceRequest {
|
|
948
|
+
sub_account_id?: string;
|
|
949
|
+
start_time?: string;
|
|
950
|
+
end_time?: string;
|
|
951
|
+
}
|
|
952
|
+
export interface IApiQuerySubAccountDailyPerformanceResponse {
|
|
953
|
+
result?: IApiSubAccountDailyPerformance[];
|
|
954
|
+
}
|
|
891
955
|
export interface IApiQueryTradingAccountRiskMetricRequest {
|
|
892
956
|
sub_account_id?: string;
|
|
893
957
|
time_interval?: ETimeInterval;
|
|
@@ -999,6 +1063,11 @@ export interface IApiRewardLeaderboardItem {
|
|
|
999
1063
|
rank?: number;
|
|
1000
1064
|
point?: string;
|
|
1001
1065
|
}
|
|
1066
|
+
export interface IApiSetBuilderCodeConfig {
|
|
1067
|
+
enabled?: boolean;
|
|
1068
|
+
max_futures_fee_rate?: string;
|
|
1069
|
+
max_spot_fee_rate?: string;
|
|
1070
|
+
}
|
|
1002
1071
|
export interface IApiSetCEVAccessTiersRequest {
|
|
1003
1072
|
enabled?: boolean;
|
|
1004
1073
|
tiers?: ICEVAccessTier[];
|
|
@@ -1067,6 +1136,10 @@ export interface IApiSocializedLossStatusResponse {
|
|
|
1067
1136
|
is_active?: boolean;
|
|
1068
1137
|
haircut_ratio?: string;
|
|
1069
1138
|
}
|
|
1139
|
+
export interface IApiSubAccountDailyPerformance {
|
|
1140
|
+
start_interval?: string;
|
|
1141
|
+
pnl?: string;
|
|
1142
|
+
}
|
|
1070
1143
|
export interface IApiSubAccountHistoryRequest {
|
|
1071
1144
|
sub_account_id?: string;
|
|
1072
1145
|
start_time?: string;
|
|
@@ -1374,6 +1447,19 @@ export interface IBatchCreateAccountMultiplierElement {
|
|
|
1374
1447
|
multiplier?: number;
|
|
1375
1448
|
metadata?: IRewardAccountMultiplierMetadata;
|
|
1376
1449
|
}
|
|
1450
|
+
export interface IBuilderFillHistory {
|
|
1451
|
+
event_time?: string;
|
|
1452
|
+
off_chain_account_id?: string;
|
|
1453
|
+
instrument?: string;
|
|
1454
|
+
is_buyer?: boolean;
|
|
1455
|
+
is_taker?: boolean;
|
|
1456
|
+
size?: string;
|
|
1457
|
+
price?: string;
|
|
1458
|
+
mark_price?: string;
|
|
1459
|
+
index_price?: string;
|
|
1460
|
+
fee_rate?: string;
|
|
1461
|
+
fee?: string;
|
|
1462
|
+
}
|
|
1377
1463
|
export interface ICEVAccessTier {
|
|
1378
1464
|
idx?: number;
|
|
1379
1465
|
lifetime_trading_volume_range_start?: string;
|
|
@@ -1625,6 +1711,9 @@ export interface IFill {
|
|
|
1625
1711
|
broker?: EBrokerTag;
|
|
1626
1712
|
is_rpi?: boolean;
|
|
1627
1713
|
source?: ESource;
|
|
1714
|
+
builder?: string;
|
|
1715
|
+
builder_fee_rate?: string;
|
|
1716
|
+
builder_fee?: string;
|
|
1628
1717
|
}
|
|
1629
1718
|
export interface IFlatReferral {
|
|
1630
1719
|
account_id?: string;
|
|
@@ -1804,6 +1893,8 @@ export interface IOrder {
|
|
|
1804
1893
|
state?: IOrderState;
|
|
1805
1894
|
is_liquidation?: boolean;
|
|
1806
1895
|
is_derisk?: boolean;
|
|
1896
|
+
builder?: string;
|
|
1897
|
+
builder_fee?: string;
|
|
1807
1898
|
}
|
|
1808
1899
|
export interface IOrderLeg {
|
|
1809
1900
|
instrument?: string;
|
|
@@ -1900,6 +1991,10 @@ export interface IPositions {
|
|
|
1900
1991
|
leverage?: string;
|
|
1901
1992
|
cumulative_fee?: string;
|
|
1902
1993
|
cumulative_realized_funding_payment?: string;
|
|
1994
|
+
margin_type?: EPositionMarginType;
|
|
1995
|
+
isolated_balance?: string;
|
|
1996
|
+
isolated_im?: string;
|
|
1997
|
+
isolated_mm?: string;
|
|
1903
1998
|
}
|
|
1904
1999
|
export interface IPreMinRedemptions {
|
|
1905
2000
|
requests?: IVaultRedemptionRequest[];
|
|
@@ -1971,9 +2066,11 @@ export interface IQueryListSubAccountHistoryRequest {
|
|
|
1971
2066
|
sub_account_id?: string;
|
|
1972
2067
|
start_time?: string;
|
|
1973
2068
|
end_time?: string;
|
|
2069
|
+
limit?: number;
|
|
2070
|
+
sort_by_time_desc?: boolean;
|
|
1974
2071
|
}
|
|
1975
2072
|
export interface IQueryListSubAccountHistoryResponse {
|
|
1976
|
-
result?:
|
|
2073
|
+
result?: ISnapSubAccountHistory[];
|
|
1977
2074
|
}
|
|
1978
2075
|
export interface IQueryMainAccountLeaderboardRequest {
|
|
1979
2076
|
limit?: number;
|
|
@@ -2040,6 +2137,7 @@ export interface IRewardAccountMultiplier {
|
|
|
2040
2137
|
create_time?: string;
|
|
2041
2138
|
update_time?: string;
|
|
2042
2139
|
metadata?: IRewardAccountMultiplierMetadata;
|
|
2140
|
+
reserve_multiplier?: number;
|
|
2043
2141
|
}
|
|
2044
2142
|
export interface IRewardAccountMultiplierMetadata {
|
|
2045
2143
|
ambassador_tier?: number;
|
|
@@ -2099,6 +2197,13 @@ export interface ISnapAccountSummary {
|
|
|
2099
2197
|
start_interval?: string;
|
|
2100
2198
|
total_equity?: string;
|
|
2101
2199
|
}
|
|
2200
|
+
export interface ISnapSubAccountHistory {
|
|
2201
|
+
start_interval?: string;
|
|
2202
|
+
sub_account_id?: string;
|
|
2203
|
+
total_equity?: string;
|
|
2204
|
+
unrealized_pnl?: string;
|
|
2205
|
+
is_vault?: boolean;
|
|
2206
|
+
}
|
|
2102
2207
|
export interface ISnapSubAccountSummary {
|
|
2103
2208
|
event_time?: string;
|
|
2104
2209
|
start_interval?: string;
|
|
@@ -60,6 +60,7 @@ export declare enum EClusterConfigType {
|
|
|
60
60
|
FLAG_MM_CHECK_MULTIPLIER = "FLAG_MM_CHECK_MULTIPLIER",
|
|
61
61
|
FLAG_ISOLATED_MARGIN = "FLAG_ISOLATED_MARGIN",
|
|
62
62
|
FLAG_ENABLE_SET_SUB_ACCOUNT_POSITION_MARGIN_CONFIG = "FLAG_ENABLE_SET_SUB_ACCOUNT_POSITION_MARGIN_CONFIG",
|
|
63
|
-
FLAG_ENABLE_ADD_ISOLATED_POSITION_MARGIN = "FLAG_ENABLE_ADD_ISOLATED_POSITION_MARGIN"
|
|
63
|
+
FLAG_ENABLE_ADD_ISOLATED_POSITION_MARGIN = "FLAG_ENABLE_ADD_ISOLATED_POSITION_MARGIN",
|
|
64
|
+
FLAG_BUILDER_CODE = "FLAG_BUILDER_CODE"
|
|
64
65
|
}
|
|
65
66
|
export declare const EClusterConfigTypeInt: Record<EClusterConfigType, number>;
|
|
@@ -127,6 +127,8 @@ var EClusterConfigType;
|
|
|
127
127
|
EClusterConfigType["FLAG_ENABLE_SET_SUB_ACCOUNT_POSITION_MARGIN_CONFIG"] = "FLAG_ENABLE_SET_SUB_ACCOUNT_POSITION_MARGIN_CONFIG";
|
|
128
128
|
// Flag to enable add isolated position margin
|
|
129
129
|
EClusterConfigType["FLAG_ENABLE_ADD_ISOLATED_POSITION_MARGIN"] = "FLAG_ENABLE_ADD_ISOLATED_POSITION_MARGIN";
|
|
130
|
+
// Flag builder code
|
|
131
|
+
EClusterConfigType["FLAG_BUILDER_CODE"] = "FLAG_BUILDER_CODE";
|
|
130
132
|
})(EClusterConfigType || (exports.EClusterConfigType = EClusterConfigType = {}));
|
|
131
133
|
exports.EClusterConfigTypeInt = Object.freeze({
|
|
132
134
|
[EClusterConfigType.CLIENT_TIER]: 1,
|
|
@@ -190,5 +192,6 @@ exports.EClusterConfigTypeInt = Object.freeze({
|
|
|
190
192
|
[EClusterConfigType.FLAG_MM_CHECK_MULTIPLIER]: 59,
|
|
191
193
|
[EClusterConfigType.FLAG_ISOLATED_MARGIN]: 60,
|
|
192
194
|
[EClusterConfigType.FLAG_ENABLE_SET_SUB_ACCOUNT_POSITION_MARGIN_CONFIG]: 61,
|
|
193
|
-
[EClusterConfigType.FLAG_ENABLE_ADD_ISOLATED_POSITION_MARGIN]: 62
|
|
195
|
+
[EClusterConfigType.FLAG_ENABLE_ADD_ISOLATED_POSITION_MARGIN]: 62,
|
|
196
|
+
[EClusterConfigType.FLAG_BUILDER_CODE]: 63
|
|
194
197
|
});
|
|
@@ -37,6 +37,10 @@ export declare enum EOrderRejectReason {
|
|
|
37
37
|
DERISK_NOT_SUPPORTED = "DERISK_NOT_SUPPORTED",
|
|
38
38
|
INVALID_ORDER_TYPE = "INVALID_ORDER_TYPE",
|
|
39
39
|
CURRENCY_NOT_DEFINED = "CURRENCY_NOT_DEFINED",
|
|
40
|
-
INVALID_CHAIN_ID = "INVALID_CHAIN_ID"
|
|
40
|
+
INVALID_CHAIN_ID = "INVALID_CHAIN_ID",
|
|
41
|
+
BUILDER_ORDER_FEE_EXCEED = "BUILDER_ORDER_FEE_EXCEED",
|
|
42
|
+
BUILDER_ORDER_FEE_NEGATIVE = "BUILDER_ORDER_FEE_NEGATIVE",
|
|
43
|
+
BUILDER_ORDER_BUILDER_NOT_AUTHORIZED = "BUILDER_ORDER_BUILDER_NOT_AUTHORIZED",
|
|
44
|
+
BUILDER_ORDER_BUILDER_NOT_EXIST = "BUILDER_ORDER_BUILDER_NOT_EXIST"
|
|
41
45
|
}
|
|
42
46
|
export declare const EOrderRejectReasonInt: Record<EOrderRejectReason, number>;
|
|
@@ -81,6 +81,14 @@ var EOrderRejectReason;
|
|
|
81
81
|
EOrderRejectReason["CURRENCY_NOT_DEFINED"] = "CURRENCY_NOT_DEFINED";
|
|
82
82
|
// the chain ID is invalid
|
|
83
83
|
EOrderRejectReason["INVALID_CHAIN_ID"] = "INVALID_CHAIN_ID";
|
|
84
|
+
// Builder fee exceed the limit
|
|
85
|
+
EOrderRejectReason["BUILDER_ORDER_FEE_EXCEED"] = "BUILDER_ORDER_FEE_EXCEED";
|
|
86
|
+
// Builder fee is below 0
|
|
87
|
+
EOrderRejectReason["BUILDER_ORDER_FEE_NEGATIVE"] = "BUILDER_ORDER_FEE_NEGATIVE";
|
|
88
|
+
// Builder is not an authorized builder for client
|
|
89
|
+
EOrderRejectReason["BUILDER_ORDER_BUILDER_NOT_AUTHORIZED"] = "BUILDER_ORDER_BUILDER_NOT_AUTHORIZED";
|
|
90
|
+
// Builder does not exist
|
|
91
|
+
EOrderRejectReason["BUILDER_ORDER_BUILDER_NOT_EXIST"] = "BUILDER_ORDER_BUILDER_NOT_EXIST";
|
|
84
92
|
})(EOrderRejectReason || (exports.EOrderRejectReason = EOrderRejectReason = {}));
|
|
85
93
|
exports.EOrderRejectReasonInt = Object.freeze({
|
|
86
94
|
[EOrderRejectReason.UNSPECIFIED]: 0,
|
|
@@ -121,5 +129,9 @@ exports.EOrderRejectReasonInt = Object.freeze({
|
|
|
121
129
|
[EOrderRejectReason.DERISK_NOT_SUPPORTED]: 35,
|
|
122
130
|
[EOrderRejectReason.INVALID_ORDER_TYPE]: 36,
|
|
123
131
|
[EOrderRejectReason.CURRENCY_NOT_DEFINED]: 37,
|
|
124
|
-
[EOrderRejectReason.INVALID_CHAIN_ID]: 38
|
|
132
|
+
[EOrderRejectReason.INVALID_CHAIN_ID]: 38,
|
|
133
|
+
[EOrderRejectReason.BUILDER_ORDER_FEE_EXCEED]: 39,
|
|
134
|
+
[EOrderRejectReason.BUILDER_ORDER_FEE_NEGATIVE]: 40,
|
|
135
|
+
[EOrderRejectReason.BUILDER_ORDER_BUILDER_NOT_AUTHORIZED]: 41,
|
|
136
|
+
[EOrderRejectReason.BUILDER_ORDER_BUILDER_NOT_EXIST]: 42
|
|
125
137
|
});
|
|
@@ -50,6 +50,7 @@ export declare enum ETransactionType {
|
|
|
50
50
|
VAULT_CROSS_EXCHANGE_UPDATE = "VAULT_CROSS_EXCHANGE_UPDATE",
|
|
51
51
|
UPDATE_FUNDING_INFO = "UPDATE_FUNDING_INFO",
|
|
52
52
|
SET_SUB_ACCOUNT_POSITION_MARGIN_CONFIG = "SET_SUB_ACCOUNT_POSITION_MARGIN_CONFIG",
|
|
53
|
-
ADD_ISOLATED_POSITION_MARGIN = "ADD_ISOLATED_POSITION_MARGIN"
|
|
53
|
+
ADD_ISOLATED_POSITION_MARGIN = "ADD_ISOLATED_POSITION_MARGIN",
|
|
54
|
+
AUTHORIZE_BUILDER = "AUTHORIZE_BUILDER"
|
|
54
55
|
}
|
|
55
56
|
export declare const ETransactionTypeInt: Record<ETransactionType, number>;
|
|
@@ -55,6 +55,7 @@ var ETransactionType;
|
|
|
55
55
|
ETransactionType["UPDATE_FUNDING_INFO"] = "UPDATE_FUNDING_INFO";
|
|
56
56
|
ETransactionType["SET_SUB_ACCOUNT_POSITION_MARGIN_CONFIG"] = "SET_SUB_ACCOUNT_POSITION_MARGIN_CONFIG";
|
|
57
57
|
ETransactionType["ADD_ISOLATED_POSITION_MARGIN"] = "ADD_ISOLATED_POSITION_MARGIN";
|
|
58
|
+
ETransactionType["AUTHORIZE_BUILDER"] = "AUTHORIZE_BUILDER";
|
|
58
59
|
})(ETransactionType || (exports.ETransactionType = ETransactionType = {}));
|
|
59
60
|
exports.ETransactionTypeInt = Object.freeze({
|
|
60
61
|
[ETransactionType.UNSPECIFIED_1]: 1,
|
|
@@ -108,5 +109,6 @@ exports.ETransactionTypeInt = Object.freeze({
|
|
|
108
109
|
[ETransactionType.VAULT_CROSS_EXCHANGE_UPDATE]: 49,
|
|
109
110
|
[ETransactionType.UPDATE_FUNDING_INFO]: 50,
|
|
110
111
|
[ETransactionType.SET_SUB_ACCOUNT_POSITION_MARGIN_CONFIG]: 51,
|
|
111
|
-
[ETransactionType.ADD_ISOLATED_POSITION_MARGIN]: 52
|
|
112
|
+
[ETransactionType.ADD_ISOLATED_POSITION_MARGIN]: 52,
|
|
113
|
+
[ETransactionType.AUTHORIZE_BUILDER]: 53
|
|
112
114
|
});
|
|
@@ -7,12 +7,24 @@ exports.AGGREGATED_ACCOUNT_PERFORMANCE_MAP = Object.freeze({
|
|
|
7
7
|
start_interval: 'si',
|
|
8
8
|
main_account_id: 'ma',
|
|
9
9
|
aggregated_pnl: 'ap',
|
|
10
|
-
investment_pnl: 'ip'
|
|
10
|
+
investment_pnl: 'ip',
|
|
11
|
+
equity_start: 'es',
|
|
12
|
+
equity_end: 'ee',
|
|
13
|
+
net_transfer: 'nt',
|
|
14
|
+
investment_balance_start: 'ib',
|
|
15
|
+
investment_balance_end: 'ib1',
|
|
16
|
+
net_investment: 'ni'
|
|
11
17
|
},
|
|
12
18
|
LITE_TO_FULL: {
|
|
13
19
|
si: 'start_interval',
|
|
14
20
|
ma: 'main_account_id',
|
|
15
21
|
ap: 'aggregated_pnl',
|
|
16
|
-
ip: 'investment_pnl'
|
|
22
|
+
ip: 'investment_pnl',
|
|
23
|
+
es: 'equity_start',
|
|
24
|
+
ee: 'equity_end',
|
|
25
|
+
nt: 'net_transfer',
|
|
26
|
+
ib: 'investment_balance_start',
|
|
27
|
+
ib1: 'investment_balance_end',
|
|
28
|
+
ni: 'net_investment'
|
|
17
29
|
}
|
|
18
30
|
});
|
|
@@ -5,12 +5,12 @@ exports.API_ACCOUNT_PERFORMANCE_TREND_MAP = void 0;
|
|
|
5
5
|
exports.API_ACCOUNT_PERFORMANCE_TREND_MAP = Object.freeze({
|
|
6
6
|
FULL_TO_LITE: {
|
|
7
7
|
start_interval: 'si',
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
aggregated_pnl: 'ap',
|
|
9
|
+
investment_pnl: 'ip'
|
|
10
10
|
},
|
|
11
11
|
LITE_TO_FULL: {
|
|
12
12
|
si: 'start_interval',
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
ap: 'aggregated_pnl',
|
|
14
|
+
ip: 'investment_pnl'
|
|
15
15
|
}
|
|
16
16
|
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.API_AUTHORIZE_BUILDER_REQUEST_MAP = void 0;
|
|
4
|
+
const signature_1 = require("./signature");
|
|
5
|
+
// Schema map for the 'API_AUTHORIZE_BUILDER_REQUEST' struct.
|
|
6
|
+
exports.API_AUTHORIZE_BUILDER_REQUEST_MAP = Object.freeze({
|
|
7
|
+
FULL_TO_LITE: {
|
|
8
|
+
main_account_id: 'ma',
|
|
9
|
+
builder_account_id: 'ba',
|
|
10
|
+
max_futures_fee_rate: 'mf',
|
|
11
|
+
max_spot_fee_rate: 'ms',
|
|
12
|
+
signature: ['s', signature_1.SIGNATURE_MAP.FULL_TO_LITE]
|
|
13
|
+
},
|
|
14
|
+
LITE_TO_FULL: {
|
|
15
|
+
ma: 'main_account_id',
|
|
16
|
+
ba: 'builder_account_id',
|
|
17
|
+
mf: 'max_futures_fee_rate',
|
|
18
|
+
ms: 'max_spot_fee_rate',
|
|
19
|
+
s: ['signature', signature_1.SIGNATURE_MAP.LITE_TO_FULL]
|
|
20
|
+
}
|
|
21
|
+
});
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.API_AUTHORIZED_BUILDER_MAP = void 0;
|
|
4
|
+
// Schema map for the 'API_AUTHORIZED_BUILDER' struct.
|
|
5
|
+
exports.API_AUTHORIZED_BUILDER_MAP = Object.freeze({
|
|
6
|
+
FULL_TO_LITE: {
|
|
7
|
+
builder_account_id: 'ba',
|
|
8
|
+
max_futures_fee_rate: 'mf',
|
|
9
|
+
max_spot_fee_rate: 'ms'
|
|
10
|
+
},
|
|
11
|
+
LITE_TO_FULL: {
|
|
12
|
+
ba: 'builder_account_id',
|
|
13
|
+
mf: 'max_futures_fee_rate',
|
|
14
|
+
ms: 'max_spot_fee_rate'
|
|
15
|
+
}
|
|
16
|
+
});
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.API_BUILDER_FILL_HISTORY_REQUEST_MAP = void 0;
|
|
4
|
+
// Schema map for the 'API_BUILDER_FILL_HISTORY_REQUEST' struct.
|
|
5
|
+
exports.API_BUILDER_FILL_HISTORY_REQUEST_MAP = Object.freeze({
|
|
6
|
+
FULL_TO_LITE: {
|
|
7
|
+
builder_main_account_id: 'bm',
|
|
8
|
+
start_time: 'st',
|
|
9
|
+
end_time: 'et',
|
|
10
|
+
limit: 'l',
|
|
11
|
+
cursor: 'c'
|
|
12
|
+
},
|
|
13
|
+
LITE_TO_FULL: {
|
|
14
|
+
bm: 'builder_main_account_id',
|
|
15
|
+
st: 'start_time',
|
|
16
|
+
et: 'end_time',
|
|
17
|
+
l: 'limit',
|
|
18
|
+
c: 'cursor'
|
|
19
|
+
}
|
|
20
|
+
});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.API_BUILDER_FILL_HISTORY_RESPONSE_MAP = void 0;
|
|
4
|
+
const builder_fill_history_1 = require("./builder_fill_history");
|
|
5
|
+
// Schema map for the 'API_BUILDER_FILL_HISTORY_RESPONSE' struct.
|
|
6
|
+
exports.API_BUILDER_FILL_HISTORY_RESPONSE_MAP = Object.freeze({
|
|
7
|
+
FULL_TO_LITE: {
|
|
8
|
+
result: ['r', [builder_fill_history_1.BUILDER_FILL_HISTORY_MAP.FULL_TO_LITE]],
|
|
9
|
+
next: 'n'
|
|
10
|
+
},
|
|
11
|
+
LITE_TO_FULL: {
|
|
12
|
+
r: ['result', [builder_fill_history_1.BUILDER_FILL_HISTORY_MAP.LITE_TO_FULL]],
|
|
13
|
+
n: 'next'
|
|
14
|
+
}
|
|
15
|
+
});
|
|
@@ -9,7 +9,8 @@ exports.API_CREATE_ACCOUNT_MULTIPLIER_REQUEST_MAP = Object.freeze({
|
|
|
9
9
|
account_type: 'at',
|
|
10
10
|
multiplier: 'm1',
|
|
11
11
|
effective_epoch_start: 'ee',
|
|
12
|
-
effective_epoch_end: 'ee1'
|
|
12
|
+
effective_epoch_end: 'ee1',
|
|
13
|
+
reserve_multiplier: 'rm'
|
|
13
14
|
},
|
|
14
15
|
LITE_TO_FULL: {
|
|
15
16
|
m: 'metric',
|
|
@@ -17,6 +18,7 @@ exports.API_CREATE_ACCOUNT_MULTIPLIER_REQUEST_MAP = Object.freeze({
|
|
|
17
18
|
at: 'account_type',
|
|
18
19
|
m1: 'multiplier',
|
|
19
20
|
ee: 'effective_epoch_start',
|
|
20
|
-
ee1: 'effective_epoch_end'
|
|
21
|
+
ee1: 'effective_epoch_end',
|
|
22
|
+
rm: 'reserve_multiplier'
|
|
21
23
|
}
|
|
22
24
|
});
|
|
@@ -9,7 +9,9 @@ exports.API_FIND_ACCOUNT_MULTIPLIER_REQUEST_MAP = Object.freeze({
|
|
|
9
9
|
account_type: 'at',
|
|
10
10
|
metric: 'm',
|
|
11
11
|
epoch: 'e',
|
|
12
|
-
status: 's'
|
|
12
|
+
status: 's',
|
|
13
|
+
page: 'p',
|
|
14
|
+
limit: 'l'
|
|
13
15
|
},
|
|
14
16
|
LITE_TO_FULL: {
|
|
15
17
|
oc: 'off_chain_account_id',
|
|
@@ -17,6 +19,8 @@ exports.API_FIND_ACCOUNT_MULTIPLIER_REQUEST_MAP = Object.freeze({
|
|
|
17
19
|
at: 'account_type',
|
|
18
20
|
m: 'metric',
|
|
19
21
|
e: 'epoch',
|
|
20
|
-
s: 'status'
|
|
22
|
+
s: 'status',
|
|
23
|
+
p: 'page',
|
|
24
|
+
l: 'limit'
|
|
21
25
|
}
|
|
22
26
|
});
|
|
@@ -5,9 +5,15 @@ const reward_account_multiplier_1 = require("./reward_account_multiplier");
|
|
|
5
5
|
// Schema map for the 'API_FIND_ACCOUNT_MULTIPLIER_RESPONSE' struct.
|
|
6
6
|
exports.API_FIND_ACCOUNT_MULTIPLIER_RESPONSE_MAP = Object.freeze({
|
|
7
7
|
FULL_TO_LITE: {
|
|
8
|
-
result: ['r', [reward_account_multiplier_1.REWARD_ACCOUNT_MULTIPLIER_MAP.FULL_TO_LITE]]
|
|
8
|
+
result: ['r', [reward_account_multiplier_1.REWARD_ACCOUNT_MULTIPLIER_MAP.FULL_TO_LITE]],
|
|
9
|
+
page: 'p',
|
|
10
|
+
limit: 'l',
|
|
11
|
+
total: 't'
|
|
9
12
|
},
|
|
10
13
|
LITE_TO_FULL: {
|
|
11
|
-
r: ['result', [reward_account_multiplier_1.REWARD_ACCOUNT_MULTIPLIER_MAP.LITE_TO_FULL]]
|
|
14
|
+
r: ['result', [reward_account_multiplier_1.REWARD_ACCOUNT_MULTIPLIER_MAP.LITE_TO_FULL]],
|
|
15
|
+
p: 'page',
|
|
16
|
+
l: 'limit',
|
|
17
|
+
t: 'total'
|
|
12
18
|
}
|
|
13
19
|
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.API_GET_AUTHORIZED_BUILDERS_RESPONSE_MAP = void 0;
|
|
4
|
+
const api_authorized_builder_1 = require("./api_authorized_builder");
|
|
5
|
+
// Schema map for the 'API_GET_AUTHORIZED_BUILDERS_RESPONSE' struct.
|
|
6
|
+
exports.API_GET_AUTHORIZED_BUILDERS_RESPONSE_MAP = Object.freeze({
|
|
7
|
+
FULL_TO_LITE: {
|
|
8
|
+
results: ['r', [api_authorized_builder_1.API_AUTHORIZED_BUILDER_MAP.FULL_TO_LITE]]
|
|
9
|
+
},
|
|
10
|
+
LITE_TO_FULL: {
|
|
11
|
+
r: ['results', [api_authorized_builder_1.API_AUTHORIZED_BUILDER_MAP.LITE_TO_FULL]]
|
|
12
|
+
}
|
|
13
|
+
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.API_GET_ISOLATED_POSITION_MARGIN_LIMITS_REQUEST_MAP = void 0;
|
|
4
|
+
// Schema map for the 'API_GET_ISOLATED_POSITION_MARGIN_LIMITS_REQUEST' struct.
|
|
5
|
+
exports.API_GET_ISOLATED_POSITION_MARGIN_LIMITS_REQUEST_MAP = Object.freeze({
|
|
6
|
+
FULL_TO_LITE: {
|
|
7
|
+
sub_account_id: 'sa',
|
|
8
|
+
instrument: 'i'
|
|
9
|
+
},
|
|
10
|
+
LITE_TO_FULL: {
|
|
11
|
+
sa: 'sub_account_id',
|
|
12
|
+
i: 'instrument'
|
|
13
|
+
}
|
|
14
|
+
});
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.API_GET_ISOLATED_POSITION_MARGIN_LIMITS_RESPONSE_MAP = void 0;
|
|
4
|
+
// Schema map for the 'API_GET_ISOLATED_POSITION_MARGIN_LIMITS_RESPONSE' struct.
|
|
5
|
+
exports.API_GET_ISOLATED_POSITION_MARGIN_LIMITS_RESPONSE_MAP = Object.freeze({
|
|
6
|
+
FULL_TO_LITE: {
|
|
7
|
+
instrument: 'i',
|
|
8
|
+
max_addable_amount: 'ma',
|
|
9
|
+
max_removable_amount: 'mr'
|
|
10
|
+
},
|
|
11
|
+
LITE_TO_FULL: {
|
|
12
|
+
i: 'instrument',
|
|
13
|
+
ma: 'max_addable_amount',
|
|
14
|
+
mr: 'max_removable_amount'
|
|
15
|
+
}
|
|
16
|
+
});
|
|
@@ -20,7 +20,11 @@ exports.POSITIONS_MAP = Object.freeze({
|
|
|
20
20
|
est_liquidation_price: 'el',
|
|
21
21
|
leverage: 'l',
|
|
22
22
|
cumulative_fee: 'cf',
|
|
23
|
-
cumulative_realized_funding_payment: 'cr'
|
|
23
|
+
cumulative_realized_funding_payment: 'cr',
|
|
24
|
+
margin_type: 'mt',
|
|
25
|
+
isolated_balance: 'ib',
|
|
26
|
+
isolated_im: 'ii',
|
|
27
|
+
isolated_mm: 'im'
|
|
24
28
|
},
|
|
25
29
|
LITE_TO_FULL: {
|
|
26
30
|
et: 'event_time',
|
|
@@ -39,6 +43,10 @@ exports.POSITIONS_MAP = Object.freeze({
|
|
|
39
43
|
el: 'est_liquidation_price',
|
|
40
44
|
l: 'leverage',
|
|
41
45
|
cf: 'cumulative_fee',
|
|
42
|
-
cr: 'cumulative_realized_funding_payment'
|
|
46
|
+
cr: 'cumulative_realized_funding_payment',
|
|
47
|
+
mt: 'margin_type',
|
|
48
|
+
ib: 'isolated_balance',
|
|
49
|
+
ii: 'isolated_im',
|
|
50
|
+
im: 'isolated_mm'
|
|
43
51
|
}
|
|
44
52
|
});
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { type SchemaPairMap } from './types';
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const API_QUERY_ACCOUNT_DAILY_PERFORMANCE_REQUEST_MAP: SchemaPairMap;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.API_QUERY_ACCOUNT_DAILY_PERFORMANCE_REQUEST_MAP = void 0;
|
|
4
|
+
// Schema map for the 'API_QUERY_ACCOUNT_DAILY_PERFORMANCE_REQUEST' struct.
|
|
5
|
+
exports.API_QUERY_ACCOUNT_DAILY_PERFORMANCE_REQUEST_MAP = Object.freeze({
|
|
6
|
+
FULL_TO_LITE: {
|
|
7
|
+
start_time: 'st',
|
|
8
|
+
end_time: 'et'
|
|
9
|
+
},
|
|
10
|
+
LITE_TO_FULL: {
|
|
11
|
+
st: 'start_time',
|
|
12
|
+
et: 'end_time'
|
|
13
|
+
}
|
|
14
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.API_QUERY_ACCOUNT_DAILY_PERFORMANCE_RESPONSE_MAP = void 0;
|
|
4
|
+
const api_account_performance_trend_1 = require("./api_account_performance_trend");
|
|
5
|
+
// Schema map for the 'API_QUERY_ACCOUNT_DAILY_PERFORMANCE_RESPONSE' struct.
|
|
6
|
+
exports.API_QUERY_ACCOUNT_DAILY_PERFORMANCE_RESPONSE_MAP = Object.freeze({
|
|
7
|
+
FULL_TO_LITE: {
|
|
8
|
+
result: ['r', [api_account_performance_trend_1.API_ACCOUNT_PERFORMANCE_TREND_MAP.FULL_TO_LITE]]
|
|
9
|
+
},
|
|
10
|
+
LITE_TO_FULL: {
|
|
11
|
+
r: ['result', [api_account_performance_trend_1.API_ACCOUNT_PERFORMANCE_TREND_MAP.LITE_TO_FULL]]
|
|
12
|
+
}
|
|
13
|
+
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.API_QUERY_ACCOUNT_PERFORMANCE_RESPONSE_MAP = void 0;
|
|
4
|
+
// Schema map for the 'API_QUERY_ACCOUNT_PERFORMANCE_RESPONSE' struct.
|
|
5
|
+
exports.API_QUERY_ACCOUNT_PERFORMANCE_RESPONSE_MAP = Object.freeze({
|
|
6
|
+
FULL_TO_LITE: {
|
|
7
|
+
aggregated_pnl: 'ap',
|
|
8
|
+
investment_pnl: 'ip'
|
|
9
|
+
},
|
|
10
|
+
LITE_TO_FULL: {
|
|
11
|
+
ap: 'aggregated_pnl',
|
|
12
|
+
ip: 'investment_pnl'
|
|
13
|
+
}
|
|
14
|
+
});
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.API_QUERY_SUB_ACCOUNT_DAILY_PERFORMANCE_REQUEST_MAP = void 0;
|
|
4
|
+
// Schema map for the 'API_QUERY_SUB_ACCOUNT_DAILY_PERFORMANCE_REQUEST' struct.
|
|
5
|
+
exports.API_QUERY_SUB_ACCOUNT_DAILY_PERFORMANCE_REQUEST_MAP = Object.freeze({
|
|
6
|
+
FULL_TO_LITE: {
|
|
7
|
+
sub_account_id: 'sa',
|
|
8
|
+
start_time: 'st',
|
|
9
|
+
end_time: 'et'
|
|
10
|
+
},
|
|
11
|
+
LITE_TO_FULL: {
|
|
12
|
+
sa: 'sub_account_id',
|
|
13
|
+
st: 'start_time',
|
|
14
|
+
et: 'end_time'
|
|
15
|
+
}
|
|
16
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.API_QUERY_SUB_ACCOUNT_DAILY_PERFORMANCE_RESPONSE_MAP = void 0;
|
|
4
|
+
const api_sub_account_daily_performance_1 = require("./api_sub_account_daily_performance");
|
|
5
|
+
// Schema map for the 'API_QUERY_SUB_ACCOUNT_DAILY_PERFORMANCE_RESPONSE' struct.
|
|
6
|
+
exports.API_QUERY_SUB_ACCOUNT_DAILY_PERFORMANCE_RESPONSE_MAP = Object.freeze({
|
|
7
|
+
FULL_TO_LITE: {
|
|
8
|
+
result: ['r', [api_sub_account_daily_performance_1.API_SUB_ACCOUNT_DAILY_PERFORMANCE_MAP.FULL_TO_LITE]]
|
|
9
|
+
},
|
|
10
|
+
LITE_TO_FULL: {
|
|
11
|
+
r: ['result', [api_sub_account_daily_performance_1.API_SUB_ACCOUNT_DAILY_PERFORMANCE_MAP.LITE_TO_FULL]]
|
|
12
|
+
}
|
|
13
|
+
});
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.API_SET_BUILDER_CODE_CONFIG_MAP = void 0;
|
|
4
|
+
// Schema map for the 'API_SET_BUILDER_CODE_CONFIG' struct.
|
|
5
|
+
exports.API_SET_BUILDER_CODE_CONFIG_MAP = Object.freeze({
|
|
6
|
+
FULL_TO_LITE: {
|
|
7
|
+
enabled: 'e',
|
|
8
|
+
max_futures_fee_rate: 'mf',
|
|
9
|
+
max_spot_fee_rate: 'ms'
|
|
10
|
+
},
|
|
11
|
+
LITE_TO_FULL: {
|
|
12
|
+
e: 'enabled',
|
|
13
|
+
mf: 'max_futures_fee_rate',
|
|
14
|
+
ms: 'max_spot_fee_rate'
|
|
15
|
+
}
|
|
16
|
+
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.API_SUB_ACCOUNT_DAILY_PERFORMANCE_MAP = void 0;
|
|
4
|
+
// Schema map for the 'API_SUB_ACCOUNT_DAILY_PERFORMANCE' struct.
|
|
5
|
+
exports.API_SUB_ACCOUNT_DAILY_PERFORMANCE_MAP = Object.freeze({
|
|
6
|
+
FULL_TO_LITE: {
|
|
7
|
+
start_interval: 'si',
|
|
8
|
+
pnl: 'p'
|
|
9
|
+
},
|
|
10
|
+
LITE_TO_FULL: {
|
|
11
|
+
si: 'start_interval',
|
|
12
|
+
p: 'pnl'
|
|
13
|
+
}
|
|
14
|
+
});
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BUILDER_FILL_HISTORY_MAP = void 0;
|
|
4
|
+
// Schema map for the 'BUILDER_FILL_HISTORY' struct.
|
|
5
|
+
exports.BUILDER_FILL_HISTORY_MAP = Object.freeze({
|
|
6
|
+
FULL_TO_LITE: {
|
|
7
|
+
event_time: 'et',
|
|
8
|
+
off_chain_account_id: 'oc',
|
|
9
|
+
instrument: 'i',
|
|
10
|
+
is_buyer: 'ib',
|
|
11
|
+
is_taker: 'it',
|
|
12
|
+
size: 's',
|
|
13
|
+
price: 'p',
|
|
14
|
+
mark_price: 'mp',
|
|
15
|
+
index_price: 'ip',
|
|
16
|
+
fee_rate: 'fr',
|
|
17
|
+
fee: 'f'
|
|
18
|
+
},
|
|
19
|
+
LITE_TO_FULL: {
|
|
20
|
+
et: 'event_time',
|
|
21
|
+
oc: 'off_chain_account_id',
|
|
22
|
+
i: 'instrument',
|
|
23
|
+
ib: 'is_buyer',
|
|
24
|
+
it: 'is_taker',
|
|
25
|
+
s: 'size',
|
|
26
|
+
p: 'price',
|
|
27
|
+
mp: 'mark_price',
|
|
28
|
+
ip: 'index_price',
|
|
29
|
+
fr: 'fee_rate',
|
|
30
|
+
f: 'fee'
|
|
31
|
+
}
|
|
32
|
+
});
|
|
@@ -27,7 +27,10 @@ exports.FILL_MAP = Object.freeze({
|
|
|
27
27
|
signer: 's1',
|
|
28
28
|
broker: 'b',
|
|
29
29
|
is_rpi: 'ir1',
|
|
30
|
-
source: 's2'
|
|
30
|
+
source: 's2',
|
|
31
|
+
builder: 'b1',
|
|
32
|
+
builder_fee_rate: 'bf',
|
|
33
|
+
builder_fee: 'bf1'
|
|
31
34
|
},
|
|
32
35
|
LITE_TO_FULL: {
|
|
33
36
|
et: 'event_time',
|
|
@@ -53,6 +56,9 @@ exports.FILL_MAP = Object.freeze({
|
|
|
53
56
|
s1: 'signer',
|
|
54
57
|
b: 'broker',
|
|
55
58
|
ir1: 'is_rpi',
|
|
56
|
-
s2: 'source'
|
|
59
|
+
s2: 'source',
|
|
60
|
+
b1: 'builder',
|
|
61
|
+
bf: 'builder_fee_rate',
|
|
62
|
+
bf1: 'builder_fee'
|
|
57
63
|
}
|
|
58
64
|
});
|
|
@@ -19,7 +19,9 @@ exports.ORDER_MAP = Object.freeze({
|
|
|
19
19
|
metadata: ['m', order_metadata_1.ORDER_METADATA_MAP.FULL_TO_LITE],
|
|
20
20
|
state: ['s1', order_state_1.ORDER_STATE_MAP.FULL_TO_LITE],
|
|
21
21
|
is_liquidation: 'il',
|
|
22
|
-
is_derisk: 'id'
|
|
22
|
+
is_derisk: 'id',
|
|
23
|
+
builder: 'b',
|
|
24
|
+
builder_fee: 'bf'
|
|
23
25
|
},
|
|
24
26
|
LITE_TO_FULL: {
|
|
25
27
|
oi: 'order_id',
|
|
@@ -33,6 +35,8 @@ exports.ORDER_MAP = Object.freeze({
|
|
|
33
35
|
m: ['metadata', order_metadata_1.ORDER_METADATA_MAP.LITE_TO_FULL],
|
|
34
36
|
s1: ['state', order_state_1.ORDER_STATE_MAP.LITE_TO_FULL],
|
|
35
37
|
il: 'is_liquidation',
|
|
36
|
-
id: 'is_derisk'
|
|
38
|
+
id: 'is_derisk',
|
|
39
|
+
b: 'builder',
|
|
40
|
+
bf: 'builder_fee'
|
|
37
41
|
}
|
|
38
42
|
});
|
|
@@ -6,11 +6,15 @@ exports.QUERY_LIST_SUB_ACCOUNT_HISTORY_REQUEST_MAP = Object.freeze({
|
|
|
6
6
|
FULL_TO_LITE: {
|
|
7
7
|
sub_account_id: 'sa',
|
|
8
8
|
start_time: 'st',
|
|
9
|
-
end_time: 'et'
|
|
9
|
+
end_time: 'et',
|
|
10
|
+
limit: 'l',
|
|
11
|
+
sort_by_time_desc: 'sb'
|
|
10
12
|
},
|
|
11
13
|
LITE_TO_FULL: {
|
|
12
14
|
sa: 'sub_account_id',
|
|
13
15
|
st: 'start_time',
|
|
14
|
-
et: 'end_time'
|
|
16
|
+
et: 'end_time',
|
|
17
|
+
l: 'limit',
|
|
18
|
+
sb: 'sort_by_time_desc'
|
|
15
19
|
}
|
|
16
20
|
});
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.QUERY_LIST_SUB_ACCOUNT_HISTORY_RESPONSE_MAP = void 0;
|
|
4
|
-
const
|
|
4
|
+
const snap_sub_account_history_1 = require("./snap_sub_account_history");
|
|
5
5
|
// Schema map for the 'QUERY_LIST_SUB_ACCOUNT_HISTORY_RESPONSE' struct.
|
|
6
6
|
exports.QUERY_LIST_SUB_ACCOUNT_HISTORY_RESPONSE_MAP = Object.freeze({
|
|
7
7
|
FULL_TO_LITE: {
|
|
8
|
-
result: ['r', [
|
|
8
|
+
result: ['r', [snap_sub_account_history_1.SNAP_SUB_ACCOUNT_HISTORY_MAP.FULL_TO_LITE]]
|
|
9
9
|
},
|
|
10
10
|
LITE_TO_FULL: {
|
|
11
|
-
r: ['result', [
|
|
11
|
+
r: ['result', [snap_sub_account_history_1.SNAP_SUB_ACCOUNT_HISTORY_MAP.LITE_TO_FULL]]
|
|
12
12
|
}
|
|
13
13
|
});
|
|
@@ -16,7 +16,8 @@ exports.REWARD_ACCOUNT_MULTIPLIER_MAP = Object.freeze({
|
|
|
16
16
|
created_by_id: 'cb',
|
|
17
17
|
create_time: 'ct',
|
|
18
18
|
update_time: 'ut',
|
|
19
|
-
metadata: ['m2', reward_account_multiplier_metadata_1.REWARD_ACCOUNT_MULTIPLIER_METADATA_MAP.FULL_TO_LITE]
|
|
19
|
+
metadata: ['m2', reward_account_multiplier_metadata_1.REWARD_ACCOUNT_MULTIPLIER_METADATA_MAP.FULL_TO_LITE],
|
|
20
|
+
reserve_multiplier: 'rm'
|
|
20
21
|
},
|
|
21
22
|
LITE_TO_FULL: {
|
|
22
23
|
i: 'id',
|
|
@@ -30,6 +31,7 @@ exports.REWARD_ACCOUNT_MULTIPLIER_MAP = Object.freeze({
|
|
|
30
31
|
cb: 'created_by_id',
|
|
31
32
|
ct: 'create_time',
|
|
32
33
|
ut: 'update_time',
|
|
33
|
-
m2: ['metadata', reward_account_multiplier_metadata_1.REWARD_ACCOUNT_MULTIPLIER_METADATA_MAP.LITE_TO_FULL]
|
|
34
|
+
m2: ['metadata', reward_account_multiplier_metadata_1.REWARD_ACCOUNT_MULTIPLIER_METADATA_MAP.LITE_TO_FULL],
|
|
35
|
+
rm: 'reserve_multiplier'
|
|
34
36
|
}
|
|
35
37
|
});
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SNAP_SUB_ACCOUNT_HISTORY_MAP = void 0;
|
|
4
|
+
// Schema map for the 'SNAP_SUB_ACCOUNT_HISTORY' struct.
|
|
5
|
+
exports.SNAP_SUB_ACCOUNT_HISTORY_MAP = Object.freeze({
|
|
6
|
+
FULL_TO_LITE: {
|
|
7
|
+
start_interval: 'si',
|
|
8
|
+
sub_account_id: 'sa',
|
|
9
|
+
total_equity: 'te',
|
|
10
|
+
unrealized_pnl: 'up',
|
|
11
|
+
is_vault: 'iv'
|
|
12
|
+
},
|
|
13
|
+
LITE_TO_FULL: {
|
|
14
|
+
si: 'start_interval',
|
|
15
|
+
sa: 'sub_account_id',
|
|
16
|
+
te: 'total_equity',
|
|
17
|
+
up: 'unrealized_pnl',
|
|
18
|
+
iv: 'is_vault'
|
|
19
|
+
}
|
|
20
|
+
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@grvt/client",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.13",
|
|
4
4
|
"description": "Node.js & JavaScript client for GRVT REST APIs & WebSockets",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"test": "nodemon dist/index.js"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"axios": "^1.
|
|
36
|
+
"axios": "^1.13.2"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@typescript-eslint/eslint-plugin": "^6.10.0",
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.API_QUERY_ACCOUNT_TODAY_PERFORMANCE_REQUEST_MAP = void 0;
|
|
4
|
-
// Schema map for the 'API_QUERY_ACCOUNT_TODAY_PERFORMANCE_REQUEST' struct.
|
|
5
|
-
exports.API_QUERY_ACCOUNT_TODAY_PERFORMANCE_REQUEST_MAP = Object.freeze({
|
|
6
|
-
FULL_TO_LITE: {},
|
|
7
|
-
LITE_TO_FULL: {}
|
|
8
|
-
});
|