@pear-protocol/types 2.6.0 → 2.9.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/common/trade-legs.d.ts +33 -0
- package/dist/common/trade-legs.js +12 -1
- package/dist/execution/entities.d.ts +107 -0
- package/dist/execution/entities.js +25 -2
- package/dist/execution/responses.d.ts +62 -0
- package/dist/ladder/entities.d.ts +10 -10
- package/dist/ladder/responses.d.ts +30 -30
- package/dist/portfolio/responses.d.ts +2 -0
- package/dist/portfolio/responses.js +4 -0
- package/dist/position/entities.d.ts +2 -0
- package/dist/position/entities.js +4 -1
- package/dist/position/responses.d.ts +2 -0
- package/dist/trade/payloads.d.ts +28 -74
- package/dist/trade/payloads.js +17 -21
- package/dist/trade/responses.d.ts +155 -9
- package/dist/trade/responses.js +1 -9
- package/dist/trigger/common/index.d.ts +1 -1
- package/dist/trigger/entities/index.d.ts +32 -32
- package/dist/trigger/payloads/index.d.ts +6 -6
- package/dist/trigger/responses.d.ts +20 -20
- package/package.json +1 -1
|
@@ -1,13 +1,4 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
/** An authenticated admission capability; old workers also reject the new persisted discriminant. */
|
|
3
|
-
export declare const TradeCapabilities: z.ZodObject<{
|
|
4
|
-
boundedMarketOpen: z.ZodObject<{
|
|
5
|
-
version: z.ZodLiteral<1>;
|
|
6
|
-
maxTtlMs: z.ZodLiteral<10000>;
|
|
7
|
-
connectors: z.ZodArray<z.ZodLiteral<"hyperliquid">>;
|
|
8
|
-
}, z.core.$strip>;
|
|
9
|
-
}, z.core.$strip>;
|
|
10
|
-
export type TradeCapabilities = z.output<typeof TradeCapabilities>;
|
|
11
2
|
export declare const CreateTradeOpenResponse: z.ZodObject<{
|
|
12
3
|
execution: z.ZodDiscriminatedUnion<[z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
13
4
|
id: z.ZodUUID;
|
|
@@ -62,8 +53,17 @@ export declare const CreateTradeOpenResponse: z.ZodObject<{
|
|
|
62
53
|
filledQuantity: z.ZodString;
|
|
63
54
|
filledPrice: z.ZodOptional<z.ZodString>;
|
|
64
55
|
}, z.core.$strip>], "type">>>;
|
|
56
|
+
fulfillment: z.ZodOptional<z.ZodEnum<{
|
|
57
|
+
PENDING: "PENDING";
|
|
58
|
+
PARTIAL: "PARTIAL";
|
|
59
|
+
COMPLETE: "COMPLETE";
|
|
60
|
+
NONE: "NONE";
|
|
61
|
+
}>>;
|
|
65
62
|
intent: z.ZodLiteral<"OPEN">;
|
|
66
63
|
orderType: z.ZodLiteral<"MARKET">;
|
|
64
|
+
position: z.ZodOptional<z.ZodObject<{
|
|
65
|
+
id: z.ZodUUID;
|
|
66
|
+
}, z.core.$strip>>;
|
|
67
67
|
legs: z.ZodTuple<[z.ZodObject<{
|
|
68
68
|
id: z.ZodOptional<z.ZodString>;
|
|
69
69
|
symbol: z.ZodString;
|
|
@@ -76,6 +76,7 @@ export declare const CreateTradeOpenResponse: z.ZodObject<{
|
|
|
76
76
|
USD: "USD";
|
|
77
77
|
}>;
|
|
78
78
|
amount: z.ZodString;
|
|
79
|
+
maxImpactPrice: z.ZodOptional<z.ZodString>;
|
|
79
80
|
reduceOnly: z.ZodBoolean;
|
|
80
81
|
}, z.core.$strip>], z.ZodObject<{
|
|
81
82
|
id: z.ZodOptional<z.ZodString>;
|
|
@@ -89,6 +90,7 @@ export declare const CreateTradeOpenResponse: z.ZodObject<{
|
|
|
89
90
|
USD: "USD";
|
|
90
91
|
}>;
|
|
91
92
|
amount: z.ZodString;
|
|
93
|
+
maxImpactPrice: z.ZodOptional<z.ZodString>;
|
|
92
94
|
reduceOnly: z.ZodBoolean;
|
|
93
95
|
}, z.core.$strip>>;
|
|
94
96
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -144,6 +146,12 @@ export declare const CreateTradeOpenResponse: z.ZodObject<{
|
|
|
144
146
|
filledQuantity: z.ZodString;
|
|
145
147
|
filledPrice: z.ZodOptional<z.ZodString>;
|
|
146
148
|
}, z.core.$strip>], "type">>>;
|
|
149
|
+
fulfillment: z.ZodOptional<z.ZodEnum<{
|
|
150
|
+
PENDING: "PENDING";
|
|
151
|
+
PARTIAL: "PARTIAL";
|
|
152
|
+
COMPLETE: "COMPLETE";
|
|
153
|
+
NONE: "NONE";
|
|
154
|
+
}>>;
|
|
147
155
|
intent: z.ZodLiteral<"ADJUST">;
|
|
148
156
|
orderType: z.ZodLiteral<"MARKET">;
|
|
149
157
|
position: z.ZodOptional<z.ZodObject<{
|
|
@@ -162,6 +170,7 @@ export declare const CreateTradeOpenResponse: z.ZodObject<{
|
|
|
162
170
|
USD: "USD";
|
|
163
171
|
}>;
|
|
164
172
|
amount: z.ZodString;
|
|
173
|
+
maxImpactPrice: z.ZodOptional<z.ZodString>;
|
|
165
174
|
reduceOnly: z.ZodBoolean;
|
|
166
175
|
}, z.core.$strip>], z.ZodObject<{
|
|
167
176
|
id: z.ZodOptional<z.ZodString>;
|
|
@@ -175,6 +184,7 @@ export declare const CreateTradeOpenResponse: z.ZodObject<{
|
|
|
175
184
|
USD: "USD";
|
|
176
185
|
}>;
|
|
177
186
|
amount: z.ZodString;
|
|
187
|
+
maxImpactPrice: z.ZodOptional<z.ZodString>;
|
|
178
188
|
reduceOnly: z.ZodBoolean;
|
|
179
189
|
}, z.core.$strip>>;
|
|
180
190
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -230,6 +240,12 @@ export declare const CreateTradeOpenResponse: z.ZodObject<{
|
|
|
230
240
|
filledQuantity: z.ZodString;
|
|
231
241
|
filledPrice: z.ZodOptional<z.ZodString>;
|
|
232
242
|
}, z.core.$strip>], "type">>>;
|
|
243
|
+
fulfillment: z.ZodOptional<z.ZodEnum<{
|
|
244
|
+
PENDING: "PENDING";
|
|
245
|
+
PARTIAL: "PARTIAL";
|
|
246
|
+
COMPLETE: "COMPLETE";
|
|
247
|
+
NONE: "NONE";
|
|
248
|
+
}>>;
|
|
233
249
|
intent: z.ZodLiteral<"CLOSE">;
|
|
234
250
|
orderType: z.ZodLiteral<"MARKET">;
|
|
235
251
|
position: z.ZodOptional<z.ZodObject<{
|
|
@@ -289,6 +305,12 @@ export declare const CreateTradeOpenResponse: z.ZodObject<{
|
|
|
289
305
|
filledQuantity: z.ZodString;
|
|
290
306
|
filledPrice: z.ZodOptional<z.ZodString>;
|
|
291
307
|
}, z.core.$strip>], "type">>>;
|
|
308
|
+
fulfillment: z.ZodOptional<z.ZodEnum<{
|
|
309
|
+
PENDING: "PENDING";
|
|
310
|
+
PARTIAL: "PARTIAL";
|
|
311
|
+
COMPLETE: "COMPLETE";
|
|
312
|
+
NONE: "NONE";
|
|
313
|
+
}>>;
|
|
292
314
|
intent: z.ZodLiteral<"REVERSE">;
|
|
293
315
|
orderType: z.ZodLiteral<"MARKET">;
|
|
294
316
|
position: z.ZodOptional<z.ZodObject<{
|
|
@@ -352,8 +374,17 @@ export declare const CreateTradeAdjustResponse: z.ZodObject<{
|
|
|
352
374
|
filledQuantity: z.ZodString;
|
|
353
375
|
filledPrice: z.ZodOptional<z.ZodString>;
|
|
354
376
|
}, z.core.$strip>], "type">>>;
|
|
377
|
+
fulfillment: z.ZodOptional<z.ZodEnum<{
|
|
378
|
+
PENDING: "PENDING";
|
|
379
|
+
PARTIAL: "PARTIAL";
|
|
380
|
+
COMPLETE: "COMPLETE";
|
|
381
|
+
NONE: "NONE";
|
|
382
|
+
}>>;
|
|
355
383
|
intent: z.ZodLiteral<"OPEN">;
|
|
356
384
|
orderType: z.ZodLiteral<"MARKET">;
|
|
385
|
+
position: z.ZodOptional<z.ZodObject<{
|
|
386
|
+
id: z.ZodUUID;
|
|
387
|
+
}, z.core.$strip>>;
|
|
357
388
|
legs: z.ZodTuple<[z.ZodObject<{
|
|
358
389
|
id: z.ZodOptional<z.ZodString>;
|
|
359
390
|
symbol: z.ZodString;
|
|
@@ -366,6 +397,7 @@ export declare const CreateTradeAdjustResponse: z.ZodObject<{
|
|
|
366
397
|
USD: "USD";
|
|
367
398
|
}>;
|
|
368
399
|
amount: z.ZodString;
|
|
400
|
+
maxImpactPrice: z.ZodOptional<z.ZodString>;
|
|
369
401
|
reduceOnly: z.ZodBoolean;
|
|
370
402
|
}, z.core.$strip>], z.ZodObject<{
|
|
371
403
|
id: z.ZodOptional<z.ZodString>;
|
|
@@ -379,6 +411,7 @@ export declare const CreateTradeAdjustResponse: z.ZodObject<{
|
|
|
379
411
|
USD: "USD";
|
|
380
412
|
}>;
|
|
381
413
|
amount: z.ZodString;
|
|
414
|
+
maxImpactPrice: z.ZodOptional<z.ZodString>;
|
|
382
415
|
reduceOnly: z.ZodBoolean;
|
|
383
416
|
}, z.core.$strip>>;
|
|
384
417
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -434,6 +467,12 @@ export declare const CreateTradeAdjustResponse: z.ZodObject<{
|
|
|
434
467
|
filledQuantity: z.ZodString;
|
|
435
468
|
filledPrice: z.ZodOptional<z.ZodString>;
|
|
436
469
|
}, z.core.$strip>], "type">>>;
|
|
470
|
+
fulfillment: z.ZodOptional<z.ZodEnum<{
|
|
471
|
+
PENDING: "PENDING";
|
|
472
|
+
PARTIAL: "PARTIAL";
|
|
473
|
+
COMPLETE: "COMPLETE";
|
|
474
|
+
NONE: "NONE";
|
|
475
|
+
}>>;
|
|
437
476
|
intent: z.ZodLiteral<"ADJUST">;
|
|
438
477
|
orderType: z.ZodLiteral<"MARKET">;
|
|
439
478
|
position: z.ZodOptional<z.ZodObject<{
|
|
@@ -452,6 +491,7 @@ export declare const CreateTradeAdjustResponse: z.ZodObject<{
|
|
|
452
491
|
USD: "USD";
|
|
453
492
|
}>;
|
|
454
493
|
amount: z.ZodString;
|
|
494
|
+
maxImpactPrice: z.ZodOptional<z.ZodString>;
|
|
455
495
|
reduceOnly: z.ZodBoolean;
|
|
456
496
|
}, z.core.$strip>], z.ZodObject<{
|
|
457
497
|
id: z.ZodOptional<z.ZodString>;
|
|
@@ -465,6 +505,7 @@ export declare const CreateTradeAdjustResponse: z.ZodObject<{
|
|
|
465
505
|
USD: "USD";
|
|
466
506
|
}>;
|
|
467
507
|
amount: z.ZodString;
|
|
508
|
+
maxImpactPrice: z.ZodOptional<z.ZodString>;
|
|
468
509
|
reduceOnly: z.ZodBoolean;
|
|
469
510
|
}, z.core.$strip>>;
|
|
470
511
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -520,6 +561,12 @@ export declare const CreateTradeAdjustResponse: z.ZodObject<{
|
|
|
520
561
|
filledQuantity: z.ZodString;
|
|
521
562
|
filledPrice: z.ZodOptional<z.ZodString>;
|
|
522
563
|
}, z.core.$strip>], "type">>>;
|
|
564
|
+
fulfillment: z.ZodOptional<z.ZodEnum<{
|
|
565
|
+
PENDING: "PENDING";
|
|
566
|
+
PARTIAL: "PARTIAL";
|
|
567
|
+
COMPLETE: "COMPLETE";
|
|
568
|
+
NONE: "NONE";
|
|
569
|
+
}>>;
|
|
523
570
|
intent: z.ZodLiteral<"CLOSE">;
|
|
524
571
|
orderType: z.ZodLiteral<"MARKET">;
|
|
525
572
|
position: z.ZodOptional<z.ZodObject<{
|
|
@@ -579,6 +626,12 @@ export declare const CreateTradeAdjustResponse: z.ZodObject<{
|
|
|
579
626
|
filledQuantity: z.ZodString;
|
|
580
627
|
filledPrice: z.ZodOptional<z.ZodString>;
|
|
581
628
|
}, z.core.$strip>], "type">>>;
|
|
629
|
+
fulfillment: z.ZodOptional<z.ZodEnum<{
|
|
630
|
+
PENDING: "PENDING";
|
|
631
|
+
PARTIAL: "PARTIAL";
|
|
632
|
+
COMPLETE: "COMPLETE";
|
|
633
|
+
NONE: "NONE";
|
|
634
|
+
}>>;
|
|
582
635
|
intent: z.ZodLiteral<"REVERSE">;
|
|
583
636
|
orderType: z.ZodLiteral<"MARKET">;
|
|
584
637
|
position: z.ZodOptional<z.ZodObject<{
|
|
@@ -642,8 +695,17 @@ export declare const CreateTradeCloseResponse: z.ZodObject<{
|
|
|
642
695
|
filledQuantity: z.ZodString;
|
|
643
696
|
filledPrice: z.ZodOptional<z.ZodString>;
|
|
644
697
|
}, z.core.$strip>], "type">>>;
|
|
698
|
+
fulfillment: z.ZodOptional<z.ZodEnum<{
|
|
699
|
+
PENDING: "PENDING";
|
|
700
|
+
PARTIAL: "PARTIAL";
|
|
701
|
+
COMPLETE: "COMPLETE";
|
|
702
|
+
NONE: "NONE";
|
|
703
|
+
}>>;
|
|
645
704
|
intent: z.ZodLiteral<"OPEN">;
|
|
646
705
|
orderType: z.ZodLiteral<"MARKET">;
|
|
706
|
+
position: z.ZodOptional<z.ZodObject<{
|
|
707
|
+
id: z.ZodUUID;
|
|
708
|
+
}, z.core.$strip>>;
|
|
647
709
|
legs: z.ZodTuple<[z.ZodObject<{
|
|
648
710
|
id: z.ZodOptional<z.ZodString>;
|
|
649
711
|
symbol: z.ZodString;
|
|
@@ -656,6 +718,7 @@ export declare const CreateTradeCloseResponse: z.ZodObject<{
|
|
|
656
718
|
USD: "USD";
|
|
657
719
|
}>;
|
|
658
720
|
amount: z.ZodString;
|
|
721
|
+
maxImpactPrice: z.ZodOptional<z.ZodString>;
|
|
659
722
|
reduceOnly: z.ZodBoolean;
|
|
660
723
|
}, z.core.$strip>], z.ZodObject<{
|
|
661
724
|
id: z.ZodOptional<z.ZodString>;
|
|
@@ -669,6 +732,7 @@ export declare const CreateTradeCloseResponse: z.ZodObject<{
|
|
|
669
732
|
USD: "USD";
|
|
670
733
|
}>;
|
|
671
734
|
amount: z.ZodString;
|
|
735
|
+
maxImpactPrice: z.ZodOptional<z.ZodString>;
|
|
672
736
|
reduceOnly: z.ZodBoolean;
|
|
673
737
|
}, z.core.$strip>>;
|
|
674
738
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -724,6 +788,12 @@ export declare const CreateTradeCloseResponse: z.ZodObject<{
|
|
|
724
788
|
filledQuantity: z.ZodString;
|
|
725
789
|
filledPrice: z.ZodOptional<z.ZodString>;
|
|
726
790
|
}, z.core.$strip>], "type">>>;
|
|
791
|
+
fulfillment: z.ZodOptional<z.ZodEnum<{
|
|
792
|
+
PENDING: "PENDING";
|
|
793
|
+
PARTIAL: "PARTIAL";
|
|
794
|
+
COMPLETE: "COMPLETE";
|
|
795
|
+
NONE: "NONE";
|
|
796
|
+
}>>;
|
|
727
797
|
intent: z.ZodLiteral<"ADJUST">;
|
|
728
798
|
orderType: z.ZodLiteral<"MARKET">;
|
|
729
799
|
position: z.ZodOptional<z.ZodObject<{
|
|
@@ -742,6 +812,7 @@ export declare const CreateTradeCloseResponse: z.ZodObject<{
|
|
|
742
812
|
USD: "USD";
|
|
743
813
|
}>;
|
|
744
814
|
amount: z.ZodString;
|
|
815
|
+
maxImpactPrice: z.ZodOptional<z.ZodString>;
|
|
745
816
|
reduceOnly: z.ZodBoolean;
|
|
746
817
|
}, z.core.$strip>], z.ZodObject<{
|
|
747
818
|
id: z.ZodOptional<z.ZodString>;
|
|
@@ -755,6 +826,7 @@ export declare const CreateTradeCloseResponse: z.ZodObject<{
|
|
|
755
826
|
USD: "USD";
|
|
756
827
|
}>;
|
|
757
828
|
amount: z.ZodString;
|
|
829
|
+
maxImpactPrice: z.ZodOptional<z.ZodString>;
|
|
758
830
|
reduceOnly: z.ZodBoolean;
|
|
759
831
|
}, z.core.$strip>>;
|
|
760
832
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -810,6 +882,12 @@ export declare const CreateTradeCloseResponse: z.ZodObject<{
|
|
|
810
882
|
filledQuantity: z.ZodString;
|
|
811
883
|
filledPrice: z.ZodOptional<z.ZodString>;
|
|
812
884
|
}, z.core.$strip>], "type">>>;
|
|
885
|
+
fulfillment: z.ZodOptional<z.ZodEnum<{
|
|
886
|
+
PENDING: "PENDING";
|
|
887
|
+
PARTIAL: "PARTIAL";
|
|
888
|
+
COMPLETE: "COMPLETE";
|
|
889
|
+
NONE: "NONE";
|
|
890
|
+
}>>;
|
|
813
891
|
intent: z.ZodLiteral<"CLOSE">;
|
|
814
892
|
orderType: z.ZodLiteral<"MARKET">;
|
|
815
893
|
position: z.ZodOptional<z.ZodObject<{
|
|
@@ -869,6 +947,12 @@ export declare const CreateTradeCloseResponse: z.ZodObject<{
|
|
|
869
947
|
filledQuantity: z.ZodString;
|
|
870
948
|
filledPrice: z.ZodOptional<z.ZodString>;
|
|
871
949
|
}, z.core.$strip>], "type">>>;
|
|
950
|
+
fulfillment: z.ZodOptional<z.ZodEnum<{
|
|
951
|
+
PENDING: "PENDING";
|
|
952
|
+
PARTIAL: "PARTIAL";
|
|
953
|
+
COMPLETE: "COMPLETE";
|
|
954
|
+
NONE: "NONE";
|
|
955
|
+
}>>;
|
|
872
956
|
intent: z.ZodLiteral<"REVERSE">;
|
|
873
957
|
orderType: z.ZodLiteral<"MARKET">;
|
|
874
958
|
position: z.ZodOptional<z.ZodObject<{
|
|
@@ -932,8 +1016,17 @@ export declare const CreateTradeReverseResponse: z.ZodObject<{
|
|
|
932
1016
|
filledQuantity: z.ZodString;
|
|
933
1017
|
filledPrice: z.ZodOptional<z.ZodString>;
|
|
934
1018
|
}, z.core.$strip>], "type">>>;
|
|
1019
|
+
fulfillment: z.ZodOptional<z.ZodEnum<{
|
|
1020
|
+
PENDING: "PENDING";
|
|
1021
|
+
PARTIAL: "PARTIAL";
|
|
1022
|
+
COMPLETE: "COMPLETE";
|
|
1023
|
+
NONE: "NONE";
|
|
1024
|
+
}>>;
|
|
935
1025
|
intent: z.ZodLiteral<"OPEN">;
|
|
936
1026
|
orderType: z.ZodLiteral<"MARKET">;
|
|
1027
|
+
position: z.ZodOptional<z.ZodObject<{
|
|
1028
|
+
id: z.ZodUUID;
|
|
1029
|
+
}, z.core.$strip>>;
|
|
937
1030
|
legs: z.ZodTuple<[z.ZodObject<{
|
|
938
1031
|
id: z.ZodOptional<z.ZodString>;
|
|
939
1032
|
symbol: z.ZodString;
|
|
@@ -946,6 +1039,7 @@ export declare const CreateTradeReverseResponse: z.ZodObject<{
|
|
|
946
1039
|
USD: "USD";
|
|
947
1040
|
}>;
|
|
948
1041
|
amount: z.ZodString;
|
|
1042
|
+
maxImpactPrice: z.ZodOptional<z.ZodString>;
|
|
949
1043
|
reduceOnly: z.ZodBoolean;
|
|
950
1044
|
}, z.core.$strip>], z.ZodObject<{
|
|
951
1045
|
id: z.ZodOptional<z.ZodString>;
|
|
@@ -959,6 +1053,7 @@ export declare const CreateTradeReverseResponse: z.ZodObject<{
|
|
|
959
1053
|
USD: "USD";
|
|
960
1054
|
}>;
|
|
961
1055
|
amount: z.ZodString;
|
|
1056
|
+
maxImpactPrice: z.ZodOptional<z.ZodString>;
|
|
962
1057
|
reduceOnly: z.ZodBoolean;
|
|
963
1058
|
}, z.core.$strip>>;
|
|
964
1059
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -1014,6 +1109,12 @@ export declare const CreateTradeReverseResponse: z.ZodObject<{
|
|
|
1014
1109
|
filledQuantity: z.ZodString;
|
|
1015
1110
|
filledPrice: z.ZodOptional<z.ZodString>;
|
|
1016
1111
|
}, z.core.$strip>], "type">>>;
|
|
1112
|
+
fulfillment: z.ZodOptional<z.ZodEnum<{
|
|
1113
|
+
PENDING: "PENDING";
|
|
1114
|
+
PARTIAL: "PARTIAL";
|
|
1115
|
+
COMPLETE: "COMPLETE";
|
|
1116
|
+
NONE: "NONE";
|
|
1117
|
+
}>>;
|
|
1017
1118
|
intent: z.ZodLiteral<"ADJUST">;
|
|
1018
1119
|
orderType: z.ZodLiteral<"MARKET">;
|
|
1019
1120
|
position: z.ZodOptional<z.ZodObject<{
|
|
@@ -1032,6 +1133,7 @@ export declare const CreateTradeReverseResponse: z.ZodObject<{
|
|
|
1032
1133
|
USD: "USD";
|
|
1033
1134
|
}>;
|
|
1034
1135
|
amount: z.ZodString;
|
|
1136
|
+
maxImpactPrice: z.ZodOptional<z.ZodString>;
|
|
1035
1137
|
reduceOnly: z.ZodBoolean;
|
|
1036
1138
|
}, z.core.$strip>], z.ZodObject<{
|
|
1037
1139
|
id: z.ZodOptional<z.ZodString>;
|
|
@@ -1045,6 +1147,7 @@ export declare const CreateTradeReverseResponse: z.ZodObject<{
|
|
|
1045
1147
|
USD: "USD";
|
|
1046
1148
|
}>;
|
|
1047
1149
|
amount: z.ZodString;
|
|
1150
|
+
maxImpactPrice: z.ZodOptional<z.ZodString>;
|
|
1048
1151
|
reduceOnly: z.ZodBoolean;
|
|
1049
1152
|
}, z.core.$strip>>;
|
|
1050
1153
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -1100,6 +1203,12 @@ export declare const CreateTradeReverseResponse: z.ZodObject<{
|
|
|
1100
1203
|
filledQuantity: z.ZodString;
|
|
1101
1204
|
filledPrice: z.ZodOptional<z.ZodString>;
|
|
1102
1205
|
}, z.core.$strip>], "type">>>;
|
|
1206
|
+
fulfillment: z.ZodOptional<z.ZodEnum<{
|
|
1207
|
+
PENDING: "PENDING";
|
|
1208
|
+
PARTIAL: "PARTIAL";
|
|
1209
|
+
COMPLETE: "COMPLETE";
|
|
1210
|
+
NONE: "NONE";
|
|
1211
|
+
}>>;
|
|
1103
1212
|
intent: z.ZodLiteral<"CLOSE">;
|
|
1104
1213
|
orderType: z.ZodLiteral<"MARKET">;
|
|
1105
1214
|
position: z.ZodOptional<z.ZodObject<{
|
|
@@ -1159,6 +1268,12 @@ export declare const CreateTradeReverseResponse: z.ZodObject<{
|
|
|
1159
1268
|
filledQuantity: z.ZodString;
|
|
1160
1269
|
filledPrice: z.ZodOptional<z.ZodString>;
|
|
1161
1270
|
}, z.core.$strip>], "type">>>;
|
|
1271
|
+
fulfillment: z.ZodOptional<z.ZodEnum<{
|
|
1272
|
+
PENDING: "PENDING";
|
|
1273
|
+
PARTIAL: "PARTIAL";
|
|
1274
|
+
COMPLETE: "COMPLETE";
|
|
1275
|
+
NONE: "NONE";
|
|
1276
|
+
}>>;
|
|
1162
1277
|
intent: z.ZodLiteral<"REVERSE">;
|
|
1163
1278
|
orderType: z.ZodLiteral<"MARKET">;
|
|
1164
1279
|
position: z.ZodOptional<z.ZodObject<{
|
|
@@ -1222,8 +1337,17 @@ export declare const CreateTradeCloseAllResponse: z.ZodObject<{
|
|
|
1222
1337
|
filledQuantity: z.ZodString;
|
|
1223
1338
|
filledPrice: z.ZodOptional<z.ZodString>;
|
|
1224
1339
|
}, z.core.$strip>], "type">>>;
|
|
1340
|
+
fulfillment: z.ZodOptional<z.ZodEnum<{
|
|
1341
|
+
PENDING: "PENDING";
|
|
1342
|
+
PARTIAL: "PARTIAL";
|
|
1343
|
+
COMPLETE: "COMPLETE";
|
|
1344
|
+
NONE: "NONE";
|
|
1345
|
+
}>>;
|
|
1225
1346
|
intent: z.ZodLiteral<"OPEN">;
|
|
1226
1347
|
orderType: z.ZodLiteral<"MARKET">;
|
|
1348
|
+
position: z.ZodOptional<z.ZodObject<{
|
|
1349
|
+
id: z.ZodUUID;
|
|
1350
|
+
}, z.core.$strip>>;
|
|
1227
1351
|
legs: z.ZodTuple<[z.ZodObject<{
|
|
1228
1352
|
id: z.ZodOptional<z.ZodString>;
|
|
1229
1353
|
symbol: z.ZodString;
|
|
@@ -1236,6 +1360,7 @@ export declare const CreateTradeCloseAllResponse: z.ZodObject<{
|
|
|
1236
1360
|
USD: "USD";
|
|
1237
1361
|
}>;
|
|
1238
1362
|
amount: z.ZodString;
|
|
1363
|
+
maxImpactPrice: z.ZodOptional<z.ZodString>;
|
|
1239
1364
|
reduceOnly: z.ZodBoolean;
|
|
1240
1365
|
}, z.core.$strip>], z.ZodObject<{
|
|
1241
1366
|
id: z.ZodOptional<z.ZodString>;
|
|
@@ -1249,6 +1374,7 @@ export declare const CreateTradeCloseAllResponse: z.ZodObject<{
|
|
|
1249
1374
|
USD: "USD";
|
|
1250
1375
|
}>;
|
|
1251
1376
|
amount: z.ZodString;
|
|
1377
|
+
maxImpactPrice: z.ZodOptional<z.ZodString>;
|
|
1252
1378
|
reduceOnly: z.ZodBoolean;
|
|
1253
1379
|
}, z.core.$strip>>;
|
|
1254
1380
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -1304,6 +1430,12 @@ export declare const CreateTradeCloseAllResponse: z.ZodObject<{
|
|
|
1304
1430
|
filledQuantity: z.ZodString;
|
|
1305
1431
|
filledPrice: z.ZodOptional<z.ZodString>;
|
|
1306
1432
|
}, z.core.$strip>], "type">>>;
|
|
1433
|
+
fulfillment: z.ZodOptional<z.ZodEnum<{
|
|
1434
|
+
PENDING: "PENDING";
|
|
1435
|
+
PARTIAL: "PARTIAL";
|
|
1436
|
+
COMPLETE: "COMPLETE";
|
|
1437
|
+
NONE: "NONE";
|
|
1438
|
+
}>>;
|
|
1307
1439
|
intent: z.ZodLiteral<"ADJUST">;
|
|
1308
1440
|
orderType: z.ZodLiteral<"MARKET">;
|
|
1309
1441
|
position: z.ZodOptional<z.ZodObject<{
|
|
@@ -1322,6 +1454,7 @@ export declare const CreateTradeCloseAllResponse: z.ZodObject<{
|
|
|
1322
1454
|
USD: "USD";
|
|
1323
1455
|
}>;
|
|
1324
1456
|
amount: z.ZodString;
|
|
1457
|
+
maxImpactPrice: z.ZodOptional<z.ZodString>;
|
|
1325
1458
|
reduceOnly: z.ZodBoolean;
|
|
1326
1459
|
}, z.core.$strip>], z.ZodObject<{
|
|
1327
1460
|
id: z.ZodOptional<z.ZodString>;
|
|
@@ -1335,6 +1468,7 @@ export declare const CreateTradeCloseAllResponse: z.ZodObject<{
|
|
|
1335
1468
|
USD: "USD";
|
|
1336
1469
|
}>;
|
|
1337
1470
|
amount: z.ZodString;
|
|
1471
|
+
maxImpactPrice: z.ZodOptional<z.ZodString>;
|
|
1338
1472
|
reduceOnly: z.ZodBoolean;
|
|
1339
1473
|
}, z.core.$strip>>;
|
|
1340
1474
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -1390,6 +1524,12 @@ export declare const CreateTradeCloseAllResponse: z.ZodObject<{
|
|
|
1390
1524
|
filledQuantity: z.ZodString;
|
|
1391
1525
|
filledPrice: z.ZodOptional<z.ZodString>;
|
|
1392
1526
|
}, z.core.$strip>], "type">>>;
|
|
1527
|
+
fulfillment: z.ZodOptional<z.ZodEnum<{
|
|
1528
|
+
PENDING: "PENDING";
|
|
1529
|
+
PARTIAL: "PARTIAL";
|
|
1530
|
+
COMPLETE: "COMPLETE";
|
|
1531
|
+
NONE: "NONE";
|
|
1532
|
+
}>>;
|
|
1393
1533
|
intent: z.ZodLiteral<"CLOSE">;
|
|
1394
1534
|
orderType: z.ZodLiteral<"MARKET">;
|
|
1395
1535
|
position: z.ZodOptional<z.ZodObject<{
|
|
@@ -1449,6 +1589,12 @@ export declare const CreateTradeCloseAllResponse: z.ZodObject<{
|
|
|
1449
1589
|
filledQuantity: z.ZodString;
|
|
1450
1590
|
filledPrice: z.ZodOptional<z.ZodString>;
|
|
1451
1591
|
}, z.core.$strip>], "type">>>;
|
|
1592
|
+
fulfillment: z.ZodOptional<z.ZodEnum<{
|
|
1593
|
+
PENDING: "PENDING";
|
|
1594
|
+
PARTIAL: "PARTIAL";
|
|
1595
|
+
COMPLETE: "COMPLETE";
|
|
1596
|
+
NONE: "NONE";
|
|
1597
|
+
}>>;
|
|
1452
1598
|
intent: z.ZodLiteral<"REVERSE">;
|
|
1453
1599
|
orderType: z.ZodLiteral<"MARKET">;
|
|
1454
1600
|
position: z.ZodOptional<z.ZodObject<{
|
package/dist/trade/responses.js
CHANGED
|
@@ -2,15 +2,7 @@ import { z } from 'zod';
|
|
|
2
2
|
import { CursorResponse } from '../common';
|
|
3
3
|
import { Execution } from '../execution/entities';
|
|
4
4
|
import { TradeGroup } from './entities';
|
|
5
|
-
import { BOUNDED_MARKET_MAX_TTL_MS } from './payloads';
|
|
6
5
|
|
|
7
|
-
const TradeCapabilities = z.object({
|
|
8
|
-
boundedMarketOpen: z.object({
|
|
9
|
-
version: z.literal(1),
|
|
10
|
-
maxTtlMs: z.literal(BOUNDED_MARKET_MAX_TTL_MS),
|
|
11
|
-
connectors: z.array(z.literal("hyperliquid"))
|
|
12
|
-
})
|
|
13
|
-
});
|
|
14
6
|
const CreateTradeOpenResponse = z.object({
|
|
15
7
|
execution: Execution
|
|
16
8
|
});
|
|
@@ -30,4 +22,4 @@ const TradeListResponse = CursorResponse.extend({
|
|
|
30
22
|
groups: z.array(TradeGroup)
|
|
31
23
|
});
|
|
32
24
|
|
|
33
|
-
export { CreateTradeAdjustResponse, CreateTradeCloseAllResponse, CreateTradeCloseResponse, CreateTradeOpenResponse, CreateTradeReverseResponse,
|
|
25
|
+
export { CreateTradeAdjustResponse, CreateTradeCloseAllResponse, CreateTradeCloseResponse, CreateTradeOpenResponse, CreateTradeReverseResponse, TradeListResponse };
|
|
@@ -20,9 +20,9 @@ export declare const TriggerCancelledReason: z.ZodEnum<{
|
|
|
20
20
|
}>;
|
|
21
21
|
export type TriggerCancelledReason = z.infer<typeof TriggerCancelledReason>;
|
|
22
22
|
export declare const BracketType: z.ZodEnum<{
|
|
23
|
+
NONE: "NONE";
|
|
23
24
|
STOP_LOSS: "STOP_LOSS";
|
|
24
25
|
TAKE_PROFIT: "TAKE_PROFIT";
|
|
25
|
-
NONE: "NONE";
|
|
26
26
|
}>;
|
|
27
27
|
export type BracketType = z.infer<typeof BracketType>;
|
|
28
28
|
export declare const MetricTrack: z.ZodEnum<{
|