@pear-protocol/hyperliquid-sdk 0.1.4 → 0.1.5-pnl

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.
@@ -1,4 +1,4 @@
1
- import type { ApiResponse, GetEIP712MessageResponse, AuthenticateRequest, AuthenticateResponse, RefreshTokenResponse, LogoutResponse } from '../types';
1
+ import type { ApiResponse, GetEIP712MessageResponse, AuthenticateRequest, AuthenticateResponse, RefreshTokenResponse, LogoutResponse } from "../types";
2
2
  export declare function getEIP712Message(baseUrl: string, address: string, clientId: string): Promise<ApiResponse<GetEIP712MessageResponse>>;
3
3
  export declare function authenticate(baseUrl: string, body: AuthenticateRequest): Promise<ApiResponse<AuthenticateResponse>>;
4
4
  /**
@@ -0,0 +1,7 @@
1
+ import type { ApiResponse, TradeHistoryDataDto } from '../types';
2
+ export interface GetTradeHistoryParams {
3
+ startDate?: string;
4
+ endDate?: string;
5
+ limit?: number;
6
+ }
7
+ export declare function getTradeHistory(baseUrl: string, params?: GetTradeHistoryParams): Promise<ApiResponse<TradeHistoryDataDto[]>>;
@@ -18,3 +18,5 @@ export * from './usePortfolio';
18
18
  export * from './useAuth';
19
19
  export * from './useAllUserBalances';
20
20
  export * from './useHyperliquidUserFills';
21
+ export * from './usePnlCalendar';
22
+ export * from './usePnlHeatmap';
@@ -1,4 +1,4 @@
1
- import { AvailableToTrades, SpotBalances, CollateralToken } from '../types';
1
+ import { AvailableToTrades, SpotBalances, CollateralToken, UserAbstraction } from '../types';
2
2
  export interface MarginRequiredPerCollateral {
3
3
  collateral: CollateralToken;
4
4
  marginRequired: number;
@@ -16,6 +16,7 @@ interface AllUserBalancesResult {
16
16
  spotBalances: SpotBalances;
17
17
  availableToTrades: AvailableToTrades;
18
18
  isLoading: boolean;
19
+ abstractionMode: UserAbstraction | null;
19
20
  getMarginRequired: (assetsLeverage: Record<string, number>, size: number) => MarginRequiredResult;
20
21
  getMaxSize: (assetsLeverage: Record<string, number>) => number;
21
22
  }
@@ -1,7 +1,8 @@
1
- import type { GetEIP712MessageResponse } from "../types";
1
+ import type { GetEIP712MessageResponse } from '../types';
2
2
  export declare function useAuth(): {
3
3
  readonly isReady: boolean;
4
4
  readonly isAuthenticated: boolean;
5
+ readonly address: string | null;
5
6
  readonly accessToken: string | null;
6
7
  readonly refreshToken: string | null;
7
8
  readonly getEip712: (address: string) => Promise<GetEIP712MessageResponse>;
@@ -9,4 +10,6 @@ export declare function useAuth(): {
9
10
  readonly loginWithPrivyToken: (address: string, appId: string, privyAccessToken: string) => Promise<void>;
10
11
  readonly refreshTokens: () => Promise<import("../types").RefreshTokenResponse>;
11
12
  readonly logout: () => Promise<void>;
13
+ readonly clearSession: () => void;
14
+ readonly setAddress: (address: string | null) => void;
12
15
  };
@@ -3,6 +3,7 @@ export interface UseBasketCandlesReturn {
3
3
  fetchBasketCandles: (startTime: number, endTime: number, interval: CandleInterval) => Promise<CandleData[]>;
4
4
  fetchPerformanceCandles: (startTime: number, endTime: number, interval: CandleInterval, symbol: string) => Promise<CandleData[]>;
5
5
  fetchOverallPerformanceCandles: (startTime: number, endTime: number, interval: CandleInterval) => Promise<CandleData[]>;
6
+ getEffectiveDataBoundary: (interval: CandleInterval) => number | null;
6
7
  isLoading: boolean;
7
8
  addRealtimeListener: (cb: RealtimeBarsCallback) => string;
8
9
  removeRealtimeListener: (id: string) => void;
@@ -4,6 +4,7 @@ export interface UseHistoricalPriceDataReturn {
4
4
  fetchHistoricalPriceData: (startTime: number, endTime: number, interval: CandleInterval, callback?: (data: Record<string, CandleData[]>) => void) => Promise<Record<string, CandleData[]>>;
5
5
  hasHistoricalPriceData: (startTime: number, endTime: number, interval: CandleInterval) => boolean;
6
6
  getHistoricalPriceData: (startTime: number, endTime: number, interval: CandleInterval) => Record<string, CandleData[]>;
7
+ getEffectiveDataBoundary: (interval: CandleInterval) => number | null;
7
8
  getAllHistoricalPriceData(): Promise<Record<string, TokenHistoricalPriceData>>;
8
9
  isLoading: (symbol?: string) => boolean;
9
10
  clearCache: () => void;
@@ -0,0 +1,61 @@
1
+ export type PnlCalendarTimeframe = '2W' | '3W' | '2M' | '3M';
2
+ export interface PnlCalendarOptions {
3
+ timeframe?: PnlCalendarTimeframe;
4
+ startDate?: Date | string;
5
+ endDate?: Date | string;
6
+ }
7
+ export interface PnlCalendarAsset {
8
+ coin: string;
9
+ symbol: string;
10
+ assetName: string;
11
+ marketPrefix: string;
12
+ percentage: number;
13
+ collateralToken: string;
14
+ }
15
+ export interface PnlCalendarTrade {
16
+ tradeHistoryId: string;
17
+ realizedPnl: number;
18
+ result: 'profit' | 'loss' | 'breakeven';
19
+ collateralTypes: string[];
20
+ closedLongAssets: PnlCalendarAsset[];
21
+ closedShortAssets: PnlCalendarAsset[];
22
+ }
23
+ export interface PnlCalendarDay {
24
+ date: string;
25
+ totalPnl: number;
26
+ volume: number;
27
+ positionsClosed: number;
28
+ result: 'profit' | 'loss' | 'breakeven';
29
+ trades: PnlCalendarTrade[];
30
+ }
31
+ export interface PeriodSummary {
32
+ pnl: number;
33
+ volume: number;
34
+ winRate: number;
35
+ wins: number;
36
+ losses: number;
37
+ totalProfit: number;
38
+ totalLoss: number;
39
+ }
40
+ export interface PnlCalendarWeek {
41
+ weekStart: string;
42
+ weekEnd: string;
43
+ days: PnlCalendarDay[];
44
+ summary: PeriodSummary;
45
+ }
46
+ export interface PnlCalendarMonth {
47
+ month: string;
48
+ label: string;
49
+ days: PnlCalendarDay[];
50
+ summary: PeriodSummary;
51
+ }
52
+ export interface UsePnlCalendarResult {
53
+ timeframe: PnlCalendarTimeframe;
54
+ weeks: PnlCalendarWeek[];
55
+ months: PnlCalendarMonth[];
56
+ overall: PeriodSummary;
57
+ isLoading: boolean;
58
+ error: string | null;
59
+ refetch: () => void;
60
+ }
61
+ export declare function usePnlCalendar(options?: PnlCalendarTimeframe | PnlCalendarOptions): UsePnlCalendarResult;
@@ -0,0 +1,13 @@
1
+ import type { PnlCalendarTrade } from './usePnlCalendar';
2
+ export type PnlHeatmapTimeframe = 'allTime' | '100D' | '30D' | '7D';
3
+ export interface PnlHeatmapTrade extends PnlCalendarTrade {
4
+ percentage: number;
5
+ }
6
+ export interface UsePnlHeatmapResult {
7
+ timeframe: PnlHeatmapTimeframe;
8
+ trades: PnlHeatmapTrade[];
9
+ isLoading: boolean;
10
+ error: string | null;
11
+ refetch: () => void;
12
+ }
13
+ export declare function usePnlHeatmap(timeframe?: PnlHeatmapTimeframe): UsePnlHeatmapResult;
@@ -1,5 +1,24 @@
1
1
  import { type UpdateRiskParametersRequestInput, type UpdateRiskParametersResponseDto, type ClosePositionRequestInput, type ClosePositionResponseDto, type CloseAllPositionsResponseDto, type AdjustPositionRequestInput, type AdjustPositionResponseDto, type AdjustAdvanceItemInput, type AdjustAdvanceResponseDto, type UpdateLeverageResponseDto } from '../clients/positions';
2
2
  import type { ApiResponse, CreatePositionRequestInput, CreatePositionResponseDto, OpenPositionDto } from '../types';
3
+ export interface RebalanceAssetPlan {
4
+ coin: string;
5
+ side: 'long' | 'short';
6
+ currentWeight: number;
7
+ targetWeight: number;
8
+ currentValue: number;
9
+ targetValue: number;
10
+ deltaValue: number;
11
+ currentSize: number;
12
+ newSize: number;
13
+ deltaSize: number;
14
+ skipped: boolean;
15
+ skipReason?: string;
16
+ }
17
+ export interface RebalancePlan {
18
+ positionId: string;
19
+ assets: RebalanceAssetPlan[];
20
+ canExecute: boolean;
21
+ }
3
22
  export declare function usePosition(): {
4
23
  readonly createPosition: (payload: CreatePositionRequestInput) => Promise<ApiResponse<CreatePositionResponseDto>>;
5
24
  readonly updateRiskParameters: (positionId: string, payload: UpdateRiskParametersRequestInput) => Promise<ApiResponse<UpdateRiskParametersResponseDto>>;
@@ -10,4 +29,6 @@ export declare function usePosition(): {
10
29
  readonly updateLeverage: (positionId: string, leverage: number) => Promise<ApiResponse<UpdateLeverageResponseDto | null>>;
11
30
  readonly openPositions: OpenPositionDto[] | null;
12
31
  readonly isLoading: boolean;
32
+ readonly planRebalance: (positionId: string, targetWeights?: Record<string, number>) => RebalancePlan;
33
+ readonly executeRebalance: (positionId: string, targetWeights?: Record<string, number>) => Promise<ApiResponse<AdjustAdvanceResponseDto>>;
13
34
  };
package/dist/index.d.ts CHANGED
@@ -228,6 +228,7 @@ interface TwapMonitoringDto {
228
228
  interface TradeHistoryAssetDataDto {
229
229
  coin: string;
230
230
  entryWeight: number;
231
+ closeWeight: number;
231
232
  entryPrice: number;
232
233
  limitPrice: number;
233
234
  leverage: number;
@@ -283,7 +284,9 @@ interface PositionAssetDetailDto {
283
284
  unrealizedPnl: number;
284
285
  liquidationPrice: number;
285
286
  initialWeight: number;
287
+ currentWeight: number;
286
288
  fundingPaid?: number;
289
+ targetWeight?: number;
287
290
  metadata?: TokenMetadata | null;
288
291
  }
289
292
  interface TpSlThreshold {
@@ -591,6 +594,7 @@ interface HLChannelDataMap {
591
594
  allDexsAssetCtxs: AllDexsAssetCtxsData;
592
595
  userFills: any;
593
596
  }
597
+ type UserAbstraction = 'dexAbstraction' | 'disabled' | 'unifiedAccount' | 'portfolioMargin';
594
598
  interface WebData3UserState {
595
599
  agentAddress?: string;
596
600
  agentValidUntil?: number;
@@ -599,6 +603,7 @@ interface WebData3UserState {
599
603
  isVault: boolean;
600
604
  user: string;
601
605
  dexAbstractionEnabled?: boolean;
606
+ abstraction: UserAbstraction;
602
607
  }
603
608
  interface WebData3AssetCtx {
604
609
  funding: string;
@@ -759,6 +764,7 @@ interface RawAssetDto {
759
764
  side: string;
760
765
  fundingPaid?: number;
761
766
  leverage: number;
767
+ targetWeight?: number;
762
768
  }
763
769
  /**
764
770
  * Raw position data from open-positions channel
@@ -1068,6 +1074,8 @@ interface TokenHistoricalPriceData {
1068
1074
  candles: CandleData[];
1069
1075
  oldestTime: number | null;
1070
1076
  latestTime: number | null;
1077
+ requestedRanges: HistoricalRange[];
1078
+ noDataBefore: number | null;
1071
1079
  }
1072
1080
  interface HistoricalPriceDataState {
1073
1081
  historicalPriceData: Record<string, TokenHistoricalPriceData>;
@@ -1075,6 +1083,7 @@ interface HistoricalPriceDataState {
1075
1083
  addHistoricalPriceData: (symbol: string, interval: CandleInterval, candles: CandleData[], range: HistoricalRange) => void;
1076
1084
  hasHistoricalPriceData: (symbol: string, interval: CandleInterval, startTime: number, endTime: number) => boolean;
1077
1085
  getHistoricalPriceData: (symbol: string, interval: CandleInterval, startTime: number, endTime: number) => CandleData[];
1086
+ getEffectiveDataBoundary: (symbols: string[], interval: CandleInterval) => number | null;
1078
1087
  setTokenLoading: (symbol: string, loading: boolean) => void;
1079
1088
  isTokenLoading: (symbol: string) => boolean;
1080
1089
  removeTokenPriceData: (symbol: string, interval: CandleInterval) => void;
@@ -1086,6 +1095,7 @@ interface UseHistoricalPriceDataReturn {
1086
1095
  fetchHistoricalPriceData: (startTime: number, endTime: number, interval: CandleInterval, callback?: (data: Record<string, CandleData[]>) => void) => Promise<Record<string, CandleData[]>>;
1087
1096
  hasHistoricalPriceData: (startTime: number, endTime: number, interval: CandleInterval) => boolean;
1088
1097
  getHistoricalPriceData: (startTime: number, endTime: number, interval: CandleInterval) => Record<string, CandleData[]>;
1098
+ getEffectiveDataBoundary: (interval: CandleInterval) => number | null;
1089
1099
  getAllHistoricalPriceData(): Promise<Record<string, TokenHistoricalPriceData>>;
1090
1100
  isLoading: (symbol?: string) => boolean;
1091
1101
  clearCache: () => void;
@@ -1096,6 +1106,7 @@ interface UseBasketCandlesReturn {
1096
1106
  fetchBasketCandles: (startTime: number, endTime: number, interval: CandleInterval) => Promise<CandleData[]>;
1097
1107
  fetchPerformanceCandles: (startTime: number, endTime: number, interval: CandleInterval, symbol: string) => Promise<CandleData[]>;
1098
1108
  fetchOverallPerformanceCandles: (startTime: number, endTime: number, interval: CandleInterval) => Promise<CandleData[]>;
1109
+ getEffectiveDataBoundary: (interval: CandleInterval) => number | null;
1099
1110
  isLoading: boolean;
1100
1111
  addRealtimeListener: (cb: RealtimeBarsCallback) => string;
1101
1112
  removeRealtimeListener: (id: string) => void;
@@ -1286,6 +1297,25 @@ interface UpdateLeverageResponseDto {
1286
1297
  }
1287
1298
  declare function updateLeverage(baseUrl: string, positionId: string, payload: UpdateLeverageRequestInput): Promise<ApiResponse<UpdateLeverageResponseDto | null>>;
1288
1299
 
1300
+ interface RebalanceAssetPlan {
1301
+ coin: string;
1302
+ side: 'long' | 'short';
1303
+ currentWeight: number;
1304
+ targetWeight: number;
1305
+ currentValue: number;
1306
+ targetValue: number;
1307
+ deltaValue: number;
1308
+ currentSize: number;
1309
+ newSize: number;
1310
+ deltaSize: number;
1311
+ skipped: boolean;
1312
+ skipReason?: string;
1313
+ }
1314
+ interface RebalancePlan {
1315
+ positionId: string;
1316
+ assets: RebalanceAssetPlan[];
1317
+ canExecute: boolean;
1318
+ }
1289
1319
  declare function usePosition(): {
1290
1320
  readonly createPosition: (payload: CreatePositionRequestInput) => Promise<ApiResponse<CreatePositionResponseDto>>;
1291
1321
  readonly updateRiskParameters: (positionId: string, payload: UpdateRiskParametersRequestInput) => Promise<ApiResponse<UpdateRiskParametersResponseDto>>;
@@ -1296,6 +1326,8 @@ declare function usePosition(): {
1296
1326
  readonly updateLeverage: (positionId: string, leverage: number) => Promise<ApiResponse<UpdateLeverageResponseDto | null>>;
1297
1327
  readonly openPositions: OpenPositionDto[] | null;
1298
1328
  readonly isLoading: boolean;
1329
+ readonly planRebalance: (positionId: string, targetWeights?: Record<string, number>) => RebalancePlan;
1330
+ readonly executeRebalance: (positionId: string, targetWeights?: Record<string, number>) => Promise<ApiResponse<AdjustAdvanceResponseDto>>;
1299
1331
  };
1300
1332
 
1301
1333
  declare function useOrders(): {
@@ -1414,6 +1446,7 @@ declare function usePortfolio(): UsePortfolioResult;
1414
1446
  declare function useAuth(): {
1415
1447
  readonly isReady: boolean;
1416
1448
  readonly isAuthenticated: boolean;
1449
+ readonly address: string | null;
1417
1450
  readonly accessToken: string | null;
1418
1451
  readonly refreshToken: string | null;
1419
1452
  readonly getEip712: (address: string) => Promise<GetEIP712MessageResponse>;
@@ -1421,6 +1454,8 @@ declare function useAuth(): {
1421
1454
  readonly loginWithPrivyToken: (address: string, appId: string, privyAccessToken: string) => Promise<void>;
1422
1455
  readonly refreshTokens: () => Promise<RefreshTokenResponse>;
1423
1456
  readonly logout: () => Promise<void>;
1457
+ readonly clearSession: () => void;
1458
+ readonly setAddress: (address: string | null) => void;
1424
1459
  };
1425
1460
 
1426
1461
  interface MarginRequiredPerCollateral {
@@ -1440,6 +1475,7 @@ interface AllUserBalancesResult {
1440
1475
  spotBalances: SpotBalances;
1441
1476
  availableToTrades: AvailableToTrades;
1442
1477
  isLoading: boolean;
1478
+ abstractionMode: UserAbstraction | null;
1443
1479
  getMarginRequired: (assetsLeverage: Record<string, number>, size: number) => MarginRequiredResult;
1444
1480
  getMaxSize: (assetsLeverage: Record<string, number>) => number;
1445
1481
  }
@@ -1462,6 +1498,81 @@ interface UseHyperliquidUserFillsState {
1462
1498
  */
1463
1499
  declare function useHyperliquidUserFills(options: UseHyperliquidUserFillsOptions): UseHyperliquidUserFillsState;
1464
1500
 
1501
+ type PnlCalendarTimeframe = '2W' | '3W' | '2M' | '3M';
1502
+ interface PnlCalendarOptions {
1503
+ timeframe?: PnlCalendarTimeframe;
1504
+ startDate?: Date | string;
1505
+ endDate?: Date | string;
1506
+ }
1507
+ interface PnlCalendarAsset {
1508
+ coin: string;
1509
+ symbol: string;
1510
+ assetName: string;
1511
+ marketPrefix: string;
1512
+ percentage: number;
1513
+ collateralToken: string;
1514
+ }
1515
+ interface PnlCalendarTrade {
1516
+ tradeHistoryId: string;
1517
+ realizedPnl: number;
1518
+ result: 'profit' | 'loss' | 'breakeven';
1519
+ collateralTypes: string[];
1520
+ closedLongAssets: PnlCalendarAsset[];
1521
+ closedShortAssets: PnlCalendarAsset[];
1522
+ }
1523
+ interface PnlCalendarDay {
1524
+ date: string;
1525
+ totalPnl: number;
1526
+ volume: number;
1527
+ positionsClosed: number;
1528
+ result: 'profit' | 'loss' | 'breakeven';
1529
+ trades: PnlCalendarTrade[];
1530
+ }
1531
+ interface PeriodSummary {
1532
+ pnl: number;
1533
+ volume: number;
1534
+ winRate: number;
1535
+ wins: number;
1536
+ losses: number;
1537
+ totalProfit: number;
1538
+ totalLoss: number;
1539
+ }
1540
+ interface PnlCalendarWeek {
1541
+ weekStart: string;
1542
+ weekEnd: string;
1543
+ days: PnlCalendarDay[];
1544
+ summary: PeriodSummary;
1545
+ }
1546
+ interface PnlCalendarMonth {
1547
+ month: string;
1548
+ label: string;
1549
+ days: PnlCalendarDay[];
1550
+ summary: PeriodSummary;
1551
+ }
1552
+ interface UsePnlCalendarResult {
1553
+ timeframe: PnlCalendarTimeframe;
1554
+ weeks: PnlCalendarWeek[];
1555
+ months: PnlCalendarMonth[];
1556
+ overall: PeriodSummary;
1557
+ isLoading: boolean;
1558
+ error: string | null;
1559
+ refetch: () => void;
1560
+ }
1561
+ declare function usePnlCalendar(options?: PnlCalendarTimeframe | PnlCalendarOptions): UsePnlCalendarResult;
1562
+
1563
+ type PnlHeatmapTimeframe = 'allTime' | '100D' | '30D' | '7D';
1564
+ interface PnlHeatmapTrade extends PnlCalendarTrade {
1565
+ percentage: number;
1566
+ }
1567
+ interface UsePnlHeatmapResult {
1568
+ timeframe: PnlHeatmapTimeframe;
1569
+ trades: PnlHeatmapTrade[];
1570
+ isLoading: boolean;
1571
+ error: string | null;
1572
+ refetch: () => void;
1573
+ }
1574
+ declare function usePnlHeatmap(timeframe?: PnlHeatmapTimeframe): UsePnlHeatmapResult;
1575
+
1465
1576
  /**
1466
1577
  * Mark notifications as read up to a given timestamp (ms)
1467
1578
  */
@@ -1736,5 +1847,5 @@ interface MarketDataState {
1736
1847
  }
1737
1848
  declare const useMarketData: zustand.UseBoundStore<zustand.StoreApi<MarketDataState>>;
1738
1849
 
1739
- export { ConflictDetector, MAX_ASSETS_PER_LEG, MINIMUM_ASSET_USD_VALUE, MaxAssetsPerLegError, MinimumPositionSizeError, PearHyperliquidProvider, ReadyState, adjustAdvancePosition, adjustOrder, adjustPosition, calculateMinimumPositionValue, calculateWeightedRatio, cancelOrder, cancelTwap, cancelTwapOrder, closeAllPositions, closePosition, computeBasketCandles, createCandleLookups, createPosition, executeSpotOrder, getCompleteTimestamps, getKalshiMarkets, getOrderDirection, getOrderLadderConfig, getOrderLeverage, getOrderReduceOnly, getOrderTpSlTriggerType, getOrderTrailingInfo, getOrderTriggerType, getOrderTriggerValue, getOrderTwapDuration, getOrderUsdValue, getPortfolio, isBtcDomOrder, mapCandleIntervalToTradingViewInterval, mapTradingViewIntervalToCandleInterval, markNotificationReadById, markNotificationsRead, toggleWatchlist, updateLeverage, updateRiskParameters, useAccountSummary, useAgentWallet, useAllUserBalances, useAuth, useBasketCandles, useHistoricalPriceData, useHistoricalPriceDataStore, useHyperliquidUserFills, useMarket, useMarketData, useMarketDataHook, useNotifications, useOpenOrders, useOrders, usePearHyperliquid, usePerformanceOverlays, usePortfolio, usePosition, useSpotOrder, useTokenSelectionMetadata, useTradeHistories, useTwap, useUserSelection, useWatchlist, validateMaxAssetsPerLeg, validateMinimumAssetSize, validatePositionSize };
1740
- export type { AccountSummaryResponseDto, ActiveAssetData, ActiveAssetGroupItem, ActiveAssetsAllResponse, ActiveAssetsResponse, AddressState, AdjustAdvanceAssetInput, AdjustAdvanceItemInput, AdjustAdvanceResponseDto, AdjustExecutionType, AdjustOrderRequestInput, AdjustOrderResponseDto, AdjustPositionRequestInput, AdjustPositionResponseDto, AgentWalletDto, AgentWalletState, AgentWalletStatus, AllDexsAssetCtxsData, AllDexsClearinghouseStateData, AllPerpMetasItem, AllPerpMetasResponse, ApiErrorResponse, ApiResponse, AssetCtx, AssetInformationDetail, AssetMarketData, AssetPosition, AuthenticateRequest, AuthenticateResponse, AvailableToTrades, BalanceSummaryDto, BaseTriggerOrderNotificationParams, BtcDomTriggerParams, CancelOrderResponseDto, CancelTwapResponseDto, CandleChartData, CandleData, CandleInterval, CandleSnapshotRequest, ChunkFillDto, ClearinghouseState, CloseAllPositionsResponseDto, CloseAllPositionsResultDto, CloseExecutionType, ClosePositionRequestInput, ClosePositionResponseDto, CollateralToken, CreateAgentWalletResponseDto, CreatePositionRequestInput, CreatePositionResponseDto, CrossAssetPriceTriggerParams, CrossMarginSummaryDto, CumFundingDto, EIP712AuthDetails, ExecutionType, ExternalFillDto, ExternalLiquidationDto, ExtraAgent, GetAgentWalletResponseDto, GetEIP712MessageResponse, GetKalshiMarketsParams, HLChannel, HLChannelDataMap, HLWebSocketResponse, HistoricalRange, KalshiMarket, KalshiMarketsResponse, KalshiMveLeg, KalshiPriceRange, LadderConfigInput, LadderOrderParameters, LeverageInfo, LogoutRequest, LogoutResponse, MarginRequiredPerCollateral, MarginRequiredResult, MarginSummaryDto, MarginTableDef, MarginTablesEntry, MarginTier, MarketOrderParameters, NotificationCategory, NotificationDto, OpenLimitOrderDto, OpenPositionDto, OrderAssetDto, OrderDirection, OrderParameters, OrderStatus, OrderType, PairAssetDto, PairAssetInput, PerformanceOverlay, PerpDex, PerpDexsResponse, PerpMetaAsset, PlatformAccountSummaryResponseDto, PortfolioBucketDto, PortfolioInterval, PortfolioIntervalsDto, PortfolioOverallDto, PortfolioResponseDto, PositionAdjustmentType, PositionAssetDetailDto, PredictionMarketOutcomeTriggerParams, PriceRatioTriggerParams, PriceTriggerParams, PrivyAuthDetails, RawAssetDto, RawPositionDto, RealtimeBar, RealtimeBarsCallback, RefreshTokenRequest, RefreshTokenResponse, SpotBalance, SpotBalances, SpotOrderFilledStatus, SpotOrderHyperliquidData, SpotOrderHyperliquidResult, SpotOrderRequestInput, SpotOrderResponseDto, SpotState, SyncFillsRequestDto, SyncFillsResponseDto, ToggleWatchlistResponseDto, TokenConflict, TokenEntry, TokenHistoricalPriceData, TokenMetadata, TokenSelection, TokenSelectorConfig, TpSlOrderParameters, TpSlThreshold, TpSlThresholdInput, TpSlThresholdType, TpSlTriggerType, TradeHistoryAssetDataDto, TradeHistoryDataDto, TriggerOrderNotificationAsset, TriggerOrderNotificationParams, TriggerOrderNotificationType, TriggerOrderParameters, TriggerType, TwapChunkStatus, TwapChunkStatusDto, TwapMonitoringDto, TwapOrderOverallStatus, TwapOrderParameters, TwapSliceFillResponseItem, UniverseAsset, UpdateLeverageRequestInput, UpdateLeverageResponseDto, UpdateRiskParametersRequestInput, UpdateRiskParametersResponseDto, UseAuthOptions, UseBasketCandlesReturn, UseHistoricalPriceDataReturn, UseHyperliquidUserFillsOptions, UseHyperliquidUserFillsState, UseNotificationsResult, UsePerformanceOverlaysReturn, UsePortfolioResult, UseSpotOrderResult, UseTokenSelectionMetadataReturn, UserProfile, UserSelectionState, WatchlistAssetDto, WatchlistItemDto, WebData3AssetCtx, WebData3PerpDexState, WebData3Response, WebData3UserState, WebSocketAckResponse, WebSocketChannel, WebSocketConnectionState, WebSocketDataMessage, WebSocketMessage, WebSocketSubscribeMessage, WsAllMidsData };
1850
+ export { ConflictDetector, MAX_ASSETS_PER_LEG, MINIMUM_ASSET_USD_VALUE, MaxAssetsPerLegError, MinimumPositionSizeError, PearHyperliquidProvider, ReadyState, adjustAdvancePosition, adjustOrder, adjustPosition, calculateMinimumPositionValue, calculateWeightedRatio, cancelOrder, cancelTwap, cancelTwapOrder, closeAllPositions, closePosition, computeBasketCandles, createCandleLookups, createPosition, executeSpotOrder, getCompleteTimestamps, getKalshiMarkets, getOrderDirection, getOrderLadderConfig, getOrderLeverage, getOrderReduceOnly, getOrderTpSlTriggerType, getOrderTrailingInfo, getOrderTriggerType, getOrderTriggerValue, getOrderTwapDuration, getOrderUsdValue, getPortfolio, isBtcDomOrder, mapCandleIntervalToTradingViewInterval, mapTradingViewIntervalToCandleInterval, markNotificationReadById, markNotificationsRead, toggleWatchlist, updateLeverage, updateRiskParameters, useAccountSummary, useAgentWallet, useAllUserBalances, useAuth, useBasketCandles, useHistoricalPriceData, useHistoricalPriceDataStore, useHyperliquidUserFills, useMarket, useMarketData, useMarketDataHook, useNotifications, useOpenOrders, useOrders, usePearHyperliquid, usePerformanceOverlays, usePnlCalendar, usePnlHeatmap, usePortfolio, usePosition, useSpotOrder, useTokenSelectionMetadata, useTradeHistories, useTwap, useUserSelection, useWatchlist, validateMaxAssetsPerLeg, validateMinimumAssetSize, validatePositionSize };
1851
+ export type { AccountSummaryResponseDto, ActiveAssetData, ActiveAssetGroupItem, ActiveAssetsAllResponse, ActiveAssetsResponse, AddressState, AdjustAdvanceAssetInput, AdjustAdvanceItemInput, AdjustAdvanceResponseDto, AdjustExecutionType, AdjustOrderRequestInput, AdjustOrderResponseDto, AdjustPositionRequestInput, AdjustPositionResponseDto, AgentWalletDto, AgentWalletState, AgentWalletStatus, AllDexsAssetCtxsData, AllDexsClearinghouseStateData, AllPerpMetasItem, AllPerpMetasResponse, ApiErrorResponse, ApiResponse, AssetCtx, AssetInformationDetail, AssetMarketData, AssetPosition, AuthenticateRequest, AuthenticateResponse, AvailableToTrades, BalanceSummaryDto, BaseTriggerOrderNotificationParams, BtcDomTriggerParams, CancelOrderResponseDto, CancelTwapResponseDto, CandleChartData, CandleData, CandleInterval, CandleSnapshotRequest, ChunkFillDto, ClearinghouseState, CloseAllPositionsResponseDto, CloseAllPositionsResultDto, CloseExecutionType, ClosePositionRequestInput, ClosePositionResponseDto, CollateralToken, CreateAgentWalletResponseDto, CreatePositionRequestInput, CreatePositionResponseDto, CrossAssetPriceTriggerParams, CrossMarginSummaryDto, CumFundingDto, EIP712AuthDetails, ExecutionType, ExternalFillDto, ExternalLiquidationDto, ExtraAgent, GetAgentWalletResponseDto, GetEIP712MessageResponse, GetKalshiMarketsParams, HLChannel, HLChannelDataMap, HLWebSocketResponse, HistoricalRange, KalshiMarket, KalshiMarketsResponse, KalshiMveLeg, KalshiPriceRange, LadderConfigInput, LadderOrderParameters, LeverageInfo, LogoutRequest, LogoutResponse, MarginRequiredPerCollateral, MarginRequiredResult, MarginSummaryDto, MarginTableDef, MarginTablesEntry, MarginTier, MarketOrderParameters, NotificationCategory, NotificationDto, OpenLimitOrderDto, OpenPositionDto, OrderAssetDto, OrderDirection, OrderParameters, OrderStatus, OrderType, PairAssetDto, PairAssetInput, PerformanceOverlay, PeriodSummary, PerpDex, PerpDexsResponse, PerpMetaAsset, PlatformAccountSummaryResponseDto, PnlCalendarAsset, PnlCalendarDay, PnlCalendarMonth, PnlCalendarOptions, PnlCalendarTimeframe, PnlCalendarTrade, PnlCalendarWeek, PnlHeatmapTimeframe, PnlHeatmapTrade, PortfolioBucketDto, PortfolioInterval, PortfolioIntervalsDto, PortfolioOverallDto, PortfolioResponseDto, PositionAdjustmentType, PositionAssetDetailDto, PredictionMarketOutcomeTriggerParams, PriceRatioTriggerParams, PriceTriggerParams, PrivyAuthDetails, RawAssetDto, RawPositionDto, RealtimeBar, RealtimeBarsCallback, RebalanceAssetPlan, RebalancePlan, RefreshTokenRequest, RefreshTokenResponse, SpotBalance, SpotBalances, SpotOrderFilledStatus, SpotOrderHyperliquidData, SpotOrderHyperliquidResult, SpotOrderRequestInput, SpotOrderResponseDto, SpotState, SyncFillsRequestDto, SyncFillsResponseDto, ToggleWatchlistResponseDto, TokenConflict, TokenEntry, TokenHistoricalPriceData, TokenMetadata, TokenSelection, TokenSelectorConfig, TpSlOrderParameters, TpSlThreshold, TpSlThresholdInput, TpSlThresholdType, TpSlTriggerType, TradeHistoryAssetDataDto, TradeHistoryDataDto, TriggerOrderNotificationAsset, TriggerOrderNotificationParams, TriggerOrderNotificationType, TriggerOrderParameters, TriggerType, TwapChunkStatus, TwapChunkStatusDto, TwapMonitoringDto, TwapOrderOverallStatus, TwapOrderParameters, TwapSliceFillResponseItem, UniverseAsset, UpdateLeverageRequestInput, UpdateLeverageResponseDto, UpdateRiskParametersRequestInput, UpdateRiskParametersResponseDto, UseAuthOptions, UseBasketCandlesReturn, UseHistoricalPriceDataReturn, UseHyperliquidUserFillsOptions, UseHyperliquidUserFillsState, UseNotificationsResult, UsePerformanceOverlaysReturn, UsePnlCalendarResult, UsePnlHeatmapResult, UsePortfolioResult, UseSpotOrderResult, UseTokenSelectionMetadataReturn, UserAbstraction, UserProfile, UserSelectionState, WatchlistAssetDto, WatchlistItemDto, WebData3AssetCtx, WebData3PerpDexState, WebData3Response, WebData3UserState, WebSocketAckResponse, WebSocketChannel, WebSocketConnectionState, WebSocketDataMessage, WebSocketMessage, WebSocketSubscribeMessage, WsAllMidsData };