@grvt/client 1.6.25 → 1.6.27
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/interfaces/codegen/data.interface.d.ts +52 -0
- package/interfaces/codegen/enums/cluster-config-type.d.ts +11 -1
- package/interfaces/codegen/enums/cluster-config-type.js +32 -2
- package/interfaces/codegen/enums/order-reject-reason.d.ts +3 -1
- package/interfaces/codegen/enums/order-reject-reason.js +7 -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 +1 -0
- package/interfaces/codegen/schema-maps/api_fill_history_request.js +4 -2
- package/interfaces/codegen/schema-maps/api_get_nlsa_config_response.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_get_nlsa_config_response.js +15 -0
- package/interfaces/codegen/schema-maps/api_get_sub_accounts_response.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_get_sub_accounts_response.js +12 -0
- package/interfaces/codegen/schema-maps/api_set_nlsa_config_request.d.ts +2 -0
- package/interfaces/codegen/schema-maps/api_set_nlsa_config_request.js +17 -0
- package/interfaces/codegen/schema-maps/api_withdrawal_history_request.js +4 -2
- package/interfaces/codegen/schema-maps/authorize_builder_request.d.ts +2 -0
- package/interfaces/codegen/schema-maps/authorize_builder_request.js +27 -0
- package/interfaces/codegen/schema-maps/derisk_relaxations.d.ts +2 -0
- package/interfaces/codegen/schema-maps/derisk_relaxations.js +12 -0
- package/interfaces/codegen/schema-maps/detailed_aggregated_account_summary.js +4 -2
- package/interfaces/codegen/schema-maps/liquidation_relaxations.d.ts +2 -0
- package/interfaces/codegen/schema-maps/liquidation_relaxations.js +12 -0
- package/interfaces/codegen/schema-maps/margin_matrix_relaxations.d.ts +2 -0
- package/interfaces/codegen/schema-maps/margin_matrix_relaxations.js +18 -0
- package/interfaces/codegen/schema-maps/non_liq_sub_account_capabilities.d.ts +2 -0
- package/interfaces/codegen/schema-maps/non_liq_sub_account_capabilities.js +22 -0
- package/interfaces/codegen/schema-maps/non_liq_sub_account_config_v_2.d.ts +2 -0
- package/interfaces/codegen/schema-maps/non_liq_sub_account_config_v_2.js +15 -0
- package/interfaces/codegen/schema-maps/tpsl_order_metadata.js +4 -2
- package/interfaces/codegen/schema-maps/transfer_check_relaxations.d.ts +2 -0
- package/interfaces/codegen/schema-maps/transfer_check_relaxations.js +14 -0
- package/package.json +2 -2
|
@@ -401,6 +401,7 @@ export interface IApiFillHistoryRequest {
|
|
|
401
401
|
end_time?: string;
|
|
402
402
|
limit?: number;
|
|
403
403
|
cursor?: string;
|
|
404
|
+
order_id?: string;
|
|
404
405
|
}
|
|
405
406
|
export interface IApiFillHistoryResponse {
|
|
406
407
|
result?: IFill[];
|
|
@@ -683,6 +684,10 @@ export interface IApiGetMarginRulesResponse {
|
|
|
683
684
|
export interface IApiGetMarginTiersResponse {
|
|
684
685
|
results?: IAssetMarginTierResponse[];
|
|
685
686
|
}
|
|
687
|
+
export interface IApiGetNLSAConfigResponse {
|
|
688
|
+
enabled?: boolean;
|
|
689
|
+
sub_acc_configs?: INonLiqSubAccountConfigV2[];
|
|
690
|
+
}
|
|
686
691
|
export interface IApiGetOrderGroupRequest {
|
|
687
692
|
sub_account_id?: string;
|
|
688
693
|
}
|
|
@@ -705,6 +710,9 @@ export interface IApiGetPriceProtectionBandsResponse {
|
|
|
705
710
|
export interface IApiGetRewardLeaderboardResponse {
|
|
706
711
|
result?: IApiRewardLeaderboardItem[];
|
|
707
712
|
}
|
|
713
|
+
export interface IApiGetSubAccountsResponse {
|
|
714
|
+
sub_account_ids?: string[];
|
|
715
|
+
}
|
|
708
716
|
export interface IApiGetTraderStatResponse {
|
|
709
717
|
total_fee?: string;
|
|
710
718
|
}
|
|
@@ -1109,6 +1117,11 @@ export interface IApiSetInitialLeverageRequest {
|
|
|
1109
1117
|
export interface IApiSetInitialLeverageResponse {
|
|
1110
1118
|
success?: boolean;
|
|
1111
1119
|
}
|
|
1120
|
+
export interface IApiSetNLSAConfigRequest {
|
|
1121
|
+
enabled?: boolean;
|
|
1122
|
+
add_or_edit?: INonLiqSubAccountConfigV2[];
|
|
1123
|
+
remove_sub_acc_i_ds?: string[];
|
|
1124
|
+
}
|
|
1112
1125
|
export interface IApiSetPriceProtectionBandsRequest {
|
|
1113
1126
|
enabled?: boolean;
|
|
1114
1127
|
default_band?: IPriceProtectionBand;
|
|
@@ -1383,6 +1396,7 @@ export interface IApiWithdrawalHistoryRequest {
|
|
|
1383
1396
|
limit?: number;
|
|
1384
1397
|
cursor?: string;
|
|
1385
1398
|
main_account_id?: string;
|
|
1399
|
+
tx_id?: string;
|
|
1386
1400
|
}
|
|
1387
1401
|
export interface IApiWithdrawalHistoryResponse {
|
|
1388
1402
|
result?: IWithdrawalHistory[];
|
|
@@ -1426,6 +1440,16 @@ export interface IAssetSpecificPriceProtectionBand {
|
|
|
1426
1440
|
asset?: string;
|
|
1427
1441
|
band?: IPriceProtectionBand;
|
|
1428
1442
|
}
|
|
1443
|
+
export interface IAuthorizeBuilderRequest {
|
|
1444
|
+
main_account_id?: string;
|
|
1445
|
+
builder_account_id?: string;
|
|
1446
|
+
max_futures_fee_rate?: string;
|
|
1447
|
+
max_spot_fee_rate?: string;
|
|
1448
|
+
signature?: ISignature;
|
|
1449
|
+
builder_api_key_label?: string;
|
|
1450
|
+
builder_api_key_signer?: string;
|
|
1451
|
+
builder_api_key_permissions?: string;
|
|
1452
|
+
}
|
|
1429
1453
|
export interface IBatchCreateAccountMultiplierElement {
|
|
1430
1454
|
off_chain_account_id?: string;
|
|
1431
1455
|
account_type?: EAccountType;
|
|
@@ -1536,6 +1560,9 @@ export interface IDepositHistory {
|
|
|
1536
1560
|
confirmed_time?: string;
|
|
1537
1561
|
from_address?: string;
|
|
1538
1562
|
}
|
|
1563
|
+
export interface IDeriskRelaxations {
|
|
1564
|
+
exempt_derisk?: boolean;
|
|
1565
|
+
}
|
|
1539
1566
|
export interface IDetailedAggregatedAccountSummary {
|
|
1540
1567
|
main_account_id?: string;
|
|
1541
1568
|
total_equity?: string;
|
|
@@ -1548,6 +1575,7 @@ export interface IDetailedAggregatedAccountSummary {
|
|
|
1548
1575
|
total_sub_account_equity?: string;
|
|
1549
1576
|
total_sub_account_available_balance?: string;
|
|
1550
1577
|
total_usd_notional_invested?: string;
|
|
1578
|
+
total_unrealized_pnl?: string;
|
|
1551
1579
|
}
|
|
1552
1580
|
export interface IECNToBrokerFeed {
|
|
1553
1581
|
order_id?: string;
|
|
@@ -1825,6 +1853,9 @@ export interface ILPSubAccountSnapshot {
|
|
|
1825
1853
|
liquidity_score?: string;
|
|
1826
1854
|
calculate_at?: string;
|
|
1827
1855
|
}
|
|
1856
|
+
export interface ILiquidationRelaxations {
|
|
1857
|
+
exempt_liquidation?: boolean;
|
|
1858
|
+
}
|
|
1828
1859
|
export interface IListRewardEpochResponse {
|
|
1829
1860
|
result?: IAdminRewardEpoch[];
|
|
1830
1861
|
}
|
|
@@ -1855,6 +1886,12 @@ export interface IMainAccountLeaderboardEntry {
|
|
|
1855
1886
|
positive_fee?: string;
|
|
1856
1887
|
realized_pnl?: string;
|
|
1857
1888
|
}
|
|
1889
|
+
export interface IMarginMatrixRelaxations {
|
|
1890
|
+
relax_pre_order_check?: boolean;
|
|
1891
|
+
relax_post_order_check?: boolean;
|
|
1892
|
+
relax_pre_trade_check?: boolean;
|
|
1893
|
+
relax_post_trade_check?: boolean;
|
|
1894
|
+
}
|
|
1858
1895
|
export interface IMarginTierResponse {
|
|
1859
1896
|
lower_bound?: string;
|
|
1860
1897
|
rate?: string;
|
|
@@ -1872,6 +1909,16 @@ export interface IMiniTicker {
|
|
|
1872
1909
|
best_ask_price?: string;
|
|
1873
1910
|
best_ask_size?: string;
|
|
1874
1911
|
}
|
|
1912
|
+
export interface INonLiqSubAccountCapabilities {
|
|
1913
|
+
margin_matrix_relaxations?: IMarginMatrixRelaxations;
|
|
1914
|
+
transfer_check_relaxations?: ITransferCheckRelaxations;
|
|
1915
|
+
liquidation_relaxations?: ILiquidationRelaxations;
|
|
1916
|
+
derisk_relaxations?: IDeriskRelaxations;
|
|
1917
|
+
}
|
|
1918
|
+
export interface INonLiqSubAccountConfigV2 {
|
|
1919
|
+
sub_acc_id?: string;
|
|
1920
|
+
capabilities?: INonLiqSubAccountCapabilities;
|
|
1921
|
+
}
|
|
1875
1922
|
export interface IOrder {
|
|
1876
1923
|
order_id?: string;
|
|
1877
1924
|
sub_account_id?: string;
|
|
@@ -2280,6 +2327,7 @@ export interface ITPSLOrderMetadata {
|
|
|
2280
2327
|
trigger_by?: ETriggerBy;
|
|
2281
2328
|
trigger_price?: string;
|
|
2282
2329
|
close_position?: boolean;
|
|
2330
|
+
is_split_position?: boolean;
|
|
2283
2331
|
}
|
|
2284
2332
|
export interface ITicker {
|
|
2285
2333
|
event_time?: string;
|
|
@@ -2365,6 +2413,10 @@ export interface ITradingPerformanceTrendPoint {
|
|
|
2365
2413
|
funding_payment_amount?: string;
|
|
2366
2414
|
filled_order_count?: string;
|
|
2367
2415
|
}
|
|
2416
|
+
export interface ITransferCheckRelaxations {
|
|
2417
|
+
relax_available_balance_check?: boolean;
|
|
2418
|
+
waive_spot_balance_check?: boolean;
|
|
2419
|
+
}
|
|
2368
2420
|
export interface ITransferHistory {
|
|
2369
2421
|
tx_id?: string;
|
|
2370
2422
|
from_account_id?: string;
|
|
@@ -66,6 +66,16 @@ export declare enum EClusterConfigType {
|
|
|
66
66
|
FLAG_FIX_CROSS_LIQUIDATION_POST_TRADE = "FLAG_FIX_CROSS_LIQUIDATION_POST_TRADE",
|
|
67
67
|
FLAG_KEEP_EXPIRED_SESSION_KEYS_FOR_180_DAYS = "FLAG_KEEP_EXPIRED_SESSION_KEYS_FOR_180_DAYS",
|
|
68
68
|
FLAG_TRIGGER_ORDER_CANCELLATION_V_2 = "FLAG_TRIGGER_ORDER_CANCELLATION_V_2",
|
|
69
|
-
FLAG_FIX_OID_ASSIGNMENT = "FLAG_FIX_OID_ASSIGNMENT"
|
|
69
|
+
FLAG_FIX_OID_ASSIGNMENT = "FLAG_FIX_OID_ASSIGNMENT",
|
|
70
|
+
FLAG_FIX_CANCEL_TPSL_BULK_ORDER_V_2 = "FLAG_FIX_CANCEL_TPSL_BULK_ORDER_V_2",
|
|
71
|
+
FLAG_USE_CHECK_MAX_POSITION_SIZE_NUMOPS = "FLAG_USE_CHECK_MAX_POSITION_SIZE_NUMOPS",
|
|
72
|
+
FLAG_RISK_DUPLICATED_BUILDER_CHECK = "FLAG_RISK_DUPLICATED_BUILDER_CHECK",
|
|
73
|
+
CONFIGURE_NON_LIQUIDATABLE_SUB_ACCOUNTS_V_2 = "CONFIGURE_NON_LIQUIDATABLE_SUB_ACCOUNTS_V_2",
|
|
74
|
+
FLAG_REJECT_TRADE_PRICE_WORSE_THAN_BANKRUPTCY_PRICE = "FLAG_REJECT_TRADE_PRICE_WORSE_THAN_BANKRUPTCY_PRICE",
|
|
75
|
+
FLAG_MAX_NUM_MAKERS = "FLAG_MAX_NUM_MAKERS",
|
|
76
|
+
FLAG_FIX_NLSA_TRANSFER_AVAIL_BAL_CHECK = "FLAG_FIX_NLSA_TRANSFER_AVAIL_BAL_CHECK",
|
|
77
|
+
FLAG_ENABLE_ISOLATED_INCREASE_MAX_ADDABLE = "FLAG_ENABLE_ISOLATED_INCREASE_MAX_ADDABLE",
|
|
78
|
+
FLAG_CANCEL_ON_DISCONNECT = "FLAG_CANCEL_ON_DISCONNECT",
|
|
79
|
+
FLAG_SPLIT_TPSL = "FLAG_SPLIT_TPSL"
|
|
70
80
|
}
|
|
71
81
|
export declare const EClusterConfigTypeInt: Record<EClusterConfigType, number>;
|
|
@@ -107,7 +107,7 @@ var EClusterConfigType;
|
|
|
107
107
|
EClusterConfigType["RISK_SNAPSHOT_VERSION"] = "RISK_SNAPSHOT_VERSION";
|
|
108
108
|
// Flag to check IM multiplier
|
|
109
109
|
EClusterConfigType["FLAG_IM_CHECK_MULTIPLIER"] = "FLAG_IM_CHECK_MULTIPLIER";
|
|
110
|
-
//
|
|
110
|
+
// DEPRECATED: Use configureNonLiquidatableSubAccountsV2 for per-subaccount capabilities. V1 payload to configure non-liquidatable sub-accounts list.
|
|
111
111
|
EClusterConfigType["CONFIGURE_NON_LIQUIDATABLE_SUB_ACCOUNTS"] = "CONFIGURE_NON_LIQUIDATABLE_SUB_ACCOUNTS";
|
|
112
112
|
// Flag to enable risk-reducing trades when negative TE.
|
|
113
113
|
EClusterConfigType["FLAG_ALLOW_RISK_REDUCING_TRADES_WHEN_NEGATIVE_TE"] = "FLAG_ALLOW_RISK_REDUCING_TRADES_WHEN_NEGATIVE_TE";
|
|
@@ -139,6 +139,26 @@ var EClusterConfigType;
|
|
|
139
139
|
EClusterConfigType["FLAG_TRIGGER_ORDER_CANCELLATION_V_2"] = "FLAG_TRIGGER_ORDER_CANCELLATION_V_2";
|
|
140
140
|
// Flag to fix oid assignment
|
|
141
141
|
EClusterConfigType["FLAG_FIX_OID_ASSIGNMENT"] = "FLAG_FIX_OID_ASSIGNMENT";
|
|
142
|
+
// Flag to fix cancel TPSL bulk order
|
|
143
|
+
EClusterConfigType["FLAG_FIX_CANCEL_TPSL_BULK_ORDER_V_2"] = "FLAG_FIX_CANCEL_TPSL_BULK_ORDER_V_2";
|
|
144
|
+
// Flag to use the numop version of CheckMaxPositionSize with numops backend instead of BI
|
|
145
|
+
EClusterConfigType["FLAG_USE_CHECK_MAX_POSITION_SIZE_NUMOPS"] = "FLAG_USE_CHECK_MAX_POSITION_SIZE_NUMOPS";
|
|
146
|
+
// Flag to check duplicated builder in risk
|
|
147
|
+
EClusterConfigType["FLAG_RISK_DUPLICATED_BUILDER_CHECK"] = "FLAG_RISK_DUPLICATED_BUILDER_CHECK";
|
|
148
|
+
// V2 config for per-subaccount non-liquidatable capabilities
|
|
149
|
+
EClusterConfigType["CONFIGURE_NON_LIQUIDATABLE_SUB_ACCOUNTS_V_2"] = "CONFIGURE_NON_LIQUIDATABLE_SUB_ACCOUNTS_V_2";
|
|
150
|
+
// Flag to reject trade price worse than bankruptcy price
|
|
151
|
+
EClusterConfigType["FLAG_REJECT_TRADE_PRICE_WORSE_THAN_BANKRUPTCY_PRICE"] = "FLAG_REJECT_TRADE_PRICE_WORSE_THAN_BANKRUPTCY_PRICE";
|
|
152
|
+
// Flag to set max number of makers
|
|
153
|
+
EClusterConfigType["FLAG_MAX_NUM_MAKERS"] = "FLAG_MAX_NUM_MAKERS";
|
|
154
|
+
// When enabled, NLSA availBal checks verify POST-transfer TE >= 0 instead of PRE-transfer
|
|
155
|
+
EClusterConfigType["FLAG_FIX_NLSA_TRANSFER_AVAIL_BAL_CHECK"] = "FLAG_FIX_NLSA_TRANSFER_AVAIL_BAL_CHECK";
|
|
156
|
+
// Flag to enforce max-addable checks for isolated increasing positions
|
|
157
|
+
EClusterConfigType["FLAG_ENABLE_ISOLATED_INCREASE_MAX_ADDABLE"] = "FLAG_ENABLE_ISOLATED_INCREASE_MAX_ADDABLE";
|
|
158
|
+
// Flag to control cancel on disconnect
|
|
159
|
+
EClusterConfigType["FLAG_CANCEL_ON_DISCONNECT"] = "FLAG_CANCEL_ON_DISCONNECT";
|
|
160
|
+
// Flag to control split TPSL support
|
|
161
|
+
EClusterConfigType["FLAG_SPLIT_TPSL"] = "FLAG_SPLIT_TPSL";
|
|
142
162
|
})(EClusterConfigType || (exports.EClusterConfigType = EClusterConfigType = {}));
|
|
143
163
|
exports.EClusterConfigTypeInt = Object.freeze({
|
|
144
164
|
[EClusterConfigType.CLIENT_TIER]: 1,
|
|
@@ -208,5 +228,15 @@ exports.EClusterConfigTypeInt = Object.freeze({
|
|
|
208
228
|
[EClusterConfigType.FLAG_FIX_CROSS_LIQUIDATION_POST_TRADE]: 65,
|
|
209
229
|
[EClusterConfigType.FLAG_KEEP_EXPIRED_SESSION_KEYS_FOR_180_DAYS]: 66,
|
|
210
230
|
[EClusterConfigType.FLAG_TRIGGER_ORDER_CANCELLATION_V_2]: 67,
|
|
211
|
-
[EClusterConfigType.FLAG_FIX_OID_ASSIGNMENT]: 68
|
|
231
|
+
[EClusterConfigType.FLAG_FIX_OID_ASSIGNMENT]: 68,
|
|
232
|
+
[EClusterConfigType.FLAG_FIX_CANCEL_TPSL_BULK_ORDER_V_2]: 69,
|
|
233
|
+
[EClusterConfigType.FLAG_USE_CHECK_MAX_POSITION_SIZE_NUMOPS]: 70,
|
|
234
|
+
[EClusterConfigType.FLAG_RISK_DUPLICATED_BUILDER_CHECK]: 71,
|
|
235
|
+
[EClusterConfigType.CONFIGURE_NON_LIQUIDATABLE_SUB_ACCOUNTS_V_2]: 72,
|
|
236
|
+
[EClusterConfigType.FLAG_REJECT_TRADE_PRICE_WORSE_THAN_BANKRUPTCY_PRICE]: 73,
|
|
237
|
+
[EClusterConfigType.FLAG_MAX_NUM_MAKERS]: 74,
|
|
238
|
+
[EClusterConfigType.FLAG_FIX_NLSA_TRANSFER_AVAIL_BAL_CHECK]: 75,
|
|
239
|
+
[EClusterConfigType.FLAG_ENABLE_ISOLATED_INCREASE_MAX_ADDABLE]: 76,
|
|
240
|
+
[EClusterConfigType.FLAG_CANCEL_ON_DISCONNECT]: 77,
|
|
241
|
+
[EClusterConfigType.FLAG_SPLIT_TPSL]: 78
|
|
212
242
|
});
|
|
@@ -41,6 +41,8 @@ export declare enum EOrderRejectReason {
|
|
|
41
41
|
BUILDER_ORDER_FEE_EXCEED = "BUILDER_ORDER_FEE_EXCEED",
|
|
42
42
|
BUILDER_ORDER_FEE_NEGATIVE = "BUILDER_ORDER_FEE_NEGATIVE",
|
|
43
43
|
BUILDER_ORDER_BUILDER_NOT_AUTHORIZED = "BUILDER_ORDER_BUILDER_NOT_AUTHORIZED",
|
|
44
|
-
BUILDER_ORDER_BUILDER_NOT_EXIST = "BUILDER_ORDER_BUILDER_NOT_EXIST"
|
|
44
|
+
BUILDER_ORDER_BUILDER_NOT_EXIST = "BUILDER_ORDER_BUILDER_NOT_EXIST",
|
|
45
|
+
TRADE_PRICE_WORSE_THAN_BANKRUPTCY_PRICE = "TRADE_PRICE_WORSE_THAN_BANKRUPTCY_PRICE",
|
|
46
|
+
TOO_MANY_MAKER_ORDERS = "TOO_MANY_MAKER_ORDERS"
|
|
45
47
|
}
|
|
46
48
|
export declare const EOrderRejectReasonInt: Record<EOrderRejectReason, number>;
|
|
@@ -89,6 +89,10 @@ var EOrderRejectReason;
|
|
|
89
89
|
EOrderRejectReason["BUILDER_ORDER_BUILDER_NOT_AUTHORIZED"] = "BUILDER_ORDER_BUILDER_NOT_AUTHORIZED";
|
|
90
90
|
// Builder does not exist
|
|
91
91
|
EOrderRejectReason["BUILDER_ORDER_BUILDER_NOT_EXIST"] = "BUILDER_ORDER_BUILDER_NOT_EXIST";
|
|
92
|
+
// the trade price is worse than the bankruptcy price
|
|
93
|
+
EOrderRejectReason["TRADE_PRICE_WORSE_THAN_BANKRUPTCY_PRICE"] = "TRADE_PRICE_WORSE_THAN_BANKRUPTCY_PRICE";
|
|
94
|
+
// the order was cancelled due to matching with too many maker orders
|
|
95
|
+
EOrderRejectReason["TOO_MANY_MAKER_ORDERS"] = "TOO_MANY_MAKER_ORDERS";
|
|
92
96
|
})(EOrderRejectReason || (exports.EOrderRejectReason = EOrderRejectReason = {}));
|
|
93
97
|
exports.EOrderRejectReasonInt = Object.freeze({
|
|
94
98
|
[EOrderRejectReason.UNSPECIFIED]: 0,
|
|
@@ -133,5 +137,7 @@ exports.EOrderRejectReasonInt = Object.freeze({
|
|
|
133
137
|
[EOrderRejectReason.BUILDER_ORDER_FEE_EXCEED]: 39,
|
|
134
138
|
[EOrderRejectReason.BUILDER_ORDER_FEE_NEGATIVE]: 40,
|
|
135
139
|
[EOrderRejectReason.BUILDER_ORDER_BUILDER_NOT_AUTHORIZED]: 41,
|
|
136
|
-
[EOrderRejectReason.BUILDER_ORDER_BUILDER_NOT_EXIST]: 42
|
|
140
|
+
[EOrderRejectReason.BUILDER_ORDER_BUILDER_NOT_EXIST]: 42,
|
|
141
|
+
[EOrderRejectReason.TRADE_PRICE_WORSE_THAN_BANKRUPTCY_PRICE]: 44,
|
|
142
|
+
[EOrderRejectReason.TOO_MANY_MAKER_ORDERS]: 45
|
|
137
143
|
});
|
|
@@ -51,6 +51,7 @@ export declare enum ETransactionType {
|
|
|
51
51
|
UPDATE_FUNDING_INFO = "UPDATE_FUNDING_INFO",
|
|
52
52
|
SET_SUB_ACCOUNT_POSITION_MARGIN_CONFIG = "SET_SUB_ACCOUNT_POSITION_MARGIN_CONFIG",
|
|
53
53
|
ADD_ISOLATED_POSITION_MARGIN = "ADD_ISOLATED_POSITION_MARGIN",
|
|
54
|
-
AUTHORIZE_BUILDER = "AUTHORIZE_BUILDER"
|
|
54
|
+
AUTHORIZE_BUILDER = "AUTHORIZE_BUILDER",
|
|
55
|
+
ADD_ACCOUNT_SIGNER_WITH_BUILDER = "ADD_ACCOUNT_SIGNER_WITH_BUILDER"
|
|
55
56
|
}
|
|
56
57
|
export declare const ETransactionTypeInt: Record<ETransactionType, number>;
|
|
@@ -56,6 +56,7 @@ var ETransactionType;
|
|
|
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
58
|
ETransactionType["AUTHORIZE_BUILDER"] = "AUTHORIZE_BUILDER";
|
|
59
|
+
ETransactionType["ADD_ACCOUNT_SIGNER_WITH_BUILDER"] = "ADD_ACCOUNT_SIGNER_WITH_BUILDER";
|
|
59
60
|
})(ETransactionType || (exports.ETransactionType = ETransactionType = {}));
|
|
60
61
|
exports.ETransactionTypeInt = Object.freeze({
|
|
61
62
|
[ETransactionType.UNSPECIFIED_1]: 1,
|
|
@@ -110,5 +111,6 @@ exports.ETransactionTypeInt = Object.freeze({
|
|
|
110
111
|
[ETransactionType.UPDATE_FUNDING_INFO]: 50,
|
|
111
112
|
[ETransactionType.SET_SUB_ACCOUNT_POSITION_MARGIN_CONFIG]: 51,
|
|
112
113
|
[ETransactionType.ADD_ISOLATED_POSITION_MARGIN]: 52,
|
|
113
|
-
[ETransactionType.AUTHORIZE_BUILDER]: 53
|
|
114
|
+
[ETransactionType.AUTHORIZE_BUILDER]: 53,
|
|
115
|
+
[ETransactionType.ADD_ACCOUNT_SIGNER_WITH_BUILDER]: 54
|
|
114
116
|
});
|
|
@@ -11,7 +11,8 @@ exports.API_FILL_HISTORY_REQUEST_MAP = Object.freeze({
|
|
|
11
11
|
start_time: 'st',
|
|
12
12
|
end_time: 'et',
|
|
13
13
|
limit: 'l',
|
|
14
|
-
cursor: 'c'
|
|
14
|
+
cursor: 'c',
|
|
15
|
+
order_id: 'oi'
|
|
15
16
|
},
|
|
16
17
|
LITE_TO_FULL: {
|
|
17
18
|
sa: 'sub_account_id',
|
|
@@ -21,6 +22,7 @@ exports.API_FILL_HISTORY_REQUEST_MAP = Object.freeze({
|
|
|
21
22
|
st: 'start_time',
|
|
22
23
|
et: 'end_time',
|
|
23
24
|
l: 'limit',
|
|
24
|
-
c: 'cursor'
|
|
25
|
+
c: 'cursor',
|
|
26
|
+
oi: 'order_id'
|
|
25
27
|
}
|
|
26
28
|
});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.API_GET_NLSA_CONFIG_RESPONSE_MAP = void 0;
|
|
4
|
+
const non_liq_sub_account_config_v_2_1 = require("./non_liq_sub_account_config_v_2");
|
|
5
|
+
// Schema map for the 'API_GET_NLSA_CONFIG_RESPONSE' struct.
|
|
6
|
+
exports.API_GET_NLSA_CONFIG_RESPONSE_MAP = Object.freeze({
|
|
7
|
+
FULL_TO_LITE: {
|
|
8
|
+
enabled: 'e',
|
|
9
|
+
sub_acc_configs: ['sa', [non_liq_sub_account_config_v_2_1.NON_LIQ_SUB_ACCOUNT_CONFIG_V_2_MAP.FULL_TO_LITE]]
|
|
10
|
+
},
|
|
11
|
+
LITE_TO_FULL: {
|
|
12
|
+
e: 'enabled',
|
|
13
|
+
sa: ['sub_acc_configs', [non_liq_sub_account_config_v_2_1.NON_LIQ_SUB_ACCOUNT_CONFIG_V_2_MAP.LITE_TO_FULL]]
|
|
14
|
+
}
|
|
15
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.API_GET_SUB_ACCOUNTS_RESPONSE_MAP = void 0;
|
|
4
|
+
// Schema map for the 'API_GET_SUB_ACCOUNTS_RESPONSE' struct.
|
|
5
|
+
exports.API_GET_SUB_ACCOUNTS_RESPONSE_MAP = Object.freeze({
|
|
6
|
+
FULL_TO_LITE: {
|
|
7
|
+
sub_account_ids: 'sa'
|
|
8
|
+
},
|
|
9
|
+
LITE_TO_FULL: {
|
|
10
|
+
sa: 'sub_account_ids'
|
|
11
|
+
}
|
|
12
|
+
});
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.API_SET_NLSA_CONFIG_REQUEST_MAP = void 0;
|
|
4
|
+
const non_liq_sub_account_config_v_2_1 = require("./non_liq_sub_account_config_v_2");
|
|
5
|
+
// Schema map for the 'API_SET_NLSA_CONFIG_REQUEST' struct.
|
|
6
|
+
exports.API_SET_NLSA_CONFIG_REQUEST_MAP = Object.freeze({
|
|
7
|
+
FULL_TO_LITE: {
|
|
8
|
+
enabled: 'e',
|
|
9
|
+
add_or_edit: ['ao', [non_liq_sub_account_config_v_2_1.NON_LIQ_SUB_ACCOUNT_CONFIG_V_2_MAP.FULL_TO_LITE]],
|
|
10
|
+
remove_sub_acc_i_ds: 'rs'
|
|
11
|
+
},
|
|
12
|
+
LITE_TO_FULL: {
|
|
13
|
+
e: 'enabled',
|
|
14
|
+
ao: ['add_or_edit', [non_liq_sub_account_config_v_2_1.NON_LIQ_SUB_ACCOUNT_CONFIG_V_2_MAP.LITE_TO_FULL]],
|
|
15
|
+
rs: 'remove_sub_acc_i_ds'
|
|
16
|
+
}
|
|
17
|
+
});
|
|
@@ -9,7 +9,8 @@ exports.API_WITHDRAWAL_HISTORY_REQUEST_MAP = Object.freeze({
|
|
|
9
9
|
end_time: 'et',
|
|
10
10
|
limit: 'l',
|
|
11
11
|
cursor: 'c1',
|
|
12
|
-
main_account_id: 'ma'
|
|
12
|
+
main_account_id: 'ma',
|
|
13
|
+
tx_id: 'ti'
|
|
13
14
|
},
|
|
14
15
|
LITE_TO_FULL: {
|
|
15
16
|
c: 'currency',
|
|
@@ -17,6 +18,7 @@ exports.API_WITHDRAWAL_HISTORY_REQUEST_MAP = Object.freeze({
|
|
|
17
18
|
et: 'end_time',
|
|
18
19
|
l: 'limit',
|
|
19
20
|
c1: 'cursor',
|
|
20
|
-
ma: 'main_account_id'
|
|
21
|
+
ma: 'main_account_id',
|
|
22
|
+
ti: 'tx_id'
|
|
21
23
|
}
|
|
22
24
|
});
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AUTHORIZE_BUILDER_REQUEST_MAP = void 0;
|
|
4
|
+
const signature_1 = require("./signature");
|
|
5
|
+
// Schema map for the 'AUTHORIZE_BUILDER_REQUEST' struct.
|
|
6
|
+
exports.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
|
+
builder_api_key_label: 'ba1',
|
|
14
|
+
builder_api_key_signer: 'ba2',
|
|
15
|
+
builder_api_key_permissions: 'ba3'
|
|
16
|
+
},
|
|
17
|
+
LITE_TO_FULL: {
|
|
18
|
+
ma: 'main_account_id',
|
|
19
|
+
ba: 'builder_account_id',
|
|
20
|
+
mf: 'max_futures_fee_rate',
|
|
21
|
+
ms: 'max_spot_fee_rate',
|
|
22
|
+
s: ['signature', signature_1.SIGNATURE_MAP.LITE_TO_FULL],
|
|
23
|
+
ba1: 'builder_api_key_label',
|
|
24
|
+
ba2: 'builder_api_key_signer',
|
|
25
|
+
ba3: 'builder_api_key_permissions'
|
|
26
|
+
}
|
|
27
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DERISK_RELAXATIONS_MAP = void 0;
|
|
4
|
+
// Schema map for the 'DERISK_RELAXATIONS' struct.
|
|
5
|
+
exports.DERISK_RELAXATIONS_MAP = Object.freeze({
|
|
6
|
+
FULL_TO_LITE: {
|
|
7
|
+
exempt_derisk: 'ed'
|
|
8
|
+
},
|
|
9
|
+
LITE_TO_FULL: {
|
|
10
|
+
ed: 'exempt_derisk'
|
|
11
|
+
}
|
|
12
|
+
});
|
|
@@ -16,7 +16,8 @@ exports.DETAILED_AGGREGATED_ACCOUNT_SUMMARY_MAP = Object.freeze({
|
|
|
16
16
|
funding_account_equity: 'fa1',
|
|
17
17
|
total_sub_account_equity: 'ts1',
|
|
18
18
|
total_sub_account_available_balance: 'ts2',
|
|
19
|
-
total_usd_notional_invested: 'tu'
|
|
19
|
+
total_usd_notional_invested: 'tu',
|
|
20
|
+
total_unrealized_pnl: 'tu1'
|
|
20
21
|
},
|
|
21
22
|
LITE_TO_FULL: {
|
|
22
23
|
ma: 'main_account_id',
|
|
@@ -29,6 +30,7 @@ exports.DETAILED_AGGREGATED_ACCOUNT_SUMMARY_MAP = Object.freeze({
|
|
|
29
30
|
fa1: 'funding_account_equity',
|
|
30
31
|
ts1: 'total_sub_account_equity',
|
|
31
32
|
ts2: 'total_sub_account_available_balance',
|
|
32
|
-
tu: 'total_usd_notional_invested'
|
|
33
|
+
tu: 'total_usd_notional_invested',
|
|
34
|
+
tu1: 'total_unrealized_pnl'
|
|
33
35
|
}
|
|
34
36
|
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LIQUIDATION_RELAXATIONS_MAP = void 0;
|
|
4
|
+
// Schema map for the 'LIQUIDATION_RELAXATIONS' struct.
|
|
5
|
+
exports.LIQUIDATION_RELAXATIONS_MAP = Object.freeze({
|
|
6
|
+
FULL_TO_LITE: {
|
|
7
|
+
exempt_liquidation: 'el'
|
|
8
|
+
},
|
|
9
|
+
LITE_TO_FULL: {
|
|
10
|
+
el: 'exempt_liquidation'
|
|
11
|
+
}
|
|
12
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MARGIN_MATRIX_RELAXATIONS_MAP = void 0;
|
|
4
|
+
// Schema map for the 'MARGIN_MATRIX_RELAXATIONS' struct.
|
|
5
|
+
exports.MARGIN_MATRIX_RELAXATIONS_MAP = Object.freeze({
|
|
6
|
+
FULL_TO_LITE: {
|
|
7
|
+
relax_pre_order_check: 'rp',
|
|
8
|
+
relax_post_order_check: 'rp1',
|
|
9
|
+
relax_pre_trade_check: 'rp2',
|
|
10
|
+
relax_post_trade_check: 'rp3'
|
|
11
|
+
},
|
|
12
|
+
LITE_TO_FULL: {
|
|
13
|
+
rp: 'relax_pre_order_check',
|
|
14
|
+
rp1: 'relax_post_order_check',
|
|
15
|
+
rp2: 'relax_pre_trade_check',
|
|
16
|
+
rp3: 'relax_post_trade_check'
|
|
17
|
+
}
|
|
18
|
+
});
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NON_LIQ_SUB_ACCOUNT_CAPABILITIES_MAP = void 0;
|
|
4
|
+
const margin_matrix_relaxations_1 = require("./margin_matrix_relaxations");
|
|
5
|
+
const transfer_check_relaxations_1 = require("./transfer_check_relaxations");
|
|
6
|
+
const liquidation_relaxations_1 = require("./liquidation_relaxations");
|
|
7
|
+
const derisk_relaxations_1 = require("./derisk_relaxations");
|
|
8
|
+
// Schema map for the 'NON_LIQ_SUB_ACCOUNT_CAPABILITIES' struct.
|
|
9
|
+
exports.NON_LIQ_SUB_ACCOUNT_CAPABILITIES_MAP = Object.freeze({
|
|
10
|
+
FULL_TO_LITE: {
|
|
11
|
+
margin_matrix_relaxations: ['mm', margin_matrix_relaxations_1.MARGIN_MATRIX_RELAXATIONS_MAP.FULL_TO_LITE],
|
|
12
|
+
transfer_check_relaxations: ['tc', transfer_check_relaxations_1.TRANSFER_CHECK_RELAXATIONS_MAP.FULL_TO_LITE],
|
|
13
|
+
liquidation_relaxations: ['lr', liquidation_relaxations_1.LIQUIDATION_RELAXATIONS_MAP.FULL_TO_LITE],
|
|
14
|
+
derisk_relaxations: ['dr', derisk_relaxations_1.DERISK_RELAXATIONS_MAP.FULL_TO_LITE]
|
|
15
|
+
},
|
|
16
|
+
LITE_TO_FULL: {
|
|
17
|
+
mm: ['margin_matrix_relaxations', margin_matrix_relaxations_1.MARGIN_MATRIX_RELAXATIONS_MAP.LITE_TO_FULL],
|
|
18
|
+
tc: ['transfer_check_relaxations', transfer_check_relaxations_1.TRANSFER_CHECK_RELAXATIONS_MAP.LITE_TO_FULL],
|
|
19
|
+
lr: ['liquidation_relaxations', liquidation_relaxations_1.LIQUIDATION_RELAXATIONS_MAP.LITE_TO_FULL],
|
|
20
|
+
dr: ['derisk_relaxations', derisk_relaxations_1.DERISK_RELAXATIONS_MAP.LITE_TO_FULL]
|
|
21
|
+
}
|
|
22
|
+
});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NON_LIQ_SUB_ACCOUNT_CONFIG_V_2_MAP = void 0;
|
|
4
|
+
const non_liq_sub_account_capabilities_1 = require("./non_liq_sub_account_capabilities");
|
|
5
|
+
// Schema map for the 'NON_LIQ_SUB_ACCOUNT_CONFIG_V_2' struct.
|
|
6
|
+
exports.NON_LIQ_SUB_ACCOUNT_CONFIG_V_2_MAP = Object.freeze({
|
|
7
|
+
FULL_TO_LITE: {
|
|
8
|
+
sub_acc_id: 'sa',
|
|
9
|
+
capabilities: ['c', non_liq_sub_account_capabilities_1.NON_LIQ_SUB_ACCOUNT_CAPABILITIES_MAP.FULL_TO_LITE]
|
|
10
|
+
},
|
|
11
|
+
LITE_TO_FULL: {
|
|
12
|
+
sa: 'sub_acc_id',
|
|
13
|
+
c: ['capabilities', non_liq_sub_account_capabilities_1.NON_LIQ_SUB_ACCOUNT_CAPABILITIES_MAP.LITE_TO_FULL]
|
|
14
|
+
}
|
|
15
|
+
});
|
|
@@ -6,11 +6,13 @@ exports.TPSL_ORDER_METADATA_MAP = Object.freeze({
|
|
|
6
6
|
FULL_TO_LITE: {
|
|
7
7
|
trigger_by: 'tb',
|
|
8
8
|
trigger_price: 'tp',
|
|
9
|
-
close_position: 'cp'
|
|
9
|
+
close_position: 'cp',
|
|
10
|
+
is_split_position: 'is'
|
|
10
11
|
},
|
|
11
12
|
LITE_TO_FULL: {
|
|
12
13
|
tb: 'trigger_by',
|
|
13
14
|
tp: 'trigger_price',
|
|
14
|
-
cp: 'close_position'
|
|
15
|
+
cp: 'close_position',
|
|
16
|
+
is: 'is_split_position'
|
|
15
17
|
}
|
|
16
18
|
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TRANSFER_CHECK_RELAXATIONS_MAP = void 0;
|
|
4
|
+
// Schema map for the 'TRANSFER_CHECK_RELAXATIONS' struct.
|
|
5
|
+
exports.TRANSFER_CHECK_RELAXATIONS_MAP = Object.freeze({
|
|
6
|
+
FULL_TO_LITE: {
|
|
7
|
+
relax_available_balance_check: 'ra',
|
|
8
|
+
waive_spot_balance_check: 'ws'
|
|
9
|
+
},
|
|
10
|
+
LITE_TO_FULL: {
|
|
11
|
+
ra: 'relax_available_balance_check',
|
|
12
|
+
ws: 'waive_spot_balance_check'
|
|
13
|
+
}
|
|
14
|
+
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@grvt/client",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.27",
|
|
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.13.
|
|
36
|
+
"axios": "^1.13.5"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@typescript-eslint/eslint-plugin": "^6.10.0",
|