@pear-protocol/types 2.15.0 → 2.17.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.
- package/dist/copy/entities.d.ts +622 -24
- package/dist/copy/entities.js +26 -9
- package/dist/copy/index.d.ts +1 -0
- package/dist/copy/index.js +1 -0
- package/dist/copy/performance.d.ts +186 -0
- package/dist/copy/performance.js +63 -0
- package/dist/copy/responses.d.ts +733 -13
- package/dist/execution/entities.d.ts +55 -55
- package/dist/execution/responses.d.ts +32 -32
- package/dist/notification/entities.d.ts +2 -2
- package/dist/notification/responses.d.ts +1 -1
- package/dist/order/entities.d.ts +3 -3
- package/dist/position/entities.d.ts +3 -3
- package/dist/position/responses.d.ts +2 -2
- package/dist/schedule/entities.d.ts +6 -6
- package/dist/schedule/responses.d.ts +4 -4
- package/dist/tca/responses.d.ts +4 -4
- package/dist/trade/responses.d.ts +80 -80
- package/dist/traders/index.d.ts +1 -0
- package/dist/traders/index.js +1 -0
- package/dist/traders/performance.d.ts +27 -0
- package/dist/traders/performance.js +21 -0
- package/dist/traders/public.d.ts +11 -11
- package/package.json +1 -1
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { SignedDecimalString } from '../common/schema';
|
|
3
|
+
|
|
4
|
+
const TraderPerformanceQuery = z.object({
|
|
5
|
+
range: z.enum([
|
|
6
|
+
"24h",
|
|
7
|
+
"7d",
|
|
8
|
+
"30d"
|
|
9
|
+
]).default("24h")
|
|
10
|
+
}).strict();
|
|
11
|
+
const TraderPerformancePoint = z.object({
|
|
12
|
+
at: z.string().datetime(),
|
|
13
|
+
equityUsd: SignedDecimalString.optional(),
|
|
14
|
+
pnlUsd: SignedDecimalString.optional(),
|
|
15
|
+
roiPercent: SignedDecimalString.optional()
|
|
16
|
+
});
|
|
17
|
+
const TraderPerformanceResponse = z.object({
|
|
18
|
+
points: z.array(TraderPerformancePoint)
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
export { TraderPerformancePoint, TraderPerformanceQuery, TraderPerformanceResponse };
|
package/dist/traders/public.d.ts
CHANGED
|
@@ -22,9 +22,9 @@ export type PublicTraderClosedPositionsParamsInput = z.input<typeof PublicTrader
|
|
|
22
22
|
export type PublicTraderClosedPositionsParams = z.output<typeof PublicTraderClosedPositionsParams>;
|
|
23
23
|
/** A selected follower's result for one leader position. */
|
|
24
24
|
export declare const ViewerCopyStatus: z.ZodEnum<{
|
|
25
|
+
PENDING: "PENDING";
|
|
25
26
|
COPIED: "COPIED";
|
|
26
27
|
PARTIAL: "PARTIAL";
|
|
27
|
-
PENDING: "PENDING";
|
|
28
28
|
NOT_COPIED: "NOT_COPIED";
|
|
29
29
|
UNKNOWN: "UNKNOWN";
|
|
30
30
|
}>;
|
|
@@ -46,9 +46,9 @@ export declare const PublicOpenPosition: z.ZodObject<{
|
|
|
46
46
|
realizedGrossPnl: z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>;
|
|
47
47
|
netCashflow: z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>;
|
|
48
48
|
copyStatus: z.ZodOptional<z.ZodEnum<{
|
|
49
|
+
PENDING: "PENDING";
|
|
49
50
|
COPIED: "COPIED";
|
|
50
51
|
PARTIAL: "PARTIAL";
|
|
51
|
-
PENDING: "PENDING";
|
|
52
52
|
NOT_COPIED: "NOT_COPIED";
|
|
53
53
|
UNKNOWN: "UNKNOWN";
|
|
54
54
|
}>>;
|
|
@@ -84,6 +84,7 @@ export declare const PublicClosedPosition: z.ZodObject<{
|
|
|
84
84
|
lighter: "lighter";
|
|
85
85
|
lighter_rhc: "lighter_rhc";
|
|
86
86
|
}>;
|
|
87
|
+
netPnl: z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>;
|
|
87
88
|
positionId: z.ZodUUID;
|
|
88
89
|
closedReason: z.ZodOptional<z.ZodEnum<{
|
|
89
90
|
NETTED: "NETTED";
|
|
@@ -92,7 +93,6 @@ export declare const PublicClosedPosition: z.ZodObject<{
|
|
|
92
93
|
}>>;
|
|
93
94
|
closedAt: z.ZodString;
|
|
94
95
|
grossPnl: z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>;
|
|
95
|
-
netPnl: z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>;
|
|
96
96
|
openedAt: z.ZodString;
|
|
97
97
|
hasProvisionalFills: z.ZodBoolean;
|
|
98
98
|
legs: z.ZodArray<z.ZodObject<{
|
|
@@ -100,9 +100,9 @@ export declare const PublicClosedPosition: z.ZodObject<{
|
|
|
100
100
|
LONG: "LONG";
|
|
101
101
|
SHORT: "SHORT";
|
|
102
102
|
}>;
|
|
103
|
+
netPnl: z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>;
|
|
103
104
|
asset: z.ZodString;
|
|
104
105
|
grossPnl: z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>;
|
|
105
|
-
netPnl: z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>;
|
|
106
106
|
entryNotional: z.ZodString;
|
|
107
107
|
entryVwap: z.ZodOptional<z.ZodString>;
|
|
108
108
|
exitVwap: z.ZodOptional<z.ZodString>;
|
|
@@ -123,6 +123,7 @@ export declare const PublicTraderClosedPositionsResponse: z.ZodObject<{
|
|
|
123
123
|
lighter: "lighter";
|
|
124
124
|
lighter_rhc: "lighter_rhc";
|
|
125
125
|
}>;
|
|
126
|
+
netPnl: z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>;
|
|
126
127
|
positionId: z.ZodUUID;
|
|
127
128
|
closedReason: z.ZodOptional<z.ZodEnum<{
|
|
128
129
|
NETTED: "NETTED";
|
|
@@ -131,7 +132,6 @@ export declare const PublicTraderClosedPositionsResponse: z.ZodObject<{
|
|
|
131
132
|
}>>;
|
|
132
133
|
closedAt: z.ZodString;
|
|
133
134
|
grossPnl: z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>;
|
|
134
|
-
netPnl: z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>;
|
|
135
135
|
openedAt: z.ZodString;
|
|
136
136
|
hasProvisionalFills: z.ZodBoolean;
|
|
137
137
|
legs: z.ZodArray<z.ZodObject<{
|
|
@@ -139,9 +139,9 @@ export declare const PublicTraderClosedPositionsResponse: z.ZodObject<{
|
|
|
139
139
|
LONG: "LONG";
|
|
140
140
|
SHORT: "SHORT";
|
|
141
141
|
}>;
|
|
142
|
+
netPnl: z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>;
|
|
142
143
|
asset: z.ZodString;
|
|
143
144
|
grossPnl: z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>;
|
|
144
|
-
netPnl: z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>;
|
|
145
145
|
entryNotional: z.ZodString;
|
|
146
146
|
entryVwap: z.ZodOptional<z.ZodString>;
|
|
147
147
|
exitVwap: z.ZodOptional<z.ZodString>;
|
|
@@ -1273,8 +1273,8 @@ export declare const PublicSchedule: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1273
1273
|
id: z.ZodUUID;
|
|
1274
1274
|
createdAt: z.ZodString;
|
|
1275
1275
|
status: z.ZodEnum<{
|
|
1276
|
-
ACTIVE: "ACTIVE";
|
|
1277
1276
|
FAILED: "FAILED";
|
|
1277
|
+
ACTIVE: "ACTIVE";
|
|
1278
1278
|
CANCELLED: "CANCELLED";
|
|
1279
1279
|
COMPLETED: "COMPLETED";
|
|
1280
1280
|
}>;
|
|
@@ -1326,8 +1326,8 @@ export declare const PublicSchedule: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1326
1326
|
id: z.ZodUUID;
|
|
1327
1327
|
createdAt: z.ZodString;
|
|
1328
1328
|
status: z.ZodEnum<{
|
|
1329
|
-
ACTIVE: "ACTIVE";
|
|
1330
1329
|
FAILED: "FAILED";
|
|
1330
|
+
ACTIVE: "ACTIVE";
|
|
1331
1331
|
CANCELLED: "CANCELLED";
|
|
1332
1332
|
COMPLETED: "COMPLETED";
|
|
1333
1333
|
}>;
|
|
@@ -2627,9 +2627,9 @@ export declare const PublicTraderResponse: z.ZodObject<{
|
|
|
2627
2627
|
realizedGrossPnl: z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>;
|
|
2628
2628
|
netCashflow: z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>;
|
|
2629
2629
|
copyStatus: z.ZodOptional<z.ZodEnum<{
|
|
2630
|
+
PENDING: "PENDING";
|
|
2630
2631
|
COPIED: "COPIED";
|
|
2631
2632
|
PARTIAL: "PARTIAL";
|
|
2632
|
-
PENDING: "PENDING";
|
|
2633
2633
|
NOT_COPIED: "NOT_COPIED";
|
|
2634
2634
|
UNKNOWN: "UNKNOWN";
|
|
2635
2635
|
}>>;
|
|
@@ -3776,8 +3776,8 @@ export declare const PublicTraderResponse: z.ZodObject<{
|
|
|
3776
3776
|
id: z.ZodUUID;
|
|
3777
3777
|
createdAt: z.ZodString;
|
|
3778
3778
|
status: z.ZodEnum<{
|
|
3779
|
-
ACTIVE: "ACTIVE";
|
|
3780
3779
|
FAILED: "FAILED";
|
|
3780
|
+
ACTIVE: "ACTIVE";
|
|
3781
3781
|
CANCELLED: "CANCELLED";
|
|
3782
3782
|
COMPLETED: "COMPLETED";
|
|
3783
3783
|
}>;
|
|
@@ -3829,8 +3829,8 @@ export declare const PublicTraderResponse: z.ZodObject<{
|
|
|
3829
3829
|
id: z.ZodUUID;
|
|
3830
3830
|
createdAt: z.ZodString;
|
|
3831
3831
|
status: z.ZodEnum<{
|
|
3832
|
-
ACTIVE: "ACTIVE";
|
|
3833
3832
|
FAILED: "FAILED";
|
|
3833
|
+
ACTIVE: "ACTIVE";
|
|
3834
3834
|
CANCELLED: "CANCELLED";
|
|
3835
3835
|
COMPLETED: "COMPLETED";
|
|
3836
3836
|
}>;
|