@pear-protocol/core-sdk 1.8.0 → 1.9.0

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.
@@ -2046,6 +2046,7 @@ declare class Core {
2046
2046
  status: "OPEN" | "CLOSED";
2047
2047
  origin: "PARTIAL" | "PEAR" | "EXTERNAL";
2048
2048
  exposure: Record<string, `-${string}` | `+${string}`>;
2049
+ unstableHistoricalData: boolean;
2049
2050
  totalFundingPayment: Record<string, `-${string}` | `+${string}`>;
2050
2051
  initialExposureUSD: Record<string, `-${string}` | `+${string}`>;
2051
2052
  entryPrices: Record<string, string>;
@@ -2270,6 +2271,7 @@ declare class Core {
2270
2271
  minimumDriftPct: string;
2271
2272
  createdAt: string;
2272
2273
  updatedAt: string;
2274
+ pausedReason?: "USER" | "POSITION_CHANGED" | "REPEATED_FAILURES" | undefined;
2273
2275
  timeframe?: "1d" | "1h" | "4h" | undefined;
2274
2276
  }[];
2275
2277
  nextCursor?: string | undefined;
@@ -2283,6 +2285,7 @@ declare class Core {
2283
2285
  minimumDriftPct: string;
2284
2286
  createdAt: string;
2285
2287
  updatedAt: string;
2288
+ pausedReason?: "USER" | "POSITION_CHANGED" | "REPEATED_FAILURES" | undefined;
2286
2289
  timeframe?: "1d" | "1h" | "4h" | undefined;
2287
2290
  };
2288
2291
  }>;
@@ -2295,6 +2298,20 @@ declare class Core {
2295
2298
  minimumDriftPct: string;
2296
2299
  createdAt: string;
2297
2300
  updatedAt: string;
2301
+ pausedReason?: "USER" | "POSITION_CHANGED" | "REPEATED_FAILURES" | undefined;
2302
+ timeframe?: "1d" | "1h" | "4h" | undefined;
2303
+ };
2304
+ }>;
2305
+ replace: (id: string, body: HttpTypes.ReplaceAutoRebalanceConfig, headers?: ClientHeaders) => Promise<{
2306
+ config: {
2307
+ id: string;
2308
+ positionId: string;
2309
+ status: "ACTIVE" | "PAUSED";
2310
+ weightSource: "INITIAL_WEIGHT" | "LIVE_BETA";
2311
+ minimumDriftPct: string;
2312
+ createdAt: string;
2313
+ updatedAt: string;
2314
+ pausedReason?: "USER" | "POSITION_CHANGED" | "REPEATED_FAILURES" | undefined;
2298
2315
  timeframe?: "1d" | "1h" | "4h" | undefined;
2299
2316
  };
2300
2317
  }>;
@@ -282,6 +282,13 @@ class Core {
282
282
  body
283
283
  });
284
284
  },
285
+ replace: async (id, body, headers) => {
286
+ return await this.client.fetch(`/rebalance/auto/${id}/replace`, {
287
+ method: "POST",
288
+ headers,
289
+ body
290
+ });
291
+ },
285
292
  cancel: async (id, headers) => {
286
293
  return await this.client.fetch(`/rebalance/auto/${id}/cancel`, {
287
294
  method: "POST",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pear-protocol/core-sdk",
3
- "version": "1.8.0",
3
+ "version": "1.9.0",
4
4
  "description": "Pear Protocol Core SDK",
5
5
  "private": false,
6
6
  "type": "module",
@@ -27,7 +27,7 @@
27
27
  "typecheck": "tsc --noEmit"
28
28
  },
29
29
  "dependencies": {
30
- "@pear-protocol/types": "^1.11.0",
30
+ "@pear-protocol/types": "^1.12.0",
31
31
  "@pear-protocol/utils": "^0.2.0",
32
32
  "qs": "^6.14.0"
33
33
  },