@polymarket/bindings 0.11.0 → 0.13.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/chunk-2FRDSBWY.js +2 -0
- package/dist/chunk-2FRDSBWY.js.map +1 -0
- package/dist/{chunk-RGWF46B7.js → chunk-3IZ4N7C2.js} +2 -2
- package/dist/{chunk-RGWF46B7.js.map → chunk-3IZ4N7C2.js.map} +1 -1
- package/dist/chunk-Z6SGQXSJ.js +2 -0
- package/dist/chunk-Z6SGQXSJ.js.map +1 -0
- package/dist/clob/index.d.ts +15 -10
- package/dist/clob/index.js +1 -1
- package/dist/clob/index.js.map +1 -1
- package/dist/combos/index.js +1 -1
- package/dist/{comment-C-jBbhp7.d.ts → comment-CKJIqOZS.d.ts} +372 -2
- package/dist/data/index.d.ts +211 -12
- package/dist/data/index.js +1 -1
- package/dist/data/index.js.map +1 -1
- package/dist/gamma/index.d.ts +16 -1
- package/dist/gamma/index.js +1 -1
- package/dist/gamma/index.js.map +1 -1
- package/dist/index.d.ts +7 -1
- package/dist/index.js +1 -1
- package/dist/{orders-CAELACaR.d.ts → orders-BV68_6ST.d.ts} +1150 -72
- package/dist/perps/index.d.ts +993 -9
- package/dist/perps/index.js +1 -1
- package/dist/perps/index.js.map +1 -1
- package/dist/relayer/index.js +1 -1
- package/dist/subscriptions/index.d.ts +748 -98
- package/dist/subscriptions/index.js +1 -1
- package/dist/subscriptions/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-NILFT6EF.js +0 -2
- package/dist/chunk-NILFT6EF.js.map +0 -1
- package/dist/chunk-V3FFOW6W.js +0 -2
- package/dist/chunk-V3FFOW6W.js.map +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { PositionId, TokenId, ConditionId, DecimalString, EpochMilliseconds, IsoDateTimeString, OrderSide, OrderType, TradeStatus, BaseUnits, CommentId, CommentParentEntityType, EventId, SeriesId, ImageOptimizationId } from '../index.js';
|
|
3
|
-
import { P as PerpsInstrumentId,
|
|
3
|
+
import { P as PerpsInstrumentId, a as PerpsBuilderEarningId, b as PerpsTradeId, c as PerpsOrderId, d as PerpsClientOrderId, e as PerpsLiquidityRole, f as PerpsKlineInterval, g as PerpsDepositStatus, h as PerpsSide, i as PerpsFundingPaymentId, j as PerpsNotificationId, k as PerpsNotificationType, l as PerpsNotificationOrderType, m as PerpsMarginType, n as PerpsTimeInForce, o as PerpsOrderStatus, p as PerpsChaseId, q as PerpsTpSlKind, r as PerpsTpSlScope, s as PerpsWithdrawalId, t as PerpsKnownWithdrawalStatus } from '../orders-BV68_6ST.js';
|
|
4
4
|
import * as _polymarket_types from '@polymarket/types';
|
|
5
|
-
import { R as ReactionType } from '../comment-
|
|
5
|
+
import { R as ReactionType } from '../comment-CKJIqOZS.js';
|
|
6
6
|
|
|
7
7
|
declare enum UserOrderStatus {
|
|
8
8
|
Live = "LIVE",
|
|
@@ -1734,6 +1734,7 @@ declare const PerpsTradeEventSchema: z.ZodPipe<z.ZodObject<{
|
|
|
1734
1734
|
tid: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsTradeId, number>>;
|
|
1735
1735
|
iid: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
|
|
1736
1736
|
side: z.ZodEnum<typeof PerpsSide>;
|
|
1737
|
+
settlement: z.ZodDefault<z.ZodBoolean>;
|
|
1737
1738
|
p: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1738
1739
|
qty: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1739
1740
|
ts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
@@ -1742,6 +1743,7 @@ declare const PerpsTradeEventSchema: z.ZodPipe<z.ZodObject<{
|
|
|
1742
1743
|
tradeId: PerpsTradeId;
|
|
1743
1744
|
instrumentId: PerpsInstrumentId;
|
|
1744
1745
|
side: PerpsSide;
|
|
1746
|
+
settlement: boolean;
|
|
1745
1747
|
price: DecimalString;
|
|
1746
1748
|
quantity: DecimalString;
|
|
1747
1749
|
timestamp: EpochMilliseconds;
|
|
@@ -1750,6 +1752,7 @@ declare const PerpsTradeEventSchema: z.ZodPipe<z.ZodObject<{
|
|
|
1750
1752
|
tid: PerpsTradeId;
|
|
1751
1753
|
iid: PerpsInstrumentId;
|
|
1752
1754
|
side: PerpsSide;
|
|
1755
|
+
settlement: boolean;
|
|
1753
1756
|
p: DecimalString;
|
|
1754
1757
|
qty: DecimalString;
|
|
1755
1758
|
ts: EpochMilliseconds;
|
|
@@ -1765,6 +1768,7 @@ declare const PerpsTradeEventSchema: z.ZodPipe<z.ZodObject<{
|
|
|
1765
1768
|
tradeId: PerpsTradeId;
|
|
1766
1769
|
instrumentId: PerpsInstrumentId;
|
|
1767
1770
|
side: PerpsSide;
|
|
1771
|
+
settlement: boolean;
|
|
1768
1772
|
price: DecimalString;
|
|
1769
1773
|
quantity: DecimalString;
|
|
1770
1774
|
timestamp: EpochMilliseconds;
|
|
@@ -1778,6 +1782,7 @@ declare const PerpsTradeEventSchema: z.ZodPipe<z.ZodObject<{
|
|
|
1778
1782
|
tradeId: PerpsTradeId;
|
|
1779
1783
|
instrumentId: PerpsInstrumentId;
|
|
1780
1784
|
side: PerpsSide;
|
|
1785
|
+
settlement: boolean;
|
|
1781
1786
|
price: DecimalString;
|
|
1782
1787
|
quantity: DecimalString;
|
|
1783
1788
|
timestamp: EpochMilliseconds;
|
|
@@ -2138,6 +2143,7 @@ declare const PerpsMarketDataEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.ZodOb
|
|
|
2138
2143
|
tid: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsTradeId, number>>;
|
|
2139
2144
|
iid: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
|
|
2140
2145
|
side: z.ZodEnum<typeof PerpsSide>;
|
|
2146
|
+
settlement: z.ZodDefault<z.ZodBoolean>;
|
|
2141
2147
|
p: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
2142
2148
|
qty: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
2143
2149
|
ts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
@@ -2146,6 +2152,7 @@ declare const PerpsMarketDataEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.ZodOb
|
|
|
2146
2152
|
tradeId: PerpsTradeId;
|
|
2147
2153
|
instrumentId: PerpsInstrumentId;
|
|
2148
2154
|
side: PerpsSide;
|
|
2155
|
+
settlement: boolean;
|
|
2149
2156
|
price: DecimalString;
|
|
2150
2157
|
quantity: DecimalString;
|
|
2151
2158
|
timestamp: EpochMilliseconds;
|
|
@@ -2154,6 +2161,7 @@ declare const PerpsMarketDataEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.ZodOb
|
|
|
2154
2161
|
tid: PerpsTradeId;
|
|
2155
2162
|
iid: PerpsInstrumentId;
|
|
2156
2163
|
side: PerpsSide;
|
|
2164
|
+
settlement: boolean;
|
|
2157
2165
|
p: DecimalString;
|
|
2158
2166
|
qty: DecimalString;
|
|
2159
2167
|
ts: EpochMilliseconds;
|
|
@@ -2169,6 +2177,7 @@ declare const PerpsMarketDataEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.ZodOb
|
|
|
2169
2177
|
tradeId: PerpsTradeId;
|
|
2170
2178
|
instrumentId: PerpsInstrumentId;
|
|
2171
2179
|
side: PerpsSide;
|
|
2180
|
+
settlement: boolean;
|
|
2172
2181
|
price: DecimalString;
|
|
2173
2182
|
quantity: DecimalString;
|
|
2174
2183
|
timestamp: EpochMilliseconds;
|
|
@@ -2182,6 +2191,7 @@ declare const PerpsMarketDataEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.ZodOb
|
|
|
2182
2191
|
tradeId: PerpsTradeId;
|
|
2183
2192
|
instrumentId: PerpsInstrumentId;
|
|
2184
2193
|
side: PerpsSide;
|
|
2194
|
+
settlement: boolean;
|
|
2185
2195
|
price: DecimalString;
|
|
2186
2196
|
quantity: DecimalString;
|
|
2187
2197
|
timestamp: EpochMilliseconds;
|
|
@@ -2736,6 +2746,7 @@ declare const PerpsOrderUpdateEventSchema: z.ZodPipe<z.ZodObject<{
|
|
|
2736
2746
|
cts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
2737
2747
|
uts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
2738
2748
|
coid: z.ZodOptional<z.ZodString>;
|
|
2749
|
+
chid: z.ZodOptional<z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsChaseId, number>>>;
|
|
2739
2750
|
tpsl: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodObject<{
|
|
2740
2751
|
kind: z.ZodEnum<typeof PerpsTpSlKind>;
|
|
2741
2752
|
scope: z.ZodEnum<typeof PerpsTpSlScope>;
|
|
@@ -2743,6 +2754,10 @@ declare const PerpsOrderUpdateEventSchema: z.ZodPipe<z.ZodObject<{
|
|
|
2743
2754
|
parent_oid: z.ZodOptional<z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsOrderId, number>>>;
|
|
2744
2755
|
armed_qty: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
|
|
2745
2756
|
slip_bps: z.ZodOptional<z.ZodNumber>;
|
|
2757
|
+
trail_bps: z.ZodOptional<z.ZodNumber>;
|
|
2758
|
+
act: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
|
|
2759
|
+
trail_anchor: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
|
|
2760
|
+
trail_active: z.ZodOptional<z.ZodBoolean>;
|
|
2746
2761
|
}, z.core.$strip>, z.ZodTransform<{
|
|
2747
2762
|
kind: PerpsTpSlKind;
|
|
2748
2763
|
scope: PerpsTpSlScope;
|
|
@@ -2750,6 +2765,10 @@ declare const PerpsOrderUpdateEventSchema: z.ZodPipe<z.ZodObject<{
|
|
|
2750
2765
|
parentOrderId: PerpsOrderId | undefined;
|
|
2751
2766
|
armedQuantity: DecimalString | undefined;
|
|
2752
2767
|
slippageBps: number | undefined;
|
|
2768
|
+
trailingBps: number | undefined;
|
|
2769
|
+
activationPrice: DecimalString | undefined;
|
|
2770
|
+
trailingAnchor: DecimalString | undefined;
|
|
2771
|
+
trailingActive: boolean | undefined;
|
|
2753
2772
|
}, {
|
|
2754
2773
|
kind: PerpsTpSlKind;
|
|
2755
2774
|
scope: PerpsTpSlScope;
|
|
@@ -2757,8 +2776,39 @@ declare const PerpsOrderUpdateEventSchema: z.ZodPipe<z.ZodObject<{
|
|
|
2757
2776
|
parent_oid?: PerpsOrderId | undefined;
|
|
2758
2777
|
armed_qty?: DecimalString | undefined;
|
|
2759
2778
|
slip_bps?: number | undefined;
|
|
2779
|
+
trail_bps?: number | undefined;
|
|
2780
|
+
act?: DecimalString | undefined;
|
|
2781
|
+
trail_anchor?: DecimalString | undefined;
|
|
2782
|
+
trail_active?: boolean | undefined;
|
|
2760
2783
|
}>>>>;
|
|
2784
|
+
builder: z.ZodOptional<z.ZodPipe<z.ZodObject<{
|
|
2785
|
+
address: z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_types.EvmAddress, string>>;
|
|
2786
|
+
fee_rate: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
|
|
2787
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
2788
|
+
address: _polymarket_types.EvmAddress;
|
|
2789
|
+
feeRate: DecimalString;
|
|
2790
|
+
}, {
|
|
2791
|
+
address: _polymarket_types.EvmAddress;
|
|
2792
|
+
fee_rate: DecimalString;
|
|
2793
|
+
}>>>;
|
|
2761
2794
|
}, z.core.$strip>, z.ZodTransform<{
|
|
2795
|
+
builder?: {
|
|
2796
|
+
address: _polymarket_types.EvmAddress;
|
|
2797
|
+
feeRate: DecimalString;
|
|
2798
|
+
} | undefined;
|
|
2799
|
+
tpSl: {
|
|
2800
|
+
kind: PerpsTpSlKind;
|
|
2801
|
+
scope: PerpsTpSlScope;
|
|
2802
|
+
triggerPrice: DecimalString;
|
|
2803
|
+
parentOrderId: PerpsOrderId | undefined;
|
|
2804
|
+
armedQuantity: DecimalString | undefined;
|
|
2805
|
+
slippageBps: number | undefined;
|
|
2806
|
+
trailingBps: number | undefined;
|
|
2807
|
+
activationPrice: DecimalString | undefined;
|
|
2808
|
+
trailingAnchor: DecimalString | undefined;
|
|
2809
|
+
trailingActive: boolean | undefined;
|
|
2810
|
+
} | undefined;
|
|
2811
|
+
chaseId?: PerpsChaseId | undefined;
|
|
2762
2812
|
id: PerpsOrderId;
|
|
2763
2813
|
instrumentId: PerpsInstrumentId;
|
|
2764
2814
|
side: OrderSide;
|
|
@@ -2773,14 +2823,6 @@ declare const PerpsOrderUpdateEventSchema: z.ZodPipe<z.ZodObject<{
|
|
|
2773
2823
|
createdTimestamp: EpochMilliseconds;
|
|
2774
2824
|
updatedTimestamp: EpochMilliseconds;
|
|
2775
2825
|
clientOrderId: string | undefined;
|
|
2776
|
-
tpSl: {
|
|
2777
|
-
kind: PerpsTpSlKind;
|
|
2778
|
-
scope: PerpsTpSlScope;
|
|
2779
|
-
triggerPrice: DecimalString;
|
|
2780
|
-
parentOrderId: PerpsOrderId | undefined;
|
|
2781
|
-
armedQuantity: DecimalString | undefined;
|
|
2782
|
-
slippageBps: number | undefined;
|
|
2783
|
-
} | undefined;
|
|
2784
2826
|
}, {
|
|
2785
2827
|
oid: PerpsOrderId;
|
|
2786
2828
|
iid: PerpsInstrumentId;
|
|
@@ -2796,6 +2838,7 @@ declare const PerpsOrderUpdateEventSchema: z.ZodPipe<z.ZodObject<{
|
|
|
2796
2838
|
cts: EpochMilliseconds;
|
|
2797
2839
|
uts: EpochMilliseconds;
|
|
2798
2840
|
coid?: string | undefined;
|
|
2841
|
+
chid?: PerpsChaseId | undefined;
|
|
2799
2842
|
tpsl?: {
|
|
2800
2843
|
kind: PerpsTpSlKind;
|
|
2801
2844
|
scope: PerpsTpSlScope;
|
|
@@ -2803,7 +2846,15 @@ declare const PerpsOrderUpdateEventSchema: z.ZodPipe<z.ZodObject<{
|
|
|
2803
2846
|
parentOrderId: PerpsOrderId | undefined;
|
|
2804
2847
|
armedQuantity: DecimalString | undefined;
|
|
2805
2848
|
slippageBps: number | undefined;
|
|
2849
|
+
trailingBps: number | undefined;
|
|
2850
|
+
activationPrice: DecimalString | undefined;
|
|
2851
|
+
trailingAnchor: DecimalString | undefined;
|
|
2852
|
+
trailingActive: boolean | undefined;
|
|
2806
2853
|
} | null | undefined;
|
|
2854
|
+
builder?: {
|
|
2855
|
+
address: _polymarket_types.EvmAddress;
|
|
2856
|
+
feeRate: DecimalString;
|
|
2857
|
+
} | undefined;
|
|
2807
2858
|
}>>;
|
|
2808
2859
|
}, z.core.$strip>, z.ZodTransform<{
|
|
2809
2860
|
type: "order";
|
|
@@ -2811,6 +2862,23 @@ declare const PerpsOrderUpdateEventSchema: z.ZodPipe<z.ZodObject<{
|
|
|
2811
2862
|
timestamp: number;
|
|
2812
2863
|
sequence: number;
|
|
2813
2864
|
payload: {
|
|
2865
|
+
builder?: {
|
|
2866
|
+
address: _polymarket_types.EvmAddress;
|
|
2867
|
+
feeRate: DecimalString;
|
|
2868
|
+
} | undefined;
|
|
2869
|
+
tpSl: {
|
|
2870
|
+
kind: PerpsTpSlKind;
|
|
2871
|
+
scope: PerpsTpSlScope;
|
|
2872
|
+
triggerPrice: DecimalString;
|
|
2873
|
+
parentOrderId: PerpsOrderId | undefined;
|
|
2874
|
+
armedQuantity: DecimalString | undefined;
|
|
2875
|
+
slippageBps: number | undefined;
|
|
2876
|
+
trailingBps: number | undefined;
|
|
2877
|
+
activationPrice: DecimalString | undefined;
|
|
2878
|
+
trailingAnchor: DecimalString | undefined;
|
|
2879
|
+
trailingActive: boolean | undefined;
|
|
2880
|
+
} | undefined;
|
|
2881
|
+
chaseId?: PerpsChaseId | undefined;
|
|
2814
2882
|
id: PerpsOrderId;
|
|
2815
2883
|
instrumentId: PerpsInstrumentId;
|
|
2816
2884
|
side: OrderSide;
|
|
@@ -2825,6 +2893,16 @@ declare const PerpsOrderUpdateEventSchema: z.ZodPipe<z.ZodObject<{
|
|
|
2825
2893
|
createdTimestamp: EpochMilliseconds;
|
|
2826
2894
|
updatedTimestamp: EpochMilliseconds;
|
|
2827
2895
|
clientOrderId: string | undefined;
|
|
2896
|
+
};
|
|
2897
|
+
}, {
|
|
2898
|
+
ts: EpochMilliseconds;
|
|
2899
|
+
sq: number;
|
|
2900
|
+
ch: "orders";
|
|
2901
|
+
data: {
|
|
2902
|
+
builder?: {
|
|
2903
|
+
address: _polymarket_types.EvmAddress;
|
|
2904
|
+
feeRate: DecimalString;
|
|
2905
|
+
} | undefined;
|
|
2828
2906
|
tpSl: {
|
|
2829
2907
|
kind: PerpsTpSlKind;
|
|
2830
2908
|
scope: PerpsTpSlScope;
|
|
@@ -2832,13 +2910,12 @@ declare const PerpsOrderUpdateEventSchema: z.ZodPipe<z.ZodObject<{
|
|
|
2832
2910
|
parentOrderId: PerpsOrderId | undefined;
|
|
2833
2911
|
armedQuantity: DecimalString | undefined;
|
|
2834
2912
|
slippageBps: number | undefined;
|
|
2913
|
+
trailingBps: number | undefined;
|
|
2914
|
+
activationPrice: DecimalString | undefined;
|
|
2915
|
+
trailingAnchor: DecimalString | undefined;
|
|
2916
|
+
trailingActive: boolean | undefined;
|
|
2835
2917
|
} | undefined;
|
|
2836
|
-
|
|
2837
|
-
}, {
|
|
2838
|
-
ts: EpochMilliseconds;
|
|
2839
|
-
sq: number;
|
|
2840
|
-
ch: "orders";
|
|
2841
|
-
data: {
|
|
2918
|
+
chaseId?: PerpsChaseId | undefined;
|
|
2842
2919
|
id: PerpsOrderId;
|
|
2843
2920
|
instrumentId: PerpsInstrumentId;
|
|
2844
2921
|
side: OrderSide;
|
|
@@ -2853,14 +2930,6 @@ declare const PerpsOrderUpdateEventSchema: z.ZodPipe<z.ZodObject<{
|
|
|
2853
2930
|
createdTimestamp: EpochMilliseconds;
|
|
2854
2931
|
updatedTimestamp: EpochMilliseconds;
|
|
2855
2932
|
clientOrderId: string | undefined;
|
|
2856
|
-
tpSl: {
|
|
2857
|
-
kind: PerpsTpSlKind;
|
|
2858
|
-
scope: PerpsTpSlScope;
|
|
2859
|
-
triggerPrice: DecimalString;
|
|
2860
|
-
parentOrderId: PerpsOrderId | undefined;
|
|
2861
|
-
armedQuantity: DecimalString | undefined;
|
|
2862
|
-
slippageBps: number | undefined;
|
|
2863
|
-
} | undefined;
|
|
2864
2933
|
};
|
|
2865
2934
|
}>>;
|
|
2866
2935
|
/**
|
|
@@ -2879,10 +2948,23 @@ declare const PerpsFillUpdateEventSchema: z.ZodPipe<z.ZodObject<{
|
|
|
2879
2948
|
oid: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsOrderId, number>>;
|
|
2880
2949
|
iid: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
|
|
2881
2950
|
side: z.ZodEnum<typeof PerpsSide>;
|
|
2951
|
+
settlement: z.ZodDefault<z.ZodBoolean>;
|
|
2882
2952
|
p: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
2883
2953
|
qty: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
2884
2954
|
taker: z.ZodBoolean;
|
|
2885
|
-
fee: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string
|
|
2955
|
+
fee: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
|
|
2956
|
+
builder_fee: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>>;
|
|
2957
|
+
total_fee: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>>;
|
|
2958
|
+
builder: z.ZodOptional<z.ZodPipe<z.ZodObject<{
|
|
2959
|
+
address: z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_types.EvmAddress, string>>;
|
|
2960
|
+
fee_rate: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
|
|
2961
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
2962
|
+
address: _polymarket_types.EvmAddress;
|
|
2963
|
+
feeRate: DecimalString;
|
|
2964
|
+
}, {
|
|
2965
|
+
address: _polymarket_types.EvmAddress;
|
|
2966
|
+
fee_rate: DecimalString;
|
|
2967
|
+
}>>>;
|
|
2886
2968
|
fea: z.ZodString;
|
|
2887
2969
|
psz: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
2888
2970
|
pep: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
@@ -2891,26 +2973,34 @@ declare const PerpsFillUpdateEventSchema: z.ZodPipe<z.ZodObject<{
|
|
|
2891
2973
|
ts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
2892
2974
|
coid: z.ZodOptional<z.ZodString>;
|
|
2893
2975
|
}, z.core.$strip>, z.ZodTransform<{
|
|
2976
|
+
feeAsset: string;
|
|
2977
|
+
previousSize: DecimalString;
|
|
2978
|
+
previousEntryPrice: DecimalString;
|
|
2979
|
+
pnl: DecimalString;
|
|
2980
|
+
liquidation: boolean;
|
|
2981
|
+
timestamp: EpochMilliseconds;
|
|
2982
|
+
clientOrderId: string | undefined;
|
|
2983
|
+
builder?: {
|
|
2984
|
+
address: _polymarket_types.EvmAddress;
|
|
2985
|
+
feeRate: DecimalString;
|
|
2986
|
+
} | undefined;
|
|
2894
2987
|
tradeId: PerpsTradeId;
|
|
2895
2988
|
orderId: PerpsOrderId;
|
|
2896
2989
|
instrumentId: PerpsInstrumentId;
|
|
2897
2990
|
side: PerpsSide;
|
|
2991
|
+
settlement: boolean;
|
|
2898
2992
|
price: DecimalString;
|
|
2899
2993
|
quantity: DecimalString;
|
|
2900
2994
|
taker: boolean;
|
|
2901
2995
|
fee: DecimalString;
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
previousEntryPrice: DecimalString;
|
|
2905
|
-
pnl: DecimalString;
|
|
2906
|
-
liquidation: boolean;
|
|
2907
|
-
timestamp: EpochMilliseconds;
|
|
2908
|
-
clientOrderId: string | undefined;
|
|
2996
|
+
builderFee: DecimalString;
|
|
2997
|
+
totalFee: DecimalString;
|
|
2909
2998
|
}, {
|
|
2910
2999
|
tid: PerpsTradeId;
|
|
2911
3000
|
oid: PerpsOrderId;
|
|
2912
3001
|
iid: PerpsInstrumentId;
|
|
2913
3002
|
side: PerpsSide;
|
|
3003
|
+
settlement: boolean;
|
|
2914
3004
|
p: DecimalString;
|
|
2915
3005
|
qty: DecimalString;
|
|
2916
3006
|
taker: boolean;
|
|
@@ -2921,6 +3011,12 @@ declare const PerpsFillUpdateEventSchema: z.ZodPipe<z.ZodObject<{
|
|
|
2921
3011
|
pnl: DecimalString;
|
|
2922
3012
|
liq: boolean;
|
|
2923
3013
|
ts: EpochMilliseconds;
|
|
3014
|
+
builder_fee?: DecimalString | undefined;
|
|
3015
|
+
total_fee?: DecimalString | undefined;
|
|
3016
|
+
builder?: {
|
|
3017
|
+
address: _polymarket_types.EvmAddress;
|
|
3018
|
+
feeRate: DecimalString;
|
|
3019
|
+
} | undefined;
|
|
2924
3020
|
coid?: string | undefined;
|
|
2925
3021
|
}>>>;
|
|
2926
3022
|
}, z.core.$strip>, z.ZodTransform<{
|
|
@@ -2929,14 +3025,34 @@ declare const PerpsFillUpdateEventSchema: z.ZodPipe<z.ZodObject<{
|
|
|
2929
3025
|
timestamp: number;
|
|
2930
3026
|
sequence: number;
|
|
2931
3027
|
payload: {
|
|
3028
|
+
feeAsset: string;
|
|
3029
|
+
previousSize: DecimalString;
|
|
3030
|
+
previousEntryPrice: DecimalString;
|
|
3031
|
+
pnl: DecimalString;
|
|
3032
|
+
liquidation: boolean;
|
|
3033
|
+
timestamp: EpochMilliseconds;
|
|
3034
|
+
clientOrderId: string | undefined;
|
|
3035
|
+
builder?: {
|
|
3036
|
+
address: _polymarket_types.EvmAddress;
|
|
3037
|
+
feeRate: DecimalString;
|
|
3038
|
+
} | undefined;
|
|
2932
3039
|
tradeId: PerpsTradeId;
|
|
2933
3040
|
orderId: PerpsOrderId;
|
|
2934
3041
|
instrumentId: PerpsInstrumentId;
|
|
2935
3042
|
side: PerpsSide;
|
|
3043
|
+
settlement: boolean;
|
|
2936
3044
|
price: DecimalString;
|
|
2937
3045
|
quantity: DecimalString;
|
|
2938
3046
|
taker: boolean;
|
|
2939
3047
|
fee: DecimalString;
|
|
3048
|
+
builderFee: DecimalString;
|
|
3049
|
+
totalFee: DecimalString;
|
|
3050
|
+
}[];
|
|
3051
|
+
}, {
|
|
3052
|
+
ts: EpochMilliseconds;
|
|
3053
|
+
sq: number;
|
|
3054
|
+
ch: "fills";
|
|
3055
|
+
data: {
|
|
2940
3056
|
feeAsset: string;
|
|
2941
3057
|
previousSize: DecimalString;
|
|
2942
3058
|
previousEntryPrice: DecimalString;
|
|
@@ -2944,33 +3060,145 @@ declare const PerpsFillUpdateEventSchema: z.ZodPipe<z.ZodObject<{
|
|
|
2944
3060
|
liquidation: boolean;
|
|
2945
3061
|
timestamp: EpochMilliseconds;
|
|
2946
3062
|
clientOrderId: string | undefined;
|
|
2947
|
-
|
|
2948
|
-
|
|
2949
|
-
|
|
2950
|
-
|
|
2951
|
-
ch: "fills";
|
|
2952
|
-
data: {
|
|
3063
|
+
builder?: {
|
|
3064
|
+
address: _polymarket_types.EvmAddress;
|
|
3065
|
+
feeRate: DecimalString;
|
|
3066
|
+
} | undefined;
|
|
2953
3067
|
tradeId: PerpsTradeId;
|
|
2954
3068
|
orderId: PerpsOrderId;
|
|
2955
3069
|
instrumentId: PerpsInstrumentId;
|
|
2956
3070
|
side: PerpsSide;
|
|
3071
|
+
settlement: boolean;
|
|
2957
3072
|
price: DecimalString;
|
|
2958
3073
|
quantity: DecimalString;
|
|
2959
3074
|
taker: boolean;
|
|
2960
3075
|
fee: DecimalString;
|
|
2961
|
-
|
|
2962
|
-
|
|
2963
|
-
previousEntryPrice: DecimalString;
|
|
2964
|
-
pnl: DecimalString;
|
|
2965
|
-
liquidation: boolean;
|
|
2966
|
-
timestamp: EpochMilliseconds;
|
|
2967
|
-
clientOrderId: string | undefined;
|
|
3076
|
+
builderFee: DecimalString;
|
|
3077
|
+
totalFee: DecimalString;
|
|
2968
3078
|
}[];
|
|
2969
3079
|
}>>;
|
|
2970
3080
|
/**
|
|
2971
3081
|
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
2972
3082
|
*/
|
|
2973
3083
|
type PerpsFillUpdateEvent = z.infer<typeof PerpsFillUpdateEventSchema>;
|
|
3084
|
+
/**
|
|
3085
|
+
* Live builder receipts. Sequence numbers are sparse engine sequences.
|
|
3086
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
3087
|
+
*/
|
|
3088
|
+
declare const PerpsBuilderFillUpdateEventSchema: z.ZodPipe<z.ZodObject<{
|
|
3089
|
+
ts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
3090
|
+
sq: z.ZodNumber;
|
|
3091
|
+
ch: z.ZodLiteral<"builderFills">;
|
|
3092
|
+
data: z.ZodArray<z.ZodPipe<z.ZodObject<{
|
|
3093
|
+
earning_id: z.ZodPipe<z.ZodString, z.ZodTransform<PerpsBuilderEarningId, string>>;
|
|
3094
|
+
trade_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsTradeId, number>>;
|
|
3095
|
+
order_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsOrderId, number>>;
|
|
3096
|
+
instrument_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
|
|
3097
|
+
trader: z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_types.EvmAddress, string>>;
|
|
3098
|
+
buy: z.ZodBoolean;
|
|
3099
|
+
price: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
|
|
3100
|
+
quantity: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
|
|
3101
|
+
client_order_id: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<PerpsClientOrderId, string>>>;
|
|
3102
|
+
side: z.ZodEnum<typeof PerpsLiquidityRole>;
|
|
3103
|
+
timestamp: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
3104
|
+
sequence: z.ZodNumber;
|
|
3105
|
+
notional: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
|
|
3106
|
+
fee_asset: z.ZodString;
|
|
3107
|
+
fee: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
|
|
3108
|
+
builder_fee: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
|
|
3109
|
+
total_fee: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
|
|
3110
|
+
fee_rate: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
|
|
3111
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
3112
|
+
liquidityRole: PerpsLiquidityRole;
|
|
3113
|
+
timestamp: EpochMilliseconds;
|
|
3114
|
+
sequence: number;
|
|
3115
|
+
notional: DecimalString;
|
|
3116
|
+
feeAsset: string;
|
|
3117
|
+
fee: DecimalString;
|
|
3118
|
+
builderFee: DecimalString;
|
|
3119
|
+
totalFee: DecimalString;
|
|
3120
|
+
feeRate: DecimalString;
|
|
3121
|
+
clientOrderId?: PerpsClientOrderId | undefined;
|
|
3122
|
+
earningId: PerpsBuilderEarningId;
|
|
3123
|
+
tradeId: PerpsTradeId;
|
|
3124
|
+
orderId: PerpsOrderId;
|
|
3125
|
+
instrumentId: PerpsInstrumentId;
|
|
3126
|
+
trader: _polymarket_types.EvmAddress;
|
|
3127
|
+
side: OrderSide;
|
|
3128
|
+
price: DecimalString;
|
|
3129
|
+
quantity: DecimalString;
|
|
3130
|
+
}, {
|
|
3131
|
+
earning_id: PerpsBuilderEarningId;
|
|
3132
|
+
trade_id: PerpsTradeId;
|
|
3133
|
+
order_id: PerpsOrderId;
|
|
3134
|
+
instrument_id: PerpsInstrumentId;
|
|
3135
|
+
trader: _polymarket_types.EvmAddress;
|
|
3136
|
+
buy: boolean;
|
|
3137
|
+
price: DecimalString;
|
|
3138
|
+
quantity: DecimalString;
|
|
3139
|
+
side: PerpsLiquidityRole;
|
|
3140
|
+
timestamp: EpochMilliseconds;
|
|
3141
|
+
sequence: number;
|
|
3142
|
+
notional: DecimalString;
|
|
3143
|
+
fee_asset: string;
|
|
3144
|
+
fee: DecimalString;
|
|
3145
|
+
builder_fee: DecimalString;
|
|
3146
|
+
total_fee: DecimalString;
|
|
3147
|
+
fee_rate: DecimalString;
|
|
3148
|
+
client_order_id?: PerpsClientOrderId | undefined;
|
|
3149
|
+
}>>>;
|
|
3150
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
3151
|
+
type: "builderFill";
|
|
3152
|
+
channel: "builderFills";
|
|
3153
|
+
timestamp: EpochMilliseconds;
|
|
3154
|
+
sequence: number;
|
|
3155
|
+
payload: {
|
|
3156
|
+
liquidityRole: PerpsLiquidityRole;
|
|
3157
|
+
timestamp: EpochMilliseconds;
|
|
3158
|
+
sequence: number;
|
|
3159
|
+
notional: DecimalString;
|
|
3160
|
+
feeAsset: string;
|
|
3161
|
+
fee: DecimalString;
|
|
3162
|
+
builderFee: DecimalString;
|
|
3163
|
+
totalFee: DecimalString;
|
|
3164
|
+
feeRate: DecimalString;
|
|
3165
|
+
clientOrderId?: PerpsClientOrderId | undefined;
|
|
3166
|
+
earningId: PerpsBuilderEarningId;
|
|
3167
|
+
tradeId: PerpsTradeId;
|
|
3168
|
+
orderId: PerpsOrderId;
|
|
3169
|
+
instrumentId: PerpsInstrumentId;
|
|
3170
|
+
trader: _polymarket_types.EvmAddress;
|
|
3171
|
+
side: OrderSide;
|
|
3172
|
+
price: DecimalString;
|
|
3173
|
+
quantity: DecimalString;
|
|
3174
|
+
}[];
|
|
3175
|
+
}, {
|
|
3176
|
+
ts: EpochMilliseconds;
|
|
3177
|
+
sq: number;
|
|
3178
|
+
ch: "builderFills";
|
|
3179
|
+
data: {
|
|
3180
|
+
liquidityRole: PerpsLiquidityRole;
|
|
3181
|
+
timestamp: EpochMilliseconds;
|
|
3182
|
+
sequence: number;
|
|
3183
|
+
notional: DecimalString;
|
|
3184
|
+
feeAsset: string;
|
|
3185
|
+
fee: DecimalString;
|
|
3186
|
+
builderFee: DecimalString;
|
|
3187
|
+
totalFee: DecimalString;
|
|
3188
|
+
feeRate: DecimalString;
|
|
3189
|
+
clientOrderId?: PerpsClientOrderId | undefined;
|
|
3190
|
+
earningId: PerpsBuilderEarningId;
|
|
3191
|
+
tradeId: PerpsTradeId;
|
|
3192
|
+
orderId: PerpsOrderId;
|
|
3193
|
+
instrumentId: PerpsInstrumentId;
|
|
3194
|
+
trader: _polymarket_types.EvmAddress;
|
|
3195
|
+
side: OrderSide;
|
|
3196
|
+
price: DecimalString;
|
|
3197
|
+
quantity: DecimalString;
|
|
3198
|
+
}[];
|
|
3199
|
+
}>>;
|
|
3200
|
+
/** @experimental This API may change in a breaking way in any release, including patch releases. */
|
|
3201
|
+
type PerpsBuilderFillUpdateEvent = z.infer<typeof PerpsBuilderFillUpdateEventSchema>;
|
|
2974
3202
|
/**
|
|
2975
3203
|
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
2976
3204
|
*/
|
|
@@ -3302,6 +3530,33 @@ declare const PerpsNotificationUpdateEventSchema: z.ZodPipe<z.ZodObject<{
|
|
|
3302
3530
|
pnl: DecimalString | null;
|
|
3303
3531
|
margin_type: PerpsMarginType;
|
|
3304
3532
|
via_backstop: boolean;
|
|
3533
|
+
}>>, z.ZodPipe<z.ZodObject<{
|
|
3534
|
+
id: z.ZodPipe<z.ZodUUID, z.ZodTransform<PerpsNotificationId, string>>;
|
|
3535
|
+
type: z.ZodLiteral<PerpsNotificationType.PositionDeleveraged>;
|
|
3536
|
+
instrument_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
|
|
3537
|
+
side: z.ZodEnum<typeof PerpsSide>;
|
|
3538
|
+
size_closed: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
3539
|
+
price: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
3540
|
+
pnl: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
3541
|
+
margin_type: z.ZodEnum<typeof PerpsMarginType>;
|
|
3542
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
3543
|
+
id: PerpsNotificationId;
|
|
3544
|
+
type: PerpsNotificationType.PositionDeleveraged;
|
|
3545
|
+
instrumentId: PerpsInstrumentId;
|
|
3546
|
+
side: PerpsSide;
|
|
3547
|
+
sizeClosed: DecimalString;
|
|
3548
|
+
price: DecimalString;
|
|
3549
|
+
pnl: DecimalString;
|
|
3550
|
+
marginType: PerpsMarginType;
|
|
3551
|
+
}, {
|
|
3552
|
+
id: PerpsNotificationId;
|
|
3553
|
+
type: PerpsNotificationType.PositionDeleveraged;
|
|
3554
|
+
instrument_id: PerpsInstrumentId;
|
|
3555
|
+
side: PerpsSide;
|
|
3556
|
+
size_closed: DecimalString;
|
|
3557
|
+
price: DecimalString;
|
|
3558
|
+
pnl: DecimalString;
|
|
3559
|
+
margin_type: PerpsMarginType;
|
|
3305
3560
|
}>>], "type">;
|
|
3306
3561
|
}, z.core.$strip>, z.ZodTransform<{
|
|
3307
3562
|
type: "notification";
|
|
@@ -3355,6 +3610,15 @@ declare const PerpsNotificationUpdateEventSchema: z.ZodPipe<z.ZodObject<{
|
|
|
3355
3610
|
pnl: DecimalString | null;
|
|
3356
3611
|
marginType: PerpsMarginType;
|
|
3357
3612
|
viaBackstop: boolean;
|
|
3613
|
+
} | {
|
|
3614
|
+
id: PerpsNotificationId;
|
|
3615
|
+
type: PerpsNotificationType.PositionDeleveraged;
|
|
3616
|
+
instrumentId: PerpsInstrumentId;
|
|
3617
|
+
side: PerpsSide;
|
|
3618
|
+
sizeClosed: DecimalString;
|
|
3619
|
+
price: DecimalString;
|
|
3620
|
+
pnl: DecimalString;
|
|
3621
|
+
marginType: PerpsMarginType;
|
|
3358
3622
|
};
|
|
3359
3623
|
}, {
|
|
3360
3624
|
ts: EpochMilliseconds;
|
|
@@ -3407,6 +3671,15 @@ declare const PerpsNotificationUpdateEventSchema: z.ZodPipe<z.ZodObject<{
|
|
|
3407
3671
|
pnl: DecimalString | null;
|
|
3408
3672
|
marginType: PerpsMarginType;
|
|
3409
3673
|
viaBackstop: boolean;
|
|
3674
|
+
} | {
|
|
3675
|
+
id: PerpsNotificationId;
|
|
3676
|
+
type: PerpsNotificationType.PositionDeleveraged;
|
|
3677
|
+
instrumentId: PerpsInstrumentId;
|
|
3678
|
+
side: PerpsSide;
|
|
3679
|
+
sizeClosed: DecimalString;
|
|
3680
|
+
price: DecimalString;
|
|
3681
|
+
pnl: DecimalString;
|
|
3682
|
+
marginType: PerpsMarginType;
|
|
3410
3683
|
};
|
|
3411
3684
|
}>>;
|
|
3412
3685
|
/**
|
|
@@ -3427,6 +3700,7 @@ declare const PerpsNotificationsResyncFrameSchema: z.ZodPipe<z.ZodObject<{
|
|
|
3427
3700
|
type: z.ZodLiteral<"resync">;
|
|
3428
3701
|
}, z.core.$strip>, z.ZodTransform<{
|
|
3429
3702
|
type: "resync";
|
|
3703
|
+
reason: "server";
|
|
3430
3704
|
channel: "notifications";
|
|
3431
3705
|
timestamp: EpochMilliseconds;
|
|
3432
3706
|
sequence: number;
|
|
@@ -3450,15 +3724,16 @@ declare const PerpsTpSlUpdateEventSchema: z.ZodPipe<z.ZodObject<{
|
|
|
3450
3724
|
untriggered: "untriggered";
|
|
3451
3725
|
armed: "armed";
|
|
3452
3726
|
expired: "expired";
|
|
3727
|
+
activated: "activated";
|
|
3453
3728
|
}>;
|
|
3454
3729
|
reason: z.ZodOptional<z.ZodString>;
|
|
3455
3730
|
}, z.core.$strip>, z.ZodTransform<{
|
|
3456
3731
|
orderId: PerpsOrderId;
|
|
3457
|
-
status: "cancelled" | "untriggered" | "armed" | "expired";
|
|
3732
|
+
status: "cancelled" | "untriggered" | "armed" | "expired" | "activated";
|
|
3458
3733
|
reason: string | undefined;
|
|
3459
3734
|
}, {
|
|
3460
3735
|
oid: PerpsOrderId;
|
|
3461
|
-
st: "cancelled" | "untriggered" | "armed" | "expired";
|
|
3736
|
+
st: "cancelled" | "untriggered" | "armed" | "expired" | "activated";
|
|
3462
3737
|
reason?: string | undefined;
|
|
3463
3738
|
}>>;
|
|
3464
3739
|
}, z.core.$strip>, z.ZodTransform<{
|
|
@@ -3468,7 +3743,7 @@ declare const PerpsTpSlUpdateEventSchema: z.ZodPipe<z.ZodObject<{
|
|
|
3468
3743
|
sequence: number;
|
|
3469
3744
|
payload: {
|
|
3470
3745
|
orderId: PerpsOrderId;
|
|
3471
|
-
status: "cancelled" | "untriggered" | "armed" | "expired";
|
|
3746
|
+
status: "cancelled" | "untriggered" | "armed" | "expired" | "activated";
|
|
3472
3747
|
reason: string | undefined;
|
|
3473
3748
|
};
|
|
3474
3749
|
}, {
|
|
@@ -3477,7 +3752,7 @@ declare const PerpsTpSlUpdateEventSchema: z.ZodPipe<z.ZodObject<{
|
|
|
3477
3752
|
ch: string;
|
|
3478
3753
|
data: {
|
|
3479
3754
|
orderId: PerpsOrderId;
|
|
3480
|
-
status: "cancelled" | "untriggered" | "armed" | "expired";
|
|
3755
|
+
status: "cancelled" | "untriggered" | "armed" | "expired" | "activated";
|
|
3481
3756
|
reason: string | undefined;
|
|
3482
3757
|
};
|
|
3483
3758
|
}>>;
|
|
@@ -3714,6 +3989,7 @@ declare const PerpsSessionUpdateEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.Zo
|
|
|
3714
3989
|
cts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
3715
3990
|
uts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
3716
3991
|
coid: z.ZodOptional<z.ZodString>;
|
|
3992
|
+
chid: z.ZodOptional<z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsChaseId, number>>>;
|
|
3717
3993
|
tpsl: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodObject<{
|
|
3718
3994
|
kind: z.ZodEnum<typeof PerpsTpSlKind>;
|
|
3719
3995
|
scope: z.ZodEnum<typeof PerpsTpSlScope>;
|
|
@@ -3721,6 +3997,10 @@ declare const PerpsSessionUpdateEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.Zo
|
|
|
3721
3997
|
parent_oid: z.ZodOptional<z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsOrderId, number>>>;
|
|
3722
3998
|
armed_qty: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
|
|
3723
3999
|
slip_bps: z.ZodOptional<z.ZodNumber>;
|
|
4000
|
+
trail_bps: z.ZodOptional<z.ZodNumber>;
|
|
4001
|
+
act: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
|
|
4002
|
+
trail_anchor: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
|
|
4003
|
+
trail_active: z.ZodOptional<z.ZodBoolean>;
|
|
3724
4004
|
}, z.core.$strip>, z.ZodTransform<{
|
|
3725
4005
|
kind: PerpsTpSlKind;
|
|
3726
4006
|
scope: PerpsTpSlScope;
|
|
@@ -3728,6 +4008,10 @@ declare const PerpsSessionUpdateEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.Zo
|
|
|
3728
4008
|
parentOrderId: PerpsOrderId | undefined;
|
|
3729
4009
|
armedQuantity: DecimalString | undefined;
|
|
3730
4010
|
slippageBps: number | undefined;
|
|
4011
|
+
trailingBps: number | undefined;
|
|
4012
|
+
activationPrice: DecimalString | undefined;
|
|
4013
|
+
trailingAnchor: DecimalString | undefined;
|
|
4014
|
+
trailingActive: boolean | undefined;
|
|
3731
4015
|
}, {
|
|
3732
4016
|
kind: PerpsTpSlKind;
|
|
3733
4017
|
scope: PerpsTpSlScope;
|
|
@@ -3735,8 +4019,39 @@ declare const PerpsSessionUpdateEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.Zo
|
|
|
3735
4019
|
parent_oid?: PerpsOrderId | undefined;
|
|
3736
4020
|
armed_qty?: DecimalString | undefined;
|
|
3737
4021
|
slip_bps?: number | undefined;
|
|
4022
|
+
trail_bps?: number | undefined;
|
|
4023
|
+
act?: DecimalString | undefined;
|
|
4024
|
+
trail_anchor?: DecimalString | undefined;
|
|
4025
|
+
trail_active?: boolean | undefined;
|
|
3738
4026
|
}>>>>;
|
|
4027
|
+
builder: z.ZodOptional<z.ZodPipe<z.ZodObject<{
|
|
4028
|
+
address: z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_types.EvmAddress, string>>;
|
|
4029
|
+
fee_rate: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
|
|
4030
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
4031
|
+
address: _polymarket_types.EvmAddress;
|
|
4032
|
+
feeRate: DecimalString;
|
|
4033
|
+
}, {
|
|
4034
|
+
address: _polymarket_types.EvmAddress;
|
|
4035
|
+
fee_rate: DecimalString;
|
|
4036
|
+
}>>>;
|
|
3739
4037
|
}, z.core.$strip>, z.ZodTransform<{
|
|
4038
|
+
builder?: {
|
|
4039
|
+
address: _polymarket_types.EvmAddress;
|
|
4040
|
+
feeRate: DecimalString;
|
|
4041
|
+
} | undefined;
|
|
4042
|
+
tpSl: {
|
|
4043
|
+
kind: PerpsTpSlKind;
|
|
4044
|
+
scope: PerpsTpSlScope;
|
|
4045
|
+
triggerPrice: DecimalString;
|
|
4046
|
+
parentOrderId: PerpsOrderId | undefined;
|
|
4047
|
+
armedQuantity: DecimalString | undefined;
|
|
4048
|
+
slippageBps: number | undefined;
|
|
4049
|
+
trailingBps: number | undefined;
|
|
4050
|
+
activationPrice: DecimalString | undefined;
|
|
4051
|
+
trailingAnchor: DecimalString | undefined;
|
|
4052
|
+
trailingActive: boolean | undefined;
|
|
4053
|
+
} | undefined;
|
|
4054
|
+
chaseId?: PerpsChaseId | undefined;
|
|
3740
4055
|
id: PerpsOrderId;
|
|
3741
4056
|
instrumentId: PerpsInstrumentId;
|
|
3742
4057
|
side: OrderSide;
|
|
@@ -3751,14 +4066,6 @@ declare const PerpsSessionUpdateEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.Zo
|
|
|
3751
4066
|
createdTimestamp: EpochMilliseconds;
|
|
3752
4067
|
updatedTimestamp: EpochMilliseconds;
|
|
3753
4068
|
clientOrderId: string | undefined;
|
|
3754
|
-
tpSl: {
|
|
3755
|
-
kind: PerpsTpSlKind;
|
|
3756
|
-
scope: PerpsTpSlScope;
|
|
3757
|
-
triggerPrice: DecimalString;
|
|
3758
|
-
parentOrderId: PerpsOrderId | undefined;
|
|
3759
|
-
armedQuantity: DecimalString | undefined;
|
|
3760
|
-
slippageBps: number | undefined;
|
|
3761
|
-
} | undefined;
|
|
3762
4069
|
}, {
|
|
3763
4070
|
oid: PerpsOrderId;
|
|
3764
4071
|
iid: PerpsInstrumentId;
|
|
@@ -3774,6 +4081,7 @@ declare const PerpsSessionUpdateEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.Zo
|
|
|
3774
4081
|
cts: EpochMilliseconds;
|
|
3775
4082
|
uts: EpochMilliseconds;
|
|
3776
4083
|
coid?: string | undefined;
|
|
4084
|
+
chid?: PerpsChaseId | undefined;
|
|
3777
4085
|
tpsl?: {
|
|
3778
4086
|
kind: PerpsTpSlKind;
|
|
3779
4087
|
scope: PerpsTpSlScope;
|
|
@@ -3781,7 +4089,15 @@ declare const PerpsSessionUpdateEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.Zo
|
|
|
3781
4089
|
parentOrderId: PerpsOrderId | undefined;
|
|
3782
4090
|
armedQuantity: DecimalString | undefined;
|
|
3783
4091
|
slippageBps: number | undefined;
|
|
4092
|
+
trailingBps: number | undefined;
|
|
4093
|
+
activationPrice: DecimalString | undefined;
|
|
4094
|
+
trailingAnchor: DecimalString | undefined;
|
|
4095
|
+
trailingActive: boolean | undefined;
|
|
3784
4096
|
} | null | undefined;
|
|
4097
|
+
builder?: {
|
|
4098
|
+
address: _polymarket_types.EvmAddress;
|
|
4099
|
+
feeRate: DecimalString;
|
|
4100
|
+
} | undefined;
|
|
3785
4101
|
}>>;
|
|
3786
4102
|
}, z.core.$strip>, z.ZodTransform<{
|
|
3787
4103
|
type: "order";
|
|
@@ -3789,6 +4105,23 @@ declare const PerpsSessionUpdateEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.Zo
|
|
|
3789
4105
|
timestamp: number;
|
|
3790
4106
|
sequence: number;
|
|
3791
4107
|
payload: {
|
|
4108
|
+
builder?: {
|
|
4109
|
+
address: _polymarket_types.EvmAddress;
|
|
4110
|
+
feeRate: DecimalString;
|
|
4111
|
+
} | undefined;
|
|
4112
|
+
tpSl: {
|
|
4113
|
+
kind: PerpsTpSlKind;
|
|
4114
|
+
scope: PerpsTpSlScope;
|
|
4115
|
+
triggerPrice: DecimalString;
|
|
4116
|
+
parentOrderId: PerpsOrderId | undefined;
|
|
4117
|
+
armedQuantity: DecimalString | undefined;
|
|
4118
|
+
slippageBps: number | undefined;
|
|
4119
|
+
trailingBps: number | undefined;
|
|
4120
|
+
activationPrice: DecimalString | undefined;
|
|
4121
|
+
trailingAnchor: DecimalString | undefined;
|
|
4122
|
+
trailingActive: boolean | undefined;
|
|
4123
|
+
} | undefined;
|
|
4124
|
+
chaseId?: PerpsChaseId | undefined;
|
|
3792
4125
|
id: PerpsOrderId;
|
|
3793
4126
|
instrumentId: PerpsInstrumentId;
|
|
3794
4127
|
side: OrderSide;
|
|
@@ -3803,6 +4136,16 @@ declare const PerpsSessionUpdateEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.Zo
|
|
|
3803
4136
|
createdTimestamp: EpochMilliseconds;
|
|
3804
4137
|
updatedTimestamp: EpochMilliseconds;
|
|
3805
4138
|
clientOrderId: string | undefined;
|
|
4139
|
+
};
|
|
4140
|
+
}, {
|
|
4141
|
+
ts: EpochMilliseconds;
|
|
4142
|
+
sq: number;
|
|
4143
|
+
ch: "orders";
|
|
4144
|
+
data: {
|
|
4145
|
+
builder?: {
|
|
4146
|
+
address: _polymarket_types.EvmAddress;
|
|
4147
|
+
feeRate: DecimalString;
|
|
4148
|
+
} | undefined;
|
|
3806
4149
|
tpSl: {
|
|
3807
4150
|
kind: PerpsTpSlKind;
|
|
3808
4151
|
scope: PerpsTpSlScope;
|
|
@@ -3810,13 +4153,12 @@ declare const PerpsSessionUpdateEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.Zo
|
|
|
3810
4153
|
parentOrderId: PerpsOrderId | undefined;
|
|
3811
4154
|
armedQuantity: DecimalString | undefined;
|
|
3812
4155
|
slippageBps: number | undefined;
|
|
4156
|
+
trailingBps: number | undefined;
|
|
4157
|
+
activationPrice: DecimalString | undefined;
|
|
4158
|
+
trailingAnchor: DecimalString | undefined;
|
|
4159
|
+
trailingActive: boolean | undefined;
|
|
3813
4160
|
} | undefined;
|
|
3814
|
-
|
|
3815
|
-
}, {
|
|
3816
|
-
ts: EpochMilliseconds;
|
|
3817
|
-
sq: number;
|
|
3818
|
-
ch: "orders";
|
|
3819
|
-
data: {
|
|
4161
|
+
chaseId?: PerpsChaseId | undefined;
|
|
3820
4162
|
id: PerpsOrderId;
|
|
3821
4163
|
instrumentId: PerpsInstrumentId;
|
|
3822
4164
|
side: OrderSide;
|
|
@@ -3831,14 +4173,6 @@ declare const PerpsSessionUpdateEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.Zo
|
|
|
3831
4173
|
createdTimestamp: EpochMilliseconds;
|
|
3832
4174
|
updatedTimestamp: EpochMilliseconds;
|
|
3833
4175
|
clientOrderId: string | undefined;
|
|
3834
|
-
tpSl: {
|
|
3835
|
-
kind: PerpsTpSlKind;
|
|
3836
|
-
scope: PerpsTpSlScope;
|
|
3837
|
-
triggerPrice: DecimalString;
|
|
3838
|
-
parentOrderId: PerpsOrderId | undefined;
|
|
3839
|
-
armedQuantity: DecimalString | undefined;
|
|
3840
|
-
slippageBps: number | undefined;
|
|
3841
|
-
} | undefined;
|
|
3842
4176
|
};
|
|
3843
4177
|
}>>, z.ZodPipe<z.ZodObject<{
|
|
3844
4178
|
ts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
@@ -3849,10 +4183,23 @@ declare const PerpsSessionUpdateEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.Zo
|
|
|
3849
4183
|
oid: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsOrderId, number>>;
|
|
3850
4184
|
iid: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
|
|
3851
4185
|
side: z.ZodEnum<typeof PerpsSide>;
|
|
4186
|
+
settlement: z.ZodDefault<z.ZodBoolean>;
|
|
3852
4187
|
p: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
3853
4188
|
qty: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
3854
4189
|
taker: z.ZodBoolean;
|
|
3855
|
-
fee: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string
|
|
4190
|
+
fee: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
|
|
4191
|
+
builder_fee: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>>;
|
|
4192
|
+
total_fee: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>>;
|
|
4193
|
+
builder: z.ZodOptional<z.ZodPipe<z.ZodObject<{
|
|
4194
|
+
address: z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_types.EvmAddress, string>>;
|
|
4195
|
+
fee_rate: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
|
|
4196
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
4197
|
+
address: _polymarket_types.EvmAddress;
|
|
4198
|
+
feeRate: DecimalString;
|
|
4199
|
+
}, {
|
|
4200
|
+
address: _polymarket_types.EvmAddress;
|
|
4201
|
+
fee_rate: DecimalString;
|
|
4202
|
+
}>>>;
|
|
3856
4203
|
fea: z.ZodString;
|
|
3857
4204
|
psz: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
3858
4205
|
pep: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
@@ -3861,26 +4208,34 @@ declare const PerpsSessionUpdateEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.Zo
|
|
|
3861
4208
|
ts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
3862
4209
|
coid: z.ZodOptional<z.ZodString>;
|
|
3863
4210
|
}, z.core.$strip>, z.ZodTransform<{
|
|
4211
|
+
feeAsset: string;
|
|
4212
|
+
previousSize: DecimalString;
|
|
4213
|
+
previousEntryPrice: DecimalString;
|
|
4214
|
+
pnl: DecimalString;
|
|
4215
|
+
liquidation: boolean;
|
|
4216
|
+
timestamp: EpochMilliseconds;
|
|
4217
|
+
clientOrderId: string | undefined;
|
|
4218
|
+
builder?: {
|
|
4219
|
+
address: _polymarket_types.EvmAddress;
|
|
4220
|
+
feeRate: DecimalString;
|
|
4221
|
+
} | undefined;
|
|
3864
4222
|
tradeId: PerpsTradeId;
|
|
3865
4223
|
orderId: PerpsOrderId;
|
|
3866
4224
|
instrumentId: PerpsInstrumentId;
|
|
3867
4225
|
side: PerpsSide;
|
|
4226
|
+
settlement: boolean;
|
|
3868
4227
|
price: DecimalString;
|
|
3869
4228
|
quantity: DecimalString;
|
|
3870
4229
|
taker: boolean;
|
|
3871
4230
|
fee: DecimalString;
|
|
3872
|
-
|
|
3873
|
-
|
|
3874
|
-
previousEntryPrice: DecimalString;
|
|
3875
|
-
pnl: DecimalString;
|
|
3876
|
-
liquidation: boolean;
|
|
3877
|
-
timestamp: EpochMilliseconds;
|
|
3878
|
-
clientOrderId: string | undefined;
|
|
4231
|
+
builderFee: DecimalString;
|
|
4232
|
+
totalFee: DecimalString;
|
|
3879
4233
|
}, {
|
|
3880
4234
|
tid: PerpsTradeId;
|
|
3881
4235
|
oid: PerpsOrderId;
|
|
3882
4236
|
iid: PerpsInstrumentId;
|
|
3883
4237
|
side: PerpsSide;
|
|
4238
|
+
settlement: boolean;
|
|
3884
4239
|
p: DecimalString;
|
|
3885
4240
|
qty: DecimalString;
|
|
3886
4241
|
taker: boolean;
|
|
@@ -3891,6 +4246,12 @@ declare const PerpsSessionUpdateEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.Zo
|
|
|
3891
4246
|
pnl: DecimalString;
|
|
3892
4247
|
liq: boolean;
|
|
3893
4248
|
ts: EpochMilliseconds;
|
|
4249
|
+
builder_fee?: DecimalString | undefined;
|
|
4250
|
+
total_fee?: DecimalString | undefined;
|
|
4251
|
+
builder?: {
|
|
4252
|
+
address: _polymarket_types.EvmAddress;
|
|
4253
|
+
feeRate: DecimalString;
|
|
4254
|
+
} | undefined;
|
|
3894
4255
|
coid?: string | undefined;
|
|
3895
4256
|
}>>>;
|
|
3896
4257
|
}, z.core.$strip>, z.ZodTransform<{
|
|
@@ -3899,14 +4260,34 @@ declare const PerpsSessionUpdateEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.Zo
|
|
|
3899
4260
|
timestamp: number;
|
|
3900
4261
|
sequence: number;
|
|
3901
4262
|
payload: {
|
|
4263
|
+
feeAsset: string;
|
|
4264
|
+
previousSize: DecimalString;
|
|
4265
|
+
previousEntryPrice: DecimalString;
|
|
4266
|
+
pnl: DecimalString;
|
|
4267
|
+
liquidation: boolean;
|
|
4268
|
+
timestamp: EpochMilliseconds;
|
|
4269
|
+
clientOrderId: string | undefined;
|
|
4270
|
+
builder?: {
|
|
4271
|
+
address: _polymarket_types.EvmAddress;
|
|
4272
|
+
feeRate: DecimalString;
|
|
4273
|
+
} | undefined;
|
|
3902
4274
|
tradeId: PerpsTradeId;
|
|
3903
4275
|
orderId: PerpsOrderId;
|
|
3904
4276
|
instrumentId: PerpsInstrumentId;
|
|
3905
4277
|
side: PerpsSide;
|
|
4278
|
+
settlement: boolean;
|
|
3906
4279
|
price: DecimalString;
|
|
3907
4280
|
quantity: DecimalString;
|
|
3908
4281
|
taker: boolean;
|
|
3909
4282
|
fee: DecimalString;
|
|
4283
|
+
builderFee: DecimalString;
|
|
4284
|
+
totalFee: DecimalString;
|
|
4285
|
+
}[];
|
|
4286
|
+
}, {
|
|
4287
|
+
ts: EpochMilliseconds;
|
|
4288
|
+
sq: number;
|
|
4289
|
+
ch: "fills";
|
|
4290
|
+
data: {
|
|
3910
4291
|
feeAsset: string;
|
|
3911
4292
|
previousSize: DecimalString;
|
|
3912
4293
|
previousEntryPrice: DecimalString;
|
|
@@ -3914,27 +4295,132 @@ declare const PerpsSessionUpdateEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.Zo
|
|
|
3914
4295
|
liquidation: boolean;
|
|
3915
4296
|
timestamp: EpochMilliseconds;
|
|
3916
4297
|
clientOrderId: string | undefined;
|
|
3917
|
-
|
|
3918
|
-
|
|
3919
|
-
|
|
3920
|
-
|
|
3921
|
-
ch: "fills";
|
|
3922
|
-
data: {
|
|
4298
|
+
builder?: {
|
|
4299
|
+
address: _polymarket_types.EvmAddress;
|
|
4300
|
+
feeRate: DecimalString;
|
|
4301
|
+
} | undefined;
|
|
3923
4302
|
tradeId: PerpsTradeId;
|
|
3924
4303
|
orderId: PerpsOrderId;
|
|
3925
4304
|
instrumentId: PerpsInstrumentId;
|
|
3926
4305
|
side: PerpsSide;
|
|
4306
|
+
settlement: boolean;
|
|
3927
4307
|
price: DecimalString;
|
|
3928
4308
|
quantity: DecimalString;
|
|
3929
4309
|
taker: boolean;
|
|
3930
4310
|
fee: DecimalString;
|
|
4311
|
+
builderFee: DecimalString;
|
|
4312
|
+
totalFee: DecimalString;
|
|
4313
|
+
}[];
|
|
4314
|
+
}>>, z.ZodPipe<z.ZodObject<{
|
|
4315
|
+
ts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
4316
|
+
sq: z.ZodNumber;
|
|
4317
|
+
ch: z.ZodLiteral<"builderFills">;
|
|
4318
|
+
data: z.ZodArray<z.ZodPipe<z.ZodObject<{
|
|
4319
|
+
earning_id: z.ZodPipe<z.ZodString, z.ZodTransform<PerpsBuilderEarningId, string>>;
|
|
4320
|
+
trade_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsTradeId, number>>;
|
|
4321
|
+
order_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsOrderId, number>>;
|
|
4322
|
+
instrument_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
|
|
4323
|
+
trader: z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_types.EvmAddress, string>>;
|
|
4324
|
+
buy: z.ZodBoolean;
|
|
4325
|
+
price: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
|
|
4326
|
+
quantity: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
|
|
4327
|
+
client_order_id: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<PerpsClientOrderId, string>>>;
|
|
4328
|
+
side: z.ZodEnum<typeof PerpsLiquidityRole>;
|
|
4329
|
+
timestamp: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
4330
|
+
sequence: z.ZodNumber;
|
|
4331
|
+
notional: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
|
|
4332
|
+
fee_asset: z.ZodString;
|
|
4333
|
+
fee: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
|
|
4334
|
+
builder_fee: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
|
|
4335
|
+
total_fee: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
|
|
4336
|
+
fee_rate: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
|
|
4337
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
4338
|
+
liquidityRole: PerpsLiquidityRole;
|
|
4339
|
+
timestamp: EpochMilliseconds;
|
|
4340
|
+
sequence: number;
|
|
4341
|
+
notional: DecimalString;
|
|
3931
4342
|
feeAsset: string;
|
|
3932
|
-
|
|
3933
|
-
|
|
3934
|
-
|
|
3935
|
-
|
|
4343
|
+
fee: DecimalString;
|
|
4344
|
+
builderFee: DecimalString;
|
|
4345
|
+
totalFee: DecimalString;
|
|
4346
|
+
feeRate: DecimalString;
|
|
4347
|
+
clientOrderId?: PerpsClientOrderId | undefined;
|
|
4348
|
+
earningId: PerpsBuilderEarningId;
|
|
4349
|
+
tradeId: PerpsTradeId;
|
|
4350
|
+
orderId: PerpsOrderId;
|
|
4351
|
+
instrumentId: PerpsInstrumentId;
|
|
4352
|
+
trader: _polymarket_types.EvmAddress;
|
|
4353
|
+
side: OrderSide;
|
|
4354
|
+
price: DecimalString;
|
|
4355
|
+
quantity: DecimalString;
|
|
4356
|
+
}, {
|
|
4357
|
+
earning_id: PerpsBuilderEarningId;
|
|
4358
|
+
trade_id: PerpsTradeId;
|
|
4359
|
+
order_id: PerpsOrderId;
|
|
4360
|
+
instrument_id: PerpsInstrumentId;
|
|
4361
|
+
trader: _polymarket_types.EvmAddress;
|
|
4362
|
+
buy: boolean;
|
|
4363
|
+
price: DecimalString;
|
|
4364
|
+
quantity: DecimalString;
|
|
4365
|
+
side: PerpsLiquidityRole;
|
|
3936
4366
|
timestamp: EpochMilliseconds;
|
|
3937
|
-
|
|
4367
|
+
sequence: number;
|
|
4368
|
+
notional: DecimalString;
|
|
4369
|
+
fee_asset: string;
|
|
4370
|
+
fee: DecimalString;
|
|
4371
|
+
builder_fee: DecimalString;
|
|
4372
|
+
total_fee: DecimalString;
|
|
4373
|
+
fee_rate: DecimalString;
|
|
4374
|
+
client_order_id?: PerpsClientOrderId | undefined;
|
|
4375
|
+
}>>>;
|
|
4376
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
4377
|
+
type: "builderFill";
|
|
4378
|
+
channel: "builderFills";
|
|
4379
|
+
timestamp: EpochMilliseconds;
|
|
4380
|
+
sequence: number;
|
|
4381
|
+
payload: {
|
|
4382
|
+
liquidityRole: PerpsLiquidityRole;
|
|
4383
|
+
timestamp: EpochMilliseconds;
|
|
4384
|
+
sequence: number;
|
|
4385
|
+
notional: DecimalString;
|
|
4386
|
+
feeAsset: string;
|
|
4387
|
+
fee: DecimalString;
|
|
4388
|
+
builderFee: DecimalString;
|
|
4389
|
+
totalFee: DecimalString;
|
|
4390
|
+
feeRate: DecimalString;
|
|
4391
|
+
clientOrderId?: PerpsClientOrderId | undefined;
|
|
4392
|
+
earningId: PerpsBuilderEarningId;
|
|
4393
|
+
tradeId: PerpsTradeId;
|
|
4394
|
+
orderId: PerpsOrderId;
|
|
4395
|
+
instrumentId: PerpsInstrumentId;
|
|
4396
|
+
trader: _polymarket_types.EvmAddress;
|
|
4397
|
+
side: OrderSide;
|
|
4398
|
+
price: DecimalString;
|
|
4399
|
+
quantity: DecimalString;
|
|
4400
|
+
}[];
|
|
4401
|
+
}, {
|
|
4402
|
+
ts: EpochMilliseconds;
|
|
4403
|
+
sq: number;
|
|
4404
|
+
ch: "builderFills";
|
|
4405
|
+
data: {
|
|
4406
|
+
liquidityRole: PerpsLiquidityRole;
|
|
4407
|
+
timestamp: EpochMilliseconds;
|
|
4408
|
+
sequence: number;
|
|
4409
|
+
notional: DecimalString;
|
|
4410
|
+
feeAsset: string;
|
|
4411
|
+
fee: DecimalString;
|
|
4412
|
+
builderFee: DecimalString;
|
|
4413
|
+
totalFee: DecimalString;
|
|
4414
|
+
feeRate: DecimalString;
|
|
4415
|
+
clientOrderId?: PerpsClientOrderId | undefined;
|
|
4416
|
+
earningId: PerpsBuilderEarningId;
|
|
4417
|
+
tradeId: PerpsTradeId;
|
|
4418
|
+
orderId: PerpsOrderId;
|
|
4419
|
+
instrumentId: PerpsInstrumentId;
|
|
4420
|
+
trader: _polymarket_types.EvmAddress;
|
|
4421
|
+
side: OrderSide;
|
|
4422
|
+
price: DecimalString;
|
|
4423
|
+
quantity: DecimalString;
|
|
3938
4424
|
}[];
|
|
3939
4425
|
}>>, z.ZodPipe<z.ZodObject<{
|
|
3940
4426
|
ts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
@@ -4240,6 +4726,33 @@ declare const PerpsSessionUpdateEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.Zo
|
|
|
4240
4726
|
pnl: DecimalString | null;
|
|
4241
4727
|
margin_type: PerpsMarginType;
|
|
4242
4728
|
via_backstop: boolean;
|
|
4729
|
+
}>>, z.ZodPipe<z.ZodObject<{
|
|
4730
|
+
id: z.ZodPipe<z.ZodUUID, z.ZodTransform<PerpsNotificationId, string>>;
|
|
4731
|
+
type: z.ZodLiteral<PerpsNotificationType.PositionDeleveraged>;
|
|
4732
|
+
instrument_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
|
|
4733
|
+
side: z.ZodEnum<typeof PerpsSide>;
|
|
4734
|
+
size_closed: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
4735
|
+
price: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
4736
|
+
pnl: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
4737
|
+
margin_type: z.ZodEnum<typeof PerpsMarginType>;
|
|
4738
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
4739
|
+
id: PerpsNotificationId;
|
|
4740
|
+
type: PerpsNotificationType.PositionDeleveraged;
|
|
4741
|
+
instrumentId: PerpsInstrumentId;
|
|
4742
|
+
side: PerpsSide;
|
|
4743
|
+
sizeClosed: DecimalString;
|
|
4744
|
+
price: DecimalString;
|
|
4745
|
+
pnl: DecimalString;
|
|
4746
|
+
marginType: PerpsMarginType;
|
|
4747
|
+
}, {
|
|
4748
|
+
id: PerpsNotificationId;
|
|
4749
|
+
type: PerpsNotificationType.PositionDeleveraged;
|
|
4750
|
+
instrument_id: PerpsInstrumentId;
|
|
4751
|
+
side: PerpsSide;
|
|
4752
|
+
size_closed: DecimalString;
|
|
4753
|
+
price: DecimalString;
|
|
4754
|
+
pnl: DecimalString;
|
|
4755
|
+
margin_type: PerpsMarginType;
|
|
4243
4756
|
}>>], "type">;
|
|
4244
4757
|
}, z.core.$strip>, z.ZodTransform<{
|
|
4245
4758
|
type: "notification";
|
|
@@ -4293,6 +4806,15 @@ declare const PerpsSessionUpdateEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.Zo
|
|
|
4293
4806
|
pnl: DecimalString | null;
|
|
4294
4807
|
marginType: PerpsMarginType;
|
|
4295
4808
|
viaBackstop: boolean;
|
|
4809
|
+
} | {
|
|
4810
|
+
id: PerpsNotificationId;
|
|
4811
|
+
type: PerpsNotificationType.PositionDeleveraged;
|
|
4812
|
+
instrumentId: PerpsInstrumentId;
|
|
4813
|
+
side: PerpsSide;
|
|
4814
|
+
sizeClosed: DecimalString;
|
|
4815
|
+
price: DecimalString;
|
|
4816
|
+
pnl: DecimalString;
|
|
4817
|
+
marginType: PerpsMarginType;
|
|
4296
4818
|
};
|
|
4297
4819
|
}, {
|
|
4298
4820
|
ts: EpochMilliseconds;
|
|
@@ -4345,6 +4867,15 @@ declare const PerpsSessionUpdateEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.Zo
|
|
|
4345
4867
|
pnl: DecimalString | null;
|
|
4346
4868
|
marginType: PerpsMarginType;
|
|
4347
4869
|
viaBackstop: boolean;
|
|
4870
|
+
} | {
|
|
4871
|
+
id: PerpsNotificationId;
|
|
4872
|
+
type: PerpsNotificationType.PositionDeleveraged;
|
|
4873
|
+
instrumentId: PerpsInstrumentId;
|
|
4874
|
+
side: PerpsSide;
|
|
4875
|
+
sizeClosed: DecimalString;
|
|
4876
|
+
price: DecimalString;
|
|
4877
|
+
pnl: DecimalString;
|
|
4878
|
+
marginType: PerpsMarginType;
|
|
4348
4879
|
};
|
|
4349
4880
|
}>>, z.ZodPipe<z.ZodObject<{
|
|
4350
4881
|
ts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
@@ -4357,15 +4888,16 @@ declare const PerpsSessionUpdateEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.Zo
|
|
|
4357
4888
|
untriggered: "untriggered";
|
|
4358
4889
|
armed: "armed";
|
|
4359
4890
|
expired: "expired";
|
|
4891
|
+
activated: "activated";
|
|
4360
4892
|
}>;
|
|
4361
4893
|
reason: z.ZodOptional<z.ZodString>;
|
|
4362
4894
|
}, z.core.$strip>, z.ZodTransform<{
|
|
4363
4895
|
orderId: PerpsOrderId;
|
|
4364
|
-
status: "cancelled" | "untriggered" | "armed" | "expired";
|
|
4896
|
+
status: "cancelled" | "untriggered" | "armed" | "expired" | "activated";
|
|
4365
4897
|
reason: string | undefined;
|
|
4366
4898
|
}, {
|
|
4367
4899
|
oid: PerpsOrderId;
|
|
4368
|
-
st: "cancelled" | "untriggered" | "armed" | "expired";
|
|
4900
|
+
st: "cancelled" | "untriggered" | "armed" | "expired" | "activated";
|
|
4369
4901
|
reason?: string | undefined;
|
|
4370
4902
|
}>>;
|
|
4371
4903
|
}, z.core.$strip>, z.ZodTransform<{
|
|
@@ -4375,7 +4907,7 @@ declare const PerpsSessionUpdateEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.Zo
|
|
|
4375
4907
|
sequence: number;
|
|
4376
4908
|
payload: {
|
|
4377
4909
|
orderId: PerpsOrderId;
|
|
4378
|
-
status: "cancelled" | "untriggered" | "armed" | "expired";
|
|
4910
|
+
status: "cancelled" | "untriggered" | "armed" | "expired" | "activated";
|
|
4379
4911
|
reason: string | undefined;
|
|
4380
4912
|
};
|
|
4381
4913
|
}, {
|
|
@@ -4384,7 +4916,7 @@ declare const PerpsSessionUpdateEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.Zo
|
|
|
4384
4916
|
ch: string;
|
|
4385
4917
|
data: {
|
|
4386
4918
|
orderId: PerpsOrderId;
|
|
4387
|
-
status: "cancelled" | "untriggered" | "armed" | "expired";
|
|
4919
|
+
status: "cancelled" | "untriggered" | "armed" | "expired" | "activated";
|
|
4388
4920
|
reason: string | undefined;
|
|
4389
4921
|
};
|
|
4390
4922
|
}>>]>;
|
|
@@ -4393,6 +4925,11 @@ declare const PerpsSessionUpdateEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.Zo
|
|
|
4393
4925
|
*/
|
|
4394
4926
|
type PerpsSessionUpdateEvent = z.infer<typeof PerpsSessionUpdateEventSchema>;
|
|
4395
4927
|
/**
|
|
4928
|
+
* A recovery signal after reconnect, a sequence gap, or dropped notifications.
|
|
4929
|
+
* For `reason: 'server'`, `sequence` is the highest dropped notification
|
|
4930
|
+
* sequence, not a backfill lower bound. Backfill from the last notification
|
|
4931
|
+
* successfully processed and deduplicate by notification id.
|
|
4932
|
+
*
|
|
4396
4933
|
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
4397
4934
|
*/
|
|
4398
4935
|
type PerpsResyncEvent = {
|
|
@@ -4401,7 +4938,9 @@ type PerpsResyncEvent = {
|
|
|
4401
4938
|
channel?: string;
|
|
4402
4939
|
previousSequence?: number;
|
|
4403
4940
|
sequence?: number;
|
|
4404
|
-
}
|
|
4941
|
+
} | (z.infer<typeof PerpsNotificationsResyncFrameSchema> & {
|
|
4942
|
+
previousSequence?: never;
|
|
4943
|
+
});
|
|
4405
4944
|
/**
|
|
4406
4945
|
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
4407
4946
|
*/
|
|
@@ -4425,15 +4964,33 @@ declare enum RealtimeKnownErrorCode {
|
|
|
4425
4964
|
* before a client release that enumerates them.
|
|
4426
4965
|
*/
|
|
4427
4966
|
type RealtimeErrorCode = RealtimeKnownErrorCode | (string & {});
|
|
4967
|
+
/** Known sources reported by realtime price events. */
|
|
4968
|
+
declare enum KnownPriceSource {
|
|
4969
|
+
Pyth = "pyth",
|
|
4970
|
+
Chainlink = "chainlink",
|
|
4971
|
+
Massive = "massive"
|
|
4972
|
+
}
|
|
4973
|
+
/**
|
|
4974
|
+
* The source of a realtime price. Known values are enumerated in
|
|
4975
|
+
* {@link KnownPriceSource}; newly introduced sources remain available as strings.
|
|
4976
|
+
*/
|
|
4977
|
+
type PriceSource = KnownPriceSource | (string & {});
|
|
4428
4978
|
declare enum PolyboltChannel {
|
|
4429
4979
|
Crypto = "price.crypto",
|
|
4430
4980
|
Twap = "price.crypto.twap",
|
|
4431
|
-
Equity = "price.equity"
|
|
4981
|
+
Equity = "price.equity",
|
|
4982
|
+
EquityTwap = "price.equity.twap"
|
|
4983
|
+
}
|
|
4984
|
+
/** A provider that can be requested for a price subscription. */
|
|
4985
|
+
declare enum PriceProvider {
|
|
4986
|
+
Chainlink = "chainlink",
|
|
4987
|
+
Pyth = "pyth"
|
|
4432
4988
|
}
|
|
4433
4989
|
/** A filter sent to a PolyBolt price channel. */
|
|
4434
4990
|
type PolyboltFilter = {
|
|
4435
4991
|
symbol: string;
|
|
4436
4992
|
window_seconds?: 60;
|
|
4993
|
+
provider?: PriceProvider;
|
|
4437
4994
|
} | {
|
|
4438
4995
|
asset_id: string;
|
|
4439
4996
|
};
|
|
@@ -4453,6 +5010,7 @@ declare const PolyboltAckSchema: z.ZodObject<{
|
|
|
4453
5010
|
op: z.ZodEnum<typeof PolyboltAckOp>;
|
|
4454
5011
|
channel: z.ZodOptional<z.ZodString>;
|
|
4455
5012
|
rid: z.ZodOptional<z.ZodString>;
|
|
5013
|
+
provider: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<(string & {}) | KnownPriceSource, string>>>;
|
|
4456
5014
|
code: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<(string & {}) | RealtimeKnownErrorCode, string>>>;
|
|
4457
5015
|
}, z.core.$strip>;
|
|
4458
5016
|
type PolyboltAck = z.infer<typeof PolyboltAckSchema>;
|
|
@@ -4474,6 +5032,7 @@ declare const CryptoPriceEventSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
4474
5032
|
type: z.ZodLiteral<"update">;
|
|
4475
5033
|
payload: z.ZodPipe<z.ZodObject<{
|
|
4476
5034
|
symbol: z.ZodString;
|
|
5035
|
+
source: z.ZodPipe<z.ZodString, z.ZodTransform<(string & {}) | KnownPriceSource, string>>;
|
|
4477
5036
|
timestamp: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
4478
5037
|
value: z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<DecimalString, number>>]>;
|
|
4479
5038
|
full_accuracy_value: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
@@ -4481,12 +5040,14 @@ declare const CryptoPriceEventSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
4481
5040
|
is_carried_forward: z.ZodOptional<z.ZodBoolean>;
|
|
4482
5041
|
}, z.core.$strip>, z.ZodTransform<{
|
|
4483
5042
|
symbol: string;
|
|
5043
|
+
source: (string & {}) | KnownPriceSource;
|
|
4484
5044
|
timestamp: EpochMilliseconds;
|
|
4485
5045
|
value: DecimalString;
|
|
4486
5046
|
receivedAt: EpochMilliseconds | undefined;
|
|
4487
5047
|
isCarriedForward: boolean | undefined;
|
|
4488
5048
|
}, {
|
|
4489
5049
|
symbol: string;
|
|
5050
|
+
source: (string & {}) | KnownPriceSource;
|
|
4490
5051
|
timestamp: EpochMilliseconds;
|
|
4491
5052
|
value: DecimalString;
|
|
4492
5053
|
full_accuracy_value: DecimalString;
|
|
@@ -4501,6 +5062,7 @@ declare const CryptoPriceEventSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
4501
5062
|
type: z.ZodLiteral<"subscribe">;
|
|
4502
5063
|
payload: z.ZodObject<{
|
|
4503
5064
|
symbol: z.ZodString;
|
|
5065
|
+
source: z.ZodPipe<z.ZodString, z.ZodTransform<(string & {}) | KnownPriceSource, string>>;
|
|
4504
5066
|
data: z.ZodArray<z.ZodPipe<z.ZodObject<{
|
|
4505
5067
|
timestamp: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
4506
5068
|
value: z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<DecimalString, number>>]>;
|
|
@@ -4534,17 +5096,20 @@ declare const CryptoTwapPriceEventSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
4534
5096
|
type: z.ZodLiteral<"update">;
|
|
4535
5097
|
payload: z.ZodPipe<z.ZodObject<{
|
|
4536
5098
|
symbol: z.ZodString;
|
|
5099
|
+
source: z.ZodPipe<z.ZodString, z.ZodTransform<(string & {}) | KnownPriceSource, string>>;
|
|
4537
5100
|
timestamp: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
4538
5101
|
value: z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<DecimalString, number>>]>;
|
|
4539
5102
|
full_accuracy_value: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
4540
5103
|
window_seconds: z.ZodLiteral<60>;
|
|
4541
5104
|
}, z.core.$strip>, z.ZodTransform<{
|
|
4542
5105
|
symbol: string;
|
|
5106
|
+
source: (string & {}) | KnownPriceSource;
|
|
4543
5107
|
timestamp: EpochMilliseconds;
|
|
4544
5108
|
value: DecimalString;
|
|
4545
5109
|
windowSeconds: 60;
|
|
4546
5110
|
}, {
|
|
4547
5111
|
symbol: string;
|
|
5112
|
+
source: (string & {}) | KnownPriceSource;
|
|
4548
5113
|
timestamp: EpochMilliseconds;
|
|
4549
5114
|
value: DecimalString;
|
|
4550
5115
|
full_accuracy_value: DecimalString;
|
|
@@ -4558,6 +5123,7 @@ declare const CryptoTwapPriceEventSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
4558
5123
|
type: z.ZodLiteral<"subscribe">;
|
|
4559
5124
|
payload: z.ZodPipe<z.ZodObject<{
|
|
4560
5125
|
symbol: z.ZodString;
|
|
5126
|
+
source: z.ZodPipe<z.ZodString, z.ZodTransform<(string & {}) | KnownPriceSource, string>>;
|
|
4561
5127
|
data: z.ZodArray<z.ZodPipe<z.ZodObject<{
|
|
4562
5128
|
timestamp: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
4563
5129
|
value: z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<DecimalString, number>>]>;
|
|
@@ -4573,6 +5139,7 @@ declare const CryptoTwapPriceEventSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
4573
5139
|
window_seconds: z.ZodLiteral<60>;
|
|
4574
5140
|
}, z.core.$strip>, z.ZodTransform<{
|
|
4575
5141
|
symbol: string;
|
|
5142
|
+
source: (string & {}) | KnownPriceSource;
|
|
4576
5143
|
data: {
|
|
4577
5144
|
timestamp: EpochMilliseconds;
|
|
4578
5145
|
value: DecimalString;
|
|
@@ -4580,6 +5147,7 @@ declare const CryptoTwapPriceEventSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
4580
5147
|
windowSeconds: 60;
|
|
4581
5148
|
}, {
|
|
4582
5149
|
symbol: string;
|
|
5150
|
+
source: (string & {}) | KnownPriceSource;
|
|
4583
5151
|
data: {
|
|
4584
5152
|
timestamp: EpochMilliseconds;
|
|
4585
5153
|
value: DecimalString;
|
|
@@ -4606,6 +5174,7 @@ declare const EquityPriceEventSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
4606
5174
|
type: z.ZodLiteral<"update">;
|
|
4607
5175
|
payload: z.ZodPipe<z.ZodObject<{
|
|
4608
5176
|
symbol: z.ZodString;
|
|
5177
|
+
source: z.ZodPipe<z.ZodString, z.ZodTransform<(string & {}) | KnownPriceSource, string>>;
|
|
4609
5178
|
timestamp: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
4610
5179
|
value: z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<DecimalString, number>>]>;
|
|
4611
5180
|
full_accuracy_value: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
@@ -4613,12 +5182,14 @@ declare const EquityPriceEventSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
4613
5182
|
is_carried_forward: z.ZodOptional<z.ZodBoolean>;
|
|
4614
5183
|
}, z.core.$strip>, z.ZodTransform<{
|
|
4615
5184
|
symbol: string;
|
|
5185
|
+
source: (string & {}) | KnownPriceSource;
|
|
4616
5186
|
timestamp: EpochMilliseconds;
|
|
4617
5187
|
value: DecimalString;
|
|
4618
5188
|
receivedAt: EpochMilliseconds | undefined;
|
|
4619
5189
|
isCarriedForward: boolean | undefined;
|
|
4620
5190
|
}, {
|
|
4621
5191
|
symbol: string;
|
|
5192
|
+
source: (string & {}) | KnownPriceSource;
|
|
4622
5193
|
timestamp: EpochMilliseconds;
|
|
4623
5194
|
value: DecimalString;
|
|
4624
5195
|
full_accuracy_value: DecimalString;
|
|
@@ -4633,6 +5204,7 @@ declare const EquityPriceEventSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
4633
5204
|
type: z.ZodLiteral<"subscribe">;
|
|
4634
5205
|
payload: z.ZodObject<{
|
|
4635
5206
|
symbol: z.ZodString;
|
|
5207
|
+
source: z.ZodPipe<z.ZodString, z.ZodTransform<(string & {}) | KnownPriceSource, string>>;
|
|
4636
5208
|
data: z.ZodArray<z.ZodPipe<z.ZodObject<{
|
|
4637
5209
|
timestamp: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
4638
5210
|
value: z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<DecimalString, number>>]>;
|
|
@@ -4655,7 +5227,85 @@ declare const EquityPriceEventSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
4655
5227
|
* values from those connections may interleave.
|
|
4656
5228
|
*/
|
|
4657
5229
|
type EquityPriceEvent = z.infer<typeof EquityPriceEventSchema>;
|
|
4658
|
-
|
|
5230
|
+
declare const EquityTwapPriceEventSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
5231
|
+
timestamp: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
5232
|
+
seq: z.ZodOptional<z.ZodNumber>;
|
|
5233
|
+
dropped: z.ZodOptional<z.ZodNumber>;
|
|
5234
|
+
topic: z.ZodLiteral<"prices.equity.twap">;
|
|
5235
|
+
type: z.ZodLiteral<"update">;
|
|
5236
|
+
payload: z.ZodPipe<z.ZodObject<{
|
|
5237
|
+
symbol: z.ZodString;
|
|
5238
|
+
source: z.ZodPipe<z.ZodString, z.ZodTransform<(string & {}) | KnownPriceSource, string>>;
|
|
5239
|
+
timestamp: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
5240
|
+
value: z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<DecimalString, number>>]>;
|
|
5241
|
+
full_accuracy_value: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
5242
|
+
window_seconds: z.ZodLiteral<60>;
|
|
5243
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
5244
|
+
symbol: string;
|
|
5245
|
+
source: (string & {}) | KnownPriceSource;
|
|
5246
|
+
timestamp: EpochMilliseconds;
|
|
5247
|
+
value: DecimalString;
|
|
5248
|
+
windowSeconds: 60;
|
|
5249
|
+
}, {
|
|
5250
|
+
symbol: string;
|
|
5251
|
+
source: (string & {}) | KnownPriceSource;
|
|
5252
|
+
timestamp: EpochMilliseconds;
|
|
5253
|
+
value: DecimalString;
|
|
5254
|
+
full_accuracy_value: DecimalString;
|
|
5255
|
+
window_seconds: 60;
|
|
5256
|
+
}>>;
|
|
5257
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
5258
|
+
timestamp: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
5259
|
+
seq: z.ZodOptional<z.ZodNumber>;
|
|
5260
|
+
dropped: z.ZodOptional<z.ZodNumber>;
|
|
5261
|
+
topic: z.ZodLiteral<"prices.equity.twap">;
|
|
5262
|
+
type: z.ZodLiteral<"subscribe">;
|
|
5263
|
+
payload: z.ZodPipe<z.ZodObject<{
|
|
5264
|
+
symbol: z.ZodString;
|
|
5265
|
+
source: z.ZodPipe<z.ZodString, z.ZodTransform<(string & {}) | KnownPriceSource, string>>;
|
|
5266
|
+
data: z.ZodArray<z.ZodPipe<z.ZodObject<{
|
|
5267
|
+
timestamp: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
5268
|
+
value: z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<DecimalString, number>>]>;
|
|
5269
|
+
full_accuracy_value: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
5270
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
5271
|
+
timestamp: EpochMilliseconds;
|
|
5272
|
+
value: DecimalString;
|
|
5273
|
+
}, {
|
|
5274
|
+
timestamp: EpochMilliseconds;
|
|
5275
|
+
value: DecimalString;
|
|
5276
|
+
full_accuracy_value: DecimalString;
|
|
5277
|
+
}>>>;
|
|
5278
|
+
window_seconds: z.ZodLiteral<60>;
|
|
5279
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
5280
|
+
symbol: string;
|
|
5281
|
+
source: (string & {}) | KnownPriceSource;
|
|
5282
|
+
data: {
|
|
5283
|
+
timestamp: EpochMilliseconds;
|
|
5284
|
+
value: DecimalString;
|
|
5285
|
+
}[];
|
|
5286
|
+
windowSeconds: 60;
|
|
5287
|
+
}, {
|
|
5288
|
+
symbol: string;
|
|
5289
|
+
source: (string & {}) | KnownPriceSource;
|
|
5290
|
+
data: {
|
|
5291
|
+
timestamp: EpochMilliseconds;
|
|
5292
|
+
value: DecimalString;
|
|
5293
|
+
}[];
|
|
5294
|
+
window_seconds: 60;
|
|
5295
|
+
}>>;
|
|
5296
|
+
}, z.core.$strip>]>;
|
|
5297
|
+
/**
|
|
5298
|
+
* An equity TWAP event, denominated in the symbol's quote currency.
|
|
5299
|
+
*
|
|
5300
|
+
* `seq` is scoped to one channel on one WebSocket connection and resets after
|
|
5301
|
+
* reconnecting. When an SDK subscription spans multiple connections, sequence
|
|
5302
|
+
* values from those connections may interleave.
|
|
5303
|
+
*/
|
|
5304
|
+
type EquityTwapPriceEvent = z.infer<typeof EquityTwapPriceEventSchema>;
|
|
5305
|
+
type EquityTwapPriceSnapshotEvent = Extract<EquityTwapPriceEvent, {
|
|
5306
|
+
type: 'subscribe';
|
|
5307
|
+
}>;
|
|
5308
|
+
type PriceEvent = CryptoPriceEvent | CryptoTwapPriceEvent | EquityPriceEvent | EquityTwapPriceEvent;
|
|
4659
5309
|
|
|
4660
5310
|
declare const CommentRemovedPayloadSchema: z.ZodObject<{
|
|
4661
5311
|
id: z.ZodString;
|
|
@@ -7062,4 +7712,4 @@ declare const SportsResultEventSchema: z.ZodPipe<z.ZodPipe<z.ZodObject<{
|
|
|
7062
7712
|
}>>;
|
|
7063
7713
|
type SportsEvent = z.infer<typeof SportsResultEventSchema>;
|
|
7064
7714
|
|
|
7065
|
-
export { type CommentCreatedEvent, CommentCreatedEventSchema, type CommentRemovedEvent, CommentRemovedEventSchema, type CommentRemovedPayload, type CommentsEvent, CommentsEventSchema, type CryptoPriceEvent, CryptoPriceEventSchema, type CryptoPriceSnapshotEvent, type CryptoPricesBinanceEvent, CryptoPricesBinanceEventSchema, type CryptoPricesBinanceTopic, type CryptoPricesChainlinkEvent, CryptoPricesChainlinkEventSchema, type CryptoPricesChainlinkTopic, type CryptoPricesChainlinkTwapEvent, CryptoPricesChainlinkTwapEventSchema, type CryptoPricesChainlinkTwapSixtyEvent, CryptoPricesChainlinkTwapSixtyEventSchema, type CryptoPricesChainlinkTwapThirtyEvent, CryptoPricesChainlinkTwapThirtyEventSchema, type CryptoPricesChainlinkTwapTopic, type CryptoPricesChainlinkTwapWindowSeconds, type CryptoPricesEvent, CryptoPricesEventSchema, type CryptoPricesTopic, type CryptoTwapPriceEvent, CryptoTwapPriceEventSchema, type CryptoTwapPriceSnapshotEvent, type CustomMarketEvent, CustomMarketEventSchema, type EquityPriceEvent, EquityPriceEventSchema, type EquityPriceSnapshotPoint, type EquityPriceSubscribePayload, type EquityPriceUpdatePayload, type EquityPricesEvent, EquityPricesEventSchema, type EquityPricesSubscribeEvent, EquityPricesSubscribeEventSchema, type EquityPricesTopic, type EquityPricesUpdateEvent, EquityPricesUpdateEventSchema, type MarketBestBidAskEvent, MarketBestBidAskEventSchema, type MarketBookEvent, MarketBookEventSchema, type MarketEvent, type MarketEventMessage, MarketEventSchema, type MarketLastTradePriceEvent, MarketLastTradePriceEventSchema, type MarketPriceChangeEvent, MarketPriceChangeEventSchema, type MarketResolvedEvent, MarketResolvedEventSchema, type MarketTickSizeChangeEvent, MarketTickSizeChangeEventSchema, type NewMarketEvent, NewMarketEventSchema, type OrderBookLevel, type PerpsBalanceUpdateEvent, PerpsBalanceUpdateEventSchema, type PerpsBboEvent, PerpsBboEventSchema, type PerpsBookEvent, PerpsBookEventSchema, type PerpsCandleEvent, PerpsCandleEventSchema, type PerpsDepositUpdateEvent, PerpsDepositUpdateEventSchema, type PerpsFillUpdateEvent, PerpsFillUpdateEventSchema, type PerpsFundingUpdateEvent, PerpsFundingUpdateEventSchema, type PerpsMarketDataEvent, PerpsMarketDataEventSchema, type PerpsNotificationUpdateEvent, PerpsNotificationUpdateEventSchema, PerpsNotificationsResyncFrameSchema, type PerpsOrderUpdateEvent, PerpsOrderUpdateEventSchema, type PerpsPortfolioUpdateEvent, PerpsPortfolioUpdateEventSchema, type PerpsResyncEvent, type PerpsSessionEvent, type PerpsSessionUpdateEvent, PerpsSessionUpdateEventSchema, type PerpsStatisticEvent, PerpsStatisticEventSchema, type PerpsTickerEvent, PerpsTickerEventSchema, type PerpsTpSlUpdateEvent, PerpsTpSlUpdateEventSchema, type PerpsTradeEvent, PerpsTradeEventSchema, type PerpsWithdrawalUpdateEvent, PerpsWithdrawalUpdateEventSchema, type PolyboltAck, PolyboltAckOp, PolyboltAckSchema, PolyboltChannel, type PolyboltEnvelope, PolyboltEnvelopeSchema, type PolyboltFilter, type PolyboltSubscription, type PriceChange, type PriceEvent, type PriceUpdatePayload, type ReactionCreatedEvent, ReactionCreatedEventSchema, type ReactionRemovedEvent, ReactionRemovedEventSchema, type RealtimeErrorCode, type RealtimeEvent, RealtimeEventSchema, RealtimeKnownErrorCode, type SportsEvent, SportsResultEventSchema, type StandardMarketEvent, StandardMarketEventSchema, type TradeMakerOrder, TradeStatus, type UserEvent, UserEventSchema, type UserOrderEvent, UserOrderEventSchema, UserOrderEventType, UserOrderStatus, type UserTradeEvent, UserTradeEventSchema };
|
|
7715
|
+
export { type CommentCreatedEvent, CommentCreatedEventSchema, type CommentRemovedEvent, CommentRemovedEventSchema, type CommentRemovedPayload, type CommentsEvent, CommentsEventSchema, type CryptoPriceEvent, CryptoPriceEventSchema, type CryptoPriceSnapshotEvent, type CryptoPricesBinanceEvent, CryptoPricesBinanceEventSchema, type CryptoPricesBinanceTopic, type CryptoPricesChainlinkEvent, CryptoPricesChainlinkEventSchema, type CryptoPricesChainlinkTopic, type CryptoPricesChainlinkTwapEvent, CryptoPricesChainlinkTwapEventSchema, type CryptoPricesChainlinkTwapSixtyEvent, CryptoPricesChainlinkTwapSixtyEventSchema, type CryptoPricesChainlinkTwapThirtyEvent, CryptoPricesChainlinkTwapThirtyEventSchema, type CryptoPricesChainlinkTwapTopic, type CryptoPricesChainlinkTwapWindowSeconds, type CryptoPricesEvent, CryptoPricesEventSchema, type CryptoPricesTopic, type CryptoTwapPriceEvent, CryptoTwapPriceEventSchema, type CryptoTwapPriceSnapshotEvent, type CustomMarketEvent, CustomMarketEventSchema, type EquityPriceEvent, EquityPriceEventSchema, type EquityPriceSnapshotPoint, type EquityPriceSubscribePayload, type EquityPriceUpdatePayload, type EquityPricesEvent, EquityPricesEventSchema, type EquityPricesSubscribeEvent, EquityPricesSubscribeEventSchema, type EquityPricesTopic, type EquityPricesUpdateEvent, EquityPricesUpdateEventSchema, type EquityTwapPriceEvent, EquityTwapPriceEventSchema, type EquityTwapPriceSnapshotEvent, KnownPriceSource, type MarketBestBidAskEvent, MarketBestBidAskEventSchema, type MarketBookEvent, MarketBookEventSchema, type MarketEvent, type MarketEventMessage, MarketEventSchema, type MarketLastTradePriceEvent, MarketLastTradePriceEventSchema, type MarketPriceChangeEvent, MarketPriceChangeEventSchema, type MarketResolvedEvent, MarketResolvedEventSchema, type MarketTickSizeChangeEvent, MarketTickSizeChangeEventSchema, type NewMarketEvent, NewMarketEventSchema, type OrderBookLevel, type PerpsBalanceUpdateEvent, PerpsBalanceUpdateEventSchema, type PerpsBboEvent, PerpsBboEventSchema, type PerpsBookEvent, PerpsBookEventSchema, type PerpsBuilderFillUpdateEvent, PerpsBuilderFillUpdateEventSchema, type PerpsCandleEvent, PerpsCandleEventSchema, type PerpsDepositUpdateEvent, PerpsDepositUpdateEventSchema, type PerpsFillUpdateEvent, PerpsFillUpdateEventSchema, type PerpsFundingUpdateEvent, PerpsFundingUpdateEventSchema, type PerpsMarketDataEvent, PerpsMarketDataEventSchema, type PerpsNotificationUpdateEvent, PerpsNotificationUpdateEventSchema, PerpsNotificationsResyncFrameSchema, type PerpsOrderUpdateEvent, PerpsOrderUpdateEventSchema, type PerpsPortfolioUpdateEvent, PerpsPortfolioUpdateEventSchema, type PerpsResyncEvent, type PerpsSessionEvent, type PerpsSessionUpdateEvent, PerpsSessionUpdateEventSchema, type PerpsStatisticEvent, PerpsStatisticEventSchema, type PerpsTickerEvent, PerpsTickerEventSchema, type PerpsTpSlUpdateEvent, PerpsTpSlUpdateEventSchema, type PerpsTradeEvent, PerpsTradeEventSchema, type PerpsWithdrawalUpdateEvent, PerpsWithdrawalUpdateEventSchema, type PolyboltAck, PolyboltAckOp, PolyboltAckSchema, PolyboltChannel, type PolyboltEnvelope, PolyboltEnvelopeSchema, type PolyboltFilter, type PolyboltSubscription, type PriceChange, type PriceEvent, PriceProvider, type PriceSource, type PriceUpdatePayload, type ReactionCreatedEvent, ReactionCreatedEventSchema, type ReactionRemovedEvent, ReactionRemovedEventSchema, type RealtimeErrorCode, type RealtimeEvent, RealtimeEventSchema, RealtimeKnownErrorCode, type SportsEvent, SportsResultEventSchema, type StandardMarketEvent, StandardMarketEventSchema, type TradeMakerOrder, TradeStatus, type UserEvent, UserEventSchema, type UserOrderEvent, UserOrderEventSchema, UserOrderEventType, UserOrderStatus, type UserTradeEvent, UserTradeEventSchema };
|