@grvt/client 1.4.13 → 1.4.15
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 +2 -1
- package/TDG/index.js +6 -1
- package/interfaces/codegen/data.interface.d.ts +29 -1
- package/interfaces/codegen/data.interface.js +8 -0
- package/interfaces/codegen/enum-int.js +5 -1
- package/interfaces/codegen/schema-maps/api_query_snap_vault_position_request.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_query_snap_vault_position_request.js +12 -0
- package/interfaces/codegen/schema-maps/api_query_snap_vault_position_response.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_query_snap_vault_position_response.js +15 -0
- package/interfaces/codegen/schema-maps/api_set_derisk_to_maintenance_margin_ratio_request.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_set_derisk_to_maintenance_margin_ratio_request.js +17 -0
- package/interfaces/codegen/schema-maps/api_set_derisk_to_maintenance_margin_ratio_response.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_set_derisk_to_maintenance_margin_ratio_response.js +12 -0
- package/interfaces/codegen/schema-maps/index.d.ts +6 -0
- package/interfaces/codegen/schema-maps/index.js +6 -0
- package/interfaces/codegen/schema-maps/order.js +4 -2
- package/interfaces/codegen/schema-maps/query_latest_sub_account_summary_request.d.ts +2 -0
- package/interfaces/codegen/schema-maps/query_latest_sub_account_summary_request.js +12 -0
- package/interfaces/codegen/schema-maps/query_latest_sub_account_summary_response.d.ts +2 -0
- package/interfaces/codegen/schema-maps/query_latest_sub_account_summary_response.js +13 -0
- package/interfaces/codegen/schema-maps/snap_sub_account.js +6 -2
- package/package.json +1 -1
package/TDG/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type AxiosRequestConfig } from 'axios';
|
|
2
|
-
import { type IAckResponse, type IApiAggregatedAccountSummaryResponse, type IApiCancelAllOrdersRequest, type IApiCancelAllOrdersResponse, type IApiCancelOrderRequest, type IApiCancelOrderResponse, type IApiCreateBulkOrdersRequest, type IApiCreateBulkOrdersResponse, type IApiCreateOrderRequest, type IApiCreateOrderResponse, type IApiDedustPositionRequest, type IApiDedustPositionResponse, type IApiDepositHistoryRequest, type IApiDepositHistoryResponse, type IApiFillHistoryRequest, type IApiFillHistoryResponse, type IApiFundingAccountSummaryResponse, type IApiFundingPaymentHistoryRequest, type IApiFundingPaymentHistoryResponse, type IApiGetAllInitialLeverageRequest, type IApiGetAllInitialLeverageResponse, type IApiGetMarginTiersResponse, type IApiGetOrderGroupRequest, type IApiGetOrderGroupResponse, type IApiGetOrderRequest, type IApiGetOrderResponse, type IApiOpenOrdersRequest, type IApiOpenOrdersResponse, type IApiOrderHistoryRequest, type IApiOrderHistoryResponse, type IApiPositionsRequest, type IApiPositionsResponse, type IApiPreDepositCheckRequest, type IApiPreDepositCheckResponse, type IApiPreOrderCheckRequest, type IApiPreOrderCheckResponse, type IApiQueryListFundingAccountSummaryRequest, type IApiQueryListFundingAccountSummaryResponse, type IApiQueryListSubAccountSummaryRequest, type IApiQueryListSubAccountSummaryResponse, type IApiQueryTradingPerformanceRequest, type IApiQueryTradingPerformanceResponse, type IApiQueryTradingPerformanceTrendRequest, type IApiQueryTradingPerformanceTrendResponse, type IApiQueryVaultPerformanceRequest, type IApiQueryVaultPerformanceResponse, type IApiQueryVaultPerformanceTrendRequest, type IApiQueryVaultPerformanceTrendResponse, type IApiQueryVaultRiskMetricRequest, type IApiQueryVaultRiskMetricResponse, type IApiQueryVaultSummaryHistoryRequest, type IApiQueryVaultSummaryHistoryResponse, type IApiReplaceOrdersRequest, type IApiReplaceOrdersResponse, type IApiSetInitialLeverageRequest, type IApiSetInitialLeverageResponse, type IApiSocializedLossStatusResponse, type IApiSubAccountHistoryRequest, type IApiSubAccountHistoryResponse, type IApiSubAccountSummaryRequest, type IApiSubAccountSummaryResponse, type IApiTimedAssetExposureRequest, type IApiTimedAssetExposureResponse, type IApiTimedVaultAssetExposureRequest, type IApiTransferHistoryRequest, type IApiTransferHistoryResponse, type IApiTransferRequest, type IApiTransferResponse, type IApiVaultBurnTokensRequest, type IApiVaultInvestorSummaryRequest, type IApiVaultInvestorSummaryResponse, type IApiVaultInvestRequest, type IApiVaultRedeemCancelRequest, type IApiVaultRedeemRequest, type IApiVaultViewRedemptionQueueRequest, type IApiVaultViewRedemptionQueueResponse, type IApiWithdrawalHistoryRequest, type IApiWithdrawalHistoryResponse, type IApiWithdrawalRequest, type IConfig } from '../interfaces';
|
|
2
|
+
import { type IAckResponse, type IApiAggregatedAccountSummaryResponse, type IApiCancelAllOrdersRequest, type IApiCancelAllOrdersResponse, type IApiCancelOrderRequest, type IApiCancelOrderResponse, type IApiCreateBulkOrdersRequest, type IApiCreateBulkOrdersResponse, type IApiCreateOrderRequest, type IApiCreateOrderResponse, type IApiDedustPositionRequest, type IApiDedustPositionResponse, type IApiDepositHistoryRequest, type IApiDepositHistoryResponse, type IApiFillHistoryRequest, type IApiFillHistoryResponse, type IApiFundingAccountSummaryResponse, type IApiFundingPaymentHistoryRequest, type IApiFundingPaymentHistoryResponse, type IApiGetAllInitialLeverageRequest, type IApiGetAllInitialLeverageResponse, type IApiGetMarginTiersResponse, type IApiGetOrderGroupRequest, type IApiGetOrderGroupResponse, type IApiGetOrderRequest, type IApiGetOrderResponse, type IApiOpenOrdersRequest, type IApiOpenOrdersResponse, type IApiOrderHistoryRequest, type IApiOrderHistoryResponse, type IApiPositionsRequest, type IApiPositionsResponse, type IApiPreDepositCheckRequest, type IApiPreDepositCheckResponse, type IApiPreOrderCheckRequest, type IApiPreOrderCheckResponse, type IApiQueryListFundingAccountSummaryRequest, type IApiQueryListFundingAccountSummaryResponse, type IApiQueryListSubAccountSummaryRequest, type IApiQueryListSubAccountSummaryResponse, type IApiQuerySnapVaultPositionRequest, type IApiQuerySnapVaultPositionResponse, type IApiQueryTradingPerformanceRequest, type IApiQueryTradingPerformanceResponse, type IApiQueryTradingPerformanceTrendRequest, type IApiQueryTradingPerformanceTrendResponse, type IApiQueryVaultPerformanceRequest, type IApiQueryVaultPerformanceResponse, type IApiQueryVaultPerformanceTrendRequest, type IApiQueryVaultPerformanceTrendResponse, type IApiQueryVaultRiskMetricRequest, type IApiQueryVaultRiskMetricResponse, type IApiQueryVaultSummaryHistoryRequest, type IApiQueryVaultSummaryHistoryResponse, type IApiReplaceOrdersRequest, type IApiReplaceOrdersResponse, type IApiSetInitialLeverageRequest, type IApiSetInitialLeverageResponse, type IApiSocializedLossStatusResponse, type IApiSubAccountHistoryRequest, type IApiSubAccountHistoryResponse, type IApiSubAccountSummaryRequest, type IApiSubAccountSummaryResponse, type IApiTimedAssetExposureRequest, type IApiTimedAssetExposureResponse, type IApiTimedVaultAssetExposureRequest, type IApiTransferHistoryRequest, type IApiTransferHistoryResponse, type IApiTransferRequest, type IApiTransferResponse, type IApiVaultBurnTokensRequest, type IApiVaultInvestorSummaryRequest, type IApiVaultInvestorSummaryResponse, type IApiVaultInvestRequest, type IApiVaultRedeemCancelRequest, type IApiVaultRedeemRequest, type IApiVaultViewRedemptionQueueRequest, type IApiVaultViewRedemptionQueueResponse, type IApiWithdrawalHistoryRequest, type IApiWithdrawalHistoryResponse, type IApiWithdrawalRequest, type IConfig } from '../interfaces';
|
|
3
3
|
export declare class TDG {
|
|
4
4
|
private readonly _axios;
|
|
5
5
|
private readonly _fullUrl;
|
|
@@ -124,4 +124,5 @@ export declare class TDG {
|
|
|
124
124
|
vaultRiskMetric(payload: IApiQueryVaultRiskMetricRequest, config?: AxiosRequestConfig): Promise<IApiQueryVaultRiskMetricResponse>;
|
|
125
125
|
vaultSummaryHistory(payload: IApiQueryVaultSummaryHistoryRequest, config?: AxiosRequestConfig): Promise<IApiQueryVaultSummaryHistoryResponse>;
|
|
126
126
|
vaultAssetExposure(payload: IApiTimedVaultAssetExposureRequest, config?: AxiosRequestConfig): Promise<IApiTimedAssetExposureResponse>;
|
|
127
|
+
snapVaultPosition(payload: IApiQuerySnapVaultPositionRequest, config?: AxiosRequestConfig): Promise<IApiQuerySnapVaultPositionResponse>;
|
|
127
128
|
}
|
package/TDG/index.js
CHANGED
|
@@ -302,9 +302,14 @@ class TDG {
|
|
|
302
302
|
}).catch(utils_1.Utils.coverApiError);
|
|
303
303
|
}
|
|
304
304
|
vaultAssetExposure(payload, config) {
|
|
305
|
-
return this._axios.post(this._liteUrl + '/vault_asset_exposure', utils_1.Utils.schemaMap(payload, interfaces_1.
|
|
305
|
+
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) => {
|
|
306
306
|
return utils_1.Utils.schemaMap(response.data, interfaces_1.API_TIMED_ASSET_EXPOSURE_RESPONSE_MAP.LITE_TO_FULL);
|
|
307
307
|
}).catch(utils_1.Utils.coverApiError);
|
|
308
308
|
}
|
|
309
|
+
snapVaultPosition(payload, config) {
|
|
310
|
+
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) => {
|
|
311
|
+
return utils_1.Utils.schemaMap(response.data, interfaces_1.API_QUERY_SNAP_VAULT_POSITION_RESPONSE_MAP.LITE_TO_FULL);
|
|
312
|
+
}).catch(utils_1.Utils.coverApiError);
|
|
313
|
+
}
|
|
309
314
|
}
|
|
310
315
|
exports.TDG = TDG;
|
|
@@ -144,7 +144,11 @@ export declare enum EOrderRejectReason {
|
|
|
144
144
|
CLIENT_CANCEL_ON_DISCONNECT_TRIGGERED = "CLIENT_CANCEL_ON_DISCONNECT_TRIGGERED",
|
|
145
145
|
OCO_COUNTER_PART_TRIGGERED = "OCO_COUNTER_PART_TRIGGERED",
|
|
146
146
|
REDUCE_ONLY_LIMIT = "REDUCE_ONLY_LIMIT",
|
|
147
|
-
CLIENT_REPLACE = "CLIENT_REPLACE"
|
|
147
|
+
CLIENT_REPLACE = "CLIENT_REPLACE",
|
|
148
|
+
DERISK_MUST_BE_IOC = "DERISK_MUST_BE_IOC",
|
|
149
|
+
DERISK_MUST_BE_REDUCE_ONLY = "DERISK_MUST_BE_REDUCE_ONLY",
|
|
150
|
+
DERISK_NOT_SUPPORTED = "DERISK_NOT_SUPPORTED",
|
|
151
|
+
INVALID_ORDER_TYPE = "INVALID_ORDER_TYPE"
|
|
148
152
|
}
|
|
149
153
|
export declare enum EOrderStatus {
|
|
150
154
|
PENDING = "PENDING",
|
|
@@ -618,6 +622,13 @@ export interface IApiQueryListSubAccountSummaryResponse {
|
|
|
618
622
|
result?: ISnapSubAccountSummary[];
|
|
619
623
|
next?: string;
|
|
620
624
|
}
|
|
625
|
+
export interface IApiQuerySnapVaultPositionRequest {
|
|
626
|
+
vault_id?: string;
|
|
627
|
+
}
|
|
628
|
+
export interface IApiQuerySnapVaultPositionResponse {
|
|
629
|
+
event_time?: string;
|
|
630
|
+
positions?: IPositionSummary[];
|
|
631
|
+
}
|
|
621
632
|
export interface IApiQueryTradingPerformanceRequest {
|
|
622
633
|
sub_account_id?: string;
|
|
623
634
|
asset?: string;
|
|
@@ -678,6 +689,14 @@ export interface IApiResolveEpochEcosystemMetricResponse {
|
|
|
678
689
|
point?: number;
|
|
679
690
|
last_calculated_time?: string;
|
|
680
691
|
}
|
|
692
|
+
export interface IApiSetDeriskToMaintenanceMarginRatioRequest {
|
|
693
|
+
sub_account_id?: string;
|
|
694
|
+
ratio?: string;
|
|
695
|
+
signature?: ISignature;
|
|
696
|
+
}
|
|
697
|
+
export interface IApiSetDeriskToMaintenanceMarginRatioResponse {
|
|
698
|
+
success?: boolean;
|
|
699
|
+
}
|
|
681
700
|
export interface IApiSetInitialLeverageRequest {
|
|
682
701
|
sub_account_id?: string;
|
|
683
702
|
instrument?: string;
|
|
@@ -1180,6 +1199,7 @@ export interface IOrder {
|
|
|
1180
1199
|
metadata?: IOrderMetadata;
|
|
1181
1200
|
state?: IOrderState;
|
|
1182
1201
|
is_liquidation?: boolean;
|
|
1202
|
+
is_derisk?: boolean;
|
|
1183
1203
|
}
|
|
1184
1204
|
export interface IOrderLeg {
|
|
1185
1205
|
instrument?: string;
|
|
@@ -1292,6 +1312,12 @@ export interface IQueryGetListEpochRequest {
|
|
|
1292
1312
|
export interface IQueryGetListEpochResponse {
|
|
1293
1313
|
result?: IEpoch[];
|
|
1294
1314
|
}
|
|
1315
|
+
export interface IQueryLatestSubAccountSummaryRequest {
|
|
1316
|
+
sub_account_id?: string;
|
|
1317
|
+
}
|
|
1318
|
+
export interface IQueryLatestSubAccountSummaryResponse {
|
|
1319
|
+
result?: ISnapSubAccountSummary;
|
|
1320
|
+
}
|
|
1295
1321
|
export interface IQueryTradingPerformanceTrendRequest {
|
|
1296
1322
|
sub_account_i_ds?: string[];
|
|
1297
1323
|
time_interval?: ETimeInterval;
|
|
@@ -1383,6 +1409,8 @@ export interface ISubAccount {
|
|
|
1383
1409
|
settle_index_price?: string;
|
|
1384
1410
|
is_vault?: boolean;
|
|
1385
1411
|
vault_im_additions?: string;
|
|
1412
|
+
derisk_margin?: string;
|
|
1413
|
+
derisk_to_maintenance_margin_ratio?: string;
|
|
1386
1414
|
}
|
|
1387
1415
|
export interface ISubAccountTradeAggregation {
|
|
1388
1416
|
sub_account_id?: string;
|
|
@@ -287,6 +287,14 @@ var EOrderRejectReason;
|
|
|
287
287
|
EOrderRejectReason["REDUCE_ONLY_LIMIT"] = "REDUCE_ONLY_LIMIT";
|
|
288
288
|
// the order was replaced by a client replace request
|
|
289
289
|
EOrderRejectReason["CLIENT_REPLACE"] = "CLIENT_REPLACE";
|
|
290
|
+
// the derisk order must be an IOC order
|
|
291
|
+
EOrderRejectReason["DERISK_MUST_BE_IOC"] = "DERISK_MUST_BE_IOC";
|
|
292
|
+
// the derisk order must be a reduce-only order
|
|
293
|
+
EOrderRejectReason["DERISK_MUST_BE_REDUCE_ONLY"] = "DERISK_MUST_BE_REDUCE_ONLY";
|
|
294
|
+
// derisk is not supported
|
|
295
|
+
EOrderRejectReason["DERISK_NOT_SUPPORTED"] = "DERISK_NOT_SUPPORTED";
|
|
296
|
+
// the order type is invalid
|
|
297
|
+
EOrderRejectReason["INVALID_ORDER_TYPE"] = "INVALID_ORDER_TYPE";
|
|
290
298
|
})(EOrderRejectReason || (exports.EOrderRejectReason = EOrderRejectReason = {}));
|
|
291
299
|
var EOrderStatus;
|
|
292
300
|
(function (EOrderStatus) {
|
|
@@ -148,7 +148,11 @@ exports.EOrderRejectReasonInt = Object.freeze({
|
|
|
148
148
|
[data_interface_1.EOrderRejectReason.CLIENT_CANCEL_ON_DISCONNECT_TRIGGERED]: 29,
|
|
149
149
|
[data_interface_1.EOrderRejectReason.OCO_COUNTER_PART_TRIGGERED]: 30,
|
|
150
150
|
[data_interface_1.EOrderRejectReason.REDUCE_ONLY_LIMIT]: 31,
|
|
151
|
-
[data_interface_1.EOrderRejectReason.CLIENT_REPLACE]: 32
|
|
151
|
+
[data_interface_1.EOrderRejectReason.CLIENT_REPLACE]: 32,
|
|
152
|
+
[data_interface_1.EOrderRejectReason.DERISK_MUST_BE_IOC]: 33,
|
|
153
|
+
[data_interface_1.EOrderRejectReason.DERISK_MUST_BE_REDUCE_ONLY]: 34,
|
|
154
|
+
[data_interface_1.EOrderRejectReason.DERISK_NOT_SUPPORTED]: 35,
|
|
155
|
+
[data_interface_1.EOrderRejectReason.INVALID_ORDER_TYPE]: 36
|
|
152
156
|
});
|
|
153
157
|
exports.EOrderStatusInt = Object.freeze({
|
|
154
158
|
[data_interface_1.EOrderStatus.PENDING]: 1,
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.API_QUERY_SNAP_VAULT_POSITION_REQUEST_MAP = void 0;
|
|
4
|
+
// Schema map for the 'API_QUERY_SNAP_VAULT_POSITION_REQUEST' struct.
|
|
5
|
+
exports.API_QUERY_SNAP_VAULT_POSITION_REQUEST_MAP = Object.freeze({
|
|
6
|
+
FULL_TO_LITE: {
|
|
7
|
+
vault_id: 'vi'
|
|
8
|
+
},
|
|
9
|
+
LITE_TO_FULL: {
|
|
10
|
+
vi: 'vault_id'
|
|
11
|
+
}
|
|
12
|
+
});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.API_QUERY_SNAP_VAULT_POSITION_RESPONSE_MAP = void 0;
|
|
4
|
+
const position_summary_1 = require("./position_summary");
|
|
5
|
+
// Schema map for the 'API_QUERY_SNAP_VAULT_POSITION_RESPONSE' struct.
|
|
6
|
+
exports.API_QUERY_SNAP_VAULT_POSITION_RESPONSE_MAP = Object.freeze({
|
|
7
|
+
FULL_TO_LITE: {
|
|
8
|
+
event_time: 'et',
|
|
9
|
+
positions: ['p', [position_summary_1.POSITION_SUMMARY_MAP.FULL_TO_LITE]]
|
|
10
|
+
},
|
|
11
|
+
LITE_TO_FULL: {
|
|
12
|
+
et: 'event_time',
|
|
13
|
+
p: ['positions', [position_summary_1.POSITION_SUMMARY_MAP.LITE_TO_FULL]]
|
|
14
|
+
}
|
|
15
|
+
});
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.API_SET_DERISK_TO_MAINTENANCE_MARGIN_RATIO_REQUEST_MAP = void 0;
|
|
4
|
+
const signature_1 = require("./signature");
|
|
5
|
+
// Schema map for the 'API_SET_DERISK_TO_MAINTENANCE_MARGIN_RATIO_REQUEST' struct.
|
|
6
|
+
exports.API_SET_DERISK_TO_MAINTENANCE_MARGIN_RATIO_REQUEST_MAP = Object.freeze({
|
|
7
|
+
FULL_TO_LITE: {
|
|
8
|
+
sub_account_id: 'sa',
|
|
9
|
+
ratio: 'r',
|
|
10
|
+
signature: ['s', signature_1.SIGNATURE_MAP.FULL_TO_LITE]
|
|
11
|
+
},
|
|
12
|
+
LITE_TO_FULL: {
|
|
13
|
+
sa: 'sub_account_id',
|
|
14
|
+
r: 'ratio',
|
|
15
|
+
s: ['signature', signature_1.SIGNATURE_MAP.LITE_TO_FULL]
|
|
16
|
+
}
|
|
17
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.API_SET_DERISK_TO_MAINTENANCE_MARGIN_RATIO_RESPONSE_MAP = void 0;
|
|
4
|
+
// Schema map for the 'API_SET_DERISK_TO_MAINTENANCE_MARGIN_RATIO_RESPONSE' struct.
|
|
5
|
+
exports.API_SET_DERISK_TO_MAINTENANCE_MARGIN_RATIO_RESPONSE_MAP = Object.freeze({
|
|
6
|
+
FULL_TO_LITE: {
|
|
7
|
+
success: 's'
|
|
8
|
+
},
|
|
9
|
+
LITE_TO_FULL: {
|
|
10
|
+
s: 'success'
|
|
11
|
+
}
|
|
12
|
+
});
|
|
@@ -94,6 +94,8 @@ export * from './api_query_list_funding_account_summary_request';
|
|
|
94
94
|
export * from './api_query_list_funding_account_summary_response';
|
|
95
95
|
export * from './api_query_list_sub_account_summary_request';
|
|
96
96
|
export * from './api_query_list_sub_account_summary_response';
|
|
97
|
+
export * from './api_query_snap_vault_position_request';
|
|
98
|
+
export * from './api_query_snap_vault_position_response';
|
|
97
99
|
export * from './api_query_trading_performance_request';
|
|
98
100
|
export * from './api_query_trading_performance_response';
|
|
99
101
|
export * from './api_query_trading_performance_trend_request';
|
|
@@ -109,6 +111,8 @@ export * from './api_query_vault_summary_history_response';
|
|
|
109
111
|
export * from './api_replace_orders_request';
|
|
110
112
|
export * from './api_replace_orders_response';
|
|
111
113
|
export * from './api_resolve_epoch_ecosystem_metric_response';
|
|
114
|
+
export * from './api_set_derisk_to_maintenance_margin_ratio_request';
|
|
115
|
+
export * from './api_set_derisk_to_maintenance_margin_ratio_response';
|
|
112
116
|
export * from './api_set_initial_leverage_request';
|
|
113
117
|
export * from './api_set_initial_leverage_response';
|
|
114
118
|
export * from './api_settlement_price_request';
|
|
@@ -206,6 +210,8 @@ export * from './query_find_epoch_response';
|
|
|
206
210
|
export * from './query_get_latest_lp_snapshot_response';
|
|
207
211
|
export * from './query_get_list_epoch_request';
|
|
208
212
|
export * from './query_get_list_epoch_response';
|
|
213
|
+
export * from './query_latest_sub_account_summary_request';
|
|
214
|
+
export * from './query_latest_sub_account_summary_response';
|
|
209
215
|
export * from './query_trading_performance_trend_request';
|
|
210
216
|
export * from './query_trading_performance_trend_response';
|
|
211
217
|
export * from './query_vault_summary_history_request';
|
|
@@ -110,6 +110,8 @@ __exportStar(require("./api_query_list_funding_account_summary_request"), export
|
|
|
110
110
|
__exportStar(require("./api_query_list_funding_account_summary_response"), exports);
|
|
111
111
|
__exportStar(require("./api_query_list_sub_account_summary_request"), exports);
|
|
112
112
|
__exportStar(require("./api_query_list_sub_account_summary_response"), exports);
|
|
113
|
+
__exportStar(require("./api_query_snap_vault_position_request"), exports);
|
|
114
|
+
__exportStar(require("./api_query_snap_vault_position_response"), exports);
|
|
113
115
|
__exportStar(require("./api_query_trading_performance_request"), exports);
|
|
114
116
|
__exportStar(require("./api_query_trading_performance_response"), exports);
|
|
115
117
|
__exportStar(require("./api_query_trading_performance_trend_request"), exports);
|
|
@@ -125,6 +127,8 @@ __exportStar(require("./api_query_vault_summary_history_response"), exports);
|
|
|
125
127
|
__exportStar(require("./api_replace_orders_request"), exports);
|
|
126
128
|
__exportStar(require("./api_replace_orders_response"), exports);
|
|
127
129
|
__exportStar(require("./api_resolve_epoch_ecosystem_metric_response"), exports);
|
|
130
|
+
__exportStar(require("./api_set_derisk_to_maintenance_margin_ratio_request"), exports);
|
|
131
|
+
__exportStar(require("./api_set_derisk_to_maintenance_margin_ratio_response"), exports);
|
|
128
132
|
__exportStar(require("./api_set_initial_leverage_request"), exports);
|
|
129
133
|
__exportStar(require("./api_set_initial_leverage_response"), exports);
|
|
130
134
|
__exportStar(require("./api_settlement_price_request"), exports);
|
|
@@ -222,6 +226,8 @@ __exportStar(require("./query_find_epoch_response"), exports);
|
|
|
222
226
|
__exportStar(require("./query_get_latest_lp_snapshot_response"), exports);
|
|
223
227
|
__exportStar(require("./query_get_list_epoch_request"), exports);
|
|
224
228
|
__exportStar(require("./query_get_list_epoch_response"), exports);
|
|
229
|
+
__exportStar(require("./query_latest_sub_account_summary_request"), exports);
|
|
230
|
+
__exportStar(require("./query_latest_sub_account_summary_response"), exports);
|
|
225
231
|
__exportStar(require("./query_trading_performance_trend_request"), exports);
|
|
226
232
|
__exportStar(require("./query_trading_performance_trend_response"), exports);
|
|
227
233
|
__exportStar(require("./query_vault_summary_history_request"), exports);
|
|
@@ -18,7 +18,8 @@ exports.ORDER_MAP = Object.freeze({
|
|
|
18
18
|
signature: ['s', signature_1.SIGNATURE_MAP.FULL_TO_LITE],
|
|
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
|
-
is_liquidation: 'il'
|
|
21
|
+
is_liquidation: 'il',
|
|
22
|
+
is_derisk: 'id'
|
|
22
23
|
},
|
|
23
24
|
LITE_TO_FULL: {
|
|
24
25
|
oi: 'order_id',
|
|
@@ -31,6 +32,7 @@ exports.ORDER_MAP = Object.freeze({
|
|
|
31
32
|
s: ['signature', signature_1.SIGNATURE_MAP.LITE_TO_FULL],
|
|
32
33
|
m: ['metadata', order_metadata_1.ORDER_METADATA_MAP.LITE_TO_FULL],
|
|
33
34
|
s1: ['state', order_state_1.ORDER_STATE_MAP.LITE_TO_FULL],
|
|
34
|
-
il: 'is_liquidation'
|
|
35
|
+
il: 'is_liquidation',
|
|
36
|
+
id: 'is_derisk'
|
|
35
37
|
}
|
|
36
38
|
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.QUERY_LATEST_SUB_ACCOUNT_SUMMARY_REQUEST_MAP = void 0;
|
|
4
|
+
// Schema map for the 'QUERY_LATEST_SUB_ACCOUNT_SUMMARY_REQUEST' struct.
|
|
5
|
+
exports.QUERY_LATEST_SUB_ACCOUNT_SUMMARY_REQUEST_MAP = Object.freeze({
|
|
6
|
+
FULL_TO_LITE: {
|
|
7
|
+
sub_account_id: 'sa'
|
|
8
|
+
},
|
|
9
|
+
LITE_TO_FULL: {
|
|
10
|
+
sa: 'sub_account_id'
|
|
11
|
+
}
|
|
12
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.QUERY_LATEST_SUB_ACCOUNT_SUMMARY_RESPONSE_MAP = void 0;
|
|
4
|
+
const snap_sub_account_summary_1 = require("./snap_sub_account_summary");
|
|
5
|
+
// Schema map for the 'QUERY_LATEST_SUB_ACCOUNT_SUMMARY_RESPONSE' struct.
|
|
6
|
+
exports.QUERY_LATEST_SUB_ACCOUNT_SUMMARY_RESPONSE_MAP = Object.freeze({
|
|
7
|
+
FULL_TO_LITE: {
|
|
8
|
+
result: ['r', snap_sub_account_summary_1.SNAP_SUB_ACCOUNT_SUMMARY_MAP.FULL_TO_LITE]
|
|
9
|
+
},
|
|
10
|
+
LITE_TO_FULL: {
|
|
11
|
+
r: ['result', snap_sub_account_summary_1.SNAP_SUB_ACCOUNT_SUMMARY_MAP.LITE_TO_FULL]
|
|
12
|
+
}
|
|
13
|
+
});
|
|
@@ -19,7 +19,9 @@ exports.SUB_ACCOUNT_MAP = Object.freeze({
|
|
|
19
19
|
positions: ['p', [api_position_1.POSITIONS_MAP.FULL_TO_LITE]],
|
|
20
20
|
settle_index_price: 'si',
|
|
21
21
|
is_vault: 'iv',
|
|
22
|
-
vault_im_additions: 'vi'
|
|
22
|
+
vault_im_additions: 'vi',
|
|
23
|
+
derisk_margin: 'dm',
|
|
24
|
+
derisk_to_maintenance_margin_ratio: 'dt'
|
|
23
25
|
},
|
|
24
26
|
LITE_TO_FULL: {
|
|
25
27
|
et: 'event_time',
|
|
@@ -35,6 +37,8 @@ exports.SUB_ACCOUNT_MAP = Object.freeze({
|
|
|
35
37
|
p: ['positions', [api_position_1.POSITIONS_MAP.LITE_TO_FULL]],
|
|
36
38
|
si: 'settle_index_price',
|
|
37
39
|
iv: 'is_vault',
|
|
38
|
-
vi: 'vault_im_additions'
|
|
40
|
+
vi: 'vault_im_additions',
|
|
41
|
+
dm: 'derisk_margin',
|
|
42
|
+
dt: 'derisk_to_maintenance_margin_ratio'
|
|
39
43
|
}
|
|
40
44
|
});
|