@grvt/client 1.6.28 → 1.6.29
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/MDG/index.d.ts +2 -1
- package/MDG/index.js +6 -0
- package/TDG/index.d.ts +2 -1
- package/TDG/index.js +7 -0
- package/interfaces/codegen/data.interface.d.ts +123 -0
- package/interfaces/codegen/enums/account-multiplier-metadata-type.d.ts +2 -1
- package/interfaces/codegen/enums/account-multiplier-metadata-type.js +4 -1
- 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/kind.d.ts +2 -1
- package/interfaces/codegen/enums/kind.js +4 -1
- package/interfaces/codegen/enums/order-reject-reason.d.ts +6 -1
- package/interfaces/codegen/enums/order-reject-reason.js +16 -1
- package/interfaces/codegen/enums/position-close-status.d.ts +7 -0
- package/interfaces/codegen/enums/position-close-status.js +20 -0
- package/interfaces/codegen/hex-string-map.js +1 -0
- package/interfaces/codegen/schema-maps/account_multiplier_metric_point.d.ts +2 -0
- package/interfaces/codegen/schema-maps/account_multiplier_metric_point.js +14 -0
- package/interfaces/codegen/schema-maps/account_multiplier_override_entry.d.ts +2 -0
- package/interfaces/codegen/schema-maps/account_multiplier_override_entry.js +27 -0
- package/interfaces/codegen/schema-maps/account_with_overridden_multiplier_info.d.ts +2 -0
- package/interfaces/codegen/schema-maps/account_with_overridden_multiplier_info.js +22 -0
- package/interfaces/codegen/schema-maps/api_create_account_multiplier_request.js +4 -2
- package/interfaces/codegen/schema-maps/api_get_default_account_multiplier_values_response.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_get_default_account_multiplier_values_response.js +13 -0
- package/interfaces/codegen/schema-maps/api_get_funding_account_position_summary_request.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_get_funding_account_position_summary_request.js +14 -0
- package/interfaces/codegen/schema-maps/api_get_funding_account_position_summary_response.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_get_funding_account_position_summary_response.js +13 -0
- package/interfaces/codegen/schema-maps/api_get_sub_account_position_summary_request.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_get_sub_account_position_summary_request.js +14 -0
- package/interfaces/codegen/schema-maps/api_get_sub_account_position_summary_response.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_get_sub_account_position_summary_response.js +13 -0
- package/interfaces/codegen/schema-maps/api_get_supported_assets_response.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_get_supported_assets_response.js +18 -0
- package/interfaces/codegen/schema-maps/api_list_account_multiplier_with_override_response.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_list_account_multiplier_with_override_response.js +13 -0
- package/interfaces/codegen/schema-maps/api_lock_account_multiplier_request.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_lock_account_multiplier_request.js +14 -0
- package/interfaces/codegen/schema-maps/api_position_history.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_position_history.js +52 -0
- package/interfaces/codegen/schema-maps/api_position_history_request.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_position_history_request.js +34 -0
- package/interfaces/codegen/schema-maps/api_position_history_response.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_position_history_response.js +15 -0
- package/interfaces/codegen/schema-maps/api_query_list_sub_account_summary_request.js +4 -2
- package/interfaces/codegen/schema-maps/api_unlock_account_multiplier_request.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_unlock_account_multiplier_request.js +12 -0
- package/interfaces/codegen/schema-maps/api_update_account_multiplier_lock_flags_request.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_update_account_multiplier_lock_flags_request.js +14 -0
- package/interfaces/codegen/schema-maps/client_tier.js +6 -2
- package/interfaces/codegen/schema-maps/flat_private_trade.js +4 -2
- package/interfaces/codegen/schema-maps/funding_account_position_summary_result.d.ts +2 -0
- package/interfaces/codegen/schema-maps/funding_account_position_summary_result.js +16 -0
- package/interfaces/codegen/schema-maps/futures_wallet_assets.d.ts +2 -0
- package/interfaces/codegen/schema-maps/futures_wallet_assets.js +15 -0
- package/interfaces/codegen/schema-maps/sub_account_position_summary_result.d.ts +2 -0
- package/interfaces/codegen/schema-maps/sub_account_position_summary_result.js +16 -0
- package/interfaces/codegen/schema-maps/supported_asset.d.ts +2 -0
- package/interfaces/codegen/schema-maps/supported_asset.js +16 -0
- package/package.json +1 -1
package/MDG/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { AxiosRequestConfig } from 'axios';
|
|
2
|
-
import type { IApiBatchQueryVaultDetailRequest, IApiBatchQueryVaultDetailResponse, IApiBatchQueryVaultPerformanceRequest, IApiBatchQueryVaultPerformanceResponse, IApiBatchQueryVaultRiskMetricRequest, IApiBatchQueryVaultRiskMetricResponse, IApiCandlestickRequest, IApiCandlestickResponse, IApiFundingHistoryComparisonRequest, IApiFundingHistoryComparisonResponse, IApiFundingRateRequest, IApiFundingRateResponse, IApiGetAllInstrumentsRequest, IApiGetAllInstrumentsResponse, IApiGetFilteredInstrumentsRequest, IApiGetFilteredInstrumentsResponse, IApiGetInstrumentRequest, IApiGetInstrumentResponse, IApiGetMarginRulesRequest, IApiGetMarginRulesResponse, IApiLiveFundingRateComparisonRequest, IApiLiveFundingRateComparisonResponse, IApiMiniTickerRequest, IApiMiniTickerResponse, IApiOrderbookLevelsRequest, IApiOrderbookLevelsResponse, IApiQueryListVaultSubAccountSummaryRequest, IApiQueryListVaultSubAccountSummaryResponse, IApiQuerySnapVaultPositionRequest, IApiQuerySnapVaultPositionResponse, IApiQueryVaultPerformanceTrendRequest, IApiQueryVaultPerformanceTrendResponse, IApiQueryVaultSummaryHistoryRequest, IApiQueryVaultSummaryHistoryResponse, IApiSettlementPriceRequest, IApiSettlementPriceResponse, IApiTickerRequest, IApiTickerResponse, IApiTimedAssetExposureResponse, IApiTimedVaultAssetExposureRequest, IApiTradeHistoryRequest, IApiTradeHistoryResponse, IApiTradeRequest, IApiTradeResponse, IConfig } from '../interfaces';
|
|
2
|
+
import type { IApiGetSupportedAssetsResponse, IApiBatchQueryVaultDetailRequest, IApiBatchQueryVaultDetailResponse, IApiBatchQueryVaultPerformanceRequest, IApiBatchQueryVaultPerformanceResponse, IApiBatchQueryVaultRiskMetricRequest, IApiBatchQueryVaultRiskMetricResponse, IApiCandlestickRequest, IApiCandlestickResponse, IApiFundingHistoryComparisonRequest, IApiFundingHistoryComparisonResponse, IApiFundingRateRequest, IApiFundingRateResponse, IApiGetAllInstrumentsRequest, IApiGetAllInstrumentsResponse, IApiGetFilteredInstrumentsRequest, IApiGetFilteredInstrumentsResponse, IApiGetInstrumentRequest, IApiGetInstrumentResponse, IApiGetMarginRulesRequest, IApiGetMarginRulesResponse, IApiLiveFundingRateComparisonRequest, IApiLiveFundingRateComparisonResponse, IApiMiniTickerRequest, IApiMiniTickerResponse, IApiOrderbookLevelsRequest, IApiOrderbookLevelsResponse, IApiQueryListVaultSubAccountSummaryRequest, IApiQueryListVaultSubAccountSummaryResponse, IApiQuerySnapVaultPositionRequest, IApiQuerySnapVaultPositionResponse, IApiQueryVaultPerformanceTrendRequest, IApiQueryVaultPerformanceTrendResponse, IApiQueryVaultSummaryHistoryRequest, IApiQueryVaultSummaryHistoryResponse, IApiSettlementPriceRequest, IApiSettlementPriceResponse, IApiTickerRequest, IApiTickerResponse, IApiTimedAssetExposureResponse, IApiTimedVaultAssetExposureRequest, IApiTradeHistoryRequest, IApiTradeHistoryResponse, IApiTradeRequest, IApiTradeResponse, IConfig } from '../interfaces';
|
|
3
3
|
export declare class MDG {
|
|
4
4
|
private readonly _axios;
|
|
5
5
|
private readonly _fullUrl;
|
|
@@ -18,6 +18,7 @@ export declare class MDG {
|
|
|
18
18
|
* @see https://api-docs.grvt.io/market_data_api/#get-all-instruments
|
|
19
19
|
*/
|
|
20
20
|
allInstruments(payload: IApiGetAllInstrumentsRequest, config?: AxiosRequestConfig): Promise<IApiGetAllInstrumentsResponse>;
|
|
21
|
+
supportedAssets(config?: AxiosRequestConfig): Promise<IApiGetSupportedAssetsResponse>;
|
|
21
22
|
/**
|
|
22
23
|
* @see https://api-docs.grvt.io/market_data_api/#mini-ticker
|
|
23
24
|
*/
|
package/MDG/index.js
CHANGED
|
@@ -46,6 +46,7 @@ const api_trade_history_request_1 = require("../interfaces/codegen/schema-maps/a
|
|
|
46
46
|
const api_trade_history_response_1 = require("../interfaces/codegen/schema-maps/api_trade_history_response");
|
|
47
47
|
const api_trade_request_1 = require("../interfaces/codegen/schema-maps/api_trade_request");
|
|
48
48
|
const api_trade_response_1 = require("../interfaces/codegen/schema-maps/api_trade_response");
|
|
49
|
+
const api_get_supported_assets_response_1 = require("../interfaces/codegen/schema-maps/api_get_supported_assets_response");
|
|
49
50
|
const services_1 = require("../services");
|
|
50
51
|
const utils_1 = require("../utils");
|
|
51
52
|
class MDG {
|
|
@@ -82,6 +83,11 @@ class MDG {
|
|
|
82
83
|
return utils_1.Utils.schemaMap(response.data, api_get_all_instruments_response_1.API_GET_ALL_INSTRUMENTS_RESPONSE_MAP.LITE_TO_FULL);
|
|
83
84
|
}).catch(utils_1.Utils.coverApiError);
|
|
84
85
|
}
|
|
86
|
+
supportedAssets(config) {
|
|
87
|
+
return this._axios.post(this._liteUrl + '/supported_assets', null, Object.assign(Object.assign({}, config), { withCredentials: false })).then((response) => {
|
|
88
|
+
return utils_1.Utils.schemaMap(response.data, api_get_supported_assets_response_1.API_GET_SUPPORTED_ASSETS_RESPONSE_MAP.LITE_TO_FULL);
|
|
89
|
+
}).catch(utils_1.Utils.coverApiError);
|
|
90
|
+
}
|
|
85
91
|
/**
|
|
86
92
|
* @see https://api-docs.grvt.io/market_data_api/#mini-ticker
|
|
87
93
|
*/
|
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, IApiBulkOrdersRequest, IApiBulkOrdersResponse, 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, IApiQueryAccountPerformanceRequest, IApiQueryAccountPerformanceResponse, IApiQueryAccountPerformanceTrendRequest, IApiQueryAccountPerformanceTrendResponse, IApiQueryAccountTodayPerformanceRequest, 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';
|
|
2
|
+
import type { IAckResponse, IApiAddIsolatedPositionMarginRequest, IApiAddIsolatedPositionMarginResponse, IApiAggregatedAccountSummaryResponse, IApiAuthorizeBuilderRequest, IApiBuilderFillHistoryRequest, IApiBuilderFillHistoryResponse, IApiBulkOrdersRequest, IApiBulkOrdersResponse, 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, IApiQueryAccountPerformanceRequest, IApiQueryAccountPerformanceResponse, IApiQueryAccountPerformanceTrendRequest, IApiQueryAccountPerformanceTrendResponse, IApiQueryAccountTodayPerformanceRequest, 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, IApiSpotSubAccountSummaryRequest, IApiSpotSubAccountSummaryResponse, 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;
|
|
@@ -112,6 +112,7 @@ export declare class TDG {
|
|
|
112
112
|
*/
|
|
113
113
|
fundingAccountSummary(config?: AxiosRequestConfig): Promise<IApiFundingAccountSummaryResponse>;
|
|
114
114
|
fundingAccountSummaryHistory(payload: IApiQueryListFundingAccountSummaryRequest, config?: AxiosRequestConfig): Promise<IApiQueryListFundingAccountSummaryResponse>;
|
|
115
|
+
spotAccountSummary(payload: IApiSpotSubAccountSummaryRequest, config?: AxiosRequestConfig): Promise<IApiSpotSubAccountSummaryResponse>;
|
|
115
116
|
/**
|
|
116
117
|
* @see https://api-docs.grvt.io/trading_api/#aggregated-account-summary
|
|
117
118
|
*/
|
package/TDG/index.js
CHANGED
|
@@ -94,6 +94,8 @@ const api_query_vault_manager_investor_history_response_1 = require("../interfac
|
|
|
94
94
|
const api_replace_orders_request_1 = require("../interfaces/codegen/schema-maps/api_replace_orders_request");
|
|
95
95
|
const api_replace_orders_response_1 = require("../interfaces/codegen/schema-maps/api_replace_orders_response");
|
|
96
96
|
const api_set_initial_leverage_request_1 = require("../interfaces/codegen/schema-maps/api_set_initial_leverage_request");
|
|
97
|
+
const api_spot_sub_account_summary_request_1 = require("../interfaces/codegen/schema-maps/api_spot_sub_account_summary_request");
|
|
98
|
+
const api_spot_sub_account_summary_response_1 = require("../interfaces/codegen/schema-maps/api_spot_sub_account_summary_response");
|
|
97
99
|
const api_set_initial_leverage_response_1 = require("../interfaces/codegen/schema-maps/api_set_initial_leverage_response");
|
|
98
100
|
const api_set_sub_account_position_margin_config_request_1 = require("../interfaces/codegen/schema-maps/api_set_sub_account_position_margin_config_request");
|
|
99
101
|
const api_set_sub_account_position_margin_config_response_1 = require("../interfaces/codegen/schema-maps/api_set_sub_account_position_margin_config_response");
|
|
@@ -385,6 +387,11 @@ class TDG {
|
|
|
385
387
|
return utils_1.Utils.schemaMap(response.data, api_query_list_funding_account_summary_response_1.API_QUERY_LIST_FUNDING_ACCOUNT_SUMMARY_RESPONSE_MAP.LITE_TO_FULL);
|
|
386
388
|
}).catch(utils_1.Utils.coverApiError);
|
|
387
389
|
}
|
|
390
|
+
spotAccountSummary(payload, config) {
|
|
391
|
+
return this._axios.post(this._liteUrl + '/spot_account_summary', utils_1.Utils.schemaMap(payload, api_spot_sub_account_summary_request_1.API_SPOT_SUB_ACCOUNT_SUMMARY_REQUEST_MAP.FULL_TO_LITE, true), config).then((response) => {
|
|
392
|
+
return utils_1.Utils.schemaMap(response.data, api_spot_sub_account_summary_response_1.API_SPOT_SUB_ACCOUNT_SUMMARY_RESPONSE_MAP.LITE_TO_FULL);
|
|
393
|
+
}).catch(utils_1.Utils.coverApiError);
|
|
394
|
+
}
|
|
388
395
|
/**
|
|
389
396
|
* @see https://api-docs.grvt.io/trading_api/#aggregated-account-summary
|
|
390
397
|
*/
|
|
@@ -21,6 +21,7 @@ import type { EOrderRejectReason } from './enums/order-reject-reason.ts';
|
|
|
21
21
|
import type { EOrderStatus } from './enums/order-status.ts';
|
|
22
22
|
import type { EPointType } from './enums/point-type.ts';
|
|
23
23
|
import type { EPortfolioCurrency } from './enums/portfolio-currency.ts';
|
|
24
|
+
import type { EPositionCloseStatus } from './enums/position-close-status.ts';
|
|
24
25
|
import type { EPositionMarginType } from './enums/position-margin-type.ts';
|
|
25
26
|
import type { EQueryMainAccountLeaderboardOrderBy } from './enums/query-main-account-leaderboard-order-by.ts';
|
|
26
27
|
import type { ERewardEpochStatus } from './enums/reward-epoch-status.ts';
|
|
@@ -46,6 +47,27 @@ export interface IAPISettlementPrice {
|
|
|
46
47
|
settlement_time?: string;
|
|
47
48
|
settlement_price?: string;
|
|
48
49
|
}
|
|
50
|
+
export interface IAccountMultiplierMetricPoint {
|
|
51
|
+
metric?: EMetricType;
|
|
52
|
+
point?: string;
|
|
53
|
+
}
|
|
54
|
+
export interface IAccountMultiplierOverrideEntry {
|
|
55
|
+
id?: string;
|
|
56
|
+
metric?: EMetricType;
|
|
57
|
+
multiplier?: number;
|
|
58
|
+
metadata?: IRewardAccountMultiplierMetadata;
|
|
59
|
+
created_by_id?: string;
|
|
60
|
+
effective_epoch_end?: number;
|
|
61
|
+
create_time?: string;
|
|
62
|
+
reserve_multiplier?: number;
|
|
63
|
+
}
|
|
64
|
+
export interface IAccountWithOverriddenMultiplierInfo {
|
|
65
|
+
off_chain_account_id?: string;
|
|
66
|
+
is_locked?: boolean;
|
|
67
|
+
total_point?: string;
|
|
68
|
+
metric_points?: IAccountMultiplierMetricPoint[];
|
|
69
|
+
overrides?: IAccountMultiplierOverrideEntry[];
|
|
70
|
+
}
|
|
49
71
|
export interface IAck {
|
|
50
72
|
ack?: boolean;
|
|
51
73
|
}
|
|
@@ -229,6 +251,7 @@ export interface IApiCreateAccountMultiplierRequest {
|
|
|
229
251
|
effective_epoch_start?: number;
|
|
230
252
|
effective_epoch_end?: number;
|
|
231
253
|
reserve_multiplier?: number;
|
|
254
|
+
note?: string;
|
|
232
255
|
}
|
|
233
256
|
export interface IApiCreateAccountMultiplierResponse {
|
|
234
257
|
id?: string;
|
|
@@ -570,6 +593,9 @@ export interface IApiGetCurrencyRequest {
|
|
|
570
593
|
export interface IApiGetCurrencyResponse {
|
|
571
594
|
result?: ICurrencyDetail[];
|
|
572
595
|
}
|
|
596
|
+
export interface IApiGetDefaultAccountMultiplierValuesResponse {
|
|
597
|
+
result?: IRewardAccountMultiplier[];
|
|
598
|
+
}
|
|
573
599
|
export interface IApiGetEcosystemLeaderboardRequest {
|
|
574
600
|
calculate_from?: string;
|
|
575
601
|
limit?: number;
|
|
@@ -611,6 +637,13 @@ export interface IApiGetFilteredInstrumentsRequest {
|
|
|
611
637
|
export interface IApiGetFilteredInstrumentsResponse {
|
|
612
638
|
result?: IInstrumentDisplay[];
|
|
613
639
|
}
|
|
640
|
+
export interface IApiGetFundingAccountPositionSummaryRequest {
|
|
641
|
+
main_account_i_ds?: string[];
|
|
642
|
+
assets?: string[];
|
|
643
|
+
}
|
|
644
|
+
export interface IApiGetFundingAccountPositionSummaryResponse {
|
|
645
|
+
result?: IFundingAccountPositionSummaryResult[];
|
|
646
|
+
}
|
|
614
647
|
export interface IApiGetInstrumentRequest {
|
|
615
648
|
instrument?: string;
|
|
616
649
|
}
|
|
@@ -718,9 +751,21 @@ export interface IApiGetPriceProtectionBandsResponse {
|
|
|
718
751
|
export interface IApiGetRewardLeaderboardResponse {
|
|
719
752
|
result?: IApiRewardLeaderboardItem[];
|
|
720
753
|
}
|
|
754
|
+
export interface IApiGetSubAccountPositionSummaryRequest {
|
|
755
|
+
sub_account_i_ds?: string[];
|
|
756
|
+
assets?: string[];
|
|
757
|
+
}
|
|
758
|
+
export interface IApiGetSubAccountPositionSummaryResponse {
|
|
759
|
+
result?: ISubAccountPositionSummaryResult[];
|
|
760
|
+
}
|
|
721
761
|
export interface IApiGetSubAccountsResponse {
|
|
722
762
|
sub_account_ids?: string[];
|
|
723
763
|
}
|
|
764
|
+
export interface IApiGetSupportedAssetsResponse {
|
|
765
|
+
funding?: ISupportedAsset[];
|
|
766
|
+
spot?: ISupportedAsset[];
|
|
767
|
+
futures?: IFuturesWalletAssets[];
|
|
768
|
+
}
|
|
724
769
|
export interface IApiGetTraderStatResponse {
|
|
725
770
|
total_fee?: string;
|
|
726
771
|
}
|
|
@@ -780,6 +825,9 @@ export interface IApiInternalBatchCreateAccountMultiplierRequest {
|
|
|
780
825
|
export interface IApiInternalBatchCreateAccountMultiplierResponse {
|
|
781
826
|
ids?: string[];
|
|
782
827
|
}
|
|
828
|
+
export interface IApiListAccountMultiplierWithOverrideResponse {
|
|
829
|
+
result?: IAccountWithOverriddenMultiplierInfo[];
|
|
830
|
+
}
|
|
783
831
|
export interface IApiListAggregatedAccountSummaryRequest {
|
|
784
832
|
main_account_ids?: string[];
|
|
785
833
|
}
|
|
@@ -809,6 +857,10 @@ export interface IApiLiveFundingRateComparisonRequest {
|
|
|
809
857
|
export interface IApiLiveFundingRateComparisonResponse {
|
|
810
858
|
entries?: ILiveFundingRateComparisonEntry[];
|
|
811
859
|
}
|
|
860
|
+
export interface IApiLockAccountMultiplierRequest {
|
|
861
|
+
off_chain_account_id?: string;
|
|
862
|
+
apply_to_direct_referrals?: boolean;
|
|
863
|
+
}
|
|
812
864
|
export interface IApiMiniTickerRequest {
|
|
813
865
|
instrument?: string;
|
|
814
866
|
}
|
|
@@ -862,6 +914,47 @@ export interface IApiPointInjectionHistoryRequest {
|
|
|
862
914
|
export interface IApiPointInjectionHistoryResponse {
|
|
863
915
|
result?: IPointDistribution[];
|
|
864
916
|
}
|
|
917
|
+
export interface IApiPositionHistory {
|
|
918
|
+
sub_account_id?: string;
|
|
919
|
+
instrument?: string;
|
|
920
|
+
open_time?: string;
|
|
921
|
+
status?: EPositionCloseStatus;
|
|
922
|
+
is_long?: boolean;
|
|
923
|
+
margin_type?: EPositionMarginType;
|
|
924
|
+
close_time?: string;
|
|
925
|
+
entry_price?: string;
|
|
926
|
+
exit_price?: string;
|
|
927
|
+
position_close_mark_price?: string;
|
|
928
|
+
realized_pnl?: string;
|
|
929
|
+
cumulative_fee?: string;
|
|
930
|
+
cumulative_realized_funding_payment?: string;
|
|
931
|
+
closed_volume_base?: string;
|
|
932
|
+
closed_volume_quote?: string;
|
|
933
|
+
max_open_interest_base?: string;
|
|
934
|
+
max_open_interest_quote?: string;
|
|
935
|
+
cumulative_initial_margin?: string;
|
|
936
|
+
max_initial_margin?: string;
|
|
937
|
+
leverage?: string;
|
|
938
|
+
unrealized_pnl?: string;
|
|
939
|
+
}
|
|
940
|
+
export interface IApiPositionHistoryRequest {
|
|
941
|
+
sub_account_id?: string;
|
|
942
|
+
start_time?: string;
|
|
943
|
+
end_time?: string;
|
|
944
|
+
kind?: EKind[];
|
|
945
|
+
base?: string[];
|
|
946
|
+
quote?: string[];
|
|
947
|
+
limit?: number;
|
|
948
|
+
cursor?: string;
|
|
949
|
+
status?: EPositionCloseStatus[];
|
|
950
|
+
is_long?: boolean;
|
|
951
|
+
is_short?: boolean;
|
|
952
|
+
margin_type?: EPositionMarginType[];
|
|
953
|
+
}
|
|
954
|
+
export interface IApiPositionHistoryResponse {
|
|
955
|
+
result?: IApiPositionHistory[];
|
|
956
|
+
next?: string;
|
|
957
|
+
}
|
|
865
958
|
export interface IApiPositionTransferRequest {
|
|
866
959
|
maker_order?: IOrder;
|
|
867
960
|
taker_order?: IOrder;
|
|
@@ -947,6 +1040,7 @@ export interface IApiQueryListSubAccountSummaryRequest {
|
|
|
947
1040
|
sub_account_id?: string;
|
|
948
1041
|
start_time?: string;
|
|
949
1042
|
end_time?: string;
|
|
1043
|
+
sub_account_i_ds?: string[];
|
|
950
1044
|
}
|
|
951
1045
|
export interface IApiQueryListSubAccountSummaryResponse {
|
|
952
1046
|
result?: ISnapSubAccountSummary[];
|
|
@@ -1280,6 +1374,13 @@ export interface IApiTransferRequest {
|
|
|
1280
1374
|
export interface IApiTransferResponse {
|
|
1281
1375
|
result?: IApiTransferAck;
|
|
1282
1376
|
}
|
|
1377
|
+
export interface IApiUnlockAccountMultiplierRequest {
|
|
1378
|
+
off_chain_account_id?: string;
|
|
1379
|
+
}
|
|
1380
|
+
export interface IApiUpdateAccountMultiplierLockFlagsRequest {
|
|
1381
|
+
off_chain_account_id?: string;
|
|
1382
|
+
apply_to_direct_referrals?: boolean;
|
|
1383
|
+
}
|
|
1283
1384
|
export interface IApiUserCategoryAffinityScoreRequest {
|
|
1284
1385
|
account_id?: string;
|
|
1285
1386
|
start_time?: string;
|
|
@@ -1547,6 +1648,8 @@ export interface IClientTier {
|
|
|
1547
1648
|
futures_maker_fee?: number;
|
|
1548
1649
|
options_taker_fee?: number;
|
|
1549
1650
|
options_maker_fee?: number;
|
|
1651
|
+
spot_taker_fee?: number;
|
|
1652
|
+
spot_maker_fee?: number;
|
|
1550
1653
|
}
|
|
1551
1654
|
export interface ICrossExchVaultPendingInvestment {
|
|
1552
1655
|
request_time?: string;
|
|
@@ -1743,6 +1846,7 @@ export interface IFill {
|
|
|
1743
1846
|
builder?: string;
|
|
1744
1847
|
builder_fee_rate?: string;
|
|
1745
1848
|
builder_fee?: string;
|
|
1849
|
+
fee_currency?: string;
|
|
1746
1850
|
}
|
|
1747
1851
|
export interface IFlatReferral {
|
|
1748
1852
|
account_id?: string;
|
|
@@ -1757,6 +1861,11 @@ export interface IFlatReferral {
|
|
|
1757
1861
|
kyc_type?: string;
|
|
1758
1862
|
kyc_first_completed_at?: string;
|
|
1759
1863
|
}
|
|
1864
|
+
export interface IFundingAccountPositionSummaryResult {
|
|
1865
|
+
main_account_id?: string;
|
|
1866
|
+
total_unrealized_pnl?: string;
|
|
1867
|
+
total_realized_pnl?: string;
|
|
1868
|
+
}
|
|
1760
1869
|
export interface IFundingAccountSummary {
|
|
1761
1870
|
main_account_id?: string;
|
|
1762
1871
|
total_equity?: string;
|
|
@@ -1782,6 +1891,10 @@ export interface IFundingPayment {
|
|
|
1782
1891
|
amount?: string;
|
|
1783
1892
|
tx_id?: string;
|
|
1784
1893
|
}
|
|
1894
|
+
export interface IFuturesWalletAssets {
|
|
1895
|
+
mode?: ESubAccountMode;
|
|
1896
|
+
supported_assets?: ISupportedAsset[];
|
|
1897
|
+
}
|
|
1785
1898
|
export interface IGetClaimableEcosystemBadgeResponse {
|
|
1786
1899
|
badge?: IEpochBadge;
|
|
1787
1900
|
is_claimable?: boolean;
|
|
@@ -2347,6 +2460,11 @@ export interface ISubAccountPerformance {
|
|
|
2347
2460
|
net_transfer?: string;
|
|
2348
2461
|
currency?: number;
|
|
2349
2462
|
}
|
|
2463
|
+
export interface ISubAccountPositionSummaryResult {
|
|
2464
|
+
sub_account_id?: string;
|
|
2465
|
+
total_unrealized_pnl?: string;
|
|
2466
|
+
total_realized_pnl?: string;
|
|
2467
|
+
}
|
|
2350
2468
|
export interface ISubAccountTradingPerformance {
|
|
2351
2469
|
start_interval?: string;
|
|
2352
2470
|
sub_account_id?: string;
|
|
@@ -2360,6 +2478,11 @@ export interface ISubAccountTradingPerformance {
|
|
|
2360
2478
|
funding_payment_amount?: string;
|
|
2361
2479
|
filled_order_count?: string;
|
|
2362
2480
|
}
|
|
2481
|
+
export interface ISupportedAsset {
|
|
2482
|
+
asset_id?: number;
|
|
2483
|
+
asset_code?: string;
|
|
2484
|
+
balance_decimals?: number;
|
|
2485
|
+
}
|
|
2363
2486
|
export interface ITPSLOrderMetadata {
|
|
2364
2487
|
trigger_by?: ETriggerBy;
|
|
2365
2488
|
trigger_price?: string;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export declare enum EAccountMultiplierMetadataType {
|
|
2
2
|
AMBASSADOR = "AMBASSADOR",
|
|
3
|
-
REFERRED_BY_AMBASSADOR = "REFERRED_BY_AMBASSADOR"
|
|
3
|
+
REFERRED_BY_AMBASSADOR = "REFERRED_BY_AMBASSADOR",
|
|
4
|
+
ADMIN = "ADMIN"
|
|
4
5
|
}
|
|
5
6
|
export declare const EAccountMultiplierMetadataTypeInt: Record<EAccountMultiplierMetadataType, number>;
|
|
@@ -7,8 +7,11 @@ var EAccountMultiplierMetadataType;
|
|
|
7
7
|
EAccountMultiplierMetadataType["AMBASSADOR"] = "AMBASSADOR";
|
|
8
8
|
// referred by ambassador type
|
|
9
9
|
EAccountMultiplierMetadataType["REFERRED_BY_AMBASSADOR"] = "REFERRED_BY_AMBASSADOR";
|
|
10
|
+
// admin override with note
|
|
11
|
+
EAccountMultiplierMetadataType["ADMIN"] = "ADMIN";
|
|
10
12
|
})(EAccountMultiplierMetadataType || (exports.EAccountMultiplierMetadataType = EAccountMultiplierMetadataType = {}));
|
|
11
13
|
exports.EAccountMultiplierMetadataTypeInt = Object.freeze({
|
|
12
14
|
[EAccountMultiplierMetadataType.AMBASSADOR]: 1,
|
|
13
|
-
[EAccountMultiplierMetadataType.REFERRED_BY_AMBASSADOR]: 2
|
|
15
|
+
[EAccountMultiplierMetadataType.REFERRED_BY_AMBASSADOR]: 2,
|
|
16
|
+
[EAccountMultiplierMetadataType.ADMIN]: 3
|
|
14
17
|
});
|
|
@@ -78,6 +78,7 @@ export declare enum EClusterConfigType {
|
|
|
78
78
|
FLAG_CANCEL_ON_DISCONNECT = "FLAG_CANCEL_ON_DISCONNECT",
|
|
79
79
|
FLAG_SPLIT_TPSL = "FLAG_SPLIT_TPSL",
|
|
80
80
|
FLAG_SPOT_TRADING = "FLAG_SPOT_TRADING",
|
|
81
|
-
FLAG_SNAPSHOT_CURRENCY_STORE_FIRST = "FLAG_SNAPSHOT_CURRENCY_STORE_FIRST"
|
|
81
|
+
FLAG_SNAPSHOT_CURRENCY_STORE_FIRST = "FLAG_SNAPSHOT_CURRENCY_STORE_FIRST",
|
|
82
|
+
FLAG_ENABLE_POSITION_HISTORY = "FLAG_ENABLE_POSITION_HISTORY"
|
|
82
83
|
}
|
|
83
84
|
export declare const EClusterConfigTypeInt: Record<EClusterConfigType, number>;
|
|
@@ -163,6 +163,8 @@ var EClusterConfigType;
|
|
|
163
163
|
EClusterConfigType["FLAG_SPOT_TRADING"] = "FLAG_SPOT_TRADING";
|
|
164
164
|
// Flag to dump currency store first in snapshot, ensuring gateway rehydrates currency store before other state
|
|
165
165
|
EClusterConfigType["FLAG_SNAPSHOT_CURRENCY_STORE_FIRST"] = "FLAG_SNAPSHOT_CURRENCY_STORE_FIRST";
|
|
166
|
+
// Gates position history lifecycle accumulation and close publication
|
|
167
|
+
EClusterConfigType["FLAG_ENABLE_POSITION_HISTORY"] = "FLAG_ENABLE_POSITION_HISTORY";
|
|
166
168
|
})(EClusterConfigType || (exports.EClusterConfigType = EClusterConfigType = {}));
|
|
167
169
|
exports.EClusterConfigTypeInt = Object.freeze({
|
|
168
170
|
[EClusterConfigType.CLIENT_TIER]: 1,
|
|
@@ -244,5 +246,6 @@ exports.EClusterConfigTypeInt = Object.freeze({
|
|
|
244
246
|
[EClusterConfigType.FLAG_CANCEL_ON_DISCONNECT]: 77,
|
|
245
247
|
[EClusterConfigType.FLAG_SPLIT_TPSL]: 78,
|
|
246
248
|
[EClusterConfigType.FLAG_SPOT_TRADING]: 79,
|
|
247
|
-
[EClusterConfigType.FLAG_SNAPSHOT_CURRENCY_STORE_FIRST]: 80
|
|
249
|
+
[EClusterConfigType.FLAG_SNAPSHOT_CURRENCY_STORE_FIRST]: 80,
|
|
250
|
+
[EClusterConfigType.FLAG_ENABLE_POSITION_HISTORY]: 81
|
|
248
251
|
});
|
|
@@ -12,10 +12,13 @@ var EKind;
|
|
|
12
12
|
EKind["CALL"] = "CALL";
|
|
13
13
|
// the put option asset kind
|
|
14
14
|
EKind["PUT"] = "PUT";
|
|
15
|
+
// the spot swap asset kind
|
|
16
|
+
EKind["SPOT_SWAP"] = "SPOT_SWAP";
|
|
15
17
|
})(EKind || (exports.EKind = EKind = {}));
|
|
16
18
|
exports.EKindInt = Object.freeze({
|
|
17
19
|
[EKind.PERPETUAL]: 1,
|
|
18
20
|
[EKind.FUTURE]: 2,
|
|
19
21
|
[EKind.CALL]: 3,
|
|
20
|
-
[EKind.PUT]: 4
|
|
22
|
+
[EKind.PUT]: 4,
|
|
23
|
+
[EKind.SPOT_SWAP]: 8
|
|
21
24
|
});
|
|
@@ -43,6 +43,11 @@ export declare enum EOrderRejectReason {
|
|
|
43
43
|
BUILDER_ORDER_BUILDER_NOT_AUTHORIZED = "BUILDER_ORDER_BUILDER_NOT_AUTHORIZED",
|
|
44
44
|
BUILDER_ORDER_BUILDER_NOT_EXIST = "BUILDER_ORDER_BUILDER_NOT_EXIST",
|
|
45
45
|
TRADE_PRICE_WORSE_THAN_BANKRUPTCY_PRICE = "TRADE_PRICE_WORSE_THAN_BANKRUPTCY_PRICE",
|
|
46
|
-
TOO_MANY_MAKER_ORDERS = "TOO_MANY_MAKER_ORDERS"
|
|
46
|
+
TOO_MANY_MAKER_ORDERS = "TOO_MANY_MAKER_ORDERS",
|
|
47
|
+
REDUCE_ONLY_NOT_SUPPORTED_FOR_SPOT_ORDER = "REDUCE_ONLY_NOT_SUPPORTED_FOR_SPOT_ORDER",
|
|
48
|
+
TPSL_NOT_SUPPORTED_FOR_SPOT_ORDER = "TPSL_NOT_SUPPORTED_FOR_SPOT_ORDER",
|
|
49
|
+
SPOT_ORDER_NOT_SUPPORTED = "SPOT_ORDER_NOT_SUPPORTED",
|
|
50
|
+
INSUFFICIENT_BALANCE = "INSUFFICIENT_BALANCE",
|
|
51
|
+
SPOT_TRADING_BLOCKED_DURING_SOCIALIZED_LOSS = "SPOT_TRADING_BLOCKED_DURING_SOCIALIZED_LOSS"
|
|
47
52
|
}
|
|
48
53
|
export declare const EOrderRejectReasonInt: Record<EOrderRejectReason, number>;
|
|
@@ -93,6 +93,16 @@ var EOrderRejectReason;
|
|
|
93
93
|
EOrderRejectReason["TRADE_PRICE_WORSE_THAN_BANKRUPTCY_PRICE"] = "TRADE_PRICE_WORSE_THAN_BANKRUPTCY_PRICE";
|
|
94
94
|
// the order was cancelled due to matching with too many maker orders
|
|
95
95
|
EOrderRejectReason["TOO_MANY_MAKER_ORDERS"] = "TOO_MANY_MAKER_ORDERS";
|
|
96
|
+
// reduce-only order is not supported for spot order
|
|
97
|
+
EOrderRejectReason["REDUCE_ONLY_NOT_SUPPORTED_FOR_SPOT_ORDER"] = "REDUCE_ONLY_NOT_SUPPORTED_FOR_SPOT_ORDER";
|
|
98
|
+
// tpsl is not supported for spot order
|
|
99
|
+
EOrderRejectReason["TPSL_NOT_SUPPORTED_FOR_SPOT_ORDER"] = "TPSL_NOT_SUPPORTED_FOR_SPOT_ORDER";
|
|
100
|
+
// spot order is not supported
|
|
101
|
+
EOrderRejectReason["SPOT_ORDER_NOT_SUPPORTED"] = "SPOT_ORDER_NOT_SUPPORTED";
|
|
102
|
+
// the subaccount has insufficient balance
|
|
103
|
+
EOrderRejectReason["INSUFFICIENT_BALANCE"] = "INSUFFICIENT_BALANCE";
|
|
104
|
+
// spot trading is blocked during socialized loss (SLOW)
|
|
105
|
+
EOrderRejectReason["SPOT_TRADING_BLOCKED_DURING_SOCIALIZED_LOSS"] = "SPOT_TRADING_BLOCKED_DURING_SOCIALIZED_LOSS";
|
|
96
106
|
})(EOrderRejectReason || (exports.EOrderRejectReason = EOrderRejectReason = {}));
|
|
97
107
|
exports.EOrderRejectReasonInt = Object.freeze({
|
|
98
108
|
[EOrderRejectReason.UNSPECIFIED]: 0,
|
|
@@ -139,5 +149,10 @@ exports.EOrderRejectReasonInt = Object.freeze({
|
|
|
139
149
|
[EOrderRejectReason.BUILDER_ORDER_BUILDER_NOT_AUTHORIZED]: 41,
|
|
140
150
|
[EOrderRejectReason.BUILDER_ORDER_BUILDER_NOT_EXIST]: 42,
|
|
141
151
|
[EOrderRejectReason.TRADE_PRICE_WORSE_THAN_BANKRUPTCY_PRICE]: 44,
|
|
142
|
-
[EOrderRejectReason.TOO_MANY_MAKER_ORDERS]: 45
|
|
152
|
+
[EOrderRejectReason.TOO_MANY_MAKER_ORDERS]: 45,
|
|
153
|
+
[EOrderRejectReason.REDUCE_ONLY_NOT_SUPPORTED_FOR_SPOT_ORDER]: 46,
|
|
154
|
+
[EOrderRejectReason.TPSL_NOT_SUPPORTED_FOR_SPOT_ORDER]: 47,
|
|
155
|
+
[EOrderRejectReason.SPOT_ORDER_NOT_SUPPORTED]: 48,
|
|
156
|
+
[EOrderRejectReason.INSUFFICIENT_BALANCE]: 49,
|
|
157
|
+
[EOrderRejectReason.SPOT_TRADING_BLOCKED_DURING_SOCIALIZED_LOSS]: 50
|
|
143
158
|
});
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EPositionCloseStatusInt = exports.EPositionCloseStatus = void 0;
|
|
4
|
+
var EPositionCloseStatus;
|
|
5
|
+
(function (EPositionCloseStatus) {
|
|
6
|
+
// Position fully closed via reducing trade or flip
|
|
7
|
+
EPositionCloseStatus["CLOSED"] = "CLOSED";
|
|
8
|
+
// Position closed via liquidation
|
|
9
|
+
EPositionCloseStatus["LIQUIDATED"] = "LIQUIDATED";
|
|
10
|
+
// Position closed via settlement
|
|
11
|
+
EPositionCloseStatus["SETTLED"] = "SETTLED";
|
|
12
|
+
// Position partially closed
|
|
13
|
+
EPositionCloseStatus["PARTIALLY_CLOSED"] = "PARTIALLY_CLOSED";
|
|
14
|
+
})(EPositionCloseStatus || (exports.EPositionCloseStatus = EPositionCloseStatus = {}));
|
|
15
|
+
exports.EPositionCloseStatusInt = Object.freeze({
|
|
16
|
+
[EPositionCloseStatus.CLOSED]: 1,
|
|
17
|
+
[EPositionCloseStatus.LIQUIDATED]: 2,
|
|
18
|
+
[EPositionCloseStatus.SETTLED]: 3,
|
|
19
|
+
[EPositionCloseStatus.PARTIALLY_CLOSED]: 4
|
|
20
|
+
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ACCOUNT_MULTIPLIER_METRIC_POINT_MAP = void 0;
|
|
4
|
+
// Schema map for the 'ACCOUNT_MULTIPLIER_METRIC_POINT' struct.
|
|
5
|
+
exports.ACCOUNT_MULTIPLIER_METRIC_POINT_MAP = Object.freeze({
|
|
6
|
+
FULL_TO_LITE: {
|
|
7
|
+
metric: 'm',
|
|
8
|
+
point: 'p'
|
|
9
|
+
},
|
|
10
|
+
LITE_TO_FULL: {
|
|
11
|
+
m: 'metric',
|
|
12
|
+
p: 'point'
|
|
13
|
+
}
|
|
14
|
+
});
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ACCOUNT_MULTIPLIER_OVERRIDE_ENTRY_MAP = void 0;
|
|
4
|
+
const reward_account_multiplier_metadata_1 = require("./reward_account_multiplier_metadata");
|
|
5
|
+
// Schema map for the 'ACCOUNT_MULTIPLIER_OVERRIDE_ENTRY' struct.
|
|
6
|
+
exports.ACCOUNT_MULTIPLIER_OVERRIDE_ENTRY_MAP = Object.freeze({
|
|
7
|
+
FULL_TO_LITE: {
|
|
8
|
+
id: 'i',
|
|
9
|
+
metric: 'm',
|
|
10
|
+
multiplier: 'm1',
|
|
11
|
+
metadata: ['m2', reward_account_multiplier_metadata_1.REWARD_ACCOUNT_MULTIPLIER_METADATA_MAP.FULL_TO_LITE],
|
|
12
|
+
created_by_id: 'cb',
|
|
13
|
+
effective_epoch_end: 'ee',
|
|
14
|
+
create_time: 'ct',
|
|
15
|
+
reserve_multiplier: 'rm'
|
|
16
|
+
},
|
|
17
|
+
LITE_TO_FULL: {
|
|
18
|
+
i: 'id',
|
|
19
|
+
m: 'metric',
|
|
20
|
+
m1: 'multiplier',
|
|
21
|
+
m2: ['metadata', reward_account_multiplier_metadata_1.REWARD_ACCOUNT_MULTIPLIER_METADATA_MAP.LITE_TO_FULL],
|
|
22
|
+
cb: 'created_by_id',
|
|
23
|
+
ee: 'effective_epoch_end',
|
|
24
|
+
ct: 'create_time',
|
|
25
|
+
rm: 'reserve_multiplier'
|
|
26
|
+
}
|
|
27
|
+
});
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ACCOUNT_WITH_OVERRIDDEN_MULTIPLIER_INFO_MAP = void 0;
|
|
4
|
+
const account_multiplier_metric_point_1 = require("./account_multiplier_metric_point");
|
|
5
|
+
const account_multiplier_override_entry_1 = require("./account_multiplier_override_entry");
|
|
6
|
+
// Schema map for the 'ACCOUNT_WITH_OVERRIDDEN_MULTIPLIER_INFO' struct.
|
|
7
|
+
exports.ACCOUNT_WITH_OVERRIDDEN_MULTIPLIER_INFO_MAP = Object.freeze({
|
|
8
|
+
FULL_TO_LITE: {
|
|
9
|
+
off_chain_account_id: 'oc',
|
|
10
|
+
is_locked: 'il',
|
|
11
|
+
total_point: 'tp',
|
|
12
|
+
metric_points: ['mp', [account_multiplier_metric_point_1.ACCOUNT_MULTIPLIER_METRIC_POINT_MAP.FULL_TO_LITE]],
|
|
13
|
+
overrides: ['o', [account_multiplier_override_entry_1.ACCOUNT_MULTIPLIER_OVERRIDE_ENTRY_MAP.FULL_TO_LITE]]
|
|
14
|
+
},
|
|
15
|
+
LITE_TO_FULL: {
|
|
16
|
+
oc: 'off_chain_account_id',
|
|
17
|
+
il: 'is_locked',
|
|
18
|
+
tp: 'total_point',
|
|
19
|
+
mp: ['metric_points', [account_multiplier_metric_point_1.ACCOUNT_MULTIPLIER_METRIC_POINT_MAP.LITE_TO_FULL]],
|
|
20
|
+
o: ['overrides', [account_multiplier_override_entry_1.ACCOUNT_MULTIPLIER_OVERRIDE_ENTRY_MAP.LITE_TO_FULL]]
|
|
21
|
+
}
|
|
22
|
+
});
|
|
@@ -10,7 +10,8 @@ exports.API_CREATE_ACCOUNT_MULTIPLIER_REQUEST_MAP = Object.freeze({
|
|
|
10
10
|
multiplier: 'm1',
|
|
11
11
|
effective_epoch_start: 'ee',
|
|
12
12
|
effective_epoch_end: 'ee1',
|
|
13
|
-
reserve_multiplier: 'rm'
|
|
13
|
+
reserve_multiplier: 'rm',
|
|
14
|
+
note: 'n'
|
|
14
15
|
},
|
|
15
16
|
LITE_TO_FULL: {
|
|
16
17
|
m: 'metric',
|
|
@@ -19,6 +20,7 @@ exports.API_CREATE_ACCOUNT_MULTIPLIER_REQUEST_MAP = Object.freeze({
|
|
|
19
20
|
m1: 'multiplier',
|
|
20
21
|
ee: 'effective_epoch_start',
|
|
21
22
|
ee1: 'effective_epoch_end',
|
|
22
|
-
rm: 'reserve_multiplier'
|
|
23
|
+
rm: 'reserve_multiplier',
|
|
24
|
+
n: 'note'
|
|
23
25
|
}
|
|
24
26
|
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.API_GET_DEFAULT_ACCOUNT_MULTIPLIER_VALUES_RESPONSE_MAP = void 0;
|
|
4
|
+
const reward_account_multiplier_1 = require("./reward_account_multiplier");
|
|
5
|
+
// Schema map for the 'API_GET_DEFAULT_ACCOUNT_MULTIPLIER_VALUES_RESPONSE' struct.
|
|
6
|
+
exports.API_GET_DEFAULT_ACCOUNT_MULTIPLIER_VALUES_RESPONSE_MAP = Object.freeze({
|
|
7
|
+
FULL_TO_LITE: {
|
|
8
|
+
result: ['r', [reward_account_multiplier_1.REWARD_ACCOUNT_MULTIPLIER_MAP.FULL_TO_LITE]]
|
|
9
|
+
},
|
|
10
|
+
LITE_TO_FULL: {
|
|
11
|
+
r: ['result', [reward_account_multiplier_1.REWARD_ACCOUNT_MULTIPLIER_MAP.LITE_TO_FULL]]
|
|
12
|
+
}
|
|
13
|
+
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.API_GET_FUNDING_ACCOUNT_POSITION_SUMMARY_REQUEST_MAP = void 0;
|
|
4
|
+
// Schema map for the 'API_GET_FUNDING_ACCOUNT_POSITION_SUMMARY_REQUEST' struct.
|
|
5
|
+
exports.API_GET_FUNDING_ACCOUNT_POSITION_SUMMARY_REQUEST_MAP = Object.freeze({
|
|
6
|
+
FULL_TO_LITE: {
|
|
7
|
+
main_account_i_ds: 'ma',
|
|
8
|
+
assets: 'a'
|
|
9
|
+
},
|
|
10
|
+
LITE_TO_FULL: {
|
|
11
|
+
ma: 'main_account_i_ds',
|
|
12
|
+
a: 'assets'
|
|
13
|
+
}
|
|
14
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.API_GET_FUNDING_ACCOUNT_POSITION_SUMMARY_RESPONSE_MAP = void 0;
|
|
4
|
+
const funding_account_position_summary_result_1 = require("./funding_account_position_summary_result");
|
|
5
|
+
// Schema map for the 'API_GET_FUNDING_ACCOUNT_POSITION_SUMMARY_RESPONSE' struct.
|
|
6
|
+
exports.API_GET_FUNDING_ACCOUNT_POSITION_SUMMARY_RESPONSE_MAP = Object.freeze({
|
|
7
|
+
FULL_TO_LITE: {
|
|
8
|
+
result: ['r', [funding_account_position_summary_result_1.FUNDING_ACCOUNT_POSITION_SUMMARY_RESULT_MAP.FULL_TO_LITE]]
|
|
9
|
+
},
|
|
10
|
+
LITE_TO_FULL: {
|
|
11
|
+
r: ['result', [funding_account_position_summary_result_1.FUNDING_ACCOUNT_POSITION_SUMMARY_RESULT_MAP.LITE_TO_FULL]]
|
|
12
|
+
}
|
|
13
|
+
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.API_GET_SUB_ACCOUNT_POSITION_SUMMARY_REQUEST_MAP = void 0;
|
|
4
|
+
// Schema map for the 'API_GET_SUB_ACCOUNT_POSITION_SUMMARY_REQUEST' struct.
|
|
5
|
+
exports.API_GET_SUB_ACCOUNT_POSITION_SUMMARY_REQUEST_MAP = Object.freeze({
|
|
6
|
+
FULL_TO_LITE: {
|
|
7
|
+
sub_account_i_ds: 'sa',
|
|
8
|
+
assets: 'a'
|
|
9
|
+
},
|
|
10
|
+
LITE_TO_FULL: {
|
|
11
|
+
sa: 'sub_account_i_ds',
|
|
12
|
+
a: 'assets'
|
|
13
|
+
}
|
|
14
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.API_GET_SUB_ACCOUNT_POSITION_SUMMARY_RESPONSE_MAP = void 0;
|
|
4
|
+
const sub_account_position_summary_result_1 = require("./sub_account_position_summary_result");
|
|
5
|
+
// Schema map for the 'API_GET_SUB_ACCOUNT_POSITION_SUMMARY_RESPONSE' struct.
|
|
6
|
+
exports.API_GET_SUB_ACCOUNT_POSITION_SUMMARY_RESPONSE_MAP = Object.freeze({
|
|
7
|
+
FULL_TO_LITE: {
|
|
8
|
+
result: ['r', [sub_account_position_summary_result_1.SUB_ACCOUNT_POSITION_SUMMARY_RESULT_MAP.FULL_TO_LITE]]
|
|
9
|
+
},
|
|
10
|
+
LITE_TO_FULL: {
|
|
11
|
+
r: ['result', [sub_account_position_summary_result_1.SUB_ACCOUNT_POSITION_SUMMARY_RESULT_MAP.LITE_TO_FULL]]
|
|
12
|
+
}
|
|
13
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.API_GET_SUPPORTED_ASSETS_RESPONSE_MAP = void 0;
|
|
4
|
+
const supported_asset_1 = require("./supported_asset");
|
|
5
|
+
const futures_wallet_assets_1 = require("./futures_wallet_assets");
|
|
6
|
+
// Schema map for the 'API_GET_SUPPORTED_ASSETS_RESPONSE' struct.
|
|
7
|
+
exports.API_GET_SUPPORTED_ASSETS_RESPONSE_MAP = Object.freeze({
|
|
8
|
+
FULL_TO_LITE: {
|
|
9
|
+
funding: ['f', [supported_asset_1.SUPPORTED_ASSET_MAP.FULL_TO_LITE]],
|
|
10
|
+
spot: ['s', [supported_asset_1.SUPPORTED_ASSET_MAP.FULL_TO_LITE]],
|
|
11
|
+
futures: ['f1', [futures_wallet_assets_1.FUTURES_WALLET_ASSETS_MAP.FULL_TO_LITE]]
|
|
12
|
+
},
|
|
13
|
+
LITE_TO_FULL: {
|
|
14
|
+
f: ['funding', [supported_asset_1.SUPPORTED_ASSET_MAP.LITE_TO_FULL]],
|
|
15
|
+
s: ['spot', [supported_asset_1.SUPPORTED_ASSET_MAP.LITE_TO_FULL]],
|
|
16
|
+
f1: ['futures', [futures_wallet_assets_1.FUTURES_WALLET_ASSETS_MAP.LITE_TO_FULL]]
|
|
17
|
+
}
|
|
18
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.API_LIST_ACCOUNT_MULTIPLIER_WITH_OVERRIDE_RESPONSE_MAP = void 0;
|
|
4
|
+
const account_with_overridden_multiplier_info_1 = require("./account_with_overridden_multiplier_info");
|
|
5
|
+
// Schema map for the 'API_LIST_ACCOUNT_MULTIPLIER_WITH_OVERRIDE_RESPONSE' struct.
|
|
6
|
+
exports.API_LIST_ACCOUNT_MULTIPLIER_WITH_OVERRIDE_RESPONSE_MAP = Object.freeze({
|
|
7
|
+
FULL_TO_LITE: {
|
|
8
|
+
result: ['r', [account_with_overridden_multiplier_info_1.ACCOUNT_WITH_OVERRIDDEN_MULTIPLIER_INFO_MAP.FULL_TO_LITE]]
|
|
9
|
+
},
|
|
10
|
+
LITE_TO_FULL: {
|
|
11
|
+
r: ['result', [account_with_overridden_multiplier_info_1.ACCOUNT_WITH_OVERRIDDEN_MULTIPLIER_INFO_MAP.LITE_TO_FULL]]
|
|
12
|
+
}
|
|
13
|
+
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.API_LOCK_ACCOUNT_MULTIPLIER_REQUEST_MAP = void 0;
|
|
4
|
+
// Schema map for the 'API_LOCK_ACCOUNT_MULTIPLIER_REQUEST' struct.
|
|
5
|
+
exports.API_LOCK_ACCOUNT_MULTIPLIER_REQUEST_MAP = Object.freeze({
|
|
6
|
+
FULL_TO_LITE: {
|
|
7
|
+
off_chain_account_id: 'oc',
|
|
8
|
+
apply_to_direct_referrals: 'at'
|
|
9
|
+
},
|
|
10
|
+
LITE_TO_FULL: {
|
|
11
|
+
oc: 'off_chain_account_id',
|
|
12
|
+
at: 'apply_to_direct_referrals'
|
|
13
|
+
}
|
|
14
|
+
});
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.API_POSITION_HISTORY_MAP = void 0;
|
|
4
|
+
// Schema map for the 'API_POSITION_HISTORY' struct.
|
|
5
|
+
exports.API_POSITION_HISTORY_MAP = Object.freeze({
|
|
6
|
+
FULL_TO_LITE: {
|
|
7
|
+
sub_account_id: 'sa',
|
|
8
|
+
instrument: 'i',
|
|
9
|
+
open_time: 'ot',
|
|
10
|
+
status: 's',
|
|
11
|
+
is_long: 'il',
|
|
12
|
+
margin_type: 'mt',
|
|
13
|
+
close_time: 'ct',
|
|
14
|
+
entry_price: 'ep',
|
|
15
|
+
exit_price: 'ep1',
|
|
16
|
+
position_close_mark_price: 'pc',
|
|
17
|
+
realized_pnl: 'rp',
|
|
18
|
+
cumulative_fee: 'cf',
|
|
19
|
+
cumulative_realized_funding_payment: 'cr',
|
|
20
|
+
closed_volume_base: 'cv',
|
|
21
|
+
closed_volume_quote: 'cv1',
|
|
22
|
+
max_open_interest_base: 'mo',
|
|
23
|
+
max_open_interest_quote: 'mo1',
|
|
24
|
+
cumulative_initial_margin: 'ci',
|
|
25
|
+
max_initial_margin: 'mi',
|
|
26
|
+
leverage: 'l',
|
|
27
|
+
unrealized_pnl: 'up'
|
|
28
|
+
},
|
|
29
|
+
LITE_TO_FULL: {
|
|
30
|
+
sa: 'sub_account_id',
|
|
31
|
+
i: 'instrument',
|
|
32
|
+
ot: 'open_time',
|
|
33
|
+
s: 'status',
|
|
34
|
+
il: 'is_long',
|
|
35
|
+
mt: 'margin_type',
|
|
36
|
+
ct: 'close_time',
|
|
37
|
+
ep: 'entry_price',
|
|
38
|
+
ep1: 'exit_price',
|
|
39
|
+
pc: 'position_close_mark_price',
|
|
40
|
+
rp: 'realized_pnl',
|
|
41
|
+
cf: 'cumulative_fee',
|
|
42
|
+
cr: 'cumulative_realized_funding_payment',
|
|
43
|
+
cv: 'closed_volume_base',
|
|
44
|
+
cv1: 'closed_volume_quote',
|
|
45
|
+
mo: 'max_open_interest_base',
|
|
46
|
+
mo1: 'max_open_interest_quote',
|
|
47
|
+
ci: 'cumulative_initial_margin',
|
|
48
|
+
mi: 'max_initial_margin',
|
|
49
|
+
l: 'leverage',
|
|
50
|
+
up: 'unrealized_pnl'
|
|
51
|
+
}
|
|
52
|
+
});
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.API_POSITION_HISTORY_REQUEST_MAP = void 0;
|
|
4
|
+
// Schema map for the 'API_POSITION_HISTORY_REQUEST' struct.
|
|
5
|
+
exports.API_POSITION_HISTORY_REQUEST_MAP = Object.freeze({
|
|
6
|
+
FULL_TO_LITE: {
|
|
7
|
+
sub_account_id: 'sa',
|
|
8
|
+
start_time: 'st',
|
|
9
|
+
end_time: 'et',
|
|
10
|
+
kind: 'k',
|
|
11
|
+
base: 'b',
|
|
12
|
+
quote: 'q',
|
|
13
|
+
limit: 'l',
|
|
14
|
+
cursor: 'c',
|
|
15
|
+
status: 's',
|
|
16
|
+
is_long: 'il',
|
|
17
|
+
is_short: 'is',
|
|
18
|
+
margin_type: 'mt'
|
|
19
|
+
},
|
|
20
|
+
LITE_TO_FULL: {
|
|
21
|
+
sa: 'sub_account_id',
|
|
22
|
+
st: 'start_time',
|
|
23
|
+
et: 'end_time',
|
|
24
|
+
k: 'kind',
|
|
25
|
+
b: 'base',
|
|
26
|
+
q: 'quote',
|
|
27
|
+
l: 'limit',
|
|
28
|
+
c: 'cursor',
|
|
29
|
+
s: 'status',
|
|
30
|
+
il: 'is_long',
|
|
31
|
+
is: 'is_short',
|
|
32
|
+
mt: 'margin_type'
|
|
33
|
+
}
|
|
34
|
+
});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.API_POSITION_HISTORY_RESPONSE_MAP = void 0;
|
|
4
|
+
const api_position_history_1 = require("./api_position_history");
|
|
5
|
+
// Schema map for the 'API_POSITION_HISTORY_RESPONSE' struct.
|
|
6
|
+
exports.API_POSITION_HISTORY_RESPONSE_MAP = Object.freeze({
|
|
7
|
+
FULL_TO_LITE: {
|
|
8
|
+
result: ['r', [api_position_history_1.API_POSITION_HISTORY_MAP.FULL_TO_LITE]],
|
|
9
|
+
next: 'n'
|
|
10
|
+
},
|
|
11
|
+
LITE_TO_FULL: {
|
|
12
|
+
r: ['result', [api_position_history_1.API_POSITION_HISTORY_MAP.LITE_TO_FULL]],
|
|
13
|
+
n: 'next'
|
|
14
|
+
}
|
|
15
|
+
});
|
|
@@ -7,12 +7,14 @@ exports.API_QUERY_LIST_SUB_ACCOUNT_SUMMARY_REQUEST_MAP = Object.freeze({
|
|
|
7
7
|
time_interval: 'ti',
|
|
8
8
|
sub_account_id: 'sa',
|
|
9
9
|
start_time: 'st',
|
|
10
|
-
end_time: 'et'
|
|
10
|
+
end_time: 'et',
|
|
11
|
+
sub_account_i_ds: 'sa1'
|
|
11
12
|
},
|
|
12
13
|
LITE_TO_FULL: {
|
|
13
14
|
ti: 'time_interval',
|
|
14
15
|
sa: 'sub_account_id',
|
|
15
16
|
st: 'start_time',
|
|
16
|
-
et: 'end_time'
|
|
17
|
+
et: 'end_time',
|
|
18
|
+
sa1: 'sub_account_i_ds'
|
|
17
19
|
}
|
|
18
20
|
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.API_UNLOCK_ACCOUNT_MULTIPLIER_REQUEST_MAP = void 0;
|
|
4
|
+
// Schema map for the 'API_UNLOCK_ACCOUNT_MULTIPLIER_REQUEST' struct.
|
|
5
|
+
exports.API_UNLOCK_ACCOUNT_MULTIPLIER_REQUEST_MAP = Object.freeze({
|
|
6
|
+
FULL_TO_LITE: {
|
|
7
|
+
off_chain_account_id: 'oc'
|
|
8
|
+
},
|
|
9
|
+
LITE_TO_FULL: {
|
|
10
|
+
oc: 'off_chain_account_id'
|
|
11
|
+
}
|
|
12
|
+
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.API_UPDATE_ACCOUNT_MULTIPLIER_LOCK_FLAGS_REQUEST_MAP = void 0;
|
|
4
|
+
// Schema map for the 'API_UPDATE_ACCOUNT_MULTIPLIER_LOCK_FLAGS_REQUEST' struct.
|
|
5
|
+
exports.API_UPDATE_ACCOUNT_MULTIPLIER_LOCK_FLAGS_REQUEST_MAP = Object.freeze({
|
|
6
|
+
FULL_TO_LITE: {
|
|
7
|
+
off_chain_account_id: 'oc',
|
|
8
|
+
apply_to_direct_referrals: 'at'
|
|
9
|
+
},
|
|
10
|
+
LITE_TO_FULL: {
|
|
11
|
+
oc: 'off_chain_account_id',
|
|
12
|
+
at: 'apply_to_direct_referrals'
|
|
13
|
+
}
|
|
14
|
+
});
|
|
@@ -8,13 +8,17 @@ exports.CLIENT_TIER_MAP = Object.freeze({
|
|
|
8
8
|
futures_taker_fee: 'ft',
|
|
9
9
|
futures_maker_fee: 'fm',
|
|
10
10
|
options_taker_fee: 'ot',
|
|
11
|
-
options_maker_fee: 'om'
|
|
11
|
+
options_maker_fee: 'om',
|
|
12
|
+
spot_taker_fee: 'st',
|
|
13
|
+
spot_maker_fee: 'sm'
|
|
12
14
|
},
|
|
13
15
|
LITE_TO_FULL: {
|
|
14
16
|
t: 'tier',
|
|
15
17
|
ft: 'futures_taker_fee',
|
|
16
18
|
fm: 'futures_maker_fee',
|
|
17
19
|
ot: 'options_taker_fee',
|
|
18
|
-
om: 'options_maker_fee'
|
|
20
|
+
om: 'options_maker_fee',
|
|
21
|
+
st: 'spot_taker_fee',
|
|
22
|
+
sm: 'spot_maker_fee'
|
|
19
23
|
}
|
|
20
24
|
});
|
|
@@ -30,7 +30,8 @@ exports.FILL_MAP = Object.freeze({
|
|
|
30
30
|
source: 's2',
|
|
31
31
|
builder: 'b1',
|
|
32
32
|
builder_fee_rate: 'bf',
|
|
33
|
-
builder_fee: 'bf1'
|
|
33
|
+
builder_fee: 'bf1',
|
|
34
|
+
fee_currency: 'fc'
|
|
34
35
|
},
|
|
35
36
|
LITE_TO_FULL: {
|
|
36
37
|
et: 'event_time',
|
|
@@ -59,6 +60,7 @@ exports.FILL_MAP = Object.freeze({
|
|
|
59
60
|
s2: 'source',
|
|
60
61
|
b1: 'builder',
|
|
61
62
|
bf: 'builder_fee_rate',
|
|
62
|
-
bf1: 'builder_fee'
|
|
63
|
+
bf1: 'builder_fee',
|
|
64
|
+
fc: 'fee_currency'
|
|
63
65
|
}
|
|
64
66
|
});
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FUNDING_ACCOUNT_POSITION_SUMMARY_RESULT_MAP = void 0;
|
|
4
|
+
// Schema map for the 'FUNDING_ACCOUNT_POSITION_SUMMARY_RESULT' struct.
|
|
5
|
+
exports.FUNDING_ACCOUNT_POSITION_SUMMARY_RESULT_MAP = Object.freeze({
|
|
6
|
+
FULL_TO_LITE: {
|
|
7
|
+
main_account_id: 'ma',
|
|
8
|
+
total_unrealized_pnl: 'tu',
|
|
9
|
+
total_realized_pnl: 'tr'
|
|
10
|
+
},
|
|
11
|
+
LITE_TO_FULL: {
|
|
12
|
+
ma: 'main_account_id',
|
|
13
|
+
tu: 'total_unrealized_pnl',
|
|
14
|
+
tr: 'total_realized_pnl'
|
|
15
|
+
}
|
|
16
|
+
});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FUTURES_WALLET_ASSETS_MAP = void 0;
|
|
4
|
+
const supported_asset_1 = require("./supported_asset");
|
|
5
|
+
// Schema map for the 'FUTURES_WALLET_ASSETS' struct.
|
|
6
|
+
exports.FUTURES_WALLET_ASSETS_MAP = Object.freeze({
|
|
7
|
+
FULL_TO_LITE: {
|
|
8
|
+
mode: 'm',
|
|
9
|
+
supported_assets: ['sa', [supported_asset_1.SUPPORTED_ASSET_MAP.FULL_TO_LITE]]
|
|
10
|
+
},
|
|
11
|
+
LITE_TO_FULL: {
|
|
12
|
+
m: 'mode',
|
|
13
|
+
sa: ['supported_assets', [supported_asset_1.SUPPORTED_ASSET_MAP.LITE_TO_FULL]]
|
|
14
|
+
}
|
|
15
|
+
});
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SUB_ACCOUNT_POSITION_SUMMARY_RESULT_MAP = void 0;
|
|
4
|
+
// Schema map for the 'SUB_ACCOUNT_POSITION_SUMMARY_RESULT' struct.
|
|
5
|
+
exports.SUB_ACCOUNT_POSITION_SUMMARY_RESULT_MAP = Object.freeze({
|
|
6
|
+
FULL_TO_LITE: {
|
|
7
|
+
sub_account_id: 'sa',
|
|
8
|
+
total_unrealized_pnl: 'tu',
|
|
9
|
+
total_realized_pnl: 'tr'
|
|
10
|
+
},
|
|
11
|
+
LITE_TO_FULL: {
|
|
12
|
+
sa: 'sub_account_id',
|
|
13
|
+
tu: 'total_unrealized_pnl',
|
|
14
|
+
tr: 'total_realized_pnl'
|
|
15
|
+
}
|
|
16
|
+
});
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SUPPORTED_ASSET_MAP = void 0;
|
|
4
|
+
// Schema map for the 'SUPPORTED_ASSET' struct.
|
|
5
|
+
exports.SUPPORTED_ASSET_MAP = Object.freeze({
|
|
6
|
+
FULL_TO_LITE: {
|
|
7
|
+
asset_id: 'ai',
|
|
8
|
+
asset_code: 'ac',
|
|
9
|
+
balance_decimals: 'bd'
|
|
10
|
+
},
|
|
11
|
+
LITE_TO_FULL: {
|
|
12
|
+
ai: 'asset_id',
|
|
13
|
+
ac: 'asset_code',
|
|
14
|
+
bd: 'balance_decimals'
|
|
15
|
+
}
|
|
16
|
+
});
|