@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
|
@@ -5,6 +5,10 @@ export declare const MarginMode: z.ZodEnum<{
|
|
|
5
5
|
}>;
|
|
6
6
|
export type MarginMode = z.infer<typeof MarginMode>;
|
|
7
7
|
export declare const SetLeverage: z.ZodObject<{
|
|
8
|
+
source: z.ZodDefault<z.ZodEnum<{
|
|
9
|
+
TRADE_PREPARATION: "TRADE_PREPARATION";
|
|
10
|
+
MANUAL: "MANUAL";
|
|
11
|
+
}>>;
|
|
8
12
|
symbol: z.ZodString;
|
|
9
13
|
leverage: z.ZodInt;
|
|
10
14
|
marginMode: z.ZodOptional<z.ZodEnum<{
|
|
@@ -12,4 +16,5 @@ export declare const SetLeverage: z.ZodObject<{
|
|
|
12
16
|
cross: "cross";
|
|
13
17
|
}>>;
|
|
14
18
|
}, z.core.$strip>;
|
|
15
|
-
export type
|
|
19
|
+
export type SetLeverageInput = z.input<typeof SetLeverage>;
|
|
20
|
+
export type SetLeverage = z.output<typeof SetLeverage>;
|
|
@@ -2,13 +2,21 @@ import { z } from 'zod';
|
|
|
2
2
|
/**
|
|
3
3
|
* What happened. The `*_HIT` categories mean the trigger fired and its order
|
|
4
4
|
* filled; the `*_FAILED` categories mean it fired but the order failed to
|
|
5
|
-
* execute; `
|
|
5
|
+
* execute; the `*_PARTIAL` categories mean a fired close left part of the
|
|
6
|
+
* position open, and `parameters.triggerActive` says whether the trigger stays
|
|
7
|
+
* armed on the remainder; `ATTACHED_TRIGGER_DISCARDED` means requested close protection could
|
|
6
8
|
* not be placed after a position opened; the `AUTO_REBALANCE_*` categories cover
|
|
7
9
|
* an auto-rebalance config acting on, or stopping itself over, the position it
|
|
8
10
|
* watches; the `TRIGGER_TWAP_*` categories describe a fired trigger starting,
|
|
9
11
|
* skipping, failing, or cancelling its TWAP; `TRIGGER_CANCELLED_MIS_SCALED`
|
|
10
|
-
* means the remediation sweep cancelled an unreachable stop loss
|
|
11
|
-
*
|
|
12
|
+
* means the remediation sweep cancelled an unreachable stop loss;
|
|
13
|
+
* `TRIGGER_CANCELLED_POSITION_RESIZED` means a size-dependent close trigger was
|
|
14
|
+
* cancelled because the position was partially closed and the trigger's threshold
|
|
15
|
+
* is no longer valid against the new position size. The `*_BY_OPERATOR`
|
|
16
|
+
* categories mean the Pear team cancelled a trigger or ladder, or stopped an
|
|
17
|
+
* auto-rebalance config, in an operator intervention (for example during an
|
|
18
|
+
* incident); workflows never emit them. Outcome lives here in the
|
|
19
|
+
* category; display details live in the `parameters` payload below.
|
|
12
20
|
*/
|
|
13
21
|
export declare const NotificationCategory: z.ZodEnum<{
|
|
14
22
|
TAKE_PROFIT_HIT: "TAKE_PROFIT_HIT";
|
|
@@ -31,6 +39,13 @@ export declare const NotificationCategory: z.ZodEnum<{
|
|
|
31
39
|
COPY_SUBSCRIPTION_STOPPED: "COPY_SUBSCRIPTION_STOPPED";
|
|
32
40
|
COPY_LEVERAGE_NOT_APPLIED: "COPY_LEVERAGE_NOT_APPLIED";
|
|
33
41
|
POSITION_LIQUIDATION: "POSITION_LIQUIDATION";
|
|
42
|
+
TRIGGER_CANCELLED_POSITION_RESIZED: "TRIGGER_CANCELLED_POSITION_RESIZED";
|
|
43
|
+
TAKE_PROFIT_PARTIAL: "TAKE_PROFIT_PARTIAL";
|
|
44
|
+
STOP_LOSS_PARTIAL: "STOP_LOSS_PARTIAL";
|
|
45
|
+
TRIGGER_ORDER_PARTIAL: "TRIGGER_ORDER_PARTIAL";
|
|
46
|
+
TRIGGER_CANCELLED_BY_OPERATOR: "TRIGGER_CANCELLED_BY_OPERATOR";
|
|
47
|
+
LADDER_CANCELLED_BY_OPERATOR: "LADDER_CANCELLED_BY_OPERATOR";
|
|
48
|
+
AUTO_REBALANCE_STOPPED_BY_OPERATOR: "AUTO_REBALANCE_STOPPED_BY_OPERATOR";
|
|
34
49
|
}>;
|
|
35
50
|
export type NotificationCategory = z.infer<typeof NotificationCategory>;
|
|
36
51
|
export declare const NotificationMetric: z.ZodEnum<{
|
|
@@ -111,6 +126,7 @@ export declare const NotificationParameters: z.ZodDiscriminatedUnion<[z.ZodObjec
|
|
|
111
126
|
}>>;
|
|
112
127
|
level: z.ZodOptional<z.ZodNumber>;
|
|
113
128
|
reason: z.ZodOptional<z.ZodString>;
|
|
129
|
+
triggerActive: z.ZodOptional<z.ZodBoolean>;
|
|
114
130
|
type: z.ZodLiteral<"take_profit">;
|
|
115
131
|
triggerId: z.ZodUUID;
|
|
116
132
|
positionId: z.ZodUUID;
|
|
@@ -154,6 +170,7 @@ export declare const NotificationParameters: z.ZodDiscriminatedUnion<[z.ZodObjec
|
|
|
154
170
|
}>>;
|
|
155
171
|
level: z.ZodOptional<z.ZodNumber>;
|
|
156
172
|
reason: z.ZodOptional<z.ZodString>;
|
|
173
|
+
triggerActive: z.ZodOptional<z.ZodBoolean>;
|
|
157
174
|
type: z.ZodLiteral<"stop_loss">;
|
|
158
175
|
triggerId: z.ZodUUID;
|
|
159
176
|
positionId: z.ZodUUID;
|
|
@@ -193,6 +210,7 @@ export declare const NotificationParameters: z.ZodDiscriminatedUnion<[z.ZodObjec
|
|
|
193
210
|
}>>;
|
|
194
211
|
level: z.ZodOptional<z.ZodNumber>;
|
|
195
212
|
reason: z.ZodOptional<z.ZodString>;
|
|
213
|
+
triggerActive: z.ZodOptional<z.ZodBoolean>;
|
|
196
214
|
type: z.ZodLiteral<"trigger_order">;
|
|
197
215
|
triggerId: z.ZodUUID;
|
|
198
216
|
positionId: z.ZodUUID;
|
|
@@ -232,6 +250,7 @@ export declare const NotificationParameters: z.ZodDiscriminatedUnion<[z.ZodObjec
|
|
|
232
250
|
}>>;
|
|
233
251
|
level: z.ZodOptional<z.ZodNumber>;
|
|
234
252
|
reason: z.ZodOptional<z.ZodString>;
|
|
253
|
+
triggerActive: z.ZodOptional<z.ZodBoolean>;
|
|
235
254
|
type: z.ZodLiteral<"default_trigger">;
|
|
236
255
|
triggerId: z.ZodUUID;
|
|
237
256
|
connector: z.ZodEnum<{
|
|
@@ -475,10 +494,13 @@ export declare const NotificationParameters: z.ZodDiscriminatedUnion<[z.ZodObjec
|
|
|
475
494
|
type: z.ZodLiteral<"copy_placed">;
|
|
476
495
|
subscriptionId: z.ZodUUID;
|
|
477
496
|
activityId: z.ZodUUID;
|
|
478
|
-
resource: z.ZodObject<{
|
|
497
|
+
resource: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
479
498
|
kind: z.ZodLiteral<"POSITION">;
|
|
480
499
|
id: z.ZodUUID;
|
|
481
|
-
}, z.core.$strip
|
|
500
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
501
|
+
kind: z.ZodLiteral<"SCHEDULE">;
|
|
502
|
+
id: z.ZodUUID;
|
|
503
|
+
}, z.core.$strip>], "kind">;
|
|
482
504
|
leaderTradeAccountId: z.ZodUUID;
|
|
483
505
|
}, z.core.$strip>, z.ZodObject<{
|
|
484
506
|
type: z.ZodLiteral<"copy_failed">;
|
|
@@ -498,6 +520,89 @@ export declare const NotificationParameters: z.ZodDiscriminatedUnion<[z.ZodObjec
|
|
|
498
520
|
type: z.ZodLiteral<"copy_leverage_not_applied">;
|
|
499
521
|
subscriptionId: z.ZodUUID;
|
|
500
522
|
activityId: z.ZodUUID;
|
|
523
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
524
|
+
type: z.ZodLiteral<"trigger_cancelled_position_resized">;
|
|
525
|
+
triggerId: z.ZodUUID;
|
|
526
|
+
positionId: z.ZodUUID;
|
|
527
|
+
connector: z.ZodEnum<{
|
|
528
|
+
hyperliquid: "hyperliquid";
|
|
529
|
+
binance: "binance";
|
|
530
|
+
bybit: "bybit";
|
|
531
|
+
okx: "okx";
|
|
532
|
+
lighter: "lighter";
|
|
533
|
+
lighter_rhc: "lighter_rhc";
|
|
534
|
+
}>;
|
|
535
|
+
metric: z.ZodEnum<{
|
|
536
|
+
notional: "notional";
|
|
537
|
+
upnl: "upnl";
|
|
538
|
+
notional_trailing: "notional_trailing";
|
|
539
|
+
upnl_trailing: "upnl_trailing";
|
|
540
|
+
}>;
|
|
541
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
542
|
+
legs: z.ZodArray<z.ZodObject<{
|
|
543
|
+
id: z.ZodString;
|
|
544
|
+
symbol: z.ZodString;
|
|
545
|
+
side: z.ZodEnum<{
|
|
546
|
+
BUY: "BUY";
|
|
547
|
+
SELL: "SELL";
|
|
548
|
+
}>;
|
|
549
|
+
}, z.core.$strip>>;
|
|
550
|
+
type: z.ZodLiteral<"trigger_cancelled_by_operator">;
|
|
551
|
+
triggerId: z.ZodUUID;
|
|
552
|
+
connector: z.ZodEnum<{
|
|
553
|
+
hyperliquid: "hyperliquid";
|
|
554
|
+
binance: "binance";
|
|
555
|
+
bybit: "bybit";
|
|
556
|
+
okx: "okx";
|
|
557
|
+
lighter: "lighter";
|
|
558
|
+
lighter_rhc: "lighter_rhc";
|
|
559
|
+
}>;
|
|
560
|
+
positionId: z.ZodOptional<z.ZodUUID>;
|
|
561
|
+
semanticBracketType: z.ZodEnum<{
|
|
562
|
+
NONE: "NONE";
|
|
563
|
+
STOP_LOSS: "STOP_LOSS";
|
|
564
|
+
TAKE_PROFIT: "TAKE_PROFIT";
|
|
565
|
+
}>;
|
|
566
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
567
|
+
legs: z.ZodArray<z.ZodObject<{
|
|
568
|
+
id: z.ZodString;
|
|
569
|
+
symbol: z.ZodString;
|
|
570
|
+
side: z.ZodEnum<{
|
|
571
|
+
BUY: "BUY";
|
|
572
|
+
SELL: "SELL";
|
|
573
|
+
}>;
|
|
574
|
+
}, z.core.$strip>>;
|
|
575
|
+
type: z.ZodLiteral<"ladder_cancelled_by_operator">;
|
|
576
|
+
ladderId: z.ZodUUID;
|
|
577
|
+
connector: z.ZodEnum<{
|
|
578
|
+
hyperliquid: "hyperliquid";
|
|
579
|
+
binance: "binance";
|
|
580
|
+
bybit: "bybit";
|
|
581
|
+
okx: "okx";
|
|
582
|
+
lighter: "lighter";
|
|
583
|
+
lighter_rhc: "lighter_rhc";
|
|
584
|
+
}>;
|
|
585
|
+
positionId: z.ZodOptional<z.ZodUUID>;
|
|
586
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
587
|
+
legs: z.ZodArray<z.ZodObject<{
|
|
588
|
+
id: z.ZodString;
|
|
589
|
+
symbol: z.ZodString;
|
|
590
|
+
side: z.ZodEnum<{
|
|
591
|
+
BUY: "BUY";
|
|
592
|
+
SELL: "SELL";
|
|
593
|
+
}>;
|
|
594
|
+
}, z.core.$strip>>;
|
|
595
|
+
type: z.ZodLiteral<"auto_rebalance_stopped_by_operator">;
|
|
596
|
+
configId: z.ZodUUID;
|
|
597
|
+
positionId: z.ZodUUID;
|
|
598
|
+
connector: z.ZodEnum<{
|
|
599
|
+
hyperliquid: "hyperliquid";
|
|
600
|
+
binance: "binance";
|
|
601
|
+
bybit: "bybit";
|
|
602
|
+
okx: "okx";
|
|
603
|
+
lighter: "lighter";
|
|
604
|
+
lighter_rhc: "lighter_rhc";
|
|
605
|
+
}>;
|
|
501
606
|
}, z.core.$strip>], "type">;
|
|
502
607
|
export type NotificationParameters = z.output<typeof NotificationParameters>;
|
|
503
608
|
export declare const Notification: z.ZodObject<{
|
|
@@ -523,6 +628,13 @@ export declare const Notification: z.ZodObject<{
|
|
|
523
628
|
COPY_SUBSCRIPTION_STOPPED: "COPY_SUBSCRIPTION_STOPPED";
|
|
524
629
|
COPY_LEVERAGE_NOT_APPLIED: "COPY_LEVERAGE_NOT_APPLIED";
|
|
525
630
|
POSITION_LIQUIDATION: "POSITION_LIQUIDATION";
|
|
631
|
+
TRIGGER_CANCELLED_POSITION_RESIZED: "TRIGGER_CANCELLED_POSITION_RESIZED";
|
|
632
|
+
TAKE_PROFIT_PARTIAL: "TAKE_PROFIT_PARTIAL";
|
|
633
|
+
STOP_LOSS_PARTIAL: "STOP_LOSS_PARTIAL";
|
|
634
|
+
TRIGGER_ORDER_PARTIAL: "TRIGGER_ORDER_PARTIAL";
|
|
635
|
+
TRIGGER_CANCELLED_BY_OPERATOR: "TRIGGER_CANCELLED_BY_OPERATOR";
|
|
636
|
+
LADDER_CANCELLED_BY_OPERATOR: "LADDER_CANCELLED_BY_OPERATOR";
|
|
637
|
+
AUTO_REBALANCE_STOPPED_BY_OPERATOR: "AUTO_REBALANCE_STOPPED_BY_OPERATOR";
|
|
526
638
|
}>;
|
|
527
639
|
parameters: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
528
640
|
type: z.ZodLiteral<"position_liquidation">;
|
|
@@ -584,6 +696,7 @@ export declare const Notification: z.ZodObject<{
|
|
|
584
696
|
}>>;
|
|
585
697
|
level: z.ZodOptional<z.ZodNumber>;
|
|
586
698
|
reason: z.ZodOptional<z.ZodString>;
|
|
699
|
+
triggerActive: z.ZodOptional<z.ZodBoolean>;
|
|
587
700
|
type: z.ZodLiteral<"take_profit">;
|
|
588
701
|
triggerId: z.ZodUUID;
|
|
589
702
|
positionId: z.ZodUUID;
|
|
@@ -627,6 +740,7 @@ export declare const Notification: z.ZodObject<{
|
|
|
627
740
|
}>>;
|
|
628
741
|
level: z.ZodOptional<z.ZodNumber>;
|
|
629
742
|
reason: z.ZodOptional<z.ZodString>;
|
|
743
|
+
triggerActive: z.ZodOptional<z.ZodBoolean>;
|
|
630
744
|
type: z.ZodLiteral<"stop_loss">;
|
|
631
745
|
triggerId: z.ZodUUID;
|
|
632
746
|
positionId: z.ZodUUID;
|
|
@@ -666,6 +780,7 @@ export declare const Notification: z.ZodObject<{
|
|
|
666
780
|
}>>;
|
|
667
781
|
level: z.ZodOptional<z.ZodNumber>;
|
|
668
782
|
reason: z.ZodOptional<z.ZodString>;
|
|
783
|
+
triggerActive: z.ZodOptional<z.ZodBoolean>;
|
|
669
784
|
type: z.ZodLiteral<"trigger_order">;
|
|
670
785
|
triggerId: z.ZodUUID;
|
|
671
786
|
positionId: z.ZodUUID;
|
|
@@ -705,6 +820,7 @@ export declare const Notification: z.ZodObject<{
|
|
|
705
820
|
}>>;
|
|
706
821
|
level: z.ZodOptional<z.ZodNumber>;
|
|
707
822
|
reason: z.ZodOptional<z.ZodString>;
|
|
823
|
+
triggerActive: z.ZodOptional<z.ZodBoolean>;
|
|
708
824
|
type: z.ZodLiteral<"default_trigger">;
|
|
709
825
|
triggerId: z.ZodUUID;
|
|
710
826
|
connector: z.ZodEnum<{
|
|
@@ -948,10 +1064,13 @@ export declare const Notification: z.ZodObject<{
|
|
|
948
1064
|
type: z.ZodLiteral<"copy_placed">;
|
|
949
1065
|
subscriptionId: z.ZodUUID;
|
|
950
1066
|
activityId: z.ZodUUID;
|
|
951
|
-
resource: z.ZodObject<{
|
|
1067
|
+
resource: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
952
1068
|
kind: z.ZodLiteral<"POSITION">;
|
|
953
1069
|
id: z.ZodUUID;
|
|
954
|
-
}, z.core.$strip
|
|
1070
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1071
|
+
kind: z.ZodLiteral<"SCHEDULE">;
|
|
1072
|
+
id: z.ZodUUID;
|
|
1073
|
+
}, z.core.$strip>], "kind">;
|
|
955
1074
|
leaderTradeAccountId: z.ZodUUID;
|
|
956
1075
|
}, z.core.$strip>, z.ZodObject<{
|
|
957
1076
|
type: z.ZodLiteral<"copy_failed">;
|
|
@@ -971,6 +1090,89 @@ export declare const Notification: z.ZodObject<{
|
|
|
971
1090
|
type: z.ZodLiteral<"copy_leverage_not_applied">;
|
|
972
1091
|
subscriptionId: z.ZodUUID;
|
|
973
1092
|
activityId: z.ZodUUID;
|
|
1093
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1094
|
+
type: z.ZodLiteral<"trigger_cancelled_position_resized">;
|
|
1095
|
+
triggerId: z.ZodUUID;
|
|
1096
|
+
positionId: z.ZodUUID;
|
|
1097
|
+
connector: z.ZodEnum<{
|
|
1098
|
+
hyperliquid: "hyperliquid";
|
|
1099
|
+
binance: "binance";
|
|
1100
|
+
bybit: "bybit";
|
|
1101
|
+
okx: "okx";
|
|
1102
|
+
lighter: "lighter";
|
|
1103
|
+
lighter_rhc: "lighter_rhc";
|
|
1104
|
+
}>;
|
|
1105
|
+
metric: z.ZodEnum<{
|
|
1106
|
+
notional: "notional";
|
|
1107
|
+
upnl: "upnl";
|
|
1108
|
+
notional_trailing: "notional_trailing";
|
|
1109
|
+
upnl_trailing: "upnl_trailing";
|
|
1110
|
+
}>;
|
|
1111
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1112
|
+
legs: z.ZodArray<z.ZodObject<{
|
|
1113
|
+
id: z.ZodString;
|
|
1114
|
+
symbol: z.ZodString;
|
|
1115
|
+
side: z.ZodEnum<{
|
|
1116
|
+
BUY: "BUY";
|
|
1117
|
+
SELL: "SELL";
|
|
1118
|
+
}>;
|
|
1119
|
+
}, z.core.$strip>>;
|
|
1120
|
+
type: z.ZodLiteral<"trigger_cancelled_by_operator">;
|
|
1121
|
+
triggerId: z.ZodUUID;
|
|
1122
|
+
connector: z.ZodEnum<{
|
|
1123
|
+
hyperliquid: "hyperliquid";
|
|
1124
|
+
binance: "binance";
|
|
1125
|
+
bybit: "bybit";
|
|
1126
|
+
okx: "okx";
|
|
1127
|
+
lighter: "lighter";
|
|
1128
|
+
lighter_rhc: "lighter_rhc";
|
|
1129
|
+
}>;
|
|
1130
|
+
positionId: z.ZodOptional<z.ZodUUID>;
|
|
1131
|
+
semanticBracketType: z.ZodEnum<{
|
|
1132
|
+
NONE: "NONE";
|
|
1133
|
+
STOP_LOSS: "STOP_LOSS";
|
|
1134
|
+
TAKE_PROFIT: "TAKE_PROFIT";
|
|
1135
|
+
}>;
|
|
1136
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1137
|
+
legs: z.ZodArray<z.ZodObject<{
|
|
1138
|
+
id: z.ZodString;
|
|
1139
|
+
symbol: z.ZodString;
|
|
1140
|
+
side: z.ZodEnum<{
|
|
1141
|
+
BUY: "BUY";
|
|
1142
|
+
SELL: "SELL";
|
|
1143
|
+
}>;
|
|
1144
|
+
}, z.core.$strip>>;
|
|
1145
|
+
type: z.ZodLiteral<"ladder_cancelled_by_operator">;
|
|
1146
|
+
ladderId: z.ZodUUID;
|
|
1147
|
+
connector: z.ZodEnum<{
|
|
1148
|
+
hyperliquid: "hyperliquid";
|
|
1149
|
+
binance: "binance";
|
|
1150
|
+
bybit: "bybit";
|
|
1151
|
+
okx: "okx";
|
|
1152
|
+
lighter: "lighter";
|
|
1153
|
+
lighter_rhc: "lighter_rhc";
|
|
1154
|
+
}>;
|
|
1155
|
+
positionId: z.ZodOptional<z.ZodUUID>;
|
|
1156
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1157
|
+
legs: z.ZodArray<z.ZodObject<{
|
|
1158
|
+
id: z.ZodString;
|
|
1159
|
+
symbol: z.ZodString;
|
|
1160
|
+
side: z.ZodEnum<{
|
|
1161
|
+
BUY: "BUY";
|
|
1162
|
+
SELL: "SELL";
|
|
1163
|
+
}>;
|
|
1164
|
+
}, z.core.$strip>>;
|
|
1165
|
+
type: z.ZodLiteral<"auto_rebalance_stopped_by_operator">;
|
|
1166
|
+
configId: z.ZodUUID;
|
|
1167
|
+
positionId: z.ZodUUID;
|
|
1168
|
+
connector: z.ZodEnum<{
|
|
1169
|
+
hyperliquid: "hyperliquid";
|
|
1170
|
+
binance: "binance";
|
|
1171
|
+
bybit: "bybit";
|
|
1172
|
+
okx: "okx";
|
|
1173
|
+
lighter: "lighter";
|
|
1174
|
+
lighter_rhc: "lighter_rhc";
|
|
1175
|
+
}>;
|
|
974
1176
|
}, z.core.$strip>], "type">;
|
|
975
1177
|
isRead: z.ZodBoolean;
|
|
976
1178
|
createdAt: z.ZodString;
|
|
@@ -23,6 +23,13 @@ export declare const NotificationListResponse: z.ZodObject<{
|
|
|
23
23
|
COPY_SUBSCRIPTION_STOPPED: "COPY_SUBSCRIPTION_STOPPED";
|
|
24
24
|
COPY_LEVERAGE_NOT_APPLIED: "COPY_LEVERAGE_NOT_APPLIED";
|
|
25
25
|
POSITION_LIQUIDATION: "POSITION_LIQUIDATION";
|
|
26
|
+
TRIGGER_CANCELLED_POSITION_RESIZED: "TRIGGER_CANCELLED_POSITION_RESIZED";
|
|
27
|
+
TAKE_PROFIT_PARTIAL: "TAKE_PROFIT_PARTIAL";
|
|
28
|
+
STOP_LOSS_PARTIAL: "STOP_LOSS_PARTIAL";
|
|
29
|
+
TRIGGER_ORDER_PARTIAL: "TRIGGER_ORDER_PARTIAL";
|
|
30
|
+
TRIGGER_CANCELLED_BY_OPERATOR: "TRIGGER_CANCELLED_BY_OPERATOR";
|
|
31
|
+
LADDER_CANCELLED_BY_OPERATOR: "LADDER_CANCELLED_BY_OPERATOR";
|
|
32
|
+
AUTO_REBALANCE_STOPPED_BY_OPERATOR: "AUTO_REBALANCE_STOPPED_BY_OPERATOR";
|
|
26
33
|
}>;
|
|
27
34
|
parameters: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
28
35
|
type: z.ZodLiteral<"position_liquidation">;
|
|
@@ -84,6 +91,7 @@ export declare const NotificationListResponse: z.ZodObject<{
|
|
|
84
91
|
}>>;
|
|
85
92
|
level: z.ZodOptional<z.ZodNumber>;
|
|
86
93
|
reason: z.ZodOptional<z.ZodString>;
|
|
94
|
+
triggerActive: z.ZodOptional<z.ZodBoolean>;
|
|
87
95
|
type: z.ZodLiteral<"take_profit">;
|
|
88
96
|
triggerId: z.ZodUUID;
|
|
89
97
|
positionId: z.ZodUUID;
|
|
@@ -127,6 +135,7 @@ export declare const NotificationListResponse: z.ZodObject<{
|
|
|
127
135
|
}>>;
|
|
128
136
|
level: z.ZodOptional<z.ZodNumber>;
|
|
129
137
|
reason: z.ZodOptional<z.ZodString>;
|
|
138
|
+
triggerActive: z.ZodOptional<z.ZodBoolean>;
|
|
130
139
|
type: z.ZodLiteral<"stop_loss">;
|
|
131
140
|
triggerId: z.ZodUUID;
|
|
132
141
|
positionId: z.ZodUUID;
|
|
@@ -166,6 +175,7 @@ export declare const NotificationListResponse: z.ZodObject<{
|
|
|
166
175
|
}>>;
|
|
167
176
|
level: z.ZodOptional<z.ZodNumber>;
|
|
168
177
|
reason: z.ZodOptional<z.ZodString>;
|
|
178
|
+
triggerActive: z.ZodOptional<z.ZodBoolean>;
|
|
169
179
|
type: z.ZodLiteral<"trigger_order">;
|
|
170
180
|
triggerId: z.ZodUUID;
|
|
171
181
|
positionId: z.ZodUUID;
|
|
@@ -205,6 +215,7 @@ export declare const NotificationListResponse: z.ZodObject<{
|
|
|
205
215
|
}>>;
|
|
206
216
|
level: z.ZodOptional<z.ZodNumber>;
|
|
207
217
|
reason: z.ZodOptional<z.ZodString>;
|
|
218
|
+
triggerActive: z.ZodOptional<z.ZodBoolean>;
|
|
208
219
|
type: z.ZodLiteral<"default_trigger">;
|
|
209
220
|
triggerId: z.ZodUUID;
|
|
210
221
|
connector: z.ZodEnum<{
|
|
@@ -448,10 +459,13 @@ export declare const NotificationListResponse: z.ZodObject<{
|
|
|
448
459
|
type: z.ZodLiteral<"copy_placed">;
|
|
449
460
|
subscriptionId: z.ZodUUID;
|
|
450
461
|
activityId: z.ZodUUID;
|
|
451
|
-
resource: z.ZodObject<{
|
|
462
|
+
resource: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
452
463
|
kind: z.ZodLiteral<"POSITION">;
|
|
453
464
|
id: z.ZodUUID;
|
|
454
|
-
}, z.core.$strip
|
|
465
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
466
|
+
kind: z.ZodLiteral<"SCHEDULE">;
|
|
467
|
+
id: z.ZodUUID;
|
|
468
|
+
}, z.core.$strip>], "kind">;
|
|
455
469
|
leaderTradeAccountId: z.ZodUUID;
|
|
456
470
|
}, z.core.$strip>, z.ZodObject<{
|
|
457
471
|
type: z.ZodLiteral<"copy_failed">;
|
|
@@ -471,6 +485,89 @@ export declare const NotificationListResponse: z.ZodObject<{
|
|
|
471
485
|
type: z.ZodLiteral<"copy_leverage_not_applied">;
|
|
472
486
|
subscriptionId: z.ZodUUID;
|
|
473
487
|
activityId: z.ZodUUID;
|
|
488
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
489
|
+
type: z.ZodLiteral<"trigger_cancelled_position_resized">;
|
|
490
|
+
triggerId: z.ZodUUID;
|
|
491
|
+
positionId: z.ZodUUID;
|
|
492
|
+
connector: z.ZodEnum<{
|
|
493
|
+
hyperliquid: "hyperliquid";
|
|
494
|
+
binance: "binance";
|
|
495
|
+
bybit: "bybit";
|
|
496
|
+
okx: "okx";
|
|
497
|
+
lighter: "lighter";
|
|
498
|
+
lighter_rhc: "lighter_rhc";
|
|
499
|
+
}>;
|
|
500
|
+
metric: z.ZodEnum<{
|
|
501
|
+
notional: "notional";
|
|
502
|
+
upnl: "upnl";
|
|
503
|
+
notional_trailing: "notional_trailing";
|
|
504
|
+
upnl_trailing: "upnl_trailing";
|
|
505
|
+
}>;
|
|
506
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
507
|
+
legs: z.ZodArray<z.ZodObject<{
|
|
508
|
+
id: z.ZodString;
|
|
509
|
+
symbol: z.ZodString;
|
|
510
|
+
side: z.ZodEnum<{
|
|
511
|
+
BUY: "BUY";
|
|
512
|
+
SELL: "SELL";
|
|
513
|
+
}>;
|
|
514
|
+
}, z.core.$strip>>;
|
|
515
|
+
type: z.ZodLiteral<"trigger_cancelled_by_operator">;
|
|
516
|
+
triggerId: z.ZodUUID;
|
|
517
|
+
connector: z.ZodEnum<{
|
|
518
|
+
hyperliquid: "hyperliquid";
|
|
519
|
+
binance: "binance";
|
|
520
|
+
bybit: "bybit";
|
|
521
|
+
okx: "okx";
|
|
522
|
+
lighter: "lighter";
|
|
523
|
+
lighter_rhc: "lighter_rhc";
|
|
524
|
+
}>;
|
|
525
|
+
positionId: z.ZodOptional<z.ZodUUID>;
|
|
526
|
+
semanticBracketType: z.ZodEnum<{
|
|
527
|
+
NONE: "NONE";
|
|
528
|
+
STOP_LOSS: "STOP_LOSS";
|
|
529
|
+
TAKE_PROFIT: "TAKE_PROFIT";
|
|
530
|
+
}>;
|
|
531
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
532
|
+
legs: z.ZodArray<z.ZodObject<{
|
|
533
|
+
id: z.ZodString;
|
|
534
|
+
symbol: z.ZodString;
|
|
535
|
+
side: z.ZodEnum<{
|
|
536
|
+
BUY: "BUY";
|
|
537
|
+
SELL: "SELL";
|
|
538
|
+
}>;
|
|
539
|
+
}, z.core.$strip>>;
|
|
540
|
+
type: z.ZodLiteral<"ladder_cancelled_by_operator">;
|
|
541
|
+
ladderId: z.ZodUUID;
|
|
542
|
+
connector: z.ZodEnum<{
|
|
543
|
+
hyperliquid: "hyperliquid";
|
|
544
|
+
binance: "binance";
|
|
545
|
+
bybit: "bybit";
|
|
546
|
+
okx: "okx";
|
|
547
|
+
lighter: "lighter";
|
|
548
|
+
lighter_rhc: "lighter_rhc";
|
|
549
|
+
}>;
|
|
550
|
+
positionId: z.ZodOptional<z.ZodUUID>;
|
|
551
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
552
|
+
legs: z.ZodArray<z.ZodObject<{
|
|
553
|
+
id: z.ZodString;
|
|
554
|
+
symbol: z.ZodString;
|
|
555
|
+
side: z.ZodEnum<{
|
|
556
|
+
BUY: "BUY";
|
|
557
|
+
SELL: "SELL";
|
|
558
|
+
}>;
|
|
559
|
+
}, z.core.$strip>>;
|
|
560
|
+
type: z.ZodLiteral<"auto_rebalance_stopped_by_operator">;
|
|
561
|
+
configId: z.ZodUUID;
|
|
562
|
+
positionId: z.ZodUUID;
|
|
563
|
+
connector: z.ZodEnum<{
|
|
564
|
+
hyperliquid: "hyperliquid";
|
|
565
|
+
binance: "binance";
|
|
566
|
+
bybit: "bybit";
|
|
567
|
+
okx: "okx";
|
|
568
|
+
lighter: "lighter";
|
|
569
|
+
lighter_rhc: "lighter_rhc";
|
|
570
|
+
}>;
|
|
474
571
|
}, z.core.$strip>], "type">;
|
|
475
572
|
isRead: z.ZodBoolean;
|
|
476
573
|
createdAt: z.ZodString;
|
package/dist/order/entities.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export declare const OrderStatus: z.ZodEnum<{
|
|
3
|
+
CANCELLED: "CANCELLED";
|
|
3
4
|
PENDING: "PENDING";
|
|
4
5
|
PARTIAL: "PARTIAL";
|
|
5
6
|
FILLED: "FILLED";
|
|
6
|
-
CANCELLED: "CANCELLED";
|
|
7
7
|
REJECTED: "REJECTED";
|
|
8
8
|
}>;
|
|
9
9
|
export type OrderStatus = z.infer<typeof OrderStatus>;
|
|
@@ -18,10 +18,10 @@ export declare const MarketOrder: z.ZodObject<{
|
|
|
18
18
|
lighter_rhc: "lighter_rhc";
|
|
19
19
|
}>;
|
|
20
20
|
status: z.ZodEnum<{
|
|
21
|
+
CANCELLED: "CANCELLED";
|
|
21
22
|
PENDING: "PENDING";
|
|
22
23
|
PARTIAL: "PARTIAL";
|
|
23
24
|
FILLED: "FILLED";
|
|
24
|
-
CANCELLED: "CANCELLED";
|
|
25
25
|
REJECTED: "REJECTED";
|
|
26
26
|
}>;
|
|
27
27
|
error: z.ZodOptional<z.ZodString>;
|
|
@@ -51,10 +51,10 @@ export declare const Order: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
51
51
|
lighter_rhc: "lighter_rhc";
|
|
52
52
|
}>;
|
|
53
53
|
status: z.ZodEnum<{
|
|
54
|
+
CANCELLED: "CANCELLED";
|
|
54
55
|
PENDING: "PENDING";
|
|
55
56
|
PARTIAL: "PARTIAL";
|
|
56
57
|
FILLED: "FILLED";
|
|
57
|
-
CANCELLED: "CANCELLED";
|
|
58
58
|
REJECTED: "REJECTED";
|
|
59
59
|
}>;
|
|
60
60
|
error: z.ZodOptional<z.ZodString>;
|
|
@@ -5,9 +5,9 @@ export declare const PositionStatus: z.ZodEnum<{
|
|
|
5
5
|
}>;
|
|
6
6
|
export type PositionStatus = z.infer<typeof PositionStatus>;
|
|
7
7
|
export declare const PositionClosedReason: z.ZodEnum<{
|
|
8
|
-
NETTED: "NETTED";
|
|
9
8
|
USER: "USER";
|
|
10
9
|
LIQUIDATED: "LIQUIDATED";
|
|
10
|
+
NETTED: "NETTED";
|
|
11
11
|
}>;
|
|
12
12
|
export type PositionClosedReason = z.infer<typeof PositionClosedReason>;
|
|
13
13
|
/**
|
|
@@ -74,9 +74,9 @@ export declare const Position: z.ZodObject<{
|
|
|
74
74
|
CLOSED: "CLOSED";
|
|
75
75
|
}>;
|
|
76
76
|
closedReason: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
77
|
-
NETTED: "NETTED";
|
|
78
77
|
USER: "USER";
|
|
79
78
|
LIQUIDATED: "LIQUIDATED";
|
|
79
|
+
NETTED: "NETTED";
|
|
80
80
|
}>>>;
|
|
81
81
|
origin: z.ZodEnum<{
|
|
82
82
|
PARTIAL: "PARTIAL";
|
|
@@ -242,9 +242,9 @@ export declare const ClosedPosition: z.ZodObject<{
|
|
|
242
242
|
openedAt: z.ZodString;
|
|
243
243
|
closedAt: z.ZodString;
|
|
244
244
|
closedReason: z.ZodOptional<z.ZodEnum<{
|
|
245
|
-
NETTED: "NETTED";
|
|
246
245
|
USER: "USER";
|
|
247
246
|
LIQUIDATED: "LIQUIDATED";
|
|
247
|
+
NETTED: "NETTED";
|
|
248
248
|
}>>;
|
|
249
249
|
origin: z.ZodEnum<{
|
|
250
250
|
PARTIAL: "PARTIAL";
|
|
@@ -568,12 +568,12 @@ export declare const VaultClosedPosition: z.ZodObject<{
|
|
|
568
568
|
lighter: "lighter";
|
|
569
569
|
lighter_rhc: "lighter_rhc";
|
|
570
570
|
}>;
|
|
571
|
-
netPnl: z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>;
|
|
572
571
|
positionId: z.ZodUUID;
|
|
572
|
+
netPnl: z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>;
|
|
573
573
|
closedReason: z.ZodOptional<z.ZodEnum<{
|
|
574
|
-
NETTED: "NETTED";
|
|
575
574
|
USER: "USER";
|
|
576
575
|
LIQUIDATED: "LIQUIDATED";
|
|
576
|
+
NETTED: "NETTED";
|
|
577
577
|
}>>;
|
|
578
578
|
closedAt: z.ZodString;
|
|
579
579
|
grossPnl: z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>;
|
|
@@ -19,9 +19,9 @@ export declare const PositionListResponse: z.ZodObject<{
|
|
|
19
19
|
CLOSED: "CLOSED";
|
|
20
20
|
}>;
|
|
21
21
|
closedReason: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
22
|
-
NETTED: "NETTED";
|
|
23
22
|
USER: "USER";
|
|
24
23
|
LIQUIDATED: "LIQUIDATED";
|
|
24
|
+
NETTED: "NETTED";
|
|
25
25
|
}>>>;
|
|
26
26
|
origin: z.ZodEnum<{
|
|
27
27
|
PARTIAL: "PARTIAL";
|
|
@@ -112,9 +112,9 @@ export declare const ClosedPositionListResponse: z.ZodObject<{
|
|
|
112
112
|
openedAt: z.ZodString;
|
|
113
113
|
closedAt: z.ZodString;
|
|
114
114
|
closedReason: z.ZodOptional<z.ZodEnum<{
|
|
115
|
-
NETTED: "NETTED";
|
|
116
115
|
USER: "USER";
|
|
117
116
|
LIQUIDATED: "LIQUIDATED";
|
|
117
|
+
NETTED: "NETTED";
|
|
118
118
|
}>>;
|
|
119
119
|
origin: z.ZodEnum<{
|
|
120
120
|
PARTIAL: "PARTIAL";
|
|
@@ -373,12 +373,12 @@ export declare const VaultClosedPositionListResponse: z.ZodObject<{
|
|
|
373
373
|
lighter: "lighter";
|
|
374
374
|
lighter_rhc: "lighter_rhc";
|
|
375
375
|
}>;
|
|
376
|
-
netPnl: z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>;
|
|
377
376
|
positionId: z.ZodUUID;
|
|
377
|
+
netPnl: z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>;
|
|
378
378
|
closedReason: z.ZodOptional<z.ZodEnum<{
|
|
379
|
-
NETTED: "NETTED";
|
|
380
379
|
USER: "USER";
|
|
381
380
|
LIQUIDATED: "LIQUIDATED";
|
|
381
|
+
NETTED: "NETTED";
|
|
382
382
|
}>>;
|
|
383
383
|
closedAt: z.ZodString;
|
|
384
384
|
grossPnl: z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>;
|