@pear-protocol/types 2.23.0 → 2.25.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 +162 -10
- package/dist/copy/responses.d.ts +96 -11
- package/dist/execution/entities.d.ts +260 -43
- package/dist/execution/queries.d.ts +3 -2
- package/dist/execution/responses.d.ts +144 -24
- package/dist/fill/entities.d.ts +60 -1
- package/dist/fill/queries.d.ts +1 -0
- package/dist/fill/responses.d.ts +34 -4
- package/dist/index.js +743 -411
- package/dist/ladder/entities.d.ts +141 -24
- package/dist/ladder/payloads.d.ts +60 -24
- package/dist/ladder/queries.d.ts +2 -2
- package/dist/ladder/responses.d.ts +420 -69
- package/dist/leverage/payloads.d.ts +6 -1
- package/dist/notification/entities.d.ts +209 -7
- package/dist/notification/responses.d.ts +99 -2
- package/dist/order/entities.d.ts +3 -3
- package/dist/position/entities.d.ts +5 -5
- package/dist/position/responses.d.ts +4 -4
- package/dist/realtime/frames.d.ts +38 -6
- package/dist/realtime/public-events.d.ts +19 -3
- package/dist/rewards/entities.d.ts +18 -0
- package/dist/rewards/index.d.ts +1 -0
- package/dist/rewards/queries.d.ts +7 -0
- package/dist/rewards/responses.d.ts +52 -0
- package/dist/schedule/entities.d.ts +155 -19
- package/dist/schedule/index.d.ts +1 -0
- package/dist/schedule/queries.d.ts +3 -2
- package/dist/schedule/responses.d.ts +142 -19
- package/dist/sync/payloads.d.ts +56 -88
- package/dist/tca/responses.d.ts +12 -12
- package/dist/trade/payloads.d.ts +60 -24
- package/dist/trade/responses.d.ts +360 -60
- package/dist/traders/performance.d.ts +4 -0
- package/dist/traders/public.d.ts +537 -285
- package/dist/trigger/common/index.d.ts +8 -2
- package/dist/trigger/entities/conditions.d.ts +40 -0
- package/dist/trigger/entities/index.d.ts +339 -32
- package/dist/trigger/payloads/conditions.d.ts +70 -38
- package/dist/trigger/payloads/index.d.ts +408 -216
- package/dist/trigger/queries.d.ts +2 -2
- package/dist/trigger/responses.d.ts +218 -20
- package/dist/users/entities.d.ts +1 -0
- package/dist/users/payloads.d.ts +1 -0
- package/dist/users/response.d.ts +2 -0
- package/package.json +1 -1
|
@@ -156,14 +156,14 @@ export declare const WebsocketEventFrame: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
156
156
|
lighter_rhc: "lighter_rhc";
|
|
157
157
|
}>;
|
|
158
158
|
source: z.ZodEnum<{
|
|
159
|
+
TWAP: "TWAP";
|
|
159
160
|
DIRECT: "DIRECT";
|
|
160
161
|
TRIGGER: "TRIGGER";
|
|
161
|
-
TWAP: "TWAP";
|
|
162
162
|
}>;
|
|
163
163
|
intent: z.ZodEnum<{
|
|
164
164
|
OPEN: "OPEN";
|
|
165
|
-
ADJUST: "ADJUST";
|
|
166
165
|
CLOSE: "CLOSE";
|
|
166
|
+
ADJUST: "ADJUST";
|
|
167
167
|
REVERSE: "REVERSE";
|
|
168
168
|
}>;
|
|
169
169
|
orderType: z.ZodEnum<{
|
|
@@ -208,8 +208,8 @@ export declare const WebsocketEventFrame: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
208
208
|
}>;
|
|
209
209
|
intent: z.ZodEnum<{
|
|
210
210
|
OPEN: "OPEN";
|
|
211
|
-
ADJUST: "ADJUST";
|
|
212
211
|
CLOSE: "CLOSE";
|
|
212
|
+
ADJUST: "ADJUST";
|
|
213
213
|
}>;
|
|
214
214
|
condition: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
215
215
|
type: z.ZodLiteral<"ratio">;
|
|
@@ -273,6 +273,10 @@ export declare const WebsocketEventFrame: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
273
273
|
TROUGH: "TROUGH";
|
|
274
274
|
}>;
|
|
275
275
|
threshold: z.ZodNumber;
|
|
276
|
+
onPositionResize: z.ZodEnum<{
|
|
277
|
+
cancel: "cancel";
|
|
278
|
+
keep: "keep";
|
|
279
|
+
}>;
|
|
276
280
|
}, z.core.$strip>;
|
|
277
281
|
}, z.core.$strip>, z.ZodObject<{
|
|
278
282
|
type: z.ZodLiteral<"upnl">;
|
|
@@ -286,6 +290,10 @@ export declare const WebsocketEventFrame: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
286
290
|
TROUGH: "TROUGH";
|
|
287
291
|
}>;
|
|
288
292
|
threshold: z.ZodNumber;
|
|
293
|
+
onPositionResize: z.ZodEnum<{
|
|
294
|
+
cancel: "cancel";
|
|
295
|
+
keep: "keep";
|
|
296
|
+
}>;
|
|
289
297
|
}, z.core.$strip>;
|
|
290
298
|
}, z.core.$strip>, z.ZodObject<{
|
|
291
299
|
type: z.ZodLiteral<"upnl_bps">;
|
|
@@ -342,6 +350,10 @@ export declare const WebsocketEventFrame: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
342
350
|
mid: "mid";
|
|
343
351
|
mark: "mark";
|
|
344
352
|
}>;
|
|
353
|
+
onPositionResize: z.ZodEnum<{
|
|
354
|
+
cancel: "cancel";
|
|
355
|
+
keep: "keep";
|
|
356
|
+
}>;
|
|
345
357
|
}, z.core.$strip>;
|
|
346
358
|
}, z.core.$strip>, z.ZodObject<{
|
|
347
359
|
type: z.ZodLiteral<"upnl_trailing">;
|
|
@@ -350,6 +362,10 @@ export declare const WebsocketEventFrame: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
350
362
|
mid: "mid";
|
|
351
363
|
mark: "mark";
|
|
352
364
|
}>;
|
|
365
|
+
onPositionResize: z.ZodEnum<{
|
|
366
|
+
cancel: "cancel";
|
|
367
|
+
keep: "keep";
|
|
368
|
+
}>;
|
|
353
369
|
}, z.core.$strip>;
|
|
354
370
|
}, z.core.$strip>, z.ZodObject<{
|
|
355
371
|
type: z.ZodLiteral<"upnl_bps_trailing">;
|
|
@@ -596,14 +612,14 @@ export declare const WebsocketFrame: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
596
612
|
lighter_rhc: "lighter_rhc";
|
|
597
613
|
}>;
|
|
598
614
|
source: z.ZodEnum<{
|
|
615
|
+
TWAP: "TWAP";
|
|
599
616
|
DIRECT: "DIRECT";
|
|
600
617
|
TRIGGER: "TRIGGER";
|
|
601
|
-
TWAP: "TWAP";
|
|
602
618
|
}>;
|
|
603
619
|
intent: z.ZodEnum<{
|
|
604
620
|
OPEN: "OPEN";
|
|
605
|
-
ADJUST: "ADJUST";
|
|
606
621
|
CLOSE: "CLOSE";
|
|
622
|
+
ADJUST: "ADJUST";
|
|
607
623
|
REVERSE: "REVERSE";
|
|
608
624
|
}>;
|
|
609
625
|
orderType: z.ZodEnum<{
|
|
@@ -648,8 +664,8 @@ export declare const WebsocketFrame: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
648
664
|
}>;
|
|
649
665
|
intent: z.ZodEnum<{
|
|
650
666
|
OPEN: "OPEN";
|
|
651
|
-
ADJUST: "ADJUST";
|
|
652
667
|
CLOSE: "CLOSE";
|
|
668
|
+
ADJUST: "ADJUST";
|
|
653
669
|
}>;
|
|
654
670
|
condition: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
655
671
|
type: z.ZodLiteral<"ratio">;
|
|
@@ -713,6 +729,10 @@ export declare const WebsocketFrame: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
713
729
|
TROUGH: "TROUGH";
|
|
714
730
|
}>;
|
|
715
731
|
threshold: z.ZodNumber;
|
|
732
|
+
onPositionResize: z.ZodEnum<{
|
|
733
|
+
cancel: "cancel";
|
|
734
|
+
keep: "keep";
|
|
735
|
+
}>;
|
|
716
736
|
}, z.core.$strip>;
|
|
717
737
|
}, z.core.$strip>, z.ZodObject<{
|
|
718
738
|
type: z.ZodLiteral<"upnl">;
|
|
@@ -726,6 +746,10 @@ export declare const WebsocketFrame: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
726
746
|
TROUGH: "TROUGH";
|
|
727
747
|
}>;
|
|
728
748
|
threshold: z.ZodNumber;
|
|
749
|
+
onPositionResize: z.ZodEnum<{
|
|
750
|
+
cancel: "cancel";
|
|
751
|
+
keep: "keep";
|
|
752
|
+
}>;
|
|
729
753
|
}, z.core.$strip>;
|
|
730
754
|
}, z.core.$strip>, z.ZodObject<{
|
|
731
755
|
type: z.ZodLiteral<"upnl_bps">;
|
|
@@ -782,6 +806,10 @@ export declare const WebsocketFrame: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
782
806
|
mid: "mid";
|
|
783
807
|
mark: "mark";
|
|
784
808
|
}>;
|
|
809
|
+
onPositionResize: z.ZodEnum<{
|
|
810
|
+
cancel: "cancel";
|
|
811
|
+
keep: "keep";
|
|
812
|
+
}>;
|
|
785
813
|
}, z.core.$strip>;
|
|
786
814
|
}, z.core.$strip>, z.ZodObject<{
|
|
787
815
|
type: z.ZodLiteral<"upnl_trailing">;
|
|
@@ -790,6 +818,10 @@ export declare const WebsocketFrame: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
790
818
|
mid: "mid";
|
|
791
819
|
mark: "mark";
|
|
792
820
|
}>;
|
|
821
|
+
onPositionResize: z.ZodEnum<{
|
|
822
|
+
cancel: "cancel";
|
|
823
|
+
keep: "keep";
|
|
824
|
+
}>;
|
|
793
825
|
}, z.core.$strip>;
|
|
794
826
|
}, z.core.$strip>, z.ZodObject<{
|
|
795
827
|
type: z.ZodLiteral<"upnl_bps_trailing">;
|
|
@@ -81,14 +81,14 @@ export declare const TradeExecutedData: z.ZodObject<{
|
|
|
81
81
|
lighter_rhc: "lighter_rhc";
|
|
82
82
|
}>;
|
|
83
83
|
source: z.ZodEnum<{
|
|
84
|
+
TWAP: "TWAP";
|
|
84
85
|
DIRECT: "DIRECT";
|
|
85
86
|
TRIGGER: "TRIGGER";
|
|
86
|
-
TWAP: "TWAP";
|
|
87
87
|
}>;
|
|
88
88
|
intent: z.ZodEnum<{
|
|
89
89
|
OPEN: "OPEN";
|
|
90
|
-
ADJUST: "ADJUST";
|
|
91
90
|
CLOSE: "CLOSE";
|
|
91
|
+
ADJUST: "ADJUST";
|
|
92
92
|
REVERSE: "REVERSE";
|
|
93
93
|
}>;
|
|
94
94
|
orderType: z.ZodEnum<{
|
|
@@ -131,8 +131,8 @@ export declare const TriggerTriggeredPublicData: z.ZodObject<{
|
|
|
131
131
|
}>;
|
|
132
132
|
intent: z.ZodEnum<{
|
|
133
133
|
OPEN: "OPEN";
|
|
134
|
-
ADJUST: "ADJUST";
|
|
135
134
|
CLOSE: "CLOSE";
|
|
135
|
+
ADJUST: "ADJUST";
|
|
136
136
|
}>;
|
|
137
137
|
condition: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
138
138
|
type: z.ZodLiteral<"ratio">;
|
|
@@ -196,6 +196,10 @@ export declare const TriggerTriggeredPublicData: z.ZodObject<{
|
|
|
196
196
|
TROUGH: "TROUGH";
|
|
197
197
|
}>;
|
|
198
198
|
threshold: z.ZodNumber;
|
|
199
|
+
onPositionResize: z.ZodEnum<{
|
|
200
|
+
cancel: "cancel";
|
|
201
|
+
keep: "keep";
|
|
202
|
+
}>;
|
|
199
203
|
}, z.core.$strip>;
|
|
200
204
|
}, z.core.$strip>, z.ZodObject<{
|
|
201
205
|
type: z.ZodLiteral<"upnl">;
|
|
@@ -209,6 +213,10 @@ export declare const TriggerTriggeredPublicData: z.ZodObject<{
|
|
|
209
213
|
TROUGH: "TROUGH";
|
|
210
214
|
}>;
|
|
211
215
|
threshold: z.ZodNumber;
|
|
216
|
+
onPositionResize: z.ZodEnum<{
|
|
217
|
+
cancel: "cancel";
|
|
218
|
+
keep: "keep";
|
|
219
|
+
}>;
|
|
212
220
|
}, z.core.$strip>;
|
|
213
221
|
}, z.core.$strip>, z.ZodObject<{
|
|
214
222
|
type: z.ZodLiteral<"upnl_bps">;
|
|
@@ -265,6 +273,10 @@ export declare const TriggerTriggeredPublicData: z.ZodObject<{
|
|
|
265
273
|
mid: "mid";
|
|
266
274
|
mark: "mark";
|
|
267
275
|
}>;
|
|
276
|
+
onPositionResize: z.ZodEnum<{
|
|
277
|
+
cancel: "cancel";
|
|
278
|
+
keep: "keep";
|
|
279
|
+
}>;
|
|
268
280
|
}, z.core.$strip>;
|
|
269
281
|
}, z.core.$strip>, z.ZodObject<{
|
|
270
282
|
type: z.ZodLiteral<"upnl_trailing">;
|
|
@@ -273,6 +285,10 @@ export declare const TriggerTriggeredPublicData: z.ZodObject<{
|
|
|
273
285
|
mid: "mid";
|
|
274
286
|
mark: "mark";
|
|
275
287
|
}>;
|
|
288
|
+
onPositionResize: z.ZodEnum<{
|
|
289
|
+
cancel: "cancel";
|
|
290
|
+
keep: "keep";
|
|
291
|
+
}>;
|
|
276
292
|
}, z.core.$strip>;
|
|
277
293
|
}, z.core.$strip>, z.ZodObject<{
|
|
278
294
|
type: z.ZodLiteral<"upnl_bps_trailing">;
|
|
@@ -1,10 +1,28 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
export declare const RewardSourceAccrual: z.ZodObject<{
|
|
3
|
+
earned: z.ZodString;
|
|
4
|
+
pendingMaturity: z.ZodString;
|
|
5
|
+
pendingFunding: z.ZodString;
|
|
6
|
+
}, z.core.$strip>;
|
|
7
|
+
export type RewardSourceAccrual = z.output<typeof RewardSourceAccrual>;
|
|
2
8
|
export declare const RewardAccrual: z.ZodObject<{
|
|
3
9
|
earned: z.ZodString;
|
|
4
10
|
pendingMaturity: z.ZodString;
|
|
5
11
|
pendingFunding: z.ZodString;
|
|
6
12
|
claimable: z.ZodString;
|
|
7
13
|
paid: z.ZodString;
|
|
14
|
+
sources: z.ZodObject<{
|
|
15
|
+
referral: z.ZodObject<{
|
|
16
|
+
earned: z.ZodString;
|
|
17
|
+
pendingMaturity: z.ZodString;
|
|
18
|
+
pendingFunding: z.ZodString;
|
|
19
|
+
}, z.core.$strip>;
|
|
20
|
+
copy: z.ZodObject<{
|
|
21
|
+
earned: z.ZodString;
|
|
22
|
+
pendingMaturity: z.ZodString;
|
|
23
|
+
pendingFunding: z.ZodString;
|
|
24
|
+
}, z.core.$strip>;
|
|
25
|
+
}, z.core.$strip>;
|
|
8
26
|
}, z.core.$strip>;
|
|
9
27
|
export type RewardAccrual = z.output<typeof RewardAccrual>;
|
|
10
28
|
export declare const RewardClaimStatus: z.ZodEnum<{
|
package/dist/rewards/index.d.ts
CHANGED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const ListRewardClaimsQuery: z.ZodObject<{
|
|
3
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
4
|
+
limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
5
|
+
}, z.core.$strip>;
|
|
6
|
+
export type ListRewardClaimsQueryInput = z.input<typeof ListRewardClaimsQuery>;
|
|
7
|
+
export type ListRewardClaimsQuery = z.output<typeof ListRewardClaimsQuery>;
|
|
@@ -9,6 +9,18 @@ export declare const RewardAccrualResponse: z.ZodDiscriminatedUnion<[z.ZodObject
|
|
|
9
9
|
pendingFunding: z.ZodString;
|
|
10
10
|
claimable: z.ZodString;
|
|
11
11
|
paid: z.ZodString;
|
|
12
|
+
sources: z.ZodObject<{
|
|
13
|
+
referral: z.ZodObject<{
|
|
14
|
+
earned: z.ZodString;
|
|
15
|
+
pendingMaturity: z.ZodString;
|
|
16
|
+
pendingFunding: z.ZodString;
|
|
17
|
+
}, z.core.$strip>;
|
|
18
|
+
copy: z.ZodObject<{
|
|
19
|
+
earned: z.ZodString;
|
|
20
|
+
pendingMaturity: z.ZodString;
|
|
21
|
+
pendingFunding: z.ZodString;
|
|
22
|
+
}, z.core.$strip>;
|
|
23
|
+
}, z.core.$strip>;
|
|
12
24
|
}, z.core.$strip>;
|
|
13
25
|
}, z.core.$strip>], "status">;
|
|
14
26
|
export type RewardAccrualResponse = z.output<typeof RewardAccrualResponse>;
|
|
@@ -23,6 +35,18 @@ export declare const RewardSummaryResponse: z.ZodObject<{
|
|
|
23
35
|
pendingFunding: z.ZodString;
|
|
24
36
|
claimable: z.ZodString;
|
|
25
37
|
paid: z.ZodString;
|
|
38
|
+
sources: z.ZodObject<{
|
|
39
|
+
referral: z.ZodObject<{
|
|
40
|
+
earned: z.ZodString;
|
|
41
|
+
pendingMaturity: z.ZodString;
|
|
42
|
+
pendingFunding: z.ZodString;
|
|
43
|
+
}, z.core.$strip>;
|
|
44
|
+
copy: z.ZodObject<{
|
|
45
|
+
earned: z.ZodString;
|
|
46
|
+
pendingMaturity: z.ZodString;
|
|
47
|
+
pendingFunding: z.ZodString;
|
|
48
|
+
}, z.core.$strip>;
|
|
49
|
+
}, z.core.$strip>;
|
|
26
50
|
}, z.core.$strip>;
|
|
27
51
|
}, z.core.$strip>], "status">;
|
|
28
52
|
payout: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -56,6 +80,34 @@ export declare const RewardClaimStatusResponse: z.ZodObject<{
|
|
|
56
80
|
transactionHash: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>>;
|
|
57
81
|
}, z.core.$strip>;
|
|
58
82
|
export type RewardClaimStatusResponse = z.output<typeof RewardClaimStatusResponse>;
|
|
83
|
+
export declare const RewardClaimListResponse: z.ZodObject<{
|
|
84
|
+
limit: z.ZodNumber;
|
|
85
|
+
nextCursor: z.ZodOptional<z.ZodString>;
|
|
86
|
+
items: z.ZodArray<z.ZodObject<{
|
|
87
|
+
claimId: z.ZodUUID;
|
|
88
|
+
status: z.ZodEnum<{
|
|
89
|
+
TRANSFER_INTENT_READY: "TRANSFER_INTENT_READY";
|
|
90
|
+
PAYOUT_PENDING: "PAYOUT_PENDING";
|
|
91
|
+
PAID: "PAID";
|
|
92
|
+
RELEASED: "RELEASED";
|
|
93
|
+
NO_CLAIMABLE_BALANCE: "NO_CLAIMABLE_BALANCE";
|
|
94
|
+
CLAIMABILITY_DISABLED: "CLAIMABILITY_DISABLED";
|
|
95
|
+
NO_CAPACITY: "NO_CAPACITY";
|
|
96
|
+
MISSING_BALANCE: "MISSING_BALANCE";
|
|
97
|
+
STALE_BALANCE: "STALE_BALANCE";
|
|
98
|
+
PAYOUT_DISABLED: "PAYOUT_DISABLED";
|
|
99
|
+
}>;
|
|
100
|
+
payoutDestination: z.ZodString;
|
|
101
|
+
entitledAmount: z.ZodString;
|
|
102
|
+
reservedAmount: z.ZodOptional<z.ZodString>;
|
|
103
|
+
transferIntentCreatedAt: z.ZodOptional<z.ZodISODateTime>;
|
|
104
|
+
verifiedAt: z.ZodOptional<z.ZodISODateTime>;
|
|
105
|
+
createdAt: z.ZodISODateTime;
|
|
106
|
+
updatedAt: z.ZodISODateTime;
|
|
107
|
+
transactionHash: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>>;
|
|
108
|
+
}, z.core.$strip>>;
|
|
109
|
+
}, z.core.$strip>;
|
|
110
|
+
export type RewardClaimListResponse = z.output<typeof RewardClaimListResponse>;
|
|
59
111
|
export declare const RewardClaimResponse: z.ZodObject<{
|
|
60
112
|
claimId: z.ZodOptional<z.ZodUUID>;
|
|
61
113
|
status: z.ZodEnum<{
|
|
@@ -5,10 +5,10 @@ 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
|
-
FAILED: "FAILED";
|
|
9
8
|
ACTIVE: "ACTIVE";
|
|
10
|
-
CANCELLED: "CANCELLED";
|
|
11
9
|
COMPLETED: "COMPLETED";
|
|
10
|
+
FAILED: "FAILED";
|
|
11
|
+
CANCELLED: "CANCELLED";
|
|
12
12
|
}>;
|
|
13
13
|
export type ScheduleStatus = z.infer<typeof ScheduleStatus>;
|
|
14
14
|
export declare const ScheduleIntent: z.ZodEnum<{
|
|
@@ -21,14 +21,46 @@ export declare const ScheduleExecutionType: z.ZodEnum<{
|
|
|
21
21
|
}>;
|
|
22
22
|
export type ScheduleExecutionType = z.infer<typeof ScheduleExecutionType>;
|
|
23
23
|
export declare const ScheduleCancelledReason: z.ZodEnum<{
|
|
24
|
-
USER: "USER";
|
|
25
24
|
POSITION_CLOSED: "POSITION_CLOSED";
|
|
25
|
+
USER: "USER";
|
|
26
26
|
SYSTEM: "SYSTEM";
|
|
27
27
|
POSITION_NETTED: "POSITION_NETTED";
|
|
28
28
|
POSITION_LIQUIDATED: "POSITION_LIQUIDATED";
|
|
29
29
|
POSITION_REVERSED: "POSITION_REVERSED";
|
|
30
30
|
}>;
|
|
31
31
|
export type ScheduleCancelledReason = z.infer<typeof ScheduleCancelledReason>;
|
|
32
|
+
export declare const ScheduleFailedReason: z.ZodEnum<{
|
|
33
|
+
EXPIRED: "EXPIRED";
|
|
34
|
+
INVALID_SCHEDULE: "INVALID_SCHEDULE";
|
|
35
|
+
POSITION_UNAVAILABLE: "POSITION_UNAVAILABLE";
|
|
36
|
+
MARKET_DATA_UNAVAILABLE: "MARKET_DATA_UNAVAILABLE";
|
|
37
|
+
NO_PLACEABLE_LEG: "NO_PLACEABLE_LEG";
|
|
38
|
+
LEG_BELOW_VENUE_MINIMUM: "LEG_BELOW_VENUE_MINIMUM";
|
|
39
|
+
SLICE_ERRORED: "SLICE_ERRORED";
|
|
40
|
+
LEG_FAILED: "LEG_FAILED";
|
|
41
|
+
REMAINDER_UNFILLED: "REMAINDER_UNFILLED";
|
|
42
|
+
REPEATED_SLICE_FAILURES: "REPEATED_SLICE_FAILURES";
|
|
43
|
+
}>;
|
|
44
|
+
export type ScheduleFailedReason = z.infer<typeof ScheduleFailedReason>;
|
|
45
|
+
export declare const ScheduleFailure: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
46
|
+
reason: z.ZodEnum<{
|
|
47
|
+
EXPIRED: "EXPIRED";
|
|
48
|
+
INVALID_SCHEDULE: "INVALID_SCHEDULE";
|
|
49
|
+
POSITION_UNAVAILABLE: "POSITION_UNAVAILABLE";
|
|
50
|
+
MARKET_DATA_UNAVAILABLE: "MARKET_DATA_UNAVAILABLE";
|
|
51
|
+
NO_PLACEABLE_LEG: "NO_PLACEABLE_LEG";
|
|
52
|
+
LEG_BELOW_VENUE_MINIMUM: "LEG_BELOW_VENUE_MINIMUM";
|
|
53
|
+
}>;
|
|
54
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
55
|
+
reason: z.ZodEnum<{
|
|
56
|
+
SLICE_ERRORED: "SLICE_ERRORED";
|
|
57
|
+
LEG_FAILED: "LEG_FAILED";
|
|
58
|
+
REMAINDER_UNFILLED: "REMAINDER_UNFILLED";
|
|
59
|
+
REPEATED_SLICE_FAILURES: "REPEATED_SLICE_FAILURES";
|
|
60
|
+
}>;
|
|
61
|
+
executionId: z.ZodOptional<z.ZodUUID>;
|
|
62
|
+
}, z.core.$strip>], "reason">;
|
|
63
|
+
export type ScheduleFailure = z.infer<typeof ScheduleFailure>;
|
|
32
64
|
declare const TWAPOpenLeg: z.ZodObject<{
|
|
33
65
|
id: z.ZodOptional<z.ZodString>;
|
|
34
66
|
symbol: z.ZodString;
|
|
@@ -53,10 +85,10 @@ declare const BaseSchedule: z.ZodObject<{
|
|
|
53
85
|
VWAP: "VWAP";
|
|
54
86
|
}>;
|
|
55
87
|
status: z.ZodEnum<{
|
|
56
|
-
FAILED: "FAILED";
|
|
57
88
|
ACTIVE: "ACTIVE";
|
|
58
|
-
CANCELLED: "CANCELLED";
|
|
59
89
|
COMPLETED: "COMPLETED";
|
|
90
|
+
FAILED: "FAILED";
|
|
91
|
+
CANCELLED: "CANCELLED";
|
|
60
92
|
}>;
|
|
61
93
|
intent: z.ZodEnum<{
|
|
62
94
|
OPEN: "OPEN";
|
|
@@ -71,13 +103,32 @@ declare const BaseSchedule: z.ZodObject<{
|
|
|
71
103
|
endAt: z.ZodString;
|
|
72
104
|
cancelledAt: z.ZodOptional<z.ZodString>;
|
|
73
105
|
cancelledReason: z.ZodOptional<z.ZodEnum<{
|
|
74
|
-
USER: "USER";
|
|
75
106
|
POSITION_CLOSED: "POSITION_CLOSED";
|
|
107
|
+
USER: "USER";
|
|
76
108
|
SYSTEM: "SYSTEM";
|
|
77
109
|
POSITION_NETTED: "POSITION_NETTED";
|
|
78
110
|
POSITION_LIQUIDATED: "POSITION_LIQUIDATED";
|
|
79
111
|
POSITION_REVERSED: "POSITION_REVERSED";
|
|
80
112
|
}>>;
|
|
113
|
+
failure: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
114
|
+
reason: z.ZodEnum<{
|
|
115
|
+
EXPIRED: "EXPIRED";
|
|
116
|
+
INVALID_SCHEDULE: "INVALID_SCHEDULE";
|
|
117
|
+
POSITION_UNAVAILABLE: "POSITION_UNAVAILABLE";
|
|
118
|
+
MARKET_DATA_UNAVAILABLE: "MARKET_DATA_UNAVAILABLE";
|
|
119
|
+
NO_PLACEABLE_LEG: "NO_PLACEABLE_LEG";
|
|
120
|
+
LEG_BELOW_VENUE_MINIMUM: "LEG_BELOW_VENUE_MINIMUM";
|
|
121
|
+
}>;
|
|
122
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
123
|
+
reason: z.ZodEnum<{
|
|
124
|
+
SLICE_ERRORED: "SLICE_ERRORED";
|
|
125
|
+
LEG_FAILED: "LEG_FAILED";
|
|
126
|
+
REMAINDER_UNFILLED: "REMAINDER_UNFILLED";
|
|
127
|
+
REPEATED_SLICE_FAILURES: "REPEATED_SLICE_FAILURES";
|
|
128
|
+
}>;
|
|
129
|
+
executionId: z.ZodOptional<z.ZodUUID>;
|
|
130
|
+
}, z.core.$strip>], "reason">>;
|
|
131
|
+
failedAt: z.ZodOptional<z.ZodString>;
|
|
81
132
|
createdAt: z.ZodString;
|
|
82
133
|
updatedAt: z.ZodString;
|
|
83
134
|
executedSliceCount: z.ZodNumber;
|
|
@@ -97,10 +148,10 @@ export declare const TWAPOpen: z.ZodObject<{
|
|
|
97
148
|
lighter_rhc: "lighter_rhc";
|
|
98
149
|
}>;
|
|
99
150
|
status: z.ZodEnum<{
|
|
100
|
-
FAILED: "FAILED";
|
|
101
151
|
ACTIVE: "ACTIVE";
|
|
102
|
-
CANCELLED: "CANCELLED";
|
|
103
152
|
COMPLETED: "COMPLETED";
|
|
153
|
+
FAILED: "FAILED";
|
|
154
|
+
CANCELLED: "CANCELLED";
|
|
104
155
|
}>;
|
|
105
156
|
positionKey: z.ZodString;
|
|
106
157
|
executionType: z.ZodEnum<{
|
|
@@ -111,13 +162,32 @@ export declare const TWAPOpen: z.ZodObject<{
|
|
|
111
162
|
endAt: z.ZodString;
|
|
112
163
|
cancelledAt: z.ZodOptional<z.ZodString>;
|
|
113
164
|
cancelledReason: z.ZodOptional<z.ZodEnum<{
|
|
114
|
-
USER: "USER";
|
|
115
165
|
POSITION_CLOSED: "POSITION_CLOSED";
|
|
166
|
+
USER: "USER";
|
|
116
167
|
SYSTEM: "SYSTEM";
|
|
117
168
|
POSITION_NETTED: "POSITION_NETTED";
|
|
118
169
|
POSITION_LIQUIDATED: "POSITION_LIQUIDATED";
|
|
119
170
|
POSITION_REVERSED: "POSITION_REVERSED";
|
|
120
171
|
}>>;
|
|
172
|
+
failure: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
173
|
+
reason: z.ZodEnum<{
|
|
174
|
+
EXPIRED: "EXPIRED";
|
|
175
|
+
INVALID_SCHEDULE: "INVALID_SCHEDULE";
|
|
176
|
+
POSITION_UNAVAILABLE: "POSITION_UNAVAILABLE";
|
|
177
|
+
MARKET_DATA_UNAVAILABLE: "MARKET_DATA_UNAVAILABLE";
|
|
178
|
+
NO_PLACEABLE_LEG: "NO_PLACEABLE_LEG";
|
|
179
|
+
LEG_BELOW_VENUE_MINIMUM: "LEG_BELOW_VENUE_MINIMUM";
|
|
180
|
+
}>;
|
|
181
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
182
|
+
reason: z.ZodEnum<{
|
|
183
|
+
SLICE_ERRORED: "SLICE_ERRORED";
|
|
184
|
+
LEG_FAILED: "LEG_FAILED";
|
|
185
|
+
REMAINDER_UNFILLED: "REMAINDER_UNFILLED";
|
|
186
|
+
REPEATED_SLICE_FAILURES: "REPEATED_SLICE_FAILURES";
|
|
187
|
+
}>;
|
|
188
|
+
executionId: z.ZodOptional<z.ZodUUID>;
|
|
189
|
+
}, z.core.$strip>], "reason">>;
|
|
190
|
+
failedAt: z.ZodOptional<z.ZodString>;
|
|
121
191
|
createdAt: z.ZodString;
|
|
122
192
|
updatedAt: z.ZodString;
|
|
123
193
|
executedSliceCount: z.ZodNumber;
|
|
@@ -156,10 +226,10 @@ export declare const TWAPClose: z.ZodObject<{
|
|
|
156
226
|
lighter_rhc: "lighter_rhc";
|
|
157
227
|
}>;
|
|
158
228
|
status: z.ZodEnum<{
|
|
159
|
-
FAILED: "FAILED";
|
|
160
229
|
ACTIVE: "ACTIVE";
|
|
161
|
-
CANCELLED: "CANCELLED";
|
|
162
230
|
COMPLETED: "COMPLETED";
|
|
231
|
+
FAILED: "FAILED";
|
|
232
|
+
CANCELLED: "CANCELLED";
|
|
163
233
|
}>;
|
|
164
234
|
positionKey: z.ZodString;
|
|
165
235
|
executionType: z.ZodEnum<{
|
|
@@ -170,13 +240,32 @@ export declare const TWAPClose: z.ZodObject<{
|
|
|
170
240
|
endAt: z.ZodString;
|
|
171
241
|
cancelledAt: z.ZodOptional<z.ZodString>;
|
|
172
242
|
cancelledReason: z.ZodOptional<z.ZodEnum<{
|
|
173
|
-
USER: "USER";
|
|
174
243
|
POSITION_CLOSED: "POSITION_CLOSED";
|
|
244
|
+
USER: "USER";
|
|
175
245
|
SYSTEM: "SYSTEM";
|
|
176
246
|
POSITION_NETTED: "POSITION_NETTED";
|
|
177
247
|
POSITION_LIQUIDATED: "POSITION_LIQUIDATED";
|
|
178
248
|
POSITION_REVERSED: "POSITION_REVERSED";
|
|
179
249
|
}>>;
|
|
250
|
+
failure: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
251
|
+
reason: z.ZodEnum<{
|
|
252
|
+
EXPIRED: "EXPIRED";
|
|
253
|
+
INVALID_SCHEDULE: "INVALID_SCHEDULE";
|
|
254
|
+
POSITION_UNAVAILABLE: "POSITION_UNAVAILABLE";
|
|
255
|
+
MARKET_DATA_UNAVAILABLE: "MARKET_DATA_UNAVAILABLE";
|
|
256
|
+
NO_PLACEABLE_LEG: "NO_PLACEABLE_LEG";
|
|
257
|
+
LEG_BELOW_VENUE_MINIMUM: "LEG_BELOW_VENUE_MINIMUM";
|
|
258
|
+
}>;
|
|
259
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
260
|
+
reason: z.ZodEnum<{
|
|
261
|
+
SLICE_ERRORED: "SLICE_ERRORED";
|
|
262
|
+
LEG_FAILED: "LEG_FAILED";
|
|
263
|
+
REMAINDER_UNFILLED: "REMAINDER_UNFILLED";
|
|
264
|
+
REPEATED_SLICE_FAILURES: "REPEATED_SLICE_FAILURES";
|
|
265
|
+
}>;
|
|
266
|
+
executionId: z.ZodOptional<z.ZodUUID>;
|
|
267
|
+
}, z.core.$strip>], "reason">>;
|
|
268
|
+
failedAt: z.ZodOptional<z.ZodString>;
|
|
180
269
|
createdAt: z.ZodString;
|
|
181
270
|
updatedAt: z.ZodString;
|
|
182
271
|
executedSliceCount: z.ZodNumber;
|
|
@@ -206,10 +295,10 @@ export declare const Schedule: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
206
295
|
lighter_rhc: "lighter_rhc";
|
|
207
296
|
}>;
|
|
208
297
|
status: z.ZodEnum<{
|
|
209
|
-
FAILED: "FAILED";
|
|
210
298
|
ACTIVE: "ACTIVE";
|
|
211
|
-
CANCELLED: "CANCELLED";
|
|
212
299
|
COMPLETED: "COMPLETED";
|
|
300
|
+
FAILED: "FAILED";
|
|
301
|
+
CANCELLED: "CANCELLED";
|
|
213
302
|
}>;
|
|
214
303
|
positionKey: z.ZodString;
|
|
215
304
|
executionType: z.ZodEnum<{
|
|
@@ -220,13 +309,32 @@ export declare const Schedule: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
220
309
|
endAt: z.ZodString;
|
|
221
310
|
cancelledAt: z.ZodOptional<z.ZodString>;
|
|
222
311
|
cancelledReason: z.ZodOptional<z.ZodEnum<{
|
|
223
|
-
USER: "USER";
|
|
224
312
|
POSITION_CLOSED: "POSITION_CLOSED";
|
|
313
|
+
USER: "USER";
|
|
225
314
|
SYSTEM: "SYSTEM";
|
|
226
315
|
POSITION_NETTED: "POSITION_NETTED";
|
|
227
316
|
POSITION_LIQUIDATED: "POSITION_LIQUIDATED";
|
|
228
317
|
POSITION_REVERSED: "POSITION_REVERSED";
|
|
229
318
|
}>>;
|
|
319
|
+
failure: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
320
|
+
reason: z.ZodEnum<{
|
|
321
|
+
EXPIRED: "EXPIRED";
|
|
322
|
+
INVALID_SCHEDULE: "INVALID_SCHEDULE";
|
|
323
|
+
POSITION_UNAVAILABLE: "POSITION_UNAVAILABLE";
|
|
324
|
+
MARKET_DATA_UNAVAILABLE: "MARKET_DATA_UNAVAILABLE";
|
|
325
|
+
NO_PLACEABLE_LEG: "NO_PLACEABLE_LEG";
|
|
326
|
+
LEG_BELOW_VENUE_MINIMUM: "LEG_BELOW_VENUE_MINIMUM";
|
|
327
|
+
}>;
|
|
328
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
329
|
+
reason: z.ZodEnum<{
|
|
330
|
+
SLICE_ERRORED: "SLICE_ERRORED";
|
|
331
|
+
LEG_FAILED: "LEG_FAILED";
|
|
332
|
+
REMAINDER_UNFILLED: "REMAINDER_UNFILLED";
|
|
333
|
+
REPEATED_SLICE_FAILURES: "REPEATED_SLICE_FAILURES";
|
|
334
|
+
}>;
|
|
335
|
+
executionId: z.ZodOptional<z.ZodUUID>;
|
|
336
|
+
}, z.core.$strip>], "reason">>;
|
|
337
|
+
failedAt: z.ZodOptional<z.ZodString>;
|
|
230
338
|
createdAt: z.ZodString;
|
|
231
339
|
updatedAt: z.ZodString;
|
|
232
340
|
executedSliceCount: z.ZodNumber;
|
|
@@ -264,10 +372,10 @@ export declare const Schedule: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
264
372
|
lighter_rhc: "lighter_rhc";
|
|
265
373
|
}>;
|
|
266
374
|
status: z.ZodEnum<{
|
|
267
|
-
FAILED: "FAILED";
|
|
268
375
|
ACTIVE: "ACTIVE";
|
|
269
|
-
CANCELLED: "CANCELLED";
|
|
270
376
|
COMPLETED: "COMPLETED";
|
|
377
|
+
FAILED: "FAILED";
|
|
378
|
+
CANCELLED: "CANCELLED";
|
|
271
379
|
}>;
|
|
272
380
|
positionKey: z.ZodString;
|
|
273
381
|
executionType: z.ZodEnum<{
|
|
@@ -278,13 +386,32 @@ export declare const Schedule: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
278
386
|
endAt: z.ZodString;
|
|
279
387
|
cancelledAt: z.ZodOptional<z.ZodString>;
|
|
280
388
|
cancelledReason: z.ZodOptional<z.ZodEnum<{
|
|
281
|
-
USER: "USER";
|
|
282
389
|
POSITION_CLOSED: "POSITION_CLOSED";
|
|
390
|
+
USER: "USER";
|
|
283
391
|
SYSTEM: "SYSTEM";
|
|
284
392
|
POSITION_NETTED: "POSITION_NETTED";
|
|
285
393
|
POSITION_LIQUIDATED: "POSITION_LIQUIDATED";
|
|
286
394
|
POSITION_REVERSED: "POSITION_REVERSED";
|
|
287
395
|
}>>;
|
|
396
|
+
failure: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
397
|
+
reason: z.ZodEnum<{
|
|
398
|
+
EXPIRED: "EXPIRED";
|
|
399
|
+
INVALID_SCHEDULE: "INVALID_SCHEDULE";
|
|
400
|
+
POSITION_UNAVAILABLE: "POSITION_UNAVAILABLE";
|
|
401
|
+
MARKET_DATA_UNAVAILABLE: "MARKET_DATA_UNAVAILABLE";
|
|
402
|
+
NO_PLACEABLE_LEG: "NO_PLACEABLE_LEG";
|
|
403
|
+
LEG_BELOW_VENUE_MINIMUM: "LEG_BELOW_VENUE_MINIMUM";
|
|
404
|
+
}>;
|
|
405
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
406
|
+
reason: z.ZodEnum<{
|
|
407
|
+
SLICE_ERRORED: "SLICE_ERRORED";
|
|
408
|
+
LEG_FAILED: "LEG_FAILED";
|
|
409
|
+
REMAINDER_UNFILLED: "REMAINDER_UNFILLED";
|
|
410
|
+
REPEATED_SLICE_FAILURES: "REPEATED_SLICE_FAILURES";
|
|
411
|
+
}>;
|
|
412
|
+
executionId: z.ZodOptional<z.ZodUUID>;
|
|
413
|
+
}, z.core.$strip>], "reason">>;
|
|
414
|
+
failedAt: z.ZodOptional<z.ZodString>;
|
|
288
415
|
createdAt: z.ZodString;
|
|
289
416
|
updatedAt: z.ZodString;
|
|
290
417
|
executedSliceCount: z.ZodNumber;
|
|
@@ -321,7 +448,9 @@ export declare const ScheduleSlice: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
321
448
|
}>;
|
|
322
449
|
tradeAccountId: z.ZodUUID;
|
|
323
450
|
symbol: z.ZodString;
|
|
324
|
-
|
|
451
|
+
executionId: z.ZodOptional<z.ZodUUID>;
|
|
452
|
+
scheduleId: z.ZodOptional<z.ZodUUID>;
|
|
453
|
+
triggerId: z.ZodOptional<z.ZodUUID>;
|
|
325
454
|
connector: z.ZodEnum<{
|
|
326
455
|
hyperliquid: "hyperliquid";
|
|
327
456
|
binance: "binance";
|
|
@@ -347,6 +476,13 @@ export declare const ScheduleSlice: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
347
476
|
exchangeFillId: z.ZodString;
|
|
348
477
|
quantity: z.ZodString;
|
|
349
478
|
}, z.core.$strip>>;
|
|
479
|
+
assignments: z.ZodArray<z.ZodObject<{
|
|
480
|
+
positionId: z.ZodUUID;
|
|
481
|
+
quantity: z.ZodString;
|
|
482
|
+
usd: z.ZodString;
|
|
483
|
+
tradeFee: z.ZodOptional<z.ZodString>;
|
|
484
|
+
pearFee: z.ZodOptional<z.ZodString>;
|
|
485
|
+
}, z.core.$strip>>;
|
|
350
486
|
}, z.core.$strip>>>;
|
|
351
487
|
}, z.core.$strip>, z.ZodObject<{
|
|
352
488
|
index: z.ZodNumber;
|
package/dist/schedule/index.d.ts
CHANGED
|
@@ -10,10 +10,11 @@ export declare const ScheduleListParams: z.ZodObject<{
|
|
|
10
10
|
lighter: "lighter";
|
|
11
11
|
lighter_rhc: "lighter_rhc";
|
|
12
12
|
}>>;
|
|
13
|
-
status: z.ZodOptional<z.ZodPipe<z.ZodTransform<string[] | (("ACTIVE" | "
|
|
13
|
+
status: z.ZodOptional<z.ZodPipe<z.ZodTransform<string[] | (("ACTIVE" | "COMPLETED" | "FAILED" | "CANCELLED")[] & any[]) | undefined, ("ACTIVE" | "COMPLETED" | "FAILED" | "CANCELLED")[]>, z.ZodArray<z.ZodEnum<{
|
|
14
14
|
ACTIVE: "ACTIVE";
|
|
15
|
-
CANCELLED: "CANCELLED";
|
|
16
15
|
COMPLETED: "COMPLETED";
|
|
16
|
+
FAILED: "FAILED";
|
|
17
|
+
CANCELLED: "CANCELLED";
|
|
17
18
|
}>>>>;
|
|
18
19
|
}, z.core.$strip>;
|
|
19
20
|
export type ScheduleListParamsInput = z.input<typeof ScheduleListParams>;
|