@polymarket/bindings 0.12.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-Z6SGQXSJ.js +2 -0
- package/dist/chunk-Z6SGQXSJ.js.map +1 -0
- package/dist/data/index.d.ts +171 -2
- package/dist/data/index.js +1 -1
- package/dist/data/index.js.map +1 -1
- package/dist/{orders-BMW5PN-Q.d.ts → orders-BV68_6ST.d.ts} +495 -34
- package/dist/perps/index.d.ts +922 -4
- package/dist/perps/index.js +1 -1
- package/dist/perps/index.js.map +1 -1
- package/dist/subscriptions/index.d.ts +358 -61
- package/dist/subscriptions/index.js +1 -1
- package/dist/subscriptions/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-DAWT25YZ.js +0 -2
- package/dist/chunk-DAWT25YZ.js.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
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
5
|
import { R as ReactionType } from '../comment-CKJIqOZS.js';
|
|
6
6
|
|
|
@@ -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,6 +2776,10 @@ 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
|
}>>>>;
|
|
2761
2784
|
builder: z.ZodOptional<z.ZodPipe<z.ZodObject<{
|
|
2762
2785
|
address: z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_types.EvmAddress, string>>;
|
|
@@ -2773,6 +2796,19 @@ declare const PerpsOrderUpdateEventSchema: z.ZodPipe<z.ZodObject<{
|
|
|
2773
2796
|
address: _polymarket_types.EvmAddress;
|
|
2774
2797
|
feeRate: DecimalString;
|
|
2775
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;
|
|
2776
2812
|
id: PerpsOrderId;
|
|
2777
2813
|
instrumentId: PerpsInstrumentId;
|
|
2778
2814
|
side: OrderSide;
|
|
@@ -2787,14 +2823,6 @@ declare const PerpsOrderUpdateEventSchema: z.ZodPipe<z.ZodObject<{
|
|
|
2787
2823
|
createdTimestamp: EpochMilliseconds;
|
|
2788
2824
|
updatedTimestamp: EpochMilliseconds;
|
|
2789
2825
|
clientOrderId: string | undefined;
|
|
2790
|
-
tpSl: {
|
|
2791
|
-
kind: PerpsTpSlKind;
|
|
2792
|
-
scope: PerpsTpSlScope;
|
|
2793
|
-
triggerPrice: DecimalString;
|
|
2794
|
-
parentOrderId: PerpsOrderId | undefined;
|
|
2795
|
-
armedQuantity: DecimalString | undefined;
|
|
2796
|
-
slippageBps: number | undefined;
|
|
2797
|
-
} | undefined;
|
|
2798
2826
|
}, {
|
|
2799
2827
|
oid: PerpsOrderId;
|
|
2800
2828
|
iid: PerpsInstrumentId;
|
|
@@ -2810,6 +2838,7 @@ declare const PerpsOrderUpdateEventSchema: z.ZodPipe<z.ZodObject<{
|
|
|
2810
2838
|
cts: EpochMilliseconds;
|
|
2811
2839
|
uts: EpochMilliseconds;
|
|
2812
2840
|
coid?: string | undefined;
|
|
2841
|
+
chid?: PerpsChaseId | undefined;
|
|
2813
2842
|
tpsl?: {
|
|
2814
2843
|
kind: PerpsTpSlKind;
|
|
2815
2844
|
scope: PerpsTpSlScope;
|
|
@@ -2817,6 +2846,10 @@ declare const PerpsOrderUpdateEventSchema: z.ZodPipe<z.ZodObject<{
|
|
|
2817
2846
|
parentOrderId: PerpsOrderId | undefined;
|
|
2818
2847
|
armedQuantity: DecimalString | undefined;
|
|
2819
2848
|
slippageBps: number | undefined;
|
|
2849
|
+
trailingBps: number | undefined;
|
|
2850
|
+
activationPrice: DecimalString | undefined;
|
|
2851
|
+
trailingAnchor: DecimalString | undefined;
|
|
2852
|
+
trailingActive: boolean | undefined;
|
|
2820
2853
|
} | null | undefined;
|
|
2821
2854
|
builder?: {
|
|
2822
2855
|
address: _polymarket_types.EvmAddress;
|
|
@@ -2833,6 +2866,19 @@ declare const PerpsOrderUpdateEventSchema: z.ZodPipe<z.ZodObject<{
|
|
|
2833
2866
|
address: _polymarket_types.EvmAddress;
|
|
2834
2867
|
feeRate: DecimalString;
|
|
2835
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;
|
|
2836
2882
|
id: PerpsOrderId;
|
|
2837
2883
|
instrumentId: PerpsInstrumentId;
|
|
2838
2884
|
side: OrderSide;
|
|
@@ -2847,14 +2893,6 @@ declare const PerpsOrderUpdateEventSchema: z.ZodPipe<z.ZodObject<{
|
|
|
2847
2893
|
createdTimestamp: EpochMilliseconds;
|
|
2848
2894
|
updatedTimestamp: EpochMilliseconds;
|
|
2849
2895
|
clientOrderId: string | undefined;
|
|
2850
|
-
tpSl: {
|
|
2851
|
-
kind: PerpsTpSlKind;
|
|
2852
|
-
scope: PerpsTpSlScope;
|
|
2853
|
-
triggerPrice: DecimalString;
|
|
2854
|
-
parentOrderId: PerpsOrderId | undefined;
|
|
2855
|
-
armedQuantity: DecimalString | undefined;
|
|
2856
|
-
slippageBps: number | undefined;
|
|
2857
|
-
} | undefined;
|
|
2858
2896
|
};
|
|
2859
2897
|
}, {
|
|
2860
2898
|
ts: EpochMilliseconds;
|
|
@@ -2865,6 +2903,19 @@ declare const PerpsOrderUpdateEventSchema: z.ZodPipe<z.ZodObject<{
|
|
|
2865
2903
|
address: _polymarket_types.EvmAddress;
|
|
2866
2904
|
feeRate: DecimalString;
|
|
2867
2905
|
} | undefined;
|
|
2906
|
+
tpSl: {
|
|
2907
|
+
kind: PerpsTpSlKind;
|
|
2908
|
+
scope: PerpsTpSlScope;
|
|
2909
|
+
triggerPrice: DecimalString;
|
|
2910
|
+
parentOrderId: PerpsOrderId | undefined;
|
|
2911
|
+
armedQuantity: DecimalString | undefined;
|
|
2912
|
+
slippageBps: number | undefined;
|
|
2913
|
+
trailingBps: number | undefined;
|
|
2914
|
+
activationPrice: DecimalString | undefined;
|
|
2915
|
+
trailingAnchor: DecimalString | undefined;
|
|
2916
|
+
trailingActive: boolean | undefined;
|
|
2917
|
+
} | undefined;
|
|
2918
|
+
chaseId?: PerpsChaseId | undefined;
|
|
2868
2919
|
id: PerpsOrderId;
|
|
2869
2920
|
instrumentId: PerpsInstrumentId;
|
|
2870
2921
|
side: OrderSide;
|
|
@@ -2879,14 +2930,6 @@ declare const PerpsOrderUpdateEventSchema: z.ZodPipe<z.ZodObject<{
|
|
|
2879
2930
|
createdTimestamp: EpochMilliseconds;
|
|
2880
2931
|
updatedTimestamp: EpochMilliseconds;
|
|
2881
2932
|
clientOrderId: string | undefined;
|
|
2882
|
-
tpSl: {
|
|
2883
|
-
kind: PerpsTpSlKind;
|
|
2884
|
-
scope: PerpsTpSlScope;
|
|
2885
|
-
triggerPrice: DecimalString;
|
|
2886
|
-
parentOrderId: PerpsOrderId | undefined;
|
|
2887
|
-
armedQuantity: DecimalString | undefined;
|
|
2888
|
-
slippageBps: number | undefined;
|
|
2889
|
-
} | undefined;
|
|
2890
2933
|
};
|
|
2891
2934
|
}>>;
|
|
2892
2935
|
/**
|
|
@@ -2905,6 +2948,7 @@ declare const PerpsFillUpdateEventSchema: z.ZodPipe<z.ZodObject<{
|
|
|
2905
2948
|
oid: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsOrderId, number>>;
|
|
2906
2949
|
iid: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
|
|
2907
2950
|
side: z.ZodEnum<typeof PerpsSide>;
|
|
2951
|
+
settlement: z.ZodDefault<z.ZodBoolean>;
|
|
2908
2952
|
p: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
2909
2953
|
qty: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
2910
2954
|
taker: z.ZodBoolean;
|
|
@@ -2944,6 +2988,7 @@ declare const PerpsFillUpdateEventSchema: z.ZodPipe<z.ZodObject<{
|
|
|
2944
2988
|
orderId: PerpsOrderId;
|
|
2945
2989
|
instrumentId: PerpsInstrumentId;
|
|
2946
2990
|
side: PerpsSide;
|
|
2991
|
+
settlement: boolean;
|
|
2947
2992
|
price: DecimalString;
|
|
2948
2993
|
quantity: DecimalString;
|
|
2949
2994
|
taker: boolean;
|
|
@@ -2955,6 +3000,7 @@ declare const PerpsFillUpdateEventSchema: z.ZodPipe<z.ZodObject<{
|
|
|
2955
3000
|
oid: PerpsOrderId;
|
|
2956
3001
|
iid: PerpsInstrumentId;
|
|
2957
3002
|
side: PerpsSide;
|
|
3003
|
+
settlement: boolean;
|
|
2958
3004
|
p: DecimalString;
|
|
2959
3005
|
qty: DecimalString;
|
|
2960
3006
|
taker: boolean;
|
|
@@ -2994,6 +3040,7 @@ declare const PerpsFillUpdateEventSchema: z.ZodPipe<z.ZodObject<{
|
|
|
2994
3040
|
orderId: PerpsOrderId;
|
|
2995
3041
|
instrumentId: PerpsInstrumentId;
|
|
2996
3042
|
side: PerpsSide;
|
|
3043
|
+
settlement: boolean;
|
|
2997
3044
|
price: DecimalString;
|
|
2998
3045
|
quantity: DecimalString;
|
|
2999
3046
|
taker: boolean;
|
|
@@ -3021,6 +3068,7 @@ declare const PerpsFillUpdateEventSchema: z.ZodPipe<z.ZodObject<{
|
|
|
3021
3068
|
orderId: PerpsOrderId;
|
|
3022
3069
|
instrumentId: PerpsInstrumentId;
|
|
3023
3070
|
side: PerpsSide;
|
|
3071
|
+
settlement: boolean;
|
|
3024
3072
|
price: DecimalString;
|
|
3025
3073
|
quantity: DecimalString;
|
|
3026
3074
|
taker: boolean;
|
|
@@ -3482,6 +3530,33 @@ declare const PerpsNotificationUpdateEventSchema: z.ZodPipe<z.ZodObject<{
|
|
|
3482
3530
|
pnl: DecimalString | null;
|
|
3483
3531
|
margin_type: PerpsMarginType;
|
|
3484
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;
|
|
3485
3560
|
}>>], "type">;
|
|
3486
3561
|
}, z.core.$strip>, z.ZodTransform<{
|
|
3487
3562
|
type: "notification";
|
|
@@ -3535,6 +3610,15 @@ declare const PerpsNotificationUpdateEventSchema: z.ZodPipe<z.ZodObject<{
|
|
|
3535
3610
|
pnl: DecimalString | null;
|
|
3536
3611
|
marginType: PerpsMarginType;
|
|
3537
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;
|
|
3538
3622
|
};
|
|
3539
3623
|
}, {
|
|
3540
3624
|
ts: EpochMilliseconds;
|
|
@@ -3587,6 +3671,15 @@ declare const PerpsNotificationUpdateEventSchema: z.ZodPipe<z.ZodObject<{
|
|
|
3587
3671
|
pnl: DecimalString | null;
|
|
3588
3672
|
marginType: PerpsMarginType;
|
|
3589
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;
|
|
3590
3683
|
};
|
|
3591
3684
|
}>>;
|
|
3592
3685
|
/**
|
|
@@ -3607,6 +3700,7 @@ declare const PerpsNotificationsResyncFrameSchema: z.ZodPipe<z.ZodObject<{
|
|
|
3607
3700
|
type: z.ZodLiteral<"resync">;
|
|
3608
3701
|
}, z.core.$strip>, z.ZodTransform<{
|
|
3609
3702
|
type: "resync";
|
|
3703
|
+
reason: "server";
|
|
3610
3704
|
channel: "notifications";
|
|
3611
3705
|
timestamp: EpochMilliseconds;
|
|
3612
3706
|
sequence: number;
|
|
@@ -3630,15 +3724,16 @@ declare const PerpsTpSlUpdateEventSchema: z.ZodPipe<z.ZodObject<{
|
|
|
3630
3724
|
untriggered: "untriggered";
|
|
3631
3725
|
armed: "armed";
|
|
3632
3726
|
expired: "expired";
|
|
3727
|
+
activated: "activated";
|
|
3633
3728
|
}>;
|
|
3634
3729
|
reason: z.ZodOptional<z.ZodString>;
|
|
3635
3730
|
}, z.core.$strip>, z.ZodTransform<{
|
|
3636
3731
|
orderId: PerpsOrderId;
|
|
3637
|
-
status: "cancelled" | "untriggered" | "armed" | "expired";
|
|
3732
|
+
status: "cancelled" | "untriggered" | "armed" | "expired" | "activated";
|
|
3638
3733
|
reason: string | undefined;
|
|
3639
3734
|
}, {
|
|
3640
3735
|
oid: PerpsOrderId;
|
|
3641
|
-
st: "cancelled" | "untriggered" | "armed" | "expired";
|
|
3736
|
+
st: "cancelled" | "untriggered" | "armed" | "expired" | "activated";
|
|
3642
3737
|
reason?: string | undefined;
|
|
3643
3738
|
}>>;
|
|
3644
3739
|
}, z.core.$strip>, z.ZodTransform<{
|
|
@@ -3648,7 +3743,7 @@ declare const PerpsTpSlUpdateEventSchema: z.ZodPipe<z.ZodObject<{
|
|
|
3648
3743
|
sequence: number;
|
|
3649
3744
|
payload: {
|
|
3650
3745
|
orderId: PerpsOrderId;
|
|
3651
|
-
status: "cancelled" | "untriggered" | "armed" | "expired";
|
|
3746
|
+
status: "cancelled" | "untriggered" | "armed" | "expired" | "activated";
|
|
3652
3747
|
reason: string | undefined;
|
|
3653
3748
|
};
|
|
3654
3749
|
}, {
|
|
@@ -3657,7 +3752,7 @@ declare const PerpsTpSlUpdateEventSchema: z.ZodPipe<z.ZodObject<{
|
|
|
3657
3752
|
ch: string;
|
|
3658
3753
|
data: {
|
|
3659
3754
|
orderId: PerpsOrderId;
|
|
3660
|
-
status: "cancelled" | "untriggered" | "armed" | "expired";
|
|
3755
|
+
status: "cancelled" | "untriggered" | "armed" | "expired" | "activated";
|
|
3661
3756
|
reason: string | undefined;
|
|
3662
3757
|
};
|
|
3663
3758
|
}>>;
|
|
@@ -3894,6 +3989,7 @@ declare const PerpsSessionUpdateEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.Zo
|
|
|
3894
3989
|
cts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
3895
3990
|
uts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
3896
3991
|
coid: z.ZodOptional<z.ZodString>;
|
|
3992
|
+
chid: z.ZodOptional<z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsChaseId, number>>>;
|
|
3897
3993
|
tpsl: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodObject<{
|
|
3898
3994
|
kind: z.ZodEnum<typeof PerpsTpSlKind>;
|
|
3899
3995
|
scope: z.ZodEnum<typeof PerpsTpSlScope>;
|
|
@@ -3901,6 +3997,10 @@ declare const PerpsSessionUpdateEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.Zo
|
|
|
3901
3997
|
parent_oid: z.ZodOptional<z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsOrderId, number>>>;
|
|
3902
3998
|
armed_qty: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
|
|
3903
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>;
|
|
3904
4004
|
}, z.core.$strip>, z.ZodTransform<{
|
|
3905
4005
|
kind: PerpsTpSlKind;
|
|
3906
4006
|
scope: PerpsTpSlScope;
|
|
@@ -3908,6 +4008,10 @@ declare const PerpsSessionUpdateEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.Zo
|
|
|
3908
4008
|
parentOrderId: PerpsOrderId | undefined;
|
|
3909
4009
|
armedQuantity: DecimalString | undefined;
|
|
3910
4010
|
slippageBps: number | undefined;
|
|
4011
|
+
trailingBps: number | undefined;
|
|
4012
|
+
activationPrice: DecimalString | undefined;
|
|
4013
|
+
trailingAnchor: DecimalString | undefined;
|
|
4014
|
+
trailingActive: boolean | undefined;
|
|
3911
4015
|
}, {
|
|
3912
4016
|
kind: PerpsTpSlKind;
|
|
3913
4017
|
scope: PerpsTpSlScope;
|
|
@@ -3915,6 +4019,10 @@ declare const PerpsSessionUpdateEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.Zo
|
|
|
3915
4019
|
parent_oid?: PerpsOrderId | undefined;
|
|
3916
4020
|
armed_qty?: DecimalString | undefined;
|
|
3917
4021
|
slip_bps?: number | undefined;
|
|
4022
|
+
trail_bps?: number | undefined;
|
|
4023
|
+
act?: DecimalString | undefined;
|
|
4024
|
+
trail_anchor?: DecimalString | undefined;
|
|
4025
|
+
trail_active?: boolean | undefined;
|
|
3918
4026
|
}>>>>;
|
|
3919
4027
|
builder: z.ZodOptional<z.ZodPipe<z.ZodObject<{
|
|
3920
4028
|
address: z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_types.EvmAddress, string>>;
|
|
@@ -3931,6 +4039,19 @@ declare const PerpsSessionUpdateEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.Zo
|
|
|
3931
4039
|
address: _polymarket_types.EvmAddress;
|
|
3932
4040
|
feeRate: DecimalString;
|
|
3933
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;
|
|
3934
4055
|
id: PerpsOrderId;
|
|
3935
4056
|
instrumentId: PerpsInstrumentId;
|
|
3936
4057
|
side: OrderSide;
|
|
@@ -3945,14 +4066,6 @@ declare const PerpsSessionUpdateEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.Zo
|
|
|
3945
4066
|
createdTimestamp: EpochMilliseconds;
|
|
3946
4067
|
updatedTimestamp: EpochMilliseconds;
|
|
3947
4068
|
clientOrderId: string | undefined;
|
|
3948
|
-
tpSl: {
|
|
3949
|
-
kind: PerpsTpSlKind;
|
|
3950
|
-
scope: PerpsTpSlScope;
|
|
3951
|
-
triggerPrice: DecimalString;
|
|
3952
|
-
parentOrderId: PerpsOrderId | undefined;
|
|
3953
|
-
armedQuantity: DecimalString | undefined;
|
|
3954
|
-
slippageBps: number | undefined;
|
|
3955
|
-
} | undefined;
|
|
3956
4069
|
}, {
|
|
3957
4070
|
oid: PerpsOrderId;
|
|
3958
4071
|
iid: PerpsInstrumentId;
|
|
@@ -3968,6 +4081,7 @@ declare const PerpsSessionUpdateEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.Zo
|
|
|
3968
4081
|
cts: EpochMilliseconds;
|
|
3969
4082
|
uts: EpochMilliseconds;
|
|
3970
4083
|
coid?: string | undefined;
|
|
4084
|
+
chid?: PerpsChaseId | undefined;
|
|
3971
4085
|
tpsl?: {
|
|
3972
4086
|
kind: PerpsTpSlKind;
|
|
3973
4087
|
scope: PerpsTpSlScope;
|
|
@@ -3975,6 +4089,10 @@ declare const PerpsSessionUpdateEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.Zo
|
|
|
3975
4089
|
parentOrderId: PerpsOrderId | undefined;
|
|
3976
4090
|
armedQuantity: DecimalString | undefined;
|
|
3977
4091
|
slippageBps: number | undefined;
|
|
4092
|
+
trailingBps: number | undefined;
|
|
4093
|
+
activationPrice: DecimalString | undefined;
|
|
4094
|
+
trailingAnchor: DecimalString | undefined;
|
|
4095
|
+
trailingActive: boolean | undefined;
|
|
3978
4096
|
} | null | undefined;
|
|
3979
4097
|
builder?: {
|
|
3980
4098
|
address: _polymarket_types.EvmAddress;
|
|
@@ -3991,6 +4109,19 @@ declare const PerpsSessionUpdateEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.Zo
|
|
|
3991
4109
|
address: _polymarket_types.EvmAddress;
|
|
3992
4110
|
feeRate: DecimalString;
|
|
3993
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;
|
|
3994
4125
|
id: PerpsOrderId;
|
|
3995
4126
|
instrumentId: PerpsInstrumentId;
|
|
3996
4127
|
side: OrderSide;
|
|
@@ -4005,14 +4136,6 @@ declare const PerpsSessionUpdateEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.Zo
|
|
|
4005
4136
|
createdTimestamp: EpochMilliseconds;
|
|
4006
4137
|
updatedTimestamp: EpochMilliseconds;
|
|
4007
4138
|
clientOrderId: string | undefined;
|
|
4008
|
-
tpSl: {
|
|
4009
|
-
kind: PerpsTpSlKind;
|
|
4010
|
-
scope: PerpsTpSlScope;
|
|
4011
|
-
triggerPrice: DecimalString;
|
|
4012
|
-
parentOrderId: PerpsOrderId | undefined;
|
|
4013
|
-
armedQuantity: DecimalString | undefined;
|
|
4014
|
-
slippageBps: number | undefined;
|
|
4015
|
-
} | undefined;
|
|
4016
4139
|
};
|
|
4017
4140
|
}, {
|
|
4018
4141
|
ts: EpochMilliseconds;
|
|
@@ -4023,6 +4146,19 @@ declare const PerpsSessionUpdateEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.Zo
|
|
|
4023
4146
|
address: _polymarket_types.EvmAddress;
|
|
4024
4147
|
feeRate: DecimalString;
|
|
4025
4148
|
} | undefined;
|
|
4149
|
+
tpSl: {
|
|
4150
|
+
kind: PerpsTpSlKind;
|
|
4151
|
+
scope: PerpsTpSlScope;
|
|
4152
|
+
triggerPrice: DecimalString;
|
|
4153
|
+
parentOrderId: PerpsOrderId | undefined;
|
|
4154
|
+
armedQuantity: DecimalString | undefined;
|
|
4155
|
+
slippageBps: number | undefined;
|
|
4156
|
+
trailingBps: number | undefined;
|
|
4157
|
+
activationPrice: DecimalString | undefined;
|
|
4158
|
+
trailingAnchor: DecimalString | undefined;
|
|
4159
|
+
trailingActive: boolean | undefined;
|
|
4160
|
+
} | undefined;
|
|
4161
|
+
chaseId?: PerpsChaseId | undefined;
|
|
4026
4162
|
id: PerpsOrderId;
|
|
4027
4163
|
instrumentId: PerpsInstrumentId;
|
|
4028
4164
|
side: OrderSide;
|
|
@@ -4037,14 +4173,6 @@ declare const PerpsSessionUpdateEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.Zo
|
|
|
4037
4173
|
createdTimestamp: EpochMilliseconds;
|
|
4038
4174
|
updatedTimestamp: EpochMilliseconds;
|
|
4039
4175
|
clientOrderId: string | undefined;
|
|
4040
|
-
tpSl: {
|
|
4041
|
-
kind: PerpsTpSlKind;
|
|
4042
|
-
scope: PerpsTpSlScope;
|
|
4043
|
-
triggerPrice: DecimalString;
|
|
4044
|
-
parentOrderId: PerpsOrderId | undefined;
|
|
4045
|
-
armedQuantity: DecimalString | undefined;
|
|
4046
|
-
slippageBps: number | undefined;
|
|
4047
|
-
} | undefined;
|
|
4048
4176
|
};
|
|
4049
4177
|
}>>, z.ZodPipe<z.ZodObject<{
|
|
4050
4178
|
ts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
@@ -4055,6 +4183,7 @@ declare const PerpsSessionUpdateEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.Zo
|
|
|
4055
4183
|
oid: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsOrderId, number>>;
|
|
4056
4184
|
iid: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
|
|
4057
4185
|
side: z.ZodEnum<typeof PerpsSide>;
|
|
4186
|
+
settlement: z.ZodDefault<z.ZodBoolean>;
|
|
4058
4187
|
p: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
4059
4188
|
qty: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
4060
4189
|
taker: z.ZodBoolean;
|
|
@@ -4094,6 +4223,7 @@ declare const PerpsSessionUpdateEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.Zo
|
|
|
4094
4223
|
orderId: PerpsOrderId;
|
|
4095
4224
|
instrumentId: PerpsInstrumentId;
|
|
4096
4225
|
side: PerpsSide;
|
|
4226
|
+
settlement: boolean;
|
|
4097
4227
|
price: DecimalString;
|
|
4098
4228
|
quantity: DecimalString;
|
|
4099
4229
|
taker: boolean;
|
|
@@ -4105,6 +4235,7 @@ declare const PerpsSessionUpdateEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.Zo
|
|
|
4105
4235
|
oid: PerpsOrderId;
|
|
4106
4236
|
iid: PerpsInstrumentId;
|
|
4107
4237
|
side: PerpsSide;
|
|
4238
|
+
settlement: boolean;
|
|
4108
4239
|
p: DecimalString;
|
|
4109
4240
|
qty: DecimalString;
|
|
4110
4241
|
taker: boolean;
|
|
@@ -4144,6 +4275,7 @@ declare const PerpsSessionUpdateEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.Zo
|
|
|
4144
4275
|
orderId: PerpsOrderId;
|
|
4145
4276
|
instrumentId: PerpsInstrumentId;
|
|
4146
4277
|
side: PerpsSide;
|
|
4278
|
+
settlement: boolean;
|
|
4147
4279
|
price: DecimalString;
|
|
4148
4280
|
quantity: DecimalString;
|
|
4149
4281
|
taker: boolean;
|
|
@@ -4171,6 +4303,7 @@ declare const PerpsSessionUpdateEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.Zo
|
|
|
4171
4303
|
orderId: PerpsOrderId;
|
|
4172
4304
|
instrumentId: PerpsInstrumentId;
|
|
4173
4305
|
side: PerpsSide;
|
|
4306
|
+
settlement: boolean;
|
|
4174
4307
|
price: DecimalString;
|
|
4175
4308
|
quantity: DecimalString;
|
|
4176
4309
|
taker: boolean;
|
|
@@ -4593,6 +4726,33 @@ declare const PerpsSessionUpdateEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.Zo
|
|
|
4593
4726
|
pnl: DecimalString | null;
|
|
4594
4727
|
margin_type: PerpsMarginType;
|
|
4595
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;
|
|
4596
4756
|
}>>], "type">;
|
|
4597
4757
|
}, z.core.$strip>, z.ZodTransform<{
|
|
4598
4758
|
type: "notification";
|
|
@@ -4646,6 +4806,15 @@ declare const PerpsSessionUpdateEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.Zo
|
|
|
4646
4806
|
pnl: DecimalString | null;
|
|
4647
4807
|
marginType: PerpsMarginType;
|
|
4648
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;
|
|
4649
4818
|
};
|
|
4650
4819
|
}, {
|
|
4651
4820
|
ts: EpochMilliseconds;
|
|
@@ -4698,6 +4867,15 @@ declare const PerpsSessionUpdateEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.Zo
|
|
|
4698
4867
|
pnl: DecimalString | null;
|
|
4699
4868
|
marginType: PerpsMarginType;
|
|
4700
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;
|
|
4701
4879
|
};
|
|
4702
4880
|
}>>, z.ZodPipe<z.ZodObject<{
|
|
4703
4881
|
ts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
@@ -4710,15 +4888,16 @@ declare const PerpsSessionUpdateEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.Zo
|
|
|
4710
4888
|
untriggered: "untriggered";
|
|
4711
4889
|
armed: "armed";
|
|
4712
4890
|
expired: "expired";
|
|
4891
|
+
activated: "activated";
|
|
4713
4892
|
}>;
|
|
4714
4893
|
reason: z.ZodOptional<z.ZodString>;
|
|
4715
4894
|
}, z.core.$strip>, z.ZodTransform<{
|
|
4716
4895
|
orderId: PerpsOrderId;
|
|
4717
|
-
status: "cancelled" | "untriggered" | "armed" | "expired";
|
|
4896
|
+
status: "cancelled" | "untriggered" | "armed" | "expired" | "activated";
|
|
4718
4897
|
reason: string | undefined;
|
|
4719
4898
|
}, {
|
|
4720
4899
|
oid: PerpsOrderId;
|
|
4721
|
-
st: "cancelled" | "untriggered" | "armed" | "expired";
|
|
4900
|
+
st: "cancelled" | "untriggered" | "armed" | "expired" | "activated";
|
|
4722
4901
|
reason?: string | undefined;
|
|
4723
4902
|
}>>;
|
|
4724
4903
|
}, z.core.$strip>, z.ZodTransform<{
|
|
@@ -4728,7 +4907,7 @@ declare const PerpsSessionUpdateEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.Zo
|
|
|
4728
4907
|
sequence: number;
|
|
4729
4908
|
payload: {
|
|
4730
4909
|
orderId: PerpsOrderId;
|
|
4731
|
-
status: "cancelled" | "untriggered" | "armed" | "expired";
|
|
4910
|
+
status: "cancelled" | "untriggered" | "armed" | "expired" | "activated";
|
|
4732
4911
|
reason: string | undefined;
|
|
4733
4912
|
};
|
|
4734
4913
|
}, {
|
|
@@ -4737,7 +4916,7 @@ declare const PerpsSessionUpdateEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.Zo
|
|
|
4737
4916
|
ch: string;
|
|
4738
4917
|
data: {
|
|
4739
4918
|
orderId: PerpsOrderId;
|
|
4740
|
-
status: "cancelled" | "untriggered" | "armed" | "expired";
|
|
4919
|
+
status: "cancelled" | "untriggered" | "armed" | "expired" | "activated";
|
|
4741
4920
|
reason: string | undefined;
|
|
4742
4921
|
};
|
|
4743
4922
|
}>>]>;
|
|
@@ -4746,6 +4925,11 @@ declare const PerpsSessionUpdateEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.Zo
|
|
|
4746
4925
|
*/
|
|
4747
4926
|
type PerpsSessionUpdateEvent = z.infer<typeof PerpsSessionUpdateEventSchema>;
|
|
4748
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
|
+
*
|
|
4749
4933
|
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
4750
4934
|
*/
|
|
4751
4935
|
type PerpsResyncEvent = {
|
|
@@ -4754,7 +4938,9 @@ type PerpsResyncEvent = {
|
|
|
4754
4938
|
channel?: string;
|
|
4755
4939
|
previousSequence?: number;
|
|
4756
4940
|
sequence?: number;
|
|
4757
|
-
}
|
|
4941
|
+
} | (z.infer<typeof PerpsNotificationsResyncFrameSchema> & {
|
|
4942
|
+
previousSequence?: never;
|
|
4943
|
+
});
|
|
4758
4944
|
/**
|
|
4759
4945
|
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
4760
4946
|
*/
|
|
@@ -4778,15 +4964,33 @@ declare enum RealtimeKnownErrorCode {
|
|
|
4778
4964
|
* before a client release that enumerates them.
|
|
4779
4965
|
*/
|
|
4780
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 & {});
|
|
4781
4978
|
declare enum PolyboltChannel {
|
|
4782
4979
|
Crypto = "price.crypto",
|
|
4783
4980
|
Twap = "price.crypto.twap",
|
|
4784
|
-
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"
|
|
4785
4988
|
}
|
|
4786
4989
|
/** A filter sent to a PolyBolt price channel. */
|
|
4787
4990
|
type PolyboltFilter = {
|
|
4788
4991
|
symbol: string;
|
|
4789
4992
|
window_seconds?: 60;
|
|
4993
|
+
provider?: PriceProvider;
|
|
4790
4994
|
} | {
|
|
4791
4995
|
asset_id: string;
|
|
4792
4996
|
};
|
|
@@ -4806,6 +5010,7 @@ declare const PolyboltAckSchema: z.ZodObject<{
|
|
|
4806
5010
|
op: z.ZodEnum<typeof PolyboltAckOp>;
|
|
4807
5011
|
channel: z.ZodOptional<z.ZodString>;
|
|
4808
5012
|
rid: z.ZodOptional<z.ZodString>;
|
|
5013
|
+
provider: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<(string & {}) | KnownPriceSource, string>>>;
|
|
4809
5014
|
code: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<(string & {}) | RealtimeKnownErrorCode, string>>>;
|
|
4810
5015
|
}, z.core.$strip>;
|
|
4811
5016
|
type PolyboltAck = z.infer<typeof PolyboltAckSchema>;
|
|
@@ -4827,6 +5032,7 @@ declare const CryptoPriceEventSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
4827
5032
|
type: z.ZodLiteral<"update">;
|
|
4828
5033
|
payload: z.ZodPipe<z.ZodObject<{
|
|
4829
5034
|
symbol: z.ZodString;
|
|
5035
|
+
source: z.ZodPipe<z.ZodString, z.ZodTransform<(string & {}) | KnownPriceSource, string>>;
|
|
4830
5036
|
timestamp: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
4831
5037
|
value: z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<DecimalString, number>>]>;
|
|
4832
5038
|
full_accuracy_value: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
@@ -4834,12 +5040,14 @@ declare const CryptoPriceEventSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
4834
5040
|
is_carried_forward: z.ZodOptional<z.ZodBoolean>;
|
|
4835
5041
|
}, z.core.$strip>, z.ZodTransform<{
|
|
4836
5042
|
symbol: string;
|
|
5043
|
+
source: (string & {}) | KnownPriceSource;
|
|
4837
5044
|
timestamp: EpochMilliseconds;
|
|
4838
5045
|
value: DecimalString;
|
|
4839
5046
|
receivedAt: EpochMilliseconds | undefined;
|
|
4840
5047
|
isCarriedForward: boolean | undefined;
|
|
4841
5048
|
}, {
|
|
4842
5049
|
symbol: string;
|
|
5050
|
+
source: (string & {}) | KnownPriceSource;
|
|
4843
5051
|
timestamp: EpochMilliseconds;
|
|
4844
5052
|
value: DecimalString;
|
|
4845
5053
|
full_accuracy_value: DecimalString;
|
|
@@ -4854,6 +5062,7 @@ declare const CryptoPriceEventSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
4854
5062
|
type: z.ZodLiteral<"subscribe">;
|
|
4855
5063
|
payload: z.ZodObject<{
|
|
4856
5064
|
symbol: z.ZodString;
|
|
5065
|
+
source: z.ZodPipe<z.ZodString, z.ZodTransform<(string & {}) | KnownPriceSource, string>>;
|
|
4857
5066
|
data: z.ZodArray<z.ZodPipe<z.ZodObject<{
|
|
4858
5067
|
timestamp: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
4859
5068
|
value: z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<DecimalString, number>>]>;
|
|
@@ -4887,17 +5096,20 @@ declare const CryptoTwapPriceEventSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
4887
5096
|
type: z.ZodLiteral<"update">;
|
|
4888
5097
|
payload: z.ZodPipe<z.ZodObject<{
|
|
4889
5098
|
symbol: z.ZodString;
|
|
5099
|
+
source: z.ZodPipe<z.ZodString, z.ZodTransform<(string & {}) | KnownPriceSource, string>>;
|
|
4890
5100
|
timestamp: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
4891
5101
|
value: z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<DecimalString, number>>]>;
|
|
4892
5102
|
full_accuracy_value: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
4893
5103
|
window_seconds: z.ZodLiteral<60>;
|
|
4894
5104
|
}, z.core.$strip>, z.ZodTransform<{
|
|
4895
5105
|
symbol: string;
|
|
5106
|
+
source: (string & {}) | KnownPriceSource;
|
|
4896
5107
|
timestamp: EpochMilliseconds;
|
|
4897
5108
|
value: DecimalString;
|
|
4898
5109
|
windowSeconds: 60;
|
|
4899
5110
|
}, {
|
|
4900
5111
|
symbol: string;
|
|
5112
|
+
source: (string & {}) | KnownPriceSource;
|
|
4901
5113
|
timestamp: EpochMilliseconds;
|
|
4902
5114
|
value: DecimalString;
|
|
4903
5115
|
full_accuracy_value: DecimalString;
|
|
@@ -4911,6 +5123,7 @@ declare const CryptoTwapPriceEventSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
4911
5123
|
type: z.ZodLiteral<"subscribe">;
|
|
4912
5124
|
payload: z.ZodPipe<z.ZodObject<{
|
|
4913
5125
|
symbol: z.ZodString;
|
|
5126
|
+
source: z.ZodPipe<z.ZodString, z.ZodTransform<(string & {}) | KnownPriceSource, string>>;
|
|
4914
5127
|
data: z.ZodArray<z.ZodPipe<z.ZodObject<{
|
|
4915
5128
|
timestamp: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
4916
5129
|
value: z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<DecimalString, number>>]>;
|
|
@@ -4926,6 +5139,7 @@ declare const CryptoTwapPriceEventSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
4926
5139
|
window_seconds: z.ZodLiteral<60>;
|
|
4927
5140
|
}, z.core.$strip>, z.ZodTransform<{
|
|
4928
5141
|
symbol: string;
|
|
5142
|
+
source: (string & {}) | KnownPriceSource;
|
|
4929
5143
|
data: {
|
|
4930
5144
|
timestamp: EpochMilliseconds;
|
|
4931
5145
|
value: DecimalString;
|
|
@@ -4933,6 +5147,7 @@ declare const CryptoTwapPriceEventSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
4933
5147
|
windowSeconds: 60;
|
|
4934
5148
|
}, {
|
|
4935
5149
|
symbol: string;
|
|
5150
|
+
source: (string & {}) | KnownPriceSource;
|
|
4936
5151
|
data: {
|
|
4937
5152
|
timestamp: EpochMilliseconds;
|
|
4938
5153
|
value: DecimalString;
|
|
@@ -4959,6 +5174,7 @@ declare const EquityPriceEventSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
4959
5174
|
type: z.ZodLiteral<"update">;
|
|
4960
5175
|
payload: z.ZodPipe<z.ZodObject<{
|
|
4961
5176
|
symbol: z.ZodString;
|
|
5177
|
+
source: z.ZodPipe<z.ZodString, z.ZodTransform<(string & {}) | KnownPriceSource, string>>;
|
|
4962
5178
|
timestamp: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
4963
5179
|
value: z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<DecimalString, number>>]>;
|
|
4964
5180
|
full_accuracy_value: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
@@ -4966,12 +5182,14 @@ declare const EquityPriceEventSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
4966
5182
|
is_carried_forward: z.ZodOptional<z.ZodBoolean>;
|
|
4967
5183
|
}, z.core.$strip>, z.ZodTransform<{
|
|
4968
5184
|
symbol: string;
|
|
5185
|
+
source: (string & {}) | KnownPriceSource;
|
|
4969
5186
|
timestamp: EpochMilliseconds;
|
|
4970
5187
|
value: DecimalString;
|
|
4971
5188
|
receivedAt: EpochMilliseconds | undefined;
|
|
4972
5189
|
isCarriedForward: boolean | undefined;
|
|
4973
5190
|
}, {
|
|
4974
5191
|
symbol: string;
|
|
5192
|
+
source: (string & {}) | KnownPriceSource;
|
|
4975
5193
|
timestamp: EpochMilliseconds;
|
|
4976
5194
|
value: DecimalString;
|
|
4977
5195
|
full_accuracy_value: DecimalString;
|
|
@@ -4986,6 +5204,7 @@ declare const EquityPriceEventSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
4986
5204
|
type: z.ZodLiteral<"subscribe">;
|
|
4987
5205
|
payload: z.ZodObject<{
|
|
4988
5206
|
symbol: z.ZodString;
|
|
5207
|
+
source: z.ZodPipe<z.ZodString, z.ZodTransform<(string & {}) | KnownPriceSource, string>>;
|
|
4989
5208
|
data: z.ZodArray<z.ZodPipe<z.ZodObject<{
|
|
4990
5209
|
timestamp: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
4991
5210
|
value: z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<DecimalString, number>>]>;
|
|
@@ -5008,7 +5227,85 @@ declare const EquityPriceEventSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
5008
5227
|
* values from those connections may interleave.
|
|
5009
5228
|
*/
|
|
5010
5229
|
type EquityPriceEvent = z.infer<typeof EquityPriceEventSchema>;
|
|
5011
|
-
|
|
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;
|
|
5012
5309
|
|
|
5013
5310
|
declare const CommentRemovedPayloadSchema: z.ZodObject<{
|
|
5014
5311
|
id: z.ZodString;
|
|
@@ -7415,4 +7712,4 @@ declare const SportsResultEventSchema: z.ZodPipe<z.ZodPipe<z.ZodObject<{
|
|
|
7415
7712
|
}>>;
|
|
7416
7713
|
type SportsEvent = z.infer<typeof SportsResultEventSchema>;
|
|
7417
7714
|
|
|
7418
|
-
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 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, 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 };
|