@polymarket/bindings 0.11.0 → 0.12.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.
@@ -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, V as PerpsKlineInterval, c as PerpsDepositStatus, j as PerpsTradeId, ac as PerpsOrderId, k as PerpsSide, b as PerpsFundingPaymentId, a4 as PerpsNotificationId, a9 as PerpsNotificationType, a6 as PerpsNotificationOrderType, $ as PerpsMarginType, av as PerpsTimeInForce, af as PerpsOrderStatus, ax as PerpsTpSlKind, aB as PerpsTpSlScope, d as PerpsWithdrawalId, e as PerpsKnownWithdrawalStatus } from '../orders-CAELACaR.js';
3
+ import { P as PerpsInstrumentId, y as PerpsBuilderEarningId, k as PerpsTradeId, aB as PerpsOrderId, V as PerpsClientOrderId, an as PerpsLiquidityRole, ag as PerpsKlineInterval, c as PerpsDepositStatus, l as PerpsSide, b as PerpsFundingPaymentId, at as PerpsNotificationId, ay as PerpsNotificationType, av as PerpsNotificationOrderType, ao as PerpsMarginType, aU as PerpsTimeInForce, aE as PerpsOrderStatus, aW as PerpsTpSlKind, a_ as PerpsTpSlScope, g as PerpsWithdrawalId, h as PerpsKnownWithdrawalStatus } from '../orders-BMW5PN-Q.js';
4
4
  import * as _polymarket_types from '@polymarket/types';
5
- import { R as ReactionType } from '../comment-C-jBbhp7.js';
5
+ import { R as ReactionType } from '../comment-CKJIqOZS.js';
6
6
 
7
7
  declare enum UserOrderStatus {
8
8
  Live = "LIVE",
@@ -2758,7 +2758,21 @@ declare const PerpsOrderUpdateEventSchema: z.ZodPipe<z.ZodObject<{
2758
2758
  armed_qty?: DecimalString | undefined;
2759
2759
  slip_bps?: number | undefined;
2760
2760
  }>>>>;
2761
+ builder: z.ZodOptional<z.ZodPipe<z.ZodObject<{
2762
+ address: z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_types.EvmAddress, string>>;
2763
+ fee_rate: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
2764
+ }, z.core.$strip>, z.ZodTransform<{
2765
+ address: _polymarket_types.EvmAddress;
2766
+ feeRate: DecimalString;
2767
+ }, {
2768
+ address: _polymarket_types.EvmAddress;
2769
+ fee_rate: DecimalString;
2770
+ }>>>;
2761
2771
  }, z.core.$strip>, z.ZodTransform<{
2772
+ builder?: {
2773
+ address: _polymarket_types.EvmAddress;
2774
+ feeRate: DecimalString;
2775
+ } | undefined;
2762
2776
  id: PerpsOrderId;
2763
2777
  instrumentId: PerpsInstrumentId;
2764
2778
  side: OrderSide;
@@ -2804,6 +2818,10 @@ declare const PerpsOrderUpdateEventSchema: z.ZodPipe<z.ZodObject<{
2804
2818
  armedQuantity: DecimalString | undefined;
2805
2819
  slippageBps: number | undefined;
2806
2820
  } | null | undefined;
2821
+ builder?: {
2822
+ address: _polymarket_types.EvmAddress;
2823
+ feeRate: DecimalString;
2824
+ } | undefined;
2807
2825
  }>>;
2808
2826
  }, z.core.$strip>, z.ZodTransform<{
2809
2827
  type: "order";
@@ -2811,6 +2829,10 @@ declare const PerpsOrderUpdateEventSchema: z.ZodPipe<z.ZodObject<{
2811
2829
  timestamp: number;
2812
2830
  sequence: number;
2813
2831
  payload: {
2832
+ builder?: {
2833
+ address: _polymarket_types.EvmAddress;
2834
+ feeRate: DecimalString;
2835
+ } | undefined;
2814
2836
  id: PerpsOrderId;
2815
2837
  instrumentId: PerpsInstrumentId;
2816
2838
  side: OrderSide;
@@ -2839,6 +2861,10 @@ declare const PerpsOrderUpdateEventSchema: z.ZodPipe<z.ZodObject<{
2839
2861
  sq: number;
2840
2862
  ch: "orders";
2841
2863
  data: {
2864
+ builder?: {
2865
+ address: _polymarket_types.EvmAddress;
2866
+ feeRate: DecimalString;
2867
+ } | undefined;
2842
2868
  id: PerpsOrderId;
2843
2869
  instrumentId: PerpsInstrumentId;
2844
2870
  side: OrderSide;
@@ -2882,7 +2908,19 @@ declare const PerpsFillUpdateEventSchema: z.ZodPipe<z.ZodObject<{
2882
2908
  p: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
2883
2909
  qty: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
2884
2910
  taker: z.ZodBoolean;
2885
- fee: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
2911
+ fee: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
2912
+ builder_fee: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>>;
2913
+ total_fee: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>>;
2914
+ builder: z.ZodOptional<z.ZodPipe<z.ZodObject<{
2915
+ address: z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_types.EvmAddress, string>>;
2916
+ fee_rate: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
2917
+ }, z.core.$strip>, z.ZodTransform<{
2918
+ address: _polymarket_types.EvmAddress;
2919
+ feeRate: DecimalString;
2920
+ }, {
2921
+ address: _polymarket_types.EvmAddress;
2922
+ fee_rate: DecimalString;
2923
+ }>>>;
2886
2924
  fea: z.ZodString;
2887
2925
  psz: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
2888
2926
  pep: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
@@ -2891,6 +2929,17 @@ declare const PerpsFillUpdateEventSchema: z.ZodPipe<z.ZodObject<{
2891
2929
  ts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
2892
2930
  coid: z.ZodOptional<z.ZodString>;
2893
2931
  }, z.core.$strip>, z.ZodTransform<{
2932
+ feeAsset: string;
2933
+ previousSize: DecimalString;
2934
+ previousEntryPrice: DecimalString;
2935
+ pnl: DecimalString;
2936
+ liquidation: boolean;
2937
+ timestamp: EpochMilliseconds;
2938
+ clientOrderId: string | undefined;
2939
+ builder?: {
2940
+ address: _polymarket_types.EvmAddress;
2941
+ feeRate: DecimalString;
2942
+ } | undefined;
2894
2943
  tradeId: PerpsTradeId;
2895
2944
  orderId: PerpsOrderId;
2896
2945
  instrumentId: PerpsInstrumentId;
@@ -2899,13 +2948,8 @@ declare const PerpsFillUpdateEventSchema: z.ZodPipe<z.ZodObject<{
2899
2948
  quantity: DecimalString;
2900
2949
  taker: boolean;
2901
2950
  fee: DecimalString;
2902
- feeAsset: string;
2903
- previousSize: DecimalString;
2904
- previousEntryPrice: DecimalString;
2905
- pnl: DecimalString;
2906
- liquidation: boolean;
2907
- timestamp: EpochMilliseconds;
2908
- clientOrderId: string | undefined;
2951
+ builderFee: DecimalString;
2952
+ totalFee: DecimalString;
2909
2953
  }, {
2910
2954
  tid: PerpsTradeId;
2911
2955
  oid: PerpsOrderId;
@@ -2921,6 +2965,12 @@ declare const PerpsFillUpdateEventSchema: z.ZodPipe<z.ZodObject<{
2921
2965
  pnl: DecimalString;
2922
2966
  liq: boolean;
2923
2967
  ts: EpochMilliseconds;
2968
+ builder_fee?: DecimalString | undefined;
2969
+ total_fee?: DecimalString | undefined;
2970
+ builder?: {
2971
+ address: _polymarket_types.EvmAddress;
2972
+ feeRate: DecimalString;
2973
+ } | undefined;
2924
2974
  coid?: string | undefined;
2925
2975
  }>>>;
2926
2976
  }, z.core.$strip>, z.ZodTransform<{
@@ -2929,6 +2979,17 @@ declare const PerpsFillUpdateEventSchema: z.ZodPipe<z.ZodObject<{
2929
2979
  timestamp: number;
2930
2980
  sequence: number;
2931
2981
  payload: {
2982
+ feeAsset: string;
2983
+ previousSize: DecimalString;
2984
+ previousEntryPrice: DecimalString;
2985
+ pnl: DecimalString;
2986
+ liquidation: boolean;
2987
+ timestamp: EpochMilliseconds;
2988
+ clientOrderId: string | undefined;
2989
+ builder?: {
2990
+ address: _polymarket_types.EvmAddress;
2991
+ feeRate: DecimalString;
2992
+ } | undefined;
2932
2993
  tradeId: PerpsTradeId;
2933
2994
  orderId: PerpsOrderId;
2934
2995
  instrumentId: PerpsInstrumentId;
@@ -2937,6 +2998,14 @@ declare const PerpsFillUpdateEventSchema: z.ZodPipe<z.ZodObject<{
2937
2998
  quantity: DecimalString;
2938
2999
  taker: boolean;
2939
3000
  fee: DecimalString;
3001
+ builderFee: DecimalString;
3002
+ totalFee: DecimalString;
3003
+ }[];
3004
+ }, {
3005
+ ts: EpochMilliseconds;
3006
+ sq: number;
3007
+ ch: "fills";
3008
+ data: {
2940
3009
  feeAsset: string;
2941
3010
  previousSize: DecimalString;
2942
3011
  previousEntryPrice: DecimalString;
@@ -2944,12 +3013,10 @@ declare const PerpsFillUpdateEventSchema: z.ZodPipe<z.ZodObject<{
2944
3013
  liquidation: boolean;
2945
3014
  timestamp: EpochMilliseconds;
2946
3015
  clientOrderId: string | undefined;
2947
- }[];
2948
- }, {
2949
- ts: EpochMilliseconds;
2950
- sq: number;
2951
- ch: "fills";
2952
- data: {
3016
+ builder?: {
3017
+ address: _polymarket_types.EvmAddress;
3018
+ feeRate: DecimalString;
3019
+ } | undefined;
2953
3020
  tradeId: PerpsTradeId;
2954
3021
  orderId: PerpsOrderId;
2955
3022
  instrumentId: PerpsInstrumentId;
@@ -2958,19 +3025,132 @@ declare const PerpsFillUpdateEventSchema: z.ZodPipe<z.ZodObject<{
2958
3025
  quantity: DecimalString;
2959
3026
  taker: boolean;
2960
3027
  fee: DecimalString;
2961
- feeAsset: string;
2962
- previousSize: DecimalString;
2963
- previousEntryPrice: DecimalString;
2964
- pnl: DecimalString;
2965
- liquidation: boolean;
2966
- timestamp: EpochMilliseconds;
2967
- clientOrderId: string | undefined;
3028
+ builderFee: DecimalString;
3029
+ totalFee: DecimalString;
2968
3030
  }[];
2969
3031
  }>>;
2970
3032
  /**
2971
3033
  * @experimental This API may change in a breaking way in any release, including patch releases.
2972
3034
  */
2973
3035
  type PerpsFillUpdateEvent = z.infer<typeof PerpsFillUpdateEventSchema>;
3036
+ /**
3037
+ * Live builder receipts. Sequence numbers are sparse engine sequences.
3038
+ * @experimental This API may change in a breaking way in any release, including patch releases.
3039
+ */
3040
+ declare const PerpsBuilderFillUpdateEventSchema: z.ZodPipe<z.ZodObject<{
3041
+ ts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
3042
+ sq: z.ZodNumber;
3043
+ ch: z.ZodLiteral<"builderFills">;
3044
+ data: z.ZodArray<z.ZodPipe<z.ZodObject<{
3045
+ earning_id: z.ZodPipe<z.ZodString, z.ZodTransform<PerpsBuilderEarningId, string>>;
3046
+ trade_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsTradeId, number>>;
3047
+ order_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsOrderId, number>>;
3048
+ instrument_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
3049
+ trader: z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_types.EvmAddress, string>>;
3050
+ buy: z.ZodBoolean;
3051
+ price: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
3052
+ quantity: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
3053
+ client_order_id: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<PerpsClientOrderId, string>>>;
3054
+ side: z.ZodEnum<typeof PerpsLiquidityRole>;
3055
+ timestamp: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
3056
+ sequence: z.ZodNumber;
3057
+ notional: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
3058
+ fee_asset: z.ZodString;
3059
+ fee: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
3060
+ builder_fee: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
3061
+ total_fee: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
3062
+ fee_rate: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
3063
+ }, z.core.$strip>, z.ZodTransform<{
3064
+ liquidityRole: PerpsLiquidityRole;
3065
+ timestamp: EpochMilliseconds;
3066
+ sequence: number;
3067
+ notional: DecimalString;
3068
+ feeAsset: string;
3069
+ fee: DecimalString;
3070
+ builderFee: DecimalString;
3071
+ totalFee: DecimalString;
3072
+ feeRate: DecimalString;
3073
+ clientOrderId?: PerpsClientOrderId | undefined;
3074
+ earningId: PerpsBuilderEarningId;
3075
+ tradeId: PerpsTradeId;
3076
+ orderId: PerpsOrderId;
3077
+ instrumentId: PerpsInstrumentId;
3078
+ trader: _polymarket_types.EvmAddress;
3079
+ side: OrderSide;
3080
+ price: DecimalString;
3081
+ quantity: DecimalString;
3082
+ }, {
3083
+ earning_id: PerpsBuilderEarningId;
3084
+ trade_id: PerpsTradeId;
3085
+ order_id: PerpsOrderId;
3086
+ instrument_id: PerpsInstrumentId;
3087
+ trader: _polymarket_types.EvmAddress;
3088
+ buy: boolean;
3089
+ price: DecimalString;
3090
+ quantity: DecimalString;
3091
+ side: PerpsLiquidityRole;
3092
+ timestamp: EpochMilliseconds;
3093
+ sequence: number;
3094
+ notional: DecimalString;
3095
+ fee_asset: string;
3096
+ fee: DecimalString;
3097
+ builder_fee: DecimalString;
3098
+ total_fee: DecimalString;
3099
+ fee_rate: DecimalString;
3100
+ client_order_id?: PerpsClientOrderId | undefined;
3101
+ }>>>;
3102
+ }, z.core.$strip>, z.ZodTransform<{
3103
+ type: "builderFill";
3104
+ channel: "builderFills";
3105
+ timestamp: EpochMilliseconds;
3106
+ sequence: number;
3107
+ payload: {
3108
+ liquidityRole: PerpsLiquidityRole;
3109
+ timestamp: EpochMilliseconds;
3110
+ sequence: number;
3111
+ notional: DecimalString;
3112
+ feeAsset: string;
3113
+ fee: DecimalString;
3114
+ builderFee: DecimalString;
3115
+ totalFee: DecimalString;
3116
+ feeRate: DecimalString;
3117
+ clientOrderId?: PerpsClientOrderId | undefined;
3118
+ earningId: PerpsBuilderEarningId;
3119
+ tradeId: PerpsTradeId;
3120
+ orderId: PerpsOrderId;
3121
+ instrumentId: PerpsInstrumentId;
3122
+ trader: _polymarket_types.EvmAddress;
3123
+ side: OrderSide;
3124
+ price: DecimalString;
3125
+ quantity: DecimalString;
3126
+ }[];
3127
+ }, {
3128
+ ts: EpochMilliseconds;
3129
+ sq: number;
3130
+ ch: "builderFills";
3131
+ data: {
3132
+ liquidityRole: PerpsLiquidityRole;
3133
+ timestamp: EpochMilliseconds;
3134
+ sequence: number;
3135
+ notional: DecimalString;
3136
+ feeAsset: string;
3137
+ fee: DecimalString;
3138
+ builderFee: DecimalString;
3139
+ totalFee: DecimalString;
3140
+ feeRate: DecimalString;
3141
+ clientOrderId?: PerpsClientOrderId | undefined;
3142
+ earningId: PerpsBuilderEarningId;
3143
+ tradeId: PerpsTradeId;
3144
+ orderId: PerpsOrderId;
3145
+ instrumentId: PerpsInstrumentId;
3146
+ trader: _polymarket_types.EvmAddress;
3147
+ side: OrderSide;
3148
+ price: DecimalString;
3149
+ quantity: DecimalString;
3150
+ }[];
3151
+ }>>;
3152
+ /** @experimental This API may change in a breaking way in any release, including patch releases. */
3153
+ type PerpsBuilderFillUpdateEvent = z.infer<typeof PerpsBuilderFillUpdateEventSchema>;
2974
3154
  /**
2975
3155
  * @experimental This API may change in a breaking way in any release, including patch releases.
2976
3156
  */
@@ -3736,7 +3916,21 @@ declare const PerpsSessionUpdateEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.Zo
3736
3916
  armed_qty?: DecimalString | undefined;
3737
3917
  slip_bps?: number | undefined;
3738
3918
  }>>>>;
3919
+ builder: z.ZodOptional<z.ZodPipe<z.ZodObject<{
3920
+ address: z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_types.EvmAddress, string>>;
3921
+ fee_rate: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
3922
+ }, z.core.$strip>, z.ZodTransform<{
3923
+ address: _polymarket_types.EvmAddress;
3924
+ feeRate: DecimalString;
3925
+ }, {
3926
+ address: _polymarket_types.EvmAddress;
3927
+ fee_rate: DecimalString;
3928
+ }>>>;
3739
3929
  }, z.core.$strip>, z.ZodTransform<{
3930
+ builder?: {
3931
+ address: _polymarket_types.EvmAddress;
3932
+ feeRate: DecimalString;
3933
+ } | undefined;
3740
3934
  id: PerpsOrderId;
3741
3935
  instrumentId: PerpsInstrumentId;
3742
3936
  side: OrderSide;
@@ -3782,6 +3976,10 @@ declare const PerpsSessionUpdateEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.Zo
3782
3976
  armedQuantity: DecimalString | undefined;
3783
3977
  slippageBps: number | undefined;
3784
3978
  } | null | undefined;
3979
+ builder?: {
3980
+ address: _polymarket_types.EvmAddress;
3981
+ feeRate: DecimalString;
3982
+ } | undefined;
3785
3983
  }>>;
3786
3984
  }, z.core.$strip>, z.ZodTransform<{
3787
3985
  type: "order";
@@ -3789,6 +3987,10 @@ declare const PerpsSessionUpdateEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.Zo
3789
3987
  timestamp: number;
3790
3988
  sequence: number;
3791
3989
  payload: {
3990
+ builder?: {
3991
+ address: _polymarket_types.EvmAddress;
3992
+ feeRate: DecimalString;
3993
+ } | undefined;
3792
3994
  id: PerpsOrderId;
3793
3995
  instrumentId: PerpsInstrumentId;
3794
3996
  side: OrderSide;
@@ -3817,6 +4019,10 @@ declare const PerpsSessionUpdateEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.Zo
3817
4019
  sq: number;
3818
4020
  ch: "orders";
3819
4021
  data: {
4022
+ builder?: {
4023
+ address: _polymarket_types.EvmAddress;
4024
+ feeRate: DecimalString;
4025
+ } | undefined;
3820
4026
  id: PerpsOrderId;
3821
4027
  instrumentId: PerpsInstrumentId;
3822
4028
  side: OrderSide;
@@ -3852,7 +4058,19 @@ declare const PerpsSessionUpdateEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.Zo
3852
4058
  p: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
3853
4059
  qty: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
3854
4060
  taker: z.ZodBoolean;
3855
- fee: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
4061
+ fee: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
4062
+ builder_fee: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>>;
4063
+ total_fee: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>>;
4064
+ builder: z.ZodOptional<z.ZodPipe<z.ZodObject<{
4065
+ address: z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_types.EvmAddress, string>>;
4066
+ fee_rate: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
4067
+ }, z.core.$strip>, z.ZodTransform<{
4068
+ address: _polymarket_types.EvmAddress;
4069
+ feeRate: DecimalString;
4070
+ }, {
4071
+ address: _polymarket_types.EvmAddress;
4072
+ fee_rate: DecimalString;
4073
+ }>>>;
3856
4074
  fea: z.ZodString;
3857
4075
  psz: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
3858
4076
  pep: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
@@ -3861,6 +4079,17 @@ declare const PerpsSessionUpdateEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.Zo
3861
4079
  ts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
3862
4080
  coid: z.ZodOptional<z.ZodString>;
3863
4081
  }, z.core.$strip>, z.ZodTransform<{
4082
+ feeAsset: string;
4083
+ previousSize: DecimalString;
4084
+ previousEntryPrice: DecimalString;
4085
+ pnl: DecimalString;
4086
+ liquidation: boolean;
4087
+ timestamp: EpochMilliseconds;
4088
+ clientOrderId: string | undefined;
4089
+ builder?: {
4090
+ address: _polymarket_types.EvmAddress;
4091
+ feeRate: DecimalString;
4092
+ } | undefined;
3864
4093
  tradeId: PerpsTradeId;
3865
4094
  orderId: PerpsOrderId;
3866
4095
  instrumentId: PerpsInstrumentId;
@@ -3869,13 +4098,8 @@ declare const PerpsSessionUpdateEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.Zo
3869
4098
  quantity: DecimalString;
3870
4099
  taker: boolean;
3871
4100
  fee: DecimalString;
3872
- feeAsset: string;
3873
- previousSize: DecimalString;
3874
- previousEntryPrice: DecimalString;
3875
- pnl: DecimalString;
3876
- liquidation: boolean;
3877
- timestamp: EpochMilliseconds;
3878
- clientOrderId: string | undefined;
4101
+ builderFee: DecimalString;
4102
+ totalFee: DecimalString;
3879
4103
  }, {
3880
4104
  tid: PerpsTradeId;
3881
4105
  oid: PerpsOrderId;
@@ -3891,6 +4115,12 @@ declare const PerpsSessionUpdateEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.Zo
3891
4115
  pnl: DecimalString;
3892
4116
  liq: boolean;
3893
4117
  ts: EpochMilliseconds;
4118
+ builder_fee?: DecimalString | undefined;
4119
+ total_fee?: DecimalString | undefined;
4120
+ builder?: {
4121
+ address: _polymarket_types.EvmAddress;
4122
+ feeRate: DecimalString;
4123
+ } | undefined;
3894
4124
  coid?: string | undefined;
3895
4125
  }>>>;
3896
4126
  }, z.core.$strip>, z.ZodTransform<{
@@ -3899,6 +4129,17 @@ declare const PerpsSessionUpdateEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.Zo
3899
4129
  timestamp: number;
3900
4130
  sequence: number;
3901
4131
  payload: {
4132
+ feeAsset: string;
4133
+ previousSize: DecimalString;
4134
+ previousEntryPrice: DecimalString;
4135
+ pnl: DecimalString;
4136
+ liquidation: boolean;
4137
+ timestamp: EpochMilliseconds;
4138
+ clientOrderId: string | undefined;
4139
+ builder?: {
4140
+ address: _polymarket_types.EvmAddress;
4141
+ feeRate: DecimalString;
4142
+ } | undefined;
3902
4143
  tradeId: PerpsTradeId;
3903
4144
  orderId: PerpsOrderId;
3904
4145
  instrumentId: PerpsInstrumentId;
@@ -3907,6 +4148,14 @@ declare const PerpsSessionUpdateEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.Zo
3907
4148
  quantity: DecimalString;
3908
4149
  taker: boolean;
3909
4150
  fee: DecimalString;
4151
+ builderFee: DecimalString;
4152
+ totalFee: DecimalString;
4153
+ }[];
4154
+ }, {
4155
+ ts: EpochMilliseconds;
4156
+ sq: number;
4157
+ ch: "fills";
4158
+ data: {
3910
4159
  feeAsset: string;
3911
4160
  previousSize: DecimalString;
3912
4161
  previousEntryPrice: DecimalString;
@@ -3914,12 +4163,10 @@ declare const PerpsSessionUpdateEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.Zo
3914
4163
  liquidation: boolean;
3915
4164
  timestamp: EpochMilliseconds;
3916
4165
  clientOrderId: string | undefined;
3917
- }[];
3918
- }, {
3919
- ts: EpochMilliseconds;
3920
- sq: number;
3921
- ch: "fills";
3922
- data: {
4166
+ builder?: {
4167
+ address: _polymarket_types.EvmAddress;
4168
+ feeRate: DecimalString;
4169
+ } | undefined;
3923
4170
  tradeId: PerpsTradeId;
3924
4171
  orderId: PerpsOrderId;
3925
4172
  instrumentId: PerpsInstrumentId;
@@ -3928,13 +4175,119 @@ declare const PerpsSessionUpdateEventSchema: z.ZodUnion<readonly [z.ZodPipe<z.Zo
3928
4175
  quantity: DecimalString;
3929
4176
  taker: boolean;
3930
4177
  fee: DecimalString;
4178
+ builderFee: DecimalString;
4179
+ totalFee: DecimalString;
4180
+ }[];
4181
+ }>>, z.ZodPipe<z.ZodObject<{
4182
+ ts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
4183
+ sq: z.ZodNumber;
4184
+ ch: z.ZodLiteral<"builderFills">;
4185
+ data: z.ZodArray<z.ZodPipe<z.ZodObject<{
4186
+ earning_id: z.ZodPipe<z.ZodString, z.ZodTransform<PerpsBuilderEarningId, string>>;
4187
+ trade_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsTradeId, number>>;
4188
+ order_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsOrderId, number>>;
4189
+ instrument_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
4190
+ trader: z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_types.EvmAddress, string>>;
4191
+ buy: z.ZodBoolean;
4192
+ price: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
4193
+ quantity: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
4194
+ client_order_id: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<PerpsClientOrderId, string>>>;
4195
+ side: z.ZodEnum<typeof PerpsLiquidityRole>;
4196
+ timestamp: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
4197
+ sequence: z.ZodNumber;
4198
+ notional: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
4199
+ fee_asset: z.ZodString;
4200
+ fee: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
4201
+ builder_fee: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
4202
+ total_fee: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
4203
+ fee_rate: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
4204
+ }, z.core.$strip>, z.ZodTransform<{
4205
+ liquidityRole: PerpsLiquidityRole;
4206
+ timestamp: EpochMilliseconds;
4207
+ sequence: number;
4208
+ notional: DecimalString;
3931
4209
  feeAsset: string;
3932
- previousSize: DecimalString;
3933
- previousEntryPrice: DecimalString;
3934
- pnl: DecimalString;
3935
- liquidation: boolean;
4210
+ fee: DecimalString;
4211
+ builderFee: DecimalString;
4212
+ totalFee: DecimalString;
4213
+ feeRate: DecimalString;
4214
+ clientOrderId?: PerpsClientOrderId | undefined;
4215
+ earningId: PerpsBuilderEarningId;
4216
+ tradeId: PerpsTradeId;
4217
+ orderId: PerpsOrderId;
4218
+ instrumentId: PerpsInstrumentId;
4219
+ trader: _polymarket_types.EvmAddress;
4220
+ side: OrderSide;
4221
+ price: DecimalString;
4222
+ quantity: DecimalString;
4223
+ }, {
4224
+ earning_id: PerpsBuilderEarningId;
4225
+ trade_id: PerpsTradeId;
4226
+ order_id: PerpsOrderId;
4227
+ instrument_id: PerpsInstrumentId;
4228
+ trader: _polymarket_types.EvmAddress;
4229
+ buy: boolean;
4230
+ price: DecimalString;
4231
+ quantity: DecimalString;
4232
+ side: PerpsLiquidityRole;
3936
4233
  timestamp: EpochMilliseconds;
3937
- clientOrderId: string | undefined;
4234
+ sequence: number;
4235
+ notional: DecimalString;
4236
+ fee_asset: string;
4237
+ fee: DecimalString;
4238
+ builder_fee: DecimalString;
4239
+ total_fee: DecimalString;
4240
+ fee_rate: DecimalString;
4241
+ client_order_id?: PerpsClientOrderId | undefined;
4242
+ }>>>;
4243
+ }, z.core.$strip>, z.ZodTransform<{
4244
+ type: "builderFill";
4245
+ channel: "builderFills";
4246
+ timestamp: EpochMilliseconds;
4247
+ sequence: number;
4248
+ payload: {
4249
+ liquidityRole: PerpsLiquidityRole;
4250
+ timestamp: EpochMilliseconds;
4251
+ sequence: number;
4252
+ notional: DecimalString;
4253
+ feeAsset: string;
4254
+ fee: DecimalString;
4255
+ builderFee: DecimalString;
4256
+ totalFee: DecimalString;
4257
+ feeRate: DecimalString;
4258
+ clientOrderId?: PerpsClientOrderId | undefined;
4259
+ earningId: PerpsBuilderEarningId;
4260
+ tradeId: PerpsTradeId;
4261
+ orderId: PerpsOrderId;
4262
+ instrumentId: PerpsInstrumentId;
4263
+ trader: _polymarket_types.EvmAddress;
4264
+ side: OrderSide;
4265
+ price: DecimalString;
4266
+ quantity: DecimalString;
4267
+ }[];
4268
+ }, {
4269
+ ts: EpochMilliseconds;
4270
+ sq: number;
4271
+ ch: "builderFills";
4272
+ data: {
4273
+ liquidityRole: PerpsLiquidityRole;
4274
+ timestamp: EpochMilliseconds;
4275
+ sequence: number;
4276
+ notional: DecimalString;
4277
+ feeAsset: string;
4278
+ fee: DecimalString;
4279
+ builderFee: DecimalString;
4280
+ totalFee: DecimalString;
4281
+ feeRate: DecimalString;
4282
+ clientOrderId?: PerpsClientOrderId | undefined;
4283
+ earningId: PerpsBuilderEarningId;
4284
+ tradeId: PerpsTradeId;
4285
+ orderId: PerpsOrderId;
4286
+ instrumentId: PerpsInstrumentId;
4287
+ trader: _polymarket_types.EvmAddress;
4288
+ side: OrderSide;
4289
+ price: DecimalString;
4290
+ quantity: DecimalString;
3938
4291
  }[];
3939
4292
  }>>, z.ZodPipe<z.ZodObject<{
3940
4293
  ts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
@@ -7062,4 +7415,4 @@ declare const SportsResultEventSchema: z.ZodPipe<z.ZodPipe<z.ZodObject<{
7062
7415
  }>>;
7063
7416
  type SportsEvent = z.infer<typeof SportsResultEventSchema>;
7064
7417
 
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 };
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 };