@pear-protocol/types 0.1.0 → 1.1.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/auth/api-keys.d.ts +67 -0
- package/dist/auth/api-keys.js +35 -0
- package/dist/auth/index.d.ts +1 -0
- package/dist/auth/index.js +1 -0
- package/dist/auth/payloads.d.ts +0 -4
- package/dist/auth/payloads.js +2 -5
- package/dist/bundle.d.ts +2 -0
- package/dist/bundle.js +2 -0
- package/dist/common/client-id.d.ts +2 -0
- package/dist/common/client-id.js +5 -0
- package/dist/common/index.d.ts +1 -0
- package/dist/common/index.js +1 -0
- package/dist/notification/entities.d.ts +108 -0
- package/dist/notification/entities.js +61 -0
- package/dist/notification/index.d.ts +4 -0
- package/dist/notification/index.js +4 -0
- package/dist/notification/payloads.d.ts +20 -0
- package/dist/notification/payloads.js +9 -0
- package/dist/notification/queries.d.ts +13 -0
- package/dist/notification/queries.js +25 -0
- package/dist/notification/responses.d.ts +67 -0
- package/dist/notification/responses.js +20 -0
- package/dist/rebalance/payloads.d.ts +1 -0
- package/dist/rebalance/payloads.js +6 -1
- package/dist/schedule/payloads.d.ts +4 -0
- package/dist/schedule/payloads.js +11 -2
- package/dist/trade/payloads.d.ts +8 -0
- package/dist/trade/payloads.js +21 -4
- package/dist/trigger/entities/conditions.d.ts +170 -0
- package/dist/trigger/entities/conditions.js +43 -3
- package/dist/trigger/entities/index.d.ts +369 -0
- package/dist/trigger/index.d.ts +1 -0
- package/dist/trigger/index.js +1 -0
- package/dist/trigger/oracle.d.ts +31 -0
- package/dist/trigger/oracle.js +15 -0
- package/dist/trigger/payloads/conditions.d.ts +50 -0
- package/dist/trigger/payloads/conditions.js +35 -1
- package/dist/trigger/payloads/index.d.ts +90 -0
- package/dist/trigger/payloads/index.js +16 -3
- package/dist/trigger/responses.d.ts +246 -0
- package/dist/triggers/entities.d.ts +34 -0
- package/dist/triggers/entities.js +21 -0
- package/dist/triggers/index.d.ts +3 -0
- package/dist/triggers/index.js +3 -0
- package/dist/triggers/queries.d.ts +8 -0
- package/dist/triggers/queries.js +10 -0
- package/dist/triggers/responses.d.ts +26 -0
- package/dist/triggers/responses.js +9 -0
- package/package.json +1 -1
|
@@ -195,6 +195,47 @@ export declare const TriggerMarketOpen: z.ZodObject<{
|
|
|
195
195
|
}>;
|
|
196
196
|
threshold: z.ZodNumber;
|
|
197
197
|
}, z.core.$strip>;
|
|
198
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
199
|
+
type: z.ZodLiteral<"funding_rate">;
|
|
200
|
+
data: z.ZodObject<{
|
|
201
|
+
connector: z.ZodEnum<{
|
|
202
|
+
hyperliquid: "hyperliquid";
|
|
203
|
+
binance: "binance";
|
|
204
|
+
bybit: "bybit";
|
|
205
|
+
okx: "okx";
|
|
206
|
+
lighter: "lighter";
|
|
207
|
+
}>;
|
|
208
|
+
symbol: z.ZodString;
|
|
209
|
+
track: z.ZodEnum<{
|
|
210
|
+
PEAK: "PEAK";
|
|
211
|
+
TROUGH: "TROUGH";
|
|
212
|
+
}>;
|
|
213
|
+
threshold: z.ZodNumber;
|
|
214
|
+
}, z.core.$strip>;
|
|
215
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
216
|
+
type: z.ZodLiteral<"prediction_market">;
|
|
217
|
+
data: z.ZodObject<{
|
|
218
|
+
source: z.ZodEnum<{
|
|
219
|
+
kalshi: "kalshi";
|
|
220
|
+
polymarket: "polymarket";
|
|
221
|
+
}>;
|
|
222
|
+
marketKey: z.ZodString;
|
|
223
|
+
track: z.ZodEnum<{
|
|
224
|
+
PEAK: "PEAK";
|
|
225
|
+
TROUGH: "TROUGH";
|
|
226
|
+
}>;
|
|
227
|
+
threshold: z.ZodNumber;
|
|
228
|
+
}, z.core.$strip>;
|
|
229
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
230
|
+
type: z.ZodLiteral<"btc_dominance">;
|
|
231
|
+
data: z.ZodObject<{
|
|
232
|
+
source: z.ZodLiteral<"coingecko">;
|
|
233
|
+
track: z.ZodEnum<{
|
|
234
|
+
PEAK: "PEAK";
|
|
235
|
+
TROUGH: "TROUGH";
|
|
236
|
+
}>;
|
|
237
|
+
threshold: z.ZodNumber;
|
|
238
|
+
}, z.core.$strip>;
|
|
198
239
|
}, z.core.$strip>], "type">;
|
|
199
240
|
context: z.ZodObject<{
|
|
200
241
|
type: z.ZodLiteral<"MARKET">;
|
|
@@ -380,6 +421,47 @@ export declare const TriggerMarketAdjust: z.ZodObject<{
|
|
|
380
421
|
}>;
|
|
381
422
|
threshold: z.ZodNumber;
|
|
382
423
|
}, z.core.$strip>;
|
|
424
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
425
|
+
type: z.ZodLiteral<"funding_rate">;
|
|
426
|
+
data: z.ZodObject<{
|
|
427
|
+
connector: z.ZodEnum<{
|
|
428
|
+
hyperliquid: "hyperliquid";
|
|
429
|
+
binance: "binance";
|
|
430
|
+
bybit: "bybit";
|
|
431
|
+
okx: "okx";
|
|
432
|
+
lighter: "lighter";
|
|
433
|
+
}>;
|
|
434
|
+
symbol: z.ZodString;
|
|
435
|
+
track: z.ZodEnum<{
|
|
436
|
+
PEAK: "PEAK";
|
|
437
|
+
TROUGH: "TROUGH";
|
|
438
|
+
}>;
|
|
439
|
+
threshold: z.ZodNumber;
|
|
440
|
+
}, z.core.$strip>;
|
|
441
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
442
|
+
type: z.ZodLiteral<"prediction_market">;
|
|
443
|
+
data: z.ZodObject<{
|
|
444
|
+
source: z.ZodEnum<{
|
|
445
|
+
kalshi: "kalshi";
|
|
446
|
+
polymarket: "polymarket";
|
|
447
|
+
}>;
|
|
448
|
+
marketKey: z.ZodString;
|
|
449
|
+
track: z.ZodEnum<{
|
|
450
|
+
PEAK: "PEAK";
|
|
451
|
+
TROUGH: "TROUGH";
|
|
452
|
+
}>;
|
|
453
|
+
threshold: z.ZodNumber;
|
|
454
|
+
}, z.core.$strip>;
|
|
455
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
456
|
+
type: z.ZodLiteral<"btc_dominance">;
|
|
457
|
+
data: z.ZodObject<{
|
|
458
|
+
source: z.ZodLiteral<"coingecko">;
|
|
459
|
+
track: z.ZodEnum<{
|
|
460
|
+
PEAK: "PEAK";
|
|
461
|
+
TROUGH: "TROUGH";
|
|
462
|
+
}>;
|
|
463
|
+
threshold: z.ZodNumber;
|
|
464
|
+
}, z.core.$strip>;
|
|
383
465
|
}, z.core.$strip>], "type">;
|
|
384
466
|
context: z.ZodObject<{
|
|
385
467
|
type: z.ZodLiteral<"MARKET">;
|
|
@@ -641,6 +723,47 @@ export declare const TriggerMarketClose: z.ZodObject<{
|
|
|
641
723
|
mark: "mark";
|
|
642
724
|
}>;
|
|
643
725
|
}, z.core.$strip>;
|
|
726
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
727
|
+
type: z.ZodLiteral<"funding_rate">;
|
|
728
|
+
data: z.ZodObject<{
|
|
729
|
+
connector: z.ZodEnum<{
|
|
730
|
+
hyperliquid: "hyperliquid";
|
|
731
|
+
binance: "binance";
|
|
732
|
+
bybit: "bybit";
|
|
733
|
+
okx: "okx";
|
|
734
|
+
lighter: "lighter";
|
|
735
|
+
}>;
|
|
736
|
+
symbol: z.ZodString;
|
|
737
|
+
track: z.ZodEnum<{
|
|
738
|
+
PEAK: "PEAK";
|
|
739
|
+
TROUGH: "TROUGH";
|
|
740
|
+
}>;
|
|
741
|
+
threshold: z.ZodNumber;
|
|
742
|
+
}, z.core.$strip>;
|
|
743
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
744
|
+
type: z.ZodLiteral<"prediction_market">;
|
|
745
|
+
data: z.ZodObject<{
|
|
746
|
+
source: z.ZodEnum<{
|
|
747
|
+
kalshi: "kalshi";
|
|
748
|
+
polymarket: "polymarket";
|
|
749
|
+
}>;
|
|
750
|
+
marketKey: z.ZodString;
|
|
751
|
+
track: z.ZodEnum<{
|
|
752
|
+
PEAK: "PEAK";
|
|
753
|
+
TROUGH: "TROUGH";
|
|
754
|
+
}>;
|
|
755
|
+
threshold: z.ZodNumber;
|
|
756
|
+
}, z.core.$strip>;
|
|
757
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
758
|
+
type: z.ZodLiteral<"btc_dominance">;
|
|
759
|
+
data: z.ZodObject<{
|
|
760
|
+
source: z.ZodLiteral<"coingecko">;
|
|
761
|
+
track: z.ZodEnum<{
|
|
762
|
+
PEAK: "PEAK";
|
|
763
|
+
TROUGH: "TROUGH";
|
|
764
|
+
}>;
|
|
765
|
+
threshold: z.ZodNumber;
|
|
766
|
+
}, z.core.$strip>;
|
|
644
767
|
}, z.core.$strip>], "type">;
|
|
645
768
|
context: z.ZodObject<{
|
|
646
769
|
type: z.ZodLiteral<"MARKET">;
|
|
@@ -779,6 +902,47 @@ export declare const TriggerMarket: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
779
902
|
}>;
|
|
780
903
|
threshold: z.ZodNumber;
|
|
781
904
|
}, z.core.$strip>;
|
|
905
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
906
|
+
type: z.ZodLiteral<"funding_rate">;
|
|
907
|
+
data: z.ZodObject<{
|
|
908
|
+
connector: z.ZodEnum<{
|
|
909
|
+
hyperliquid: "hyperliquid";
|
|
910
|
+
binance: "binance";
|
|
911
|
+
bybit: "bybit";
|
|
912
|
+
okx: "okx";
|
|
913
|
+
lighter: "lighter";
|
|
914
|
+
}>;
|
|
915
|
+
symbol: z.ZodString;
|
|
916
|
+
track: z.ZodEnum<{
|
|
917
|
+
PEAK: "PEAK";
|
|
918
|
+
TROUGH: "TROUGH";
|
|
919
|
+
}>;
|
|
920
|
+
threshold: z.ZodNumber;
|
|
921
|
+
}, z.core.$strip>;
|
|
922
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
923
|
+
type: z.ZodLiteral<"prediction_market">;
|
|
924
|
+
data: z.ZodObject<{
|
|
925
|
+
source: z.ZodEnum<{
|
|
926
|
+
kalshi: "kalshi";
|
|
927
|
+
polymarket: "polymarket";
|
|
928
|
+
}>;
|
|
929
|
+
marketKey: z.ZodString;
|
|
930
|
+
track: z.ZodEnum<{
|
|
931
|
+
PEAK: "PEAK";
|
|
932
|
+
TROUGH: "TROUGH";
|
|
933
|
+
}>;
|
|
934
|
+
threshold: z.ZodNumber;
|
|
935
|
+
}, z.core.$strip>;
|
|
936
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
937
|
+
type: z.ZodLiteral<"btc_dominance">;
|
|
938
|
+
data: z.ZodObject<{
|
|
939
|
+
source: z.ZodLiteral<"coingecko">;
|
|
940
|
+
track: z.ZodEnum<{
|
|
941
|
+
PEAK: "PEAK";
|
|
942
|
+
TROUGH: "TROUGH";
|
|
943
|
+
}>;
|
|
944
|
+
threshold: z.ZodNumber;
|
|
945
|
+
}, z.core.$strip>;
|
|
782
946
|
}, z.core.$strip>], "type">;
|
|
783
947
|
context: z.ZodObject<{
|
|
784
948
|
type: z.ZodLiteral<"MARKET">;
|
|
@@ -963,6 +1127,47 @@ export declare const TriggerMarket: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
963
1127
|
}>;
|
|
964
1128
|
threshold: z.ZodNumber;
|
|
965
1129
|
}, z.core.$strip>;
|
|
1130
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1131
|
+
type: z.ZodLiteral<"funding_rate">;
|
|
1132
|
+
data: z.ZodObject<{
|
|
1133
|
+
connector: z.ZodEnum<{
|
|
1134
|
+
hyperliquid: "hyperliquid";
|
|
1135
|
+
binance: "binance";
|
|
1136
|
+
bybit: "bybit";
|
|
1137
|
+
okx: "okx";
|
|
1138
|
+
lighter: "lighter";
|
|
1139
|
+
}>;
|
|
1140
|
+
symbol: z.ZodString;
|
|
1141
|
+
track: z.ZodEnum<{
|
|
1142
|
+
PEAK: "PEAK";
|
|
1143
|
+
TROUGH: "TROUGH";
|
|
1144
|
+
}>;
|
|
1145
|
+
threshold: z.ZodNumber;
|
|
1146
|
+
}, z.core.$strip>;
|
|
1147
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1148
|
+
type: z.ZodLiteral<"prediction_market">;
|
|
1149
|
+
data: z.ZodObject<{
|
|
1150
|
+
source: z.ZodEnum<{
|
|
1151
|
+
kalshi: "kalshi";
|
|
1152
|
+
polymarket: "polymarket";
|
|
1153
|
+
}>;
|
|
1154
|
+
marketKey: z.ZodString;
|
|
1155
|
+
track: z.ZodEnum<{
|
|
1156
|
+
PEAK: "PEAK";
|
|
1157
|
+
TROUGH: "TROUGH";
|
|
1158
|
+
}>;
|
|
1159
|
+
threshold: z.ZodNumber;
|
|
1160
|
+
}, z.core.$strip>;
|
|
1161
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1162
|
+
type: z.ZodLiteral<"btc_dominance">;
|
|
1163
|
+
data: z.ZodObject<{
|
|
1164
|
+
source: z.ZodLiteral<"coingecko">;
|
|
1165
|
+
track: z.ZodEnum<{
|
|
1166
|
+
PEAK: "PEAK";
|
|
1167
|
+
TROUGH: "TROUGH";
|
|
1168
|
+
}>;
|
|
1169
|
+
threshold: z.ZodNumber;
|
|
1170
|
+
}, z.core.$strip>;
|
|
966
1171
|
}, z.core.$strip>], "type">;
|
|
967
1172
|
context: z.ZodObject<{
|
|
968
1173
|
type: z.ZodLiteral<"MARKET">;
|
|
@@ -1223,6 +1428,47 @@ export declare const TriggerMarket: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
1223
1428
|
mark: "mark";
|
|
1224
1429
|
}>;
|
|
1225
1430
|
}, z.core.$strip>;
|
|
1431
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1432
|
+
type: z.ZodLiteral<"funding_rate">;
|
|
1433
|
+
data: z.ZodObject<{
|
|
1434
|
+
connector: z.ZodEnum<{
|
|
1435
|
+
hyperliquid: "hyperliquid";
|
|
1436
|
+
binance: "binance";
|
|
1437
|
+
bybit: "bybit";
|
|
1438
|
+
okx: "okx";
|
|
1439
|
+
lighter: "lighter";
|
|
1440
|
+
}>;
|
|
1441
|
+
symbol: z.ZodString;
|
|
1442
|
+
track: z.ZodEnum<{
|
|
1443
|
+
PEAK: "PEAK";
|
|
1444
|
+
TROUGH: "TROUGH";
|
|
1445
|
+
}>;
|
|
1446
|
+
threshold: z.ZodNumber;
|
|
1447
|
+
}, z.core.$strip>;
|
|
1448
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1449
|
+
type: z.ZodLiteral<"prediction_market">;
|
|
1450
|
+
data: z.ZodObject<{
|
|
1451
|
+
source: z.ZodEnum<{
|
|
1452
|
+
kalshi: "kalshi";
|
|
1453
|
+
polymarket: "polymarket";
|
|
1454
|
+
}>;
|
|
1455
|
+
marketKey: z.ZodString;
|
|
1456
|
+
track: z.ZodEnum<{
|
|
1457
|
+
PEAK: "PEAK";
|
|
1458
|
+
TROUGH: "TROUGH";
|
|
1459
|
+
}>;
|
|
1460
|
+
threshold: z.ZodNumber;
|
|
1461
|
+
}, z.core.$strip>;
|
|
1462
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1463
|
+
type: z.ZodLiteral<"btc_dominance">;
|
|
1464
|
+
data: z.ZodObject<{
|
|
1465
|
+
source: z.ZodLiteral<"coingecko">;
|
|
1466
|
+
track: z.ZodEnum<{
|
|
1467
|
+
PEAK: "PEAK";
|
|
1468
|
+
TROUGH: "TROUGH";
|
|
1469
|
+
}>;
|
|
1470
|
+
threshold: z.ZodNumber;
|
|
1471
|
+
}, z.core.$strip>;
|
|
1226
1472
|
}, z.core.$strip>], "type">;
|
|
1227
1473
|
context: z.ZodObject<{
|
|
1228
1474
|
type: z.ZodLiteral<"MARKET">;
|
|
@@ -1361,6 +1607,47 @@ export declare const Trigger: z.ZodDiscriminatedUnion<[z.ZodDiscriminatedUnion<[
|
|
|
1361
1607
|
}>;
|
|
1362
1608
|
threshold: z.ZodNumber;
|
|
1363
1609
|
}, z.core.$strip>;
|
|
1610
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1611
|
+
type: z.ZodLiteral<"funding_rate">;
|
|
1612
|
+
data: z.ZodObject<{
|
|
1613
|
+
connector: z.ZodEnum<{
|
|
1614
|
+
hyperliquid: "hyperliquid";
|
|
1615
|
+
binance: "binance";
|
|
1616
|
+
bybit: "bybit";
|
|
1617
|
+
okx: "okx";
|
|
1618
|
+
lighter: "lighter";
|
|
1619
|
+
}>;
|
|
1620
|
+
symbol: z.ZodString;
|
|
1621
|
+
track: z.ZodEnum<{
|
|
1622
|
+
PEAK: "PEAK";
|
|
1623
|
+
TROUGH: "TROUGH";
|
|
1624
|
+
}>;
|
|
1625
|
+
threshold: z.ZodNumber;
|
|
1626
|
+
}, z.core.$strip>;
|
|
1627
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1628
|
+
type: z.ZodLiteral<"prediction_market">;
|
|
1629
|
+
data: z.ZodObject<{
|
|
1630
|
+
source: z.ZodEnum<{
|
|
1631
|
+
kalshi: "kalshi";
|
|
1632
|
+
polymarket: "polymarket";
|
|
1633
|
+
}>;
|
|
1634
|
+
marketKey: z.ZodString;
|
|
1635
|
+
track: z.ZodEnum<{
|
|
1636
|
+
PEAK: "PEAK";
|
|
1637
|
+
TROUGH: "TROUGH";
|
|
1638
|
+
}>;
|
|
1639
|
+
threshold: z.ZodNumber;
|
|
1640
|
+
}, z.core.$strip>;
|
|
1641
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1642
|
+
type: z.ZodLiteral<"btc_dominance">;
|
|
1643
|
+
data: z.ZodObject<{
|
|
1644
|
+
source: z.ZodLiteral<"coingecko">;
|
|
1645
|
+
track: z.ZodEnum<{
|
|
1646
|
+
PEAK: "PEAK";
|
|
1647
|
+
TROUGH: "TROUGH";
|
|
1648
|
+
}>;
|
|
1649
|
+
threshold: z.ZodNumber;
|
|
1650
|
+
}, z.core.$strip>;
|
|
1364
1651
|
}, z.core.$strip>], "type">;
|
|
1365
1652
|
context: z.ZodObject<{
|
|
1366
1653
|
type: z.ZodLiteral<"MARKET">;
|
|
@@ -1545,6 +1832,47 @@ export declare const Trigger: z.ZodDiscriminatedUnion<[z.ZodDiscriminatedUnion<[
|
|
|
1545
1832
|
}>;
|
|
1546
1833
|
threshold: z.ZodNumber;
|
|
1547
1834
|
}, z.core.$strip>;
|
|
1835
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1836
|
+
type: z.ZodLiteral<"funding_rate">;
|
|
1837
|
+
data: z.ZodObject<{
|
|
1838
|
+
connector: z.ZodEnum<{
|
|
1839
|
+
hyperliquid: "hyperliquid";
|
|
1840
|
+
binance: "binance";
|
|
1841
|
+
bybit: "bybit";
|
|
1842
|
+
okx: "okx";
|
|
1843
|
+
lighter: "lighter";
|
|
1844
|
+
}>;
|
|
1845
|
+
symbol: z.ZodString;
|
|
1846
|
+
track: z.ZodEnum<{
|
|
1847
|
+
PEAK: "PEAK";
|
|
1848
|
+
TROUGH: "TROUGH";
|
|
1849
|
+
}>;
|
|
1850
|
+
threshold: z.ZodNumber;
|
|
1851
|
+
}, z.core.$strip>;
|
|
1852
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1853
|
+
type: z.ZodLiteral<"prediction_market">;
|
|
1854
|
+
data: z.ZodObject<{
|
|
1855
|
+
source: z.ZodEnum<{
|
|
1856
|
+
kalshi: "kalshi";
|
|
1857
|
+
polymarket: "polymarket";
|
|
1858
|
+
}>;
|
|
1859
|
+
marketKey: z.ZodString;
|
|
1860
|
+
track: z.ZodEnum<{
|
|
1861
|
+
PEAK: "PEAK";
|
|
1862
|
+
TROUGH: "TROUGH";
|
|
1863
|
+
}>;
|
|
1864
|
+
threshold: z.ZodNumber;
|
|
1865
|
+
}, z.core.$strip>;
|
|
1866
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1867
|
+
type: z.ZodLiteral<"btc_dominance">;
|
|
1868
|
+
data: z.ZodObject<{
|
|
1869
|
+
source: z.ZodLiteral<"coingecko">;
|
|
1870
|
+
track: z.ZodEnum<{
|
|
1871
|
+
PEAK: "PEAK";
|
|
1872
|
+
TROUGH: "TROUGH";
|
|
1873
|
+
}>;
|
|
1874
|
+
threshold: z.ZodNumber;
|
|
1875
|
+
}, z.core.$strip>;
|
|
1548
1876
|
}, z.core.$strip>], "type">;
|
|
1549
1877
|
context: z.ZodObject<{
|
|
1550
1878
|
type: z.ZodLiteral<"MARKET">;
|
|
@@ -1805,6 +2133,47 @@ export declare const Trigger: z.ZodDiscriminatedUnion<[z.ZodDiscriminatedUnion<[
|
|
|
1805
2133
|
mark: "mark";
|
|
1806
2134
|
}>;
|
|
1807
2135
|
}, z.core.$strip>;
|
|
2136
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2137
|
+
type: z.ZodLiteral<"funding_rate">;
|
|
2138
|
+
data: z.ZodObject<{
|
|
2139
|
+
connector: z.ZodEnum<{
|
|
2140
|
+
hyperliquid: "hyperliquid";
|
|
2141
|
+
binance: "binance";
|
|
2142
|
+
bybit: "bybit";
|
|
2143
|
+
okx: "okx";
|
|
2144
|
+
lighter: "lighter";
|
|
2145
|
+
}>;
|
|
2146
|
+
symbol: z.ZodString;
|
|
2147
|
+
track: z.ZodEnum<{
|
|
2148
|
+
PEAK: "PEAK";
|
|
2149
|
+
TROUGH: "TROUGH";
|
|
2150
|
+
}>;
|
|
2151
|
+
threshold: z.ZodNumber;
|
|
2152
|
+
}, z.core.$strip>;
|
|
2153
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2154
|
+
type: z.ZodLiteral<"prediction_market">;
|
|
2155
|
+
data: z.ZodObject<{
|
|
2156
|
+
source: z.ZodEnum<{
|
|
2157
|
+
kalshi: "kalshi";
|
|
2158
|
+
polymarket: "polymarket";
|
|
2159
|
+
}>;
|
|
2160
|
+
marketKey: z.ZodString;
|
|
2161
|
+
track: z.ZodEnum<{
|
|
2162
|
+
PEAK: "PEAK";
|
|
2163
|
+
TROUGH: "TROUGH";
|
|
2164
|
+
}>;
|
|
2165
|
+
threshold: z.ZodNumber;
|
|
2166
|
+
}, z.core.$strip>;
|
|
2167
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
2168
|
+
type: z.ZodLiteral<"btc_dominance">;
|
|
2169
|
+
data: z.ZodObject<{
|
|
2170
|
+
source: z.ZodLiteral<"coingecko">;
|
|
2171
|
+
track: z.ZodEnum<{
|
|
2172
|
+
PEAK: "PEAK";
|
|
2173
|
+
TROUGH: "TROUGH";
|
|
2174
|
+
}>;
|
|
2175
|
+
threshold: z.ZodNumber;
|
|
2176
|
+
}, z.core.$strip>;
|
|
1808
2177
|
}, z.core.$strip>], "type">;
|
|
1809
2178
|
context: z.ZodObject<{
|
|
1810
2179
|
type: z.ZodLiteral<"MARKET">;
|
package/dist/trigger/index.d.ts
CHANGED
package/dist/trigger/index.js
CHANGED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const OracleUnit: z.ZodEnum<{
|
|
3
|
+
cent: "cent";
|
|
4
|
+
percent: "percent";
|
|
5
|
+
}>;
|
|
6
|
+
export type OracleUnit = z.output<typeof OracleUnit>;
|
|
7
|
+
export declare const OracleValue: z.ZodObject<{
|
|
8
|
+
value: z.ZodNumber;
|
|
9
|
+
unit: z.ZodEnum<{
|
|
10
|
+
cent: "cent";
|
|
11
|
+
percent: "percent";
|
|
12
|
+
}>;
|
|
13
|
+
}, z.core.$strip>;
|
|
14
|
+
export type OracleValue = z.output<typeof OracleValue>;
|
|
15
|
+
export declare const OracleTrigger: z.ZodObject<{
|
|
16
|
+
id: z.ZodString;
|
|
17
|
+
category: z.ZodEnum<{
|
|
18
|
+
btcdom: "btcdom";
|
|
19
|
+
}>;
|
|
20
|
+
source: z.ZodEnum<{
|
|
21
|
+
coingecko: "coingecko";
|
|
22
|
+
}>;
|
|
23
|
+
oracle: z.ZodNullable<z.ZodObject<{
|
|
24
|
+
value: z.ZodNumber;
|
|
25
|
+
unit: z.ZodEnum<{
|
|
26
|
+
cent: "cent";
|
|
27
|
+
percent: "percent";
|
|
28
|
+
}>;
|
|
29
|
+
}, z.core.$strip>>;
|
|
30
|
+
}, z.core.$strip>;
|
|
31
|
+
export type OracleTrigger = z.output<typeof OracleTrigger>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
const OracleUnit = z.enum(["cent", "percent"]);
|
|
4
|
+
const OracleValue = z.object({
|
|
5
|
+
value: z.number(),
|
|
6
|
+
unit: OracleUnit
|
|
7
|
+
});
|
|
8
|
+
const OracleTrigger = z.object({
|
|
9
|
+
id: z.string(),
|
|
10
|
+
category: z.enum(["btcdom"]),
|
|
11
|
+
source: z.enum(["coingecko"]),
|
|
12
|
+
oracle: OracleValue.nullable()
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
export { OracleTrigger, OracleUnit, OracleValue };
|
|
@@ -49,6 +49,47 @@ export declare const CreateTriggerConditionOpen: z.ZodDiscriminatedUnion<[z.ZodO
|
|
|
49
49
|
}>;
|
|
50
50
|
threshold: z.ZodNumber;
|
|
51
51
|
}, z.core.$strip>;
|
|
52
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
53
|
+
type: z.ZodLiteral<"funding_rate">;
|
|
54
|
+
data: z.ZodObject<{
|
|
55
|
+
connector: z.ZodEnum<{
|
|
56
|
+
hyperliquid: "hyperliquid";
|
|
57
|
+
binance: "binance";
|
|
58
|
+
bybit: "bybit";
|
|
59
|
+
okx: "okx";
|
|
60
|
+
lighter: "lighter";
|
|
61
|
+
}>;
|
|
62
|
+
symbol: z.ZodString;
|
|
63
|
+
track: z.ZodEnum<{
|
|
64
|
+
PEAK: "PEAK";
|
|
65
|
+
TROUGH: "TROUGH";
|
|
66
|
+
}>;
|
|
67
|
+
threshold: z.ZodNumber;
|
|
68
|
+
}, z.core.$strip>;
|
|
69
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
70
|
+
type: z.ZodLiteral<"prediction_market">;
|
|
71
|
+
data: z.ZodObject<{
|
|
72
|
+
source: z.ZodEnum<{
|
|
73
|
+
kalshi: "kalshi";
|
|
74
|
+
polymarket: "polymarket";
|
|
75
|
+
}>;
|
|
76
|
+
marketKey: z.ZodString;
|
|
77
|
+
track: z.ZodEnum<{
|
|
78
|
+
PEAK: "PEAK";
|
|
79
|
+
TROUGH: "TROUGH";
|
|
80
|
+
}>;
|
|
81
|
+
threshold: z.ZodNumber;
|
|
82
|
+
}, z.core.$strip>;
|
|
83
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
84
|
+
type: z.ZodLiteral<"btc_dominance">;
|
|
85
|
+
data: z.ZodObject<{
|
|
86
|
+
source: z.ZodLiteral<"coingecko">;
|
|
87
|
+
track: z.ZodEnum<{
|
|
88
|
+
PEAK: "PEAK";
|
|
89
|
+
TROUGH: "TROUGH";
|
|
90
|
+
}>;
|
|
91
|
+
threshold: z.ZodNumber;
|
|
92
|
+
}, z.core.$strip>;
|
|
52
93
|
}, z.core.$strip>], "type">;
|
|
53
94
|
export declare const CreateTriggerConditionCloseStatic: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
54
95
|
type: z.ZodLiteral<"ratio">;
|
|
@@ -239,6 +280,15 @@ export type CreateTriggerConditionPriceOpen = Extract<CreateTriggerConditionOpen
|
|
|
239
280
|
export type CreateTriggerConditionWeightedRatioOpen = Extract<CreateTriggerConditionOpen, {
|
|
240
281
|
type: 'weighted_ratio';
|
|
241
282
|
}>;
|
|
283
|
+
export type CreateTriggerConditionPredictionMarketOpen = Extract<CreateTriggerConditionOpen, {
|
|
284
|
+
type: 'prediction_market';
|
|
285
|
+
}>;
|
|
286
|
+
export type CreateTriggerConditionFundingRateOpen = Extract<CreateTriggerConditionOpen, {
|
|
287
|
+
type: 'funding_rate';
|
|
288
|
+
}>;
|
|
289
|
+
export type CreateTriggerConditionBtcDominanceOpen = Extract<CreateTriggerConditionOpen, {
|
|
290
|
+
type: 'btc_dominance';
|
|
291
|
+
}>;
|
|
242
292
|
export type CreateTriggerConditionCloseStatic = z.output<typeof CreateTriggerConditionCloseStatic>;
|
|
243
293
|
export type CreateTriggerConditionRatioCloseStatic = Extract<CreateTriggerConditionCloseStatic, {
|
|
244
294
|
type: 'ratio';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { RefineMinimumTwoSymbols, RefineUniqueSymbols, RefineWeightingSum, RefineMinimumOneBuyOneSell, RefineTwoUniqueSymbols } from '../../common/refinement';
|
|
3
3
|
import { Side } from '../../common/schema';
|
|
4
|
+
import { Connector } from '../../connector';
|
|
4
5
|
import { InstrumentId } from '../../instrument';
|
|
5
6
|
import { MetricTrack } from '../common';
|
|
6
7
|
|
|
@@ -45,6 +46,32 @@ const WeightedRatioOpen = z.object({
|
|
|
45
46
|
threshold: TriggerThreshold
|
|
46
47
|
})
|
|
47
48
|
});
|
|
49
|
+
const PredictionMarketOpen = z.object({
|
|
50
|
+
type: z.literal("prediction_market"),
|
|
51
|
+
data: z.object({
|
|
52
|
+
source: z.enum(["kalshi", "polymarket"]),
|
|
53
|
+
marketKey: z.string().min(1),
|
|
54
|
+
track: MetricTrack,
|
|
55
|
+
threshold: TriggerThreshold
|
|
56
|
+
})
|
|
57
|
+
});
|
|
58
|
+
const FundingRateOpen = z.object({
|
|
59
|
+
type: z.literal("funding_rate"),
|
|
60
|
+
data: z.object({
|
|
61
|
+
connector: Connector,
|
|
62
|
+
symbol: InstrumentId,
|
|
63
|
+
track: MetricTrack,
|
|
64
|
+
threshold: z.number()
|
|
65
|
+
})
|
|
66
|
+
});
|
|
67
|
+
const BtcDominanceOpen = z.object({
|
|
68
|
+
type: z.literal("btc_dominance"),
|
|
69
|
+
data: z.object({
|
|
70
|
+
source: z.literal("coingecko"),
|
|
71
|
+
track: MetricTrack,
|
|
72
|
+
threshold: TriggerThreshold
|
|
73
|
+
})
|
|
74
|
+
});
|
|
48
75
|
const RatioCloseStatic = z.object({
|
|
49
76
|
type: z.literal("ratio"),
|
|
50
77
|
data: z.object({
|
|
@@ -131,7 +158,14 @@ const UpnlBpsCloseTrailing = z.object({
|
|
|
131
158
|
priceSource: PriceSource
|
|
132
159
|
})
|
|
133
160
|
});
|
|
134
|
-
const CreateTriggerConditionOpen = z.discriminatedUnion("type", [
|
|
161
|
+
const CreateTriggerConditionOpen = z.discriminatedUnion("type", [
|
|
162
|
+
RatioOpen,
|
|
163
|
+
PriceOpen,
|
|
164
|
+
WeightedRatioOpen,
|
|
165
|
+
FundingRateOpen,
|
|
166
|
+
PredictionMarketOpen,
|
|
167
|
+
BtcDominanceOpen
|
|
168
|
+
]);
|
|
135
169
|
const CreateTriggerConditionCloseStatic = z.discriminatedUnion("type", [
|
|
136
170
|
RatioCloseStatic,
|
|
137
171
|
PriceCloseStatic,
|