@pear-protocol/core-sdk 2.6.0 → 2.7.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.
@@ -6126,6 +6126,8 @@ declare class Core {
6126
6126
  updatedAt: string;
6127
6127
  origin: "PARTIAL" | "PEAR" | "EXTERNAL";
6128
6128
  realizedGrossPnl: `-${string}` | `+${string}`;
6129
+ volume: string;
6130
+ grossUpnl: `-${string}` | `+${string}`;
6129
6131
  netCashflow: `-${string}` | `+${string}`;
6130
6132
  totalFees: `-${string}` | `+${string}`;
6131
6133
  tradeFees: `-${string}` | `+${string}`;
@@ -10191,6 +10193,13 @@ declare class Core {
10191
10193
  };
10192
10194
  createdAt: string;
10193
10195
  status: "ACTIVE";
10196
+ volume: string;
10197
+ grossRealizedPnl: `-${string}` | `+${string}`;
10198
+ grossUpnl: `-${string}` | `+${string}`;
10199
+ fundingPayment: `-${string}` | `+${string}`;
10200
+ tradeFee: `-${string}` | `+${string}`;
10201
+ pearFee: `-${string}` | `+${string}`;
10202
+ totalNetPnl: `-${string}` | `+${string}`;
10194
10203
  endedAt?: string | undefined;
10195
10204
  };
10196
10205
  }>;
@@ -10224,20 +10233,39 @@ declare class Core {
10224
10233
  xAvatarUrl?: string | undefined;
10225
10234
  }[];
10226
10235
  }>;
10227
- /** Read subscription history; use copy.state for the current relationship of one account. */
10228
- listSubscriptions: (headers?: ClientHeaders) => Promise<{
10229
- subscriptions: {
10236
+ /** Read subscription history, optionally by status; use copy.state for one account's current relationship. */
10237
+ listSubscriptions: (headers?: ClientHeaders, query?: HttpTypes.CopySubscriptionListQueryInput) => Promise<{
10238
+ subscriptions: ({
10230
10239
  id: string;
10231
10240
  leaderTradeAccountId: string;
10232
10241
  followerTradeAccountId: string;
10233
10242
  connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
10234
- status: "ACTIVE" | "ENDED";
10235
10243
  sizing: {
10236
10244
  mode: "LEADER_EQUITY_FRACTION";
10237
10245
  };
10238
10246
  createdAt: string;
10247
+ status: "ACTIVE";
10248
+ volume: string;
10249
+ grossRealizedPnl: `-${string}` | `+${string}`;
10250
+ grossUpnl: `-${string}` | `+${string}`;
10251
+ fundingPayment: `-${string}` | `+${string}`;
10252
+ tradeFee: `-${string}` | `+${string}`;
10253
+ pearFee: `-${string}` | `+${string}`;
10254
+ totalNetPnl: `-${string}` | `+${string}`;
10239
10255
  endedAt?: string | undefined;
10240
- }[];
10256
+ } | {
10257
+ id: string;
10258
+ leaderTradeAccountId: string;
10259
+ followerTradeAccountId: string;
10260
+ connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter" | "lighter_rhc";
10261
+ sizing: {
10262
+ mode: "LEADER_EQUITY_FRACTION";
10263
+ };
10264
+ createdAt: string;
10265
+ status: "ENDED";
10266
+ volume: string;
10267
+ endedAt?: string | undefined;
10268
+ })[];
10241
10269
  }>;
10242
10270
  /** Start copying into the account selected by x-trade-account-id, syncing existing positions by default. */
10243
10271
  subscribe: (body: HttpTypes.CreateCopySubscriptionInput, headers?: ClientHeaders) => Promise<{
@@ -861,11 +861,12 @@ class Core {
861
861
  query
862
862
  });
863
863
  }, "stats"),
864
- /** Read subscription history; use copy.state for the current relationship of one account. */
865
- listSubscriptions: /* @__PURE__ */ __name(async (headers) => {
864
+ /** Read subscription history, optionally by status; use copy.state for one account's current relationship. */
865
+ listSubscriptions: /* @__PURE__ */ __name(async (headers, query) => {
866
866
  return await this.client.fetch(`/copy/subscriptions`, {
867
867
  method: "GET",
868
- headers
868
+ headers,
869
+ query
869
870
  });
870
871
  }, "listSubscriptions"),
871
872
  /** Start copying into the account selected by x-trade-account-id, syncing existing positions by default. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pear-protocol/core-sdk",
3
- "version": "2.6.0",
3
+ "version": "2.7.0",
4
4
  "description": "Pear Protocol Core SDK",
5
5
  "private": false,
6
6
  "type": "module",
@@ -26,7 +26,7 @@
26
26
  "typecheck": "tsc --noEmit"
27
27
  },
28
28
  "dependencies": {
29
- "@pear-protocol/types": "^2.13.0",
29
+ "@pear-protocol/types": "^2.14.0",
30
30
  "@pear-protocol/utils": "^1.3.0",
31
31
  "qs": "^6.14.0"
32
32
  },