@pear-protocol/hyperliquid-sdk 0.0.38 → 0.0.40

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.
@@ -25,6 +25,7 @@ export interface CreatePositionRequestInput {
25
25
  triggerValue?: number;
26
26
  direction?: 'MORE_THAN' | 'LESS_THAN';
27
27
  twapDuration?: number;
28
+ twapIntervalSeconds?: number;
28
29
  randomizeExecution?: boolean;
29
30
  ladderConfig?: LadderConfigInput;
30
31
  takeProfit?: TpSlThresholdInput | null;
@@ -69,6 +70,7 @@ export type CloseExecutionType = 'MARKET' | 'TWAP';
69
70
  export interface ClosePositionRequestInput {
70
71
  executionType: CloseExecutionType;
71
72
  twapDuration?: number;
73
+ twapIntervalSeconds?: number;
72
74
  randomizeExecution?: boolean;
73
75
  }
74
76
  export interface ClosePositionResponseDto {
@@ -1,6 +1,6 @@
1
- import type { ApiResponse } from '../types';
1
+ import type { ApiResponse, TwapMonitoringDto } from '../types';
2
2
  import type { CancelTwapResponseDto } from '../clients/orders';
3
3
  export declare function useTwap(): {
4
- readonly orders: any;
4
+ readonly orders: TwapMonitoringDto[];
5
5
  readonly cancelTwap: (orderId: string) => Promise<ApiResponse<CancelTwapResponseDto>>;
6
6
  };
package/dist/index.d.ts CHANGED
@@ -92,6 +92,8 @@ interface TwapMonitoringDto {
92
92
  filledUsdValue: number;
93
93
  remainingUsdValue: number;
94
94
  twapDuration: string;
95
+ twapIntervalSeconds?: number | null;
96
+ twapChunkUsdValue?: number | null;
95
97
  randomizeExecution: boolean;
96
98
  reduceOnly: boolean;
97
99
  chunks: TwapChunkStatusDto[];
@@ -852,6 +854,7 @@ interface CreatePositionRequestInput {
852
854
  triggerValue?: number;
853
855
  direction?: 'MORE_THAN' | 'LESS_THAN';
854
856
  twapDuration?: number;
857
+ twapIntervalSeconds?: number;
855
858
  randomizeExecution?: boolean;
856
859
  ladderConfig?: LadderConfigInput;
857
860
  takeProfit?: TpSlThresholdInput | null;
@@ -896,6 +899,7 @@ type CloseExecutionType = 'MARKET' | 'TWAP';
896
899
  interface ClosePositionRequestInput {
897
900
  executionType: CloseExecutionType;
898
901
  twapDuration?: number;
902
+ twapIntervalSeconds?: number;
899
903
  randomizeExecution?: boolean;
900
904
  }
901
905
  interface ClosePositionResponseDto {
@@ -952,7 +956,7 @@ declare function useOrders(): {
952
956
  };
953
957
 
954
958
  declare function useTwap(): {
955
- readonly orders: any;
959
+ readonly orders: TwapMonitoringDto[];
956
960
  readonly cancelTwap: (orderId: string) => Promise<ApiResponse<CancelTwapResponseDto>>;
957
961
  };
958
962
 
package/dist/types.d.ts CHANGED
@@ -113,6 +113,8 @@ export interface TwapMonitoringDto {
113
113
  filledUsdValue: number;
114
114
  remainingUsdValue: number;
115
115
  twapDuration: string;
116
+ twapIntervalSeconds?: number | null;
117
+ twapChunkUsdValue?: number | null;
116
118
  randomizeExecution: boolean;
117
119
  reduceOnly: boolean;
118
120
  chunks: TwapChunkStatusDto[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pear-protocol/hyperliquid-sdk",
3
- "version": "0.0.38",
3
+ "version": "0.0.40",
4
4
  "description": "React SDK for Pear Protocol Hyperliquid API integration",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",