@nightlylabs/dex-sdk 0.1.17 → 0.1.19

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/dist/index.cjs CHANGED
@@ -65,7 +65,7 @@ var import_uuid = require("uuid");
65
65
 
66
66
  // generated_types/addApiKey.ts
67
67
  var ABI = {
68
- "address": "0xb0212a8a1f2f811e63462d6acddc2d49d9e0a29021f460e24a70fa522a81c11a",
68
+ "address": "0x738cbcffc724a6a6d27db14e7c165c7e20bb523679a01697623ce907ed1df24b",
69
69
  "name": "add_api_key",
70
70
  "friends": [],
71
71
  "exposed_functions": [
@@ -90,7 +90,7 @@ var addApiKey_default = ABI;
90
90
 
91
91
  // generated_types/cancelAllPerpOrders.ts
92
92
  var ABI2 = {
93
- "address": "0xb0212a8a1f2f811e63462d6acddc2d49d9e0a29021f460e24a70fa522a81c11a",
93
+ "address": "0x738cbcffc724a6a6d27db14e7c165c7e20bb523679a01697623ce907ed1df24b",
94
94
  "name": "cancel_all_perp_orders",
95
95
  "friends": [],
96
96
  "exposed_functions": [
@@ -113,7 +113,7 @@ var cancelAllPerpOrders_default = ABI2;
113
113
 
114
114
  // generated_types/cancelPerpOrders.ts
115
115
  var ABI3 = {
116
- "address": "0xb0212a8a1f2f811e63462d6acddc2d49d9e0a29021f460e24a70fa522a81c11a",
116
+ "address": "0x738cbcffc724a6a6d27db14e7c165c7e20bb523679a01697623ce907ed1df24b",
117
117
  "name": "cancel_perp_orders",
118
118
  "friends": [],
119
119
  "exposed_functions": [
@@ -138,7 +138,7 @@ var cancelPerpOrders_default = ABI3;
138
138
 
139
139
  // generated_types/createUser.ts
140
140
  var ABI4 = {
141
- "address": "0xb0212a8a1f2f811e63462d6acddc2d49d9e0a29021f460e24a70fa522a81c11a",
141
+ "address": "0x738cbcffc724a6a6d27db14e7c165c7e20bb523679a01697623ce907ed1df24b",
142
142
  "name": "create_user",
143
143
  "friends": [],
144
144
  "exposed_functions": [
@@ -163,7 +163,7 @@ var createUser_default = ABI4;
163
163
 
164
164
  // generated_types/depositToVault.ts
165
165
  var ABI5 = {
166
- "address": "0xb0212a8a1f2f811e63462d6acddc2d49d9e0a29021f460e24a70fa522a81c11a",
166
+ "address": "0x738cbcffc724a6a6d27db14e7c165c7e20bb523679a01697623ce907ed1df24b",
167
167
  "name": "deposit_to_vault",
168
168
  "friends": [],
169
169
  "exposed_functions": [
@@ -188,7 +188,7 @@ var depositToVault_default = ABI5;
188
188
 
189
189
  // generated_types/depositToken.ts
190
190
  var ABI6 = {
191
- "address": "0xb0212a8a1f2f811e63462d6acddc2d49d9e0a29021f460e24a70fa522a81c11a",
191
+ "address": "0x738cbcffc724a6a6d27db14e7c165c7e20bb523679a01697623ce907ed1df24b",
192
192
  "name": "deposit_token",
193
193
  "friends": [],
194
194
  "exposed_functions": [
@@ -213,7 +213,7 @@ var depositToken_default = ABI6;
213
213
 
214
214
  // generated_types/lendToken.ts
215
215
  var ABI7 = {
216
- "address": "0xb0212a8a1f2f811e63462d6acddc2d49d9e0a29021f460e24a70fa522a81c11a",
216
+ "address": "0x738cbcffc724a6a6d27db14e7c165c7e20bb523679a01697623ce907ed1df24b",
217
217
  "name": "lend_token",
218
218
  "friends": [],
219
219
  "exposed_functions": [
@@ -239,7 +239,7 @@ var lendToken_default = ABI7;
239
239
 
240
240
  // generated_types/placePerpLimitOrder.ts
241
241
  var ABI8 = {
242
- "address": "0xb0212a8a1f2f811e63462d6acddc2d49d9e0a29021f460e24a70fa522a81c11a",
242
+ "address": "0x738cbcffc724a6a6d27db14e7c165c7e20bb523679a01697623ce907ed1df24b",
243
243
  "name": "place_perp_limit_order",
244
244
  "friends": [],
245
245
  "exposed_functions": [
@@ -268,7 +268,7 @@ var placePerpLimitOrder_default = ABI8;
268
268
 
269
269
  // generated_types/changePerpOrderPrice.ts
270
270
  var ABI9 = {
271
- "address": "0xb0212a8a1f2f811e63462d6acddc2d49d9e0a29021f460e24a70fa522a81c11a",
271
+ "address": "0x738cbcffc724a6a6d27db14e7c165c7e20bb523679a01697623ce907ed1df24b",
272
272
  "name": "change_perp_order_price",
273
273
  "friends": [],
274
274
  "exposed_functions": [
@@ -295,7 +295,7 @@ var changePerpOrderPrice_default = ABI9;
295
295
 
296
296
  // generated_types/placePerpMarketOrder.ts
297
297
  var ABI10 = {
298
- "address": "0xb0212a8a1f2f811e63462d6acddc2d49d9e0a29021f460e24a70fa522a81c11a",
298
+ "address": "0x738cbcffc724a6a6d27db14e7c165c7e20bb523679a01697623ce907ed1df24b",
299
299
  "name": "place_perp_market_order",
300
300
  "friends": [],
301
301
  "exposed_functions": [
@@ -323,7 +323,7 @@ var placePerpMarketOrder_default = ABI10;
323
323
 
324
324
  // generated_types/redeemToken.ts
325
325
  var ABI11 = {
326
- "address": "0xb0212a8a1f2f811e63462d6acddc2d49d9e0a29021f460e24a70fa522a81c11a",
326
+ "address": "0x738cbcffc724a6a6d27db14e7c165c7e20bb523679a01697623ce907ed1df24b",
327
327
  "name": "redeem_token",
328
328
  "friends": [],
329
329
  "exposed_functions": [
@@ -349,7 +349,7 @@ var redeemToken_default = ABI11;
349
349
 
350
350
  // generated_types/removeApiKey.ts
351
351
  var ABI12 = {
352
- "address": "0xb0212a8a1f2f811e63462d6acddc2d49d9e0a29021f460e24a70fa522a81c11a",
352
+ "address": "0x738cbcffc724a6a6d27db14e7c165c7e20bb523679a01697623ce907ed1df24b",
353
353
  "name": "remove_api_key",
354
354
  "friends": [],
355
355
  "exposed_functions": [
@@ -373,7 +373,7 @@ var removeApiKey_default = ABI12;
373
373
 
374
374
  // generated_types/setAliasName.ts
375
375
  var ABI13 = {
376
- "address": "0xb0212a8a1f2f811e63462d6acddc2d49d9e0a29021f460e24a70fa522a81c11a",
376
+ "address": "0x738cbcffc724a6a6d27db14e7c165c7e20bb523679a01697623ce907ed1df24b",
377
377
  "name": "set_alias_name",
378
378
  "friends": [],
379
379
  "exposed_functions": [
@@ -397,7 +397,7 @@ var setAliasName_default = ABI13;
397
397
 
398
398
  // generated_types/setAutolend.ts
399
399
  var ABI14 = {
400
- "address": "0xb0212a8a1f2f811e63462d6acddc2d49d9e0a29021f460e24a70fa522a81c11a",
400
+ "address": "0x738cbcffc724a6a6d27db14e7c165c7e20bb523679a01697623ce907ed1df24b",
401
401
  "name": "set_autolend",
402
402
  "friends": [],
403
403
  "exposed_functions": [
@@ -421,7 +421,7 @@ var setAutolend_default = ABI14;
421
421
 
422
422
  // generated_types/claimReferralFees.ts
423
423
  var ABI15 = {
424
- "address": "0xb0212a8a1f2f811e63462d6acddc2d49d9e0a29021f460e24a70fa522a81c11a",
424
+ "address": "0x738cbcffc724a6a6d27db14e7c165c7e20bb523679a01697623ce907ed1df24b",
425
425
  "name": "claim_referral_fees",
426
426
  "friends": [],
427
427
  "exposed_functions": [
@@ -445,7 +445,7 @@ var claimReferralFees_default = ABI15;
445
445
 
446
446
  // generated_types/transferToUser.ts
447
447
  var ABI16 = {
448
- "address": "0xb0212a8a1f2f811e63462d6acddc2d49d9e0a29021f460e24a70fa522a81c11a",
448
+ "address": "0x738cbcffc724a6a6d27db14e7c165c7e20bb523679a01697623ce907ed1df24b",
449
449
  "name": "transfer_to_user",
450
450
  "friends": [],
451
451
  "exposed_functions": [
@@ -472,7 +472,7 @@ var transferToUser_default = ABI16;
472
472
 
473
473
  // generated_types/placeMultiplePerpOrders.ts
474
474
  var ABI17 = {
475
- "address": "0xb0212a8a1f2f811e63462d6acddc2d49d9e0a29021f460e24a70fa522a81c11a",
475
+ "address": "0x738cbcffc724a6a6d27db14e7c165c7e20bb523679a01697623ce907ed1df24b",
476
476
  "name": "place_multiple_perp_orders",
477
477
  "friends": [],
478
478
  "exposed_functions": [
@@ -501,7 +501,7 @@ var placeMultiplePerpOrders_default = ABI17;
501
501
 
502
502
  // generated_types/claimKickbackFee.ts
503
503
  var ABI18 = {
504
- "address": "0xb0212a8a1f2f811e63462d6acddc2d49d9e0a29021f460e24a70fa522a81c11a",
504
+ "address": "0x738cbcffc724a6a6d27db14e7c165c7e20bb523679a01697623ce907ed1df24b",
505
505
  "name": "claim_kickback_fee",
506
506
  "friends": [],
507
507
  "exposed_functions": [
@@ -524,7 +524,7 @@ var claimKickbackFee_default = ABI18;
524
524
 
525
525
  // generated_types/replaceMultipleOrders.ts
526
526
  var ABI19 = {
527
- "address": "0xb0212a8a1f2f811e63462d6acddc2d49d9e0a29021f460e24a70fa522a81c11a",
527
+ "address": "0x738cbcffc724a6a6d27db14e7c165c7e20bb523679a01697623ce907ed1df24b",
528
528
  "name": "replace_multiple_orders",
529
529
  "friends": [],
530
530
  "exposed_functions": [
@@ -552,7 +552,7 @@ var replaceMultipleOrders_default = ABI19;
552
552
 
553
553
  // generated_types/claimDeposit.ts
554
554
  var ABI20 = {
555
- "address": "0xb0212a8a1f2f811e63462d6acddc2d49d9e0a29021f460e24a70fa522a81c11a",
555
+ "address": "0x738cbcffc724a6a6d27db14e7c165c7e20bb523679a01697623ce907ed1df24b",
556
556
  "name": "claim_deposit",
557
557
  "friends": [],
558
558
  "exposed_functions": [
@@ -576,7 +576,7 @@ var claimDeposit_default = ABI20;
576
576
 
577
577
  // generated_types/removeApiKeySigner.ts
578
578
  var ABI21 = {
579
- "address": "0xb0212a8a1f2f811e63462d6acddc2d49d9e0a29021f460e24a70fa522a81c11a",
579
+ "address": "0x738cbcffc724a6a6d27db14e7c165c7e20bb523679a01697623ce907ed1df24b",
580
580
  "name": "remove_api_key_signer",
581
581
  "friends": [],
582
582
  "exposed_functions": [
@@ -600,7 +600,7 @@ var removeApiKeySigner_default = ABI21;
600
600
 
601
601
  // generated_types/setReferralCode.ts
602
602
  var ABI22 = {
603
- "address": "0xb0212a8a1f2f811e63462d6acddc2d49d9e0a29021f460e24a70fa522a81c11a",
603
+ "address": "0x738cbcffc724a6a6d27db14e7c165c7e20bb523679a01697623ce907ed1df24b",
604
604
  "name": "set_referral_code",
605
605
  "friends": [],
606
606
  "exposed_functions": [
@@ -624,7 +624,7 @@ var setReferralCode_default = ABI22;
624
624
 
625
625
  // generated_types/tokenizeUserVaultInvestment.ts
626
626
  var ABI23 = {
627
- "address": "0xb0212a8a1f2f811e63462d6acddc2d49d9e0a29021f460e24a70fa522a81c11a",
627
+ "address": "0x738cbcffc724a6a6d27db14e7c165c7e20bb523679a01697623ce907ed1df24b",
628
628
  "name": "tokenize_user_vault_investment",
629
629
  "friends": [],
630
630
  "exposed_functions": [
@@ -648,7 +648,7 @@ var tokenizeUserVaultInvestment_default = ABI23;
648
648
 
649
649
  // generated_types/addCredits.ts
650
650
  var ABI24 = {
651
- "address": "0xb0212a8a1f2f811e63462d6acddc2d49d9e0a29021f460e24a70fa522a81c11a",
651
+ "address": "0x738cbcffc724a6a6d27db14e7c165c7e20bb523679a01697623ce907ed1df24b",
652
652
  "name": "add_credits",
653
653
  "friends": [],
654
654
  "exposed_functions": [
@@ -752,6 +752,7 @@ var EndpointsV1 = /* @__PURE__ */ ((EndpointsV12) => {
752
752
  EndpointsV12["GetVaultHistoricalData"] = "/v1/get_vault_historical_data";
753
753
  EndpointsV12["GetIndexPriceHistory"] = "/v1/get_index_price_history";
754
754
  EndpointsV12["ServicesStatus"] = "/v1/services_status";
755
+ EndpointsV12["GetUserAggregatedVaultStats"] = "/v1/get_user_aggregated_vault_stats";
755
756
  return EndpointsV12;
756
757
  })(EndpointsV1 || {});
757
758
  var SpotMarketStatus = /* @__PURE__ */ ((SpotMarketStatus2) => {
@@ -774,7 +775,7 @@ var UserStatus = /* @__PURE__ */ ((UserStatus2) => {
774
775
 
775
776
  // generated_types/withdrawFromVault.ts
776
777
  var ABI25 = {
777
- "address": "0xb0212a8a1f2f811e63462d6acddc2d49d9e0a29021f460e24a70fa522a81c11a",
778
+ "address": "0x738cbcffc724a6a6d27db14e7c165c7e20bb523679a01697623ce907ed1df24b",
778
779
  "name": "withdraw_from_vault",
779
780
  "friends": [],
780
781
  "exposed_functions": [
@@ -1150,7 +1151,7 @@ var Client = class _Client {
1150
1151
  return response;
1151
1152
  };
1152
1153
  this.setReferralParams = async (request) => {
1153
- await this.sendPostJson(request, "/v1/set_user_referral_params" /* SetUserReferralParams */);
1154
+ return await this.sendPostJson(request, "/v1/set_user_referral_params" /* SetUserReferralParams */);
1154
1155
  };
1155
1156
  //////////////////////////////////////// GETTERS
1156
1157
  this.sendGetJson = async (endpoint, message) => {
@@ -1411,6 +1412,10 @@ var Client = class _Client {
1411
1412
  const response = await this.sendGetJson("/v1/get_index_price_history" /* GetIndexPriceHistory */, request);
1412
1413
  return response;
1413
1414
  };
1415
+ this.getUserAggregatedVaultStats = async (request) => {
1416
+ const response = await this.sendGetJson("/v1/get_user_aggregated_vault_stats" /* GetUserAggregatedVaultStats */, request);
1417
+ return response;
1418
+ };
1414
1419
  // Meta
1415
1420
  this.getTime = async () => {
1416
1421
  const response = await this.sendGetJson("/time" /* Time */);
@@ -2138,7 +2143,7 @@ function parseEntryFunctionAbi(args) {
2138
2143
 
2139
2144
  // generated_types/faucetEntrypoints.ts
2140
2145
  var ABI26 = {
2141
- "address": "0xb0212a8a1f2f811e63462d6acddc2d49d9e0a29021f460e24a70fa522a81c11a",
2146
+ "address": "0x738cbcffc724a6a6d27db14e7c165c7e20bb523679a01697623ce907ed1df24b",
2142
2147
  "name": "faucet_entrypoints",
2143
2148
  "friends": [],
2144
2149
  "exposed_functions": [
package/dist/index.d.cts CHANGED
@@ -178,13 +178,18 @@ interface PerpetualMarketConfigEntry {
178
178
  status: PerpetualMarketStatus;
179
179
  fundingRate: FundingRate;
180
180
  }
181
+ interface FeeData {
182
+ basicMakerFee: string;
183
+ basicTakerFee: string;
184
+ feeToVaultAccount: string;
185
+ feeTiers: Record<string, FeeTier>;
186
+ }
181
187
  interface ExchangeConfig {
182
188
  tokens: Record<string, TokenConfigEntry>;
183
189
  usdcAddress?: string;
184
190
  perpetualsMarkets: Record<string, PerpetualMarketConfigEntry>;
185
- feeTiers: Record<string, FeeTier>;
186
- basicMakerFee: string;
187
- basicTakerFee: string;
191
+ feeData: FeeData;
192
+ systemHaircut: string;
188
193
  }
189
194
  interface FeeTier {
190
195
  volume: string;
@@ -487,6 +492,21 @@ interface UserAggregatedStats {
487
492
  interface GetUserAggregatedStatsResponse {
488
493
  userAggregatedStats: UserAggregatedStats;
489
494
  }
495
+ interface GetUserAggregatedVaultStatsRequest {
496
+ userId: string;
497
+ vaultId?: string;
498
+ }
499
+ interface UserAggregatedVaultStats {
500
+ userId: string;
501
+ vaultId: string;
502
+ depositAmount: string;
503
+ depositCount: string;
504
+ withdrawAmount: string;
505
+ withdrawCount: string;
506
+ }
507
+ interface GetUserAggregatedVaultStatsResponse {
508
+ userAggregatedVaultStats: UserAggregatedVaultStats[];
509
+ }
490
510
  interface GetUserClaimedKickbackHistoryRequest {
491
511
  userId: string;
492
512
  olderTimestampMs?: string;
@@ -516,7 +536,7 @@ interface PerpPosition {
516
536
  fundingCheckpoint: FundingCheckpoint;
517
537
  }
518
538
  interface Referral {
519
- masterCode: string;
539
+ masterCode?: string;
520
540
  slaveKickback: string;
521
541
  masterKickback: string;
522
542
  }
@@ -557,9 +577,11 @@ interface GetUserDepositsRequest {
557
577
  }
558
578
  interface HistoricalDeposit {
559
579
  userId: string;
580
+ tokenName: string;
560
581
  tokenAddress: string;
561
582
  hash: string;
562
583
  amount: string;
584
+ depositValue: string;
563
585
  timestamp: string;
564
586
  }
565
587
  interface GetUserDepositsResponse {
@@ -696,6 +718,8 @@ interface GetUserWithdrawalsRequest {
696
718
  interface HistoricalWithdraw {
697
719
  userId: string;
698
720
  tokenAddress: string;
721
+ tokenName: string;
722
+ withdrawValue: string;
699
723
  hash: string;
700
724
  amount: string;
701
725
  timestamp: string;
@@ -729,8 +753,6 @@ interface GetVaultHistoricalDataRequest {
729
753
  interface VaultHistoricalData {
730
754
  vaultId: string;
731
755
  totalShares: string;
732
- minDeposit: string;
733
- tokenAddress?: string;
734
756
  holders: string;
735
757
  timestamp: string;
736
758
  }
@@ -849,6 +871,9 @@ interface SetReferralParamsRequest {
849
871
  userId: string;
850
872
  masterCode: string;
851
873
  }
874
+ interface SetReferralParamsResponse {
875
+ txHash?: string;
876
+ }
852
877
  interface StatusResponse {
853
878
  status: string;
854
879
  }
@@ -892,6 +917,7 @@ interface UserTransfer {
892
917
  amount: string;
893
918
  }
894
919
  interface VaultDeposit {
920
+ vaultId: string;
895
921
  userId: string;
896
922
  usdAmount: string;
897
923
  }
@@ -899,6 +925,7 @@ interface VaultInvestment {
899
925
  sharesAmount: string;
900
926
  }
901
927
  interface VaultWithdraw {
928
+ vaultId: string;
902
929
  userId: string;
903
930
  usdAmount: string;
904
931
  }
@@ -958,7 +985,8 @@ declare enum EndpointsV1 {
958
985
  GetUserVaultWithdrawals = "/v1/get_user_vault_withdrawals",
959
986
  GetVaultHistoricalData = "/v1/get_vault_historical_data",
960
987
  GetIndexPriceHistory = "/v1/get_index_price_history",
961
- ServicesStatus = "/v1/services_status"
988
+ ServicesStatus = "/v1/services_status",
989
+ GetUserAggregatedVaultStats = "/v1/get_user_aggregated_vault_stats"
962
990
  }
963
991
  declare enum SpotMarketStatus {
964
992
  Halted = "halted",
@@ -1450,7 +1478,7 @@ declare class Client {
1450
1478
  claimDeposit(params: ClaimDepositParams): Promise<SubmitSponsoredTransactionResponse>;
1451
1479
  setReferralCode(params: SetReferralCodeParams): Promise<SubmitSponsoredTransactionResponse>;
1452
1480
  tokenizeUserVaultInvestment(params: TokenizeUserVaultInvestmentParams): Promise<SubmitSponsoredTransactionResponse>;
1453
- setReferralParams: (request: SetReferralParamsRequest) => Promise<void>;
1481
+ setReferralParams: (request: SetReferralParamsRequest) => Promise<SetReferralParamsResponse>;
1454
1482
  sendGetJson: (endpoint: string, message?: {
1455
1483
  [key: string]: any;
1456
1484
  }) => Promise<any>;
@@ -1489,6 +1517,7 @@ declare class Client {
1489
1517
  getUserVaultWithdraws: (request: GetUserWithdrawalsRequest) => Promise<GetUserWithdrawalsResponse>;
1490
1518
  getVaultHistoricalData: (request: GetVaultHistoricalDataRequest) => Promise<GetVaultHistoricalDataResponse>;
1491
1519
  getHistoricalIndexPrices: (request: GetIndexPriceHistoryRequest) => Promise<GetIndexPriceHistoryResponse>;
1520
+ getUserAggregatedVaultStats: (request: GetUserAggregatedVaultStatsRequest) => Promise<GetUserAggregatedVaultStatsResponse>;
1492
1521
  getTime: () => Promise<string>;
1493
1522
  }
1494
1523
 
@@ -1520,4 +1549,4 @@ declare const generateApiKey: () => _aptos_labs_ts_sdk.Ed25519Account;
1520
1549
  declare const getTopicFromCommand: (data: WsCommand) => string;
1521
1550
  declare const getTopicFromMessage: (data: WsMessage) => string;
1522
1551
 
1523
- export { type AddApiCreditsParams, type AddApiKey, type AddApiKeyParams, type Address, AdminEndpoints, type ApiCreditsChange, type ApiStatus, type BalanceChange, BaseEndpoints, type Borrow, type BorrowLendUpdate, type BorrowLending, type BorrowLendingAggregatedData, type BorrowLendingHistoricalData, type CancelAllPerpOrdersParams, type CancelPerpOrdersParams, type CanceledPerpOrders, type ChangePerpOrderPriceParams, type ChartCandle, ChartInterval, type CheckReferralCodeRequest, type CheckReferralCodeResponse, type ClaimDepositParams, type ClaimKickbackFeeParams, type ClaimReferralFee, type ClaimReferralFeesParams, type ClaimUserKickbackFee, type ClaimedKickback, type ClaimedReferralKickback, Client, type Content, type CreateUserParams, type Deposit, type DepositToVaultParams, type DepositTokenParams, EndpointsV1, type ErrorResponse, type ExchangeConfig, ExchangeProxies, type FeeTier, type Fees, type FundingCheckpoint, type FundingPayment, type FundingRate, GLOBAL_DENOMINATOR, type GetBorrowLendingAggregatedStatsRequest, type GetBorrowLendingAggregatedStatsResponse, type GetBorrowLendingDataResponse, type GetBorrowLendingHistoricalDataRequest, type GetBorrowLendingHistoricalDataResponse, type GetChartCandlesInRangeRequest, type GetChartCandlesInRangeResponse, type GetIndexPriceHistoryRequest, type GetIndexPriceHistoryResponse, type GetPerpMarketsDataRequest, type GetPerpMarketsDataResponse, type GetPerpOrderBookDataRequest, type GetPerpOrderBookDataResponse, type GetPerpRecentTradesRequest, type GetPerpRecentTradesResponse, type GetPerpUserFillsRequest, type GetPerpUserFillsResponse, type GetPerpUserOrdersRequest, type GetPerpUserOrdersResponse, type GetPerpetualMarketsConfigResponse, type GetPriceIndexesResponse, type GetServicesStatusResponse, type GetTokenAggregatedStatsRequest, type GetTokenAggregatedStatsResponse, type GetTokenStatsHistoryRequest, type GetTokenStatsHistoryResponse, type GetTokensConfigResponse, type GetUserAggregatedReferralStatsRequest, type GetUserAggregatedReferralStatsResponse, type GetUserAggregatedStatsRequest, type GetUserAggregatedStatsResponse, type GetUserClaimedKickbackHistoryRequest, type GetUserClaimedKickbackHistoryResponse, type GetUserClaimedReferralKickbackHistoryRequest, type GetUserClaimedReferralKickbackHistoryResponse, type GetUserDataRequest, type GetUserDataResponse, type GetUserDepositsRequest, type GetUserDepositsResponse, type GetUserFundingHistoryRequest, type GetUserFundingHistoryResponse, type GetUserPortfolioValueRequest, type GetUserPortfolioValueResponse, type GetUserReferralStatsHistoryRequest, type GetUserReferralStatsHistoryResponse, type GetUserTradeStatsHistoryRequest, type GetUserTradeStatsHistoryResponse, type GetUserTransferHistoryRequest, type GetUserTransferHistoryResponse, type GetUserVaultDepositsRequest, type GetUserVaultDepositsResponse, type GetUserVaultWithdrawsRequest, type GetUserVaultWithdrawsResponse, type GetUserWithdrawalsRequest, type GetUserWithdrawalsResponse, type GetUsersByAddressRequest, type GetUsersByAddressResponse, type GetVaultDepositsRequest, type GetVaultDepositsResponse, type GetVaultHistoricalDataRequest, type GetVaultHistoricalDataResponse, type HistoricalDeposit, type HistoricalFunding, type HistoricalReferralStats, type HistoricalTokenStats, type HistoricalTradeStats, type HistoricalUserTransfer, type HistoricalVaultDeposit, type HistoricalVaultWithdraw, type HistoricalWithdraw, type IGetChartCandlesInRange, type IndexPriceHistory, type Lend, type LendTokenParams, type MarginStep, type MarketStatusChange, Network, type NodeStatus, type OracleUpdate, type OracleUpdates, type Order, type OrderFills, OrderSide, OrderStatus, OrderType, type OrderbookUpdate, type PaginationCursor, type PerpFill, type PerpMarketData, type PerpOrder, type PerpOrderBookData, type PerpOrderData, type PerpOrderDataForMarket, type PerpPosition, type PerpTrade, type PerpetualMarketConfigEntry, type PerpetualMarketStatus, type PlaceMultiplePerpOrdersParams, type PlacePerpLimitOrder, type PlacePerpMarketOrder, type PlacePerpOrderParams, type PriceIndex, type RedeemTokenParams, type Referral, type ReferralUpdate, type RemoveApiKey, type RemoveApiKeyParams, type RemoveApiKeySignerParams, type RepayBorrow, type ReplaceMultipleOrdersParams, type SetAlias, type SetAliasNameParams, type SetAutoLend, type SetAutolendParams, type SetReferralCodeParams, type SetReferralParamsRequest, SpotMarketStatus, Status, type StatusResponse, type SubServiceStatus, type SubmitSponsoredTransactionRequest, type SubmitSponsoredTransactionResponse, TestFaucet, type TimeResponse, type TokenAggregatedStats, type TokenConfigEntry, type TokenizeUserVaultInvestmentParams, type Topic, type Trade, TradeRole, type TradesUpdate, TransferAction, type TransferToUserParams, type TxParams, type UpdateUserFeeTier, type User, type UserAggregatedReferralStats, type UserAggregatedStats, type UserPortfolioValue, UserStatus, type UserTransfer, type UtilizationCurve, type Vault, type VaultDeposit, type VaultHistoricalData, type VaultInvestment, type VaultWithdraw, type Withdraw, type WithdrawFromVaultParams, type WithdrawLend, type WsBorrowLendUpdate, type WsCommand, type WsFill, type WsMessage, type WsOracleUpdates, type WsPerpMarketUpdates, type WsUserUpdates, generateApiKey, getRandomId, getTopicFromCommand, getTopicFromMessage, nowInMiliseconds, parseEntryFunctionAbi, sleep, toSystemValue };
1552
+ export { type AddApiCreditsParams, type AddApiKey, type AddApiKeyParams, type Address, AdminEndpoints, type ApiCreditsChange, type ApiStatus, type BalanceChange, BaseEndpoints, type Borrow, type BorrowLendUpdate, type BorrowLending, type BorrowLendingAggregatedData, type BorrowLendingHistoricalData, type CancelAllPerpOrdersParams, type CancelPerpOrdersParams, type CanceledPerpOrders, type ChangePerpOrderPriceParams, type ChartCandle, ChartInterval, type CheckReferralCodeRequest, type CheckReferralCodeResponse, type ClaimDepositParams, type ClaimKickbackFeeParams, type ClaimReferralFee, type ClaimReferralFeesParams, type ClaimUserKickbackFee, type ClaimedKickback, type ClaimedReferralKickback, Client, type Content, type CreateUserParams, type Deposit, type DepositToVaultParams, type DepositTokenParams, EndpointsV1, type ErrorResponse, type ExchangeConfig, ExchangeProxies, type FeeData, type FeeTier, type Fees, type FundingCheckpoint, type FundingPayment, type FundingRate, GLOBAL_DENOMINATOR, type GetBorrowLendingAggregatedStatsRequest, type GetBorrowLendingAggregatedStatsResponse, type GetBorrowLendingDataResponse, type GetBorrowLendingHistoricalDataRequest, type GetBorrowLendingHistoricalDataResponse, type GetChartCandlesInRangeRequest, type GetChartCandlesInRangeResponse, type GetIndexPriceHistoryRequest, type GetIndexPriceHistoryResponse, type GetPerpMarketsDataRequest, type GetPerpMarketsDataResponse, type GetPerpOrderBookDataRequest, type GetPerpOrderBookDataResponse, type GetPerpRecentTradesRequest, type GetPerpRecentTradesResponse, type GetPerpUserFillsRequest, type GetPerpUserFillsResponse, type GetPerpUserOrdersRequest, type GetPerpUserOrdersResponse, type GetPerpetualMarketsConfigResponse, type GetPriceIndexesResponse, type GetServicesStatusResponse, type GetTokenAggregatedStatsRequest, type GetTokenAggregatedStatsResponse, type GetTokenStatsHistoryRequest, type GetTokenStatsHistoryResponse, type GetTokensConfigResponse, type GetUserAggregatedReferralStatsRequest, type GetUserAggregatedReferralStatsResponse, type GetUserAggregatedStatsRequest, type GetUserAggregatedStatsResponse, type GetUserAggregatedVaultStatsRequest, type GetUserAggregatedVaultStatsResponse, type GetUserClaimedKickbackHistoryRequest, type GetUserClaimedKickbackHistoryResponse, type GetUserClaimedReferralKickbackHistoryRequest, type GetUserClaimedReferralKickbackHistoryResponse, type GetUserDataRequest, type GetUserDataResponse, type GetUserDepositsRequest, type GetUserDepositsResponse, type GetUserFundingHistoryRequest, type GetUserFundingHistoryResponse, type GetUserPortfolioValueRequest, type GetUserPortfolioValueResponse, type GetUserReferralStatsHistoryRequest, type GetUserReferralStatsHistoryResponse, type GetUserTradeStatsHistoryRequest, type GetUserTradeStatsHistoryResponse, type GetUserTransferHistoryRequest, type GetUserTransferHistoryResponse, type GetUserVaultDepositsRequest, type GetUserVaultDepositsResponse, type GetUserVaultWithdrawsRequest, type GetUserVaultWithdrawsResponse, type GetUserWithdrawalsRequest, type GetUserWithdrawalsResponse, type GetUsersByAddressRequest, type GetUsersByAddressResponse, type GetVaultDepositsRequest, type GetVaultDepositsResponse, type GetVaultHistoricalDataRequest, type GetVaultHistoricalDataResponse, type HistoricalDeposit, type HistoricalFunding, type HistoricalReferralStats, type HistoricalTokenStats, type HistoricalTradeStats, type HistoricalUserTransfer, type HistoricalVaultDeposit, type HistoricalVaultWithdraw, type HistoricalWithdraw, type IGetChartCandlesInRange, type IndexPriceHistory, type Lend, type LendTokenParams, type MarginStep, type MarketStatusChange, Network, type NodeStatus, type OracleUpdate, type OracleUpdates, type Order, type OrderFills, OrderSide, OrderStatus, OrderType, type OrderbookUpdate, type PaginationCursor, type PerpFill, type PerpMarketData, type PerpOrder, type PerpOrderBookData, type PerpOrderData, type PerpOrderDataForMarket, type PerpPosition, type PerpTrade, type PerpetualMarketConfigEntry, type PerpetualMarketStatus, type PlaceMultiplePerpOrdersParams, type PlacePerpLimitOrder, type PlacePerpMarketOrder, type PlacePerpOrderParams, type PriceIndex, type RedeemTokenParams, type Referral, type ReferralUpdate, type RemoveApiKey, type RemoveApiKeyParams, type RemoveApiKeySignerParams, type RepayBorrow, type ReplaceMultipleOrdersParams, type SetAlias, type SetAliasNameParams, type SetAutoLend, type SetAutolendParams, type SetReferralCodeParams, type SetReferralParamsRequest, type SetReferralParamsResponse, SpotMarketStatus, Status, type StatusResponse, type SubServiceStatus, type SubmitSponsoredTransactionRequest, type SubmitSponsoredTransactionResponse, TestFaucet, type TimeResponse, type TokenAggregatedStats, type TokenConfigEntry, type TokenizeUserVaultInvestmentParams, type Topic, type Trade, TradeRole, type TradesUpdate, TransferAction, type TransferToUserParams, type TxParams, type UpdateUserFeeTier, type User, type UserAggregatedReferralStats, type UserAggregatedStats, type UserAggregatedVaultStats, type UserPortfolioValue, UserStatus, type UserTransfer, type UtilizationCurve, type Vault, type VaultDeposit, type VaultHistoricalData, type VaultInvestment, type VaultWithdraw, type Withdraw, type WithdrawFromVaultParams, type WithdrawLend, type WsBorrowLendUpdate, type WsCommand, type WsFill, type WsMessage, type WsOracleUpdates, type WsPerpMarketUpdates, type WsUserUpdates, generateApiKey, getRandomId, getTopicFromCommand, getTopicFromMessage, nowInMiliseconds, parseEntryFunctionAbi, sleep, toSystemValue };
package/dist/index.d.ts CHANGED
@@ -178,13 +178,18 @@ interface PerpetualMarketConfigEntry {
178
178
  status: PerpetualMarketStatus;
179
179
  fundingRate: FundingRate;
180
180
  }
181
+ interface FeeData {
182
+ basicMakerFee: string;
183
+ basicTakerFee: string;
184
+ feeToVaultAccount: string;
185
+ feeTiers: Record<string, FeeTier>;
186
+ }
181
187
  interface ExchangeConfig {
182
188
  tokens: Record<string, TokenConfigEntry>;
183
189
  usdcAddress?: string;
184
190
  perpetualsMarkets: Record<string, PerpetualMarketConfigEntry>;
185
- feeTiers: Record<string, FeeTier>;
186
- basicMakerFee: string;
187
- basicTakerFee: string;
191
+ feeData: FeeData;
192
+ systemHaircut: string;
188
193
  }
189
194
  interface FeeTier {
190
195
  volume: string;
@@ -487,6 +492,21 @@ interface UserAggregatedStats {
487
492
  interface GetUserAggregatedStatsResponse {
488
493
  userAggregatedStats: UserAggregatedStats;
489
494
  }
495
+ interface GetUserAggregatedVaultStatsRequest {
496
+ userId: string;
497
+ vaultId?: string;
498
+ }
499
+ interface UserAggregatedVaultStats {
500
+ userId: string;
501
+ vaultId: string;
502
+ depositAmount: string;
503
+ depositCount: string;
504
+ withdrawAmount: string;
505
+ withdrawCount: string;
506
+ }
507
+ interface GetUserAggregatedVaultStatsResponse {
508
+ userAggregatedVaultStats: UserAggregatedVaultStats[];
509
+ }
490
510
  interface GetUserClaimedKickbackHistoryRequest {
491
511
  userId: string;
492
512
  olderTimestampMs?: string;
@@ -516,7 +536,7 @@ interface PerpPosition {
516
536
  fundingCheckpoint: FundingCheckpoint;
517
537
  }
518
538
  interface Referral {
519
- masterCode: string;
539
+ masterCode?: string;
520
540
  slaveKickback: string;
521
541
  masterKickback: string;
522
542
  }
@@ -557,9 +577,11 @@ interface GetUserDepositsRequest {
557
577
  }
558
578
  interface HistoricalDeposit {
559
579
  userId: string;
580
+ tokenName: string;
560
581
  tokenAddress: string;
561
582
  hash: string;
562
583
  amount: string;
584
+ depositValue: string;
563
585
  timestamp: string;
564
586
  }
565
587
  interface GetUserDepositsResponse {
@@ -696,6 +718,8 @@ interface GetUserWithdrawalsRequest {
696
718
  interface HistoricalWithdraw {
697
719
  userId: string;
698
720
  tokenAddress: string;
721
+ tokenName: string;
722
+ withdrawValue: string;
699
723
  hash: string;
700
724
  amount: string;
701
725
  timestamp: string;
@@ -729,8 +753,6 @@ interface GetVaultHistoricalDataRequest {
729
753
  interface VaultHistoricalData {
730
754
  vaultId: string;
731
755
  totalShares: string;
732
- minDeposit: string;
733
- tokenAddress?: string;
734
756
  holders: string;
735
757
  timestamp: string;
736
758
  }
@@ -849,6 +871,9 @@ interface SetReferralParamsRequest {
849
871
  userId: string;
850
872
  masterCode: string;
851
873
  }
874
+ interface SetReferralParamsResponse {
875
+ txHash?: string;
876
+ }
852
877
  interface StatusResponse {
853
878
  status: string;
854
879
  }
@@ -892,6 +917,7 @@ interface UserTransfer {
892
917
  amount: string;
893
918
  }
894
919
  interface VaultDeposit {
920
+ vaultId: string;
895
921
  userId: string;
896
922
  usdAmount: string;
897
923
  }
@@ -899,6 +925,7 @@ interface VaultInvestment {
899
925
  sharesAmount: string;
900
926
  }
901
927
  interface VaultWithdraw {
928
+ vaultId: string;
902
929
  userId: string;
903
930
  usdAmount: string;
904
931
  }
@@ -958,7 +985,8 @@ declare enum EndpointsV1 {
958
985
  GetUserVaultWithdrawals = "/v1/get_user_vault_withdrawals",
959
986
  GetVaultHistoricalData = "/v1/get_vault_historical_data",
960
987
  GetIndexPriceHistory = "/v1/get_index_price_history",
961
- ServicesStatus = "/v1/services_status"
988
+ ServicesStatus = "/v1/services_status",
989
+ GetUserAggregatedVaultStats = "/v1/get_user_aggregated_vault_stats"
962
990
  }
963
991
  declare enum SpotMarketStatus {
964
992
  Halted = "halted",
@@ -1450,7 +1478,7 @@ declare class Client {
1450
1478
  claimDeposit(params: ClaimDepositParams): Promise<SubmitSponsoredTransactionResponse>;
1451
1479
  setReferralCode(params: SetReferralCodeParams): Promise<SubmitSponsoredTransactionResponse>;
1452
1480
  tokenizeUserVaultInvestment(params: TokenizeUserVaultInvestmentParams): Promise<SubmitSponsoredTransactionResponse>;
1453
- setReferralParams: (request: SetReferralParamsRequest) => Promise<void>;
1481
+ setReferralParams: (request: SetReferralParamsRequest) => Promise<SetReferralParamsResponse>;
1454
1482
  sendGetJson: (endpoint: string, message?: {
1455
1483
  [key: string]: any;
1456
1484
  }) => Promise<any>;
@@ -1489,6 +1517,7 @@ declare class Client {
1489
1517
  getUserVaultWithdraws: (request: GetUserWithdrawalsRequest) => Promise<GetUserWithdrawalsResponse>;
1490
1518
  getVaultHistoricalData: (request: GetVaultHistoricalDataRequest) => Promise<GetVaultHistoricalDataResponse>;
1491
1519
  getHistoricalIndexPrices: (request: GetIndexPriceHistoryRequest) => Promise<GetIndexPriceHistoryResponse>;
1520
+ getUserAggregatedVaultStats: (request: GetUserAggregatedVaultStatsRequest) => Promise<GetUserAggregatedVaultStatsResponse>;
1492
1521
  getTime: () => Promise<string>;
1493
1522
  }
1494
1523
 
@@ -1520,4 +1549,4 @@ declare const generateApiKey: () => _aptos_labs_ts_sdk.Ed25519Account;
1520
1549
  declare const getTopicFromCommand: (data: WsCommand) => string;
1521
1550
  declare const getTopicFromMessage: (data: WsMessage) => string;
1522
1551
 
1523
- export { type AddApiCreditsParams, type AddApiKey, type AddApiKeyParams, type Address, AdminEndpoints, type ApiCreditsChange, type ApiStatus, type BalanceChange, BaseEndpoints, type Borrow, type BorrowLendUpdate, type BorrowLending, type BorrowLendingAggregatedData, type BorrowLendingHistoricalData, type CancelAllPerpOrdersParams, type CancelPerpOrdersParams, type CanceledPerpOrders, type ChangePerpOrderPriceParams, type ChartCandle, ChartInterval, type CheckReferralCodeRequest, type CheckReferralCodeResponse, type ClaimDepositParams, type ClaimKickbackFeeParams, type ClaimReferralFee, type ClaimReferralFeesParams, type ClaimUserKickbackFee, type ClaimedKickback, type ClaimedReferralKickback, Client, type Content, type CreateUserParams, type Deposit, type DepositToVaultParams, type DepositTokenParams, EndpointsV1, type ErrorResponse, type ExchangeConfig, ExchangeProxies, type FeeTier, type Fees, type FundingCheckpoint, type FundingPayment, type FundingRate, GLOBAL_DENOMINATOR, type GetBorrowLendingAggregatedStatsRequest, type GetBorrowLendingAggregatedStatsResponse, type GetBorrowLendingDataResponse, type GetBorrowLendingHistoricalDataRequest, type GetBorrowLendingHistoricalDataResponse, type GetChartCandlesInRangeRequest, type GetChartCandlesInRangeResponse, type GetIndexPriceHistoryRequest, type GetIndexPriceHistoryResponse, type GetPerpMarketsDataRequest, type GetPerpMarketsDataResponse, type GetPerpOrderBookDataRequest, type GetPerpOrderBookDataResponse, type GetPerpRecentTradesRequest, type GetPerpRecentTradesResponse, type GetPerpUserFillsRequest, type GetPerpUserFillsResponse, type GetPerpUserOrdersRequest, type GetPerpUserOrdersResponse, type GetPerpetualMarketsConfigResponse, type GetPriceIndexesResponse, type GetServicesStatusResponse, type GetTokenAggregatedStatsRequest, type GetTokenAggregatedStatsResponse, type GetTokenStatsHistoryRequest, type GetTokenStatsHistoryResponse, type GetTokensConfigResponse, type GetUserAggregatedReferralStatsRequest, type GetUserAggregatedReferralStatsResponse, type GetUserAggregatedStatsRequest, type GetUserAggregatedStatsResponse, type GetUserClaimedKickbackHistoryRequest, type GetUserClaimedKickbackHistoryResponse, type GetUserClaimedReferralKickbackHistoryRequest, type GetUserClaimedReferralKickbackHistoryResponse, type GetUserDataRequest, type GetUserDataResponse, type GetUserDepositsRequest, type GetUserDepositsResponse, type GetUserFundingHistoryRequest, type GetUserFundingHistoryResponse, type GetUserPortfolioValueRequest, type GetUserPortfolioValueResponse, type GetUserReferralStatsHistoryRequest, type GetUserReferralStatsHistoryResponse, type GetUserTradeStatsHistoryRequest, type GetUserTradeStatsHistoryResponse, type GetUserTransferHistoryRequest, type GetUserTransferHistoryResponse, type GetUserVaultDepositsRequest, type GetUserVaultDepositsResponse, type GetUserVaultWithdrawsRequest, type GetUserVaultWithdrawsResponse, type GetUserWithdrawalsRequest, type GetUserWithdrawalsResponse, type GetUsersByAddressRequest, type GetUsersByAddressResponse, type GetVaultDepositsRequest, type GetVaultDepositsResponse, type GetVaultHistoricalDataRequest, type GetVaultHistoricalDataResponse, type HistoricalDeposit, type HistoricalFunding, type HistoricalReferralStats, type HistoricalTokenStats, type HistoricalTradeStats, type HistoricalUserTransfer, type HistoricalVaultDeposit, type HistoricalVaultWithdraw, type HistoricalWithdraw, type IGetChartCandlesInRange, type IndexPriceHistory, type Lend, type LendTokenParams, type MarginStep, type MarketStatusChange, Network, type NodeStatus, type OracleUpdate, type OracleUpdates, type Order, type OrderFills, OrderSide, OrderStatus, OrderType, type OrderbookUpdate, type PaginationCursor, type PerpFill, type PerpMarketData, type PerpOrder, type PerpOrderBookData, type PerpOrderData, type PerpOrderDataForMarket, type PerpPosition, type PerpTrade, type PerpetualMarketConfigEntry, type PerpetualMarketStatus, type PlaceMultiplePerpOrdersParams, type PlacePerpLimitOrder, type PlacePerpMarketOrder, type PlacePerpOrderParams, type PriceIndex, type RedeemTokenParams, type Referral, type ReferralUpdate, type RemoveApiKey, type RemoveApiKeyParams, type RemoveApiKeySignerParams, type RepayBorrow, type ReplaceMultipleOrdersParams, type SetAlias, type SetAliasNameParams, type SetAutoLend, type SetAutolendParams, type SetReferralCodeParams, type SetReferralParamsRequest, SpotMarketStatus, Status, type StatusResponse, type SubServiceStatus, type SubmitSponsoredTransactionRequest, type SubmitSponsoredTransactionResponse, TestFaucet, type TimeResponse, type TokenAggregatedStats, type TokenConfigEntry, type TokenizeUserVaultInvestmentParams, type Topic, type Trade, TradeRole, type TradesUpdate, TransferAction, type TransferToUserParams, type TxParams, type UpdateUserFeeTier, type User, type UserAggregatedReferralStats, type UserAggregatedStats, type UserPortfolioValue, UserStatus, type UserTransfer, type UtilizationCurve, type Vault, type VaultDeposit, type VaultHistoricalData, type VaultInvestment, type VaultWithdraw, type Withdraw, type WithdrawFromVaultParams, type WithdrawLend, type WsBorrowLendUpdate, type WsCommand, type WsFill, type WsMessage, type WsOracleUpdates, type WsPerpMarketUpdates, type WsUserUpdates, generateApiKey, getRandomId, getTopicFromCommand, getTopicFromMessage, nowInMiliseconds, parseEntryFunctionAbi, sleep, toSystemValue };
1552
+ export { type AddApiCreditsParams, type AddApiKey, type AddApiKeyParams, type Address, AdminEndpoints, type ApiCreditsChange, type ApiStatus, type BalanceChange, BaseEndpoints, type Borrow, type BorrowLendUpdate, type BorrowLending, type BorrowLendingAggregatedData, type BorrowLendingHistoricalData, type CancelAllPerpOrdersParams, type CancelPerpOrdersParams, type CanceledPerpOrders, type ChangePerpOrderPriceParams, type ChartCandle, ChartInterval, type CheckReferralCodeRequest, type CheckReferralCodeResponse, type ClaimDepositParams, type ClaimKickbackFeeParams, type ClaimReferralFee, type ClaimReferralFeesParams, type ClaimUserKickbackFee, type ClaimedKickback, type ClaimedReferralKickback, Client, type Content, type CreateUserParams, type Deposit, type DepositToVaultParams, type DepositTokenParams, EndpointsV1, type ErrorResponse, type ExchangeConfig, ExchangeProxies, type FeeData, type FeeTier, type Fees, type FundingCheckpoint, type FundingPayment, type FundingRate, GLOBAL_DENOMINATOR, type GetBorrowLendingAggregatedStatsRequest, type GetBorrowLendingAggregatedStatsResponse, type GetBorrowLendingDataResponse, type GetBorrowLendingHistoricalDataRequest, type GetBorrowLendingHistoricalDataResponse, type GetChartCandlesInRangeRequest, type GetChartCandlesInRangeResponse, type GetIndexPriceHistoryRequest, type GetIndexPriceHistoryResponse, type GetPerpMarketsDataRequest, type GetPerpMarketsDataResponse, type GetPerpOrderBookDataRequest, type GetPerpOrderBookDataResponse, type GetPerpRecentTradesRequest, type GetPerpRecentTradesResponse, type GetPerpUserFillsRequest, type GetPerpUserFillsResponse, type GetPerpUserOrdersRequest, type GetPerpUserOrdersResponse, type GetPerpetualMarketsConfigResponse, type GetPriceIndexesResponse, type GetServicesStatusResponse, type GetTokenAggregatedStatsRequest, type GetTokenAggregatedStatsResponse, type GetTokenStatsHistoryRequest, type GetTokenStatsHistoryResponse, type GetTokensConfigResponse, type GetUserAggregatedReferralStatsRequest, type GetUserAggregatedReferralStatsResponse, type GetUserAggregatedStatsRequest, type GetUserAggregatedStatsResponse, type GetUserAggregatedVaultStatsRequest, type GetUserAggregatedVaultStatsResponse, type GetUserClaimedKickbackHistoryRequest, type GetUserClaimedKickbackHistoryResponse, type GetUserClaimedReferralKickbackHistoryRequest, type GetUserClaimedReferralKickbackHistoryResponse, type GetUserDataRequest, type GetUserDataResponse, type GetUserDepositsRequest, type GetUserDepositsResponse, type GetUserFundingHistoryRequest, type GetUserFundingHistoryResponse, type GetUserPortfolioValueRequest, type GetUserPortfolioValueResponse, type GetUserReferralStatsHistoryRequest, type GetUserReferralStatsHistoryResponse, type GetUserTradeStatsHistoryRequest, type GetUserTradeStatsHistoryResponse, type GetUserTransferHistoryRequest, type GetUserTransferHistoryResponse, type GetUserVaultDepositsRequest, type GetUserVaultDepositsResponse, type GetUserVaultWithdrawsRequest, type GetUserVaultWithdrawsResponse, type GetUserWithdrawalsRequest, type GetUserWithdrawalsResponse, type GetUsersByAddressRequest, type GetUsersByAddressResponse, type GetVaultDepositsRequest, type GetVaultDepositsResponse, type GetVaultHistoricalDataRequest, type GetVaultHistoricalDataResponse, type HistoricalDeposit, type HistoricalFunding, type HistoricalReferralStats, type HistoricalTokenStats, type HistoricalTradeStats, type HistoricalUserTransfer, type HistoricalVaultDeposit, type HistoricalVaultWithdraw, type HistoricalWithdraw, type IGetChartCandlesInRange, type IndexPriceHistory, type Lend, type LendTokenParams, type MarginStep, type MarketStatusChange, Network, type NodeStatus, type OracleUpdate, type OracleUpdates, type Order, type OrderFills, OrderSide, OrderStatus, OrderType, type OrderbookUpdate, type PaginationCursor, type PerpFill, type PerpMarketData, type PerpOrder, type PerpOrderBookData, type PerpOrderData, type PerpOrderDataForMarket, type PerpPosition, type PerpTrade, type PerpetualMarketConfigEntry, type PerpetualMarketStatus, type PlaceMultiplePerpOrdersParams, type PlacePerpLimitOrder, type PlacePerpMarketOrder, type PlacePerpOrderParams, type PriceIndex, type RedeemTokenParams, type Referral, type ReferralUpdate, type RemoveApiKey, type RemoveApiKeyParams, type RemoveApiKeySignerParams, type RepayBorrow, type ReplaceMultipleOrdersParams, type SetAlias, type SetAliasNameParams, type SetAutoLend, type SetAutolendParams, type SetReferralCodeParams, type SetReferralParamsRequest, type SetReferralParamsResponse, SpotMarketStatus, Status, type StatusResponse, type SubServiceStatus, type SubmitSponsoredTransactionRequest, type SubmitSponsoredTransactionResponse, TestFaucet, type TimeResponse, type TokenAggregatedStats, type TokenConfigEntry, type TokenizeUserVaultInvestmentParams, type Topic, type Trade, TradeRole, type TradesUpdate, TransferAction, type TransferToUserParams, type TxParams, type UpdateUserFeeTier, type User, type UserAggregatedReferralStats, type UserAggregatedStats, type UserAggregatedVaultStats, type UserPortfolioValue, UserStatus, type UserTransfer, type UtilizationCurve, type Vault, type VaultDeposit, type VaultHistoricalData, type VaultInvestment, type VaultWithdraw, type Withdraw, type WithdrawFromVaultParams, type WithdrawLend, type WsBorrowLendUpdate, type WsCommand, type WsFill, type WsMessage, type WsOracleUpdates, type WsPerpMarketUpdates, type WsUserUpdates, generateApiKey, getRandomId, getTopicFromCommand, getTopicFromMessage, nowInMiliseconds, parseEntryFunctionAbi, sleep, toSystemValue };
package/dist/index.js CHANGED
@@ -15,7 +15,7 @@ import { v4 as uuidv4 } from "uuid";
15
15
 
16
16
  // generated_types/addApiKey.ts
17
17
  var ABI = {
18
- "address": "0xb0212a8a1f2f811e63462d6acddc2d49d9e0a29021f460e24a70fa522a81c11a",
18
+ "address": "0x738cbcffc724a6a6d27db14e7c165c7e20bb523679a01697623ce907ed1df24b",
19
19
  "name": "add_api_key",
20
20
  "friends": [],
21
21
  "exposed_functions": [
@@ -40,7 +40,7 @@ var addApiKey_default = ABI;
40
40
 
41
41
  // generated_types/cancelAllPerpOrders.ts
42
42
  var ABI2 = {
43
- "address": "0xb0212a8a1f2f811e63462d6acddc2d49d9e0a29021f460e24a70fa522a81c11a",
43
+ "address": "0x738cbcffc724a6a6d27db14e7c165c7e20bb523679a01697623ce907ed1df24b",
44
44
  "name": "cancel_all_perp_orders",
45
45
  "friends": [],
46
46
  "exposed_functions": [
@@ -63,7 +63,7 @@ var cancelAllPerpOrders_default = ABI2;
63
63
 
64
64
  // generated_types/cancelPerpOrders.ts
65
65
  var ABI3 = {
66
- "address": "0xb0212a8a1f2f811e63462d6acddc2d49d9e0a29021f460e24a70fa522a81c11a",
66
+ "address": "0x738cbcffc724a6a6d27db14e7c165c7e20bb523679a01697623ce907ed1df24b",
67
67
  "name": "cancel_perp_orders",
68
68
  "friends": [],
69
69
  "exposed_functions": [
@@ -88,7 +88,7 @@ var cancelPerpOrders_default = ABI3;
88
88
 
89
89
  // generated_types/createUser.ts
90
90
  var ABI4 = {
91
- "address": "0xb0212a8a1f2f811e63462d6acddc2d49d9e0a29021f460e24a70fa522a81c11a",
91
+ "address": "0x738cbcffc724a6a6d27db14e7c165c7e20bb523679a01697623ce907ed1df24b",
92
92
  "name": "create_user",
93
93
  "friends": [],
94
94
  "exposed_functions": [
@@ -113,7 +113,7 @@ var createUser_default = ABI4;
113
113
 
114
114
  // generated_types/depositToVault.ts
115
115
  var ABI5 = {
116
- "address": "0xb0212a8a1f2f811e63462d6acddc2d49d9e0a29021f460e24a70fa522a81c11a",
116
+ "address": "0x738cbcffc724a6a6d27db14e7c165c7e20bb523679a01697623ce907ed1df24b",
117
117
  "name": "deposit_to_vault",
118
118
  "friends": [],
119
119
  "exposed_functions": [
@@ -138,7 +138,7 @@ var depositToVault_default = ABI5;
138
138
 
139
139
  // generated_types/depositToken.ts
140
140
  var ABI6 = {
141
- "address": "0xb0212a8a1f2f811e63462d6acddc2d49d9e0a29021f460e24a70fa522a81c11a",
141
+ "address": "0x738cbcffc724a6a6d27db14e7c165c7e20bb523679a01697623ce907ed1df24b",
142
142
  "name": "deposit_token",
143
143
  "friends": [],
144
144
  "exposed_functions": [
@@ -163,7 +163,7 @@ var depositToken_default = ABI6;
163
163
 
164
164
  // generated_types/lendToken.ts
165
165
  var ABI7 = {
166
- "address": "0xb0212a8a1f2f811e63462d6acddc2d49d9e0a29021f460e24a70fa522a81c11a",
166
+ "address": "0x738cbcffc724a6a6d27db14e7c165c7e20bb523679a01697623ce907ed1df24b",
167
167
  "name": "lend_token",
168
168
  "friends": [],
169
169
  "exposed_functions": [
@@ -189,7 +189,7 @@ var lendToken_default = ABI7;
189
189
 
190
190
  // generated_types/placePerpLimitOrder.ts
191
191
  var ABI8 = {
192
- "address": "0xb0212a8a1f2f811e63462d6acddc2d49d9e0a29021f460e24a70fa522a81c11a",
192
+ "address": "0x738cbcffc724a6a6d27db14e7c165c7e20bb523679a01697623ce907ed1df24b",
193
193
  "name": "place_perp_limit_order",
194
194
  "friends": [],
195
195
  "exposed_functions": [
@@ -218,7 +218,7 @@ var placePerpLimitOrder_default = ABI8;
218
218
 
219
219
  // generated_types/changePerpOrderPrice.ts
220
220
  var ABI9 = {
221
- "address": "0xb0212a8a1f2f811e63462d6acddc2d49d9e0a29021f460e24a70fa522a81c11a",
221
+ "address": "0x738cbcffc724a6a6d27db14e7c165c7e20bb523679a01697623ce907ed1df24b",
222
222
  "name": "change_perp_order_price",
223
223
  "friends": [],
224
224
  "exposed_functions": [
@@ -245,7 +245,7 @@ var changePerpOrderPrice_default = ABI9;
245
245
 
246
246
  // generated_types/placePerpMarketOrder.ts
247
247
  var ABI10 = {
248
- "address": "0xb0212a8a1f2f811e63462d6acddc2d49d9e0a29021f460e24a70fa522a81c11a",
248
+ "address": "0x738cbcffc724a6a6d27db14e7c165c7e20bb523679a01697623ce907ed1df24b",
249
249
  "name": "place_perp_market_order",
250
250
  "friends": [],
251
251
  "exposed_functions": [
@@ -273,7 +273,7 @@ var placePerpMarketOrder_default = ABI10;
273
273
 
274
274
  // generated_types/redeemToken.ts
275
275
  var ABI11 = {
276
- "address": "0xb0212a8a1f2f811e63462d6acddc2d49d9e0a29021f460e24a70fa522a81c11a",
276
+ "address": "0x738cbcffc724a6a6d27db14e7c165c7e20bb523679a01697623ce907ed1df24b",
277
277
  "name": "redeem_token",
278
278
  "friends": [],
279
279
  "exposed_functions": [
@@ -299,7 +299,7 @@ var redeemToken_default = ABI11;
299
299
 
300
300
  // generated_types/removeApiKey.ts
301
301
  var ABI12 = {
302
- "address": "0xb0212a8a1f2f811e63462d6acddc2d49d9e0a29021f460e24a70fa522a81c11a",
302
+ "address": "0x738cbcffc724a6a6d27db14e7c165c7e20bb523679a01697623ce907ed1df24b",
303
303
  "name": "remove_api_key",
304
304
  "friends": [],
305
305
  "exposed_functions": [
@@ -323,7 +323,7 @@ var removeApiKey_default = ABI12;
323
323
 
324
324
  // generated_types/setAliasName.ts
325
325
  var ABI13 = {
326
- "address": "0xb0212a8a1f2f811e63462d6acddc2d49d9e0a29021f460e24a70fa522a81c11a",
326
+ "address": "0x738cbcffc724a6a6d27db14e7c165c7e20bb523679a01697623ce907ed1df24b",
327
327
  "name": "set_alias_name",
328
328
  "friends": [],
329
329
  "exposed_functions": [
@@ -347,7 +347,7 @@ var setAliasName_default = ABI13;
347
347
 
348
348
  // generated_types/setAutolend.ts
349
349
  var ABI14 = {
350
- "address": "0xb0212a8a1f2f811e63462d6acddc2d49d9e0a29021f460e24a70fa522a81c11a",
350
+ "address": "0x738cbcffc724a6a6d27db14e7c165c7e20bb523679a01697623ce907ed1df24b",
351
351
  "name": "set_autolend",
352
352
  "friends": [],
353
353
  "exposed_functions": [
@@ -371,7 +371,7 @@ var setAutolend_default = ABI14;
371
371
 
372
372
  // generated_types/claimReferralFees.ts
373
373
  var ABI15 = {
374
- "address": "0xb0212a8a1f2f811e63462d6acddc2d49d9e0a29021f460e24a70fa522a81c11a",
374
+ "address": "0x738cbcffc724a6a6d27db14e7c165c7e20bb523679a01697623ce907ed1df24b",
375
375
  "name": "claim_referral_fees",
376
376
  "friends": [],
377
377
  "exposed_functions": [
@@ -395,7 +395,7 @@ var claimReferralFees_default = ABI15;
395
395
 
396
396
  // generated_types/transferToUser.ts
397
397
  var ABI16 = {
398
- "address": "0xb0212a8a1f2f811e63462d6acddc2d49d9e0a29021f460e24a70fa522a81c11a",
398
+ "address": "0x738cbcffc724a6a6d27db14e7c165c7e20bb523679a01697623ce907ed1df24b",
399
399
  "name": "transfer_to_user",
400
400
  "friends": [],
401
401
  "exposed_functions": [
@@ -422,7 +422,7 @@ var transferToUser_default = ABI16;
422
422
 
423
423
  // generated_types/placeMultiplePerpOrders.ts
424
424
  var ABI17 = {
425
- "address": "0xb0212a8a1f2f811e63462d6acddc2d49d9e0a29021f460e24a70fa522a81c11a",
425
+ "address": "0x738cbcffc724a6a6d27db14e7c165c7e20bb523679a01697623ce907ed1df24b",
426
426
  "name": "place_multiple_perp_orders",
427
427
  "friends": [],
428
428
  "exposed_functions": [
@@ -451,7 +451,7 @@ var placeMultiplePerpOrders_default = ABI17;
451
451
 
452
452
  // generated_types/claimKickbackFee.ts
453
453
  var ABI18 = {
454
- "address": "0xb0212a8a1f2f811e63462d6acddc2d49d9e0a29021f460e24a70fa522a81c11a",
454
+ "address": "0x738cbcffc724a6a6d27db14e7c165c7e20bb523679a01697623ce907ed1df24b",
455
455
  "name": "claim_kickback_fee",
456
456
  "friends": [],
457
457
  "exposed_functions": [
@@ -474,7 +474,7 @@ var claimKickbackFee_default = ABI18;
474
474
 
475
475
  // generated_types/replaceMultipleOrders.ts
476
476
  var ABI19 = {
477
- "address": "0xb0212a8a1f2f811e63462d6acddc2d49d9e0a29021f460e24a70fa522a81c11a",
477
+ "address": "0x738cbcffc724a6a6d27db14e7c165c7e20bb523679a01697623ce907ed1df24b",
478
478
  "name": "replace_multiple_orders",
479
479
  "friends": [],
480
480
  "exposed_functions": [
@@ -502,7 +502,7 @@ var replaceMultipleOrders_default = ABI19;
502
502
 
503
503
  // generated_types/claimDeposit.ts
504
504
  var ABI20 = {
505
- "address": "0xb0212a8a1f2f811e63462d6acddc2d49d9e0a29021f460e24a70fa522a81c11a",
505
+ "address": "0x738cbcffc724a6a6d27db14e7c165c7e20bb523679a01697623ce907ed1df24b",
506
506
  "name": "claim_deposit",
507
507
  "friends": [],
508
508
  "exposed_functions": [
@@ -526,7 +526,7 @@ var claimDeposit_default = ABI20;
526
526
 
527
527
  // generated_types/removeApiKeySigner.ts
528
528
  var ABI21 = {
529
- "address": "0xb0212a8a1f2f811e63462d6acddc2d49d9e0a29021f460e24a70fa522a81c11a",
529
+ "address": "0x738cbcffc724a6a6d27db14e7c165c7e20bb523679a01697623ce907ed1df24b",
530
530
  "name": "remove_api_key_signer",
531
531
  "friends": [],
532
532
  "exposed_functions": [
@@ -550,7 +550,7 @@ var removeApiKeySigner_default = ABI21;
550
550
 
551
551
  // generated_types/setReferralCode.ts
552
552
  var ABI22 = {
553
- "address": "0xb0212a8a1f2f811e63462d6acddc2d49d9e0a29021f460e24a70fa522a81c11a",
553
+ "address": "0x738cbcffc724a6a6d27db14e7c165c7e20bb523679a01697623ce907ed1df24b",
554
554
  "name": "set_referral_code",
555
555
  "friends": [],
556
556
  "exposed_functions": [
@@ -574,7 +574,7 @@ var setReferralCode_default = ABI22;
574
574
 
575
575
  // generated_types/tokenizeUserVaultInvestment.ts
576
576
  var ABI23 = {
577
- "address": "0xb0212a8a1f2f811e63462d6acddc2d49d9e0a29021f460e24a70fa522a81c11a",
577
+ "address": "0x738cbcffc724a6a6d27db14e7c165c7e20bb523679a01697623ce907ed1df24b",
578
578
  "name": "tokenize_user_vault_investment",
579
579
  "friends": [],
580
580
  "exposed_functions": [
@@ -598,7 +598,7 @@ var tokenizeUserVaultInvestment_default = ABI23;
598
598
 
599
599
  // generated_types/addCredits.ts
600
600
  var ABI24 = {
601
- "address": "0xb0212a8a1f2f811e63462d6acddc2d49d9e0a29021f460e24a70fa522a81c11a",
601
+ "address": "0x738cbcffc724a6a6d27db14e7c165c7e20bb523679a01697623ce907ed1df24b",
602
602
  "name": "add_credits",
603
603
  "friends": [],
604
604
  "exposed_functions": [
@@ -702,6 +702,7 @@ var EndpointsV1 = /* @__PURE__ */ ((EndpointsV12) => {
702
702
  EndpointsV12["GetVaultHistoricalData"] = "/v1/get_vault_historical_data";
703
703
  EndpointsV12["GetIndexPriceHistory"] = "/v1/get_index_price_history";
704
704
  EndpointsV12["ServicesStatus"] = "/v1/services_status";
705
+ EndpointsV12["GetUserAggregatedVaultStats"] = "/v1/get_user_aggregated_vault_stats";
705
706
  return EndpointsV12;
706
707
  })(EndpointsV1 || {});
707
708
  var SpotMarketStatus = /* @__PURE__ */ ((SpotMarketStatus2) => {
@@ -724,7 +725,7 @@ var UserStatus = /* @__PURE__ */ ((UserStatus2) => {
724
725
 
725
726
  // generated_types/withdrawFromVault.ts
726
727
  var ABI25 = {
727
- "address": "0xb0212a8a1f2f811e63462d6acddc2d49d9e0a29021f460e24a70fa522a81c11a",
728
+ "address": "0x738cbcffc724a6a6d27db14e7c165c7e20bb523679a01697623ce907ed1df24b",
728
729
  "name": "withdraw_from_vault",
729
730
  "friends": [],
730
731
  "exposed_functions": [
@@ -1100,7 +1101,7 @@ var Client = class _Client {
1100
1101
  return response;
1101
1102
  };
1102
1103
  this.setReferralParams = async (request) => {
1103
- await this.sendPostJson(request, "/v1/set_user_referral_params" /* SetUserReferralParams */);
1104
+ return await this.sendPostJson(request, "/v1/set_user_referral_params" /* SetUserReferralParams */);
1104
1105
  };
1105
1106
  //////////////////////////////////////// GETTERS
1106
1107
  this.sendGetJson = async (endpoint, message) => {
@@ -1361,6 +1362,10 @@ var Client = class _Client {
1361
1362
  const response = await this.sendGetJson("/v1/get_index_price_history" /* GetIndexPriceHistory */, request);
1362
1363
  return response;
1363
1364
  };
1365
+ this.getUserAggregatedVaultStats = async (request) => {
1366
+ const response = await this.sendGetJson("/v1/get_user_aggregated_vault_stats" /* GetUserAggregatedVaultStats */, request);
1367
+ return response;
1368
+ };
1364
1369
  // Meta
1365
1370
  this.getTime = async () => {
1366
1371
  const response = await this.sendGetJson("/time" /* Time */);
@@ -2088,7 +2093,7 @@ function parseEntryFunctionAbi(args) {
2088
2093
 
2089
2094
  // generated_types/faucetEntrypoints.ts
2090
2095
  var ABI26 = {
2091
- "address": "0xb0212a8a1f2f811e63462d6acddc2d49d9e0a29021f460e24a70fa522a81c11a",
2096
+ "address": "0x738cbcffc724a6a6d27db14e7c165c7e20bb523679a01697623ce907ed1df24b",
2092
2097
  "name": "faucet_entrypoints",
2093
2098
  "friends": [],
2094
2099
  "exposed_functions": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nightlylabs/dex-sdk",
3
- "version": "0.1.17",
3
+ "version": "0.1.19",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {