@polymarket/bindings 0.1.0-beta.14 → 0.1.0-beta.16
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/{chunk-BI6DX3LX.js → chunk-AG5LLIAW.js} +2 -2
- package/dist/{chunk-BI6DX3LX.js.map → chunk-AG5LLIAW.js.map} +1 -1
- package/dist/chunk-KMTIKS2E.js +2 -0
- package/dist/chunk-KMTIKS2E.js.map +1 -0
- package/dist/{chunk-G2DC5MZA.js → chunk-SRNC7OM5.js} +2 -2
- package/dist/{chunk-G2DC5MZA.js.map → chunk-SRNC7OM5.js.map} +1 -1
- package/dist/clob/index.d.ts +4 -4
- package/dist/clob/index.js +1 -1
- package/dist/clob/index.js.map +1 -1
- package/dist/data/index.js +1 -1
- package/dist/gamma/index.js +1 -1
- package/dist/index.d.ts +7 -1
- package/dist/index.js +1 -1
- package/dist/perps/index.js +1 -1
- package/dist/relayer/index.js +1 -1
- package/dist/rfq.d.ts +20 -40
- package/dist/rfq.js +1 -1
- package/dist/rfq.js.map +1 -1
- package/dist/subscriptions/index.d.ts +65 -65
- package/dist/subscriptions/index.js +1 -1
- package/dist/subscriptions/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-GTLPG5HR.js +0 -2
- package/dist/chunk-GTLPG5HR.js.map +0 -1
|
@@ -38,10 +38,10 @@ declare const MarketBookEventSchema: z.ZodPipe<z.ZodObject<{
|
|
|
38
38
|
}, z.core.$strip>>;
|
|
39
39
|
hash: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
40
40
|
timestamp: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<EpochMilliseconds, string>>>>;
|
|
41
|
-
min_order_size: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string
|
|
42
|
-
tick_size: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string
|
|
41
|
+
min_order_size: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>>>;
|
|
42
|
+
tick_size: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>>>;
|
|
43
43
|
neg_risk: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
44
|
-
last_trade_price: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string
|
|
44
|
+
last_trade_price: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>>>;
|
|
45
45
|
}, z.core.$strip>, z.ZodTransform<{
|
|
46
46
|
topic: "market";
|
|
47
47
|
type: "book";
|
|
@@ -89,8 +89,8 @@ declare const PriceChangeSchema: z.ZodPipe<z.ZodObject<{
|
|
|
89
89
|
size: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
90
90
|
side: z.ZodType<OrderSide, unknown, z.core.$ZodTypeInternals<OrderSide, unknown>>;
|
|
91
91
|
hash: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
92
|
-
best_bid: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string
|
|
93
|
-
best_ask: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string
|
|
92
|
+
best_bid: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>>>;
|
|
93
|
+
best_ask: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>>>;
|
|
94
94
|
}, z.core.$strip>, z.ZodTransform<{
|
|
95
95
|
tokenId: TokenId;
|
|
96
96
|
bestBid: DecimalString | null | undefined;
|
|
@@ -118,8 +118,8 @@ declare const MarketPriceChangeEventSchema: z.ZodPipe<z.ZodObject<{
|
|
|
118
118
|
size: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
119
119
|
side: z.ZodType<OrderSide, unknown, z.core.$ZodTypeInternals<OrderSide, unknown>>;
|
|
120
120
|
hash: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
121
|
-
best_bid: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string
|
|
122
|
-
best_ask: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string
|
|
121
|
+
best_bid: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>>>;
|
|
122
|
+
best_ask: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>>>;
|
|
123
123
|
}, z.core.$strip>, z.ZodTransform<{
|
|
124
124
|
tokenId: TokenId;
|
|
125
125
|
bestBid: DecimalString | null | undefined;
|
|
@@ -174,8 +174,8 @@ declare const MarketLastTradePriceEventSchema: z.ZodPipe<z.ZodObject<{
|
|
|
174
174
|
market: z.ZodString;
|
|
175
175
|
asset_id: z.ZodPipe<z.ZodString, z.ZodTransform<TokenId, string>>;
|
|
176
176
|
price: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
177
|
-
size: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string
|
|
178
|
-
fee_rate_bps: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string
|
|
177
|
+
size: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>>>;
|
|
178
|
+
fee_rate_bps: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>>>;
|
|
179
179
|
side: z.ZodType<OrderSide, unknown, z.core.$ZodTypeInternals<OrderSide, unknown>>;
|
|
180
180
|
timestamp: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<EpochMilliseconds, string>>>>;
|
|
181
181
|
transaction_hash: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -208,7 +208,7 @@ declare const MarketTickSizeChangeEventSchema: z.ZodPipe<z.ZodObject<{
|
|
|
208
208
|
event_type: z.ZodLiteral<"tick_size_change">;
|
|
209
209
|
market: z.ZodString;
|
|
210
210
|
asset_id: z.ZodPipe<z.ZodString, z.ZodTransform<TokenId, string>>;
|
|
211
|
-
old_tick_size: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string
|
|
211
|
+
old_tick_size: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>>>;
|
|
212
212
|
new_tick_size: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
213
213
|
timestamp: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<EpochMilliseconds, string>>>>;
|
|
214
214
|
}, z.core.$strip>, z.ZodTransform<{
|
|
@@ -234,9 +234,9 @@ declare const MarketBestBidAskEventSchema: z.ZodPipe<z.ZodObject<{
|
|
|
234
234
|
event_type: z.ZodLiteral<"best_bid_ask">;
|
|
235
235
|
market: z.ZodString;
|
|
236
236
|
asset_id: z.ZodPipe<z.ZodString, z.ZodTransform<TokenId, string>>;
|
|
237
|
-
best_bid: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string
|
|
238
|
-
best_ask: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string
|
|
239
|
-
spread: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string
|
|
237
|
+
best_bid: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>>>;
|
|
238
|
+
best_ask: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>>>;
|
|
239
|
+
spread: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>>>;
|
|
240
240
|
timestamp: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<EpochMilliseconds, string>>>>;
|
|
241
241
|
}, z.core.$strip>, z.ZodTransform<{
|
|
242
242
|
topic: "market";
|
|
@@ -289,11 +289,11 @@ declare const NewMarketEventSchema: z.ZodPipe<z.ZodObject<{
|
|
|
289
289
|
active: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
290
290
|
clob_token_ids: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
291
291
|
sports_market_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
292
|
-
line: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string
|
|
292
|
+
line: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>>>;
|
|
293
293
|
game_start_time: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>]>, z.ZodTransform<IsoDateTimeString, number>>, z.ZodPipe<z.ZodString, z.ZodTransform<IsoDateTimeString, string>>]>>>;
|
|
294
|
-
order_price_min_tick_size: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string
|
|
294
|
+
order_price_min_tick_size: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>>>;
|
|
295
295
|
group_item_title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
296
|
-
taker_base_fee: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string
|
|
296
|
+
taker_base_fee: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>>>;
|
|
297
297
|
fees_enabled: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
298
298
|
fee_schedule: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
|
|
299
299
|
}, z.core.$strip>, z.ZodTransform<{
|
|
@@ -488,7 +488,7 @@ declare const TradeMakerOrderSchema: z.ZodPipe<z.ZodObject<{
|
|
|
488
488
|
maker_address: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
489
489
|
matched_amount: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
490
490
|
price: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
491
|
-
fee_rate_bps: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string
|
|
491
|
+
fee_rate_bps: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>>>;
|
|
492
492
|
asset_id: z.ZodPipe<z.ZodString, z.ZodTransform<TokenId, string>>;
|
|
493
493
|
outcome: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
494
494
|
outcome_index: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
@@ -526,7 +526,7 @@ declare const UserTradeEventSchema: z.ZodPipe<z.ZodObject<{
|
|
|
526
526
|
asset_id: z.ZodPipe<z.ZodString, z.ZodTransform<TokenId, string>>;
|
|
527
527
|
side: z.ZodType<OrderSide, unknown, z.core.$ZodTypeInternals<OrderSide, unknown>>;
|
|
528
528
|
size: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
529
|
-
fee_rate_bps: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string
|
|
529
|
+
fee_rate_bps: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>>>;
|
|
530
530
|
price: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
531
531
|
status: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodEnum<typeof TradeStatus>>;
|
|
532
532
|
match_time: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<IsoDateTimeString, string>>>>;
|
|
@@ -544,7 +544,7 @@ declare const UserTradeEventSchema: z.ZodPipe<z.ZodObject<{
|
|
|
544
544
|
maker_address: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
545
545
|
matched_amount: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
546
546
|
price: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
547
|
-
fee_rate_bps: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string
|
|
547
|
+
fee_rate_bps: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>>>;
|
|
548
548
|
asset_id: z.ZodPipe<z.ZodString, z.ZodTransform<TokenId, string>>;
|
|
549
549
|
outcome: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
550
550
|
outcome_index: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
@@ -661,10 +661,10 @@ declare const StandardMarketEventSchema: z.ZodDiscriminatedUnion<[z.ZodPipe<z.Zo
|
|
|
661
661
|
}, z.core.$strip>>;
|
|
662
662
|
hash: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
663
663
|
timestamp: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<EpochMilliseconds, string>>>>;
|
|
664
|
-
min_order_size: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string
|
|
665
|
-
tick_size: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string
|
|
664
|
+
min_order_size: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>>>;
|
|
665
|
+
tick_size: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>>>;
|
|
666
666
|
neg_risk: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
667
|
-
last_trade_price: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string
|
|
667
|
+
last_trade_price: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>>>;
|
|
668
668
|
}, z.core.$strip>, z.ZodTransform<{
|
|
669
669
|
topic: "market";
|
|
670
670
|
type: "book";
|
|
@@ -713,8 +713,8 @@ declare const StandardMarketEventSchema: z.ZodDiscriminatedUnion<[z.ZodPipe<z.Zo
|
|
|
713
713
|
size: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
714
714
|
side: z.ZodType<OrderSide, unknown, z.core.$ZodTypeInternals<OrderSide, unknown>>;
|
|
715
715
|
hash: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
716
|
-
best_bid: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string
|
|
717
|
-
best_ask: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string
|
|
716
|
+
best_bid: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>>>;
|
|
717
|
+
best_ask: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>>>;
|
|
718
718
|
}, z.core.$strip>, z.ZodTransform<{
|
|
719
719
|
tokenId: TokenId;
|
|
720
720
|
bestBid: DecimalString | null | undefined;
|
|
@@ -767,8 +767,8 @@ declare const StandardMarketEventSchema: z.ZodDiscriminatedUnion<[z.ZodPipe<z.Zo
|
|
|
767
767
|
market: z.ZodString;
|
|
768
768
|
asset_id: z.ZodPipe<z.ZodString, z.ZodTransform<TokenId, string>>;
|
|
769
769
|
price: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
770
|
-
size: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string
|
|
771
|
-
fee_rate_bps: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string
|
|
770
|
+
size: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>>>;
|
|
771
|
+
fee_rate_bps: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>>>;
|
|
772
772
|
side: z.ZodType<OrderSide, unknown, z.core.$ZodTypeInternals<OrderSide, unknown>>;
|
|
773
773
|
timestamp: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<EpochMilliseconds, string>>>>;
|
|
774
774
|
transaction_hash: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -799,7 +799,7 @@ declare const StandardMarketEventSchema: z.ZodDiscriminatedUnion<[z.ZodPipe<z.Zo
|
|
|
799
799
|
event_type: z.ZodLiteral<"tick_size_change">;
|
|
800
800
|
market: z.ZodString;
|
|
801
801
|
asset_id: z.ZodPipe<z.ZodString, z.ZodTransform<TokenId, string>>;
|
|
802
|
-
old_tick_size: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string
|
|
802
|
+
old_tick_size: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>>>;
|
|
803
803
|
new_tick_size: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
804
804
|
timestamp: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<EpochMilliseconds, string>>>>;
|
|
805
805
|
}, z.core.$strip>, z.ZodTransform<{
|
|
@@ -825,9 +825,9 @@ declare const CustomMarketEventSchema: z.ZodDiscriminatedUnion<[z.ZodPipe<z.ZodO
|
|
|
825
825
|
event_type: z.ZodLiteral<"best_bid_ask">;
|
|
826
826
|
market: z.ZodString;
|
|
827
827
|
asset_id: z.ZodPipe<z.ZodString, z.ZodTransform<TokenId, string>>;
|
|
828
|
-
best_bid: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string
|
|
829
|
-
best_ask: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string
|
|
830
|
-
spread: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string
|
|
828
|
+
best_bid: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>>>;
|
|
829
|
+
best_ask: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>>>;
|
|
830
|
+
spread: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>>>;
|
|
831
831
|
timestamp: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<EpochMilliseconds, string>>>>;
|
|
832
832
|
}, z.core.$strip>, z.ZodTransform<{
|
|
833
833
|
topic: "market";
|
|
@@ -870,11 +870,11 @@ declare const CustomMarketEventSchema: z.ZodDiscriminatedUnion<[z.ZodPipe<z.ZodO
|
|
|
870
870
|
active: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
871
871
|
clob_token_ids: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
872
872
|
sports_market_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
873
|
-
line: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string
|
|
873
|
+
line: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>>>;
|
|
874
874
|
game_start_time: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>]>, z.ZodTransform<IsoDateTimeString, number>>, z.ZodPipe<z.ZodString, z.ZodTransform<IsoDateTimeString, string>>]>>>;
|
|
875
|
-
order_price_min_tick_size: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string
|
|
875
|
+
order_price_min_tick_size: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>>>;
|
|
876
876
|
group_item_title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
877
|
-
taker_base_fee: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string
|
|
877
|
+
taker_base_fee: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>>>;
|
|
878
878
|
fees_enabled: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
879
879
|
fee_schedule: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
|
|
880
880
|
}, z.core.$strip>, z.ZodTransform<{
|
|
@@ -1005,10 +1005,10 @@ declare const MarketEventSchema: z.ZodDiscriminatedUnion<[z.ZodPipe<z.ZodObject<
|
|
|
1005
1005
|
}, z.core.$strip>>;
|
|
1006
1006
|
hash: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1007
1007
|
timestamp: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<EpochMilliseconds, string>>>>;
|
|
1008
|
-
min_order_size: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string
|
|
1009
|
-
tick_size: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string
|
|
1008
|
+
min_order_size: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>>>;
|
|
1009
|
+
tick_size: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>>>;
|
|
1010
1010
|
neg_risk: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
1011
|
-
last_trade_price: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string
|
|
1011
|
+
last_trade_price: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>>>;
|
|
1012
1012
|
}, z.core.$strip>, z.ZodTransform<{
|
|
1013
1013
|
topic: "market";
|
|
1014
1014
|
type: "book";
|
|
@@ -1057,8 +1057,8 @@ declare const MarketEventSchema: z.ZodDiscriminatedUnion<[z.ZodPipe<z.ZodObject<
|
|
|
1057
1057
|
size: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1058
1058
|
side: z.ZodType<OrderSide, unknown, z.core.$ZodTypeInternals<OrderSide, unknown>>;
|
|
1059
1059
|
hash: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1060
|
-
best_bid: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string
|
|
1061
|
-
best_ask: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string
|
|
1060
|
+
best_bid: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>>>;
|
|
1061
|
+
best_ask: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>>>;
|
|
1062
1062
|
}, z.core.$strip>, z.ZodTransform<{
|
|
1063
1063
|
tokenId: TokenId;
|
|
1064
1064
|
bestBid: DecimalString | null | undefined;
|
|
@@ -1111,8 +1111,8 @@ declare const MarketEventSchema: z.ZodDiscriminatedUnion<[z.ZodPipe<z.ZodObject<
|
|
|
1111
1111
|
market: z.ZodString;
|
|
1112
1112
|
asset_id: z.ZodPipe<z.ZodString, z.ZodTransform<TokenId, string>>;
|
|
1113
1113
|
price: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1114
|
-
size: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string
|
|
1115
|
-
fee_rate_bps: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string
|
|
1114
|
+
size: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>>>;
|
|
1115
|
+
fee_rate_bps: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>>>;
|
|
1116
1116
|
side: z.ZodType<OrderSide, unknown, z.core.$ZodTypeInternals<OrderSide, unknown>>;
|
|
1117
1117
|
timestamp: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<EpochMilliseconds, string>>>>;
|
|
1118
1118
|
transaction_hash: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -1143,7 +1143,7 @@ declare const MarketEventSchema: z.ZodDiscriminatedUnion<[z.ZodPipe<z.ZodObject<
|
|
|
1143
1143
|
event_type: z.ZodLiteral<"tick_size_change">;
|
|
1144
1144
|
market: z.ZodString;
|
|
1145
1145
|
asset_id: z.ZodPipe<z.ZodString, z.ZodTransform<TokenId, string>>;
|
|
1146
|
-
old_tick_size: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string
|
|
1146
|
+
old_tick_size: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>>>;
|
|
1147
1147
|
new_tick_size: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1148
1148
|
timestamp: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<EpochMilliseconds, string>>>>;
|
|
1149
1149
|
}, z.core.$strip>, z.ZodTransform<{
|
|
@@ -1167,9 +1167,9 @@ declare const MarketEventSchema: z.ZodDiscriminatedUnion<[z.ZodPipe<z.ZodObject<
|
|
|
1167
1167
|
event_type: z.ZodLiteral<"best_bid_ask">;
|
|
1168
1168
|
market: z.ZodString;
|
|
1169
1169
|
asset_id: z.ZodPipe<z.ZodString, z.ZodTransform<TokenId, string>>;
|
|
1170
|
-
best_bid: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string
|
|
1171
|
-
best_ask: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string
|
|
1172
|
-
spread: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string
|
|
1170
|
+
best_bid: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>>>;
|
|
1171
|
+
best_ask: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>>>;
|
|
1172
|
+
spread: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>>>;
|
|
1173
1173
|
timestamp: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<EpochMilliseconds, string>>>>;
|
|
1174
1174
|
}, z.core.$strip>, z.ZodTransform<{
|
|
1175
1175
|
topic: "market";
|
|
@@ -1212,11 +1212,11 @@ declare const MarketEventSchema: z.ZodDiscriminatedUnion<[z.ZodPipe<z.ZodObject<
|
|
|
1212
1212
|
active: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
1213
1213
|
clob_token_ids: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
1214
1214
|
sports_market_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1215
|
-
line: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string
|
|
1215
|
+
line: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>>>;
|
|
1216
1216
|
game_start_time: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodPipe<z.ZodUnion<readonly [z.ZodNumber, z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>]>, z.ZodTransform<IsoDateTimeString, number>>, z.ZodPipe<z.ZodString, z.ZodTransform<IsoDateTimeString, string>>]>>>;
|
|
1217
|
-
order_price_min_tick_size: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string
|
|
1217
|
+
order_price_min_tick_size: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>>>;
|
|
1218
1218
|
group_item_title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1219
|
-
taker_base_fee: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string
|
|
1219
|
+
taker_base_fee: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>>>;
|
|
1220
1220
|
fees_enabled: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
1221
1221
|
fee_schedule: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
|
|
1222
1222
|
}, z.core.$strip>, z.ZodTransform<{
|
|
@@ -1405,7 +1405,7 @@ declare const UserEventSchema: z.ZodDiscriminatedUnion<[z.ZodPipe<z.ZodObject<{
|
|
|
1405
1405
|
asset_id: z.ZodPipe<z.ZodString, z.ZodTransform<TokenId, string>>;
|
|
1406
1406
|
side: z.ZodType<OrderSide, unknown, z.core.$ZodTypeInternals<OrderSide, unknown>>;
|
|
1407
1407
|
size: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1408
|
-
fee_rate_bps: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string
|
|
1408
|
+
fee_rate_bps: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>>>;
|
|
1409
1409
|
price: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1410
1410
|
status: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodEnum<typeof TradeStatus>>;
|
|
1411
1411
|
match_time: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<IsoDateTimeString, string>>>>;
|
|
@@ -1423,7 +1423,7 @@ declare const UserEventSchema: z.ZodDiscriminatedUnion<[z.ZodPipe<z.ZodObject<{
|
|
|
1423
1423
|
maker_address: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1424
1424
|
matched_amount: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1425
1425
|
price: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1426
|
-
fee_rate_bps: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string
|
|
1426
|
+
fee_rate_bps: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>>>;
|
|
1427
1427
|
asset_id: z.ZodPipe<z.ZodString, z.ZodTransform<TokenId, string>>;
|
|
1428
1428
|
outcome: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1429
1429
|
outcome_index: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
@@ -1531,7 +1531,7 @@ declare const PerpsTradeEventSchema: z.ZodPipe<z.ZodObject<{
|
|
|
1531
1531
|
ts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
1532
1532
|
sq: z.ZodNumber;
|
|
1533
1533
|
ch: z.ZodString;
|
|
1534
|
-
data: z.ZodPipe<z.ZodObject<{
|
|
1534
|
+
data: z.ZodArray<z.ZodPipe<z.ZodObject<{
|
|
1535
1535
|
tid: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsTradeId, number>>;
|
|
1536
1536
|
iid: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
|
|
1537
1537
|
side: z.ZodEnum<typeof PerpsSide>;
|
|
@@ -1555,7 +1555,7 @@ declare const PerpsTradeEventSchema: z.ZodPipe<z.ZodObject<{
|
|
|
1555
1555
|
qty: DecimalString;
|
|
1556
1556
|
ts: EpochMilliseconds;
|
|
1557
1557
|
hash?: _polymarket_types.TxHash | undefined;
|
|
1558
|
-
}
|
|
1558
|
+
}>>>;
|
|
1559
1559
|
}, z.core.$strip>, z.ZodTransform<{
|
|
1560
1560
|
topic: "perps.trades";
|
|
1561
1561
|
type: "trade";
|
|
@@ -1570,7 +1570,7 @@ declare const PerpsTradeEventSchema: z.ZodPipe<z.ZodObject<{
|
|
|
1570
1570
|
quantity: DecimalString;
|
|
1571
1571
|
timestamp: EpochMilliseconds;
|
|
1572
1572
|
hash: _polymarket_types.TxHash | undefined;
|
|
1573
|
-
};
|
|
1573
|
+
}[];
|
|
1574
1574
|
}, {
|
|
1575
1575
|
ts: EpochMilliseconds;
|
|
1576
1576
|
sq: number;
|
|
@@ -1583,7 +1583,7 @@ declare const PerpsTradeEventSchema: z.ZodPipe<z.ZodObject<{
|
|
|
1583
1583
|
quantity: DecimalString;
|
|
1584
1584
|
timestamp: EpochMilliseconds;
|
|
1585
1585
|
hash: _polymarket_types.TxHash | undefined;
|
|
1586
|
-
};
|
|
1586
|
+
}[];
|
|
1587
1587
|
}>>;
|
|
1588
1588
|
type PerpsTradeEvent = z.infer<typeof PerpsTradeEventSchema>;
|
|
1589
1589
|
declare const PerpsBboEventSchema: z.ZodPipe<z.ZodObject<{
|
|
@@ -1899,7 +1899,7 @@ declare const PerpsMarketDataEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.ZodOb
|
|
|
1899
1899
|
ts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
1900
1900
|
sq: z.ZodNumber;
|
|
1901
1901
|
ch: z.ZodString;
|
|
1902
|
-
data: z.ZodPipe<z.ZodObject<{
|
|
1902
|
+
data: z.ZodArray<z.ZodPipe<z.ZodObject<{
|
|
1903
1903
|
tid: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsTradeId, number>>;
|
|
1904
1904
|
iid: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
|
|
1905
1905
|
side: z.ZodEnum<typeof PerpsSide>;
|
|
@@ -1923,7 +1923,7 @@ declare const PerpsMarketDataEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.ZodOb
|
|
|
1923
1923
|
qty: DecimalString;
|
|
1924
1924
|
ts: EpochMilliseconds;
|
|
1925
1925
|
hash?: _polymarket_types.TxHash | undefined;
|
|
1926
|
-
}
|
|
1926
|
+
}>>>;
|
|
1927
1927
|
}, z.core.$strip>, z.ZodTransform<{
|
|
1928
1928
|
topic: "perps.trades";
|
|
1929
1929
|
type: "trade";
|
|
@@ -1938,7 +1938,7 @@ declare const PerpsMarketDataEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.ZodOb
|
|
|
1938
1938
|
quantity: DecimalString;
|
|
1939
1939
|
timestamp: EpochMilliseconds;
|
|
1940
1940
|
hash: _polymarket_types.TxHash | undefined;
|
|
1941
|
-
};
|
|
1941
|
+
}[];
|
|
1942
1942
|
}, {
|
|
1943
1943
|
ts: EpochMilliseconds;
|
|
1944
1944
|
sq: number;
|
|
@@ -1951,7 +1951,7 @@ declare const PerpsMarketDataEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.ZodOb
|
|
|
1951
1951
|
quantity: DecimalString;
|
|
1952
1952
|
timestamp: EpochMilliseconds;
|
|
1953
1953
|
hash: _polymarket_types.TxHash | undefined;
|
|
1954
|
-
};
|
|
1954
|
+
}[];
|
|
1955
1955
|
}>>, z.ZodPipe<z.ZodObject<{
|
|
1956
1956
|
ts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
1957
1957
|
sq: z.ZodNumber;
|
|
@@ -2615,7 +2615,7 @@ declare const PerpsFillUpdateEventSchema: z.ZodPipe<z.ZodObject<{
|
|
|
2615
2615
|
ts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
2616
2616
|
sq: z.ZodNumber;
|
|
2617
2617
|
ch: z.ZodLiteral<"fills">;
|
|
2618
|
-
data: z.ZodPipe<z.ZodObject<{
|
|
2618
|
+
data: z.ZodArray<z.ZodPipe<z.ZodObject<{
|
|
2619
2619
|
tid: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsTradeId, number>>;
|
|
2620
2620
|
oid: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsOrderId, number>>;
|
|
2621
2621
|
iid: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
|
|
@@ -2663,7 +2663,7 @@ declare const PerpsFillUpdateEventSchema: z.ZodPipe<z.ZodObject<{
|
|
|
2663
2663
|
liq: boolean;
|
|
2664
2664
|
ts: EpochMilliseconds;
|
|
2665
2665
|
coid?: string | undefined;
|
|
2666
|
-
}
|
|
2666
|
+
}>>>;
|
|
2667
2667
|
}, z.core.$strip>, z.ZodTransform<{
|
|
2668
2668
|
type: "fill";
|
|
2669
2669
|
channel: "fills";
|
|
@@ -2685,7 +2685,7 @@ declare const PerpsFillUpdateEventSchema: z.ZodPipe<z.ZodObject<{
|
|
|
2685
2685
|
liquidation: boolean;
|
|
2686
2686
|
timestamp: EpochMilliseconds;
|
|
2687
2687
|
clientOrderId: string | undefined;
|
|
2688
|
-
};
|
|
2688
|
+
}[];
|
|
2689
2689
|
}, {
|
|
2690
2690
|
ts: EpochMilliseconds;
|
|
2691
2691
|
sq: number;
|
|
@@ -2706,7 +2706,7 @@ declare const PerpsFillUpdateEventSchema: z.ZodPipe<z.ZodObject<{
|
|
|
2706
2706
|
liquidation: boolean;
|
|
2707
2707
|
timestamp: EpochMilliseconds;
|
|
2708
2708
|
clientOrderId: string | undefined;
|
|
2709
|
-
};
|
|
2709
|
+
}[];
|
|
2710
2710
|
}>>;
|
|
2711
2711
|
type PerpsFillUpdateEvent = z.infer<typeof PerpsFillUpdateEventSchema>;
|
|
2712
2712
|
declare const PerpsFundingUpdateEventSchema: z.ZodPipe<z.ZodObject<{
|
|
@@ -3262,7 +3262,7 @@ declare const PerpsSessionUpdateEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.Zo
|
|
|
3262
3262
|
ts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
3263
3263
|
sq: z.ZodNumber;
|
|
3264
3264
|
ch: z.ZodLiteral<"fills">;
|
|
3265
|
-
data: z.ZodPipe<z.ZodObject<{
|
|
3265
|
+
data: z.ZodArray<z.ZodPipe<z.ZodObject<{
|
|
3266
3266
|
tid: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsTradeId, number>>;
|
|
3267
3267
|
oid: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsOrderId, number>>;
|
|
3268
3268
|
iid: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
|
|
@@ -3310,7 +3310,7 @@ declare const PerpsSessionUpdateEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.Zo
|
|
|
3310
3310
|
liq: boolean;
|
|
3311
3311
|
ts: EpochMilliseconds;
|
|
3312
3312
|
coid?: string | undefined;
|
|
3313
|
-
}
|
|
3313
|
+
}>>>;
|
|
3314
3314
|
}, z.core.$strip>, z.ZodTransform<{
|
|
3315
3315
|
type: "fill";
|
|
3316
3316
|
channel: "fills";
|
|
@@ -3332,7 +3332,7 @@ declare const PerpsSessionUpdateEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.Zo
|
|
|
3332
3332
|
liquidation: boolean;
|
|
3333
3333
|
timestamp: EpochMilliseconds;
|
|
3334
3334
|
clientOrderId: string | undefined;
|
|
3335
|
-
};
|
|
3335
|
+
}[];
|
|
3336
3336
|
}, {
|
|
3337
3337
|
ts: EpochMilliseconds;
|
|
3338
3338
|
sq: number;
|
|
@@ -3353,7 +3353,7 @@ declare const PerpsSessionUpdateEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.Zo
|
|
|
3353
3353
|
liquidation: boolean;
|
|
3354
3354
|
timestamp: EpochMilliseconds;
|
|
3355
3355
|
clientOrderId: string | undefined;
|
|
3356
|
-
};
|
|
3356
|
+
}[];
|
|
3357
3357
|
}>>, z.ZodPipe<z.ZodObject<{
|
|
3358
3358
|
ts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
3359
3359
|
sq: z.ZodNumber;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {N,K,O,P}from'../chunk-G2DC5MZA.js';import {Ca,Aa,ya,ra,va,sa,b,a,L,R,Wa,Za,V,ga,ka}from'../chunk-BI6DX3LX.js';import {wa,Ja,x,Ga,ea,ia,Z,xa,ca,va as va$1,La}from'../chunk-GTLPG5HR.js';import {z}from'zod';var k=z.preprocess(t=>typeof t=="string"?t.toUpperCase():t,wa),U=(l=>(l.Matched="TRADE_STATUS_MATCHED",l.MatchedNotBroadcasted="TRADE_STATUS_MATCHED_NOT_BROADCASTED",l.Mined="TRADE_STATUS_MINED",l.Confirmed="TRADE_STATUS_CONFIRMED",l.Retrying="TRADE_STATUS_RETRYING",l.Failed="TRADE_STATUS_FAILED",l))(U||{}),ye=z.preprocess(t=>typeof t!="string"||t.startsWith("TRADE_STATUS_")?t:Object.values(U).find(a=>a.slice(13)===t)??t,z.enum(U)),X=(p=>(p.Live="LIVE",p.Matched="MATCHED",p.Delayed="DELAYED",p.Unmatched="UNMATCHED",p.Canceled="CANCELED",p))(X||{}),ue=z.enum(X),J=z.object({price:Ja,size:Ja}),C=z.string().regex(/^\d+$/).transform(t=>x(new Date(Number(t)*1e3).toISOString())),Se=z.string().regex(/^\d+$/).transform(t=>t==="0"?void 0:x(new Date(Number(t)*1e3).toISOString())),ee=z.object({event_type:z.literal("book"),market:z.string(),asset_id:Ga,bids:z.array(J),asks:z.array(J),hash:z.string().nullish(),timestamp:ea.nullish(),min_order_size:Ja.nullish(),tick_size:Ja.nullish(),neg_risk:z.boolean().nullish(),last_trade_price:Ja.nullish()}).transform(({event_type:t,asset_id:r,min_order_size:a,tick_size:s,neg_risk:o,last_trade_price:p,...l})=>({topic:"market",type:t,payload:{...l,tokenId:r,minOrderSize:a,tickSize:s,negRisk:o,lastTradePrice:p}})),Ee=z.object({asset_id:Ga,price:Ja,size:Ja,side:k,hash:z.string().nullish(),best_bid:Ja.nullish(),best_ask:Ja.nullish()}).transform(({asset_id:t,best_bid:r,best_ask:a,...s})=>({...s,tokenId:t,bestBid:r,bestAsk:a})),te=z.object({event_type:z.literal("price_change"),market:z.string(),price_changes:z.array(Ee),timestamp:ea.nullish()}).transform(({event_type:t,price_changes:r,...a})=>({topic:"market",type:t,payload:{...a,priceChanges:r}})),ne=z.object({event_type:z.literal("last_trade_price"),market:z.string(),asset_id:Ga,price:Ja,size:Ja.nullish(),fee_rate_bps:Ja.nullish(),side:k,timestamp:ea.nullish(),transaction_hash:z.string().nullish()}).transform(({event_type:t,asset_id:r,fee_rate_bps:a,transaction_hash:s,...o})=>({topic:"market",type:t,payload:{...o,tokenId:r,feeRateBps:a,transactionHash:s}})),re=z.object({event_type:z.literal("tick_size_change"),market:z.string(),asset_id:Ga,old_tick_size:Ja.nullish(),new_tick_size:Ja,timestamp:ea.nullish()}).transform(({event_type:t,asset_id:r,old_tick_size:a,new_tick_size:s,...o})=>({topic:"market",type:t,payload:{...o,tokenId:r,oldTickSize:a,newTickSize:s}})),ae=z.object({event_type:z.literal("best_bid_ask"),market:z.string(),asset_id:Ga,best_bid:Ja.nullish(),best_ask:Ja.nullish(),spread:Ja.nullish(),timestamp:ea.nullish()}).transform(({event_type:t,asset_id:r,best_bid:a,best_ask:s,...o})=>({topic:"market",type:t,payload:{...o,tokenId:r,bestBid:a,bestAsk:s}})),se=z.object({id:z.string(),ticker:z.string().nullish(),slug:z.string().nullish(),title:z.string().nullish(),description:z.string().nullish()}),ie=z.object({event_type:z.literal("new_market"),id:z.string(),question:z.string().nullish(),market:z.string(),slug:z.string().nullish(),description:z.string().nullish(),assets_ids:z.array(Ga).nullish(),outcomes:z.array(z.string()).nullish(),event_message:se.nullish(),timestamp:ea.nullish(),tags:z.array(z.string()).nullish(),condition_id:Z.nullish(),active:z.boolean().nullish(),clob_token_ids:z.array(z.string()).nullish(),sports_market_type:z.string().nullish(),line:Ja.nullish(),game_start_time:ia.nullish(),order_price_min_tick_size:Ja.nullish(),group_item_title:z.string().nullish(),taker_base_fee:Ja.nullish(),fees_enabled:z.boolean().nullish(),fee_schedule:z.unknown().nullish()}).transform(({event_type:t,assets_ids:r,event_message:a,condition_id:s,clob_token_ids:o,sports_market_type:p,game_start_time:l,order_price_min_tick_size:E,group_item_title:f,taker_base_fee:v,fees_enabled:P,fee_schedule:g,...b})=>({topic:"market",type:t,payload:{...b,tokenIds:r,eventMessage:a,conditionId:s,clobTokenIds:o,sportsMarketType:p,gameStartTime:l,orderPriceMinTickSize:E,groupItemTitle:f,takerBaseFee:v,feesEnabled:P,feeSchedule:g}})),oe=z.object({event_type:z.literal("market_resolved"),id:z.string(),market:z.string(),assets_ids:z.array(Ga).nullish(),winning_asset_id:Ga.nullish(),winning_outcome:z.string().nullish(),event_message:se.nullish(),timestamp:ea.nullish(),tags:z.array(z.string()).nullish()}).transform(({event_type:t,assets_ids:r,winning_asset_id:a,winning_outcome:s,event_message:o,...p})=>({topic:"market",type:t,payload:{...p,tokenIds:r,winningTokenId:a,winningOutcome:s,eventMessage:o}})),pe=(s=>(s.Placement="PLACEMENT",s.Update="UPDATE",s.Cancellation="CANCELLATION",s))(pe||{}),fe=z.enum(pe),ve=z.object({event_type:z.literal("order"),id:z.string(),owner:z.string(),market:z.string(),asset_id:Ga,side:k,order_owner:z.string().nullish(),original_size:Ja,size_matched:Ja,price:Ja,associate_trades:z.array(z.string()).nullish(),outcome:z.string().nullish(),type:fe,created_at:C.nullish(),expiration:Se.nullish(),order_type:xa.nullish(),status:ue.nullish(),maker_address:z.string().nullish(),timestamp:ea}).transform(({event_type:t,type:r,asset_id:a,order_owner:s,original_size:o,size_matched:p,associate_trades:l,created_at:E,expiration:f,order_type:v,maker_address:P,...g})=>({topic:"user",type:t,payload:{...g,orderEventType:r,tokenId:a,orderOwner:s,originalSize:o,sizeMatched:p,associateTrades:l,createdAt:E,expiresAt:f,orderType:v,makerAddress:P}})),Pe=z.object({order_id:z.string(),owner:z.string(),maker_address:z.string().nullish(),matched_amount:Ja,price:Ja,fee_rate_bps:Ja.nullish(),asset_id:Ga,outcome:z.string().nullish(),outcome_index:z.number().int().nullish(),side:k}).transform(({order_id:t,maker_address:r,matched_amount:a,fee_rate_bps:s,asset_id:o,outcome_index:p,...l})=>({...l,orderId:t,makerAddress:r,matchedAmount:a,feeRateBps:s,tokenId:o,outcomeIndex:p})),ge=z.object({event_type:z.literal("trade"),type:z.literal("TRADE"),id:z.string(),taker_order_id:z.string(),market:z.string(),asset_id:Ga,side:k,size:Ja,fee_rate_bps:Ja.nullish(),price:Ja,status:ye,match_time:C.nullish(),matchtime:C.nullish(),last_update:C.nullish(),outcome:z.string().nullish(),owner:z.string(),trade_owner:z.string().nullish(),maker_address:z.string().nullish(),transaction_hash:z.string().nullish(),bucket_index:z.number().int().nullish(),maker_orders:z.array(Pe).nullish(),trader_side:z.union([z.literal("TAKER"),z.literal("MAKER")]).nullish(),timestamp:ea}).transform(({event_type:t,type:r,taker_order_id:a,asset_id:s,fee_rate_bps:o,match_time:p,matchtime:l,last_update:E,trade_owner:f,maker_address:v,transaction_hash:P,bucket_index:g,maker_orders:b,trader_side:de,...he})=>({topic:"user",type:t,payload:{...he,takerOrderId:a,tokenId:s,feeRateBps:o,matchedAt:p??l,updatedAt:E,tradeOwner:f,makerAddress:v,transactionHash:P,bucketIndex:g,makerOrders:b,traderSide:de}})),Pt=z.discriminatedUnion("event_type",[ee,te,ne,re]),gt=z.discriminatedUnion("event_type",[ae,ie,oe]),_t=z.discriminatedUnion("event_type",[ee,te,ne,re,ae,ie,oe]),kt=z.discriminatedUnion("event_type",[ve,ge]);var _e=z.number().int().nonnegative(),ke=z.string().regex(/^trades::\d+$/),xe=z.string().regex(/^bbo::\d+$/),Te=z.string().regex(/^book::\d+$/),Ce=z.string().regex(/^tickers::(all|\d+)$/),be=z.string().regex(/^statistics::(all|\d+)$/),ze=z.string().regex(/^klines::\d+::(1m|5m|15m|1h|4h|1d|1w)$/),Ue=z.string().regex(/^tpsl::\d+$/),Ie=z.enum(["balances","portfolio","orders","fills","funding","deposits","withdrawals"]),u=z.object({ts:ca,sq:_e}),Me=u.extend({ch:ke,data:Ca}).transform(({ch:t,ts:r,sq:a,data:s})=>({topic:"perps.trades",type:"trade",channel:t,timestamp:r,sequence:a,payload:s})),Re=u.extend({ch:xe,data:Aa}).transform(({ch:t,ts:r,sq:a,data:s})=>({topic:"perps.bbo",type:"bbo",channel:t,timestamp:r,sequence:a,payload:s})),Ae=u.extend({ch:Te,data:ya}).transform(({ch:t,ts:r,sq:a,data:s})=>({topic:"perps.book",type:"book",channel:t,timestamp:r,sequence:a,payload:{instrumentId:ce(t),...s}})),Be=u.extend({ch:Ce,data:ra}).transform(({ch:t,ts:r,sq:a,data:s})=>({topic:"perps.tickers",type:"ticker",channel:t,timestamp:r,sequence:a,payload:s})),De=u.extend({ch:be,data:va}).transform(({ch:t,ts:r,sq:a,data:s})=>({topic:"perps.statistics",type:"statistic",channel:t,timestamp:r,sequence:a,payload:s})),qe=u.extend({ch:ze,data:z.array(sa)}).transform(({ch:t,ts:r,sq:a,data:s})=>({topic:"perps.candles",type:"candle",channel:t,timestamp:r,sequence:a,payload:{instrumentId:ce(t),interval:We(t),candles:s}})),Rt=z.union([Me,Re,Ae,Be,De,qe]),we=u.extend({ch:Ie});function S(t,r,a){return we.extend({ch:z.literal(r),data:a}).transform(s=>{let o=s;return {type:t,channel:o.ch,timestamp:o.ts,sequence:o.sq,payload:o.data}})}var Oe=S("balance","balances",L),je=S("portfolio","portfolio",R),Ne=S("order","orders",Wa),Le=S("fill","fills",Za),Fe=S("funding","funding",V),$e=S("deposit","deposits",ga),He=S("withdrawal","withdrawals",ka),Ye=z.object({oid:b,st:z.enum(["untriggered","armed","cancelled","expired"]),reason:z.string().optional()}),Ke=u.extend({ch:Ue,data:Ye.transform(t=>({orderId:t.oid,status:t.st,reason:t.reason}))}).transform(({ch:t,ts:r,sq:a,data:s})=>({type:"tpsl",channel:t,timestamp:r,sequence:a,payload:s})),At=z.union([Oe,je,Ne,Le,Fe,$e,He,Ke]);function ce(t){let[,r]=t.split("::");return a.parse(Number(r))}function We(t){let[,,r]=t.split("::");return r}var Ze=z.object({id:z.string(),body:z.string().nullish(),parentEntityType:va$1.nullish(),parentEntityID:z.number().int().nullish(),parentCommentID:z.string().nullish(),userAddress:z.string().nullish(),replyAddress:z.string().nullish(),createdAt:z.string().nullish(),updatedAt:z.string().nullish(),media:z.array(O).nullish(),profile:K.nullish(),reactions:z.array(N).nullish(),reportCount:z.number().int().nullish(),reactionCount:z.number().int().nullish(),tradeAsset:z.string().nullish()}),Ge=z.object({topic:z.literal("comments"),type:z.literal("comment_created"),timestamp:ca,payload:P}),Qe=z.object({topic:z.literal("comments"),type:z.literal("comment_removed"),timestamp:ca,payload:Ze}),Ve=z.object({topic:z.literal("comments"),type:z.literal("reaction_created"),timestamp:ca,payload:N}),Je=z.object({topic:z.literal("comments"),type:z.literal("reaction_removed"),timestamp:ca,payload:N}),le=z.object({symbol:z.string(),timestamp:ca,value:La}),Xe="prices.crypto.binance",et="prices.crypto.chainlink",tt=z.literal("crypto_prices"),nt=z.literal("crypto_prices_chainlink"),rt=tt.transform(()=>Xe),at=nt.transform(()=>et),st=z.object({topic:rt,type:z.literal("update"),timestamp:ca,payload:le}),it=z.object({topic:at,type:z.literal("update"),timestamp:ca,payload:le}),ot=z.discriminatedUnion("topic",[st,it]),pt=z.object({symbol:z.string(),value:La,full_accuracy_value:Ja.nullish(),timestamp:ca,received_at:ca.nullish(),is_carried_forward:z.boolean().nullish()}).transform(({full_accuracy_value:t,received_at:r,is_carried_forward:a,value:s,...o})=>({...o,value:t??s,receivedAt:r,isCarriedForward:a})),ct=z.object({timestamp:z.number(),value:La}),lt=z.object({symbol:z.string(),data:z.array(ct)}),mt=z.literal("equity_prices"),dt="prices.equity.pyth",me=mt.transform(()=>dt),ht=z.object({topic:me,type:z.literal("update"),timestamp:ca,payload:pt}),yt=z.object({topic:me,type:z.literal("subscribe"),timestamp:ca,payload:lt}),ut=z.discriminatedUnion("type",[ht,yt]),St=z.discriminatedUnion("type",[Ge,Qe,Ve,Je]),Ot=z.discriminatedUnion("topic",[St,ot,ut]);var Et=z.object({gameId:z.number().int(),sportradarGameId:z.string().nullish(),slug:z.string().nullish(),leagueAbbreviation:z.string(),homeTeam:z.string().nullish(),awayTeam:z.string().nullish(),status:z.string(),live:z.boolean(),ended:z.boolean(),score:z.string(),period:z.string().nullish(),elapsed:z.string().nullish(),finishedTimestamp:ia.nullish(),finished_timestamp:ia.nullish(),turn:z.string().nullish()}).transform(({finishedTimestamp:t,finished_timestamp:r,...a})=>({...a,finishedAt:t??r})),Ft=Et.transform(t=>({topic:"sports",type:"sport_result",payload:t}));export{Ge as CommentCreatedEventSchema,Qe as CommentRemovedEventSchema,St as CommentsEventSchema,st as CryptoPricesBinanceEventSchema,it as CryptoPricesChainlinkEventSchema,ot as CryptoPricesEventSchema,gt as CustomMarketEventSchema,ut as EquityPricesEventSchema,yt as EquityPricesSubscribeEventSchema,ht as EquityPricesUpdateEventSchema,ae as MarketBestBidAskEventSchema,ee as MarketBookEventSchema,_t as MarketEventSchema,ne as MarketLastTradePriceEventSchema,te as MarketPriceChangeEventSchema,oe as MarketResolvedEventSchema,re as MarketTickSizeChangeEventSchema,ie as NewMarketEventSchema,Oe as PerpsBalanceUpdateEventSchema,Re as PerpsBboEventSchema,Ae as PerpsBookEventSchema,qe as PerpsCandleEventSchema,$e as PerpsDepositUpdateEventSchema,Le as PerpsFillUpdateEventSchema,Fe as PerpsFundingUpdateEventSchema,Rt as PerpsMarketDataEventSchema,Ne as PerpsOrderUpdateEventSchema,je as PerpsPortfolioUpdateEventSchema,At as PerpsSessionUpdateEventSchema,De as PerpsStatisticEventSchema,Be as PerpsTickerEventSchema,Ke as PerpsTpSlUpdateEventSchema,Me as PerpsTradeEventSchema,He as PerpsWithdrawalUpdateEventSchema,Ve as ReactionCreatedEventSchema,Je as ReactionRemovedEventSchema,Ot as RealtimeEventSchema,Ft as SportsResultEventSchema,Pt as StandardMarketEventSchema,U as TradeStatus,kt as UserEventSchema,ve as UserOrderEventSchema,pe as UserOrderEventType,X as UserOrderStatus,ge as UserTradeEventSchema};//# sourceMappingURL=index.js.map
|
|
1
|
+
import {N,K,O,P}from'../chunk-SRNC7OM5.js';import {Ca,Aa,ya,ra,va,sa,Za,b as b$1,a,L,R,Wa,V,ga,ka}from'../chunk-AG5LLIAW.js';import {wa,Ja,x as x$1,Pa,Ga,ea,ia,Z,xa,ca,va as va$1,La}from'../chunk-KMTIKS2E.js';import {z}from'zod';var x=z.preprocess(t=>typeof t=="string"?t.toUpperCase():t,wa),I=(m=>(m.Matched="TRADE_STATUS_MATCHED",m.MatchedNotBroadcasted="TRADE_STATUS_MATCHED_NOT_BROADCASTED",m.Mined="TRADE_STATUS_MINED",m.Confirmed="TRADE_STATUS_CONFIRMED",m.Retrying="TRADE_STATUS_RETRYING",m.Failed="TRADE_STATUS_FAILED",m))(I||{}),Se=z.preprocess(t=>typeof t!="string"||t.startsWith("TRADE_STATUS_")?t:Object.values(I).find(a=>a.slice(13)===t)??t,z.enum(I)),ee=(p=>(p.Live="LIVE",p.Matched="MATCHED",p.Delayed="DELAYED",p.Unmatched="UNMATCHED",p.Canceled="CANCELED",p))(ee||{}),ue=z.enum(ee),X=z.object({price:Ja,size:Ja}),b=z.string().regex(/^\d+$/).transform(t=>x$1(new Date(Number(t)*1e3).toISOString())),Ee=z.string().regex(/^\d+$/).transform(t=>t==="0"?void 0:x$1(new Date(Number(t)*1e3).toISOString())),te=z.object({event_type:z.literal("book"),market:z.string(),asset_id:Ga,bids:z.array(X),asks:z.array(X),hash:z.string().nullish(),timestamp:ea.nullish(),min_order_size:Pa,tick_size:Pa,neg_risk:z.boolean().nullish(),last_trade_price:Pa}).transform(({event_type:t,asset_id:n,min_order_size:a,tick_size:s,neg_risk:i,last_trade_price:p,...m})=>({topic:"market",type:t,payload:{...m,tokenId:n,minOrderSize:a,tickSize:s,negRisk:i,lastTradePrice:p}})),fe=z.object({asset_id:Ga,price:Ja,size:Ja,side:x,hash:z.string().nullish(),best_bid:Pa,best_ask:Pa}).transform(({asset_id:t,best_bid:n,best_ask:a,...s})=>({...s,tokenId:t,bestBid:n,bestAsk:a})),re=z.object({event_type:z.literal("price_change"),market:z.string(),price_changes:z.array(fe),timestamp:ea.nullish()}).transform(({event_type:t,price_changes:n,...a})=>({topic:"market",type:t,payload:{...a,priceChanges:n}})),ne=z.object({event_type:z.literal("last_trade_price"),market:z.string(),asset_id:Ga,price:Ja,size:Pa,fee_rate_bps:Pa,side:x,timestamp:ea.nullish(),transaction_hash:z.string().nullish()}).transform(({event_type:t,asset_id:n,fee_rate_bps:a,transaction_hash:s,...i})=>({topic:"market",type:t,payload:{...i,tokenId:n,feeRateBps:a,transactionHash:s}})),ae=z.object({event_type:z.literal("tick_size_change"),market:z.string(),asset_id:Ga,old_tick_size:Pa,new_tick_size:Ja,timestamp:ea.nullish()}).transform(({event_type:t,asset_id:n,old_tick_size:a,new_tick_size:s,...i})=>({topic:"market",type:t,payload:{...i,tokenId:n,oldTickSize:a,newTickSize:s}})),se=z.object({event_type:z.literal("best_bid_ask"),market:z.string(),asset_id:Ga,best_bid:Pa,best_ask:Pa,spread:Pa,timestamp:ea.nullish()}).transform(({event_type:t,asset_id:n,best_bid:a,best_ask:s,...i})=>({topic:"market",type:t,payload:{...i,tokenId:n,bestBid:a,bestAsk:s}})),ie=z.object({id:z.string(),ticker:z.string().nullish(),slug:z.string().nullish(),title:z.string().nullish(),description:z.string().nullish()}),oe=z.object({event_type:z.literal("new_market"),id:z.string(),question:z.string().nullish(),market:z.string(),slug:z.string().nullish(),description:z.string().nullish(),assets_ids:z.array(Ga).nullish(),outcomes:z.array(z.string()).nullish(),event_message:ie.nullish(),timestamp:ea.nullish(),tags:z.array(z.string()).nullish(),condition_id:Z.nullish(),active:z.boolean().nullish(),clob_token_ids:z.array(z.string()).nullish(),sports_market_type:z.string().nullish(),line:Pa,game_start_time:ia.nullish(),order_price_min_tick_size:Pa,group_item_title:z.string().nullish(),taker_base_fee:Pa,fees_enabled:z.boolean().nullish(),fee_schedule:z.unknown().nullish()}).transform(({event_type:t,assets_ids:n,event_message:a,condition_id:s,clob_token_ids:i,sports_market_type:p,game_start_time:m,order_price_min_tick_size:f,group_item_title:v,taker_base_fee:P,fees_enabled:g,fee_schedule:_,...z})=>({topic:"market",type:t,payload:{...z,tokenIds:n,eventMessage:a,conditionId:s,clobTokenIds:i,sportsMarketType:p,gameStartTime:m,orderPriceMinTickSize:f,groupItemTitle:v,takerBaseFee:P,feesEnabled:g,feeSchedule:_}})),pe=z.object({event_type:z.literal("market_resolved"),id:z.string(),market:z.string(),assets_ids:z.array(Ga).nullish(),winning_asset_id:Ga.nullish(),winning_outcome:z.string().nullish(),event_message:ie.nullish(),timestamp:ea.nullish(),tags:z.array(z.string()).nullish()}).transform(({event_type:t,assets_ids:n,winning_asset_id:a,winning_outcome:s,event_message:i,...p})=>({topic:"market",type:t,payload:{...p,tokenIds:n,winningTokenId:a,winningOutcome:s,eventMessage:i}})),ce=(s=>(s.Placement="PLACEMENT",s.Update="UPDATE",s.Cancellation="CANCELLATION",s))(ce||{}),ve=z.enum(ce),Pe=z.object({event_type:z.literal("order"),id:z.string(),owner:z.string(),market:z.string(),asset_id:Ga,side:x,order_owner:z.string().nullish(),original_size:Ja,size_matched:Ja,price:Ja,associate_trades:z.array(z.string()).nullish(),outcome:z.string().nullish(),type:ve,created_at:b.nullish(),expiration:Ee.nullish(),order_type:xa.nullish(),status:ue.nullish(),maker_address:z.string().nullish(),timestamp:ea}).transform(({event_type:t,type:n,asset_id:a,order_owner:s,original_size:i,size_matched:p,associate_trades:m,created_at:f,expiration:v,order_type:P,maker_address:g,..._})=>({topic:"user",type:t,payload:{..._,orderEventType:n,tokenId:a,orderOwner:s,originalSize:i,sizeMatched:p,associateTrades:m,createdAt:f,expiresAt:v,orderType:P,makerAddress:g}})),ge=z.object({order_id:z.string(),owner:z.string(),maker_address:z.string().nullish(),matched_amount:Ja,price:Ja,fee_rate_bps:Pa,asset_id:Ga,outcome:z.string().nullish(),outcome_index:z.number().int().nullish(),side:x}).transform(({order_id:t,maker_address:n,matched_amount:a,fee_rate_bps:s,asset_id:i,outcome_index:p,...m})=>({...m,orderId:t,makerAddress:n,matchedAmount:a,feeRateBps:s,tokenId:i,outcomeIndex:p})),_e=z.object({event_type:z.literal("trade"),type:z.literal("TRADE"),id:z.string(),taker_order_id:z.string(),market:z.string(),asset_id:Ga,side:x,size:Ja,fee_rate_bps:Pa,price:Ja,status:Se,match_time:b.nullish(),matchtime:b.nullish(),last_update:b.nullish(),outcome:z.string().nullish(),owner:z.string(),trade_owner:z.string().nullish(),maker_address:z.string().nullish(),transaction_hash:z.string().nullish(),bucket_index:z.number().int().nullish(),maker_orders:z.array(ge).nullish(),trader_side:z.union([z.literal("TAKER"),z.literal("MAKER")]).nullish(),timestamp:ea}).transform(({event_type:t,type:n,taker_order_id:a,asset_id:s,fee_rate_bps:i,match_time:p,matchtime:m,last_update:f,trade_owner:v,maker_address:P,transaction_hash:g,bucket_index:_,maker_orders:z,trader_side:he,...ye})=>({topic:"user",type:t,payload:{...ye,takerOrderId:a,tokenId:s,feeRateBps:i,matchedAt:p??m,updatedAt:f,tradeOwner:v,makerAddress:P,transactionHash:g,bucketIndex:_,makerOrders:z,traderSide:he}})),gt=z.discriminatedUnion("event_type",[te,re,ne,ae]),_t=z.discriminatedUnion("event_type",[se,oe,pe]),kt=z.discriminatedUnion("event_type",[te,re,ne,ae,se,oe,pe]),xt=z.discriminatedUnion("event_type",[Pe,_e]);var ke=z.number().int().nonnegative(),xe=z.string().regex(/^trades::\d+$/),Te=z.string().regex(/^bbo::\d+$/),Ce=z.string().regex(/^book::\d+$/),be=z.string().regex(/^tickers::(all|\d+)$/),ze=z.string().regex(/^statistics::(all|\d+)$/),Ue=z.string().regex(/^klines::\d+::(1m|5m|15m|1h|4h|1d|1w)$/),Ie=z.string().regex(/^tpsl::\d+$/),Me=z.enum(["balances","portfolio","orders","fills","funding","deposits","withdrawals"]),u=z.object({ts:ca,sq:ke}),Re=u.extend({ch:xe,data:z.array(Ca)}).transform(({ch:t,ts:n,sq:a,data:s})=>({topic:"perps.trades",type:"trade",channel:t,timestamp:n,sequence:a,payload:s})),Ae=u.extend({ch:Te,data:Aa}).transform(({ch:t,ts:n,sq:a,data:s})=>({topic:"perps.bbo",type:"bbo",channel:t,timestamp:n,sequence:a,payload:s})),Be=u.extend({ch:Ce,data:ya}).transform(({ch:t,ts:n,sq:a,data:s})=>({topic:"perps.book",type:"book",channel:t,timestamp:n,sequence:a,payload:{instrumentId:me(t),...s}})),De=u.extend({ch:be,data:ra}).transform(({ch:t,ts:n,sq:a,data:s})=>({topic:"perps.tickers",type:"ticker",channel:t,timestamp:n,sequence:a,payload:s})),qe=u.extend({ch:ze,data:va}).transform(({ch:t,ts:n,sq:a,data:s})=>({topic:"perps.statistics",type:"statistic",channel:t,timestamp:n,sequence:a,payload:s})),we=u.extend({ch:Ue,data:z.array(sa)}).transform(({ch:t,ts:n,sq:a,data:s})=>({topic:"perps.candles",type:"candle",channel:t,timestamp:n,sequence:a,payload:{instrumentId:me(t),interval:Ze(t),candles:s}})),At=z.union([Re,Ae,Be,De,qe,we]),Oe=u.extend({ch:Me});function E(t,n,a){return Oe.extend({ch:z.literal(n),data:a}).transform(s=>{let i=s;return {type:t,channel:i.ch,timestamp:i.ts,sequence:i.sq,payload:i.data}})}var je=E("balance","balances",L),Ne=E("portfolio","portfolio",R),Le=E("order","orders",Wa),Fe=E("fill","fills",z.array(Za)),$e=E("funding","funding",V),He=E("deposit","deposits",ga),Ye=E("withdrawal","withdrawals",ka),Ke=z.object({oid:b$1,st:z.enum(["untriggered","armed","cancelled","expired"]),reason:z.string().optional()}),We=u.extend({ch:Ie,data:Ke.transform(t=>({orderId:t.oid,status:t.st,reason:t.reason}))}).transform(({ch:t,ts:n,sq:a,data:s})=>({type:"tpsl",channel:t,timestamp:n,sequence:a,payload:s})),Bt=z.union([je,Ne,Le,Fe,$e,He,Ye,We]);function me(t){let[,n]=t.split("::");return a.parse(Number(n))}function Ze(t){let[,,n]=t.split("::");return n}var Ge=z.object({id:z.string(),body:z.string().nullish(),parentEntityType:va$1.nullish(),parentEntityID:z.number().int().nullish(),parentCommentID:z.string().nullish(),userAddress:z.string().nullish(),replyAddress:z.string().nullish(),createdAt:z.string().nullish(),updatedAt:z.string().nullish(),media:z.array(O).nullish(),profile:K.nullish(),reactions:z.array(N).nullish(),reportCount:z.number().int().nullish(),reactionCount:z.number().int().nullish(),tradeAsset:z.string().nullish()}),Qe=z.object({topic:z.literal("comments"),type:z.literal("comment_created"),timestamp:ca,payload:P}),Ve=z.object({topic:z.literal("comments"),type:z.literal("comment_removed"),timestamp:ca,payload:Ge}),Je=z.object({topic:z.literal("comments"),type:z.literal("reaction_created"),timestamp:ca,payload:N}),Xe=z.object({topic:z.literal("comments"),type:z.literal("reaction_removed"),timestamp:ca,payload:N}),le=z.object({symbol:z.string(),timestamp:ca,value:La}),et="prices.crypto.binance",tt="prices.crypto.chainlink",rt=z.literal("crypto_prices"),nt=z.literal("crypto_prices_chainlink"),at=rt.transform(()=>et),st=nt.transform(()=>tt),it=z.object({topic:at,type:z.literal("update"),timestamp:ca,payload:le}),ot=z.object({topic:st,type:z.literal("update"),timestamp:ca,payload:le}),pt=z.discriminatedUnion("topic",[it,ot]),ct=z.object({symbol:z.string(),value:La,full_accuracy_value:Ja.nullish(),timestamp:ca,received_at:ca.nullish(),is_carried_forward:z.boolean().nullish()}).transform(({full_accuracy_value:t,received_at:n,is_carried_forward:a,value:s,...i})=>({...i,value:t??s,receivedAt:n,isCarriedForward:a})),mt=z.object({timestamp:z.number(),value:La}),lt=z.object({symbol:z.string(),data:z.array(mt)}),dt=z.literal("equity_prices"),ht="prices.equity.pyth",de=dt.transform(()=>ht),yt=z.object({topic:de,type:z.literal("update"),timestamp:ca,payload:ct}),St=z.object({topic:de,type:z.literal("subscribe"),timestamp:ca,payload:lt}),ut=z.discriminatedUnion("type",[yt,St]),Et=z.discriminatedUnion("type",[Qe,Ve,Je,Xe]),jt=z.discriminatedUnion("topic",[Et,pt,ut]);var ft=z.object({gameId:z.number().int(),sportradarGameId:z.string().nullish(),slug:z.string().nullish(),leagueAbbreviation:z.string(),homeTeam:z.string().nullish(),awayTeam:z.string().nullish(),status:z.string(),live:z.boolean(),ended:z.boolean(),score:z.string(),period:z.string().nullish(),elapsed:z.string().nullish(),finishedTimestamp:ia.nullish(),finished_timestamp:ia.nullish(),turn:z.string().nullish()}).transform(({finishedTimestamp:t,finished_timestamp:n,...a})=>({...a,finishedAt:t??n})),$t=ft.transform(t=>({topic:"sports",type:"sport_result",payload:t}));export{Qe as CommentCreatedEventSchema,Ve as CommentRemovedEventSchema,Et as CommentsEventSchema,it as CryptoPricesBinanceEventSchema,ot as CryptoPricesChainlinkEventSchema,pt as CryptoPricesEventSchema,_t as CustomMarketEventSchema,ut as EquityPricesEventSchema,St as EquityPricesSubscribeEventSchema,yt as EquityPricesUpdateEventSchema,se as MarketBestBidAskEventSchema,te as MarketBookEventSchema,kt as MarketEventSchema,ne as MarketLastTradePriceEventSchema,re as MarketPriceChangeEventSchema,pe as MarketResolvedEventSchema,ae as MarketTickSizeChangeEventSchema,oe as NewMarketEventSchema,je as PerpsBalanceUpdateEventSchema,Ae as PerpsBboEventSchema,Be as PerpsBookEventSchema,we as PerpsCandleEventSchema,He as PerpsDepositUpdateEventSchema,Fe as PerpsFillUpdateEventSchema,$e as PerpsFundingUpdateEventSchema,At as PerpsMarketDataEventSchema,Le as PerpsOrderUpdateEventSchema,Ne as PerpsPortfolioUpdateEventSchema,Bt as PerpsSessionUpdateEventSchema,qe as PerpsStatisticEventSchema,De as PerpsTickerEventSchema,We as PerpsTpSlUpdateEventSchema,Re as PerpsTradeEventSchema,Ye as PerpsWithdrawalUpdateEventSchema,Je as ReactionCreatedEventSchema,Xe as ReactionRemovedEventSchema,jt as RealtimeEventSchema,$t as SportsResultEventSchema,gt as StandardMarketEventSchema,I as TradeStatus,xt as UserEventSchema,Pe as UserOrderEventSchema,ce as UserOrderEventType,ee as UserOrderStatus,_e as UserTradeEventSchema};//# sourceMappingURL=index.js.map
|
|
2
2
|
//# sourceMappingURL=index.js.map
|