@pear-protocol/core-sdk 2.9.0 → 2.10.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.
@@ -9,6 +9,15 @@ declare class Core {
9
9
  constructor(client: HttpClient, clientId?: string | null);
10
10
  private withClientId;
11
11
  traders: {
12
+ /** Read one ordered account chart series under current public sharing consent. */
13
+ performance: (tradeAccountId: string, query?: HttpTypes.TraderPerformanceQueryInput, headers?: ClientHeaders) => Promise<{
14
+ points: {
15
+ at: string;
16
+ equityUsd?: `-${string}` | `+${string}` | undefined;
17
+ pnlUsd?: `-${string}` | `+${string}` | undefined;
18
+ roiPercent?: `-${string}` | `+${string}` | undefined;
19
+ }[];
20
+ }>;
12
21
  /** Read a public trader's paginated closed history without account authentication. */
13
22
  closedPositions: (tradeAccountId: string, query?: HttpTypes.PublicTraderClosedPositionsParamsInput, headers?: ClientHeaders) => Promise<{
14
23
  limit: number;
@@ -2687,7 +2696,7 @@ declare class Core {
2687
2696
  get: (query?: HttpTypes.QuoteFeeParamsInput, headers?: ClientHeaders) => Promise<{
2688
2697
  baseBps: string;
2689
2698
  discounts: {
2690
- scope: "connector" | "all" | "user" | "client_id";
2699
+ scope: "user" | "connector" | "all" | "client_id";
2691
2700
  rate: string;
2692
2701
  }[];
2693
2702
  finalBps: string;
@@ -23,6 +23,14 @@ class Core {
23
23
  };
24
24
  }
25
25
  traders = {
26
+ /** Read one ordered account chart series under current public sharing consent. */
27
+ performance: /* @__PURE__ */ __name(async (tradeAccountId, query, headers) => {
28
+ return await this.client.fetch(`/traders/${encodeURIComponent(tradeAccountId)}/performance`, {
29
+ method: "GET",
30
+ query,
31
+ headers
32
+ });
33
+ }, "performance"),
26
34
  /** Read a public trader's paginated closed history without account authentication. */
27
35
  closedPositions: /* @__PURE__ */ __name(async (tradeAccountId, query, headers) => {
28
36
  return await this.client.fetch(`/traders/${encodeURIComponent(tradeAccountId)}/closed-positions`, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pear-protocol/core-sdk",
3
- "version": "2.9.0",
3
+ "version": "2.10.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.16.0",
29
+ "@pear-protocol/types": "^2.17.0",
30
30
  "@pear-protocol/utils": "^1.3.0",
31
31
  "qs": "^6.14.0"
32
32
  },