@grvt/client 1.6.6 → 1.6.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/TDG/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { AxiosRequestConfig } from 'axios';
|
|
2
|
-
import type { IAckResponse, IApiAggregatedAccountSummaryResponse, IApiCancelAllOrdersRequest, IApiCancelAllOrdersResponse, IApiCancelOrderRequest, IApiCancelOrderResponse, IApiCreateBulkOrdersRequest, IApiCreateBulkOrdersResponse, IApiCreateOrderRequest, IApiCreateOrderResponse, IApiCrossExchVaultAttestEquityRequest, IApiCrossExchVaultGetInvestorAllocationStatsResponse, IApiCrossExchVaultInvestCancelRequest, IApiCrossExchVaultLockRequest, IApiCrossExchVaultPreInternalTransferCheckRequest, IApiCrossExchVaultPreInternalTransferCheckResponse, IApiCrossExchVaultPreWithdrawCheckRequest, IApiCrossExchVaultPreWithdrawCheckResponse, IApiCrossExchVaultTriggerRedemptionRequest, IApiCrossExchVaultUnlockRequest, IApiCrossExchVaultViewInvestmentQueueRequest, IApiCrossExchVaultViewInvestmentQueueResponse, IApiCrossExchVaultViewPendingInvestmentRequest, IApiCrossExchVaultViewPendingInvestmentResponse, IApiDedustPositionRequest, IApiDedustPositionResponse, IApiDepositHistoryRequest, IApiDepositHistoryResponse, IApiFillHistoryRequest, IApiFillHistoryResponse, IApiFundingAccountSummaryResponse, IApiFundingPaymentHistoryRequest, IApiFundingPaymentHistoryResponse, IApiGetAllInitialLeverageRequest, IApiGetAllInitialLeverageResponse, IApiGetMarginTiersResponse, IApiGetOrderGroupRequest, IApiGetOrderGroupResponse, IApiGetOrderRequest, IApiGetOrderResponse, IApiOpenOrdersRequest, IApiOpenOrdersResponse, IApiOrderHistoryRequest, IApiOrderHistoryResponse, IApiPositionsRequest, IApiPositionsResponse, IApiPreDepositCheckRequest, IApiPreDepositCheckResponse, IApiPreOrderCheckRequest, IApiPreOrderCheckResponse, IApiQueryListFundingAccountSummaryRequest, IApiQueryListFundingAccountSummaryResponse, IApiQueryListSubAccountSummaryRequest, IApiQueryListSubAccountSummaryResponse, IApiQueryTradingPerformanceRequest, IApiQueryTradingPerformanceResponse, IApiQueryTradingPerformanceTrendRequest, IApiQueryTradingPerformanceTrendResponse, IApiQueryVaultInvestorHistoryRequest, IApiQueryVaultInvestorHistoryResponse, IApiQueryVaultManagerInvestorHistoryRequest, IApiQueryVaultManagerInvestorHistoryResponse, IApiReplaceOrdersRequest, IApiReplaceOrdersResponse, IApiSetInitialLeverageRequest, IApiSetInitialLeverageResponse, 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, IApiAggregatedAccountSummaryResponse, IApiCancelAllOrdersRequest, IApiCancelAllOrdersResponse, IApiCancelOrderRequest, IApiCancelOrderResponse, IApiCreateBulkOrdersRequest, IApiCreateBulkOrdersResponse, IApiCreateOrderRequest, IApiCreateOrderResponse, IApiCrossExchVaultAttestEquityRequest, IApiCrossExchVaultGetInvestorAllocationStatsResponse, IApiCrossExchVaultInvestCancelRequest, IApiCrossExchVaultLockRequest, IApiCrossExchVaultPreInternalTransferCheckRequest, IApiCrossExchVaultPreInternalTransferCheckResponse, IApiCrossExchVaultPreWithdrawCheckRequest, IApiCrossExchVaultPreWithdrawCheckResponse, IApiCrossExchVaultTriggerRedemptionRequest, IApiCrossExchVaultUnlockRequest, IApiCrossExchVaultViewInvestmentQueueRequest, IApiCrossExchVaultViewInvestmentQueueResponse, IApiCrossExchVaultViewPendingInvestmentRequest, IApiCrossExchVaultViewPendingInvestmentResponse, IApiDedustPositionRequest, IApiDedustPositionResponse, IApiDepositHistoryRequest, IApiDepositHistoryResponse, IApiFillHistoryRequest, IApiFillHistoryResponse, IApiFundingAccountSummaryResponse, IApiFundingPaymentHistoryRequest, IApiFundingPaymentHistoryResponse, IApiGetAllInitialLeverageRequest, IApiGetAllInitialLeverageResponse, IApiGetMarginTiersResponse, IApiGetOrderGroupRequest, IApiGetOrderGroupResponse, IApiGetOrderRequest, IApiGetOrderResponse, IApiGetPriceProtectionBandsResponse, IApiOpenOrdersRequest, IApiOpenOrdersResponse, IApiOrderHistoryRequest, IApiOrderHistoryResponse, IApiPositionsRequest, IApiPositionsResponse, IApiPreDepositCheckRequest, IApiPreDepositCheckResponse, IApiPreOrderCheckRequest, IApiPreOrderCheckResponse, IApiQueryListFundingAccountSummaryRequest, IApiQueryListFundingAccountSummaryResponse, IApiQueryListSubAccountSummaryRequest, IApiQueryListSubAccountSummaryResponse, IApiQueryTradingPerformanceRequest, IApiQueryTradingPerformanceResponse, IApiQueryTradingPerformanceTrendRequest, IApiQueryTradingPerformanceTrendResponse, IApiQueryVaultInvestorHistoryRequest, IApiQueryVaultInvestorHistoryResponse, IApiQueryVaultManagerInvestorHistoryRequest, IApiQueryVaultManagerInvestorHistoryResponse, IApiReplaceOrdersRequest, IApiReplaceOrdersResponse, IApiSetInitialLeverageRequest, IApiSetInitialLeverageResponse, IApiSocializedLossStatusResponse, IApiSubAccountHistoryRequest, IApiSubAccountHistoryResponse, IApiSubAccountSummaryRequest, IApiSubAccountSummaryResponse, IApiTimedAssetExposureRequest, IApiTimedAssetExposureResponse, IApiTransferHistoryRequest, IApiTransferHistoryResponse, IApiTransferRequest, IApiTransferResponse, IApiVaultBurnTokensRequest, IApiVaultInvestorSummaryRequest, IApiVaultInvestorSummaryResponse, IApiVaultInvestRequest, IApiVaultRedeemCancelRequest, IApiVaultRedeemRequest, IApiVaultViewRedemptionQueueRequest, IApiVaultViewRedemptionQueueResponse, IApiWithdrawalHistoryRequest, IApiWithdrawalHistoryResponse, IApiWithdrawalRequest, IConfig } from '../interfaces';
|
|
3
3
|
export declare class TDG {
|
|
4
4
|
private readonly _axios;
|
|
5
5
|
private readonly _fullUrl;
|
|
@@ -56,6 +56,7 @@ export declare class TDG {
|
|
|
56
56
|
*/
|
|
57
57
|
createOrder(payload: IApiCreateOrderRequest, config?: AxiosRequestConfig): Promise<IApiCreateOrderResponse>;
|
|
58
58
|
createBulkOrders(payload: IApiCreateBulkOrdersRequest, config?: AxiosRequestConfig): Promise<IApiCreateBulkOrdersResponse>;
|
|
59
|
+
getPriceProtectionBands(config?: AxiosRequestConfig): Promise<IApiGetPriceProtectionBandsResponse>;
|
|
59
60
|
preOrderCheck(payload: IApiPreOrderCheckRequest, config?: AxiosRequestConfig): Promise<IApiPreOrderCheckResponse>;
|
|
60
61
|
dedustPosition(payload: IApiDedustPositionRequest, config?: AxiosRequestConfig): Promise<IApiDedustPositionResponse>;
|
|
61
62
|
/**
|
package/TDG/index.js
CHANGED
|
@@ -42,6 +42,7 @@ const api_get_order_group_request_1 = require("../interfaces/codegen/schema-maps
|
|
|
42
42
|
const api_get_order_group_response_1 = require("../interfaces/codegen/schema-maps/api_get_order_group_response");
|
|
43
43
|
const api_get_order_request_1 = require("../interfaces/codegen/schema-maps/api_get_order_request");
|
|
44
44
|
const api_get_order_response_1 = require("../interfaces/codegen/schema-maps/api_get_order_response");
|
|
45
|
+
const api_get_price_protection_bands_response_1 = require("../interfaces/codegen/schema-maps/api_get_price_protection_bands_response");
|
|
45
46
|
const api_open_orders_request_1 = require("../interfaces/codegen/schema-maps/api_open_orders_request");
|
|
46
47
|
const api_open_orders_response_1 = require("../interfaces/codegen/schema-maps/api_open_orders_response");
|
|
47
48
|
const api_order_history_request_1 = require("../interfaces/codegen/schema-maps/api_order_history_request");
|
|
@@ -208,6 +209,11 @@ class TDG {
|
|
|
208
209
|
return utils_1.Utils.schemaMap(response.data, api_create_bulk_orders_response_1.API_CREATE_BULK_ORDERS_RESPONSE_MAP.LITE_TO_FULL);
|
|
209
210
|
}).catch(utils_1.Utils.coverApiError);
|
|
210
211
|
}
|
|
212
|
+
getPriceProtectionBands(config) {
|
|
213
|
+
return this._axios.post(this._liteUrl + '/get_price_protection_bands', null, config).then((response) => {
|
|
214
|
+
return utils_1.Utils.schemaMap(response.data, api_get_price_protection_bands_response_1.API_GET_PRICE_PROTECTION_BANDS_RESPONSE_MAP.LITE_TO_FULL);
|
|
215
|
+
}).catch(utils_1.Utils.coverApiError);
|
|
216
|
+
}
|
|
211
217
|
preOrderCheck(payload, config) {
|
|
212
218
|
return this._axios.post(this._liteUrl + '/pre_order_check', utils_1.Utils.schemaMap(payload, api_pre_order_check_request_1.API_PRE_ORDER_CHECK_REQUEST_MAP.FULL_TO_LITE, true), config).then((response) => {
|
|
213
219
|
return utils_1.Utils.schemaMap(response.data, api_pre_order_check_response_1.API_PRE_ORDER_CHECK_RESPONSE_MAP.LITE_TO_FULL);
|
|
@@ -44,6 +44,9 @@ export declare enum EClusterConfigType {
|
|
|
44
44
|
FLAG_ENABLE_SESSION_KEY_PERMISSION_EXTENSION = "FLAG_ENABLE_SESSION_KEY_PERMISSION_EXTENSION",
|
|
45
45
|
FUNDING_V_2 = "FUNDING_V_2",
|
|
46
46
|
FLAG_ALLOW_POST_ONLY_TO_CROSS_ORDERBOOK = "FLAG_ALLOW_POST_ONLY_TO_CROSS_ORDERBOOK",
|
|
47
|
-
FLAG_ENABLE_UPDATE_FUNDING_INFO_FIX = "FLAG_ENABLE_UPDATE_FUNDING_INFO_FIX"
|
|
47
|
+
FLAG_ENABLE_UPDATE_FUNDING_INFO_FIX = "FLAG_ENABLE_UPDATE_FUNDING_INFO_FIX",
|
|
48
|
+
FLAG_DISABLE_MARKET_DATA_FUNDING_TICK_PUBS = "FLAG_DISABLE_MARKET_DATA_FUNDING_TICK_PUBS",
|
|
49
|
+
FLAG_FIX_V_2_REPORTED_FUNDING_PAYMENT = "FLAG_FIX_V_2_REPORTED_FUNDING_PAYMENT",
|
|
50
|
+
FLAG_FIX_TOTAL_VOLUME_CALCULATION = "FLAG_FIX_TOTAL_VOLUME_CALCULATION"
|
|
48
51
|
}
|
|
49
52
|
export declare const EClusterConfigTypeInt: Record<EClusterConfigType, number>;
|
|
@@ -95,6 +95,12 @@ var EClusterConfigType;
|
|
|
95
95
|
EClusterConfigType["FLAG_ALLOW_POST_ONLY_TO_CROSS_ORDERBOOK"] = "FLAG_ALLOW_POST_ONLY_TO_CROSS_ORDERBOOK";
|
|
96
96
|
// Flag to enable update funding info fix
|
|
97
97
|
EClusterConfigType["FLAG_ENABLE_UPDATE_FUNDING_INFO_FIX"] = "FLAG_ENABLE_UPDATE_FUNDING_INFO_FIX";
|
|
98
|
+
// Flag to disable funding-tick publications from marketdata
|
|
99
|
+
EClusterConfigType["FLAG_DISABLE_MARKET_DATA_FUNDING_TICK_PUBS"] = "FLAG_DISABLE_MARKET_DATA_FUNDING_TICK_PUBS";
|
|
100
|
+
// Flag to fix the reported funding payment
|
|
101
|
+
EClusterConfigType["FLAG_FIX_V_2_REPORTED_FUNDING_PAYMENT"] = "FLAG_FIX_V_2_REPORTED_FUNDING_PAYMENT";
|
|
102
|
+
// Flag to fix the total volume calculation
|
|
103
|
+
EClusterConfigType["FLAG_FIX_TOTAL_VOLUME_CALCULATION"] = "FLAG_FIX_TOTAL_VOLUME_CALCULATION";
|
|
98
104
|
})(EClusterConfigType || (exports.EClusterConfigType = EClusterConfigType = {}));
|
|
99
105
|
exports.EClusterConfigTypeInt = Object.freeze({
|
|
100
106
|
[EClusterConfigType.CLIENT_TIER]: 1,
|
|
@@ -142,5 +148,8 @@ exports.EClusterConfigTypeInt = Object.freeze({
|
|
|
142
148
|
[EClusterConfigType.FLAG_ENABLE_SESSION_KEY_PERMISSION_EXTENSION]: 43,
|
|
143
149
|
[EClusterConfigType.FUNDING_V_2]: 44,
|
|
144
150
|
[EClusterConfigType.FLAG_ALLOW_POST_ONLY_TO_CROSS_ORDERBOOK]: 45,
|
|
145
|
-
[EClusterConfigType.FLAG_ENABLE_UPDATE_FUNDING_INFO_FIX]: 46
|
|
151
|
+
[EClusterConfigType.FLAG_ENABLE_UPDATE_FUNDING_INFO_FIX]: 46,
|
|
152
|
+
[EClusterConfigType.FLAG_DISABLE_MARKET_DATA_FUNDING_TICK_PUBS]: 47,
|
|
153
|
+
[EClusterConfigType.FLAG_FIX_V_2_REPORTED_FUNDING_PAYMENT]: 48,
|
|
154
|
+
[EClusterConfigType.FLAG_FIX_TOTAL_VOLUME_CALCULATION]: 49
|
|
146
155
|
});
|