@grvt/client 1.6.27 → 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 +160 -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 +4 -1
- package/interfaces/codegen/enums/cluster-config-type.js +10 -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/enums/sub-account-mode.d.ts +4 -0
- package/interfaces/codegen/enums/sub-account-mode.js +11 -0
- package/interfaces/codegen/enums/wallet-type.d.ts +6 -0
- package/interfaces/codegen/enums/wallet-type.js +17 -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_all_positions_by_asset_request.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_get_all_positions_by_asset_request.js +12 -0
- package/interfaces/codegen/schema-maps/api_get_all_positions_by_asset_response.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_get_all_positions_by_asset_response.js +13 -0
- 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_spot_balance.js +10 -2
- package/interfaces/codegen/schema-maps/api_spot_sub_account_summary_request.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_spot_sub_account_summary_request.js +12 -0
- package/interfaces/codegen/schema-maps/api_spot_sub_account_summary_response.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_spot_sub_account_summary_response.js +13 -0
- package/interfaces/codegen/schema-maps/api_transfer_request.js +6 -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/mini_position.d.ts +2 -0
- package/interfaces/codegen/schema-maps/mini_position.js +26 -0
- package/interfaces/codegen/schema-maps/snap_spot_sub_account.d.ts +2 -0
- package/interfaces/codegen/schema-maps/snap_spot_sub_account.js +19 -0
- package/interfaces/codegen/schema-maps/snap_sub_account.js +4 -2
- 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,12 +21,14 @@ 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';
|
|
27
28
|
import type { ERewardProgramType } from './enums/reward-program-type.ts';
|
|
28
29
|
import type { ERewardSession } from './enums/reward-session.ts';
|
|
29
30
|
import type { ESource } from './enums/source.ts';
|
|
31
|
+
import type { ESubAccountMode } from './enums/sub-account-mode.ts';
|
|
30
32
|
import type { ESubAccountTradeInterval } from './enums/sub-account-trade-interval.ts';
|
|
31
33
|
import type { ETimeInForce } from './enums/time-in-force.ts';
|
|
32
34
|
import type { ETimeInterval } from './enums/time-interval.ts';
|
|
@@ -38,12 +40,34 @@ import type { EVaultInvestorAction } from './enums/vault-investor-action.ts';
|
|
|
38
40
|
import type { EVaultRedemptionReqAgeCategory } from './enums/vault-redemption-req-age-category.ts';
|
|
39
41
|
import type { EVaultType } from './enums/vault-type.ts';
|
|
40
42
|
import type { EVenue } from './enums/venue.ts';
|
|
43
|
+
import type { EWalletType } from './enums/wallet-type.ts';
|
|
41
44
|
export interface IAPISettlementPrice {
|
|
42
45
|
base?: string;
|
|
43
46
|
quote?: string;
|
|
44
47
|
settlement_time?: string;
|
|
45
48
|
settlement_price?: string;
|
|
46
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
|
+
}
|
|
47
71
|
export interface IAck {
|
|
48
72
|
ack?: boolean;
|
|
49
73
|
}
|
|
@@ -227,6 +251,7 @@ export interface IApiCreateAccountMultiplierRequest {
|
|
|
227
251
|
effective_epoch_start?: number;
|
|
228
252
|
effective_epoch_end?: number;
|
|
229
253
|
reserve_multiplier?: number;
|
|
254
|
+
note?: string;
|
|
230
255
|
}
|
|
231
256
|
export interface IApiCreateAccountMultiplierResponse {
|
|
232
257
|
id?: string;
|
|
@@ -543,6 +568,12 @@ export interface IApiGetAllInstrumentsRequest {
|
|
|
543
568
|
export interface IApiGetAllInstrumentsResponse {
|
|
544
569
|
result?: IInstrumentDisplay[];
|
|
545
570
|
}
|
|
571
|
+
export interface IApiGetAllPositionsByAssetRequest {
|
|
572
|
+
instrument?: string;
|
|
573
|
+
}
|
|
574
|
+
export interface IApiGetAllPositionsByAssetResponse {
|
|
575
|
+
result?: IMiniPosition[];
|
|
576
|
+
}
|
|
546
577
|
export interface IApiGetAuthorizedBuildersResponse {
|
|
547
578
|
results?: IApiAuthorizedBuilder[];
|
|
548
579
|
}
|
|
@@ -562,6 +593,9 @@ export interface IApiGetCurrencyRequest {
|
|
|
562
593
|
export interface IApiGetCurrencyResponse {
|
|
563
594
|
result?: ICurrencyDetail[];
|
|
564
595
|
}
|
|
596
|
+
export interface IApiGetDefaultAccountMultiplierValuesResponse {
|
|
597
|
+
result?: IRewardAccountMultiplier[];
|
|
598
|
+
}
|
|
565
599
|
export interface IApiGetEcosystemLeaderboardRequest {
|
|
566
600
|
calculate_from?: string;
|
|
567
601
|
limit?: number;
|
|
@@ -603,6 +637,13 @@ export interface IApiGetFilteredInstrumentsRequest {
|
|
|
603
637
|
export interface IApiGetFilteredInstrumentsResponse {
|
|
604
638
|
result?: IInstrumentDisplay[];
|
|
605
639
|
}
|
|
640
|
+
export interface IApiGetFundingAccountPositionSummaryRequest {
|
|
641
|
+
main_account_i_ds?: string[];
|
|
642
|
+
assets?: string[];
|
|
643
|
+
}
|
|
644
|
+
export interface IApiGetFundingAccountPositionSummaryResponse {
|
|
645
|
+
result?: IFundingAccountPositionSummaryResult[];
|
|
646
|
+
}
|
|
606
647
|
export interface IApiGetInstrumentRequest {
|
|
607
648
|
instrument?: string;
|
|
608
649
|
}
|
|
@@ -710,9 +751,21 @@ export interface IApiGetPriceProtectionBandsResponse {
|
|
|
710
751
|
export interface IApiGetRewardLeaderboardResponse {
|
|
711
752
|
result?: IApiRewardLeaderboardItem[];
|
|
712
753
|
}
|
|
754
|
+
export interface IApiGetSubAccountPositionSummaryRequest {
|
|
755
|
+
sub_account_i_ds?: string[];
|
|
756
|
+
assets?: string[];
|
|
757
|
+
}
|
|
758
|
+
export interface IApiGetSubAccountPositionSummaryResponse {
|
|
759
|
+
result?: ISubAccountPositionSummaryResult[];
|
|
760
|
+
}
|
|
713
761
|
export interface IApiGetSubAccountsResponse {
|
|
714
762
|
sub_account_ids?: string[];
|
|
715
763
|
}
|
|
764
|
+
export interface IApiGetSupportedAssetsResponse {
|
|
765
|
+
funding?: ISupportedAsset[];
|
|
766
|
+
spot?: ISupportedAsset[];
|
|
767
|
+
futures?: IFuturesWalletAssets[];
|
|
768
|
+
}
|
|
716
769
|
export interface IApiGetTraderStatResponse {
|
|
717
770
|
total_fee?: string;
|
|
718
771
|
}
|
|
@@ -772,6 +825,9 @@ export interface IApiInternalBatchCreateAccountMultiplierRequest {
|
|
|
772
825
|
export interface IApiInternalBatchCreateAccountMultiplierResponse {
|
|
773
826
|
ids?: string[];
|
|
774
827
|
}
|
|
828
|
+
export interface IApiListAccountMultiplierWithOverrideResponse {
|
|
829
|
+
result?: IAccountWithOverriddenMultiplierInfo[];
|
|
830
|
+
}
|
|
775
831
|
export interface IApiListAggregatedAccountSummaryRequest {
|
|
776
832
|
main_account_ids?: string[];
|
|
777
833
|
}
|
|
@@ -801,6 +857,10 @@ export interface IApiLiveFundingRateComparisonRequest {
|
|
|
801
857
|
export interface IApiLiveFundingRateComparisonResponse {
|
|
802
858
|
entries?: ILiveFundingRateComparisonEntry[];
|
|
803
859
|
}
|
|
860
|
+
export interface IApiLockAccountMultiplierRequest {
|
|
861
|
+
off_chain_account_id?: string;
|
|
862
|
+
apply_to_direct_referrals?: boolean;
|
|
863
|
+
}
|
|
804
864
|
export interface IApiMiniTickerRequest {
|
|
805
865
|
instrument?: string;
|
|
806
866
|
}
|
|
@@ -854,6 +914,47 @@ export interface IApiPointInjectionHistoryRequest {
|
|
|
854
914
|
export interface IApiPointInjectionHistoryResponse {
|
|
855
915
|
result?: IPointDistribution[];
|
|
856
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
|
+
}
|
|
857
958
|
export interface IApiPositionTransferRequest {
|
|
858
959
|
maker_order?: IOrder;
|
|
859
960
|
taker_order?: IOrder;
|
|
@@ -939,6 +1040,7 @@ export interface IApiQueryListSubAccountSummaryRequest {
|
|
|
939
1040
|
sub_account_id?: string;
|
|
940
1041
|
start_time?: string;
|
|
941
1042
|
end_time?: string;
|
|
1043
|
+
sub_account_i_ds?: string[];
|
|
942
1044
|
}
|
|
943
1045
|
export interface IApiQueryListSubAccountSummaryResponse {
|
|
944
1046
|
result?: ISnapSubAccountSummary[];
|
|
@@ -1158,6 +1260,12 @@ export interface IApiSocializedLossStatusResponse {
|
|
|
1158
1260
|
is_active?: boolean;
|
|
1159
1261
|
haircut_ratio?: string;
|
|
1160
1262
|
}
|
|
1263
|
+
export interface IApiSpotSubAccountSummaryRequest {
|
|
1264
|
+
sub_account_id?: string;
|
|
1265
|
+
}
|
|
1266
|
+
export interface IApiSpotSubAccountSummaryResponse {
|
|
1267
|
+
result?: ISpotSubAccount;
|
|
1268
|
+
}
|
|
1161
1269
|
export interface IApiSubAccountDailyPerformance {
|
|
1162
1270
|
start_interval?: string;
|
|
1163
1271
|
pnl?: string;
|
|
@@ -1260,10 +1368,19 @@ export interface IApiTransferRequest {
|
|
|
1260
1368
|
signature?: ISignature;
|
|
1261
1369
|
transfer_type?: ETransferType;
|
|
1262
1370
|
transfer_metadata?: string;
|
|
1371
|
+
from_wallet_type?: EWalletType;
|
|
1372
|
+
to_wallet_type?: EWalletType;
|
|
1263
1373
|
}
|
|
1264
1374
|
export interface IApiTransferResponse {
|
|
1265
1375
|
result?: IApiTransferAck;
|
|
1266
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
|
+
}
|
|
1267
1384
|
export interface IApiUserCategoryAffinityScoreRequest {
|
|
1268
1385
|
account_id?: string;
|
|
1269
1386
|
start_time?: string;
|
|
@@ -1531,6 +1648,8 @@ export interface IClientTier {
|
|
|
1531
1648
|
futures_maker_fee?: number;
|
|
1532
1649
|
options_taker_fee?: number;
|
|
1533
1650
|
options_maker_fee?: number;
|
|
1651
|
+
spot_taker_fee?: number;
|
|
1652
|
+
spot_maker_fee?: number;
|
|
1534
1653
|
}
|
|
1535
1654
|
export interface ICrossExchVaultPendingInvestment {
|
|
1536
1655
|
request_time?: string;
|
|
@@ -1727,6 +1846,7 @@ export interface IFill {
|
|
|
1727
1846
|
builder?: string;
|
|
1728
1847
|
builder_fee_rate?: string;
|
|
1729
1848
|
builder_fee?: string;
|
|
1849
|
+
fee_currency?: string;
|
|
1730
1850
|
}
|
|
1731
1851
|
export interface IFlatReferral {
|
|
1732
1852
|
account_id?: string;
|
|
@@ -1741,6 +1861,11 @@ export interface IFlatReferral {
|
|
|
1741
1861
|
kyc_type?: string;
|
|
1742
1862
|
kyc_first_completed_at?: string;
|
|
1743
1863
|
}
|
|
1864
|
+
export interface IFundingAccountPositionSummaryResult {
|
|
1865
|
+
main_account_id?: string;
|
|
1866
|
+
total_unrealized_pnl?: string;
|
|
1867
|
+
total_realized_pnl?: string;
|
|
1868
|
+
}
|
|
1744
1869
|
export interface IFundingAccountSummary {
|
|
1745
1870
|
main_account_id?: string;
|
|
1746
1871
|
total_equity?: string;
|
|
@@ -1766,6 +1891,10 @@ export interface IFundingPayment {
|
|
|
1766
1891
|
amount?: string;
|
|
1767
1892
|
tx_id?: string;
|
|
1768
1893
|
}
|
|
1894
|
+
export interface IFuturesWalletAssets {
|
|
1895
|
+
mode?: ESubAccountMode;
|
|
1896
|
+
supported_assets?: ISupportedAsset[];
|
|
1897
|
+
}
|
|
1769
1898
|
export interface IGetClaimableEcosystemBadgeResponse {
|
|
1770
1899
|
badge?: IEpochBadge;
|
|
1771
1900
|
is_claimable?: boolean;
|
|
@@ -1896,6 +2025,16 @@ export interface IMarginTierResponse {
|
|
|
1896
2025
|
lower_bound?: string;
|
|
1897
2026
|
rate?: string;
|
|
1898
2027
|
}
|
|
2028
|
+
export interface IMiniPosition {
|
|
2029
|
+
sub_account_id?: string;
|
|
2030
|
+
balance?: string;
|
|
2031
|
+
entry_price?: string;
|
|
2032
|
+
cumulative_realized_pnl?: string;
|
|
2033
|
+
cumulative_realized_funding_payment?: string;
|
|
2034
|
+
margin_type?: EPositionMarginType;
|
|
2035
|
+
leverage?: string;
|
|
2036
|
+
position_balance?: string;
|
|
2037
|
+
}
|
|
1899
2038
|
export interface IMiniTicker {
|
|
1900
2039
|
event_time?: string;
|
|
1901
2040
|
instrument?: string;
|
|
@@ -2276,6 +2415,16 @@ export interface ISpotBalance {
|
|
|
2276
2415
|
currency?: string;
|
|
2277
2416
|
balance?: string;
|
|
2278
2417
|
index_price?: string;
|
|
2418
|
+
entry_price?: string;
|
|
2419
|
+
realized_pnl?: string;
|
|
2420
|
+
unrealized_pnl?: string;
|
|
2421
|
+
available_to_transfer?: string;
|
|
2422
|
+
}
|
|
2423
|
+
export interface ISpotSubAccount {
|
|
2424
|
+
event_time?: string;
|
|
2425
|
+
sub_account_id?: string;
|
|
2426
|
+
total_equity?: string;
|
|
2427
|
+
spot_balances?: ISpotBalance[];
|
|
2279
2428
|
}
|
|
2280
2429
|
export interface IStreamReference {
|
|
2281
2430
|
stream?: string;
|
|
@@ -2300,6 +2449,7 @@ export interface ISubAccount {
|
|
|
2300
2449
|
derisk_to_maintenance_margin_ratio?: string;
|
|
2301
2450
|
total_cross_equity?: string;
|
|
2302
2451
|
cross_unrealized_pnl?: string;
|
|
2452
|
+
sub_account_mode?: ESubAccountMode;
|
|
2303
2453
|
}
|
|
2304
2454
|
export interface ISubAccountPerformance {
|
|
2305
2455
|
start_interval?: string;
|
|
@@ -2310,6 +2460,11 @@ export interface ISubAccountPerformance {
|
|
|
2310
2460
|
net_transfer?: string;
|
|
2311
2461
|
currency?: number;
|
|
2312
2462
|
}
|
|
2463
|
+
export interface ISubAccountPositionSummaryResult {
|
|
2464
|
+
sub_account_id?: string;
|
|
2465
|
+
total_unrealized_pnl?: string;
|
|
2466
|
+
total_realized_pnl?: string;
|
|
2467
|
+
}
|
|
2313
2468
|
export interface ISubAccountTradingPerformance {
|
|
2314
2469
|
start_interval?: string;
|
|
2315
2470
|
sub_account_id?: string;
|
|
@@ -2323,6 +2478,11 @@ export interface ISubAccountTradingPerformance {
|
|
|
2323
2478
|
funding_payment_amount?: string;
|
|
2324
2479
|
filled_order_count?: string;
|
|
2325
2480
|
}
|
|
2481
|
+
export interface ISupportedAsset {
|
|
2482
|
+
asset_id?: number;
|
|
2483
|
+
asset_code?: string;
|
|
2484
|
+
balance_decimals?: number;
|
|
2485
|
+
}
|
|
2326
2486
|
export interface ITPSLOrderMetadata {
|
|
2327
2487
|
trigger_by?: ETriggerBy;
|
|
2328
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
|
});
|
|
@@ -76,6 +76,9 @@ export declare enum EClusterConfigType {
|
|
|
76
76
|
FLAG_FIX_NLSA_TRANSFER_AVAIL_BAL_CHECK = "FLAG_FIX_NLSA_TRANSFER_AVAIL_BAL_CHECK",
|
|
77
77
|
FLAG_ENABLE_ISOLATED_INCREASE_MAX_ADDABLE = "FLAG_ENABLE_ISOLATED_INCREASE_MAX_ADDABLE",
|
|
78
78
|
FLAG_CANCEL_ON_DISCONNECT = "FLAG_CANCEL_ON_DISCONNECT",
|
|
79
|
-
FLAG_SPLIT_TPSL = "FLAG_SPLIT_TPSL"
|
|
79
|
+
FLAG_SPLIT_TPSL = "FLAG_SPLIT_TPSL",
|
|
80
|
+
FLAG_SPOT_TRADING = "FLAG_SPOT_TRADING",
|
|
81
|
+
FLAG_SNAPSHOT_CURRENCY_STORE_FIRST = "FLAG_SNAPSHOT_CURRENCY_STORE_FIRST",
|
|
82
|
+
FLAG_ENABLE_POSITION_HISTORY = "FLAG_ENABLE_POSITION_HISTORY"
|
|
80
83
|
}
|
|
81
84
|
export declare const EClusterConfigTypeInt: Record<EClusterConfigType, number>;
|
|
@@ -159,6 +159,12 @@ var EClusterConfigType;
|
|
|
159
159
|
EClusterConfigType["FLAG_CANCEL_ON_DISCONNECT"] = "FLAG_CANCEL_ON_DISCONNECT";
|
|
160
160
|
// Flag to control split TPSL support
|
|
161
161
|
EClusterConfigType["FLAG_SPLIT_TPSL"] = "FLAG_SPLIT_TPSL";
|
|
162
|
+
// Flag to enable spot trading
|
|
163
|
+
EClusterConfigType["FLAG_SPOT_TRADING"] = "FLAG_SPOT_TRADING";
|
|
164
|
+
// Flag to dump currency store first in snapshot, ensuring gateway rehydrates currency store before other state
|
|
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";
|
|
162
168
|
})(EClusterConfigType || (exports.EClusterConfigType = EClusterConfigType = {}));
|
|
163
169
|
exports.EClusterConfigTypeInt = Object.freeze({
|
|
164
170
|
[EClusterConfigType.CLIENT_TIER]: 1,
|
|
@@ -238,5 +244,8 @@ exports.EClusterConfigTypeInt = Object.freeze({
|
|
|
238
244
|
[EClusterConfigType.FLAG_FIX_NLSA_TRANSFER_AVAIL_BAL_CHECK]: 75,
|
|
239
245
|
[EClusterConfigType.FLAG_ENABLE_ISOLATED_INCREASE_MAX_ADDABLE]: 76,
|
|
240
246
|
[EClusterConfigType.FLAG_CANCEL_ON_DISCONNECT]: 77,
|
|
241
|
-
[EClusterConfigType.FLAG_SPLIT_TPSL]: 78
|
|
247
|
+
[EClusterConfigType.FLAG_SPLIT_TPSL]: 78,
|
|
248
|
+
[EClusterConfigType.FLAG_SPOT_TRADING]: 79,
|
|
249
|
+
[EClusterConfigType.FLAG_SNAPSHOT_CURRENCY_STORE_FIRST]: 80,
|
|
250
|
+
[EClusterConfigType.FLAG_ENABLE_POSITION_HISTORY]: 81
|
|
242
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,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ESubAccountModeInt = exports.ESubAccountMode = void 0;
|
|
4
|
+
var ESubAccountMode;
|
|
5
|
+
(function (ESubAccountMode) {
|
|
6
|
+
// Single asset mode: the subaccount is only allowed to hold one asset as collateral
|
|
7
|
+
ESubAccountMode["SINGLE_ASSET_MODE"] = "SINGLE_ASSET_MODE";
|
|
8
|
+
})(ESubAccountMode || (exports.ESubAccountMode = ESubAccountMode = {}));
|
|
9
|
+
exports.ESubAccountModeInt = Object.freeze({
|
|
10
|
+
[ESubAccountMode.SINGLE_ASSET_MODE]: 1
|
|
11
|
+
});
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EWalletTypeInt = exports.EWalletType = void 0;
|
|
4
|
+
var EWalletType;
|
|
5
|
+
(function (EWalletType) {
|
|
6
|
+
// Funding wallet
|
|
7
|
+
EWalletType["FUNDING"] = "FUNDING";
|
|
8
|
+
// Spot wallet
|
|
9
|
+
EWalletType["SPOT"] = "SPOT";
|
|
10
|
+
// Futures wallet
|
|
11
|
+
EWalletType["FUTURES"] = "FUTURES";
|
|
12
|
+
})(EWalletType || (exports.EWalletType = EWalletType = {}));
|
|
13
|
+
exports.EWalletTypeInt = Object.freeze({
|
|
14
|
+
[EWalletType.FUNDING]: 1,
|
|
15
|
+
[EWalletType.SPOT]: 2,
|
|
16
|
+
[EWalletType.FUTURES]: 3
|
|
17
|
+
});
|
|
@@ -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
|
+
});
|