@crypticdot/defituna-api 1.1.43 → 1.1.44

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.d.mts CHANGED
@@ -1477,6 +1477,97 @@ declare const PoolPriceCandle$1: z.ZodObject<{
1477
1477
  high: number;
1478
1478
  low: number;
1479
1479
  }>;
1480
+ declare const FeesStatsGroup$1: z.ZodObject<{
1481
+ time: z.ZodDate;
1482
+ addLiquidityFees: z.ZodNumber;
1483
+ limitOrderFees: z.ZodNumber;
1484
+ yieldCompoundingFees: z.ZodNumber;
1485
+ liquidationFees: z.ZodNumber;
1486
+ totalLiquidationsNetworkFees: z.ZodNumber;
1487
+ totalLimitOrdersNetworkFees: z.ZodNumber;
1488
+ totalYieldCompoundingNetworkFees: z.ZodNumber;
1489
+ failedNetworkFees: z.ZodNumber;
1490
+ processedNetworkFees: z.ZodNumber;
1491
+ totalCollectedFees: z.ZodNumber;
1492
+ totalNetworkFees: z.ZodNumber;
1493
+ jitoLiquidationFees: z.ZodNumber;
1494
+ jitoLimitOrderFees: z.ZodNumber;
1495
+ jitoYieldCompoundingFees: z.ZodNumber;
1496
+ runningAddLiquidityFees: z.ZodNumber;
1497
+ runningLimitOrderFees: z.ZodNumber;
1498
+ runningYieldCompoundingFees: z.ZodNumber;
1499
+ runningLiquidationFees: z.ZodNumber;
1500
+ runningTotalLiquidationsNetworkFees: z.ZodNumber;
1501
+ runningTotalLimitOrdersNetworkFees: z.ZodNumber;
1502
+ runningTotalYieldCompoundingNetworkFees: z.ZodNumber;
1503
+ runningFailedNetworkFees: z.ZodNumber;
1504
+ runningProcessedNetworkFees: z.ZodNumber;
1505
+ runningJitoLiquidationFees: z.ZodNumber;
1506
+ runningJitoLimitOrderFees: z.ZodNumber;
1507
+ runningJitoYieldCompoundingFees: z.ZodNumber;
1508
+ runningTotalCollectedFees: z.ZodNumber;
1509
+ runningTotalNetworkFees: z.ZodNumber;
1510
+ }, "strip", z.ZodTypeAny, {
1511
+ time: Date;
1512
+ addLiquidityFees: number;
1513
+ limitOrderFees: number;
1514
+ yieldCompoundingFees: number;
1515
+ liquidationFees: number;
1516
+ totalLiquidationsNetworkFees: number;
1517
+ totalLimitOrdersNetworkFees: number;
1518
+ totalYieldCompoundingNetworkFees: number;
1519
+ failedNetworkFees: number;
1520
+ processedNetworkFees: number;
1521
+ totalCollectedFees: number;
1522
+ totalNetworkFees: number;
1523
+ jitoLiquidationFees: number;
1524
+ jitoLimitOrderFees: number;
1525
+ jitoYieldCompoundingFees: number;
1526
+ runningAddLiquidityFees: number;
1527
+ runningLimitOrderFees: number;
1528
+ runningYieldCompoundingFees: number;
1529
+ runningLiquidationFees: number;
1530
+ runningTotalLiquidationsNetworkFees: number;
1531
+ runningTotalLimitOrdersNetworkFees: number;
1532
+ runningTotalYieldCompoundingNetworkFees: number;
1533
+ runningFailedNetworkFees: number;
1534
+ runningProcessedNetworkFees: number;
1535
+ runningJitoLiquidationFees: number;
1536
+ runningJitoLimitOrderFees: number;
1537
+ runningJitoYieldCompoundingFees: number;
1538
+ runningTotalCollectedFees: number;
1539
+ runningTotalNetworkFees: number;
1540
+ }, {
1541
+ time: Date;
1542
+ addLiquidityFees: number;
1543
+ limitOrderFees: number;
1544
+ yieldCompoundingFees: number;
1545
+ liquidationFees: number;
1546
+ totalLiquidationsNetworkFees: number;
1547
+ totalLimitOrdersNetworkFees: number;
1548
+ totalYieldCompoundingNetworkFees: number;
1549
+ failedNetworkFees: number;
1550
+ processedNetworkFees: number;
1551
+ totalCollectedFees: number;
1552
+ totalNetworkFees: number;
1553
+ jitoLiquidationFees: number;
1554
+ jitoLimitOrderFees: number;
1555
+ jitoYieldCompoundingFees: number;
1556
+ runningAddLiquidityFees: number;
1557
+ runningLimitOrderFees: number;
1558
+ runningYieldCompoundingFees: number;
1559
+ runningLiquidationFees: number;
1560
+ runningTotalLiquidationsNetworkFees: number;
1561
+ runningTotalLimitOrdersNetworkFees: number;
1562
+ runningTotalYieldCompoundingNetworkFees: number;
1563
+ runningFailedNetworkFees: number;
1564
+ runningProcessedNetworkFees: number;
1565
+ runningJitoLiquidationFees: number;
1566
+ runningJitoLimitOrderFees: number;
1567
+ runningJitoYieldCompoundingFees: number;
1568
+ runningTotalCollectedFees: number;
1569
+ runningTotalNetworkFees: number;
1570
+ }>;
1480
1571
  declare const UpdateStreamSubscriptionResult: z.ZodObject<{
1481
1572
  status: z.ZodString;
1482
1573
  }, "strip", z.ZodTypeAny, {
@@ -4112,7 +4203,7 @@ declare const schemas_UpdateStreamSubscriptionResult: typeof UpdateStreamSubscri
4112
4203
  declare const schemas_WalletSubscriptionTopic: typeof WalletSubscriptionTopic;
4113
4204
  declare const schemas_WalletSubscriptionTopicSchema: typeof WalletSubscriptionTopicSchema;
4114
4205
  declare namespace schemas {
4115
- export { LendingPosition$1 as LendingPosition, schemas_LendingPositionNotification as LendingPositionNotification, LimitOrder$1 as LimitOrder, schemas_LimitOrderNotification as LimitOrderNotification, schemas_LimitOrderState as LimitOrderState, schemas_LimitOrderStateSchema as LimitOrderStateSchema, Market$1 as Market, Mint$1 as Mint, schemas_NotificationAction as NotificationAction, schemas_NotificationActionSchema as NotificationActionSchema, schemas_NotificationEntity as NotificationEntity, schemas_NotificationEntitySchema as NotificationEntitySchema, OrderBook$1 as OrderBook, OrderBookEntry$1 as OrderBookEntry, schemas_OrderBookNotification as OrderBookNotification, schemas_OrderBookNotificationMeta as OrderBookNotificationMeta, Pool$1 as Pool, PoolPriceCandle$1 as PoolPriceCandle, PoolPriceUpdate$1 as PoolPriceUpdate, schemas_PoolPriceUpdateNotification as PoolPriceUpdateNotification, schemas_PoolProvider as PoolProvider, schemas_PoolProviderSchema as PoolProviderSchema, schemas_PoolSubscriptionTopic as PoolSubscriptionTopic, schemas_PoolSubscriptionTopicSchema as PoolSubscriptionTopicSchema, PoolSwap$1 as PoolSwap, schemas_PoolSwapNotification as PoolSwapNotification, PoolTicks$1 as PoolTicks, StakingPosition$1 as StakingPosition, StakingPositionHistoryAction$1 as StakingPositionHistoryAction, StakingPositionHistoryActionType$1 as StakingPositionHistoryActionType, schemas_StakingPositionHistoryActionTypeSchema as StakingPositionHistoryActionTypeSchema, schemas_StakingPositionNotification as StakingPositionNotification, StakingTreasury$1 as StakingTreasury, Tick$1 as Tick, TokenOraclePrice$1 as TokenOraclePrice, TunaPosition$1 as TunaPosition, schemas_TunaPositionNotification as TunaPositionNotification, schemas_TunaPositionState as TunaPositionState, schemas_TunaPositionStateSchema as TunaPositionStateSchema, schemas_UpdateStreamSubscriptionResult as UpdateStreamSubscriptionResult, Vault$1 as Vault, VaultHistoricalStats$1 as VaultHistoricalStats, schemas_WalletSubscriptionTopic as WalletSubscriptionTopic, schemas_WalletSubscriptionTopicSchema as WalletSubscriptionTopicSchema };
4206
+ export { FeesStatsGroup$1 as FeesStatsGroup, LendingPosition$1 as LendingPosition, schemas_LendingPositionNotification as LendingPositionNotification, LimitOrder$1 as LimitOrder, schemas_LimitOrderNotification as LimitOrderNotification, schemas_LimitOrderState as LimitOrderState, schemas_LimitOrderStateSchema as LimitOrderStateSchema, Market$1 as Market, Mint$1 as Mint, schemas_NotificationAction as NotificationAction, schemas_NotificationActionSchema as NotificationActionSchema, schemas_NotificationEntity as NotificationEntity, schemas_NotificationEntitySchema as NotificationEntitySchema, OrderBook$1 as OrderBook, OrderBookEntry$1 as OrderBookEntry, schemas_OrderBookNotification as OrderBookNotification, schemas_OrderBookNotificationMeta as OrderBookNotificationMeta, Pool$1 as Pool, PoolPriceCandle$1 as PoolPriceCandle, PoolPriceUpdate$1 as PoolPriceUpdate, schemas_PoolPriceUpdateNotification as PoolPriceUpdateNotification, schemas_PoolProvider as PoolProvider, schemas_PoolProviderSchema as PoolProviderSchema, schemas_PoolSubscriptionTopic as PoolSubscriptionTopic, schemas_PoolSubscriptionTopicSchema as PoolSubscriptionTopicSchema, PoolSwap$1 as PoolSwap, schemas_PoolSwapNotification as PoolSwapNotification, PoolTicks$1 as PoolTicks, StakingPosition$1 as StakingPosition, StakingPositionHistoryAction$1 as StakingPositionHistoryAction, StakingPositionHistoryActionType$1 as StakingPositionHistoryActionType, schemas_StakingPositionHistoryActionTypeSchema as StakingPositionHistoryActionTypeSchema, schemas_StakingPositionNotification as StakingPositionNotification, StakingTreasury$1 as StakingTreasury, Tick$1 as Tick, TokenOraclePrice$1 as TokenOraclePrice, TunaPosition$1 as TunaPosition, schemas_TunaPositionNotification as TunaPositionNotification, schemas_TunaPositionState as TunaPositionState, schemas_TunaPositionStateSchema as TunaPositionStateSchema, schemas_UpdateStreamSubscriptionResult as UpdateStreamSubscriptionResult, Vault$1 as Vault, VaultHistoricalStats$1 as VaultHistoricalStats, schemas_WalletSubscriptionTopic as WalletSubscriptionTopic, schemas_WalletSubscriptionTopicSchema as WalletSubscriptionTopicSchema };
4116
4207
  }
4117
4208
 
4118
4209
  type PoolProviderType = z.infer<typeof PoolProviderSchema>;
@@ -4139,6 +4230,7 @@ type StakingPosition = z.infer<typeof StakingPosition$1>;
4139
4230
  type StakingTreasury = z.infer<typeof StakingTreasury$1>;
4140
4231
  type StakingPositionHistoryAction = z.infer<typeof StakingPositionHistoryAction$1>;
4141
4232
  type PoolPriceCandle = z.infer<typeof PoolPriceCandle$1>;
4233
+ type FeesStatsGroup = z.infer<typeof FeesStatsGroup$1>;
4142
4234
  type PoolPriceUpdate = z.infer<typeof PoolPriceUpdate$1>;
4143
4235
  type SubscriptionPayload = {
4144
4236
  pools?: {
@@ -4222,14 +4314,11 @@ declare class TunaApiClient {
4222
4314
  getUserLimitOrderByAddress(userAddress: string, limitOrderAddress: string): Promise<LimitOrder>;
4223
4315
  getUserStakingPosition(userAddress: string): Promise<StakingPosition>;
4224
4316
  getUserStakingPositionHistory(userAddress: string): Promise<StakingPositionHistoryAction[]>;
4225
- /**
4226
- * @deprecated Use getUpdatesStream instead
4227
- */
4228
- getPoolUpdatesStream(poolAddress: string, priceStep?: number, inverted?: boolean): Promise<EventSource>;
4317
+ getFeesStats(from: Date, to: Date, interval: string): Promise<FeesStatsGroup[]>;
4229
4318
  getUpdatesStream(): Promise<EventSource>;
4230
4319
  updateStreamSubscription(streamId: string, subscription: SubscriptionPayload): Promise<unknown>;
4231
4320
  private buildURL;
4232
4321
  private appendUrlSearchParams;
4233
4322
  }
4234
4323
 
4235
- export { type DurationInMs, type GetPoolPriceCandlesOptions, type LendingPosition, type LimitOrder, type LimitOrderStateType, type Market, type Mint, NotificationAction, NotificationEntity, type OrderBook, type OrderBookEntry, type Pool, type PoolPriceCandle, type PoolPriceUpdate, PoolProvider, type PoolProviderType, type PoolSubscriptionTopicType, type PoolSwap, type PoolTicks, ProviderFilter, type StakingPosition, type StakingPositionHistoryAction, type StakingPositionHistoryActionType, type StakingTreasury, type SubscriptionPayload, type Tick, type TokenOraclePrice, TunaApiClient, type TunaApiClientConfig, type TunaPosition, TunaPositionState, type TunaPositionStateType, type Vault, type VaultHistoricalStats, type WalletSubscriptionTopicType, schemas };
4324
+ export { type DurationInMs, type FeesStatsGroup, type GetPoolPriceCandlesOptions, type LendingPosition, type LimitOrder, type LimitOrderStateType, type Market, type Mint, NotificationAction, NotificationEntity, type OrderBook, type OrderBookEntry, type Pool, type PoolPriceCandle, type PoolPriceUpdate, PoolProvider, type PoolProviderType, type PoolSubscriptionTopicType, type PoolSwap, type PoolTicks, ProviderFilter, type StakingPosition, type StakingPositionHistoryAction, type StakingPositionHistoryActionType, type StakingTreasury, type SubscriptionPayload, type Tick, type TokenOraclePrice, TunaApiClient, type TunaApiClientConfig, type TunaPosition, TunaPositionState, type TunaPositionStateType, type Vault, type VaultHistoricalStats, type WalletSubscriptionTopicType, schemas };
package/dist/index.d.ts CHANGED
@@ -1477,6 +1477,97 @@ declare const PoolPriceCandle$1: z.ZodObject<{
1477
1477
  high: number;
1478
1478
  low: number;
1479
1479
  }>;
1480
+ declare const FeesStatsGroup$1: z.ZodObject<{
1481
+ time: z.ZodDate;
1482
+ addLiquidityFees: z.ZodNumber;
1483
+ limitOrderFees: z.ZodNumber;
1484
+ yieldCompoundingFees: z.ZodNumber;
1485
+ liquidationFees: z.ZodNumber;
1486
+ totalLiquidationsNetworkFees: z.ZodNumber;
1487
+ totalLimitOrdersNetworkFees: z.ZodNumber;
1488
+ totalYieldCompoundingNetworkFees: z.ZodNumber;
1489
+ failedNetworkFees: z.ZodNumber;
1490
+ processedNetworkFees: z.ZodNumber;
1491
+ totalCollectedFees: z.ZodNumber;
1492
+ totalNetworkFees: z.ZodNumber;
1493
+ jitoLiquidationFees: z.ZodNumber;
1494
+ jitoLimitOrderFees: z.ZodNumber;
1495
+ jitoYieldCompoundingFees: z.ZodNumber;
1496
+ runningAddLiquidityFees: z.ZodNumber;
1497
+ runningLimitOrderFees: z.ZodNumber;
1498
+ runningYieldCompoundingFees: z.ZodNumber;
1499
+ runningLiquidationFees: z.ZodNumber;
1500
+ runningTotalLiquidationsNetworkFees: z.ZodNumber;
1501
+ runningTotalLimitOrdersNetworkFees: z.ZodNumber;
1502
+ runningTotalYieldCompoundingNetworkFees: z.ZodNumber;
1503
+ runningFailedNetworkFees: z.ZodNumber;
1504
+ runningProcessedNetworkFees: z.ZodNumber;
1505
+ runningJitoLiquidationFees: z.ZodNumber;
1506
+ runningJitoLimitOrderFees: z.ZodNumber;
1507
+ runningJitoYieldCompoundingFees: z.ZodNumber;
1508
+ runningTotalCollectedFees: z.ZodNumber;
1509
+ runningTotalNetworkFees: z.ZodNumber;
1510
+ }, "strip", z.ZodTypeAny, {
1511
+ time: Date;
1512
+ addLiquidityFees: number;
1513
+ limitOrderFees: number;
1514
+ yieldCompoundingFees: number;
1515
+ liquidationFees: number;
1516
+ totalLiquidationsNetworkFees: number;
1517
+ totalLimitOrdersNetworkFees: number;
1518
+ totalYieldCompoundingNetworkFees: number;
1519
+ failedNetworkFees: number;
1520
+ processedNetworkFees: number;
1521
+ totalCollectedFees: number;
1522
+ totalNetworkFees: number;
1523
+ jitoLiquidationFees: number;
1524
+ jitoLimitOrderFees: number;
1525
+ jitoYieldCompoundingFees: number;
1526
+ runningAddLiquidityFees: number;
1527
+ runningLimitOrderFees: number;
1528
+ runningYieldCompoundingFees: number;
1529
+ runningLiquidationFees: number;
1530
+ runningTotalLiquidationsNetworkFees: number;
1531
+ runningTotalLimitOrdersNetworkFees: number;
1532
+ runningTotalYieldCompoundingNetworkFees: number;
1533
+ runningFailedNetworkFees: number;
1534
+ runningProcessedNetworkFees: number;
1535
+ runningJitoLiquidationFees: number;
1536
+ runningJitoLimitOrderFees: number;
1537
+ runningJitoYieldCompoundingFees: number;
1538
+ runningTotalCollectedFees: number;
1539
+ runningTotalNetworkFees: number;
1540
+ }, {
1541
+ time: Date;
1542
+ addLiquidityFees: number;
1543
+ limitOrderFees: number;
1544
+ yieldCompoundingFees: number;
1545
+ liquidationFees: number;
1546
+ totalLiquidationsNetworkFees: number;
1547
+ totalLimitOrdersNetworkFees: number;
1548
+ totalYieldCompoundingNetworkFees: number;
1549
+ failedNetworkFees: number;
1550
+ processedNetworkFees: number;
1551
+ totalCollectedFees: number;
1552
+ totalNetworkFees: number;
1553
+ jitoLiquidationFees: number;
1554
+ jitoLimitOrderFees: number;
1555
+ jitoYieldCompoundingFees: number;
1556
+ runningAddLiquidityFees: number;
1557
+ runningLimitOrderFees: number;
1558
+ runningYieldCompoundingFees: number;
1559
+ runningLiquidationFees: number;
1560
+ runningTotalLiquidationsNetworkFees: number;
1561
+ runningTotalLimitOrdersNetworkFees: number;
1562
+ runningTotalYieldCompoundingNetworkFees: number;
1563
+ runningFailedNetworkFees: number;
1564
+ runningProcessedNetworkFees: number;
1565
+ runningJitoLiquidationFees: number;
1566
+ runningJitoLimitOrderFees: number;
1567
+ runningJitoYieldCompoundingFees: number;
1568
+ runningTotalCollectedFees: number;
1569
+ runningTotalNetworkFees: number;
1570
+ }>;
1480
1571
  declare const UpdateStreamSubscriptionResult: z.ZodObject<{
1481
1572
  status: z.ZodString;
1482
1573
  }, "strip", z.ZodTypeAny, {
@@ -4112,7 +4203,7 @@ declare const schemas_UpdateStreamSubscriptionResult: typeof UpdateStreamSubscri
4112
4203
  declare const schemas_WalletSubscriptionTopic: typeof WalletSubscriptionTopic;
4113
4204
  declare const schemas_WalletSubscriptionTopicSchema: typeof WalletSubscriptionTopicSchema;
4114
4205
  declare namespace schemas {
4115
- export { LendingPosition$1 as LendingPosition, schemas_LendingPositionNotification as LendingPositionNotification, LimitOrder$1 as LimitOrder, schemas_LimitOrderNotification as LimitOrderNotification, schemas_LimitOrderState as LimitOrderState, schemas_LimitOrderStateSchema as LimitOrderStateSchema, Market$1 as Market, Mint$1 as Mint, schemas_NotificationAction as NotificationAction, schemas_NotificationActionSchema as NotificationActionSchema, schemas_NotificationEntity as NotificationEntity, schemas_NotificationEntitySchema as NotificationEntitySchema, OrderBook$1 as OrderBook, OrderBookEntry$1 as OrderBookEntry, schemas_OrderBookNotification as OrderBookNotification, schemas_OrderBookNotificationMeta as OrderBookNotificationMeta, Pool$1 as Pool, PoolPriceCandle$1 as PoolPriceCandle, PoolPriceUpdate$1 as PoolPriceUpdate, schemas_PoolPriceUpdateNotification as PoolPriceUpdateNotification, schemas_PoolProvider as PoolProvider, schemas_PoolProviderSchema as PoolProviderSchema, schemas_PoolSubscriptionTopic as PoolSubscriptionTopic, schemas_PoolSubscriptionTopicSchema as PoolSubscriptionTopicSchema, PoolSwap$1 as PoolSwap, schemas_PoolSwapNotification as PoolSwapNotification, PoolTicks$1 as PoolTicks, StakingPosition$1 as StakingPosition, StakingPositionHistoryAction$1 as StakingPositionHistoryAction, StakingPositionHistoryActionType$1 as StakingPositionHistoryActionType, schemas_StakingPositionHistoryActionTypeSchema as StakingPositionHistoryActionTypeSchema, schemas_StakingPositionNotification as StakingPositionNotification, StakingTreasury$1 as StakingTreasury, Tick$1 as Tick, TokenOraclePrice$1 as TokenOraclePrice, TunaPosition$1 as TunaPosition, schemas_TunaPositionNotification as TunaPositionNotification, schemas_TunaPositionState as TunaPositionState, schemas_TunaPositionStateSchema as TunaPositionStateSchema, schemas_UpdateStreamSubscriptionResult as UpdateStreamSubscriptionResult, Vault$1 as Vault, VaultHistoricalStats$1 as VaultHistoricalStats, schemas_WalletSubscriptionTopic as WalletSubscriptionTopic, schemas_WalletSubscriptionTopicSchema as WalletSubscriptionTopicSchema };
4206
+ export { FeesStatsGroup$1 as FeesStatsGroup, LendingPosition$1 as LendingPosition, schemas_LendingPositionNotification as LendingPositionNotification, LimitOrder$1 as LimitOrder, schemas_LimitOrderNotification as LimitOrderNotification, schemas_LimitOrderState as LimitOrderState, schemas_LimitOrderStateSchema as LimitOrderStateSchema, Market$1 as Market, Mint$1 as Mint, schemas_NotificationAction as NotificationAction, schemas_NotificationActionSchema as NotificationActionSchema, schemas_NotificationEntity as NotificationEntity, schemas_NotificationEntitySchema as NotificationEntitySchema, OrderBook$1 as OrderBook, OrderBookEntry$1 as OrderBookEntry, schemas_OrderBookNotification as OrderBookNotification, schemas_OrderBookNotificationMeta as OrderBookNotificationMeta, Pool$1 as Pool, PoolPriceCandle$1 as PoolPriceCandle, PoolPriceUpdate$1 as PoolPriceUpdate, schemas_PoolPriceUpdateNotification as PoolPriceUpdateNotification, schemas_PoolProvider as PoolProvider, schemas_PoolProviderSchema as PoolProviderSchema, schemas_PoolSubscriptionTopic as PoolSubscriptionTopic, schemas_PoolSubscriptionTopicSchema as PoolSubscriptionTopicSchema, PoolSwap$1 as PoolSwap, schemas_PoolSwapNotification as PoolSwapNotification, PoolTicks$1 as PoolTicks, StakingPosition$1 as StakingPosition, StakingPositionHistoryAction$1 as StakingPositionHistoryAction, StakingPositionHistoryActionType$1 as StakingPositionHistoryActionType, schemas_StakingPositionHistoryActionTypeSchema as StakingPositionHistoryActionTypeSchema, schemas_StakingPositionNotification as StakingPositionNotification, StakingTreasury$1 as StakingTreasury, Tick$1 as Tick, TokenOraclePrice$1 as TokenOraclePrice, TunaPosition$1 as TunaPosition, schemas_TunaPositionNotification as TunaPositionNotification, schemas_TunaPositionState as TunaPositionState, schemas_TunaPositionStateSchema as TunaPositionStateSchema, schemas_UpdateStreamSubscriptionResult as UpdateStreamSubscriptionResult, Vault$1 as Vault, VaultHistoricalStats$1 as VaultHistoricalStats, schemas_WalletSubscriptionTopic as WalletSubscriptionTopic, schemas_WalletSubscriptionTopicSchema as WalletSubscriptionTopicSchema };
4116
4207
  }
4117
4208
 
4118
4209
  type PoolProviderType = z.infer<typeof PoolProviderSchema>;
@@ -4139,6 +4230,7 @@ type StakingPosition = z.infer<typeof StakingPosition$1>;
4139
4230
  type StakingTreasury = z.infer<typeof StakingTreasury$1>;
4140
4231
  type StakingPositionHistoryAction = z.infer<typeof StakingPositionHistoryAction$1>;
4141
4232
  type PoolPriceCandle = z.infer<typeof PoolPriceCandle$1>;
4233
+ type FeesStatsGroup = z.infer<typeof FeesStatsGroup$1>;
4142
4234
  type PoolPriceUpdate = z.infer<typeof PoolPriceUpdate$1>;
4143
4235
  type SubscriptionPayload = {
4144
4236
  pools?: {
@@ -4222,14 +4314,11 @@ declare class TunaApiClient {
4222
4314
  getUserLimitOrderByAddress(userAddress: string, limitOrderAddress: string): Promise<LimitOrder>;
4223
4315
  getUserStakingPosition(userAddress: string): Promise<StakingPosition>;
4224
4316
  getUserStakingPositionHistory(userAddress: string): Promise<StakingPositionHistoryAction[]>;
4225
- /**
4226
- * @deprecated Use getUpdatesStream instead
4227
- */
4228
- getPoolUpdatesStream(poolAddress: string, priceStep?: number, inverted?: boolean): Promise<EventSource>;
4317
+ getFeesStats(from: Date, to: Date, interval: string): Promise<FeesStatsGroup[]>;
4229
4318
  getUpdatesStream(): Promise<EventSource>;
4230
4319
  updateStreamSubscription(streamId: string, subscription: SubscriptionPayload): Promise<unknown>;
4231
4320
  private buildURL;
4232
4321
  private appendUrlSearchParams;
4233
4322
  }
4234
4323
 
4235
- export { type DurationInMs, type GetPoolPriceCandlesOptions, type LendingPosition, type LimitOrder, type LimitOrderStateType, type Market, type Mint, NotificationAction, NotificationEntity, type OrderBook, type OrderBookEntry, type Pool, type PoolPriceCandle, type PoolPriceUpdate, PoolProvider, type PoolProviderType, type PoolSubscriptionTopicType, type PoolSwap, type PoolTicks, ProviderFilter, type StakingPosition, type StakingPositionHistoryAction, type StakingPositionHistoryActionType, type StakingTreasury, type SubscriptionPayload, type Tick, type TokenOraclePrice, TunaApiClient, type TunaApiClientConfig, type TunaPosition, TunaPositionState, type TunaPositionStateType, type Vault, type VaultHistoricalStats, type WalletSubscriptionTopicType, schemas };
4324
+ export { type DurationInMs, type FeesStatsGroup, type GetPoolPriceCandlesOptions, type LendingPosition, type LimitOrder, type LimitOrderStateType, type Market, type Mint, NotificationAction, NotificationEntity, type OrderBook, type OrderBookEntry, type Pool, type PoolPriceCandle, type PoolPriceUpdate, PoolProvider, type PoolProviderType, type PoolSubscriptionTopicType, type PoolSwap, type PoolTicks, ProviderFilter, type StakingPosition, type StakingPositionHistoryAction, type StakingPositionHistoryActionType, type StakingTreasury, type SubscriptionPayload, type Tick, type TokenOraclePrice, TunaApiClient, type TunaApiClientConfig, type TunaPosition, TunaPositionState, type TunaPositionStateType, type Vault, type VaultHistoricalStats, type WalletSubscriptionTopicType, schemas };
package/dist/index.js CHANGED
@@ -46,6 +46,7 @@ var import_snakecase_keys = __toESM(require("snakecase-keys"));
46
46
  // src/client/schemas.ts
47
47
  var schemas_exports = {};
48
48
  __export(schemas_exports, {
49
+ FeesStatsGroup: () => FeesStatsGroup,
49
50
  LendingPosition: () => LendingPosition,
50
51
  LendingPositionNotification: () => LendingPositionNotification,
51
52
  LimitOrder: () => LimitOrder,
@@ -415,6 +416,37 @@ var PoolPriceCandle = import_zod.z.object({
415
416
  low: import_zod.z.number(),
416
417
  volume: import_zod.z.number()
417
418
  });
419
+ var FeesStatsGroup = import_zod.z.object({
420
+ time: import_zod.z.coerce.date(),
421
+ addLiquidityFees: import_zod.z.number(),
422
+ limitOrderFees: import_zod.z.number(),
423
+ yieldCompoundingFees: import_zod.z.number(),
424
+ liquidationFees: import_zod.z.number(),
425
+ totalLiquidationsNetworkFees: import_zod.z.number(),
426
+ totalLimitOrdersNetworkFees: import_zod.z.number(),
427
+ totalYieldCompoundingNetworkFees: import_zod.z.number(),
428
+ failedNetworkFees: import_zod.z.number(),
429
+ processedNetworkFees: import_zod.z.number(),
430
+ totalCollectedFees: import_zod.z.number(),
431
+ totalNetworkFees: import_zod.z.number(),
432
+ jitoLiquidationFees: import_zod.z.number(),
433
+ jitoLimitOrderFees: import_zod.z.number(),
434
+ jitoYieldCompoundingFees: import_zod.z.number(),
435
+ runningAddLiquidityFees: import_zod.z.number(),
436
+ runningLimitOrderFees: import_zod.z.number(),
437
+ runningYieldCompoundingFees: import_zod.z.number(),
438
+ runningLiquidationFees: import_zod.z.number(),
439
+ runningTotalLiquidationsNetworkFees: import_zod.z.number(),
440
+ runningTotalLimitOrdersNetworkFees: import_zod.z.number(),
441
+ runningTotalYieldCompoundingNetworkFees: import_zod.z.number(),
442
+ runningFailedNetworkFees: import_zod.z.number(),
443
+ runningProcessedNetworkFees: import_zod.z.number(),
444
+ runningJitoLiquidationFees: import_zod.z.number(),
445
+ runningJitoLimitOrderFees: import_zod.z.number(),
446
+ runningJitoYieldCompoundingFees: import_zod.z.number(),
447
+ runningTotalCollectedFees: import_zod.z.number(),
448
+ runningTotalNetworkFees: import_zod.z.number()
449
+ });
418
450
  var UpdateStreamSubscriptionResult = import_zod.z.object({
419
451
  status: import_zod.z.string()
420
452
  });
@@ -623,20 +655,14 @@ var TunaApiClient = class {
623
655
  const url = this.buildURL(`users/${userAddress}/staking-position/history`);
624
656
  return await this.httpRequest(url.toString(), StakingPositionHistoryAction.array());
625
657
  }
626
- /**
627
- * @deprecated Use getUpdatesStream instead
628
- */
629
- async getPoolUpdatesStream(poolAddress, priceStep, inverted) {
630
- const url = this.buildURL(`stream`);
631
- this.appendUrlSearchParams(url, { pool: poolAddress });
632
- if (priceStep) {
633
- this.appendUrlSearchParams(url, { price_step: priceStep.toString() });
634
- }
635
- if (inverted) {
636
- this.appendUrlSearchParams(url, { inverted: inverted.toString() });
637
- }
638
- this.appendUrlSearchParams(url, { ts: Date.now().toString() });
639
- return new EventSource(url.toString());
658
+ async getFeesStats(from, to, interval) {
659
+ const url = this.buildURL(`stats/fees`);
660
+ this.appendUrlSearchParams(url, {
661
+ from: from.toISOString(),
662
+ to: to.toISOString(),
663
+ interval
664
+ });
665
+ return await this.httpRequest(url.toString(), FeesStatsGroup.array());
640
666
  }
641
667
  async getUpdatesStream() {
642
668
  const url = this.buildURL(`streams/sse`);
package/dist/index.mjs CHANGED
@@ -11,6 +11,7 @@ import snakecaseKeys from "snakecase-keys";
11
11
  // src/client/schemas.ts
12
12
  var schemas_exports = {};
13
13
  __export(schemas_exports, {
14
+ FeesStatsGroup: () => FeesStatsGroup,
14
15
  LendingPosition: () => LendingPosition,
15
16
  LendingPositionNotification: () => LendingPositionNotification,
16
17
  LimitOrder: () => LimitOrder,
@@ -380,6 +381,37 @@ var PoolPriceCandle = z.object({
380
381
  low: z.number(),
381
382
  volume: z.number()
382
383
  });
384
+ var FeesStatsGroup = z.object({
385
+ time: z.coerce.date(),
386
+ addLiquidityFees: z.number(),
387
+ limitOrderFees: z.number(),
388
+ yieldCompoundingFees: z.number(),
389
+ liquidationFees: z.number(),
390
+ totalLiquidationsNetworkFees: z.number(),
391
+ totalLimitOrdersNetworkFees: z.number(),
392
+ totalYieldCompoundingNetworkFees: z.number(),
393
+ failedNetworkFees: z.number(),
394
+ processedNetworkFees: z.number(),
395
+ totalCollectedFees: z.number(),
396
+ totalNetworkFees: z.number(),
397
+ jitoLiquidationFees: z.number(),
398
+ jitoLimitOrderFees: z.number(),
399
+ jitoYieldCompoundingFees: z.number(),
400
+ runningAddLiquidityFees: z.number(),
401
+ runningLimitOrderFees: z.number(),
402
+ runningYieldCompoundingFees: z.number(),
403
+ runningLiquidationFees: z.number(),
404
+ runningTotalLiquidationsNetworkFees: z.number(),
405
+ runningTotalLimitOrdersNetworkFees: z.number(),
406
+ runningTotalYieldCompoundingNetworkFees: z.number(),
407
+ runningFailedNetworkFees: z.number(),
408
+ runningProcessedNetworkFees: z.number(),
409
+ runningJitoLiquidationFees: z.number(),
410
+ runningJitoLimitOrderFees: z.number(),
411
+ runningJitoYieldCompoundingFees: z.number(),
412
+ runningTotalCollectedFees: z.number(),
413
+ runningTotalNetworkFees: z.number()
414
+ });
383
415
  var UpdateStreamSubscriptionResult = z.object({
384
416
  status: z.string()
385
417
  });
@@ -588,20 +620,14 @@ var TunaApiClient = class {
588
620
  const url = this.buildURL(`users/${userAddress}/staking-position/history`);
589
621
  return await this.httpRequest(url.toString(), StakingPositionHistoryAction.array());
590
622
  }
591
- /**
592
- * @deprecated Use getUpdatesStream instead
593
- */
594
- async getPoolUpdatesStream(poolAddress, priceStep, inverted) {
595
- const url = this.buildURL(`stream`);
596
- this.appendUrlSearchParams(url, { pool: poolAddress });
597
- if (priceStep) {
598
- this.appendUrlSearchParams(url, { price_step: priceStep.toString() });
599
- }
600
- if (inverted) {
601
- this.appendUrlSearchParams(url, { inverted: inverted.toString() });
602
- }
603
- this.appendUrlSearchParams(url, { ts: Date.now().toString() });
604
- return new EventSource(url.toString());
623
+ async getFeesStats(from, to, interval) {
624
+ const url = this.buildURL(`stats/fees`);
625
+ this.appendUrlSearchParams(url, {
626
+ from: from.toISOString(),
627
+ to: to.toISOString(),
628
+ interval
629
+ });
630
+ return await this.httpRequest(url.toString(), FeesStatsGroup.array());
605
631
  }
606
632
  async getUpdatesStream() {
607
633
  const url = this.buildURL(`streams/sse`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crypticdot/defituna-api",
3
- "version": "1.1.43",
3
+ "version": "1.1.44",
4
4
  "private": false,
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",