@grvt/client 1.6.16 → 1.6.17
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 +1 -2
- package/TDG/index.js +0 -7
- package/interfaces/codegen/data.interface.d.ts +1 -77
- package/interfaces/codegen/enums/cluster-config-type.d.ts +2 -1
- package/interfaces/codegen/enums/cluster-config-type.js +4 -1
- package/interfaces/codegen/schema-maps/initial_leverage_result.js +4 -2
- package/package.json +1 -1
- package/interfaces/codegen/enums/sub-account-trade-interval.d.ts +0 -7
- package/interfaces/codegen/enums/sub-account-trade-interval.js +0 -20
- package/interfaces/codegen/schema-maps/api_latest_snap_sub_accounts_request.d.ts +0 -2
- package/interfaces/codegen/schema-maps/api_latest_snap_sub_accounts_request.js +0 -12
- package/interfaces/codegen/schema-maps/api_latest_snap_sub_accounts_response.d.ts +0 -2
- package/interfaces/codegen/schema-maps/api_latest_snap_sub_accounts_response.js +0 -13
- package/interfaces/codegen/schema-maps/api_query_account_summary_request.d.ts +0 -2
- package/interfaces/codegen/schema-maps/api_query_account_summary_request.js +0 -12
- package/interfaces/codegen/schema-maps/api_query_account_summary_response.d.ts +0 -2
- package/interfaces/codegen/schema-maps/api_query_account_summary_response.js +0 -15
- package/interfaces/codegen/schema-maps/api_query_vault_investor_history_stats_request.d.ts +0 -2
- package/interfaces/codegen/schema-maps/api_query_vault_investor_history_stats_request.js +0 -8
- package/interfaces/codegen/schema-maps/api_query_vault_investor_history_stats_response.d.ts +0 -2
- package/interfaces/codegen/schema-maps/api_query_vault_investor_history_stats_response.js +0 -12
- package/interfaces/codegen/schema-maps/api_sub_account_trade_aggregation_request.d.ts +0 -2
- package/interfaces/codegen/schema-maps/api_sub_account_trade_aggregation_request.js +0 -34
- package/interfaces/codegen/schema-maps/api_sub_account_trade_aggregation_response.d.ts +0 -2
- package/interfaces/codegen/schema-maps/api_sub_account_trade_aggregation_response.js +0 -15
- package/interfaces/codegen/schema-maps/api_sub_account_trade_interval_aggregation_request.d.ts +0 -2
- package/interfaces/codegen/schema-maps/api_sub_account_trade_interval_aggregation_request.js +0 -28
- package/interfaces/codegen/schema-maps/api_sub_account_trade_interval_aggregation_response.d.ts +0 -2
- package/interfaces/codegen/schema-maps/api_sub_account_trade_interval_aggregation_response.js +0 -13
- package/interfaces/codegen/schema-maps/query_account_summary_request.d.ts +0 -2
- package/interfaces/codegen/schema-maps/query_account_summary_request.js +0 -16
- package/interfaces/codegen/schema-maps/sub_account_trade_aggregation.d.ts +0 -2
- package/interfaces/codegen/schema-maps/sub_account_trade_aggregation.js +0 -26
- package/interfaces/codegen/schema-maps/sub_account_trade_interval_aggregation.d.ts +0 -2
- package/interfaces/codegen/schema-maps/sub_account_trade_interval_aggregation.js +0 -28
package/TDG/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { AxiosRequestConfig } from 'axios';
|
|
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, IApiQueryAccountDailyPerformanceRequest, IApiQueryAccountDailyPerformanceResponse, IApiQueryAccountPerformanceResponse, IApiQueryAccountPerformanceTrendRequest, IApiQueryAccountPerformanceTrendResponse, IApiQueryAccountTodayPerformanceResponse, IApiQueryListFundingAccountSummaryRequest, IApiQueryListFundingAccountSummaryResponse, IApiQueryListSubAccountSummaryRequest, IApiQueryListSubAccountSummaryResponse, IApiQuerySubAccountDailyPerformanceRequest, IApiQuerySubAccountDailyPerformanceResponse, IApiQuerySubAccountTodayPerformanceRequest, IApiQuerySubAccountTodayPerformanceResponse, IApiQueryTradingAccountRiskMetricRequest, IApiQueryTradingAccountRiskMetricResponse, IApiQueryTradingPerformanceRequest, IApiQueryTradingPerformanceResponse, IApiQueryTradingPerformanceSummaryRequest, IApiQueryTradingPerformanceSummaryResponse, IApiQueryTradingPerformanceTrendRequest, IApiQueryTradingPerformanceTrendResponse, IApiQueryVaultInvestorHistoryRequest, IApiQueryVaultInvestorHistoryResponse,
|
|
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, IApiQueryAccountDailyPerformanceRequest, IApiQueryAccountDailyPerformanceResponse, IApiQueryAccountPerformanceResponse, IApiQueryAccountPerformanceTrendRequest, IApiQueryAccountPerformanceTrendResponse, IApiQueryAccountTodayPerformanceResponse, IApiQueryListFundingAccountSummaryRequest, IApiQueryListFundingAccountSummaryResponse, IApiQueryListSubAccountSummaryRequest, IApiQueryListSubAccountSummaryResponse, IApiQuerySubAccountDailyPerformanceRequest, IApiQuerySubAccountDailyPerformanceResponse, IApiQuerySubAccountTodayPerformanceRequest, IApiQuerySubAccountTodayPerformanceResponse, IApiQueryTradingAccountRiskMetricRequest, IApiQueryTradingAccountRiskMetricResponse, IApiQueryTradingPerformanceRequest, IApiQueryTradingPerformanceResponse, IApiQueryTradingPerformanceSummaryRequest, IApiQueryTradingPerformanceSummaryResponse, IApiQueryTradingPerformanceTrendRequest, IApiQueryTradingPerformanceTrendResponse, IApiQueryVaultInvestorHistoryRequest, IApiQueryVaultInvestorHistoryResponse, 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;
|
|
@@ -156,7 +156,6 @@ export declare class TDG {
|
|
|
156
156
|
accountPerformanceTrend(payload: IApiQueryAccountPerformanceTrendRequest, config?: AxiosRequestConfig): Promise<IApiQueryAccountPerformanceTrendResponse>;
|
|
157
157
|
tradingPerformanceSummary(payload: IApiQueryTradingPerformanceSummaryRequest, config?: AxiosRequestConfig): Promise<IApiQueryTradingPerformanceSummaryResponse>;
|
|
158
158
|
subAccountRiskMetric(payload: IApiQueryTradingAccountRiskMetricRequest, config?: AxiosRequestConfig): Promise<IApiQueryTradingAccountRiskMetricResponse>;
|
|
159
|
-
vaultInvestorHistoryStats(payload: IApiQueryVaultInvestorHistoryStatsRequest, config?: AxiosRequestConfig): Promise<IApiQueryVaultInvestorHistoryStatsResponse>;
|
|
160
159
|
accountPerformance(config?: AxiosRequestConfig): Promise<IApiQueryAccountPerformanceResponse>;
|
|
161
160
|
accountDailyPerformance(payload: IApiQueryAccountDailyPerformanceRequest, config?: AxiosRequestConfig): Promise<IApiQueryAccountDailyPerformanceResponse>;
|
|
162
161
|
subAccountDailyPerformance(payload: IApiQuerySubAccountDailyPerformanceRequest, config?: AxiosRequestConfig): Promise<IApiQuerySubAccountDailyPerformanceResponse>;
|
package/TDG/index.js
CHANGED
|
@@ -85,8 +85,6 @@ const api_query_trading_performance_trend_request_1 = require("../interfaces/cod
|
|
|
85
85
|
const api_query_trading_performance_trend_response_1 = require("../interfaces/codegen/schema-maps/api_query_trading_performance_trend_response");
|
|
86
86
|
const api_query_vault_investor_history_request_1 = require("../interfaces/codegen/schema-maps/api_query_vault_investor_history_request");
|
|
87
87
|
const api_query_vault_investor_history_response_1 = require("../interfaces/codegen/schema-maps/api_query_vault_investor_history_response");
|
|
88
|
-
const api_query_vault_investor_history_stats_request_1 = require("../interfaces/codegen/schema-maps/api_query_vault_investor_history_stats_request");
|
|
89
|
-
const api_query_vault_investor_history_stats_response_1 = require("../interfaces/codegen/schema-maps/api_query_vault_investor_history_stats_response");
|
|
90
88
|
const api_query_vault_manager_investor_history_request_1 = require("../interfaces/codegen/schema-maps/api_query_vault_manager_investor_history_request");
|
|
91
89
|
const api_query_vault_manager_investor_history_response_1 = require("../interfaces/codegen/schema-maps/api_query_vault_manager_investor_history_response");
|
|
92
90
|
const api_replace_orders_request_1 = require("../interfaces/codegen/schema-maps/api_replace_orders_request");
|
|
@@ -531,11 +529,6 @@ class TDG {
|
|
|
531
529
|
return utils_1.Utils.schemaMap(response.data, api_query_trading_account_risk_metric_response_1.API_QUERY_TRADING_ACCOUNT_RISK_METRIC_RESPONSE_MAP.LITE_TO_FULL);
|
|
532
530
|
}).catch(utils_1.Utils.coverApiError);
|
|
533
531
|
}
|
|
534
|
-
vaultInvestorHistoryStats(payload, config) {
|
|
535
|
-
return this._axios.post(this._liteUrl + '/vault_investor_history_stats', utils_1.Utils.schemaMap(payload, api_query_vault_investor_history_stats_request_1.API_QUERY_VAULT_INVESTOR_HISTORY_STATS_REQUEST_MAP.FULL_TO_LITE, true), config).then((response) => {
|
|
536
|
-
return utils_1.Utils.schemaMap(response.data, api_query_vault_investor_history_stats_response_1.API_QUERY_VAULT_INVESTOR_HISTORY_STATS_RESPONSE_MAP.LITE_TO_FULL);
|
|
537
|
-
}).catch(utils_1.Utils.coverApiError);
|
|
538
|
-
}
|
|
539
532
|
accountPerformance(config) {
|
|
540
533
|
return this._axios.post(this._liteUrl + '/account_performance', null, config).then((response) => {
|
|
541
534
|
return utils_1.Utils.schemaMap(response.data, api_query_account_performance_response_1.API_QUERY_ACCOUNT_PERFORMANCE_RESPONSE_MAP.LITE_TO_FULL);
|
|
@@ -26,7 +26,6 @@ import type { ERewardEpochStatus } from './enums/reward-epoch-status.ts';
|
|
|
26
26
|
import type { ERewardProgramType } from './enums/reward-program-type.ts';
|
|
27
27
|
import type { ERewardSession } from './enums/reward-session.ts';
|
|
28
28
|
import type { ESource } from './enums/source.ts';
|
|
29
|
-
import type { ESubAccountTradeInterval } from './enums/sub-account-trade-interval.ts';
|
|
30
29
|
import type { ETimeInForce } from './enums/time-in-force.ts';
|
|
31
30
|
import type { ETimeInterval } from './enums/time-interval.ts';
|
|
32
31
|
import type { ETransactionType } from './enums/transaction-type.ts';
|
|
@@ -756,12 +755,6 @@ export interface IApiInternalBatchCreateAccountMultiplierRequest {
|
|
|
756
755
|
export interface IApiInternalBatchCreateAccountMultiplierResponse {
|
|
757
756
|
ids?: string[];
|
|
758
757
|
}
|
|
759
|
-
export interface IApiLatestSnapSubAccountsRequest {
|
|
760
|
-
sub_account_i_ds?: string[];
|
|
761
|
-
}
|
|
762
|
-
export interface IApiLatestSnapSubAccountsResponse {
|
|
763
|
-
result?: ISubAccount[];
|
|
764
|
-
}
|
|
765
758
|
export interface IApiListAggregatedAccountSummaryRequest {
|
|
766
759
|
main_account_ids?: string[];
|
|
767
760
|
}
|
|
@@ -895,13 +888,6 @@ export interface IApiQueryAccountPerformanceTrendRequest {
|
|
|
895
888
|
export interface IApiQueryAccountPerformanceTrendResponse {
|
|
896
889
|
result?: IApiAccountPerformanceTrend[];
|
|
897
890
|
}
|
|
898
|
-
export interface IApiQueryAccountSummaryRequest {
|
|
899
|
-
time_interval?: ETimeInterval;
|
|
900
|
-
}
|
|
901
|
-
export interface IApiQueryAccountSummaryResponse {
|
|
902
|
-
result?: ISnapAccountSummary[];
|
|
903
|
-
next?: string;
|
|
904
|
-
}
|
|
905
891
|
export interface IApiQueryAccountTodayPerformanceResponse {
|
|
906
892
|
aggregated_pnl?: string;
|
|
907
893
|
investment_pnl?: string;
|
|
@@ -1003,11 +989,6 @@ export interface IApiQueryVaultInvestorHistoryRequest {
|
|
|
1003
989
|
export interface IApiQueryVaultInvestorHistoryResponse {
|
|
1004
990
|
result?: IApiVaultInvestorHistory[];
|
|
1005
991
|
}
|
|
1006
|
-
export interface IApiQueryVaultInvestorHistoryStatsRequest {
|
|
1007
|
-
}
|
|
1008
|
-
export interface IApiQueryVaultInvestorHistoryStatsResponse {
|
|
1009
|
-
total_investment_amount?: string;
|
|
1010
|
-
}
|
|
1011
992
|
export interface IApiQueryVaultManagerInvestorHistoryRequest {
|
|
1012
993
|
vault_id?: string;
|
|
1013
994
|
only_own_investments?: boolean;
|
|
@@ -1163,38 +1144,6 @@ export interface IApiSubAccountSummaryRequest {
|
|
|
1163
1144
|
export interface IApiSubAccountSummaryResponse {
|
|
1164
1145
|
result?: ISubAccount;
|
|
1165
1146
|
}
|
|
1166
|
-
export interface IApiSubAccountTradeAggregationRequest {
|
|
1167
|
-
limit?: number;
|
|
1168
|
-
interval?: ESubAccountTradeInterval;
|
|
1169
|
-
sub_account_i_ds?: string[];
|
|
1170
|
-
start_interval?: string;
|
|
1171
|
-
start_time?: string;
|
|
1172
|
-
end_time?: string;
|
|
1173
|
-
is_maker?: boolean;
|
|
1174
|
-
is_taker?: boolean;
|
|
1175
|
-
cursor?: string;
|
|
1176
|
-
group_by_signer?: boolean;
|
|
1177
|
-
sources?: ESource[];
|
|
1178
|
-
is_liquidation?: boolean;
|
|
1179
|
-
}
|
|
1180
|
-
export interface IApiSubAccountTradeAggregationResponse {
|
|
1181
|
-
result?: ISubAccountTradeAggregation[];
|
|
1182
|
-
next?: string;
|
|
1183
|
-
}
|
|
1184
|
-
export interface IApiSubAccountTradeIntervalAggregationRequest {
|
|
1185
|
-
interval?: ESubAccountTradeInterval;
|
|
1186
|
-
sub_account_i_ds?: string[];
|
|
1187
|
-
start_interval?: string;
|
|
1188
|
-
start_time?: string;
|
|
1189
|
-
end_time?: string;
|
|
1190
|
-
is_maker?: boolean;
|
|
1191
|
-
is_taker?: boolean;
|
|
1192
|
-
sources?: ESource[];
|
|
1193
|
-
is_liquidation?: boolean;
|
|
1194
|
-
}
|
|
1195
|
-
export interface IApiSubAccountTradeIntervalAggregationResponse {
|
|
1196
|
-
result?: ISubAccountTradeIntervalAggregation[];
|
|
1197
|
-
}
|
|
1198
1147
|
export interface IApiTickerFeedDataV1 {
|
|
1199
1148
|
result?: ITicker;
|
|
1200
1149
|
}
|
|
@@ -1769,6 +1718,7 @@ export interface IInitialLeverageResult {
|
|
|
1769
1718
|
leverage?: string;
|
|
1770
1719
|
min_leverage?: string;
|
|
1771
1720
|
max_leverage?: string;
|
|
1721
|
+
margin_type?: EPositionMarginType;
|
|
1772
1722
|
}
|
|
1773
1723
|
export interface IInjectedPointRequestElement {
|
|
1774
1724
|
off_chain_account_id?: string;
|
|
@@ -2017,11 +1967,6 @@ export interface IPriceProtectionBand {
|
|
|
2017
1967
|
high_centi_beeps?: string;
|
|
2018
1968
|
low_centi_beeps?: string;
|
|
2019
1969
|
}
|
|
2020
|
-
export interface IQueryAccountSummaryRequest {
|
|
2021
|
-
time_interval?: ETimeInterval;
|
|
2022
|
-
main_account_id?: string;
|
|
2023
|
-
sub_account_i_ds?: string[];
|
|
2024
|
-
}
|
|
2025
1970
|
export interface IQueryEpochBadgePointDistributionRequest {
|
|
2026
1971
|
epoch?: number;
|
|
2027
1972
|
type?: ERewardProgramType;
|
|
@@ -2267,27 +2212,6 @@ export interface ISubAccountPerformance {
|
|
|
2267
2212
|
equity_end?: string;
|
|
2268
2213
|
net_transfer?: string;
|
|
2269
2214
|
}
|
|
2270
|
-
export interface ISubAccountTradeAggregation {
|
|
2271
|
-
sub_account_id?: string;
|
|
2272
|
-
total_fee?: string;
|
|
2273
|
-
total_trade_volume?: string;
|
|
2274
|
-
num_traded?: string;
|
|
2275
|
-
positive_fee?: string;
|
|
2276
|
-
signer?: string;
|
|
2277
|
-
realized_pnl?: string;
|
|
2278
|
-
source?: ESource;
|
|
2279
|
-
}
|
|
2280
|
-
export interface ISubAccountTradeIntervalAggregation {
|
|
2281
|
-
sub_account_id?: string;
|
|
2282
|
-
start_interval?: string;
|
|
2283
|
-
total_fee?: string;
|
|
2284
|
-
total_trade_volume?: string;
|
|
2285
|
-
num_traded?: string;
|
|
2286
|
-
positive_fee?: string;
|
|
2287
|
-
signer?: string;
|
|
2288
|
-
realized_pnl?: string;
|
|
2289
|
-
source?: ESource;
|
|
2290
|
-
}
|
|
2291
2215
|
export interface ISubAccountTradingPerformance {
|
|
2292
2216
|
start_interval?: string;
|
|
2293
2217
|
sub_account_id?: string;
|
|
@@ -61,6 +61,7 @@ export declare enum EClusterConfigType {
|
|
|
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
63
|
FLAG_ENABLE_ADD_ISOLATED_POSITION_MARGIN = "FLAG_ENABLE_ADD_ISOLATED_POSITION_MARGIN",
|
|
64
|
-
FLAG_BUILDER_CODE = "FLAG_BUILDER_CODE"
|
|
64
|
+
FLAG_BUILDER_CODE = "FLAG_BUILDER_CODE",
|
|
65
|
+
FLAG_ENABLE_ADJUST_IS_REDUCING_POSITION = "FLAG_ENABLE_ADJUST_IS_REDUCING_POSITION"
|
|
65
66
|
}
|
|
66
67
|
export declare const EClusterConfigTypeInt: Record<EClusterConfigType, number>;
|
|
@@ -129,6 +129,8 @@ var EClusterConfigType;
|
|
|
129
129
|
EClusterConfigType["FLAG_ENABLE_ADD_ISOLATED_POSITION_MARGIN"] = "FLAG_ENABLE_ADD_ISOLATED_POSITION_MARGIN";
|
|
130
130
|
// Flag builder code
|
|
131
131
|
EClusterConfigType["FLAG_BUILDER_CODE"] = "FLAG_BUILDER_CODE";
|
|
132
|
+
// Flag to enable adjust is reducing position
|
|
133
|
+
EClusterConfigType["FLAG_ENABLE_ADJUST_IS_REDUCING_POSITION"] = "FLAG_ENABLE_ADJUST_IS_REDUCING_POSITION";
|
|
132
134
|
})(EClusterConfigType || (exports.EClusterConfigType = EClusterConfigType = {}));
|
|
133
135
|
exports.EClusterConfigTypeInt = Object.freeze({
|
|
134
136
|
[EClusterConfigType.CLIENT_TIER]: 1,
|
|
@@ -193,5 +195,6 @@ exports.EClusterConfigTypeInt = Object.freeze({
|
|
|
193
195
|
[EClusterConfigType.FLAG_ISOLATED_MARGIN]: 60,
|
|
194
196
|
[EClusterConfigType.FLAG_ENABLE_SET_SUB_ACCOUNT_POSITION_MARGIN_CONFIG]: 61,
|
|
195
197
|
[EClusterConfigType.FLAG_ENABLE_ADD_ISOLATED_POSITION_MARGIN]: 62,
|
|
196
|
-
[EClusterConfigType.FLAG_BUILDER_CODE]: 63
|
|
198
|
+
[EClusterConfigType.FLAG_BUILDER_CODE]: 63,
|
|
199
|
+
[EClusterConfigType.FLAG_ENABLE_ADJUST_IS_REDUCING_POSITION]: 64
|
|
197
200
|
});
|
|
@@ -7,12 +7,14 @@ exports.INITIAL_LEVERAGE_RESULT_MAP = Object.freeze({
|
|
|
7
7
|
instrument: 'i',
|
|
8
8
|
leverage: 'l',
|
|
9
9
|
min_leverage: 'ml',
|
|
10
|
-
max_leverage: 'ml1'
|
|
10
|
+
max_leverage: 'ml1',
|
|
11
|
+
margin_type: 'mt'
|
|
11
12
|
},
|
|
12
13
|
LITE_TO_FULL: {
|
|
13
14
|
i: 'instrument',
|
|
14
15
|
l: 'leverage',
|
|
15
16
|
ml: 'min_leverage',
|
|
16
|
-
ml1: 'max_leverage'
|
|
17
|
+
ml1: 'max_leverage',
|
|
18
|
+
mt: 'margin_type'
|
|
17
19
|
}
|
|
18
20
|
});
|
package/package.json
CHANGED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ESubAccountTradeIntervalInt = exports.ESubAccountTradeInterval = void 0;
|
|
4
|
-
var ESubAccountTradeInterval;
|
|
5
|
-
(function (ESubAccountTradeInterval) {
|
|
6
|
-
// 1 month
|
|
7
|
-
ESubAccountTradeInterval["SAT_1_MO"] = "SAT_1_MO";
|
|
8
|
-
// 1 day
|
|
9
|
-
ESubAccountTradeInterval["SAT_1_D"] = "SAT_1_D";
|
|
10
|
-
// 1 hour
|
|
11
|
-
ESubAccountTradeInterval["SAT_1_H"] = "SAT_1_H";
|
|
12
|
-
// 4 hour
|
|
13
|
-
ESubAccountTradeInterval["SAT_4_H"] = "SAT_4_H";
|
|
14
|
-
})(ESubAccountTradeInterval || (exports.ESubAccountTradeInterval = ESubAccountTradeInterval = {}));
|
|
15
|
-
exports.ESubAccountTradeIntervalInt = Object.freeze({
|
|
16
|
-
[ESubAccountTradeInterval.SAT_1_MO]: 1,
|
|
17
|
-
[ESubAccountTradeInterval.SAT_1_D]: 2,
|
|
18
|
-
[ESubAccountTradeInterval.SAT_1_H]: 3,
|
|
19
|
-
[ESubAccountTradeInterval.SAT_4_H]: 4
|
|
20
|
-
});
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.API_LATEST_SNAP_SUB_ACCOUNTS_REQUEST_MAP = void 0;
|
|
4
|
-
// Schema map for the 'API_LATEST_SNAP_SUB_ACCOUNTS_REQUEST' struct.
|
|
5
|
-
exports.API_LATEST_SNAP_SUB_ACCOUNTS_REQUEST_MAP = Object.freeze({
|
|
6
|
-
FULL_TO_LITE: {
|
|
7
|
-
sub_account_i_ds: 'sa'
|
|
8
|
-
},
|
|
9
|
-
LITE_TO_FULL: {
|
|
10
|
-
sa: 'sub_account_i_ds'
|
|
11
|
-
}
|
|
12
|
-
});
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.API_LATEST_SNAP_SUB_ACCOUNTS_RESPONSE_MAP = void 0;
|
|
4
|
-
const snap_sub_account_1 = require("./snap_sub_account");
|
|
5
|
-
// Schema map for the 'API_LATEST_SNAP_SUB_ACCOUNTS_RESPONSE' struct.
|
|
6
|
-
exports.API_LATEST_SNAP_SUB_ACCOUNTS_RESPONSE_MAP = Object.freeze({
|
|
7
|
-
FULL_TO_LITE: {
|
|
8
|
-
result: ['r', [snap_sub_account_1.SUB_ACCOUNT_MAP.FULL_TO_LITE]]
|
|
9
|
-
},
|
|
10
|
-
LITE_TO_FULL: {
|
|
11
|
-
r: ['result', [snap_sub_account_1.SUB_ACCOUNT_MAP.LITE_TO_FULL]]
|
|
12
|
-
}
|
|
13
|
-
});
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.API_QUERY_ACCOUNT_SUMMARY_REQUEST_MAP = void 0;
|
|
4
|
-
// Schema map for the 'API_QUERY_ACCOUNT_SUMMARY_REQUEST' struct.
|
|
5
|
-
exports.API_QUERY_ACCOUNT_SUMMARY_REQUEST_MAP = Object.freeze({
|
|
6
|
-
FULL_TO_LITE: {
|
|
7
|
-
time_interval: 'ti'
|
|
8
|
-
},
|
|
9
|
-
LITE_TO_FULL: {
|
|
10
|
-
ti: 'time_interval'
|
|
11
|
-
}
|
|
12
|
-
});
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.API_QUERY_ACCOUNT_SUMMARY_RESPONSE_MAP = void 0;
|
|
4
|
-
const snap_account_summary_1 = require("./snap_account_summary");
|
|
5
|
-
// Schema map for the 'API_QUERY_ACCOUNT_SUMMARY_RESPONSE' struct.
|
|
6
|
-
exports.API_QUERY_ACCOUNT_SUMMARY_RESPONSE_MAP = Object.freeze({
|
|
7
|
-
FULL_TO_LITE: {
|
|
8
|
-
result: ['r', [snap_account_summary_1.SNAP_ACCOUNT_SUMMARY_MAP.FULL_TO_LITE]],
|
|
9
|
-
next: 'n'
|
|
10
|
-
},
|
|
11
|
-
LITE_TO_FULL: {
|
|
12
|
-
r: ['result', [snap_account_summary_1.SNAP_ACCOUNT_SUMMARY_MAP.LITE_TO_FULL]],
|
|
13
|
-
n: 'next'
|
|
14
|
-
}
|
|
15
|
-
});
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.API_QUERY_VAULT_INVESTOR_HISTORY_STATS_REQUEST_MAP = void 0;
|
|
4
|
-
// Schema map for the 'API_QUERY_VAULT_INVESTOR_HISTORY_STATS_REQUEST' struct.
|
|
5
|
-
exports.API_QUERY_VAULT_INVESTOR_HISTORY_STATS_REQUEST_MAP = Object.freeze({
|
|
6
|
-
FULL_TO_LITE: {},
|
|
7
|
-
LITE_TO_FULL: {}
|
|
8
|
-
});
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.API_QUERY_VAULT_INVESTOR_HISTORY_STATS_RESPONSE_MAP = void 0;
|
|
4
|
-
// Schema map for the 'API_QUERY_VAULT_INVESTOR_HISTORY_STATS_RESPONSE' struct.
|
|
5
|
-
exports.API_QUERY_VAULT_INVESTOR_HISTORY_STATS_RESPONSE_MAP = Object.freeze({
|
|
6
|
-
FULL_TO_LITE: {
|
|
7
|
-
total_investment_amount: 'ti'
|
|
8
|
-
},
|
|
9
|
-
LITE_TO_FULL: {
|
|
10
|
-
ti: 'total_investment_amount'
|
|
11
|
-
}
|
|
12
|
-
});
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.API_SUB_ACCOUNT_TRADE_AGGREGATION_REQUEST_MAP = void 0;
|
|
4
|
-
// Schema map for the 'API_SUB_ACCOUNT_TRADE_AGGREGATION_REQUEST' struct.
|
|
5
|
-
exports.API_SUB_ACCOUNT_TRADE_AGGREGATION_REQUEST_MAP = Object.freeze({
|
|
6
|
-
FULL_TO_LITE: {
|
|
7
|
-
limit: 'l',
|
|
8
|
-
interval: 'i',
|
|
9
|
-
sub_account_i_ds: 'sa',
|
|
10
|
-
start_interval: 'si',
|
|
11
|
-
start_time: 'st',
|
|
12
|
-
end_time: 'et',
|
|
13
|
-
is_maker: 'im',
|
|
14
|
-
is_taker: 'it',
|
|
15
|
-
cursor: 'c',
|
|
16
|
-
group_by_signer: 'gb',
|
|
17
|
-
sources: 's',
|
|
18
|
-
is_liquidation: 'il'
|
|
19
|
-
},
|
|
20
|
-
LITE_TO_FULL: {
|
|
21
|
-
l: 'limit',
|
|
22
|
-
i: 'interval',
|
|
23
|
-
sa: 'sub_account_i_ds',
|
|
24
|
-
si: 'start_interval',
|
|
25
|
-
st: 'start_time',
|
|
26
|
-
et: 'end_time',
|
|
27
|
-
im: 'is_maker',
|
|
28
|
-
it: 'is_taker',
|
|
29
|
-
c: 'cursor',
|
|
30
|
-
gb: 'group_by_signer',
|
|
31
|
-
s: 'sources',
|
|
32
|
-
il: 'is_liquidation'
|
|
33
|
-
}
|
|
34
|
-
});
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.API_SUB_ACCOUNT_TRADE_AGGREGATION_RESPONSE_MAP = void 0;
|
|
4
|
-
const sub_account_trade_aggregation_1 = require("./sub_account_trade_aggregation");
|
|
5
|
-
// Schema map for the 'API_SUB_ACCOUNT_TRADE_AGGREGATION_RESPONSE' struct.
|
|
6
|
-
exports.API_SUB_ACCOUNT_TRADE_AGGREGATION_RESPONSE_MAP = Object.freeze({
|
|
7
|
-
FULL_TO_LITE: {
|
|
8
|
-
result: ['r', [sub_account_trade_aggregation_1.SUB_ACCOUNT_TRADE_AGGREGATION_MAP.FULL_TO_LITE]],
|
|
9
|
-
next: 'n'
|
|
10
|
-
},
|
|
11
|
-
LITE_TO_FULL: {
|
|
12
|
-
r: ['result', [sub_account_trade_aggregation_1.SUB_ACCOUNT_TRADE_AGGREGATION_MAP.LITE_TO_FULL]],
|
|
13
|
-
n: 'next'
|
|
14
|
-
}
|
|
15
|
-
});
|
package/interfaces/codegen/schema-maps/api_sub_account_trade_interval_aggregation_request.js
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.API_SUB_ACCOUNT_TRADE_INTERVAL_AGGREGATION_REQUEST_MAP = void 0;
|
|
4
|
-
// Schema map for the 'API_SUB_ACCOUNT_TRADE_INTERVAL_AGGREGATION_REQUEST' struct.
|
|
5
|
-
exports.API_SUB_ACCOUNT_TRADE_INTERVAL_AGGREGATION_REQUEST_MAP = Object.freeze({
|
|
6
|
-
FULL_TO_LITE: {
|
|
7
|
-
interval: 'i',
|
|
8
|
-
sub_account_i_ds: 'sa',
|
|
9
|
-
start_interval: 'si',
|
|
10
|
-
start_time: 'st',
|
|
11
|
-
end_time: 'et',
|
|
12
|
-
is_maker: 'im',
|
|
13
|
-
is_taker: 'it',
|
|
14
|
-
sources: 's',
|
|
15
|
-
is_liquidation: 'il'
|
|
16
|
-
},
|
|
17
|
-
LITE_TO_FULL: {
|
|
18
|
-
i: 'interval',
|
|
19
|
-
sa: 'sub_account_i_ds',
|
|
20
|
-
si: 'start_interval',
|
|
21
|
-
st: 'start_time',
|
|
22
|
-
et: 'end_time',
|
|
23
|
-
im: 'is_maker',
|
|
24
|
-
it: 'is_taker',
|
|
25
|
-
s: 'sources',
|
|
26
|
-
il: 'is_liquidation'
|
|
27
|
-
}
|
|
28
|
-
});
|
package/interfaces/codegen/schema-maps/api_sub_account_trade_interval_aggregation_response.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.API_SUB_ACCOUNT_TRADE_INTERVAL_AGGREGATION_RESPONSE_MAP = void 0;
|
|
4
|
-
const sub_account_trade_interval_aggregation_1 = require("./sub_account_trade_interval_aggregation");
|
|
5
|
-
// Schema map for the 'API_SUB_ACCOUNT_TRADE_INTERVAL_AGGREGATION_RESPONSE' struct.
|
|
6
|
-
exports.API_SUB_ACCOUNT_TRADE_INTERVAL_AGGREGATION_RESPONSE_MAP = Object.freeze({
|
|
7
|
-
FULL_TO_LITE: {
|
|
8
|
-
result: ['r', [sub_account_trade_interval_aggregation_1.SUB_ACCOUNT_TRADE_INTERVAL_AGGREGATION_MAP.FULL_TO_LITE]]
|
|
9
|
-
},
|
|
10
|
-
LITE_TO_FULL: {
|
|
11
|
-
r: ['result', [sub_account_trade_interval_aggregation_1.SUB_ACCOUNT_TRADE_INTERVAL_AGGREGATION_MAP.LITE_TO_FULL]]
|
|
12
|
-
}
|
|
13
|
-
});
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.QUERY_ACCOUNT_SUMMARY_REQUEST_MAP = void 0;
|
|
4
|
-
// Schema map for the 'QUERY_ACCOUNT_SUMMARY_REQUEST' struct.
|
|
5
|
-
exports.QUERY_ACCOUNT_SUMMARY_REQUEST_MAP = Object.freeze({
|
|
6
|
-
FULL_TO_LITE: {
|
|
7
|
-
time_interval: 'ti',
|
|
8
|
-
main_account_id: 'ma',
|
|
9
|
-
sub_account_i_ds: 'sa'
|
|
10
|
-
},
|
|
11
|
-
LITE_TO_FULL: {
|
|
12
|
-
ti: 'time_interval',
|
|
13
|
-
ma: 'main_account_id',
|
|
14
|
-
sa: 'sub_account_i_ds'
|
|
15
|
-
}
|
|
16
|
-
});
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SUB_ACCOUNT_TRADE_AGGREGATION_MAP = void 0;
|
|
4
|
-
// Schema map for the 'SUB_ACCOUNT_TRADE_AGGREGATION' struct.
|
|
5
|
-
exports.SUB_ACCOUNT_TRADE_AGGREGATION_MAP = Object.freeze({
|
|
6
|
-
FULL_TO_LITE: {
|
|
7
|
-
sub_account_id: 'sa',
|
|
8
|
-
total_fee: 'tf',
|
|
9
|
-
total_trade_volume: 'tt',
|
|
10
|
-
num_traded: 'nt',
|
|
11
|
-
positive_fee: 'pf',
|
|
12
|
-
signer: 's',
|
|
13
|
-
realized_pnl: 'rp',
|
|
14
|
-
source: 's1'
|
|
15
|
-
},
|
|
16
|
-
LITE_TO_FULL: {
|
|
17
|
-
sa: 'sub_account_id',
|
|
18
|
-
tf: 'total_fee',
|
|
19
|
-
tt: 'total_trade_volume',
|
|
20
|
-
nt: 'num_traded',
|
|
21
|
-
pf: 'positive_fee',
|
|
22
|
-
s: 'signer',
|
|
23
|
-
rp: 'realized_pnl',
|
|
24
|
-
s1: 'source'
|
|
25
|
-
}
|
|
26
|
-
});
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SUB_ACCOUNT_TRADE_INTERVAL_AGGREGATION_MAP = void 0;
|
|
4
|
-
// Schema map for the 'SUB_ACCOUNT_TRADE_INTERVAL_AGGREGATION' struct.
|
|
5
|
-
exports.SUB_ACCOUNT_TRADE_INTERVAL_AGGREGATION_MAP = Object.freeze({
|
|
6
|
-
FULL_TO_LITE: {
|
|
7
|
-
sub_account_id: 'sa',
|
|
8
|
-
start_interval: 'si',
|
|
9
|
-
total_fee: 'tf',
|
|
10
|
-
total_trade_volume: 'tt',
|
|
11
|
-
num_traded: 'nt',
|
|
12
|
-
positive_fee: 'pf',
|
|
13
|
-
signer: 's',
|
|
14
|
-
realized_pnl: 'rp',
|
|
15
|
-
source: 's1'
|
|
16
|
-
},
|
|
17
|
-
LITE_TO_FULL: {
|
|
18
|
-
sa: 'sub_account_id',
|
|
19
|
-
si: 'start_interval',
|
|
20
|
-
tf: 'total_fee',
|
|
21
|
-
tt: 'total_trade_volume',
|
|
22
|
-
nt: 'num_traded',
|
|
23
|
-
pf: 'positive_fee',
|
|
24
|
-
s: 'signer',
|
|
25
|
-
rp: 'realized_pnl',
|
|
26
|
-
s1: 'source'
|
|
27
|
-
}
|
|
28
|
-
});
|