@grvt/client 1.6.26 → 1.6.28

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.
Files changed (52) hide show
  1. package/interfaces/codegen/data.interface.d.ts +89 -0
  2. package/interfaces/codegen/enums/cluster-config-type.d.ts +13 -1
  3. package/interfaces/codegen/enums/cluster-config-type.js +38 -2
  4. package/interfaces/codegen/enums/order-reject-reason.d.ts +3 -1
  5. package/interfaces/codegen/enums/order-reject-reason.js +7 -1
  6. package/interfaces/codegen/enums/sub-account-mode.d.ts +4 -0
  7. package/interfaces/codegen/enums/sub-account-mode.js +11 -0
  8. package/interfaces/codegen/enums/transaction-type.d.ts +2 -1
  9. package/interfaces/codegen/enums/transaction-type.js +3 -1
  10. package/interfaces/codegen/enums/wallet-type.d.ts +6 -0
  11. package/interfaces/codegen/enums/wallet-type.js +17 -0
  12. package/interfaces/codegen/hex-string-map.js +1 -0
  13. package/interfaces/codegen/schema-maps/api_fill_history_request.js +4 -2
  14. package/interfaces/codegen/schema-maps/api_get_all_positions_by_asset_request.d.ts +2 -0
  15. package/interfaces/codegen/schema-maps/api_get_all_positions_by_asset_request.js +12 -0
  16. package/interfaces/codegen/schema-maps/api_get_all_positions_by_asset_response.d.ts +2 -0
  17. package/interfaces/codegen/schema-maps/api_get_all_positions_by_asset_response.js +13 -0
  18. package/interfaces/codegen/schema-maps/api_get_nlsa_config_response.d.ts +2 -0
  19. package/interfaces/codegen/schema-maps/api_get_nlsa_config_response.js +15 -0
  20. package/interfaces/codegen/schema-maps/api_get_sub_accounts_response.d.ts +2 -0
  21. package/interfaces/codegen/schema-maps/api_get_sub_accounts_response.js +12 -0
  22. package/interfaces/codegen/schema-maps/api_set_nlsa_config_request.d.ts +2 -0
  23. package/interfaces/codegen/schema-maps/api_set_nlsa_config_request.js +17 -0
  24. package/interfaces/codegen/schema-maps/api_spot_balance.js +10 -2
  25. package/interfaces/codegen/schema-maps/api_spot_sub_account_summary_request.d.ts +2 -0
  26. package/interfaces/codegen/schema-maps/api_spot_sub_account_summary_request.js +12 -0
  27. package/interfaces/codegen/schema-maps/api_spot_sub_account_summary_response.d.ts +2 -0
  28. package/interfaces/codegen/schema-maps/api_spot_sub_account_summary_response.js +13 -0
  29. package/interfaces/codegen/schema-maps/api_transfer_request.js +6 -2
  30. package/interfaces/codegen/schema-maps/api_withdrawal_history_request.js +4 -2
  31. package/interfaces/codegen/schema-maps/authorize_builder_request.d.ts +2 -0
  32. package/interfaces/codegen/schema-maps/authorize_builder_request.js +27 -0
  33. package/interfaces/codegen/schema-maps/derisk_relaxations.d.ts +2 -0
  34. package/interfaces/codegen/schema-maps/derisk_relaxations.js +12 -0
  35. package/interfaces/codegen/schema-maps/detailed_aggregated_account_summary.js +4 -2
  36. package/interfaces/codegen/schema-maps/liquidation_relaxations.d.ts +2 -0
  37. package/interfaces/codegen/schema-maps/liquidation_relaxations.js +12 -0
  38. package/interfaces/codegen/schema-maps/margin_matrix_relaxations.d.ts +2 -0
  39. package/interfaces/codegen/schema-maps/margin_matrix_relaxations.js +18 -0
  40. package/interfaces/codegen/schema-maps/mini_position.d.ts +2 -0
  41. package/interfaces/codegen/schema-maps/mini_position.js +26 -0
  42. package/interfaces/codegen/schema-maps/non_liq_sub_account_capabilities.d.ts +2 -0
  43. package/interfaces/codegen/schema-maps/non_liq_sub_account_capabilities.js +22 -0
  44. package/interfaces/codegen/schema-maps/non_liq_sub_account_config_v_2.d.ts +2 -0
  45. package/interfaces/codegen/schema-maps/non_liq_sub_account_config_v_2.js +15 -0
  46. package/interfaces/codegen/schema-maps/snap_spot_sub_account.d.ts +2 -0
  47. package/interfaces/codegen/schema-maps/snap_spot_sub_account.js +19 -0
  48. package/interfaces/codegen/schema-maps/snap_sub_account.js +4 -2
  49. package/interfaces/codegen/schema-maps/tpsl_order_metadata.js +4 -2
  50. package/interfaces/codegen/schema-maps/transfer_check_relaxations.d.ts +2 -0
  51. package/interfaces/codegen/schema-maps/transfer_check_relaxations.js +14 -0
  52. package/package.json +1 -1
@@ -27,6 +27,7 @@ import type { ERewardEpochStatus } from './enums/reward-epoch-status.ts';
27
27
  import type { ERewardProgramType } from './enums/reward-program-type.ts';
28
28
  import type { ERewardSession } from './enums/reward-session.ts';
29
29
  import type { ESource } from './enums/source.ts';
30
+ import type { ESubAccountMode } from './enums/sub-account-mode.ts';
30
31
  import type { ESubAccountTradeInterval } from './enums/sub-account-trade-interval.ts';
31
32
  import type { ETimeInForce } from './enums/time-in-force.ts';
32
33
  import type { ETimeInterval } from './enums/time-interval.ts';
@@ -38,6 +39,7 @@ import type { EVaultInvestorAction } from './enums/vault-investor-action.ts';
38
39
  import type { EVaultRedemptionReqAgeCategory } from './enums/vault-redemption-req-age-category.ts';
39
40
  import type { EVaultType } from './enums/vault-type.ts';
40
41
  import type { EVenue } from './enums/venue.ts';
42
+ import type { EWalletType } from './enums/wallet-type.ts';
41
43
  export interface IAPISettlementPrice {
42
44
  base?: string;
43
45
  quote?: string;
@@ -401,6 +403,7 @@ export interface IApiFillHistoryRequest {
401
403
  end_time?: string;
402
404
  limit?: number;
403
405
  cursor?: string;
406
+ order_id?: string;
404
407
  }
405
408
  export interface IApiFillHistoryResponse {
406
409
  result?: IFill[];
@@ -542,6 +545,12 @@ export interface IApiGetAllInstrumentsRequest {
542
545
  export interface IApiGetAllInstrumentsResponse {
543
546
  result?: IInstrumentDisplay[];
544
547
  }
548
+ export interface IApiGetAllPositionsByAssetRequest {
549
+ instrument?: string;
550
+ }
551
+ export interface IApiGetAllPositionsByAssetResponse {
552
+ result?: IMiniPosition[];
553
+ }
545
554
  export interface IApiGetAuthorizedBuildersResponse {
546
555
  results?: IApiAuthorizedBuilder[];
547
556
  }
@@ -683,6 +692,10 @@ export interface IApiGetMarginRulesResponse {
683
692
  export interface IApiGetMarginTiersResponse {
684
693
  results?: IAssetMarginTierResponse[];
685
694
  }
695
+ export interface IApiGetNLSAConfigResponse {
696
+ enabled?: boolean;
697
+ sub_acc_configs?: INonLiqSubAccountConfigV2[];
698
+ }
686
699
  export interface IApiGetOrderGroupRequest {
687
700
  sub_account_id?: string;
688
701
  }
@@ -705,6 +718,9 @@ export interface IApiGetPriceProtectionBandsResponse {
705
718
  export interface IApiGetRewardLeaderboardResponse {
706
719
  result?: IApiRewardLeaderboardItem[];
707
720
  }
721
+ export interface IApiGetSubAccountsResponse {
722
+ sub_account_ids?: string[];
723
+ }
708
724
  export interface IApiGetTraderStatResponse {
709
725
  total_fee?: string;
710
726
  }
@@ -1109,6 +1125,11 @@ export interface IApiSetInitialLeverageRequest {
1109
1125
  export interface IApiSetInitialLeverageResponse {
1110
1126
  success?: boolean;
1111
1127
  }
1128
+ export interface IApiSetNLSAConfigRequest {
1129
+ enabled?: boolean;
1130
+ add_or_edit?: INonLiqSubAccountConfigV2[];
1131
+ remove_sub_acc_i_ds?: string[];
1132
+ }
1112
1133
  export interface IApiSetPriceProtectionBandsRequest {
1113
1134
  enabled?: boolean;
1114
1135
  default_band?: IPriceProtectionBand;
@@ -1145,6 +1166,12 @@ export interface IApiSocializedLossStatusResponse {
1145
1166
  is_active?: boolean;
1146
1167
  haircut_ratio?: string;
1147
1168
  }
1169
+ export interface IApiSpotSubAccountSummaryRequest {
1170
+ sub_account_id?: string;
1171
+ }
1172
+ export interface IApiSpotSubAccountSummaryResponse {
1173
+ result?: ISpotSubAccount;
1174
+ }
1148
1175
  export interface IApiSubAccountDailyPerformance {
1149
1176
  start_interval?: string;
1150
1177
  pnl?: string;
@@ -1247,6 +1274,8 @@ export interface IApiTransferRequest {
1247
1274
  signature?: ISignature;
1248
1275
  transfer_type?: ETransferType;
1249
1276
  transfer_metadata?: string;
1277
+ from_wallet_type?: EWalletType;
1278
+ to_wallet_type?: EWalletType;
1250
1279
  }
1251
1280
  export interface IApiTransferResponse {
1252
1281
  result?: IApiTransferAck;
@@ -1383,6 +1412,7 @@ export interface IApiWithdrawalHistoryRequest {
1383
1412
  limit?: number;
1384
1413
  cursor?: string;
1385
1414
  main_account_id?: string;
1415
+ tx_id?: string;
1386
1416
  }
1387
1417
  export interface IApiWithdrawalHistoryResponse {
1388
1418
  result?: IWithdrawalHistory[];
@@ -1426,6 +1456,16 @@ export interface IAssetSpecificPriceProtectionBand {
1426
1456
  asset?: string;
1427
1457
  band?: IPriceProtectionBand;
1428
1458
  }
1459
+ export interface IAuthorizeBuilderRequest {
1460
+ main_account_id?: string;
1461
+ builder_account_id?: string;
1462
+ max_futures_fee_rate?: string;
1463
+ max_spot_fee_rate?: string;
1464
+ signature?: ISignature;
1465
+ builder_api_key_label?: string;
1466
+ builder_api_key_signer?: string;
1467
+ builder_api_key_permissions?: string;
1468
+ }
1429
1469
  export interface IBatchCreateAccountMultiplierElement {
1430
1470
  off_chain_account_id?: string;
1431
1471
  account_type?: EAccountType;
@@ -1536,6 +1576,9 @@ export interface IDepositHistory {
1536
1576
  confirmed_time?: string;
1537
1577
  from_address?: string;
1538
1578
  }
1579
+ export interface IDeriskRelaxations {
1580
+ exempt_derisk?: boolean;
1581
+ }
1539
1582
  export interface IDetailedAggregatedAccountSummary {
1540
1583
  main_account_id?: string;
1541
1584
  total_equity?: string;
@@ -1548,6 +1591,7 @@ export interface IDetailedAggregatedAccountSummary {
1548
1591
  total_sub_account_equity?: string;
1549
1592
  total_sub_account_available_balance?: string;
1550
1593
  total_usd_notional_invested?: string;
1594
+ total_unrealized_pnl?: string;
1551
1595
  }
1552
1596
  export interface IECNToBrokerFeed {
1553
1597
  order_id?: string;
@@ -1825,6 +1869,9 @@ export interface ILPSubAccountSnapshot {
1825
1869
  liquidity_score?: string;
1826
1870
  calculate_at?: string;
1827
1871
  }
1872
+ export interface ILiquidationRelaxations {
1873
+ exempt_liquidation?: boolean;
1874
+ }
1828
1875
  export interface IListRewardEpochResponse {
1829
1876
  result?: IAdminRewardEpoch[];
1830
1877
  }
@@ -1855,10 +1902,26 @@ export interface IMainAccountLeaderboardEntry {
1855
1902
  positive_fee?: string;
1856
1903
  realized_pnl?: string;
1857
1904
  }
1905
+ export interface IMarginMatrixRelaxations {
1906
+ relax_pre_order_check?: boolean;
1907
+ relax_post_order_check?: boolean;
1908
+ relax_pre_trade_check?: boolean;
1909
+ relax_post_trade_check?: boolean;
1910
+ }
1858
1911
  export interface IMarginTierResponse {
1859
1912
  lower_bound?: string;
1860
1913
  rate?: string;
1861
1914
  }
1915
+ export interface IMiniPosition {
1916
+ sub_account_id?: string;
1917
+ balance?: string;
1918
+ entry_price?: string;
1919
+ cumulative_realized_pnl?: string;
1920
+ cumulative_realized_funding_payment?: string;
1921
+ margin_type?: EPositionMarginType;
1922
+ leverage?: string;
1923
+ position_balance?: string;
1924
+ }
1862
1925
  export interface IMiniTicker {
1863
1926
  event_time?: string;
1864
1927
  instrument?: string;
@@ -1872,6 +1935,16 @@ export interface IMiniTicker {
1872
1935
  best_ask_price?: string;
1873
1936
  best_ask_size?: string;
1874
1937
  }
1938
+ export interface INonLiqSubAccountCapabilities {
1939
+ margin_matrix_relaxations?: IMarginMatrixRelaxations;
1940
+ transfer_check_relaxations?: ITransferCheckRelaxations;
1941
+ liquidation_relaxations?: ILiquidationRelaxations;
1942
+ derisk_relaxations?: IDeriskRelaxations;
1943
+ }
1944
+ export interface INonLiqSubAccountConfigV2 {
1945
+ sub_acc_id?: string;
1946
+ capabilities?: INonLiqSubAccountCapabilities;
1947
+ }
1875
1948
  export interface IOrder {
1876
1949
  order_id?: string;
1877
1950
  sub_account_id?: string;
@@ -2229,6 +2302,16 @@ export interface ISpotBalance {
2229
2302
  currency?: string;
2230
2303
  balance?: string;
2231
2304
  index_price?: string;
2305
+ entry_price?: string;
2306
+ realized_pnl?: string;
2307
+ unrealized_pnl?: string;
2308
+ available_to_transfer?: string;
2309
+ }
2310
+ export interface ISpotSubAccount {
2311
+ event_time?: string;
2312
+ sub_account_id?: string;
2313
+ total_equity?: string;
2314
+ spot_balances?: ISpotBalance[];
2232
2315
  }
2233
2316
  export interface IStreamReference {
2234
2317
  stream?: string;
@@ -2253,6 +2336,7 @@ export interface ISubAccount {
2253
2336
  derisk_to_maintenance_margin_ratio?: string;
2254
2337
  total_cross_equity?: string;
2255
2338
  cross_unrealized_pnl?: string;
2339
+ sub_account_mode?: ESubAccountMode;
2256
2340
  }
2257
2341
  export interface ISubAccountPerformance {
2258
2342
  start_interval?: string;
@@ -2280,6 +2364,7 @@ export interface ITPSLOrderMetadata {
2280
2364
  trigger_by?: ETriggerBy;
2281
2365
  trigger_price?: string;
2282
2366
  close_position?: boolean;
2367
+ is_split_position?: boolean;
2283
2368
  }
2284
2369
  export interface ITicker {
2285
2370
  event_time?: string;
@@ -2365,6 +2450,10 @@ export interface ITradingPerformanceTrendPoint {
2365
2450
  funding_payment_amount?: string;
2366
2451
  filled_order_count?: string;
2367
2452
  }
2453
+ export interface ITransferCheckRelaxations {
2454
+ relax_available_balance_check?: boolean;
2455
+ waive_spot_balance_check?: boolean;
2456
+ }
2368
2457
  export interface ITransferHistory {
2369
2458
  tx_id?: string;
2370
2459
  from_account_id?: string;
@@ -66,6 +66,18 @@ 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",
80
+ FLAG_SPOT_TRADING = "FLAG_SPOT_TRADING",
81
+ FLAG_SNAPSHOT_CURRENCY_STORE_FIRST = "FLAG_SNAPSHOT_CURRENCY_STORE_FIRST"
70
82
  }
71
83
  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
- // Payload to configure non-liquidatable sub-accounts list.
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,30 @@ 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";
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";
142
166
  })(EClusterConfigType || (exports.EClusterConfigType = EClusterConfigType = {}));
143
167
  exports.EClusterConfigTypeInt = Object.freeze({
144
168
  [EClusterConfigType.CLIENT_TIER]: 1,
@@ -208,5 +232,17 @@ exports.EClusterConfigTypeInt = Object.freeze({
208
232
  [EClusterConfigType.FLAG_FIX_CROSS_LIQUIDATION_POST_TRADE]: 65,
209
233
  [EClusterConfigType.FLAG_KEEP_EXPIRED_SESSION_KEYS_FOR_180_DAYS]: 66,
210
234
  [EClusterConfigType.FLAG_TRIGGER_ORDER_CANCELLATION_V_2]: 67,
211
- [EClusterConfigType.FLAG_FIX_OID_ASSIGNMENT]: 68
235
+ [EClusterConfigType.FLAG_FIX_OID_ASSIGNMENT]: 68,
236
+ [EClusterConfigType.FLAG_FIX_CANCEL_TPSL_BULK_ORDER_V_2]: 69,
237
+ [EClusterConfigType.FLAG_USE_CHECK_MAX_POSITION_SIZE_NUMOPS]: 70,
238
+ [EClusterConfigType.FLAG_RISK_DUPLICATED_BUILDER_CHECK]: 71,
239
+ [EClusterConfigType.CONFIGURE_NON_LIQUIDATABLE_SUB_ACCOUNTS_V_2]: 72,
240
+ [EClusterConfigType.FLAG_REJECT_TRADE_PRICE_WORSE_THAN_BANKRUPTCY_PRICE]: 73,
241
+ [EClusterConfigType.FLAG_MAX_NUM_MAKERS]: 74,
242
+ [EClusterConfigType.FLAG_FIX_NLSA_TRANSFER_AVAIL_BAL_CHECK]: 75,
243
+ [EClusterConfigType.FLAG_ENABLE_ISOLATED_INCREASE_MAX_ADDABLE]: 76,
244
+ [EClusterConfigType.FLAG_CANCEL_ON_DISCONNECT]: 77,
245
+ [EClusterConfigType.FLAG_SPLIT_TPSL]: 78,
246
+ [EClusterConfigType.FLAG_SPOT_TRADING]: 79,
247
+ [EClusterConfigType.FLAG_SNAPSHOT_CURRENCY_STORE_FIRST]: 80
212
248
  });
@@ -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
  });
@@ -0,0 +1,4 @@
1
+ export declare enum ESubAccountMode {
2
+ SINGLE_ASSET_MODE = "SINGLE_ASSET_MODE"
3
+ }
4
+ export declare const ESubAccountModeInt: Record<ESubAccountMode, number>;
@@ -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
+ });
@@ -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
  });
@@ -0,0 +1,6 @@
1
+ export declare enum EWalletType {
2
+ FUNDING = "FUNDING",
3
+ SPOT = "SPOT",
4
+ FUTURES = "FUTURES"
5
+ }
6
+ export declare const EWalletTypeInt: Record<EWalletType, number>;
@@ -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
+ });
@@ -8,6 +8,7 @@ exports.HexStringMap = [
8
8
  'brokered_trading_volume',
9
9
  'builder',
10
10
  'builder_account_id',
11
+ 'builder_api_key_signer',
11
12
  'builder_main_account_id',
12
13
  'direct_invite_trading_volume',
13
14
  'from_account_id',
@@ -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,2 @@
1
+ import { type SchemaPairMap } from './types';
2
+ export declare const API_GET_ALL_POSITIONS_BY_ASSET_REQUEST_MAP: SchemaPairMap;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.API_GET_ALL_POSITIONS_BY_ASSET_REQUEST_MAP = void 0;
4
+ // Schema map for the 'API_GET_ALL_POSITIONS_BY_ASSET_REQUEST' struct.
5
+ exports.API_GET_ALL_POSITIONS_BY_ASSET_REQUEST_MAP = Object.freeze({
6
+ FULL_TO_LITE: {
7
+ instrument: 'i'
8
+ },
9
+ LITE_TO_FULL: {
10
+ i: 'instrument'
11
+ }
12
+ });
@@ -0,0 +1,2 @@
1
+ import { type SchemaPairMap } from './types';
2
+ export declare const API_GET_ALL_POSITIONS_BY_ASSET_RESPONSE_MAP: SchemaPairMap;
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.API_GET_ALL_POSITIONS_BY_ASSET_RESPONSE_MAP = void 0;
4
+ const mini_position_1 = require("./mini_position");
5
+ // Schema map for the 'API_GET_ALL_POSITIONS_BY_ASSET_RESPONSE' struct.
6
+ exports.API_GET_ALL_POSITIONS_BY_ASSET_RESPONSE_MAP = Object.freeze({
7
+ FULL_TO_LITE: {
8
+ result: ['r', [mini_position_1.MINI_POSITION_MAP.FULL_TO_LITE]]
9
+ },
10
+ LITE_TO_FULL: {
11
+ r: ['result', [mini_position_1.MINI_POSITION_MAP.LITE_TO_FULL]]
12
+ }
13
+ });
@@ -0,0 +1,2 @@
1
+ import { type SchemaPairMap } from './types';
2
+ export declare const API_GET_NLSA_CONFIG_RESPONSE_MAP: SchemaPairMap;
@@ -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,2 @@
1
+ import { type SchemaPairMap } from './types';
2
+ export declare const API_GET_SUB_ACCOUNTS_RESPONSE_MAP: SchemaPairMap;
@@ -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,2 @@
1
+ import { type SchemaPairMap } from './types';
2
+ export declare const API_SET_NLSA_CONFIG_REQUEST_MAP: SchemaPairMap;
@@ -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
+ });
@@ -6,11 +6,19 @@ exports.SPOT_BALANCE_MAP = Object.freeze({
6
6
  FULL_TO_LITE: {
7
7
  currency: 'c',
8
8
  balance: 'b',
9
- index_price: 'ip'
9
+ index_price: 'ip',
10
+ entry_price: 'ep',
11
+ realized_pnl: 'rp',
12
+ unrealized_pnl: 'up',
13
+ available_to_transfer: 'at'
10
14
  },
11
15
  LITE_TO_FULL: {
12
16
  c: 'currency',
13
17
  b: 'balance',
14
- ip: 'index_price'
18
+ ip: 'index_price',
19
+ ep: 'entry_price',
20
+ rp: 'realized_pnl',
21
+ up: 'unrealized_pnl',
22
+ at: 'available_to_transfer'
15
23
  }
16
24
  });
@@ -0,0 +1,2 @@
1
+ import { type SchemaPairMap } from './types';
2
+ export declare const API_SPOT_SUB_ACCOUNT_SUMMARY_REQUEST_MAP: SchemaPairMap;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.API_SPOT_SUB_ACCOUNT_SUMMARY_REQUEST_MAP = void 0;
4
+ // Schema map for the 'API_SPOT_SUB_ACCOUNT_SUMMARY_REQUEST' struct.
5
+ exports.API_SPOT_SUB_ACCOUNT_SUMMARY_REQUEST_MAP = Object.freeze({
6
+ FULL_TO_LITE: {
7
+ sub_account_id: 'sa'
8
+ },
9
+ LITE_TO_FULL: {
10
+ sa: 'sub_account_id'
11
+ }
12
+ });
@@ -0,0 +1,2 @@
1
+ import { type SchemaPairMap } from './types';
2
+ export declare const API_SPOT_SUB_ACCOUNT_SUMMARY_RESPONSE_MAP: SchemaPairMap;
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.API_SPOT_SUB_ACCOUNT_SUMMARY_RESPONSE_MAP = void 0;
4
+ const snap_spot_sub_account_1 = require("./snap_spot_sub_account");
5
+ // Schema map for the 'API_SPOT_SUB_ACCOUNT_SUMMARY_RESPONSE' struct.
6
+ exports.API_SPOT_SUB_ACCOUNT_SUMMARY_RESPONSE_MAP = Object.freeze({
7
+ FULL_TO_LITE: {
8
+ result: ['r', snap_spot_sub_account_1.SPOT_SUB_ACCOUNT_MAP.FULL_TO_LITE]
9
+ },
10
+ LITE_TO_FULL: {
11
+ r: ['result', snap_spot_sub_account_1.SPOT_SUB_ACCOUNT_MAP.LITE_TO_FULL]
12
+ }
13
+ });
@@ -13,7 +13,9 @@ exports.API_TRANSFER_REQUEST_MAP = Object.freeze({
13
13
  num_tokens: 'nt',
14
14
  signature: ['s', signature_1.SIGNATURE_MAP.FULL_TO_LITE],
15
15
  transfer_type: 'tt',
16
- transfer_metadata: 'tm'
16
+ transfer_metadata: 'tm',
17
+ from_wallet_type: 'fw',
18
+ to_wallet_type: 'tw'
17
19
  },
18
20
  LITE_TO_FULL: {
19
21
  fa: 'from_account_id',
@@ -24,6 +26,8 @@ exports.API_TRANSFER_REQUEST_MAP = Object.freeze({
24
26
  nt: 'num_tokens',
25
27
  s: ['signature', signature_1.SIGNATURE_MAP.LITE_TO_FULL],
26
28
  tt: 'transfer_type',
27
- tm: 'transfer_metadata'
29
+ tm: 'transfer_metadata',
30
+ fw: 'from_wallet_type',
31
+ tw: 'to_wallet_type'
28
32
  }
29
33
  });
@@ -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,2 @@
1
+ import { type SchemaPairMap } from './types';
2
+ export declare const AUTHORIZE_BUILDER_REQUEST_MAP: SchemaPairMap;
@@ -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,2 @@
1
+ import { type SchemaPairMap } from './types';
2
+ export declare const DERISK_RELAXATIONS_MAP: SchemaPairMap;
@@ -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,2 @@
1
+ import { type SchemaPairMap } from './types';
2
+ export declare const LIQUIDATION_RELAXATIONS_MAP: SchemaPairMap;
@@ -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,2 @@
1
+ import { type SchemaPairMap } from './types';
2
+ export declare const MARGIN_MATRIX_RELAXATIONS_MAP: SchemaPairMap;
@@ -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,2 @@
1
+ import { type SchemaPairMap } from './types';
2
+ export declare const MINI_POSITION_MAP: SchemaPairMap;
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MINI_POSITION_MAP = void 0;
4
+ // Schema map for the 'MINI_POSITION' struct.
5
+ exports.MINI_POSITION_MAP = Object.freeze({
6
+ FULL_TO_LITE: {
7
+ sub_account_id: 'sa',
8
+ balance: 'b',
9
+ entry_price: 'ep',
10
+ cumulative_realized_pnl: 'cr',
11
+ cumulative_realized_funding_payment: 'cr1',
12
+ margin_type: 'mt',
13
+ leverage: 'l',
14
+ position_balance: 'pb'
15
+ },
16
+ LITE_TO_FULL: {
17
+ sa: 'sub_account_id',
18
+ b: 'balance',
19
+ ep: 'entry_price',
20
+ cr: 'cumulative_realized_pnl',
21
+ cr1: 'cumulative_realized_funding_payment',
22
+ mt: 'margin_type',
23
+ l: 'leverage',
24
+ pb: 'position_balance'
25
+ }
26
+ });
@@ -0,0 +1,2 @@
1
+ import { type SchemaPairMap } from './types';
2
+ export declare const NON_LIQ_SUB_ACCOUNT_CAPABILITIES_MAP: SchemaPairMap;
@@ -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,2 @@
1
+ import { type SchemaPairMap } from './types';
2
+ export declare const NON_LIQ_SUB_ACCOUNT_CONFIG_V_2_MAP: SchemaPairMap;
@@ -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
+ });
@@ -0,0 +1,2 @@
1
+ import { type SchemaPairMap } from './types';
2
+ export declare const SPOT_SUB_ACCOUNT_MAP: SchemaPairMap;
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SPOT_SUB_ACCOUNT_MAP = void 0;
4
+ const api_spot_balance_1 = require("./api_spot_balance");
5
+ // Schema map for the 'SPOT_SUB_ACCOUNT' struct.
6
+ exports.SPOT_SUB_ACCOUNT_MAP = Object.freeze({
7
+ FULL_TO_LITE: {
8
+ event_time: 'et',
9
+ sub_account_id: 'sa',
10
+ total_equity: 'te',
11
+ spot_balances: ['sb', [api_spot_balance_1.SPOT_BALANCE_MAP.FULL_TO_LITE]]
12
+ },
13
+ LITE_TO_FULL: {
14
+ et: 'event_time',
15
+ sa: 'sub_account_id',
16
+ te: 'total_equity',
17
+ sb: ['spot_balances', [api_spot_balance_1.SPOT_BALANCE_MAP.LITE_TO_FULL]]
18
+ }
19
+ });
@@ -23,7 +23,8 @@ exports.SUB_ACCOUNT_MAP = Object.freeze({
23
23
  derisk_margin: 'dm',
24
24
  derisk_to_maintenance_margin_ratio: 'dt',
25
25
  total_cross_equity: 'tc',
26
- cross_unrealized_pnl: 'cu'
26
+ cross_unrealized_pnl: 'cu',
27
+ sub_account_mode: 'sa1'
27
28
  },
28
29
  LITE_TO_FULL: {
29
30
  et: 'event_time',
@@ -43,6 +44,7 @@ exports.SUB_ACCOUNT_MAP = Object.freeze({
43
44
  dm: 'derisk_margin',
44
45
  dt: 'derisk_to_maintenance_margin_ratio',
45
46
  tc: 'total_cross_equity',
46
- cu: 'cross_unrealized_pnl'
47
+ cu: 'cross_unrealized_pnl',
48
+ sa1: 'sub_account_mode'
47
49
  }
48
50
  });
@@ -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,2 @@
1
+ import { type SchemaPairMap } from './types';
2
+ export declare const TRANSFER_CHECK_RELAXATIONS_MAP: SchemaPairMap;
@@ -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.26",
3
+ "version": "1.6.28",
4
4
  "description": "Node.js & JavaScript client for GRVT REST APIs & WebSockets",
5
5
  "repository": {
6
6
  "type": "git",