@pear-protocol/types 2.14.0 → 2.16.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.
@@ -489,10 +489,10 @@ export declare const NotificationParameters: z.ZodDiscriminatedUnion<[z.ZodObjec
489
489
  type: z.ZodLiteral<"copy_subscription_stopped">;
490
490
  subscriptionId: z.ZodUUID;
491
491
  reason: z.ZodEnum<{
492
- REPEATED_FAILURES: "REPEATED_FAILURES";
493
492
  MANUAL_TRADE: "MANUAL_TRADE";
494
493
  EXTERNAL_POSITION_DETECTED: "EXTERNAL_POSITION_DETECTED";
495
494
  LEADER_EXTERNAL_ACTIVITY: "LEADER_EXTERNAL_ACTIVITY";
495
+ REPEATED_FAILURES: "REPEATED_FAILURES";
496
496
  }>;
497
497
  }, z.core.$strip>, z.ZodObject<{
498
498
  type: z.ZodLiteral<"copy_leverage_not_applied">;
@@ -962,10 +962,10 @@ export declare const Notification: z.ZodObject<{
962
962
  type: z.ZodLiteral<"copy_subscription_stopped">;
963
963
  subscriptionId: z.ZodUUID;
964
964
  reason: z.ZodEnum<{
965
- REPEATED_FAILURES: "REPEATED_FAILURES";
966
965
  MANUAL_TRADE: "MANUAL_TRADE";
967
966
  EXTERNAL_POSITION_DETECTED: "EXTERNAL_POSITION_DETECTED";
968
967
  LEADER_EXTERNAL_ACTIVITY: "LEADER_EXTERNAL_ACTIVITY";
968
+ REPEATED_FAILURES: "REPEATED_FAILURES";
969
969
  }>;
970
970
  }, z.core.$strip>, z.ZodObject<{
971
971
  type: z.ZodLiteral<"copy_leverage_not_applied">;
@@ -462,10 +462,10 @@ export declare const NotificationListResponse: z.ZodObject<{
462
462
  type: z.ZodLiteral<"copy_subscription_stopped">;
463
463
  subscriptionId: z.ZodUUID;
464
464
  reason: z.ZodEnum<{
465
- REPEATED_FAILURES: "REPEATED_FAILURES";
466
465
  MANUAL_TRADE: "MANUAL_TRADE";
467
466
  EXTERNAL_POSITION_DETECTED: "EXTERNAL_POSITION_DETECTED";
468
467
  LEADER_EXTERNAL_ACTIVITY: "LEADER_EXTERNAL_ACTIVITY";
468
+ REPEATED_FAILURES: "REPEATED_FAILURES";
469
469
  }>;
470
470
  }, z.core.$strip>, z.ZodObject<{
471
471
  type: z.ZodLiteral<"copy_leverage_not_applied">;
@@ -1,7 +1,7 @@
1
1
  import { z } from 'zod';
2
2
  export declare const OrderStatus: z.ZodEnum<{
3
- PARTIAL: "PARTIAL";
4
3
  PENDING: "PENDING";
4
+ PARTIAL: "PARTIAL";
5
5
  FILLED: "FILLED";
6
6
  CANCELLED: "CANCELLED";
7
7
  REJECTED: "REJECTED";
@@ -18,8 +18,8 @@ export declare const MarketOrder: z.ZodObject<{
18
18
  lighter_rhc: "lighter_rhc";
19
19
  }>;
20
20
  status: z.ZodEnum<{
21
- PARTIAL: "PARTIAL";
22
21
  PENDING: "PENDING";
22
+ PARTIAL: "PARTIAL";
23
23
  FILLED: "FILLED";
24
24
  CANCELLED: "CANCELLED";
25
25
  REJECTED: "REJECTED";
@@ -51,8 +51,8 @@ export declare const Order: z.ZodDiscriminatedUnion<[z.ZodObject<{
51
51
  lighter_rhc: "lighter_rhc";
52
52
  }>;
53
53
  status: z.ZodEnum<{
54
- PARTIAL: "PARTIAL";
55
54
  PENDING: "PENDING";
55
+ PARTIAL: "PARTIAL";
56
56
  FILLED: "FILLED";
57
57
  CANCELLED: "CANCELLED";
58
58
  REJECTED: "REJECTED";
@@ -83,6 +83,8 @@ export declare const Position: z.ZodObject<{
83
83
  PEAR: "PEAR";
84
84
  EXTERNAL: "EXTERNAL";
85
85
  }>;
86
+ copySubscriptionId: z.ZodOptional<z.ZodUUID>;
87
+ isCopying: z.ZodOptional<z.ZodBoolean>;
86
88
  exposure: z.ZodRecord<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>>;
87
89
  unstableHistoricalData: z.ZodBoolean;
88
90
  totalFundingPayment: z.ZodRecord<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>>;
@@ -249,6 +251,8 @@ export declare const ClosedPosition: z.ZodObject<{
249
251
  PEAR: "PEAR";
250
252
  EXTERNAL: "EXTERNAL";
251
253
  }>;
254
+ copySubscriptionId: z.ZodOptional<z.ZodUUID>;
255
+ isCopying: z.ZodOptional<z.ZodLiteral<false>>;
252
256
  grossPnl: z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>;
253
257
  netPnl: z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>;
254
258
  totalFees: z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>;
@@ -382,6 +386,8 @@ export declare const OpenPosition: z.ZodObject<{
382
386
  PEAR: "PEAR";
383
387
  EXTERNAL: "EXTERNAL";
384
388
  }>;
389
+ copySubscriptionId: z.ZodOptional<z.ZodUUID>;
390
+ isCopying: z.ZodOptional<z.ZodBoolean>;
385
391
  realizedGrossPnl: z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>;
386
392
  volume: z.ZodString;
387
393
  grossUpnl: z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>;
@@ -539,9 +545,9 @@ export declare const VaultClosedPositionLeg: z.ZodObject<{
539
545
  LONG: "LONG";
540
546
  SHORT: "SHORT";
541
547
  }>;
548
+ netPnl: z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>;
542
549
  asset: z.ZodString;
543
550
  grossPnl: z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>;
544
- netPnl: z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>;
545
551
  entryNotional: z.ZodString;
546
552
  entryVwap: z.ZodOptional<z.ZodString>;
547
553
  exitVwap: z.ZodOptional<z.ZodString>;
@@ -562,6 +568,7 @@ export declare const VaultClosedPosition: z.ZodObject<{
562
568
  lighter: "lighter";
563
569
  lighter_rhc: "lighter_rhc";
564
570
  }>;
571
+ netPnl: z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>;
565
572
  positionId: z.ZodUUID;
566
573
  closedReason: z.ZodOptional<z.ZodEnum<{
567
574
  NETTED: "NETTED";
@@ -570,7 +577,6 @@ export declare const VaultClosedPosition: z.ZodObject<{
570
577
  }>>;
571
578
  closedAt: z.ZodString;
572
579
  grossPnl: z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>;
573
- netPnl: z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>;
574
580
  openedAt: z.ZodString;
575
581
  hasProvisionalFills: z.ZodBoolean;
576
582
  legs: z.ZodArray<z.ZodObject<{
@@ -578,9 +584,9 @@ export declare const VaultClosedPosition: z.ZodObject<{
578
584
  LONG: "LONG";
579
585
  SHORT: "SHORT";
580
586
  }>;
587
+ netPnl: z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>;
581
588
  asset: z.ZodString;
582
589
  grossPnl: z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>;
583
- netPnl: z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>;
584
590
  entryNotional: z.ZodString;
585
591
  entryVwap: z.ZodOptional<z.ZodString>;
586
592
  exitVwap: z.ZodOptional<z.ZodString>;
@@ -43,6 +43,10 @@ const Position = z.object({
43
43
  */
44
44
  closedReason: PositionClosedReason.nullable().optional(),
45
45
  origin: PositionOrigin,
46
+ /** The subscription that opened this position, retained after copying stops. */
47
+ copySubscriptionId: z.uuid().optional(),
48
+ /** Whether the existing copy eligibility rules still allow this position to follow its leader. */
49
+ isCopying: z.boolean().optional(),
46
50
  /**
47
51
  * Position exposure
48
52
  */
@@ -184,6 +188,10 @@ const ClosedPosition = z.object({
184
188
  closedAt: z.string(),
185
189
  closedReason: PositionClosedReason.optional(),
186
190
  origin: PositionOrigin,
191
+ /** The subscription that opened this position, retained after its lifecycle closes. */
192
+ copySubscriptionId: z.uuid().optional(),
193
+ /** A closed copy position no longer follows its leader, regardless of subscription status. */
194
+ isCopying: z.literal(false).optional(),
187
195
  grossPnl: SignedDecimalString,
188
196
  netPnl: SignedDecimalString,
189
197
  totalFees: SignedDecimalString,
@@ -308,6 +316,10 @@ const OpenPosition = z.object({
308
316
  /** The position's last update, independent of the page cursor. */
309
317
  updatedAt: z.string(),
310
318
  origin: PositionOrigin,
319
+ /** The subscription that opened this position, retained after copying stops. */
320
+ copySubscriptionId: z.uuid().optional(),
321
+ /** Whether the existing copy eligibility rules still allow this position to follow its leader. */
322
+ isCopying: z.boolean().optional(),
311
323
  /**
312
324
  * Realized PnL booked so far, before fees. Qualified because the position is still
313
325
  * live, and revisable while it is — see netCashflow on reconciliation.
@@ -28,6 +28,8 @@ export declare const PositionListResponse: z.ZodObject<{
28
28
  PEAR: "PEAR";
29
29
  EXTERNAL: "EXTERNAL";
30
30
  }>;
31
+ copySubscriptionId: z.ZodOptional<z.ZodUUID>;
32
+ isCopying: z.ZodOptional<z.ZodBoolean>;
31
33
  exposure: z.ZodRecord<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>>;
32
34
  unstableHistoricalData: z.ZodBoolean;
33
35
  totalFundingPayment: z.ZodRecord<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>>;
@@ -119,6 +121,8 @@ export declare const ClosedPositionListResponse: z.ZodObject<{
119
121
  PEAR: "PEAR";
120
122
  EXTERNAL: "EXTERNAL";
121
123
  }>;
124
+ copySubscriptionId: z.ZodOptional<z.ZodUUID>;
125
+ isCopying: z.ZodOptional<z.ZodLiteral<false>>;
122
126
  grossPnl: z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>;
123
127
  netPnl: z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>;
124
128
  totalFees: z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>;
@@ -223,6 +227,8 @@ export declare const OpenPositionListResponse: z.ZodObject<{
223
227
  PEAR: "PEAR";
224
228
  EXTERNAL: "EXTERNAL";
225
229
  }>;
230
+ copySubscriptionId: z.ZodOptional<z.ZodUUID>;
231
+ isCopying: z.ZodOptional<z.ZodBoolean>;
226
232
  realizedGrossPnl: z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>;
227
233
  volume: z.ZodString;
228
234
  grossUpnl: z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>;
@@ -367,6 +373,7 @@ export declare const VaultClosedPositionListResponse: z.ZodObject<{
367
373
  lighter: "lighter";
368
374
  lighter_rhc: "lighter_rhc";
369
375
  }>;
376
+ netPnl: z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>;
370
377
  positionId: z.ZodUUID;
371
378
  closedReason: z.ZodOptional<z.ZodEnum<{
372
379
  NETTED: "NETTED";
@@ -375,7 +382,6 @@ export declare const VaultClosedPositionListResponse: z.ZodObject<{
375
382
  }>>;
376
383
  closedAt: z.ZodString;
377
384
  grossPnl: z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>;
378
- netPnl: z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>;
379
385
  openedAt: z.ZodString;
380
386
  hasProvisionalFills: z.ZodBoolean;
381
387
  legs: z.ZodArray<z.ZodObject<{
@@ -383,9 +389,9 @@ export declare const VaultClosedPositionListResponse: z.ZodObject<{
383
389
  LONG: "LONG";
384
390
  SHORT: "SHORT";
385
391
  }>;
392
+ netPnl: z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>;
386
393
  asset: z.ZodString;
387
394
  grossPnl: z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>;
388
- netPnl: z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>;
389
395
  entryNotional: z.ZodString;
390
396
  entryVwap: z.ZodOptional<z.ZodString>;
391
397
  exitVwap: z.ZodOptional<z.ZodString>;
@@ -5,8 +5,8 @@ export declare const ScheduleStrategy: z.ZodEnum<{
5
5
  }>;
6
6
  export type ScheduleStrategy = z.infer<typeof ScheduleStrategy>;
7
7
  export declare const ScheduleStatus: z.ZodEnum<{
8
- ACTIVE: "ACTIVE";
9
8
  FAILED: "FAILED";
9
+ ACTIVE: "ACTIVE";
10
10
  CANCELLED: "CANCELLED";
11
11
  COMPLETED: "COMPLETED";
12
12
  }>;
@@ -53,8 +53,8 @@ declare const BaseSchedule: z.ZodObject<{
53
53
  VWAP: "VWAP";
54
54
  }>;
55
55
  status: z.ZodEnum<{
56
- ACTIVE: "ACTIVE";
57
56
  FAILED: "FAILED";
57
+ ACTIVE: "ACTIVE";
58
58
  CANCELLED: "CANCELLED";
59
59
  COMPLETED: "COMPLETED";
60
60
  }>;
@@ -130,8 +130,8 @@ export declare const TWAPOpen: z.ZodObject<{
130
130
  lighter_rhc: "lighter_rhc";
131
131
  }>;
132
132
  status: z.ZodEnum<{
133
- ACTIVE: "ACTIVE";
134
133
  FAILED: "FAILED";
134
+ ACTIVE: "ACTIVE";
135
135
  CANCELLED: "CANCELLED";
136
136
  COMPLETED: "COMPLETED";
137
137
  }>;
@@ -222,8 +222,8 @@ export declare const TWAPClose: z.ZodObject<{
222
222
  lighter_rhc: "lighter_rhc";
223
223
  }>;
224
224
  status: z.ZodEnum<{
225
- ACTIVE: "ACTIVE";
226
225
  FAILED: "FAILED";
226
+ ACTIVE: "ACTIVE";
227
227
  CANCELLED: "CANCELLED";
228
228
  COMPLETED: "COMPLETED";
229
229
  }>;
@@ -305,8 +305,8 @@ export declare const Schedule: z.ZodDiscriminatedUnion<[z.ZodObject<{
305
305
  lighter_rhc: "lighter_rhc";
306
306
  }>;
307
307
  status: z.ZodEnum<{
308
- ACTIVE: "ACTIVE";
309
308
  FAILED: "FAILED";
309
+ ACTIVE: "ACTIVE";
310
310
  CANCELLED: "CANCELLED";
311
311
  COMPLETED: "COMPLETED";
312
312
  }>;
@@ -396,8 +396,8 @@ export declare const Schedule: z.ZodDiscriminatedUnion<[z.ZodObject<{
396
396
  lighter_rhc: "lighter_rhc";
397
397
  }>;
398
398
  status: z.ZodEnum<{
399
- ACTIVE: "ACTIVE";
400
399
  FAILED: "FAILED";
400
+ ACTIVE: "ACTIVE";
401
401
  CANCELLED: "CANCELLED";
402
402
  COMPLETED: "COMPLETED";
403
403
  }>;
@@ -13,8 +13,8 @@ export declare const ScheduleListResponse: z.ZodObject<{
13
13
  lighter_rhc: "lighter_rhc";
14
14
  }>;
15
15
  status: z.ZodEnum<{
16
- ACTIVE: "ACTIVE";
17
16
  FAILED: "FAILED";
17
+ ACTIVE: "ACTIVE";
18
18
  CANCELLED: "CANCELLED";
19
19
  COMPLETED: "COMPLETED";
20
20
  }>;
@@ -104,8 +104,8 @@ export declare const ScheduleListResponse: z.ZodObject<{
104
104
  lighter_rhc: "lighter_rhc";
105
105
  }>;
106
106
  status: z.ZodEnum<{
107
- ACTIVE: "ACTIVE";
108
107
  FAILED: "FAILED";
108
+ ACTIVE: "ACTIVE";
109
109
  CANCELLED: "CANCELLED";
110
110
  COMPLETED: "COMPLETED";
111
111
  }>;
@@ -190,8 +190,8 @@ export declare const CreateScheduleResponse: z.ZodObject<{
190
190
  lighter_rhc: "lighter_rhc";
191
191
  }>;
192
192
  status: z.ZodEnum<{
193
- ACTIVE: "ACTIVE";
194
193
  FAILED: "FAILED";
194
+ ACTIVE: "ACTIVE";
195
195
  CANCELLED: "CANCELLED";
196
196
  COMPLETED: "COMPLETED";
197
197
  }>;
@@ -281,8 +281,8 @@ export declare const CreateScheduleResponse: z.ZodObject<{
281
281
  lighter_rhc: "lighter_rhc";
282
282
  }>;
283
283
  status: z.ZodEnum<{
284
- ACTIVE: "ACTIVE";
285
284
  FAILED: "FAILED";
285
+ ACTIVE: "ACTIVE";
286
286
  CANCELLED: "CANCELLED";
287
287
  COMPLETED: "COMPLETED";
288
288
  }>;
@@ -126,8 +126,8 @@ export declare const TcaExecutionSummaryContextResponse: z.ZodObject<{
126
126
  MARKET: "MARKET";
127
127
  }>;
128
128
  executionStatus: z.ZodEnum<{
129
- ACTIVE: "ACTIVE";
130
129
  FAILED: "FAILED";
130
+ ACTIVE: "ACTIVE";
131
131
  CANCELLED: "CANCELLED";
132
132
  IDLE: "IDLE";
133
133
  COMPLETED: "COMPLETED";
@@ -168,8 +168,8 @@ export declare const TcaExecutionSummaryResponse: z.ZodObject<{
168
168
  MARKET: "MARKET";
169
169
  }>;
170
170
  executionStatus: z.ZodEnum<{
171
- ACTIVE: "ACTIVE";
172
171
  FAILED: "FAILED";
172
+ ACTIVE: "ACTIVE";
173
173
  CANCELLED: "CANCELLED";
174
174
  IDLE: "IDLE";
175
175
  COMPLETED: "COMPLETED";
@@ -223,8 +223,8 @@ export declare const TcaExecutionResponse: z.ZodObject<{
223
223
  MARKET: "MARKET";
224
224
  }>;
225
225
  executionStatus: z.ZodEnum<{
226
- ACTIVE: "ACTIVE";
227
226
  FAILED: "FAILED";
227
+ ACTIVE: "ACTIVE";
228
228
  CANCELLED: "CANCELLED";
229
229
  IDLE: "IDLE";
230
230
  COMPLETED: "COMPLETED";
@@ -446,8 +446,8 @@ export declare const TcaSummaryResponse: z.ZodObject<{
446
446
  MARKET: "MARKET";
447
447
  }>;
448
448
  executionStatus: z.ZodEnum<{
449
- ACTIVE: "ACTIVE";
450
449
  FAILED: "FAILED";
450
+ ACTIVE: "ACTIVE";
451
451
  CANCELLED: "CANCELLED";
452
452
  IDLE: "IDLE";
453
453
  COMPLETED: "COMPLETED";