@grvt/client 1.6.11 → 1.6.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/TDG/index.d.ts +2 -2
- package/TDG/index.js +2 -3
- package/interfaces/codegen/data.interface.d.ts +100 -4
- 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/order-reject-reason.d.ts +5 -1
- package/interfaces/codegen/enums/order-reject-reason.js +13 -1
- package/interfaces/codegen/enums/transaction-type.d.ts +2 -1
- package/interfaces/codegen/enums/transaction-type.js +3 -1
- package/interfaces/codegen/hex-string-map.js +3 -0
- package/interfaces/codegen/schema-maps/aggregated_account_performance.js +14 -2
- package/interfaces/codegen/schema-maps/api_account_performance_trend.js +4 -4
- package/interfaces/codegen/schema-maps/api_authorize_builder_request.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_authorize_builder_request.js +21 -0
- package/interfaces/codegen/schema-maps/api_authorized_builder.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_authorized_builder.js +16 -0
- package/interfaces/codegen/schema-maps/api_builder_fill_history_request.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_builder_fill_history_request.js +20 -0
- package/interfaces/codegen/schema-maps/api_builder_fill_history_response.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_builder_fill_history_response.js +15 -0
- package/interfaces/codegen/schema-maps/api_create_account_multiplier_request.js +4 -2
- package/interfaces/codegen/schema-maps/api_get_authorized_builders_response.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_get_authorized_builders_response.js +13 -0
- package/interfaces/codegen/schema-maps/api_get_isolated_position_margin_limits_request.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_get_isolated_position_margin_limits_request.js +14 -0
- package/interfaces/codegen/schema-maps/api_get_isolated_position_margin_limits_response.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_get_isolated_position_margin_limits_response.js +16 -0
- package/interfaces/codegen/schema-maps/{api_query_account_today_performance_request.d.ts → api_query_account_daily_performance_request.d.ts} +1 -1
- package/interfaces/codegen/schema-maps/api_query_account_daily_performance_request.js +14 -0
- package/interfaces/codegen/schema-maps/api_query_account_daily_performance_response.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_query_account_daily_performance_response.js +13 -0
- package/interfaces/codegen/schema-maps/api_query_account_performance_response.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_query_account_performance_response.js +14 -0
- package/interfaces/codegen/schema-maps/api_query_sub_account_daily_performance_request.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_query_sub_account_daily_performance_request.js +16 -0
- package/interfaces/codegen/schema-maps/api_query_sub_account_daily_performance_response.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_query_sub_account_daily_performance_response.js +13 -0
- package/interfaces/codegen/schema-maps/api_set_builder_code_config.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_set_builder_code_config.js +16 -0
- package/interfaces/codegen/schema-maps/api_sub_account_daily_performance.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_sub_account_daily_performance.js +14 -0
- package/interfaces/codegen/schema-maps/builder_fill_history.d.ts +2 -0
- package/interfaces/codegen/schema-maps/builder_fill_history.js +32 -0
- package/interfaces/codegen/schema-maps/flat_private_trade.js +8 -2
- package/interfaces/codegen/schema-maps/order.js +6 -2
- package/interfaces/codegen/schema-maps/query_list_sub_account_history_request.js +6 -2
- package/interfaces/codegen/schema-maps/query_list_sub_account_history_response.js +3 -3
- package/interfaces/codegen/schema-maps/reward_account_multiplier.js +4 -2
- package/interfaces/codegen/schema-maps/snap_sub_account_history.d.ts +2 -0
- package/interfaces/codegen/schema-maps/snap_sub_account_history.js +20 -0
- package/package.json +2 -2
- package/interfaces/codegen/schema-maps/api_query_account_today_performance_request.js +0 -8
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, IApiGetPriceProtectionBandsResponse, IApiOpenOrdersRequest, IApiOpenOrdersResponse, IApiOrderHistoryRequest, IApiOrderHistoryResponse, IApiPositionsRequest, IApiPositionsResponse, IApiPreDepositCheckRequest, IApiPreDepositCheckResponse, IApiPreOrderCheckRequest, IApiPreOrderCheckResponse, IApiQueryAccountPerformanceTrendRequest, IApiQueryAccountPerformanceTrendResponse,
|
|
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, IApiQueryAccountPerformanceTrendRequest, IApiQueryAccountPerformanceTrendResponse, IApiQueryAccountTodayPerformanceResponse, IApiQueryListFundingAccountSummaryRequest, IApiQueryListFundingAccountSummaryResponse, IApiQueryListSubAccountSummaryRequest, IApiQueryListSubAccountSummaryResponse, IApiQueryTradingAccountRiskMetricRequest, IApiQueryTradingAccountRiskMetricResponse, IApiQueryTradingPerformanceRequest, IApiQueryTradingPerformanceResponse, IApiQueryTradingPerformanceSummaryRequest, IApiQueryTradingPerformanceSummaryResponse, IApiQueryTradingPerformanceTrendRequest, IApiQueryTradingPerformanceTrendResponse, IApiQueryVaultInvestorHistoryRequest, IApiQueryVaultInvestorHistoryResponse, IApiQueryVaultInvestorHistoryStatsRequest, IApiQueryVaultInvestorHistoryStatsResponse, 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;
|
|
@@ -143,7 +143,7 @@ export declare class TDG {
|
|
|
143
143
|
/**
|
|
144
144
|
* START: Portfolio
|
|
145
145
|
*/
|
|
146
|
-
accountTodayPerformance(
|
|
146
|
+
accountTodayPerformance(config?: AxiosRequestConfig): Promise<IApiQueryAccountTodayPerformanceResponse>;
|
|
147
147
|
accountPerformanceTrend(payload: IApiQueryAccountPerformanceTrendRequest, config?: AxiosRequestConfig): Promise<IApiQueryAccountPerformanceTrendResponse>;
|
|
148
148
|
tradingPerformanceSummary(payload: IApiQueryTradingPerformanceSummaryRequest, config?: AxiosRequestConfig): Promise<IApiQueryTradingPerformanceSummaryResponse>;
|
|
149
149
|
subAccountRiskMetric(payload: IApiQueryTradingAccountRiskMetricRequest, config?: AxiosRequestConfig): Promise<IApiQueryTradingAccountRiskMetricResponse>;
|
package/TDG/index.js
CHANGED
|
@@ -55,7 +55,6 @@ const api_pre_order_check_request_1 = require("../interfaces/codegen/schema-maps
|
|
|
55
55
|
const api_pre_order_check_response_1 = require("../interfaces/codegen/schema-maps/api_pre_order_check_response");
|
|
56
56
|
const api_query_account_performance_trend_request_1 = require("../interfaces/codegen/schema-maps/api_query_account_performance_trend_request");
|
|
57
57
|
const api_query_account_performance_trend_response_1 = require("../interfaces/codegen/schema-maps/api_query_account_performance_trend_response");
|
|
58
|
-
const api_query_account_today_performance_request_1 = require("../interfaces/codegen/schema-maps/api_query_account_today_performance_request");
|
|
59
58
|
const api_query_account_today_performance_response_1 = require("../interfaces/codegen/schema-maps/api_query_account_today_performance_response");
|
|
60
59
|
const api_query_list_funding_account_summary_request_1 = require("../interfaces/codegen/schema-maps/api_query_list_funding_account_summary_request");
|
|
61
60
|
const api_query_list_funding_account_summary_response_1 = require("../interfaces/codegen/schema-maps/api_query_list_funding_account_summary_response");
|
|
@@ -462,8 +461,8 @@ class TDG {
|
|
|
462
461
|
/**
|
|
463
462
|
* START: Portfolio
|
|
464
463
|
*/
|
|
465
|
-
accountTodayPerformance(
|
|
466
|
-
return this._axios.post(this._liteUrl + '/account_today_performance',
|
|
464
|
+
accountTodayPerformance(config) {
|
|
465
|
+
return this._axios.post(this._liteUrl + '/account_today_performance', null, config).then((response) => {
|
|
467
466
|
return utils_1.Utils.schemaMap(response.data, api_query_account_today_performance_response_1.API_QUERY_ACCOUNT_TODAY_PERFORMANCE_RESPONSE_MAP.LITE_TO_FULL);
|
|
468
467
|
}).catch(utils_1.Utils.coverApiError);
|
|
469
468
|
}
|
|
@@ -78,6 +78,12 @@ export interface IAggregatedAccountPerformance {
|
|
|
78
78
|
main_account_id?: string;
|
|
79
79
|
aggregated_pnl?: string;
|
|
80
80
|
investment_pnl?: string;
|
|
81
|
+
equity_start?: string;
|
|
82
|
+
equity_end?: string;
|
|
83
|
+
net_transfer?: string;
|
|
84
|
+
investment_balance_start?: string;
|
|
85
|
+
investment_balance_end?: string;
|
|
86
|
+
net_investment?: string;
|
|
81
87
|
}
|
|
82
88
|
export interface IAggregatedAccountSummary {
|
|
83
89
|
main_account_id?: string;
|
|
@@ -92,8 +98,8 @@ export interface IAggregatedAccountSummary {
|
|
|
92
98
|
}
|
|
93
99
|
export interface IApiAccountPerformanceTrend {
|
|
94
100
|
start_interval?: string;
|
|
95
|
-
end_interval?: string;
|
|
96
101
|
aggregated_pnl?: string;
|
|
102
|
+
investment_pnl?: string;
|
|
97
103
|
}
|
|
98
104
|
export interface IApiAddIsolatedPositionMarginRequest {
|
|
99
105
|
sub_account_id?: string;
|
|
@@ -107,6 +113,18 @@ export interface IApiAddIsolatedPositionMarginResponse {
|
|
|
107
113
|
export interface IApiAggregatedAccountSummaryResponse {
|
|
108
114
|
result?: IAggregatedAccountSummary;
|
|
109
115
|
}
|
|
116
|
+
export interface IApiAuthorizeBuilderRequest {
|
|
117
|
+
main_account_id?: string;
|
|
118
|
+
builder_account_id?: string;
|
|
119
|
+
max_futures_fee_rate?: string;
|
|
120
|
+
max_spot_fee_rate?: string;
|
|
121
|
+
signature?: ISignature;
|
|
122
|
+
}
|
|
123
|
+
export interface IApiAuthorizedBuilder {
|
|
124
|
+
builder_account_id?: string;
|
|
125
|
+
max_futures_fee_rate?: string;
|
|
126
|
+
max_spot_fee_rate?: string;
|
|
127
|
+
}
|
|
110
128
|
export interface IApiBatchQueryVaultDetailRequest {
|
|
111
129
|
vault_i_ds?: string[];
|
|
112
130
|
}
|
|
@@ -125,6 +143,17 @@ export interface IApiBatchQueryVaultRiskMetricRequest {
|
|
|
125
143
|
export interface IApiBatchQueryVaultRiskMetricResponse {
|
|
126
144
|
result?: IVaultRiskMetric[];
|
|
127
145
|
}
|
|
146
|
+
export interface IApiBuilderFillHistoryRequest {
|
|
147
|
+
builder_main_account_id?: string;
|
|
148
|
+
start_time?: string;
|
|
149
|
+
end_time?: string;
|
|
150
|
+
limit?: number;
|
|
151
|
+
cursor?: string;
|
|
152
|
+
}
|
|
153
|
+
export interface IApiBuilderFillHistoryResponse {
|
|
154
|
+
result?: IBuilderFillHistory[];
|
|
155
|
+
next?: string;
|
|
156
|
+
}
|
|
128
157
|
export interface IApiBulkOrdersRequest {
|
|
129
158
|
sub_account_id?: string;
|
|
130
159
|
orders?: IOrder[];
|
|
@@ -193,6 +222,7 @@ export interface IApiCreateAccountMultiplierRequest {
|
|
|
193
222
|
multiplier?: number;
|
|
194
223
|
effective_epoch_start?: number;
|
|
195
224
|
effective_epoch_end?: number;
|
|
225
|
+
reserve_multiplier?: number;
|
|
196
226
|
}
|
|
197
227
|
export interface IApiCreateAccountMultiplierResponse {
|
|
198
228
|
id?: string;
|
|
@@ -500,6 +530,9 @@ export interface IApiGetAllInstrumentsRequest {
|
|
|
500
530
|
export interface IApiGetAllInstrumentsResponse {
|
|
501
531
|
result?: IInstrumentDisplay[];
|
|
502
532
|
}
|
|
533
|
+
export interface IApiGetAuthorizedBuildersResponse {
|
|
534
|
+
results?: IApiAuthorizedBuilder[];
|
|
535
|
+
}
|
|
503
536
|
export interface IApiGetCEVAccessTiersResponse {
|
|
504
537
|
enabled?: boolean;
|
|
505
538
|
tiers?: ICEVAccessTier[];
|
|
@@ -562,6 +595,15 @@ export interface IApiGetInstrumentRequest {
|
|
|
562
595
|
export interface IApiGetInstrumentResponse {
|
|
563
596
|
result?: IInstrumentDisplay;
|
|
564
597
|
}
|
|
598
|
+
export interface IApiGetIsolatedPositionMarginLimitsRequest {
|
|
599
|
+
sub_account_id?: string;
|
|
600
|
+
instrument?: string;
|
|
601
|
+
}
|
|
602
|
+
export interface IApiGetIsolatedPositionMarginLimitsResponse {
|
|
603
|
+
instrument?: string;
|
|
604
|
+
max_addable_amount?: string;
|
|
605
|
+
max_removable_amount?: string;
|
|
606
|
+
}
|
|
565
607
|
export interface IApiGetLPInfoRequest {
|
|
566
608
|
kind?: EKind;
|
|
567
609
|
base?: string;
|
|
@@ -829,6 +871,17 @@ export interface IApiPreOrderCheckRequest {
|
|
|
829
871
|
export interface IApiPreOrderCheckResponse {
|
|
830
872
|
results?: IPreOrderCheckResult[];
|
|
831
873
|
}
|
|
874
|
+
export interface IApiQueryAccountDailyPerformanceRequest {
|
|
875
|
+
start_time?: string;
|
|
876
|
+
end_time?: string;
|
|
877
|
+
}
|
|
878
|
+
export interface IApiQueryAccountDailyPerformanceResponse {
|
|
879
|
+
result?: IApiAccountPerformanceTrend[];
|
|
880
|
+
}
|
|
881
|
+
export interface IApiQueryAccountPerformanceResponse {
|
|
882
|
+
aggregated_pnl?: string;
|
|
883
|
+
investment_pnl?: string;
|
|
884
|
+
}
|
|
832
885
|
export interface IApiQueryAccountPerformanceTrendRequest {
|
|
833
886
|
time_interval?: ETimeInterval;
|
|
834
887
|
start_time?: string;
|
|
@@ -844,8 +897,6 @@ export interface IApiQueryAccountSummaryResponse {
|
|
|
844
897
|
result?: ISnapAccountSummary[];
|
|
845
898
|
next?: string;
|
|
846
899
|
}
|
|
847
|
-
export interface IApiQueryAccountTodayPerformanceRequest {
|
|
848
|
-
}
|
|
849
900
|
export interface IApiQueryAccountTodayPerformanceResponse {
|
|
850
901
|
aggregated_pnl?: string;
|
|
851
902
|
investment_pnl?: string;
|
|
@@ -888,6 +939,14 @@ export interface IApiQuerySnapVaultPositionResponse {
|
|
|
888
939
|
event_time?: string;
|
|
889
940
|
positions?: IPositionSummary[];
|
|
890
941
|
}
|
|
942
|
+
export interface IApiQuerySubAccountDailyPerformanceRequest {
|
|
943
|
+
sub_account_id?: string;
|
|
944
|
+
start_time?: string;
|
|
945
|
+
end_time?: string;
|
|
946
|
+
}
|
|
947
|
+
export interface IApiQuerySubAccountDailyPerformanceResponse {
|
|
948
|
+
result?: IApiSubAccountDailyPerformance[];
|
|
949
|
+
}
|
|
891
950
|
export interface IApiQueryTradingAccountRiskMetricRequest {
|
|
892
951
|
sub_account_id?: string;
|
|
893
952
|
time_interval?: ETimeInterval;
|
|
@@ -999,6 +1058,11 @@ export interface IApiRewardLeaderboardItem {
|
|
|
999
1058
|
rank?: number;
|
|
1000
1059
|
point?: string;
|
|
1001
1060
|
}
|
|
1061
|
+
export interface IApiSetBuilderCodeConfig {
|
|
1062
|
+
enabled?: boolean;
|
|
1063
|
+
max_futures_fee_rate?: string;
|
|
1064
|
+
max_spot_fee_rate?: string;
|
|
1065
|
+
}
|
|
1002
1066
|
export interface IApiSetCEVAccessTiersRequest {
|
|
1003
1067
|
enabled?: boolean;
|
|
1004
1068
|
tiers?: ICEVAccessTier[];
|
|
@@ -1067,6 +1131,10 @@ export interface IApiSocializedLossStatusResponse {
|
|
|
1067
1131
|
is_active?: boolean;
|
|
1068
1132
|
haircut_ratio?: string;
|
|
1069
1133
|
}
|
|
1134
|
+
export interface IApiSubAccountDailyPerformance {
|
|
1135
|
+
start_interval?: string;
|
|
1136
|
+
pnl?: string;
|
|
1137
|
+
}
|
|
1070
1138
|
export interface IApiSubAccountHistoryRequest {
|
|
1071
1139
|
sub_account_id?: string;
|
|
1072
1140
|
start_time?: string;
|
|
@@ -1374,6 +1442,19 @@ export interface IBatchCreateAccountMultiplierElement {
|
|
|
1374
1442
|
multiplier?: number;
|
|
1375
1443
|
metadata?: IRewardAccountMultiplierMetadata;
|
|
1376
1444
|
}
|
|
1445
|
+
export interface IBuilderFillHistory {
|
|
1446
|
+
event_time?: string;
|
|
1447
|
+
off_chain_account_id?: string;
|
|
1448
|
+
instrument?: string;
|
|
1449
|
+
is_buyer?: boolean;
|
|
1450
|
+
is_taker?: boolean;
|
|
1451
|
+
size?: string;
|
|
1452
|
+
price?: string;
|
|
1453
|
+
mark_price?: string;
|
|
1454
|
+
index_price?: string;
|
|
1455
|
+
fee_rate?: string;
|
|
1456
|
+
fee?: string;
|
|
1457
|
+
}
|
|
1377
1458
|
export interface ICEVAccessTier {
|
|
1378
1459
|
idx?: number;
|
|
1379
1460
|
lifetime_trading_volume_range_start?: string;
|
|
@@ -1625,6 +1706,9 @@ export interface IFill {
|
|
|
1625
1706
|
broker?: EBrokerTag;
|
|
1626
1707
|
is_rpi?: boolean;
|
|
1627
1708
|
source?: ESource;
|
|
1709
|
+
builder?: string;
|
|
1710
|
+
builder_fee_rate?: string;
|
|
1711
|
+
builder_fee?: string;
|
|
1628
1712
|
}
|
|
1629
1713
|
export interface IFlatReferral {
|
|
1630
1714
|
account_id?: string;
|
|
@@ -1804,6 +1888,8 @@ export interface IOrder {
|
|
|
1804
1888
|
state?: IOrderState;
|
|
1805
1889
|
is_liquidation?: boolean;
|
|
1806
1890
|
is_derisk?: boolean;
|
|
1891
|
+
builder?: string;
|
|
1892
|
+
builder_fee?: string;
|
|
1807
1893
|
}
|
|
1808
1894
|
export interface IOrderLeg {
|
|
1809
1895
|
instrument?: string;
|
|
@@ -1971,9 +2057,11 @@ export interface IQueryListSubAccountHistoryRequest {
|
|
|
1971
2057
|
sub_account_id?: string;
|
|
1972
2058
|
start_time?: string;
|
|
1973
2059
|
end_time?: string;
|
|
2060
|
+
limit?: number;
|
|
2061
|
+
sort_by_time_desc?: boolean;
|
|
1974
2062
|
}
|
|
1975
2063
|
export interface IQueryListSubAccountHistoryResponse {
|
|
1976
|
-
result?:
|
|
2064
|
+
result?: ISnapSubAccountHistory[];
|
|
1977
2065
|
}
|
|
1978
2066
|
export interface IQueryMainAccountLeaderboardRequest {
|
|
1979
2067
|
limit?: number;
|
|
@@ -2040,6 +2128,7 @@ export interface IRewardAccountMultiplier {
|
|
|
2040
2128
|
create_time?: string;
|
|
2041
2129
|
update_time?: string;
|
|
2042
2130
|
metadata?: IRewardAccountMultiplierMetadata;
|
|
2131
|
+
reserve_multiplier?: number;
|
|
2043
2132
|
}
|
|
2044
2133
|
export interface IRewardAccountMultiplierMetadata {
|
|
2045
2134
|
ambassador_tier?: number;
|
|
@@ -2099,6 +2188,13 @@ export interface ISnapAccountSummary {
|
|
|
2099
2188
|
start_interval?: string;
|
|
2100
2189
|
total_equity?: string;
|
|
2101
2190
|
}
|
|
2191
|
+
export interface ISnapSubAccountHistory {
|
|
2192
|
+
start_interval?: string;
|
|
2193
|
+
sub_account_id?: string;
|
|
2194
|
+
total_equity?: string;
|
|
2195
|
+
unrealized_pnl?: string;
|
|
2196
|
+
is_vault?: boolean;
|
|
2197
|
+
}
|
|
2102
2198
|
export interface ISnapSubAccountSummary {
|
|
2103
2199
|
event_time?: string;
|
|
2104
2200
|
start_interval?: string;
|
|
@@ -60,6 +60,7 @@ export declare enum EClusterConfigType {
|
|
|
60
60
|
FLAG_MM_CHECK_MULTIPLIER = "FLAG_MM_CHECK_MULTIPLIER",
|
|
61
61
|
FLAG_ISOLATED_MARGIN = "FLAG_ISOLATED_MARGIN",
|
|
62
62
|
FLAG_ENABLE_SET_SUB_ACCOUNT_POSITION_MARGIN_CONFIG = "FLAG_ENABLE_SET_SUB_ACCOUNT_POSITION_MARGIN_CONFIG",
|
|
63
|
-
FLAG_ENABLE_ADD_ISOLATED_POSITION_MARGIN = "FLAG_ENABLE_ADD_ISOLATED_POSITION_MARGIN"
|
|
63
|
+
FLAG_ENABLE_ADD_ISOLATED_POSITION_MARGIN = "FLAG_ENABLE_ADD_ISOLATED_POSITION_MARGIN",
|
|
64
|
+
FLAG_BUILDER_CODE = "FLAG_BUILDER_CODE"
|
|
64
65
|
}
|
|
65
66
|
export declare const EClusterConfigTypeInt: Record<EClusterConfigType, number>;
|
|
@@ -127,6 +127,8 @@ var EClusterConfigType;
|
|
|
127
127
|
EClusterConfigType["FLAG_ENABLE_SET_SUB_ACCOUNT_POSITION_MARGIN_CONFIG"] = "FLAG_ENABLE_SET_SUB_ACCOUNT_POSITION_MARGIN_CONFIG";
|
|
128
128
|
// Flag to enable add isolated position margin
|
|
129
129
|
EClusterConfigType["FLAG_ENABLE_ADD_ISOLATED_POSITION_MARGIN"] = "FLAG_ENABLE_ADD_ISOLATED_POSITION_MARGIN";
|
|
130
|
+
// Flag builder code
|
|
131
|
+
EClusterConfigType["FLAG_BUILDER_CODE"] = "FLAG_BUILDER_CODE";
|
|
130
132
|
})(EClusterConfigType || (exports.EClusterConfigType = EClusterConfigType = {}));
|
|
131
133
|
exports.EClusterConfigTypeInt = Object.freeze({
|
|
132
134
|
[EClusterConfigType.CLIENT_TIER]: 1,
|
|
@@ -190,5 +192,6 @@ exports.EClusterConfigTypeInt = Object.freeze({
|
|
|
190
192
|
[EClusterConfigType.FLAG_MM_CHECK_MULTIPLIER]: 59,
|
|
191
193
|
[EClusterConfigType.FLAG_ISOLATED_MARGIN]: 60,
|
|
192
194
|
[EClusterConfigType.FLAG_ENABLE_SET_SUB_ACCOUNT_POSITION_MARGIN_CONFIG]: 61,
|
|
193
|
-
[EClusterConfigType.FLAG_ENABLE_ADD_ISOLATED_POSITION_MARGIN]: 62
|
|
195
|
+
[EClusterConfigType.FLAG_ENABLE_ADD_ISOLATED_POSITION_MARGIN]: 62,
|
|
196
|
+
[EClusterConfigType.FLAG_BUILDER_CODE]: 63
|
|
194
197
|
});
|
|
@@ -37,6 +37,10 @@ export declare enum EOrderRejectReason {
|
|
|
37
37
|
DERISK_NOT_SUPPORTED = "DERISK_NOT_SUPPORTED",
|
|
38
38
|
INVALID_ORDER_TYPE = "INVALID_ORDER_TYPE",
|
|
39
39
|
CURRENCY_NOT_DEFINED = "CURRENCY_NOT_DEFINED",
|
|
40
|
-
INVALID_CHAIN_ID = "INVALID_CHAIN_ID"
|
|
40
|
+
INVALID_CHAIN_ID = "INVALID_CHAIN_ID",
|
|
41
|
+
BUILDER_ORDER_FEE_EXCEED = "BUILDER_ORDER_FEE_EXCEED",
|
|
42
|
+
BUILDER_ORDER_FEE_NEGATIVE = "BUILDER_ORDER_FEE_NEGATIVE",
|
|
43
|
+
BUILDER_ORDER_BUILDER_NOT_AUTHORIZED = "BUILDER_ORDER_BUILDER_NOT_AUTHORIZED",
|
|
44
|
+
BUILDER_ORDER_BUILDER_NOT_EXIST = "BUILDER_ORDER_BUILDER_NOT_EXIST"
|
|
41
45
|
}
|
|
42
46
|
export declare const EOrderRejectReasonInt: Record<EOrderRejectReason, number>;
|
|
@@ -81,6 +81,14 @@ var EOrderRejectReason;
|
|
|
81
81
|
EOrderRejectReason["CURRENCY_NOT_DEFINED"] = "CURRENCY_NOT_DEFINED";
|
|
82
82
|
// the chain ID is invalid
|
|
83
83
|
EOrderRejectReason["INVALID_CHAIN_ID"] = "INVALID_CHAIN_ID";
|
|
84
|
+
// Builder fee exceed the limit
|
|
85
|
+
EOrderRejectReason["BUILDER_ORDER_FEE_EXCEED"] = "BUILDER_ORDER_FEE_EXCEED";
|
|
86
|
+
// Builder fee is below 0
|
|
87
|
+
EOrderRejectReason["BUILDER_ORDER_FEE_NEGATIVE"] = "BUILDER_ORDER_FEE_NEGATIVE";
|
|
88
|
+
// Builder is not an authorized builder for client
|
|
89
|
+
EOrderRejectReason["BUILDER_ORDER_BUILDER_NOT_AUTHORIZED"] = "BUILDER_ORDER_BUILDER_NOT_AUTHORIZED";
|
|
90
|
+
// Builder does not exist
|
|
91
|
+
EOrderRejectReason["BUILDER_ORDER_BUILDER_NOT_EXIST"] = "BUILDER_ORDER_BUILDER_NOT_EXIST";
|
|
84
92
|
})(EOrderRejectReason || (exports.EOrderRejectReason = EOrderRejectReason = {}));
|
|
85
93
|
exports.EOrderRejectReasonInt = Object.freeze({
|
|
86
94
|
[EOrderRejectReason.UNSPECIFIED]: 0,
|
|
@@ -121,5 +129,9 @@ exports.EOrderRejectReasonInt = Object.freeze({
|
|
|
121
129
|
[EOrderRejectReason.DERISK_NOT_SUPPORTED]: 35,
|
|
122
130
|
[EOrderRejectReason.INVALID_ORDER_TYPE]: 36,
|
|
123
131
|
[EOrderRejectReason.CURRENCY_NOT_DEFINED]: 37,
|
|
124
|
-
[EOrderRejectReason.INVALID_CHAIN_ID]: 38
|
|
132
|
+
[EOrderRejectReason.INVALID_CHAIN_ID]: 38,
|
|
133
|
+
[EOrderRejectReason.BUILDER_ORDER_FEE_EXCEED]: 39,
|
|
134
|
+
[EOrderRejectReason.BUILDER_ORDER_FEE_NEGATIVE]: 40,
|
|
135
|
+
[EOrderRejectReason.BUILDER_ORDER_BUILDER_NOT_AUTHORIZED]: 41,
|
|
136
|
+
[EOrderRejectReason.BUILDER_ORDER_BUILDER_NOT_EXIST]: 42
|
|
125
137
|
});
|
|
@@ -50,6 +50,7 @@ export declare enum ETransactionType {
|
|
|
50
50
|
VAULT_CROSS_EXCHANGE_UPDATE = "VAULT_CROSS_EXCHANGE_UPDATE",
|
|
51
51
|
UPDATE_FUNDING_INFO = "UPDATE_FUNDING_INFO",
|
|
52
52
|
SET_SUB_ACCOUNT_POSITION_MARGIN_CONFIG = "SET_SUB_ACCOUNT_POSITION_MARGIN_CONFIG",
|
|
53
|
-
ADD_ISOLATED_POSITION_MARGIN = "ADD_ISOLATED_POSITION_MARGIN"
|
|
53
|
+
ADD_ISOLATED_POSITION_MARGIN = "ADD_ISOLATED_POSITION_MARGIN",
|
|
54
|
+
AUTHORIZE_BUILDER = "AUTHORIZE_BUILDER"
|
|
54
55
|
}
|
|
55
56
|
export declare const ETransactionTypeInt: Record<ETransactionType, number>;
|
|
@@ -55,6 +55,7 @@ var ETransactionType;
|
|
|
55
55
|
ETransactionType["UPDATE_FUNDING_INFO"] = "UPDATE_FUNDING_INFO";
|
|
56
56
|
ETransactionType["SET_SUB_ACCOUNT_POSITION_MARGIN_CONFIG"] = "SET_SUB_ACCOUNT_POSITION_MARGIN_CONFIG";
|
|
57
57
|
ETransactionType["ADD_ISOLATED_POSITION_MARGIN"] = "ADD_ISOLATED_POSITION_MARGIN";
|
|
58
|
+
ETransactionType["AUTHORIZE_BUILDER"] = "AUTHORIZE_BUILDER";
|
|
58
59
|
})(ETransactionType || (exports.ETransactionType = ETransactionType = {}));
|
|
59
60
|
exports.ETransactionTypeInt = Object.freeze({
|
|
60
61
|
[ETransactionType.UNSPECIFIED_1]: 1,
|
|
@@ -108,5 +109,6 @@ exports.ETransactionTypeInt = Object.freeze({
|
|
|
108
109
|
[ETransactionType.VAULT_CROSS_EXCHANGE_UPDATE]: 49,
|
|
109
110
|
[ETransactionType.UPDATE_FUNDING_INFO]: 50,
|
|
110
111
|
[ETransactionType.SET_SUB_ACCOUNT_POSITION_MARGIN_CONFIG]: 51,
|
|
111
|
-
[ETransactionType.ADD_ISOLATED_POSITION_MARGIN]: 52
|
|
112
|
+
[ETransactionType.ADD_ISOLATED_POSITION_MARGIN]: 52,
|
|
113
|
+
[ETransactionType.AUTHORIZE_BUILDER]: 53
|
|
112
114
|
});
|
|
@@ -7,12 +7,24 @@ exports.AGGREGATED_ACCOUNT_PERFORMANCE_MAP = Object.freeze({
|
|
|
7
7
|
start_interval: 'si',
|
|
8
8
|
main_account_id: 'ma',
|
|
9
9
|
aggregated_pnl: 'ap',
|
|
10
|
-
investment_pnl: 'ip'
|
|
10
|
+
investment_pnl: 'ip',
|
|
11
|
+
equity_start: 'es',
|
|
12
|
+
equity_end: 'ee',
|
|
13
|
+
net_transfer: 'nt',
|
|
14
|
+
investment_balance_start: 'ib',
|
|
15
|
+
investment_balance_end: 'ib1',
|
|
16
|
+
net_investment: 'ni'
|
|
11
17
|
},
|
|
12
18
|
LITE_TO_FULL: {
|
|
13
19
|
si: 'start_interval',
|
|
14
20
|
ma: 'main_account_id',
|
|
15
21
|
ap: 'aggregated_pnl',
|
|
16
|
-
ip: 'investment_pnl'
|
|
22
|
+
ip: 'investment_pnl',
|
|
23
|
+
es: 'equity_start',
|
|
24
|
+
ee: 'equity_end',
|
|
25
|
+
nt: 'net_transfer',
|
|
26
|
+
ib: 'investment_balance_start',
|
|
27
|
+
ib1: 'investment_balance_end',
|
|
28
|
+
ni: 'net_investment'
|
|
17
29
|
}
|
|
18
30
|
});
|
|
@@ -5,12 +5,12 @@ exports.API_ACCOUNT_PERFORMANCE_TREND_MAP = void 0;
|
|
|
5
5
|
exports.API_ACCOUNT_PERFORMANCE_TREND_MAP = Object.freeze({
|
|
6
6
|
FULL_TO_LITE: {
|
|
7
7
|
start_interval: 'si',
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
aggregated_pnl: 'ap',
|
|
9
|
+
investment_pnl: 'ip'
|
|
10
10
|
},
|
|
11
11
|
LITE_TO_FULL: {
|
|
12
12
|
si: 'start_interval',
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
ap: 'aggregated_pnl',
|
|
14
|
+
ip: 'investment_pnl'
|
|
15
15
|
}
|
|
16
16
|
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.API_AUTHORIZE_BUILDER_REQUEST_MAP = void 0;
|
|
4
|
+
const signature_1 = require("./signature");
|
|
5
|
+
// Schema map for the 'API_AUTHORIZE_BUILDER_REQUEST' struct.
|
|
6
|
+
exports.API_AUTHORIZE_BUILDER_REQUEST_MAP = Object.freeze({
|
|
7
|
+
FULL_TO_LITE: {
|
|
8
|
+
main_account_id: 'ma',
|
|
9
|
+
builder_account_id: 'ba',
|
|
10
|
+
max_futures_fee_rate: 'mf',
|
|
11
|
+
max_spot_fee_rate: 'ms',
|
|
12
|
+
signature: ['s', signature_1.SIGNATURE_MAP.FULL_TO_LITE]
|
|
13
|
+
},
|
|
14
|
+
LITE_TO_FULL: {
|
|
15
|
+
ma: 'main_account_id',
|
|
16
|
+
ba: 'builder_account_id',
|
|
17
|
+
mf: 'max_futures_fee_rate',
|
|
18
|
+
ms: 'max_spot_fee_rate',
|
|
19
|
+
s: ['signature', signature_1.SIGNATURE_MAP.LITE_TO_FULL]
|
|
20
|
+
}
|
|
21
|
+
});
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.API_AUTHORIZED_BUILDER_MAP = void 0;
|
|
4
|
+
// Schema map for the 'API_AUTHORIZED_BUILDER' struct.
|
|
5
|
+
exports.API_AUTHORIZED_BUILDER_MAP = Object.freeze({
|
|
6
|
+
FULL_TO_LITE: {
|
|
7
|
+
builder_account_id: 'ba',
|
|
8
|
+
max_futures_fee_rate: 'mf',
|
|
9
|
+
max_spot_fee_rate: 'ms'
|
|
10
|
+
},
|
|
11
|
+
LITE_TO_FULL: {
|
|
12
|
+
ba: 'builder_account_id',
|
|
13
|
+
mf: 'max_futures_fee_rate',
|
|
14
|
+
ms: 'max_spot_fee_rate'
|
|
15
|
+
}
|
|
16
|
+
});
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.API_BUILDER_FILL_HISTORY_REQUEST_MAP = void 0;
|
|
4
|
+
// Schema map for the 'API_BUILDER_FILL_HISTORY_REQUEST' struct.
|
|
5
|
+
exports.API_BUILDER_FILL_HISTORY_REQUEST_MAP = Object.freeze({
|
|
6
|
+
FULL_TO_LITE: {
|
|
7
|
+
builder_main_account_id: 'bm',
|
|
8
|
+
start_time: 'st',
|
|
9
|
+
end_time: 'et',
|
|
10
|
+
limit: 'l',
|
|
11
|
+
cursor: 'c'
|
|
12
|
+
},
|
|
13
|
+
LITE_TO_FULL: {
|
|
14
|
+
bm: 'builder_main_account_id',
|
|
15
|
+
st: 'start_time',
|
|
16
|
+
et: 'end_time',
|
|
17
|
+
l: 'limit',
|
|
18
|
+
c: 'cursor'
|
|
19
|
+
}
|
|
20
|
+
});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.API_BUILDER_FILL_HISTORY_RESPONSE_MAP = void 0;
|
|
4
|
+
const builder_fill_history_1 = require("./builder_fill_history");
|
|
5
|
+
// Schema map for the 'API_BUILDER_FILL_HISTORY_RESPONSE' struct.
|
|
6
|
+
exports.API_BUILDER_FILL_HISTORY_RESPONSE_MAP = Object.freeze({
|
|
7
|
+
FULL_TO_LITE: {
|
|
8
|
+
result: ['r', [builder_fill_history_1.BUILDER_FILL_HISTORY_MAP.FULL_TO_LITE]],
|
|
9
|
+
next: 'n'
|
|
10
|
+
},
|
|
11
|
+
LITE_TO_FULL: {
|
|
12
|
+
r: ['result', [builder_fill_history_1.BUILDER_FILL_HISTORY_MAP.LITE_TO_FULL]],
|
|
13
|
+
n: 'next'
|
|
14
|
+
}
|
|
15
|
+
});
|
|
@@ -9,7 +9,8 @@ exports.API_CREATE_ACCOUNT_MULTIPLIER_REQUEST_MAP = Object.freeze({
|
|
|
9
9
|
account_type: 'at',
|
|
10
10
|
multiplier: 'm1',
|
|
11
11
|
effective_epoch_start: 'ee',
|
|
12
|
-
effective_epoch_end: 'ee1'
|
|
12
|
+
effective_epoch_end: 'ee1',
|
|
13
|
+
reserve_multiplier: 'rm'
|
|
13
14
|
},
|
|
14
15
|
LITE_TO_FULL: {
|
|
15
16
|
m: 'metric',
|
|
@@ -17,6 +18,7 @@ exports.API_CREATE_ACCOUNT_MULTIPLIER_REQUEST_MAP = Object.freeze({
|
|
|
17
18
|
at: 'account_type',
|
|
18
19
|
m1: 'multiplier',
|
|
19
20
|
ee: 'effective_epoch_start',
|
|
20
|
-
ee1: 'effective_epoch_end'
|
|
21
|
+
ee1: 'effective_epoch_end',
|
|
22
|
+
rm: 'reserve_multiplier'
|
|
21
23
|
}
|
|
22
24
|
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.API_GET_AUTHORIZED_BUILDERS_RESPONSE_MAP = void 0;
|
|
4
|
+
const api_authorized_builder_1 = require("./api_authorized_builder");
|
|
5
|
+
// Schema map for the 'API_GET_AUTHORIZED_BUILDERS_RESPONSE' struct.
|
|
6
|
+
exports.API_GET_AUTHORIZED_BUILDERS_RESPONSE_MAP = Object.freeze({
|
|
7
|
+
FULL_TO_LITE: {
|
|
8
|
+
results: ['r', [api_authorized_builder_1.API_AUTHORIZED_BUILDER_MAP.FULL_TO_LITE]]
|
|
9
|
+
},
|
|
10
|
+
LITE_TO_FULL: {
|
|
11
|
+
r: ['results', [api_authorized_builder_1.API_AUTHORIZED_BUILDER_MAP.LITE_TO_FULL]]
|
|
12
|
+
}
|
|
13
|
+
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.API_GET_ISOLATED_POSITION_MARGIN_LIMITS_REQUEST_MAP = void 0;
|
|
4
|
+
// Schema map for the 'API_GET_ISOLATED_POSITION_MARGIN_LIMITS_REQUEST' struct.
|
|
5
|
+
exports.API_GET_ISOLATED_POSITION_MARGIN_LIMITS_REQUEST_MAP = Object.freeze({
|
|
6
|
+
FULL_TO_LITE: {
|
|
7
|
+
sub_account_id: 'sa',
|
|
8
|
+
instrument: 'i'
|
|
9
|
+
},
|
|
10
|
+
LITE_TO_FULL: {
|
|
11
|
+
sa: 'sub_account_id',
|
|
12
|
+
i: 'instrument'
|
|
13
|
+
}
|
|
14
|
+
});
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.API_GET_ISOLATED_POSITION_MARGIN_LIMITS_RESPONSE_MAP = void 0;
|
|
4
|
+
// Schema map for the 'API_GET_ISOLATED_POSITION_MARGIN_LIMITS_RESPONSE' struct.
|
|
5
|
+
exports.API_GET_ISOLATED_POSITION_MARGIN_LIMITS_RESPONSE_MAP = Object.freeze({
|
|
6
|
+
FULL_TO_LITE: {
|
|
7
|
+
instrument: 'i',
|
|
8
|
+
max_addable_amount: 'ma',
|
|
9
|
+
max_removable_amount: 'mr'
|
|
10
|
+
},
|
|
11
|
+
LITE_TO_FULL: {
|
|
12
|
+
i: 'instrument',
|
|
13
|
+
ma: 'max_addable_amount',
|
|
14
|
+
mr: 'max_removable_amount'
|
|
15
|
+
}
|
|
16
|
+
});
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { type SchemaPairMap } from './types';
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const API_QUERY_ACCOUNT_DAILY_PERFORMANCE_REQUEST_MAP: SchemaPairMap;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.API_QUERY_ACCOUNT_DAILY_PERFORMANCE_REQUEST_MAP = void 0;
|
|
4
|
+
// Schema map for the 'API_QUERY_ACCOUNT_DAILY_PERFORMANCE_REQUEST' struct.
|
|
5
|
+
exports.API_QUERY_ACCOUNT_DAILY_PERFORMANCE_REQUEST_MAP = Object.freeze({
|
|
6
|
+
FULL_TO_LITE: {
|
|
7
|
+
start_time: 'st',
|
|
8
|
+
end_time: 'et'
|
|
9
|
+
},
|
|
10
|
+
LITE_TO_FULL: {
|
|
11
|
+
st: 'start_time',
|
|
12
|
+
et: 'end_time'
|
|
13
|
+
}
|
|
14
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.API_QUERY_ACCOUNT_DAILY_PERFORMANCE_RESPONSE_MAP = void 0;
|
|
4
|
+
const api_account_performance_trend_1 = require("./api_account_performance_trend");
|
|
5
|
+
// Schema map for the 'API_QUERY_ACCOUNT_DAILY_PERFORMANCE_RESPONSE' struct.
|
|
6
|
+
exports.API_QUERY_ACCOUNT_DAILY_PERFORMANCE_RESPONSE_MAP = Object.freeze({
|
|
7
|
+
FULL_TO_LITE: {
|
|
8
|
+
result: ['r', [api_account_performance_trend_1.API_ACCOUNT_PERFORMANCE_TREND_MAP.FULL_TO_LITE]]
|
|
9
|
+
},
|
|
10
|
+
LITE_TO_FULL: {
|
|
11
|
+
r: ['result', [api_account_performance_trend_1.API_ACCOUNT_PERFORMANCE_TREND_MAP.LITE_TO_FULL]]
|
|
12
|
+
}
|
|
13
|
+
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.API_QUERY_ACCOUNT_PERFORMANCE_RESPONSE_MAP = void 0;
|
|
4
|
+
// Schema map for the 'API_QUERY_ACCOUNT_PERFORMANCE_RESPONSE' struct.
|
|
5
|
+
exports.API_QUERY_ACCOUNT_PERFORMANCE_RESPONSE_MAP = Object.freeze({
|
|
6
|
+
FULL_TO_LITE: {
|
|
7
|
+
aggregated_pnl: 'ap',
|
|
8
|
+
investment_pnl: 'ip'
|
|
9
|
+
},
|
|
10
|
+
LITE_TO_FULL: {
|
|
11
|
+
ap: 'aggregated_pnl',
|
|
12
|
+
ip: 'investment_pnl'
|
|
13
|
+
}
|
|
14
|
+
});
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.API_QUERY_SUB_ACCOUNT_DAILY_PERFORMANCE_REQUEST_MAP = void 0;
|
|
4
|
+
// Schema map for the 'API_QUERY_SUB_ACCOUNT_DAILY_PERFORMANCE_REQUEST' struct.
|
|
5
|
+
exports.API_QUERY_SUB_ACCOUNT_DAILY_PERFORMANCE_REQUEST_MAP = Object.freeze({
|
|
6
|
+
FULL_TO_LITE: {
|
|
7
|
+
sub_account_id: 'sa',
|
|
8
|
+
start_time: 'st',
|
|
9
|
+
end_time: 'et'
|
|
10
|
+
},
|
|
11
|
+
LITE_TO_FULL: {
|
|
12
|
+
sa: 'sub_account_id',
|
|
13
|
+
st: 'start_time',
|
|
14
|
+
et: 'end_time'
|
|
15
|
+
}
|
|
16
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.API_QUERY_SUB_ACCOUNT_DAILY_PERFORMANCE_RESPONSE_MAP = void 0;
|
|
4
|
+
const api_sub_account_daily_performance_1 = require("./api_sub_account_daily_performance");
|
|
5
|
+
// Schema map for the 'API_QUERY_SUB_ACCOUNT_DAILY_PERFORMANCE_RESPONSE' struct.
|
|
6
|
+
exports.API_QUERY_SUB_ACCOUNT_DAILY_PERFORMANCE_RESPONSE_MAP = Object.freeze({
|
|
7
|
+
FULL_TO_LITE: {
|
|
8
|
+
result: ['r', [api_sub_account_daily_performance_1.API_SUB_ACCOUNT_DAILY_PERFORMANCE_MAP.FULL_TO_LITE]]
|
|
9
|
+
},
|
|
10
|
+
LITE_TO_FULL: {
|
|
11
|
+
r: ['result', [api_sub_account_daily_performance_1.API_SUB_ACCOUNT_DAILY_PERFORMANCE_MAP.LITE_TO_FULL]]
|
|
12
|
+
}
|
|
13
|
+
});
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.API_SET_BUILDER_CODE_CONFIG_MAP = void 0;
|
|
4
|
+
// Schema map for the 'API_SET_BUILDER_CODE_CONFIG' struct.
|
|
5
|
+
exports.API_SET_BUILDER_CODE_CONFIG_MAP = Object.freeze({
|
|
6
|
+
FULL_TO_LITE: {
|
|
7
|
+
enabled: 'e',
|
|
8
|
+
max_futures_fee_rate: 'mf',
|
|
9
|
+
max_spot_fee_rate: 'ms'
|
|
10
|
+
},
|
|
11
|
+
LITE_TO_FULL: {
|
|
12
|
+
e: 'enabled',
|
|
13
|
+
mf: 'max_futures_fee_rate',
|
|
14
|
+
ms: 'max_spot_fee_rate'
|
|
15
|
+
}
|
|
16
|
+
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.API_SUB_ACCOUNT_DAILY_PERFORMANCE_MAP = void 0;
|
|
4
|
+
// Schema map for the 'API_SUB_ACCOUNT_DAILY_PERFORMANCE' struct.
|
|
5
|
+
exports.API_SUB_ACCOUNT_DAILY_PERFORMANCE_MAP = Object.freeze({
|
|
6
|
+
FULL_TO_LITE: {
|
|
7
|
+
start_interval: 'si',
|
|
8
|
+
pnl: 'p'
|
|
9
|
+
},
|
|
10
|
+
LITE_TO_FULL: {
|
|
11
|
+
si: 'start_interval',
|
|
12
|
+
p: 'pnl'
|
|
13
|
+
}
|
|
14
|
+
});
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BUILDER_FILL_HISTORY_MAP = void 0;
|
|
4
|
+
// Schema map for the 'BUILDER_FILL_HISTORY' struct.
|
|
5
|
+
exports.BUILDER_FILL_HISTORY_MAP = Object.freeze({
|
|
6
|
+
FULL_TO_LITE: {
|
|
7
|
+
event_time: 'et',
|
|
8
|
+
off_chain_account_id: 'oc',
|
|
9
|
+
instrument: 'i',
|
|
10
|
+
is_buyer: 'ib',
|
|
11
|
+
is_taker: 'it',
|
|
12
|
+
size: 's',
|
|
13
|
+
price: 'p',
|
|
14
|
+
mark_price: 'mp',
|
|
15
|
+
index_price: 'ip',
|
|
16
|
+
fee_rate: 'fr',
|
|
17
|
+
fee: 'f'
|
|
18
|
+
},
|
|
19
|
+
LITE_TO_FULL: {
|
|
20
|
+
et: 'event_time',
|
|
21
|
+
oc: 'off_chain_account_id',
|
|
22
|
+
i: 'instrument',
|
|
23
|
+
ib: 'is_buyer',
|
|
24
|
+
it: 'is_taker',
|
|
25
|
+
s: 'size',
|
|
26
|
+
p: 'price',
|
|
27
|
+
mp: 'mark_price',
|
|
28
|
+
ip: 'index_price',
|
|
29
|
+
fr: 'fee_rate',
|
|
30
|
+
f: 'fee'
|
|
31
|
+
}
|
|
32
|
+
});
|
|
@@ -27,7 +27,10 @@ exports.FILL_MAP = Object.freeze({
|
|
|
27
27
|
signer: 's1',
|
|
28
28
|
broker: 'b',
|
|
29
29
|
is_rpi: 'ir1',
|
|
30
|
-
source: 's2'
|
|
30
|
+
source: 's2',
|
|
31
|
+
builder: 'b1',
|
|
32
|
+
builder_fee_rate: 'bf',
|
|
33
|
+
builder_fee: 'bf1'
|
|
31
34
|
},
|
|
32
35
|
LITE_TO_FULL: {
|
|
33
36
|
et: 'event_time',
|
|
@@ -53,6 +56,9 @@ exports.FILL_MAP = Object.freeze({
|
|
|
53
56
|
s1: 'signer',
|
|
54
57
|
b: 'broker',
|
|
55
58
|
ir1: 'is_rpi',
|
|
56
|
-
s2: 'source'
|
|
59
|
+
s2: 'source',
|
|
60
|
+
b1: 'builder',
|
|
61
|
+
bf: 'builder_fee_rate',
|
|
62
|
+
bf1: 'builder_fee'
|
|
57
63
|
}
|
|
58
64
|
});
|
|
@@ -19,7 +19,9 @@ exports.ORDER_MAP = Object.freeze({
|
|
|
19
19
|
metadata: ['m', order_metadata_1.ORDER_METADATA_MAP.FULL_TO_LITE],
|
|
20
20
|
state: ['s1', order_state_1.ORDER_STATE_MAP.FULL_TO_LITE],
|
|
21
21
|
is_liquidation: 'il',
|
|
22
|
-
is_derisk: 'id'
|
|
22
|
+
is_derisk: 'id',
|
|
23
|
+
builder: 'b',
|
|
24
|
+
builder_fee: 'bf'
|
|
23
25
|
},
|
|
24
26
|
LITE_TO_FULL: {
|
|
25
27
|
oi: 'order_id',
|
|
@@ -33,6 +35,8 @@ exports.ORDER_MAP = Object.freeze({
|
|
|
33
35
|
m: ['metadata', order_metadata_1.ORDER_METADATA_MAP.LITE_TO_FULL],
|
|
34
36
|
s1: ['state', order_state_1.ORDER_STATE_MAP.LITE_TO_FULL],
|
|
35
37
|
il: 'is_liquidation',
|
|
36
|
-
id: 'is_derisk'
|
|
38
|
+
id: 'is_derisk',
|
|
39
|
+
b: 'builder',
|
|
40
|
+
bf: 'builder_fee'
|
|
37
41
|
}
|
|
38
42
|
});
|
|
@@ -6,11 +6,15 @@ exports.QUERY_LIST_SUB_ACCOUNT_HISTORY_REQUEST_MAP = Object.freeze({
|
|
|
6
6
|
FULL_TO_LITE: {
|
|
7
7
|
sub_account_id: 'sa',
|
|
8
8
|
start_time: 'st',
|
|
9
|
-
end_time: 'et'
|
|
9
|
+
end_time: 'et',
|
|
10
|
+
limit: 'l',
|
|
11
|
+
sort_by_time_desc: 'sb'
|
|
10
12
|
},
|
|
11
13
|
LITE_TO_FULL: {
|
|
12
14
|
sa: 'sub_account_id',
|
|
13
15
|
st: 'start_time',
|
|
14
|
-
et: 'end_time'
|
|
16
|
+
et: 'end_time',
|
|
17
|
+
l: 'limit',
|
|
18
|
+
sb: 'sort_by_time_desc'
|
|
15
19
|
}
|
|
16
20
|
});
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.QUERY_LIST_SUB_ACCOUNT_HISTORY_RESPONSE_MAP = void 0;
|
|
4
|
-
const
|
|
4
|
+
const snap_sub_account_history_1 = require("./snap_sub_account_history");
|
|
5
5
|
// Schema map for the 'QUERY_LIST_SUB_ACCOUNT_HISTORY_RESPONSE' struct.
|
|
6
6
|
exports.QUERY_LIST_SUB_ACCOUNT_HISTORY_RESPONSE_MAP = Object.freeze({
|
|
7
7
|
FULL_TO_LITE: {
|
|
8
|
-
result: ['r', [
|
|
8
|
+
result: ['r', [snap_sub_account_history_1.SNAP_SUB_ACCOUNT_HISTORY_MAP.FULL_TO_LITE]]
|
|
9
9
|
},
|
|
10
10
|
LITE_TO_FULL: {
|
|
11
|
-
r: ['result', [
|
|
11
|
+
r: ['result', [snap_sub_account_history_1.SNAP_SUB_ACCOUNT_HISTORY_MAP.LITE_TO_FULL]]
|
|
12
12
|
}
|
|
13
13
|
});
|
|
@@ -16,7 +16,8 @@ exports.REWARD_ACCOUNT_MULTIPLIER_MAP = Object.freeze({
|
|
|
16
16
|
created_by_id: 'cb',
|
|
17
17
|
create_time: 'ct',
|
|
18
18
|
update_time: 'ut',
|
|
19
|
-
metadata: ['m2', reward_account_multiplier_metadata_1.REWARD_ACCOUNT_MULTIPLIER_METADATA_MAP.FULL_TO_LITE]
|
|
19
|
+
metadata: ['m2', reward_account_multiplier_metadata_1.REWARD_ACCOUNT_MULTIPLIER_METADATA_MAP.FULL_TO_LITE],
|
|
20
|
+
reserve_multiplier: 'rm'
|
|
20
21
|
},
|
|
21
22
|
LITE_TO_FULL: {
|
|
22
23
|
i: 'id',
|
|
@@ -30,6 +31,7 @@ exports.REWARD_ACCOUNT_MULTIPLIER_MAP = Object.freeze({
|
|
|
30
31
|
cb: 'created_by_id',
|
|
31
32
|
ct: 'create_time',
|
|
32
33
|
ut: 'update_time',
|
|
33
|
-
m2: ['metadata', reward_account_multiplier_metadata_1.REWARD_ACCOUNT_MULTIPLIER_METADATA_MAP.LITE_TO_FULL]
|
|
34
|
+
m2: ['metadata', reward_account_multiplier_metadata_1.REWARD_ACCOUNT_MULTIPLIER_METADATA_MAP.LITE_TO_FULL],
|
|
35
|
+
rm: 'reserve_multiplier'
|
|
34
36
|
}
|
|
35
37
|
});
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SNAP_SUB_ACCOUNT_HISTORY_MAP = void 0;
|
|
4
|
+
// Schema map for the 'SNAP_SUB_ACCOUNT_HISTORY' struct.
|
|
5
|
+
exports.SNAP_SUB_ACCOUNT_HISTORY_MAP = Object.freeze({
|
|
6
|
+
FULL_TO_LITE: {
|
|
7
|
+
start_interval: 'si',
|
|
8
|
+
sub_account_id: 'sa',
|
|
9
|
+
total_equity: 'te',
|
|
10
|
+
unrealized_pnl: 'up',
|
|
11
|
+
is_vault: 'iv'
|
|
12
|
+
},
|
|
13
|
+
LITE_TO_FULL: {
|
|
14
|
+
si: 'start_interval',
|
|
15
|
+
sa: 'sub_account_id',
|
|
16
|
+
te: 'total_equity',
|
|
17
|
+
up: 'unrealized_pnl',
|
|
18
|
+
iv: 'is_vault'
|
|
19
|
+
}
|
|
20
|
+
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@grvt/client",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.12",
|
|
4
4
|
"description": "Node.js & JavaScript client for GRVT REST APIs & WebSockets",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"test": "nodemon dist/index.js"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"axios": "^1.
|
|
36
|
+
"axios": "^1.13.2"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@typescript-eslint/eslint-plugin": "^6.10.0",
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.API_QUERY_ACCOUNT_TODAY_PERFORMANCE_REQUEST_MAP = void 0;
|
|
4
|
-
// Schema map for the 'API_QUERY_ACCOUNT_TODAY_PERFORMANCE_REQUEST' struct.
|
|
5
|
-
exports.API_QUERY_ACCOUNT_TODAY_PERFORMANCE_REQUEST_MAP = Object.freeze({
|
|
6
|
-
FULL_TO_LITE: {},
|
|
7
|
-
LITE_TO_FULL: {}
|
|
8
|
-
});
|