@structbuild/sdk 0.5.6-staging.4 → 0.5.7

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.
@@ -317,6 +317,26 @@ export interface webhooks {
317
317
  patch?: never;
318
318
  trace?: never;
319
319
  };
320
+ "tag-metrics": {
321
+ parameters: {
322
+ query?: never;
323
+ header?: never;
324
+ path?: never;
325
+ cookie?: never;
326
+ };
327
+ get?: never;
328
+ put?: never;
329
+ /**
330
+ * Tag metrics callback
331
+ * @description Fired when a tag's volume or transaction metrics cross a configured threshold. Use `timeframes` to restrict to specific windows (valid values: `1m`, `5m`, `30m`, `1h`, `6h`, `24h`, `7d`, `30d`).
332
+ */
333
+ post: operations["tag-metrics"];
334
+ delete?: never;
335
+ options?: never;
336
+ head?: never;
337
+ patch?: never;
338
+ trace?: never;
339
+ };
320
340
  "position-metrics": {
321
341
  parameters: {
322
342
  query?: never;
@@ -684,122 +704,233 @@ export interface components {
684
704
  slug?: string | null;
685
705
  event_slug?: string | null;
686
706
  };
687
- /** @description Payload delivered on every raw Chainlink price tick for a tracked crypto asset */
707
+ /** @description Subscription filters for the `asset_price_tick` event. All fields are optional. */
708
+ AssetPriceTickFilters: {
709
+ /** @description Restrict to these crypto assets. Empty = all assets. */
710
+ asset_symbols?: components["schemas"]["WebhookAssetSymbol"][] | null;
711
+ };
712
+ /** @description Webhook payload for an asset price tick. */
688
713
  AssetPriceTickPayload: {
714
+ /** @description Asset symbol */
715
+ symbol: components["schemas"]["WebhookAssetSymbol"];
689
716
  /**
690
- * @description Asset symbol
691
- * @enum {string}
717
+ * Format: double
718
+ * @description Current price from the Chainlink feed
692
719
  */
693
- symbol: "BTC" | "ETH" | "SOL" | "XRP" | "DOGE" | "BNB" | "HYPE";
694
- /** @description Current asset price in USD from the Chainlink feed */
695
720
  price: number;
696
721
  /**
697
722
  * Format: int64
698
- * @description Tick timestamp (milliseconds since Unix epoch)
723
+ * @description Tick timestamp as reported by the WebSocket feed (milliseconds since epoch)
699
724
  */
700
725
  timestamp_ms: number;
701
726
  };
702
- /** @description Payload delivered twice per candle — once on open and once on close. `close_price` is 0.0 on the "open" update. */
727
+ /** @description Subscription filters for the `asset_price_window_update` event. All fields are optional. */
728
+ AssetPriceWindowUpdateFilters: {
729
+ /** @description Restrict to these crypto assets. Empty = all assets. */
730
+ asset_symbols?: components["schemas"]["WebhookAssetSymbol"][] | null;
731
+ /** @description Restrict to these candle sizes. Empty = all sizes. */
732
+ timeframes?: components["schemas"]["AssetWindowFilterTimeframe"][] | null;
733
+ };
734
+ /** @description Webhook payload for an asset price window open or close. */
703
735
  AssetPriceWindowUpdatePayload: {
704
- /**
705
- * @description Asset symbol
706
- * @enum {string}
707
- */
708
- symbol: "BTC" | "ETH" | "SOL" | "XRP" | "DOGE" | "BNB" | "HYPE";
709
- /**
710
- * @description Candle / window size
711
- * @enum {string}
712
- */
713
- variant: "5m" | "15m" | "1h" | "4h" | "1d" | "24h";
736
+ /** @description Asset symbol */
737
+ symbol: components["schemas"]["WebhookAssetSymbol"];
738
+ /** @description Time-window variant */
739
+ variant: components["schemas"]["AssetPriceWindowVariant"];
714
740
  /**
715
741
  * Format: int64
716
- * @description Window start timestamp (milliseconds since Unix epoch)
742
+ * @description Window start timestamp (milliseconds since epoch)
717
743
  */
718
744
  start_time: number;
719
745
  /**
720
746
  * Format: int64
721
- * @description Window end timestamp (milliseconds since Unix epoch)
747
+ * @description Window end timestamp (milliseconds since epoch)
722
748
  */
723
749
  end_time: number;
724
- /** @description Opening price at start_time (USD) */
750
+ /**
751
+ * Format: double
752
+ * @description Opening price at start_time
753
+ */
725
754
  open_price: number;
726
- /** @description Closing price at end_time (USD). 0.0 when update_type is "open" (not yet available). */
755
+ /**
756
+ * Format: double
757
+ * @description Closing price at end_time (0.0 on an "open" update — not yet available)
758
+ */
727
759
  close_price: number;
760
+ /** @description "open" when the window starts, "close" when the window is complete */
761
+ update_type: components["schemas"]["AssetPriceWindowUpdateType"];
762
+ };
763
+ /**
764
+ * @description Whether this update is the open or the close of a candle.
765
+ * @enum {string}
766
+ */
767
+ AssetPriceWindowUpdateType: "open" | "close";
768
+ /**
769
+ * @description Time-window variant emitted by the asset price window stream.
770
+ * @enum {string}
771
+ */
772
+ AssetPriceWindowVariant: "5m" | "15m" | "1h" | "4h" | "1d" | "24h";
773
+ /**
774
+ * @description Candle sizes accepted by `asset_price_window_update.timeframes`.
775
+ * @enum {string}
776
+ */
777
+ AssetWindowFilterTimeframe: "5m" | "15m" | "1h" | "4h" | "1d" | "24h";
778
+ /**
779
+ * @description Subscription filters for the `close_to_bond` event. At least one of
780
+ * `min_probability` or `max_probability` is required (enforced at runtime).
781
+ */
782
+ CloseToBondFilters: {
728
783
  /**
729
- * @description "open" when the candle opens, "close" when it closes with a confirmed price
730
- * @enum {string}
784
+ * Format: double
785
+ * @description Trigger when the YES outcome price is ≥ this value (e.g. 0.95 for 95% certainty). At least one of `min_probability` or `max_probability` must be set.
786
+ */
787
+ min_probability?: number | null;
788
+ /**
789
+ * Format: double
790
+ * @description Trigger when the YES outcome price is ≤ this value (e.g. 0.05 for near-certain NO).
731
791
  */
732
- update_type: "open" | "close";
792
+ max_probability?: number | null;
793
+ /** @description Restrict to these markets. */
794
+ condition_ids?: string[] | null;
795
+ /** @description Restrict to these outcome token IDs. */
796
+ position_ids?: string[] | null;
797
+ /** @description Restrict to markets in these events. */
798
+ event_slugs?: string[] | null;
799
+ /** @description Restrict to these outcome names (e.g. \["Yes", "No"\]). */
800
+ outcomes?: string[] | null;
801
+ /** @description Restrict by outcome index. 0 = Yes/Up, 1 = No. Position 0 usually represents the Up/Yes side in binary markets. */
802
+ position_outcome_indices?: number[] | null;
803
+ /** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
804
+ exclude_shortterm_markets?: boolean | null;
733
805
  };
734
- /** @description Payload delivered when a trade occurs at a near-certain-outcome price */
806
+ /** @description Close-to-bond webhook payload */
735
807
  CloseToBondPayload: {
736
- /** @description Limit-order maker wallet address (lowercase) */
808
+ /** @description Trader address (the limit-order maker) */
737
809
  trader: string;
738
- /** @description Order filler wallet address (lowercase) */
810
+ /** @description Taker address (the order filler often the exchange contract) */
739
811
  taker: string;
740
- /** @description ERC-1155 outcome token ID */
812
+ /** @description Position ID (ERC1155 token ID) */
741
813
  position_id: string;
742
- /** @description Parent market condition ID */
814
+ /** @description Condition ID (parent market) */
743
815
  condition_id?: string | null;
744
816
  /** @description Outcome name (e.g. "Yes", "No") */
745
817
  outcome?: string | null;
746
- /** @description 0 = Yes/Up, 1 = No */
818
+ /**
819
+ * Format: int32
820
+ * @description Outcome index (0 = Yes/Up, 1 = No). Position 0 usually represents Yes/Up.
821
+ */
747
822
  outcome_index?: number | null;
823
+ /** @description Market question */
748
824
  question?: string | null;
825
+ /** @description Market slug */
749
826
  market_slug?: string | null;
827
+ /** @description Event slug */
750
828
  event_slug?: string | null;
829
+ /** @description Trade ID */
751
830
  trade_id: string;
752
831
  /** @description Transaction hash */
753
832
  hash: string;
754
- /** Format: int64 */
833
+ /**
834
+ * Format: int64
835
+ * @description Block number
836
+ */
755
837
  block: number;
756
838
  /**
757
839
  * Format: int64
758
- * @description Unix seconds
840
+ * @description Confirmed timestamp (Unix seconds)
759
841
  */
760
842
  confirmed_at: number;
761
- /** @description USD size of the trade */
843
+ /**
844
+ * Format: double
845
+ * @description USD size of the trade
846
+ */
762
847
  amount_usd: number;
848
+ /**
849
+ * Format: double
850
+ * @description Outcome shares traded
851
+ */
763
852
  shares_amount: number;
764
- /** @description Fee paid in USD */
853
+ /**
854
+ * Format: double
855
+ * @description Fee paid (USD)
856
+ */
765
857
  fee: number;
766
- /** @enum {string} */
767
- side: "Buy" | "Sell";
768
- /** @description Price that triggered the notification (0.0–1.0) */
858
+ /** @description Trade side ("Buy" or "Sell") */
859
+ side: string;
860
+ /**
861
+ * Format: double
862
+ * @description Price per share (0.0–1.0) — the value that triggered the notification
863
+ */
769
864
  price: number;
770
- /** @description Implied probability (0.0–1.0) */
865
+ /**
866
+ * Format: double
867
+ * @description Implied probability of the outcome (0.0–1.0)
868
+ */
771
869
  probability?: number | null;
870
+ /** @description Which bond zone was entered: `"high"` (YES near-certain) or `"low"` (NO near-certain) */
871
+ bond_side: string;
772
872
  /**
773
- * @description "high" when near YES (price ≥ threshold), "low" when near NO (price ≤ threshold)
774
- * @enum {string}
873
+ * Format: double
874
+ * @description The probability threshold from the subscriber's filter that was breached
775
875
  */
776
- bond_side: "high" | "low";
777
- /** @description The probability threshold from the subscription filter that was breached */
778
876
  threshold: number;
779
877
  };
780
878
  /** @description Payload delivered when a market's volume or transaction metrics cross a configured threshold */
781
879
  ConditionMetricsPayload: {
782
880
  /** @description Market condition ID */
783
881
  condition_id?: string | null;
882
+ /** @description Aggregation window */
883
+ timeframe?: null | ("1m" | "5m" | "15m" | "30m" | "1h" | "4h" | "6h" | "1d" | "24h" | "7d" | "30d");
784
884
  /**
785
- * @description Aggregation window
786
- * @enum {string|null}
885
+ * Format: double
886
+ * @description Total trading volume in USD for this timeframe
787
887
  */
788
- timeframe?: "1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d" | null;
789
- /** @description Total trading volume in USD for this timeframe */
790
888
  volume_usd?: number | null;
791
- /** @description Total fees collected in USD */
889
+ /**
890
+ * Format: double
891
+ * @description Total shares/contracts volume for this timeframe
892
+ */
893
+ shares_volume?: number | null;
894
+ /**
895
+ * Format: double
896
+ * @description Builder-attributed trading volume in USD
897
+ */
898
+ builder_usd_volume?: number | null;
899
+ /**
900
+ * Format: double
901
+ * @description Builder-attributed shares/contracts volume
902
+ */
903
+ builder_shares_volume?: number | null;
904
+ /**
905
+ * Format: double
906
+ * @description Total fees collected in USD
907
+ */
792
908
  fees?: number | null;
909
+ /**
910
+ * Format: double
911
+ * @description Builder-attributed fees in USD
912
+ */
913
+ builder_fees?: number | null;
793
914
  /**
794
915
  * Format: int64
795
916
  * @description Total number of transactions
796
917
  */
797
918
  txns?: number | null;
919
+ /**
920
+ * Format: int64
921
+ * @description Builder-attributed transaction count
922
+ */
923
+ builder_txns?: number | null;
798
924
  /**
799
925
  * Format: int64
800
926
  * @description Number of unique traders
801
927
  */
802
928
  unique_traders?: number | null;
929
+ /**
930
+ * Format: int64
931
+ * @description Number of unique builder-attributed traders
932
+ */
933
+ unique_builder_traders?: number | null;
803
934
  };
804
935
  /** @description CTF ConditionResolution: positions become redeemable on the Conditional Tokens contract. */
805
936
  ConditionResolutionEvent: {
@@ -870,45 +1001,92 @@ export interface components {
870
1001
  slug?: string | null;
871
1002
  event_slug?: string | null;
872
1003
  };
1004
+ /** @description Subscription filters for the `event_metrics` event. All fields are optional. */
1005
+ EventMetricsFilters: {
1006
+ /** @description Restrict to these events. Empty = all events. */
1007
+ event_slugs?: string[] | null;
1008
+ /** @description Restrict to these aggregation windows. */
1009
+ timeframes?: components["schemas"]["MetricFilterTimeframe"][] | null;
1010
+ /**
1011
+ * Format: double
1012
+ * @description Only fire when aggregated event volume ≥ this value (USD).
1013
+ */
1014
+ min_volume_usd?: number | null;
1015
+ /** Format: double */
1016
+ max_volume_usd?: number | null;
1017
+ /** Format: int64 */
1018
+ min_txns?: number | null;
1019
+ /** Format: int64 */
1020
+ min_unique_traders?: number | null;
1021
+ /** Format: double */
1022
+ min_fees?: number | null;
1023
+ /** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
1024
+ exclude_shortterm_markets?: boolean | null;
1025
+ };
873
1026
  /** @description Payload delivered when an event's aggregated volume or transaction metrics cross a configured threshold */
874
1027
  EventMetricsPayload: {
875
1028
  /** @description Event slug */
876
1029
  event_slug?: string | null;
1030
+ /** @description Aggregation window */
1031
+ timeframe?: null | ("1m" | "5m" | "15m" | "30m" | "1h" | "4h" | "6h" | "1d" | "24h" | "7d" | "30d");
877
1032
  /**
878
- * @description Aggregation window
879
- * @enum {string|null}
1033
+ * Format: double
1034
+ * @description Total aggregated volume across all markets in the event (USD)
880
1035
  */
881
- timeframe?: "1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d" | null;
882
- /** @description Total aggregated volume across all markets in the event (USD) */
883
1036
  volume_usd?: number | null;
884
- /** @description Total fees collected in USD */
1037
+ /**
1038
+ * Format: double
1039
+ * @description Total aggregated shares/contracts volume across all markets in the event
1040
+ */
1041
+ shares_volume?: number | null;
1042
+ /**
1043
+ * Format: double
1044
+ * @description Builder-attributed aggregated volume in USD
1045
+ */
1046
+ builder_usd_volume?: number | null;
1047
+ /**
1048
+ * Format: double
1049
+ * @description Builder-attributed aggregated shares/contracts volume
1050
+ */
1051
+ builder_shares_volume?: number | null;
1052
+ /**
1053
+ * Format: double
1054
+ * @description Total fees collected in USD
1055
+ */
885
1056
  fees?: number | null;
1057
+ /**
1058
+ * Format: double
1059
+ * @description Builder-attributed fees in USD
1060
+ */
1061
+ builder_fees?: number | null;
886
1062
  /**
887
1063
  * Format: int64
888
1064
  * @description Total number of transactions
889
1065
  */
890
1066
  txns?: number | null;
1067
+ /**
1068
+ * Format: int64
1069
+ * @description Builder-attributed transaction count
1070
+ */
1071
+ builder_txns?: number | null;
891
1072
  /**
892
1073
  * Format: int64
893
1074
  * @description Number of unique traders
894
1075
  */
895
1076
  unique_traders?: number | null;
1077
+ /**
1078
+ * Format: int64
1079
+ * @description Number of unique builder-attributed traders
1080
+ */
1081
+ unique_builder_traders?: number | null;
896
1082
  };
897
- /** @description Payload delivered when a trader's per-event PnL crosses a configured threshold */
1083
+ /** @description Event PnL webhook payload. */
898
1084
  EventPnlPayload: {
899
- /** @description Trader wallet address (lowercase) */
900
1085
  trader?: string | null;
901
- /** @description Event slug */
902
1086
  event_slug?: string | null;
903
- /**
904
- * @description PnL aggregation window
905
- * @enum {string}
906
- */
907
- timeframe: "1d" | "7d" | "30d" | "lifetime";
908
- /**
909
- * Format: int64
910
- * @description Number of distinct markets traded in this event
911
- */
1087
+ /** @description Aggregation timeframe: "1d", "7d", "30d", or "lifetime" */
1088
+ timeframe: string;
1089
+ /** Format: int64 */
912
1090
  markets_traded?: number | null;
913
1091
  /** Format: int64 */
914
1092
  outcomes_traded?: number | null;
@@ -920,44 +1098,58 @@ export interface components {
920
1098
  total_redemptions?: number | null;
921
1099
  /** Format: int64 */
922
1100
  total_merges?: number | null;
923
- /** @description Total volume in USD */
1101
+ /** Format: double */
924
1102
  total_volume_usd?: number | null;
1103
+ /** Format: double */
925
1104
  buy_usd?: number | null;
1105
+ /** Format: double */
926
1106
  sell_usd?: number | null;
1107
+ /** Format: double */
927
1108
  redemption_usd?: number | null;
1109
+ /** Format: double */
928
1110
  merge_usd?: number | null;
929
- /** @description Realized PnL in USD for this event */
1111
+ /** Format: double */
930
1112
  realized_pnl_usd?: number | null;
931
1113
  /** Format: int64 */
932
1114
  winning_markets?: number | null;
933
1115
  /** Format: int64 */
934
1116
  losing_markets?: number | null;
1117
+ /** Format: double */
935
1118
  total_fees?: number | null;
936
- /**
937
- * Format: int64
938
- * @description Unix seconds
939
- */
1119
+ /** Format: int64 */
940
1120
  first_trade_at?: number | null;
941
- /**
942
- * Format: int64
943
- * @description Unix seconds
944
- */
1121
+ /** Format: int64 */
945
1122
  last_trade_at?: number | null;
946
1123
  };
947
- /** @description Payload delivered when an event's aggregated trading volume crosses a USD milestone */
1124
+ /** @description Subscription filters for the `event_volume_milestone` event. */
1125
+ EventVolumeMilestoneFilters: {
1126
+ /** @description **Required.** Aggregation windows to monitor. */
1127
+ timeframes: components["schemas"]["MetricFilterTimeframe"][];
1128
+ /** @description Restrict to these events. */
1129
+ event_slugs?: string[] | null;
1130
+ /** @description Specific USD milestones to trigger on. */
1131
+ milestone_amounts?: number[] | null;
1132
+ /** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
1133
+ exclude_shortterm_markets?: boolean | null;
1134
+ };
1135
+ /** @description Event volume milestone webhook payload */
948
1136
  EventVolumeMilestonePayload: {
949
- /** @description Event slug */
950
1137
  event_slug: string;
1138
+ timeframe: string;
951
1139
  /**
952
- * @description Aggregation window
953
- * @enum {string}
1140
+ * Format: double
1141
+ * @description Milestone amount reached (USD)
954
1142
  */
955
- timeframe: "1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d";
956
- /** @description The USD milestone amount that was crossed */
957
1143
  milestone_usd: number;
958
- /** @description Current aggregated event volume at time of trigger (USD) */
1144
+ /**
1145
+ * Format: double
1146
+ * @description Current volume (USD) that triggered the milestone
1147
+ */
959
1148
  current_volume_usd: number;
960
- /** @description Total fees in USD for this timeframe */
1149
+ /**
1150
+ * Format: double
1151
+ * @description Total fees collected in this timeframe
1152
+ */
961
1153
  fees: number;
962
1154
  /**
963
1155
  * Format: int64
@@ -965,25 +1157,60 @@ export interface components {
965
1157
  */
966
1158
  txns: number;
967
1159
  };
968
- /** @description Payload delivered when an event's aggregated volume has spiked since the last snapshot */
1160
+ /** @description Subscription filters for the `event_volume_spike` event. `spike_ratio` is required. */
1161
+ EventVolumeSpikeFilters: {
1162
+ /**
1163
+ * Format: double
1164
+ * @description **Required.** Multiplier threshold (must be > 1.0). Fires when current volume >= snapshot × ratio.
1165
+ */
1166
+ spike_ratio: number;
1167
+ /**
1168
+ * Format: int64
1169
+ * @description Force snapshot reset after this many seconds (max 600 / 10 minutes).
1170
+ */
1171
+ window_secs?: number | null;
1172
+ /** @description Restrict to these events. */
1173
+ event_slugs?: string[] | null;
1174
+ /** @description Restrict to these aggregation windows. */
1175
+ timeframes?: components["schemas"]["VolumeSpikeFilterTimeframe"][] | null;
1176
+ /** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
1177
+ exclude_shortterm_markets?: boolean | null;
1178
+ };
1179
+ /** @description Event volume spike webhook payload */
969
1180
  EventVolumeSpikePayload: {
970
- /** @description Event slug */
971
1181
  event_slug: string;
1182
+ event_title?: string | null;
1183
+ image_url?: string | null;
1184
+ timeframe: string;
972
1185
  /**
973
- * @description Aggregation window
974
- * @enum {string}
1186
+ * Format: double
1187
+ * @description Current aggregated event volume at the time of the spike (USD)
975
1188
  */
976
- timeframe: "1m" | "5m" | "30m" | "1h" | "6h" | "1d" | "24h" | "7d" | "30d";
977
- /** @description Current aggregated event volume at time of the spike (USD) */
978
1189
  current_volume_usd: number;
979
- /** @description Volume at the snapshot baseline (USD) */
1190
+ /**
1191
+ * Format: double
1192
+ * @description Volume at the snapshot baseline (USD)
1193
+ */
980
1194
  snapshot_volume_usd: number;
981
- /** @description New volume since the snapshot that triggered this notification (USD) */
1195
+ /**
1196
+ * Format: double
1197
+ * @description New volume since the snapshot that triggered this notification (USD)
1198
+ */
982
1199
  delta_volume_usd: number;
983
- /** @description Volume growth as a percentage of the snapshot (e.g. 200.0 means volume tripled) */
1200
+ /**
1201
+ * Format: double
1202
+ * @description Volume growth as a percentage of the snapshot (e.g. 200.0 means volume tripled)
1203
+ */
984
1204
  spike_pct: number;
985
- /** Format: int64 */
1205
+ /**
1206
+ * Format: int64
1207
+ * @description Total transactions in this timeframe
1208
+ */
986
1209
  txns: number;
1210
+ /**
1211
+ * Format: double
1212
+ * @description Total fees in this timeframe
1213
+ */
987
1214
  fees: number;
988
1215
  };
989
1216
  /** @description Payload delivered when a tracked trader executes their first-ever trade on Polymarket */
@@ -998,7 +1225,10 @@ export interface components {
998
1225
  condition_id?: string | null;
999
1226
  /** @description Outcome name (e.g. "Yes", "No") */
1000
1227
  outcome?: string | null;
1001
- /** @description Outcome index: 0 = Yes/Up, 1 = No */
1228
+ /**
1229
+ * Format: int32
1230
+ * @description Outcome index: 0 = Yes/Up, 1 = No
1231
+ */
1002
1232
  outcome_index?: number | null;
1003
1233
  /** @description Market question text */
1004
1234
  question?: string | null;
@@ -1006,6 +1236,8 @@ export interface components {
1006
1236
  market_slug?: string | null;
1007
1237
  /** @description Parent event slug */
1008
1238
  event_slug?: string | null;
1239
+ /** @description Market image URL */
1240
+ image_url?: string | null;
1009
1241
  /** @description Unique trade identifier */
1010
1242
  trade_id: string;
1011
1243
  /** @description Transaction hash */
@@ -1020,148 +1252,128 @@ export interface components {
1020
1252
  * @description Block confirmation timestamp (Unix seconds)
1021
1253
  */
1022
1254
  confirmed_at: number;
1023
- /** @description USD size of the trade (6 decimal places) */
1255
+ /**
1256
+ * Format: double
1257
+ * @description USD size of the trade (6 decimal places)
1258
+ */
1024
1259
  amount_usd: number;
1025
- /** @description Outcome shares traded (6 decimal places) */
1026
- shares_amount: number;
1027
- /** @description Fee paid in USD (6 decimal places) */
1028
- fee: number;
1029
1260
  /**
1030
- * @description Trade direction
1031
- * @enum {string}
1261
+ * Format: double
1262
+ * @description Outcome shares traded (6 decimal places)
1032
1263
  */
1033
- side: "Buy" | "Sell";
1034
- /** @description Outcome token price (0.0–1.0) */
1035
- price: number;
1264
+ shares_amount: number;
1036
1265
  /**
1037
- * @description Exchange contract that processed the trade
1038
- * @enum {string}
1266
+ * Format: double
1267
+ * @description Fee paid in USD (6 decimal places)
1039
1268
  */
1040
- exchange: "CTFExchange" | "NegRiskExchange" | "ConditionalTokens" | "NegRiskAdapter" | "Unknown";
1269
+ fee: number;
1270
+ /** @description Trade direction */
1271
+ side: "Buy" | "Sell";
1041
1272
  /**
1042
- * @description Trade type (webhook events only fire on order fills)
1043
- * @enum {string}
1273
+ * Format: double
1274
+ * @description Outcome token price (0.0–1.0)
1044
1275
  */
1276
+ price: number;
1277
+ /** @description Exchange contract that processed the trade */
1278
+ exchange: "CTFExchange" | "NegRiskExchange" | "ConditionalTokens" | "NegRiskAdapter" | "CTFExchangeV2" | "NegRiskExchangeV2" | "Unknown";
1279
+ /** @description Trade type (webhook events only fire on order fills) */
1045
1280
  trade_type: "OrderFilled" | "OrdersMatched";
1046
1281
  };
1047
- /** @description Payload delivered when a trader's global PnL (across all markets) crosses a configured threshold */
1282
+ /** @description Global PnL webhook payload. */
1048
1283
  GlobalPnlPayload: {
1049
- /** @description Trader wallet address (lowercase) */
1050
1284
  trader?: string | null;
1051
- /**
1052
- * @description PnL aggregation window
1053
- * @enum {string}
1054
- */
1055
- timeframe: "1d" | "7d" | "30d" | "lifetime";
1056
- /** @description Realized PnL in USD (positive = profit, negative = loss) */
1285
+ /** @description Aggregation timeframe: "1d", "7d", "30d", or "lifetime" */
1286
+ timeframe: string;
1287
+ /** Format: double */
1057
1288
  realized_pnl_usd?: number | null;
1058
- /**
1059
- * Format: int64
1060
- * @description Number of distinct events traded
1061
- */
1289
+ /** Format: int64 */
1062
1290
  events_traded?: number | null;
1063
- /**
1064
- * Format: int64
1065
- * @description Number of distinct markets traded
1066
- */
1291
+ /** Format: int64 */
1067
1292
  markets_traded?: number | null;
1068
- /**
1069
- * Format: int64
1070
- * @description Total buy transactions
1071
- */
1293
+ /** Format: int64 */
1072
1294
  total_buys?: number | null;
1073
- /**
1074
- * Format: int64
1075
- * @description Total sell transactions
1076
- */
1295
+ /** Format: int64 */
1077
1296
  total_sells?: number | null;
1078
- /**
1079
- * Format: int64
1080
- * @description Total redemption transactions
1081
- */
1297
+ /** Format: int64 */
1082
1298
  total_redemptions?: number | null;
1083
- /**
1084
- * Format: int64
1085
- * @description Total merge transactions
1086
- */
1299
+ /** Format: int64 */
1087
1300
  total_merges?: number | null;
1088
- /** @description Total USD volume (buys + sells + redemptions + merges) */
1301
+ /** Format: double */
1089
1302
  total_volume_usd?: number | null;
1090
- /** @description Total buy volume in USD */
1303
+ /** Format: double */
1091
1304
  buy_volume_usd?: number | null;
1092
- /** @description Total sell volume in USD */
1305
+ /** Format: double */
1093
1306
  sell_volume_usd?: number | null;
1094
- /** @description Total redemption volume in USD */
1307
+ /** Format: double */
1095
1308
  redemption_volume_usd?: number | null;
1096
- /** @description Total merge volume in USD */
1309
+ /** Format: double */
1097
1310
  merge_volume_usd?: number | null;
1098
- /**
1099
- * Format: int64
1100
- * @description Number of markets where trader realised a profit
1101
- */
1311
+ /** Format: int64 */
1102
1312
  markets_won?: number | null;
1103
- /**
1104
- * Format: int64
1105
- * @description Number of markets where trader realised a loss
1106
- */
1313
+ /** Format: int64 */
1107
1314
  markets_lost?: number | null;
1108
- /** @description Market win rate as a percentage (0.0–100.0) */
1315
+ /** Format: double */
1109
1316
  market_win_rate_pct?: number | null;
1110
- /** @description Average PnL per market in USD */
1317
+ /** Format: double */
1111
1318
  avg_pnl_per_market?: number | null;
1112
- /** @description Average PnL per trade in USD */
1319
+ /** Format: double */
1113
1320
  avg_pnl_per_trade?: number | null;
1114
- /** @description Average hold time across all positions (seconds) */
1321
+ /** Format: double */
1115
1322
  avg_hold_time_seconds?: number | null;
1116
- /** @description Total fees paid in USD */
1323
+ /** Format: double */
1117
1324
  total_fees?: number | null;
1118
- /** @description Best single-trade PnL in USD */
1325
+ /** Format: double */
1119
1326
  best_trade_pnl_usd?: number | null;
1120
- /** @description Condition ID of the best trade */
1121
1327
  best_trade_condition_id?: string | null;
1122
- /**
1123
- * Format: int64
1124
- * @description Timestamp of the first trade (Unix seconds)
1125
- */
1328
+ /** Format: int64 */
1126
1329
  first_trade_at?: number | null;
1127
- /**
1128
- * Format: int64
1129
- * @description Timestamp of the most recent trade (Unix seconds)
1130
- */
1330
+ /** Format: int64 */
1131
1331
  last_trade_at?: number | null;
1132
1332
  };
1133
1333
  /** @description Response for GET /v1/webhook/events */
1134
1334
  ListEventsResponse: {
1135
1335
  events: components["schemas"]["WebhookEventInfo"][];
1136
1336
  };
1137
- /** @description An outcome entry within a newly created market */
1337
+ /** @description Subscription filters for the `market_created` event. All fields are optional. */
1338
+ MarketCreatedFilters: {
1339
+ /** @description Restrict to markets with these tags or category names (case-insensitive match). */
1340
+ tags?: string[] | null;
1341
+ /** @description Restrict to markets belonging to these events. */
1342
+ event_slugs?: string[] | null;
1343
+ /** @description When `true`, suppress webhooks for short-term "updown" markets (event slugs containing `updown`). Default: `false`. */
1344
+ exclude_shortterm_markets?: boolean | null;
1345
+ };
1346
+ /** @description Outcome entry in the market created payload — mirrors `NewMarketOutcome` */
1138
1347
  MarketCreatedOutcome: {
1139
- /** @description Outcome index (0 = Yes, 1 = No) */
1348
+ /**
1349
+ * Format: int32
1350
+ * @description Outcome index (0 = Yes, 1 = No)
1351
+ */
1140
1352
  index: number;
1141
1353
  /** @description Outcome name (e.g. "Yes", "No") */
1142
1354
  name: string;
1143
- /** @description ERC-1155 position token ID for this outcome */
1355
+ /** @description ERC1155 position token ID */
1144
1356
  position_id: string;
1145
1357
  };
1146
- /** @description Payload delivered when a new prediction market is detected on-chain and enriched with Gamma API metadata */
1358
+ /** @description Market created webhook payload mirrors `NewMarketPayload` field-for-field */
1147
1359
  MarketCreatedPayload: {
1148
1360
  /** @description Condition ID (0x-prefixed hex, lowercase) */
1149
1361
  condition_id: string;
1150
1362
  /** @description Market slug */
1151
1363
  market_slug: string;
1152
- /** @description Parent event slug */
1364
+ /** @description Event slug (parent event) */
1153
1365
  event_slug?: string | null;
1154
- /** @description Parent event ID */
1366
+ /** @description Event ID */
1155
1367
  event_id?: string | null;
1156
- /** @description Parent event title */
1368
+ /** @description Event title */
1157
1369
  event_title?: string | null;
1158
- /** @description Series slug (for recurring markets) */
1370
+ /** @description Series slug */
1159
1371
  series_slug?: string | null;
1160
- /** @description List of market outcomes with their position IDs */
1372
+ /** @description Outcomes with their position IDs, index, and name */
1161
1373
  outcomes: components["schemas"]["MarketCreatedOutcome"][];
1162
- /** @description Full market question text */
1374
+ /** @description Market question */
1163
1375
  question: string;
1164
- /** @description Short display title */
1376
+ /** @description Market title (short display name) */
1165
1377
  title?: string | null;
1166
1378
  /** @description Market description */
1167
1379
  description: string;
@@ -1174,23 +1386,46 @@ export interface components {
1174
1386
  /** @description Whether this is a neg-risk market */
1175
1387
  neg_risk: boolean;
1176
1388
  };
1177
- /** @description Payload delivered when a trader's per-market PnL crosses a configured threshold */
1178
- MarketPnlPayload: {
1179
- /** @description Trader wallet address (lowercase) */
1180
- trader?: string | null;
1181
- /** @description Market condition ID */
1182
- condition_id?: string | null;
1183
- /** @description Parent event slug */
1184
- event_slug?: string | null;
1389
+ /** @description Subscription filters for the `condition_metrics` event. All fields are optional. */
1390
+ MarketMetricsFilters: {
1391
+ /** @description Restrict to these markets. Empty = all markets. */
1392
+ condition_ids?: string[] | null;
1393
+ /** @description Restrict to these aggregation windows. Empty = all windows. */
1394
+ timeframes?: components["schemas"]["MetricFilterTimeframe"][] | null;
1185
1395
  /**
1186
- * @description PnL aggregation window
1187
- * @enum {string}
1396
+ * Format: double
1397
+ * @description Only fire when volume ≥ this value (USD).
1398
+ */
1399
+ min_volume_usd?: number | null;
1400
+ /**
1401
+ * Format: double
1402
+ * @description Only fire when volume ≤ this value (USD).
1403
+ */
1404
+ max_volume_usd?: number | null;
1405
+ /**
1406
+ * Format: int64
1407
+ * @description Only fire when transaction count ≥ this value.
1188
1408
  */
1189
- timeframe: "1d" | "7d" | "30d" | "lifetime";
1409
+ min_txns?: number | null;
1190
1410
  /**
1191
1411
  * Format: int64
1192
- * @description Number of distinct outcomes traded in this market
1412
+ * @description Only fire when unique trader count this value.
1413
+ */
1414
+ min_unique_traders?: number | null;
1415
+ /**
1416
+ * Format: double
1417
+ * @description Only fire when total fees ≥ this value (USD).
1193
1418
  */
1419
+ min_fees?: number | null;
1420
+ };
1421
+ /** @description Market PnL webhook payload. */
1422
+ MarketPnlPayload: {
1423
+ trader?: string | null;
1424
+ condition_id?: string | null;
1425
+ event_slug?: string | null;
1426
+ /** @description Aggregation timeframe: "1d", "7d", "30d", or "lifetime" */
1427
+ timeframe: string;
1428
+ /** Format: int64 */
1194
1429
  outcomes_traded?: number | null;
1195
1430
  /** Format: int64 */
1196
1431
  total_buys?: number | null;
@@ -1200,59 +1435,95 @@ export interface components {
1200
1435
  total_redemptions?: number | null;
1201
1436
  /** Format: int64 */
1202
1437
  total_merges?: number | null;
1203
- /** @description Total buy volume in USD */
1438
+ /** Format: double */
1204
1439
  buy_usd?: number | null;
1205
- /** @description Total sell volume in USD */
1440
+ /** Format: double */
1206
1441
  sell_usd?: number | null;
1207
- /** @description Total redemption volume in USD */
1442
+ /** Format: double */
1208
1443
  redemption_usd?: number | null;
1209
- /** @description Total merge volume in USD */
1444
+ /** Format: double */
1210
1445
  merge_usd?: number | null;
1211
- /** @description Realized PnL in USD for this market */
1446
+ /** Format: double */
1212
1447
  realized_pnl_usd?: number | null;
1213
- /**
1214
- * Format: int64
1215
- * @description Number of outcomes with positive PnL
1216
- */
1448
+ /** Format: int64 */
1217
1449
  winning_outcomes?: number | null;
1218
- /** @description Total fees paid in USD for this market */
1450
+ /** Format: double */
1219
1451
  total_fees?: number | null;
1452
+ /** Format: int64 */
1453
+ first_trade_at?: number | null;
1454
+ /** Format: int64 */
1455
+ last_trade_at?: number | null;
1456
+ };
1457
+ /** @description Subscription filters for the `market_volume_milestone` event. */
1458
+ MarketVolumeMilestoneFilters: {
1459
+ /** @description **Required.** Aggregation windows to monitor (e.g. \["1h", "24h"\]). */
1460
+ timeframes: components["schemas"]["MetricFilterTimeframe"][];
1461
+ /** @description Restrict to these markets. Empty = all markets. */
1462
+ condition_ids?: string[] | null;
1463
+ /** @description Specific USD milestones to trigger on (e.g. \[10000, 100000, 1000000\]). Empty = all milestones. */
1464
+ milestone_amounts?: number[] | null;
1465
+ };
1466
+ /** @description Subscription filters for the `market_volume_spike` event. `spike_ratio` is required. */
1467
+ MarketVolumeSpikeFilters: {
1220
1468
  /**
1221
- * Format: int64
1222
- * @description Timestamp of first trade in market (Unix seconds)
1469
+ * Format: double
1470
+ * @description **Required.** Multiplier threshold (must be > 1.0). Fires when current volume >= snapshot × ratio. The snapshot is set automatically on first data and resets after each fire.
1223
1471
  */
1224
- first_trade_at?: number | null;
1472
+ spike_ratio: number;
1225
1473
  /**
1226
1474
  * Format: int64
1227
- * @description Timestamp of most recent trade in market (Unix seconds)
1475
+ * @description Force snapshot reset after this many seconds (max 600 / 10 minutes).
1228
1476
  */
1229
- last_trade_at?: number | null;
1477
+ window_secs?: number | null;
1478
+ /** @description Restrict to these markets. Empty = all markets. */
1479
+ condition_ids?: string[] | null;
1480
+ /** @description Restrict to these aggregation windows. Empty = all windows. */
1481
+ timeframes?: components["schemas"]["VolumeSpikeFilterTimeframe"][] | null;
1230
1482
  };
1231
- /** @description Payload delivered when a market's volume has spiked since the last snapshot */
1483
+ /** @description Market volume spike webhook payload */
1232
1484
  MarketVolumeSpikePayload: {
1233
- /** @description Market condition ID */
1234
1485
  condition_id: string;
1486
+ question?: string | null;
1487
+ market_slug?: string | null;
1488
+ event_slug?: string | null;
1489
+ image_url?: string | null;
1490
+ timeframe: string;
1235
1491
  /**
1236
- * @description Aggregation window
1237
- * @enum {string}
1492
+ * Format: double
1493
+ * @description Current window volume at the time of the spike (USD)
1238
1494
  */
1239
- timeframe: "1m" | "5m" | "30m" | "1h" | "6h" | "1d" | "24h" | "7d" | "30d";
1240
- /** @description Current volume at the time of the spike (USD) */
1241
1495
  current_volume_usd: number;
1242
- /** @description Volume at the snapshot baseline (USD) */
1496
+ /**
1497
+ * Format: double
1498
+ * @description Volume at the snapshot baseline (USD)
1499
+ */
1243
1500
  snapshot_volume_usd: number;
1244
- /** @description New volume since the snapshot that triggered this notification (USD) */
1501
+ /**
1502
+ * Format: double
1503
+ * @description New volume since the snapshot that triggered this notification (USD)
1504
+ */
1245
1505
  delta_volume_usd: number;
1246
- /** @description Volume growth as a percentage of the snapshot (e.g. 200.0 means volume tripled) */
1506
+ /**
1507
+ * Format: double
1508
+ * @description Volume growth as a percentage of the snapshot (e.g. 200.0 means volume tripled)
1509
+ */
1247
1510
  spike_pct: number;
1248
1511
  /**
1249
1512
  * Format: int64
1250
1513
  * @description Total transactions in this timeframe
1251
1514
  */
1252
1515
  txns: number;
1253
- /** @description Total fees in USD for this timeframe */
1516
+ /**
1517
+ * Format: double
1518
+ * @description Total fees in this timeframe
1519
+ */
1254
1520
  fees: number;
1255
1521
  };
1522
+ /**
1523
+ * @description Aggregation windows emitted by the metrics / milestone streams.
1524
+ * @enum {string}
1525
+ */
1526
+ MetricFilterTimeframe: "1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d";
1256
1527
  /** @description NegRisk Adapter: outcome reported for a neg-risk market question. */
1257
1528
  NegRiskOutcomeReportedEvent: {
1258
1529
  id: string;
@@ -1287,7 +1558,10 @@ export interface components {
1287
1558
  condition_id?: string | null;
1288
1559
  /** @description Outcome name (e.g. "Yes", "No") */
1289
1560
  outcome?: string | null;
1290
- /** @description Outcome index: 0 = Yes/Up, 1 = No */
1561
+ /**
1562
+ * Format: int32
1563
+ * @description Outcome index: 0 = Yes/Up, 1 = No
1564
+ */
1291
1565
  outcome_index?: number | null;
1292
1566
  /** @description Market question text */
1293
1567
  question?: string | null;
@@ -1295,6 +1569,8 @@ export interface components {
1295
1569
  market_slug?: string | null;
1296
1570
  /** @description Parent event slug */
1297
1571
  event_slug?: string | null;
1572
+ /** @description Market image URL */
1573
+ image_url?: string | null;
1298
1574
  /** @description Unique trade identifier */
1299
1575
  trade_id: string;
1300
1576
  /** @description Transaction hash */
@@ -1309,32 +1585,44 @@ export interface components {
1309
1585
  * @description Block confirmation timestamp (Unix seconds)
1310
1586
  */
1311
1587
  confirmed_at: number;
1312
- /** @description USD size of the trade (6 decimal places) */
1588
+ /**
1589
+ * Format: double
1590
+ * @description USD size of the trade (6 decimal places)
1591
+ */
1313
1592
  amount_usd: number;
1314
- /** @description Outcome shares traded (6 decimal places) */
1593
+ /**
1594
+ * Format: double
1595
+ * @description Outcome shares traded (6 decimal places)
1596
+ */
1315
1597
  shares_amount: number;
1316
- /** @description Fee paid in USD (6 decimal places) */
1317
- fee: number;
1318
1598
  /**
1319
- * @description Trade direction
1320
- * @enum {string}
1599
+ * Format: double
1600
+ * @description Fee paid in USD (6 decimal places)
1321
1601
  */
1602
+ fee: number;
1603
+ /** @description Trade direction */
1322
1604
  side: "Buy" | "Sell";
1323
- /** @description Outcome token price (0.0–1.0) */
1324
- price: number;
1325
- /** @description Implied probability (0.0–1.0); null when outcome is unknown */
1326
- probability?: number | null;
1327
1605
  /**
1328
- * @description Exchange contract that processed the trade
1329
- * @enum {string}
1606
+ * Format: double
1607
+ * @description Outcome token price (0.0–1.0)
1330
1608
  */
1331
- exchange: "CTFExchange" | "NegRiskExchange" | "ConditionalTokens" | "NegRiskAdapter" | "Unknown";
1609
+ price: number;
1332
1610
  /**
1333
- * @description Trade type (webhook events only fire on order fills)
1334
- * @enum {string}
1611
+ * Format: double
1612
+ * @description Implied probability (0.0–1.0); null when outcome is unknown
1335
1613
  */
1614
+ probability?: number | null;
1615
+ /** @description Exchange contract that processed the trade */
1616
+ exchange: "CTFExchange" | "NegRiskExchange" | "ConditionalTokens" | "NegRiskAdapter" | "CTFExchangeV2" | "NegRiskExchangeV2" | "Unknown";
1617
+ /** @description Trade type (webhook events only fire on order fills) */
1336
1618
  trade_type: "OrderFilled" | "OrdersMatched";
1337
1619
  };
1620
+ /**
1621
+ * @description Trade types accepted by `trader_new_trade.trade_types`. Webhook fires on
1622
+ * fill-style trades only.
1623
+ * @enum {string}
1624
+ */
1625
+ NewTradeFilterType: "OrderFilled" | "OrdersMatched";
1338
1626
  /** @description Payload delivered on every order-filled trade */
1339
1627
  NewTradePayload: {
1340
1628
  /** @description Limit-order maker wallet address (lowercase) */
@@ -1347,7 +1635,10 @@ export interface components {
1347
1635
  condition_id?: string | null;
1348
1636
  /** @description Outcome name (e.g. "Yes", "No") */
1349
1637
  outcome?: string | null;
1350
- /** @description Outcome index: 0 = Yes/Up, 1 = No */
1638
+ /**
1639
+ * Format: int32
1640
+ * @description Outcome index: 0 = Yes/Up, 1 = No
1641
+ */
1351
1642
  outcome_index?: number | null;
1352
1643
  /** @description Market question text */
1353
1644
  question?: string | null;
@@ -1355,6 +1646,8 @@ export interface components {
1355
1646
  market_slug?: string | null;
1356
1647
  /** @description Parent event slug */
1357
1648
  event_slug?: string | null;
1649
+ /** @description Market image URL */
1650
+ image_url?: string | null;
1358
1651
  /** @description Unique trade identifier */
1359
1652
  trade_id: string;
1360
1653
  /** @description Transaction hash */
@@ -1369,32 +1662,43 @@ export interface components {
1369
1662
  * @description Block confirmation timestamp (Unix seconds)
1370
1663
  */
1371
1664
  confirmed_at: number;
1372
- /** @description USD size of the trade (6 decimal places) */
1665
+ /**
1666
+ * Format: double
1667
+ * @description USD size of the trade (6 decimal places)
1668
+ */
1373
1669
  amount_usd: number;
1374
- /** @description Outcome shares traded (6 decimal places) */
1670
+ /**
1671
+ * Format: double
1672
+ * @description Outcome shares traded (6 decimal places)
1673
+ */
1375
1674
  shares_amount: number;
1376
- /** @description Fee paid in USD (6 decimal places) */
1377
- fee: number;
1378
1675
  /**
1379
- * @description Trade direction
1380
- * @enum {string}
1676
+ * Format: double
1677
+ * @description Fee paid in USD (6 decimal places)
1381
1678
  */
1679
+ fee: number;
1680
+ /** @description Trade direction */
1382
1681
  side: "Buy" | "Sell";
1383
- /** @description Outcome token price (0.0–1.0) */
1384
- price: number;
1385
- /** @description Implied probability (0.0–1.0); null when outcome is unknown */
1386
- probability?: number | null;
1387
1682
  /**
1388
- * @description Exchange contract that processed the trade
1389
- * @enum {string}
1683
+ * Format: double
1684
+ * @description Outcome token price (0.0–1.0)
1390
1685
  */
1391
- exchange: "CTFExchange" | "NegRiskExchange" | "ConditionalTokens" | "NegRiskAdapter" | "Unknown";
1686
+ price: number;
1392
1687
  /**
1393
- * @description Trade type (webhook events only fire on order fills)
1394
- * @enum {string}
1688
+ * Format: double
1689
+ * @description Implied probability (0.0–1.0); null when outcome is unknown
1395
1690
  */
1691
+ probability?: number | null;
1692
+ /** @description Exchange contract that processed the trade */
1693
+ exchange: "CTFExchange" | "NegRiskExchange" | "ConditionalTokens" | "NegRiskAdapter" | "CTFExchangeV2" | "NegRiskExchangeV2" | "Unknown";
1694
+ /** @description Trade type (webhook events only fire on order fills) */
1396
1695
  trade_type: "OrderFilled" | "OrdersMatched";
1397
1696
  };
1697
+ /**
1698
+ * @description Oracle event variants accepted by `oracle_events.oracle_event_types`.
1699
+ * @enum {string}
1700
+ */
1701
+ OracleEventFilterType: "AssertionMade" | "AssertionDisputed" | "AssertionSettled" | "RequestPrice" | "ProposePrice" | "DisputePrice" | "Settle" | "QuestionResolved" | "QuestionEmergencyResolved" | "QuestionReset" | "QuestionInitialized" | "QuestionPaused" | "QuestionUnpaused" | "QuestionFlagged" | "QuestionUnflagged" | "ConditionResolution" | "NegRiskOutcomeReported";
1398
1702
  /**
1399
1703
  * @description Tagged enum for all oracle event types — serializes with `"event_type": "..."` discriminator
1400
1704
  * and only includes fields relevant to each type.
@@ -1451,6 +1755,18 @@ export interface components {
1451
1755
  /** @enum {string} */
1452
1756
  event_type: "NegRiskOutcomeReported";
1453
1757
  });
1758
+ /** @description Subscription filters for the `oracle_events` event. All fields are optional. */
1759
+ OracleEventsFilters: {
1760
+ /** @description Restrict to these event types (case-insensitive). Empty = all. */
1761
+ oracle_event_types?: components["schemas"]["OracleEventFilterType"][] | null;
1762
+ /** @description Restrict to events for these condition IDs. */
1763
+ condition_ids?: string[] | null;
1764
+ };
1765
+ /**
1766
+ * @description PnL aggregation windows accepted by `*_pnl.timeframes`.
1767
+ * @enum {string}
1768
+ */
1769
+ PnlFilterTimeframe: "1d" | "7d" | "30d" | "lifetime";
1454
1770
  /**
1455
1771
  * @description PnL timeframe enum for webhook filtering
1456
1772
  * @enum {string}
@@ -1460,7 +1776,7 @@ export interface components {
1460
1776
  * @description Polymarket webhook event types
1461
1777
  * @enum {string}
1462
1778
  */
1463
- PolymarketWebhookEvent: "trader_first_trade" | "trader_new_market" | "trader_whale_trade" | "trader_new_trade" | "trader_trade_event" | "trader_global_pnl" | "trader_market_pnl" | "trader_event_pnl" | "condition_metrics" | "event_metrics" | "position_metrics" | "market_volume_milestone" | "event_volume_milestone" | "position_volume_milestone" | "probability_spike" | "market_volume_spike" | "event_volume_spike" | "position_volume_spike" | "close_to_bond" | "market_created" | "asset_price_tick" | "asset_price_window_update" | "price_spike" | "oracle_events";
1779
+ PolymarketWebhookEvent: "trader_first_trade" | "trader_new_market" | "trader_whale_trade" | "trader_new_trade" | "trader_trade_event" | "trader_global_pnl" | "trader_market_pnl" | "trader_event_pnl" | "condition_metrics" | "event_metrics" | "tag_metrics" | "position_metrics" | "market_volume_milestone" | "event_volume_milestone" | "position_volume_milestone" | "probability_spike" | "market_volume_spike" | "event_volume_spike" | "position_volume_spike" | "close_to_bond" | "market_created" | "asset_price_tick" | "asset_price_window_update" | "price_spike" | "oracle_events";
1464
1780
  /**
1465
1781
  * @description Polymarket-specific webhook filters
1466
1782
  *
@@ -1473,11 +1789,12 @@ export interface components {
1473
1789
  * - event_pnl: traders, min_realized_pnl_usd, max_realized_pnl_usd, min_volume_usd, event_slugs, min_markets_traded
1474
1790
  * - condition_metrics: condition_ids, min_volume_usd, max_volume_usd, min_fees, min_txns, timeframes
1475
1791
  * - event_metrics: event_slugs, min_volume_usd, max_volume_usd, min_fees, min_txns, timeframes
1792
+ * - tag_metrics: tags, min_volume_usd, max_volume_usd, min_fees, min_txns, timeframes
1476
1793
  * - position_metrics: position_ids, condition_ids, outcomes, min_volume_usd, max_volume_usd, min_buy_usd, min_sell_volume_usd, min_fees, min_txns, min_price_change_pct, min_probability_change_pct, timeframes
1477
1794
  * - volume_milestone: condition_ids, timeframes, milestone_amounts
1478
1795
  * - close_to_bond: min_probability (high zone threshold), max_probability (low zone threshold), condition_ids, position_ids, outcomes, position_outcome_indices, event_slugs, exclude_shortterm_markets
1479
1796
  * - market_created: event_slugs, tags, exclude_shortterm_markets
1480
- * - probability_spike: condition_ids, event_slugs, outcomes, min_probability_change_pct, spike_direction, window_secs, exclude_shortterm_markets
1797
+ * - probability_spike: condition_ids, event_slugs, outcomes, min_probability, max_probability, min_probability_change_pct, spike_direction, window_secs, exclude_shortterm_markets
1481
1798
  * - price_spike: condition_ids, event_slugs, outcomes, min_price_change_pct, spike_direction, window_secs, exclude_shortterm_markets
1482
1799
  * - trader_new_trade: wallet_addresses, min_usd_value, min_probability, max_probability, condition_ids, event_slugs, trade_types, exclude_shortterm_markets
1483
1800
  * - trader_trade_event: wallet_addresses, min_usd_value, min_probability, max_probability, condition_ids, event_slugs, trade_types, exclude_shortterm_markets
@@ -1648,6 +1965,44 @@ export interface components {
1648
1965
  */
1649
1966
  oracle_event_types?: string[];
1650
1967
  };
1968
+ /** @description Subscription filters for the `position_metrics` event. All fields are optional. */
1969
+ PositionMetricsFilters: {
1970
+ /** @description Restrict to these outcome token IDs. */
1971
+ position_ids?: string[] | null;
1972
+ /** @description Restrict to positions within these markets. */
1973
+ condition_ids?: string[] | null;
1974
+ /** @description Restrict to positions with these outcome names (e.g. \["Yes", "No"\]). */
1975
+ outcomes?: string[] | null;
1976
+ /** @description Restrict to these aggregation windows. */
1977
+ timeframes?: components["schemas"]["MetricFilterTimeframe"][] | null;
1978
+ /**
1979
+ * Format: double
1980
+ * @description Only fire when position volume ≥ this value (USD).
1981
+ */
1982
+ min_volume_usd?: number | null;
1983
+ /** Format: double */
1984
+ max_volume_usd?: number | null;
1985
+ /** Format: double */
1986
+ min_buy_usd?: number | null;
1987
+ /** Format: double */
1988
+ min_sell_volume_usd?: number | null;
1989
+ /** Format: int64 */
1990
+ min_txns?: number | null;
1991
+ /** Format: int64 */
1992
+ min_unique_traders?: number | null;
1993
+ /**
1994
+ * Format: double
1995
+ * @description Only fire when price change % ≥ this value.
1996
+ */
1997
+ min_price_change_pct?: number | null;
1998
+ /**
1999
+ * Format: double
2000
+ * @description Only fire when probability change % ≥ this value.
2001
+ */
2002
+ min_probability_change_pct?: number | null;
2003
+ /** Format: double */
2004
+ min_fees?: number | null;
2005
+ };
1651
2006
  /** @description Payload delivered when a position's volume or transaction metrics cross a configured threshold */
1652
2007
  PositionMetricsPayload: {
1653
2008
  /** @description ERC-1155 outcome token ID */
@@ -1655,23 +2010,82 @@ export interface components {
1655
2010
  /** @description Outcome name (e.g. "Yes", "No") */
1656
2011
  outcome?: string | null;
1657
2012
  /**
1658
- * Format: int16
2013
+ * Format: int32
1659
2014
  * @description Outcome index
1660
2015
  */
1661
2016
  outcome_index?: number | null;
2017
+ /** @description Aggregation window */
2018
+ timeframe?: null | ("1m" | "5m" | "15m" | "30m" | "1h" | "4h" | "6h" | "1d" | "24h" | "7d" | "30d");
1662
2019
  /**
1663
- * @description Aggregation window
1664
- * @enum {string|null}
2020
+ * Format: double
2021
+ * @description Total trading volume in USD
1665
2022
  */
1666
- timeframe?: "1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d" | null;
1667
- /** @description Total trading volume in USD */
1668
2023
  volume_usd?: number | null;
1669
- /** @description Buy volume in USD */
2024
+ /**
2025
+ * Format: double
2026
+ * @description Buy volume in USD
2027
+ */
1670
2028
  buy_volume_usd?: number | null;
1671
- /** @description Sell volume in USD */
2029
+ /**
2030
+ * Format: double
2031
+ * @description Sell volume in USD
2032
+ */
1672
2033
  sell_volume_usd?: number | null;
1673
- /** @description Total fees in USD */
2034
+ /**
2035
+ * Format: double
2036
+ * @description Total shares/contracts volume
2037
+ */
2038
+ shares_volume?: number | null;
2039
+ /**
2040
+ * Format: double
2041
+ * @description Buy shares/contracts volume
2042
+ */
2043
+ shares_buy_volume?: number | null;
2044
+ /**
2045
+ * Format: double
2046
+ * @description Sell shares/contracts volume
2047
+ */
2048
+ shares_sell_volume?: number | null;
2049
+ /**
2050
+ * Format: double
2051
+ * @description Builder-attributed volume in USD
2052
+ */
2053
+ builder_usd_volume?: number | null;
2054
+ /**
2055
+ * Format: double
2056
+ * @description Builder-attributed buy volume in USD
2057
+ */
2058
+ builder_usd_buy_volume?: number | null;
2059
+ /**
2060
+ * Format: double
2061
+ * @description Builder-attributed sell volume in USD
2062
+ */
2063
+ builder_usd_sell_volume?: number | null;
2064
+ /**
2065
+ * Format: double
2066
+ * @description Builder-attributed shares/contracts volume
2067
+ */
2068
+ builder_shares_volume?: number | null;
2069
+ /**
2070
+ * Format: double
2071
+ * @description Builder-attributed buy shares/contracts volume
2072
+ */
2073
+ builder_shares_buy_volume?: number | null;
2074
+ /**
2075
+ * Format: double
2076
+ * @description Builder-attributed sell shares/contracts volume
2077
+ */
2078
+ builder_shares_sell_volume?: number | null;
2079
+ /**
2080
+ * Format: double
2081
+ * @description Total fees in USD
2082
+ */
1674
2083
  fees?: number | null;
2084
+ /**
2085
+ * Format: double
2086
+ * @description Builder-attributed fees in USD
2087
+ */
2088
+ builder_fees?: number | null;
1675
2089
  /** Format: int64 */
1676
2090
  txns?: number | null;
1677
2091
  /** Format: int64 */
@@ -1679,128 +2093,308 @@ export interface components {
1679
2093
  /** Format: int64 */
1680
2094
  sells?: number | null;
1681
2095
  /** Format: int64 */
2096
+ builder_txns?: number | null;
2097
+ /** Format: int64 */
2098
+ builder_buys?: number | null;
2099
+ /** Format: int64 */
2100
+ builder_sells?: number | null;
2101
+ /** Format: int64 */
1682
2102
  unique_traders?: number | null;
2103
+ /** Format: int64 */
2104
+ unique_builder_traders?: number | null;
2105
+ /** Format: double */
1683
2106
  price_open?: number | null;
2107
+ /** Format: double */
1684
2108
  price_close?: number | null;
2109
+ /** Format: double */
1685
2110
  price_high?: number | null;
2111
+ /** Format: double */
1686
2112
  price_low?: number | null;
2113
+ /** Format: double */
1687
2114
  probability_open?: number | null;
2115
+ /** Format: double */
1688
2116
  probability_close?: number | null;
2117
+ /** Format: double */
1689
2118
  probability_high?: number | null;
2119
+ /** Format: double */
1690
2120
  probability_low?: number | null;
2121
+ /** Format: double */
2122
+ avg_trade_shares?: number | null;
2123
+ /** Format: double */
2124
+ avg_buy_shares?: number | null;
2125
+ /** Format: double */
2126
+ avg_sell_shares?: number | null;
1691
2127
  };
1692
- /** @description Payload delivered when a position's trading volume crosses a USD milestone */
1693
- PositionVolumeMilestonePayload: {
1694
- /** @description Parent market condition ID */
2128
+ /** @description Subscription filters for the `position_volume_milestone` event. */
2129
+ PositionVolumeMilestoneFilters: {
2130
+ /** @description **Required.** Aggregation windows to monitor. */
2131
+ timeframes: components["schemas"]["MetricFilterTimeframe"][];
2132
+ /** @description Restrict to these outcome token IDs. */
2133
+ position_ids?: string[] | null;
2134
+ /** @description Restrict to positions within these markets. */
2135
+ condition_ids?: string[] | null;
2136
+ /** @description Restrict to these outcome names (e.g. \["Yes", "No"\]). */
2137
+ outcomes?: string[] | null;
2138
+ /** @description Specific USD milestones to trigger on. */
2139
+ milestone_amounts?: number[] | null;
2140
+ };
2141
+ /** @description Position volume milestone webhook payload */
2142
+ PositionVolumeMilestonePayload: {
1695
2143
  condition_id?: string | null;
1696
- /** @description ERC-1155 outcome token ID */
1697
2144
  position_id: string;
1698
- /** @description Outcome name (e.g. "Yes", "No") */
1699
2145
  outcome?: string | null;
1700
- /**
1701
- * Format: int16
1702
- * @description Outcome index
1703
- */
2146
+ /** Format: int32 */
1704
2147
  outcome_index?: number | null;
2148
+ timeframe: string;
1705
2149
  /**
1706
- * @description Aggregation window
1707
- * @enum {string}
2150
+ * Format: double
2151
+ * @description Milestone amount reached (USD)
1708
2152
  */
1709
- timeframe: "1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d";
1710
- /** @description The USD milestone amount that was crossed */
1711
2153
  milestone_usd: number;
1712
- /** @description Current position volume at time of trigger (USD) */
2154
+ /**
2155
+ * Format: double
2156
+ * @description Current volume (USD) that triggered the milestone
2157
+ */
1713
2158
  current_volume_usd: number;
1714
- /** @description Buy volume in USD for this timeframe */
2159
+ /**
2160
+ * Format: double
2161
+ * @description Buy volume (USD)
2162
+ */
1715
2163
  buy_volume_usd: number;
1716
- /** @description Sell volume in USD for this timeframe */
2164
+ /**
2165
+ * Format: double
2166
+ * @description Sell volume (USD)
2167
+ */
1717
2168
  sell_volume_usd: number;
1718
- /** @description Total fees in USD */
2169
+ /**
2170
+ * Format: double
2171
+ * @description Total fees collected in this timeframe
2172
+ */
1719
2173
  fees: number;
1720
- /** Format: int64 */
2174
+ /**
2175
+ * Format: int64
2176
+ * @description Total transactions in this timeframe
2177
+ */
1721
2178
  txns: number;
1722
- /** Format: int64 */
2179
+ /**
2180
+ * Format: int64
2181
+ * @description Buy transactions
2182
+ */
1723
2183
  buys: number;
1724
- /** Format: int64 */
2184
+ /**
2185
+ * Format: int64
2186
+ * @description Sell transactions
2187
+ */
1725
2188
  sells: number;
1726
2189
  };
1727
- /** @description Payload delivered when a position's volume has spiked since the last snapshot */
2190
+ /** @description Subscription filters for the `position_volume_spike` event. `spike_ratio` is required. */
2191
+ PositionVolumeSpikeFilters: {
2192
+ /**
2193
+ * Format: double
2194
+ * @description **Required.** Multiplier threshold (must be > 1.0). Fires when current volume >= snapshot × ratio.
2195
+ */
2196
+ spike_ratio: number;
2197
+ /**
2198
+ * Format: int64
2199
+ * @description Force snapshot reset after this many seconds (max 600 / 10 minutes).
2200
+ */
2201
+ window_secs?: number | null;
2202
+ /** @description Restrict to these outcome token IDs. */
2203
+ position_ids?: string[] | null;
2204
+ /** @description Restrict to positions within these markets. */
2205
+ condition_ids?: string[] | null;
2206
+ /** @description Restrict to these outcome names. */
2207
+ outcomes?: string[] | null;
2208
+ /** @description Restrict to these aggregation windows. */
2209
+ timeframes?: components["schemas"]["VolumeSpikeFilterTimeframe"][] | null;
2210
+ };
2211
+ /** @description Position volume spike webhook payload */
1728
2212
  PositionVolumeSpikePayload: {
1729
- /** @description ERC-1155 outcome token ID */
1730
2213
  position_id: string;
1731
- /** @description Parent market condition ID */
1732
2214
  condition_id: string;
1733
- /** @description Outcome name (e.g. "Yes", "No") */
2215
+ question?: string | null;
2216
+ market_slug?: string | null;
2217
+ event_slug?: string | null;
2218
+ image_url?: string | null;
1734
2219
  outcome?: string | null;
1735
- /** Format: int16 */
2220
+ /** Format: int32 */
1736
2221
  outcome_index?: number | null;
2222
+ timeframe: string;
1737
2223
  /**
1738
- * @description Aggregation window
1739
- * @enum {string}
2224
+ * Format: double
2225
+ * @description Current position volume at the time of the spike (USD)
1740
2226
  */
1741
- timeframe: "1m" | "5m" | "30m" | "1h" | "6h" | "1d" | "24h" | "7d" | "30d";
1742
- /** @description Current position volume at the time of the spike (USD) */
1743
2227
  current_volume_usd: number;
1744
- /** @description Volume at the snapshot baseline (USD) */
2228
+ /**
2229
+ * Format: double
2230
+ * @description Volume at the snapshot baseline (USD)
2231
+ */
1745
2232
  snapshot_volume_usd: number;
1746
- /** @description New volume since the snapshot that triggered this notification (USD) */
2233
+ /**
2234
+ * Format: double
2235
+ * @description New volume since the snapshot that triggered this notification (USD)
2236
+ */
1747
2237
  delta_volume_usd: number;
1748
- /** @description Volume growth as a percentage of the snapshot (e.g. 200.0 means volume tripled) */
2238
+ /**
2239
+ * Format: double
2240
+ * @description Volume growth as a percentage of the snapshot (e.g. 200.0 means volume tripled)
2241
+ */
1749
2242
  spike_pct: number;
1750
- /** Format: int64 */
2243
+ /**
2244
+ * Format: int64
2245
+ * @description Total transactions in this timeframe
2246
+ */
1751
2247
  txns: number;
2248
+ /**
2249
+ * Format: double
2250
+ * @description Total fees in this timeframe
2251
+ */
1752
2252
  fees: number;
1753
2253
  };
2254
+ /** @description Subscription filters for the `price_spike` event. */
2255
+ PriceSpikeFilters: {
2256
+ /** @description Restrict to specific outcome token IDs. Empty = all positions. */
2257
+ position_ids?: string[] | null;
2258
+ /** @description Restrict to specific market condition IDs. Empty = all markets. */
2259
+ condition_ids?: string[] | null;
2260
+ /** @description Restrict to specific events. Empty = all events. */
2261
+ event_slugs?: string[] | null;
2262
+ /** @description Restrict to these outcome names (e.g. \["Yes", "No"\]). */
2263
+ outcomes?: string[] | null;
2264
+ /**
2265
+ * Format: double
2266
+ * @description Minimum price percentage move to trigger (e.g. `10` for a 10% move).
2267
+ */
2268
+ min_price_change_pct?: number | null;
2269
+ /**
2270
+ * Format: double
2271
+ * @description Minimum YES probability (0-1).
2272
+ */
2273
+ min_probability?: number | null;
2274
+ /**
2275
+ * Format: double
2276
+ * @description Maximum YES probability (0-1).
2277
+ */
2278
+ max_probability?: number | null;
2279
+ /**
2280
+ * Format: int64
2281
+ * @description Minimum trades accumulated in the observation window before firing.
2282
+ */
2283
+ min_txns?: number | null;
2284
+ /**
2285
+ * Format: double
2286
+ * @description Minimum USD volume accumulated in the observation window before firing.
2287
+ */
2288
+ min_volume_usd?: number | null;
2289
+ spike_direction?: null | components["schemas"]["SpikeDirection"];
2290
+ /**
2291
+ * Format: int64
2292
+ * @description Observation window in seconds. The first trade in each window sets the reference price; subsequent trades are compared to it. E.g. `60` detects moves that occur within 60 seconds.
2293
+ */
2294
+ window_secs?: number | null;
2295
+ /** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
2296
+ exclude_shortterm_markets?: boolean | null;
2297
+ };
2298
+ /** @description Position price spike webhook payload */
1754
2299
  PriceSpikePayload: {
1755
- /** @description Outcome token ID */
1756
2300
  position_id: string;
1757
- /** @description Market condition ID */
1758
2301
  condition_id?: string | null;
1759
- /** @description Event slug */
2302
+ question?: string | null;
2303
+ market_slug?: string | null;
1760
2304
  event_slug?: string | null;
1761
- /** @description Outcome name (e.g. "Yes", "No") */
2305
+ image_url?: string | null;
1762
2306
  outcome?: string | null;
2307
+ /** Format: int32 */
2308
+ outcome_index?: number | null;
1763
2309
  /**
1764
- * Format: int16
1765
- * @description Outcome index
2310
+ * Format: double
2311
+ * @description Price at the start of the observation window (the baseline snapshot)
1766
2312
  */
1767
- outcome_index?: number | null;
1768
- /** @description Price at the start of the observation window (baseline snapshot, 0.0–1.0) */
1769
2313
  previous_price: number;
1770
- /** @description Current price that triggered the spike (0.0–1.0) */
2314
+ /**
2315
+ * Format: double
2316
+ * @description Current price that triggered the spike
2317
+ */
1771
2318
  current_price: number;
2319
+ /** @description Direction of the spike: `"up"` (price rising) or `"down"` (price falling) */
2320
+ spike_direction: string;
1772
2321
  /**
1773
- * @description `"up"` = price rising, `"down"` = price falling
1774
- * @enum {string}
2322
+ * Format: double
2323
+ * @description Detected spike percentage from the snapshot baseline. Positive = rising, negative = falling.
1775
2324
  */
1776
- spike_direction: "up" | "down";
1777
- /** @description Percentage move that triggered this notification. Positive = up, negative = down. */
1778
2325
  spike_pct: number;
1779
2326
  };
2327
+ /** @description Subscription filters for the `probability_spike` event. */
2328
+ ProbabilitySpikeFilters: {
2329
+ /** @description Restrict to specific outcome token IDs. Empty = all positions. */
2330
+ position_ids?: string[] | null;
2331
+ /** @description Restrict to specific market condition IDs. Empty = all markets. */
2332
+ condition_ids?: string[] | null;
2333
+ /** @description Restrict to specific events. Empty = all events. */
2334
+ event_slugs?: string[] | null;
2335
+ /** @description Restrict to these outcome names (e.g. \["Yes", "No"\]). */
2336
+ outcomes?: string[] | null;
2337
+ /**
2338
+ * Format: double
2339
+ * @description Minimum YES probability (0-1). At least one of `min_probability`/`max_probability` is enforced at runtime if you want a probability gate.
2340
+ */
2341
+ min_probability?: number | null;
2342
+ /**
2343
+ * Format: double
2344
+ * @description Maximum YES probability (0-1).
2345
+ */
2346
+ max_probability?: number | null;
2347
+ /**
2348
+ * Format: double
2349
+ * @description Minimum probability percentage move to trigger (e.g. `10` for a 10% move).
2350
+ */
2351
+ min_probability_change_pct?: number | null;
2352
+ /**
2353
+ * Format: int64
2354
+ * @description Minimum trades accumulated in the observation window before firing.
2355
+ */
2356
+ min_txns?: number | null;
2357
+ /**
2358
+ * Format: double
2359
+ * @description Minimum USD volume accumulated in the observation window before firing.
2360
+ */
2361
+ min_volume_usd?: number | null;
2362
+ spike_direction?: null | components["schemas"]["SpikeDirection"];
2363
+ /**
2364
+ * Format: int64
2365
+ * @description Observation window in seconds. The first trade in each window sets the reference price; subsequent trades are compared to it. E.g. `60` detects moves that occur within 60 seconds.
2366
+ */
2367
+ window_secs?: number | null;
2368
+ /** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
2369
+ exclude_shortterm_markets?: boolean | null;
2370
+ };
2371
+ /** @description Position probability spike webhook payload */
1780
2372
  ProbabilitySpikePayload: {
1781
- /** @description Outcome token ID */
1782
2373
  position_id: string;
1783
- /** @description Market condition ID */
1784
2374
  condition_id?: string | null;
1785
- /** @description Event slug */
2375
+ question?: string | null;
2376
+ market_slug?: string | null;
1786
2377
  event_slug?: string | null;
1787
- /** @description Outcome name (e.g. "Yes", "No") */
2378
+ image_url?: string | null;
1788
2379
  outcome?: string | null;
2380
+ /** Format: int32 */
2381
+ outcome_index?: number | null;
1789
2382
  /**
1790
- * Format: int16
1791
- * @description Outcome index
2383
+ * Format: double
2384
+ * @description Probability at the start of the observation window (the baseline snapshot)
1792
2385
  */
1793
- outcome_index?: number | null;
1794
- /** @description Probability at the start of the observation window (baseline snapshot, 0.0–1.0) */
1795
2386
  previous_probability: number;
1796
- /** @description Current probability that triggered the spike (0.0–1.0) */
2387
+ /**
2388
+ * Format: double
2389
+ * @description Current probability that triggered the spike
2390
+ */
1797
2391
  current_probability: number;
2392
+ /** @description Direction of the spike: `"up"` (probability rising) or `"down"` (probability falling) */
2393
+ spike_direction: string;
1798
2394
  /**
1799
- * @description `"up"` = probability rising, `"down"` = probability falling
1800
- * @enum {string}
2395
+ * Format: double
2396
+ * @description Detected spike percentage from the snapshot baseline. Positive = rising, negative = falling.
1801
2397
  */
1802
- spike_direction: "up" | "down";
1803
- /** @description Percentage move that triggered this notification. Positive = up, negative = down. */
1804
2398
  spike_pct: number;
1805
2399
  };
1806
2400
  /** @description V2 UMA OOv2: a price was proposed (resolution proposal). */
@@ -2092,6 +2686,367 @@ export interface components {
2092
2686
  * @enum {string}
2093
2687
  */
2094
2688
  SpikeDirection: "up" | "down" | "both";
2689
+ /** @description Subscription filters for the `tag_metrics` event. All fields are optional. */
2690
+ TagMetricsFilters: {
2691
+ /** @description Restrict to these tags. Empty = all tags. */
2692
+ tags?: string[] | null;
2693
+ /** @description Restrict to these aggregation windows. */
2694
+ timeframes?: components["schemas"]["MetricFilterTimeframe"][] | null;
2695
+ /**
2696
+ * Format: double
2697
+ * @description Only fire when aggregated tag volume >= this value (USD).
2698
+ */
2699
+ min_volume_usd?: number | null;
2700
+ /** Format: double */
2701
+ max_volume_usd?: number | null;
2702
+ /** Format: int64 */
2703
+ min_txns?: number | null;
2704
+ /** Format: int64 */
2705
+ min_unique_traders?: number | null;
2706
+ /** Format: double */
2707
+ min_fees?: number | null;
2708
+ };
2709
+ /** @description Payload delivered when a tag's aggregated volume or transaction metrics cross a configured threshold */
2710
+ TagMetricsPayload: {
2711
+ /** @description Tag label or slug */
2712
+ tag?: string | null;
2713
+ /** @description Aggregation window */
2714
+ timeframe?: null | ("1m" | "5m" | "15m" | "30m" | "1h" | "4h" | "6h" | "1d" | "24h" | "7d" | "30d");
2715
+ /**
2716
+ * Format: double
2717
+ * @description Total aggregated volume for the tag (USD)
2718
+ */
2719
+ volume_usd?: number | null;
2720
+ /**
2721
+ * Format: double
2722
+ * @description Total aggregated shares/contracts volume for the tag
2723
+ */
2724
+ shares_volume?: number | null;
2725
+ /**
2726
+ * Format: double
2727
+ * @description Builder-attributed aggregated volume in USD
2728
+ */
2729
+ builder_usd_volume?: number | null;
2730
+ /**
2731
+ * Format: double
2732
+ * @description Builder-attributed aggregated shares/contracts volume
2733
+ */
2734
+ builder_shares_volume?: number | null;
2735
+ /**
2736
+ * Format: double
2737
+ * @description Total fees collected in USD
2738
+ */
2739
+ fees?: number | null;
2740
+ /**
2741
+ * Format: double
2742
+ * @description Builder-attributed fees in USD
2743
+ */
2744
+ builder_fees?: number | null;
2745
+ /**
2746
+ * Format: int64
2747
+ * @description Total number of transactions
2748
+ */
2749
+ txns?: number | null;
2750
+ /**
2751
+ * Format: int64
2752
+ * @description Builder-attributed transaction count
2753
+ */
2754
+ builder_txns?: number | null;
2755
+ /**
2756
+ * Format: int64
2757
+ * @description Number of unique traders
2758
+ */
2759
+ unique_traders?: number | null;
2760
+ /**
2761
+ * Format: int64
2762
+ * @description Number of unique builder-attributed traders
2763
+ */
2764
+ unique_builder_traders?: number | null;
2765
+ };
2766
+ /**
2767
+ * @description Trade-event types accepted by `trader_trade_event.trade_types`. Covers the
2768
+ * full set of typed prediction-trade variants.
2769
+ * @enum {string}
2770
+ */
2771
+ TradeEventFilterType: "OrderFilled" | "Redemption" | "Merge" | "Split" | "Cancelled" | "PositionsConverted" | "OrdersMatched" | "Initialization" | "Proposal" | "Dispute" | "Settled" | "Resolution" | "ConditionResolution" | "Reset" | "Flag" | "Unflag" | "Pause" | "Unpause" | "ManualResolution" | "NegRiskOutcomeReported" | "RegisterToken" | "Approval";
2772
+ /** @description Subscription filters for the `trader_event_pnl` event. All fields are optional. */
2773
+ TraderEventPnlFilters: {
2774
+ /** @description Track only these trader wallet addresses. */
2775
+ traders?: string[] | null;
2776
+ /** @description Restrict to these events. */
2777
+ event_slugs?: string[] | null;
2778
+ /**
2779
+ * Format: double
2780
+ * @description Only fire when per-event realized PnL ≥ this value (USD).
2781
+ */
2782
+ min_realized_pnl_usd?: number | null;
2783
+ /**
2784
+ * Format: double
2785
+ * @description Only fire when per-event realized PnL ≤ this value (USD).
2786
+ */
2787
+ max_realized_pnl_usd?: number | null;
2788
+ /**
2789
+ * Format: double
2790
+ * @description Only fire when total event volume ≥ this value (USD).
2791
+ */
2792
+ min_volume_usd?: number | null;
2793
+ /**
2794
+ * Format: double
2795
+ * @description Only fire when total event volume ≤ this value (USD).
2796
+ */
2797
+ max_volume_usd?: number | null;
2798
+ /**
2799
+ * Format: double
2800
+ * @description Only fire when buy volume within the event ≥ this value (USD).
2801
+ */
2802
+ min_buy_usd?: number | null;
2803
+ /**
2804
+ * Format: double
2805
+ * @description Only fire when sell volume within the event ≥ this value (USD).
2806
+ */
2807
+ min_sell_volume_usd?: number | null;
2808
+ /**
2809
+ * Format: int64
2810
+ * @description Only fire when the trader has traded in ≥ this many markets within the event.
2811
+ */
2812
+ min_markets_traded?: number | null;
2813
+ /** @description Restrict to these PnL windows. */
2814
+ timeframes?: components["schemas"]["PnlFilterTimeframe"][] | null;
2815
+ /** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
2816
+ exclude_shortterm_markets?: boolean | null;
2817
+ };
2818
+ /** @description Subscription filters for the `trader_first_trade` event. All fields are optional. */
2819
+ TraderFirstTradeFilters: {
2820
+ /** @description Only fire for trades by these wallet addresses (lowercase). Empty = all traders. */
2821
+ wallet_addresses?: string[] | null;
2822
+ /** @description Restrict to trades in these markets. Empty = all markets. */
2823
+ condition_ids?: string[] | null;
2824
+ /** @description Restrict to trades in markets belonging to these events. */
2825
+ event_slugs?: string[] | null;
2826
+ /**
2827
+ * Format: double
2828
+ * @description Minimum trade size in USD. Omit to match all sizes.
2829
+ */
2830
+ min_usd_value?: number | null;
2831
+ /**
2832
+ * Format: double
2833
+ * @description Only fire when the outcome probability is ≥ this value.
2834
+ */
2835
+ min_probability?: number | null;
2836
+ /**
2837
+ * Format: double
2838
+ * @description Only fire when the outcome probability is ≤ this value.
2839
+ */
2840
+ max_probability?: number | null;
2841
+ /** @description When `true`, suppress webhooks for short-term "updown" markets (event slugs containing `updown`). Default: `false`. */
2842
+ exclude_shortterm_markets?: boolean | null;
2843
+ };
2844
+ /** @description Subscription filters for the `trader_global_pnl` event. All fields are optional. */
2845
+ TraderGlobalPnlFilters: {
2846
+ /** @description Track only these trader wallet addresses. Empty = all traders. */
2847
+ traders?: string[] | null;
2848
+ /**
2849
+ * Format: double
2850
+ * @description Only fire when realized PnL ≥ this value (USD). Use negative values for loss thresholds.
2851
+ */
2852
+ min_realized_pnl_usd?: number | null;
2853
+ /**
2854
+ * Format: double
2855
+ * @description Only fire when realized PnL ≤ this value (USD).
2856
+ */
2857
+ max_realized_pnl_usd?: number | null;
2858
+ /**
2859
+ * Format: double
2860
+ * @description Only fire when total trading volume ≥ this value (USD).
2861
+ */
2862
+ min_volume_usd?: number | null;
2863
+ /**
2864
+ * Format: double
2865
+ * @description Only fire when total trading volume ≤ this value (USD).
2866
+ */
2867
+ max_volume_usd?: number | null;
2868
+ /**
2869
+ * Format: double
2870
+ * @description Only fire when buy volume ≥ this value (USD).
2871
+ */
2872
+ min_buy_usd?: number | null;
2873
+ /**
2874
+ * Format: double
2875
+ * @description Only fire when sell volume ≥ this value (USD).
2876
+ */
2877
+ min_sell_volume_usd?: number | null;
2878
+ /**
2879
+ * Format: double
2880
+ * @description Only fire when market win rate ≥ this percentage (0.0–100.0).
2881
+ */
2882
+ min_win_rate?: number | null;
2883
+ /**
2884
+ * Format: int64
2885
+ * @description Only fire when the trader has traded in ≥ this many markets.
2886
+ */
2887
+ min_markets_traded?: number | null;
2888
+ /** @description Restrict to these PnL windows. Empty = all windows. */
2889
+ timeframes?: components["schemas"]["PnlFilterTimeframe"][] | null;
2890
+ };
2891
+ /** @description Subscription filters for the `trader_market_pnl` event. All fields are optional. */
2892
+ TraderMarketPnlFilters: {
2893
+ /** @description Track only these trader wallet addresses. */
2894
+ traders?: string[] | null;
2895
+ /** @description Restrict to these markets. */
2896
+ condition_ids?: string[] | null;
2897
+ /** @description Restrict to markets in these events. */
2898
+ event_slugs?: string[] | null;
2899
+ /**
2900
+ * Format: double
2901
+ * @description Only fire when per-market realized PnL ≥ this value (USD).
2902
+ */
2903
+ min_realized_pnl_usd?: number | null;
2904
+ /**
2905
+ * Format: double
2906
+ * @description Only fire when per-market realized PnL ≤ this value (USD).
2907
+ */
2908
+ max_realized_pnl_usd?: number | null;
2909
+ /**
2910
+ * Format: double
2911
+ * @description Only fire when total volume (buy + sell + redemption + merge) ≥ this value (USD).
2912
+ */
2913
+ min_volume_usd?: number | null;
2914
+ /**
2915
+ * Format: double
2916
+ * @description Only fire when total volume ≤ this value (USD).
2917
+ */
2918
+ max_volume_usd?: number | null;
2919
+ /**
2920
+ * Format: double
2921
+ * @description Only fire when buy volume in the market ≥ this value (USD).
2922
+ */
2923
+ min_buy_usd?: number | null;
2924
+ /**
2925
+ * Format: double
2926
+ * @description Only fire when sell volume in the market ≥ this value (USD).
2927
+ */
2928
+ min_sell_volume_usd?: number | null;
2929
+ /** @description Restrict to these PnL windows. */
2930
+ timeframes?: components["schemas"]["PnlFilterTimeframe"][] | null;
2931
+ /** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
2932
+ exclude_shortterm_markets?: boolean | null;
2933
+ };
2934
+ /** @description Subscription filters for the `trader_new_market` event. All fields are optional. */
2935
+ TraderNewMarketFilters: {
2936
+ /** @description Only fire for these wallet addresses (lowercase). Empty = all traders. */
2937
+ wallet_addresses?: string[] | null;
2938
+ /** @description Restrict to these markets. */
2939
+ condition_ids?: string[] | null;
2940
+ /** @description Restrict to markets belonging to these events. */
2941
+ event_slugs?: string[] | null;
2942
+ /**
2943
+ * Format: double
2944
+ * @description Minimum trade size in USD. Omit to match all sizes.
2945
+ */
2946
+ min_usd_value?: number | null;
2947
+ /**
2948
+ * Format: double
2949
+ * @description Only fire when the outcome probability is ≥ this value.
2950
+ */
2951
+ min_probability?: number | null;
2952
+ /**
2953
+ * Format: double
2954
+ * @description Only fire when the outcome probability is ≤ this value.
2955
+ */
2956
+ max_probability?: number | null;
2957
+ /** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
2958
+ exclude_shortterm_markets?: boolean | null;
2959
+ };
2960
+ /** @description Subscription filters for the `trader_new_trade` event. All fields are optional. */
2961
+ TraderNewTradeFilters: {
2962
+ /** @description Only fire for trades by these wallet addresses. Empty = all traders. */
2963
+ wallet_addresses?: string[] | null;
2964
+ /** @description Restrict to these markets. */
2965
+ condition_ids?: string[] | null;
2966
+ /** @description Restrict to markets belonging to these events. */
2967
+ event_slugs?: string[] | null;
2968
+ /**
2969
+ * Format: double
2970
+ * @description Minimum trade size in USD. Defaults to 0 (matches all trades).
2971
+ * @default 0
2972
+ */
2973
+ min_usd_value: number | null;
2974
+ /**
2975
+ * Format: double
2976
+ * @description Only fire when outcome probability is ≥ this value.
2977
+ */
2978
+ min_probability?: number | null;
2979
+ /**
2980
+ * Format: double
2981
+ * @description Only fire when outcome probability is ≤ this value.
2982
+ */
2983
+ max_probability?: number | null;
2984
+ /** @description Only fire for these fill-style trade types. Empty = OrderFilled and OrdersMatched only (default). */
2985
+ trade_types?: ("OrderFilled" | "OrdersMatched")[] | null;
2986
+ /** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
2987
+ exclude_shortterm_markets?: boolean | null;
2988
+ };
2989
+ /**
2990
+ * @description Subscription filters for the `trader_trade_event` event. All fields are optional.
2991
+ * `event_slugs` and `exclude_shortterm_markets` require explicit `trade_types` that
2992
+ * exclude `PositionsConverted`, because conversion events do not currently carry
2993
+ * `event_slug` in the typed webhook payload.
2994
+ */
2995
+ TraderTradeEventFilters: {
2996
+ /** @description Only fire for events associated with these wallet addresses. Empty = all traders. */
2997
+ wallet_addresses?: string[] | null;
2998
+ /** @description Restrict to these markets. For `PositionsConverted`, this also matches the NegRisk `market_id`. */
2999
+ condition_ids?: string[] | null;
3000
+ /** @description Restrict to markets belonging to these events. Requires explicit `trade_types` that exclude `PositionsConverted`. */
3001
+ event_slugs?: string[] | null;
3002
+ /**
3003
+ * Format: double
3004
+ * @description Minimum USD amount for the underlying event. Defaults to 0 (matches all events).
3005
+ * @default 0
3006
+ */
3007
+ min_usd_value: number | null;
3008
+ /**
3009
+ * Format: double
3010
+ * @description Only fire when event probability is ≥ this value. Events without probability data do not match.
3011
+ */
3012
+ min_probability?: number | null;
3013
+ /**
3014
+ * Format: double
3015
+ * @description Only fire when event probability is ≤ this value. Events without probability data do not match.
3016
+ */
3017
+ max_probability?: number | null;
3018
+ /** @description Only fire for these trade types. Empty = all supported trade-event variants. */
3019
+ trade_types?: ("OrderFilled" | "Redemption" | "Merge" | "Split" | "Cancelled" | "PositionsConverted" | "OrdersMatched" | "Initialization" | "Proposal" | "Dispute" | "Settled" | "Resolution" | "ConditionResolution" | "Reset" | "Flag" | "Unflag" | "Pause" | "Unpause" | "ManualResolution" | "NegRiskOutcomeReported" | "RegisterToken" | "Approval")[] | null;
3020
+ /** @description When `true`, suppress webhooks for short-term "updown" markets. Requires explicit `trade_types` that exclude `PositionsConverted`. Default: `false`. */
3021
+ exclude_shortterm_markets?: boolean | null;
3022
+ };
3023
+ /** @description Subscription filters for the `trader_whale_trade` event. All fields are optional. */
3024
+ TraderWhaleTradeFilters: {
3025
+ /** @description Only fire for trades by these wallet addresses. Empty = all traders. */
3026
+ wallet_addresses?: string[] | null;
3027
+ /** @description Restrict to these markets. */
3028
+ condition_ids?: string[] | null;
3029
+ /** @description Restrict to markets belonging to these events. */
3030
+ event_slugs?: string[] | null;
3031
+ /**
3032
+ * Format: double
3033
+ * @description Minimum trade size in USD. Defaults to 0 (matches all trades).
3034
+ * @default 0
3035
+ */
3036
+ min_usd_value: number | null;
3037
+ /**
3038
+ * Format: double
3039
+ * @description Only fire when outcome probability is ≥ this value.
3040
+ */
3041
+ min_probability?: number | null;
3042
+ /**
3043
+ * Format: double
3044
+ * @description Only fire when outcome probability is ≤ this value.
3045
+ */
3046
+ max_probability?: number | null;
3047
+ /** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
3048
+ exclude_shortterm_markets?: boolean | null;
3049
+ };
2095
3050
  /** @description Request body for updating a webhook */
2096
3051
  UpdateWebhookRequestBody: {
2097
3052
  /** @description Destination URL for webhook deliveries (must be HTTPS) */
@@ -2104,20 +3059,24 @@ export interface components {
2104
3059
  /** @description Description/name */
2105
3060
  description?: string | null;
2106
3061
  };
2107
- /** @description Payload delivered when a market's trading volume crosses a USD milestone in the specified timeframe */
3062
+ /** @description Volume milestone webhook payload */
2108
3063
  VolumeMilestonePayload: {
2109
- /** @description Market condition ID */
2110
3064
  condition_id: string;
3065
+ timeframe: string;
2111
3066
  /**
2112
- * @description Aggregation window that crossed the milestone
2113
- * @enum {string}
3067
+ * Format: double
3068
+ * @description Milestone amount reached (USD)
2114
3069
  */
2115
- timeframe: "1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d";
2116
- /** @description The USD milestone amount that was crossed */
2117
3070
  milestone_usd: number;
2118
- /** @description Current volume at time of trigger (USD) */
3071
+ /**
3072
+ * Format: double
3073
+ * @description Current volume (USD) that triggered the milestone
3074
+ */
2119
3075
  current_volume_usd: number;
2120
- /** @description Total fees in USD for this timeframe */
3076
+ /**
3077
+ * Format: double
3078
+ * @description Total fees collected in this timeframe
3079
+ */
2121
3080
  fees: number;
2122
3081
  /**
2123
3082
  * Format: int64
@@ -2125,6 +3084,12 @@ export interface components {
2125
3084
  */
2126
3085
  txns: number;
2127
3086
  };
3087
+ /**
3088
+ * @description Aggregation windows accepted by `*_volume_spike.timeframes`. Includes `1d`
3089
+ * in addition to the metric set.
3090
+ * @enum {string}
3091
+ */
3092
+ VolumeSpikeFilterTimeframe: "1m" | "5m" | "30m" | "1h" | "6h" | "1d" | "24h" | "7d" | "30d";
2128
3093
  /**
2129
3094
  * @description Crypto asset symbols accepted by `asset_price_tick` and `asset_price_window_update` filters.
2130
3095
  * @enum {string}
@@ -2140,7 +3105,7 @@ export interface components {
2140
3105
  * @description Category grouping for the event type
2141
3106
  * @enum {string}
2142
3107
  */
2143
- category: "trader" | "trade" | "market" | "event" | "position" | "assets";
3108
+ category: "trader" | "trade" | "market" | "event" | "tag" | "position" | "assets";
2144
3109
  /**
2145
3110
  * Format: int64
2146
3111
  * @description Millicredits consumed per webhook delivery (1 credit = 1000 mc)
@@ -2367,7 +3332,10 @@ export interface components {
2367
3332
  condition_id?: string | null;
2368
3333
  /** @description Outcome name (e.g. "Yes", "No") */
2369
3334
  outcome?: string | null;
2370
- /** @description Outcome index: 0 = Yes/Up, 1 = No */
3335
+ /**
3336
+ * Format: int32
3337
+ * @description Outcome index: 0 = Yes/Up, 1 = No
3338
+ */
2371
3339
  outcome_index?: number | null;
2372
3340
  /** @description Market question text */
2373
3341
  question?: string | null;
@@ -2375,6 +3343,8 @@ export interface components {
2375
3343
  market_slug?: string | null;
2376
3344
  /** @description Parent event slug */
2377
3345
  event_slug?: string | null;
3346
+ /** @description Market image URL */
3347
+ image_url?: string | null;
2378
3348
  /** @description Unique trade identifier */
2379
3349
  trade_id: string;
2380
3350
  /** @description Transaction hash */
@@ -2389,30 +3359,36 @@ export interface components {
2389
3359
  * @description Block confirmation timestamp (Unix seconds)
2390
3360
  */
2391
3361
  confirmed_at: number;
2392
- /** @description USD size of the trade (6 decimal places) */
3362
+ /**
3363
+ * Format: double
3364
+ * @description USD size of the trade (6 decimal places)
3365
+ */
2393
3366
  amount_usd: number;
2394
- /** @description Outcome shares traded (6 decimal places) */
3367
+ /**
3368
+ * Format: double
3369
+ * @description Outcome shares traded (6 decimal places)
3370
+ */
2395
3371
  shares_amount: number;
2396
- /** @description Fee paid in USD (6 decimal places) */
2397
- fee: number;
2398
3372
  /**
2399
- * @description Trade direction
2400
- * @enum {string}
3373
+ * Format: double
3374
+ * @description Fee paid in USD (6 decimal places)
2401
3375
  */
3376
+ fee: number;
3377
+ /** @description Trade direction */
2402
3378
  side: "Buy" | "Sell";
2403
- /** @description Outcome token price (0.0–1.0) */
2404
- price: number;
2405
- /** @description Implied probability (0.0–1.0); null when outcome is unknown */
2406
- probability?: number | null;
2407
3379
  /**
2408
- * @description Exchange contract that processed the trade
2409
- * @enum {string}
3380
+ * Format: double
3381
+ * @description Outcome token price (0.0–1.0)
2410
3382
  */
2411
- exchange: "CTFExchange" | "NegRiskExchange" | "ConditionalTokens" | "NegRiskAdapter" | "Unknown";
3383
+ price: number;
2412
3384
  /**
2413
- * @description Trade type (webhook events only fire on order fills)
2414
- * @enum {string}
3385
+ * Format: double
3386
+ * @description Implied probability (0.0–1.0); null when outcome is unknown
2415
3387
  */
3388
+ probability?: number | null;
3389
+ /** @description Exchange contract that processed the trade */
3390
+ exchange: "CTFExchange" | "NegRiskExchange" | "ConditionalTokens" | "NegRiskAdapter" | "CTFExchangeV2" | "NegRiskExchangeV2" | "Unknown";
3391
+ /** @description Trade type (webhook events only fire on order fills) */
2416
3392
  trade_type: "OrderFilled" | "OrdersMatched";
2417
3393
  };
2418
3394
  /** @description Outer envelope for every webhook HTTP POST delivery. The `data` field contains the event-specific payload. Delivery headers sent with every POST: `X-Webhook-ID` (subscription UUID), `X-Delivery-ID` (this attempt's UUID), `X-Event-Type` (event name string, e.g. `trader_first_trade`), `X-Attempt` (attempt number, 1-indexed). When the webhook has a secret configured, `X-Webhook-Signature: sha256=<hmac-hex>` is also included — compute HMAC-SHA256 over the raw request body using your secret to verify. */
@@ -2529,7 +3505,7 @@ export interface components {
2529
3505
  */
2530
3506
  exchange: "CTFExchange" | "NegRiskExchange" | "ConditionalTokens" | "NegRiskAdapter" | "Unknown";
2531
3507
  /** @enum {string} */
2532
- trade_type: "MakerRebate" | "Reward";
3508
+ trade_type: "MakerRebate" | "Reward" | "Yield";
2533
3509
  } | {
2534
3510
  id: string;
2535
3511
  hash: string;
@@ -2834,534 +3810,99 @@ export interface components {
2834
3810
  /** Format: int64 */
2835
3811
  block_index: number;
2836
3812
  oracle_contract: string;
2837
- condition_id: string;
2838
- oracle: string;
2839
- proposed_outcome?: string;
2840
- question?: string;
2841
- image_url?: string;
2842
- slug?: string;
2843
- event_slug?: string;
2844
- /** @enum {string} */
2845
- trade_type: "ConditionResolution";
2846
- } | {
2847
- id: string;
2848
- hash: string;
2849
- /** Format: int64 */
2850
- block: number;
2851
- /** Format: int64 */
2852
- confirmed_at: number;
2853
- /** Format: int64 */
2854
- log_index: number;
2855
- /** Format: int64 */
2856
- block_index: number;
2857
- oracle_contract: string;
2858
- condition_id: string;
2859
- question?: string;
2860
- image_url?: string;
2861
- slug?: string;
2862
- event_slug?: string;
2863
- /** @enum {string} */
2864
- trade_type: "Reset" | "Flag" | "Unflag" | "Pause" | "Unpause";
2865
- } | {
2866
- id: string;
2867
- hash: string;
2868
- /** Format: int64 */
2869
- block: number;
2870
- /** Format: int64 */
2871
- confirmed_at: number;
2872
- /** Format: int64 */
2873
- log_index: number;
2874
- /** Format: int64 */
2875
- block_index: number;
2876
- oracle_contract: string;
2877
- condition_id: string;
2878
- proposed_outcome?: string;
2879
- question?: string;
2880
- image_url?: string;
2881
- slug?: string;
2882
- event_slug?: string;
2883
- /** @enum {string} */
2884
- trade_type: "ManualResolution";
2885
- } | {
2886
- id: string;
2887
- hash: string;
2888
- /** Format: int64 */
2889
- block: number;
2890
- /** Format: int64 */
2891
- confirmed_at: number;
2892
- /** Format: int64 */
2893
- log_index: number;
2894
- /** Format: int64 */
2895
- block_index: number;
2896
- oracle_contract: string;
2897
- condition_id: string;
2898
- proposed_outcome?: string;
2899
- question?: string;
2900
- image_url?: string;
2901
- slug?: string;
2902
- event_slug?: string;
2903
- /** @enum {string} */
2904
- trade_type: "NegRiskOutcomeReported";
2905
- } | {
2906
- id: string;
2907
- hash: string;
2908
- /** Format: int64 */
2909
- block: number;
2910
- /** Format: int64 */
2911
- confirmed_at: number;
2912
- /** Format: int64 */
2913
- log_index: number;
2914
- /** Format: int64 */
2915
- block_index: number;
2916
- condition_id: string;
2917
- token0: string;
2918
- token1: string;
2919
- question?: string;
2920
- image_url?: string;
2921
- slug?: string;
2922
- event_slug?: string;
2923
- /**
2924
- * @description Exchange contract that processed the event
2925
- * @enum {string}
2926
- */
2927
- exchange: "CTFExchange" | "NegRiskExchange" | "ConditionalTokens" | "NegRiskAdapter" | "Unknown";
2928
- /** @enum {string} */
2929
- trade_type: "RegisterToken";
2930
- } | {
2931
- id: string;
2932
- hash: string;
2933
- /** Format: int64 */
2934
- block: number;
2935
- /** Format: int64 */
2936
- confirmed_at: number;
2937
- /** Format: int64 */
2938
- log_index: number;
2939
- /** Format: int64 */
2940
- block_index: number;
2941
- trader: {
2942
- address: string;
2943
- name: string | null;
2944
- pseudonym: string | null;
2945
- profile_image: string | null;
2946
- x_username: string | null;
2947
- verified_badge: boolean;
2948
- };
2949
- operator: string;
2950
- approved: boolean;
2951
- question?: string;
2952
- image_url?: string;
2953
- slug?: string;
2954
- event_slug?: string;
2955
- /**
2956
- * @description Exchange contract that processed the event
2957
- * @enum {string}
2958
- */
2959
- exchange: "CTFExchange" | "NegRiskExchange" | "ConditionalTokens" | "NegRiskAdapter" | "Unknown";
2960
- /** @enum {string} */
2961
- trade_type: "Approval";
2962
- };
2963
- /** @description Subscription filters for the `trader_first_trade` event. All fields are optional. */
2964
- TraderFirstTradeFilters: {
2965
- /** @description Only fire for trades by these wallet addresses (lowercase). Empty = all traders. */
2966
- wallet_addresses?: string[];
2967
- /** @description Restrict to trades in these markets. Empty = all markets. */
2968
- condition_ids?: string[];
2969
- /** @description Restrict to trades in markets belonging to these events. */
2970
- event_slugs?: string[];
2971
- /** @description Minimum trade size in USD. Omit to match all sizes. */
2972
- min_usd_value?: number;
2973
- /** @description Only fire when the outcome probability is ≥ this value. */
2974
- min_probability?: number;
2975
- /** @description Only fire when the outcome probability is ≤ this value. */
2976
- max_probability?: number;
2977
- /** @description When `true`, suppress webhooks for short-term "updown" markets (event slugs containing `updown`). Default: `false`. */
2978
- exclude_shortterm_markets?: boolean;
2979
- };
2980
- /** @description Subscription filters for the `trader_new_market` event. All fields are optional. */
2981
- TraderNewMarketFilters: {
2982
- /** @description Only fire for these wallet addresses (lowercase). Empty = all traders. */
2983
- wallet_addresses?: string[];
2984
- /** @description Restrict to these markets. */
2985
- condition_ids?: string[];
2986
- /** @description Restrict to markets belonging to these events. */
2987
- event_slugs?: string[];
2988
- /** @description Minimum trade size in USD. Omit to match all sizes. */
2989
- min_usd_value?: number;
2990
- /** @description Only fire when the outcome probability is ≥ this value. */
2991
- min_probability?: number;
2992
- /** @description Only fire when the outcome probability is ≤ this value. */
2993
- max_probability?: number;
2994
- /** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
2995
- exclude_shortterm_markets?: boolean;
2996
- };
2997
- /** @description Subscription filters for the `trader_whale_trade` event. All fields are optional. */
2998
- TraderWhaleTradeFilters: {
2999
- /** @description Only fire for trades by these wallet addresses. Empty = all traders. */
3000
- wallet_addresses?: string[];
3001
- /** @description Restrict to these markets. */
3002
- condition_ids?: string[];
3003
- /** @description Restrict to markets belonging to these events. */
3004
- event_slugs?: string[];
3005
- /**
3006
- * @description Minimum trade size in USD. Defaults to 0 (matches all trades).
3007
- * @default 0
3008
- */
3009
- min_usd_value: number;
3010
- /** @description Only fire when outcome probability is ≥ this value. */
3011
- min_probability?: number;
3012
- /** @description Only fire when outcome probability is ≤ this value. */
3013
- max_probability?: number;
3014
- /** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
3015
- exclude_shortterm_markets?: boolean;
3016
- };
3017
- /** @description Subscription filters for the `trader_new_trade` event. All fields are optional. */
3018
- TraderNewTradeFilters: {
3019
- /** @description Only fire for trades by these wallet addresses. Empty = all traders. */
3020
- wallet_addresses?: string[];
3021
- /** @description Restrict to these markets. */
3022
- condition_ids?: string[];
3023
- /** @description Restrict to markets belonging to these events. */
3024
- event_slugs?: string[];
3025
- /**
3026
- * @description Minimum trade size in USD. Defaults to 0 (matches all trades).
3027
- * @default 0
3028
- */
3029
- min_usd_value: number;
3030
- /** @description Only fire when outcome probability is ≥ this value. */
3031
- min_probability?: number;
3032
- /** @description Only fire when outcome probability is ≤ this value. */
3033
- max_probability?: number;
3034
- /** @description Only fire for these fill-style trade types. Empty = OrderFilled and OrdersMatched only (default). */
3035
- trade_types?: ("OrderFilled" | "OrdersMatched")[];
3036
- /** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
3037
- exclude_shortterm_markets?: boolean;
3038
- };
3039
- /** @description Subscription filters for the `trader_trade_event` event. All fields are optional. `event_slugs` and `exclude_shortterm_markets` require explicit `trade_types` that exclude `PositionsConverted`, because conversion events do not currently carry `event_slug` in the typed webhook payload. */
3040
- TraderTradeEventFilters: {
3041
- /** @description Only fire for events associated with these wallet addresses. Empty = all traders. */
3042
- wallet_addresses?: string[];
3043
- /** @description Restrict to these markets. For `PositionsConverted`, this also matches the NegRisk `market_id`. */
3044
- condition_ids?: string[];
3045
- /** @description Restrict to markets belonging to these events. Requires explicit `trade_types` that exclude `PositionsConverted`. */
3046
- event_slugs?: string[];
3047
- /**
3048
- * @description Minimum USD amount for the underlying event. Defaults to 0 (matches all events).
3049
- * @default 0
3050
- */
3051
- min_usd_value: number;
3052
- /** @description Only fire when event probability is ≥ this value. Events without probability data do not match. */
3053
- min_probability?: number;
3054
- /** @description Only fire when event probability is ≤ this value. Events without probability data do not match. */
3055
- max_probability?: number;
3056
- /** @description Only fire for these trade types. Empty = all supported trade-event variants. */
3057
- trade_types?: ("OrderFilled" | "Redemption" | "Merge" | "Split" | "Cancelled" | "PositionsConverted" | "OrdersMatched" | "MakerRebate" | "Reward" | "Initialization" | "Proposal" | "Dispute" | "Settled" | "Resolution" | "ConditionResolution" | "Reset" | "Flag" | "Unflag" | "Pause" | "Unpause" | "ManualResolution" | "NegRiskOutcomeReported" | "RegisterToken" | "Approval")[];
3058
- /** @description When `true`, suppress webhooks for short-term "updown" markets. Requires explicit `trade_types` that exclude `PositionsConverted`. Default: `false`. */
3059
- exclude_shortterm_markets?: boolean;
3060
- };
3061
- /** @description Subscription filters for the `trader_global_pnl` event. All fields are optional. */
3062
- TraderGlobalPnlFilters: {
3063
- /** @description Track only these trader wallet addresses. Empty = all traders. */
3064
- traders?: string[];
3065
- /** @description Only fire when realized PnL ≥ this value (USD). Use negative values for loss thresholds. */
3066
- min_realized_pnl_usd?: number;
3067
- /** @description Only fire when realized PnL ≤ this value (USD). */
3068
- max_realized_pnl_usd?: number;
3069
- /** @description Only fire when total trading volume ≥ this value (USD). */
3070
- min_volume_usd?: number;
3071
- /** @description Only fire when total trading volume ≤ this value (USD). */
3072
- max_volume_usd?: number;
3073
- /** @description Only fire when buy volume ≥ this value (USD). */
3074
- min_buy_usd?: number;
3075
- /** @description Only fire when sell volume ≥ this value (USD). */
3076
- min_sell_volume_usd?: number;
3077
- /** @description Only fire when market win rate ≥ this percentage (0.0–100.0). */
3078
- min_win_rate?: number;
3079
- /**
3080
- * Format: int64
3081
- * @description Only fire when the trader has traded in ≥ this many markets.
3082
- */
3083
- min_markets_traded?: number;
3084
- /** @description Restrict to these PnL windows. Empty = all windows. */
3085
- timeframes?: ("1d" | "7d" | "30d" | "lifetime")[];
3086
- };
3087
- /** @description Subscription filters for the `trader_market_pnl` event. All fields are optional. */
3088
- TraderMarketPnlFilters: {
3089
- /** @description Track only these trader wallet addresses. */
3090
- traders?: string[];
3091
- /** @description Restrict to these markets. */
3092
- condition_ids?: string[];
3093
- /** @description Restrict to markets in these events. */
3094
- event_slugs?: string[];
3095
- /** @description Only fire when per-market realized PnL ≥ this value (USD). */
3096
- min_realized_pnl_usd?: number;
3097
- /** @description Only fire when per-market realized PnL ≤ this value (USD). */
3098
- max_realized_pnl_usd?: number;
3099
- /** @description Only fire when total volume (buy + sell + redemption + merge) ≥ this value (USD). */
3100
- min_volume_usd?: number;
3101
- /** @description Only fire when total volume ≤ this value (USD). */
3102
- max_volume_usd?: number;
3103
- /** @description Only fire when buy volume in the market ≥ this value (USD). */
3104
- min_buy_usd?: number;
3105
- /** @description Only fire when sell volume in the market ≥ this value (USD). */
3106
- min_sell_volume_usd?: number;
3107
- /** @description Restrict to these PnL windows. */
3108
- timeframes?: ("1d" | "7d" | "30d" | "lifetime")[];
3109
- /** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
3110
- exclude_shortterm_markets?: boolean;
3111
- };
3112
- /** @description Subscription filters for the `trader_event_pnl` event. All fields are optional. */
3113
- TraderEventPnlFilters: {
3114
- /** @description Track only these trader wallet addresses. */
3115
- traders?: string[];
3116
- /** @description Restrict to these events. */
3117
- event_slugs?: string[];
3118
- /** @description Only fire when per-event realized PnL ≥ this value (USD). */
3119
- min_realized_pnl_usd?: number;
3120
- /** @description Only fire when per-event realized PnL ≤ this value (USD). */
3121
- max_realized_pnl_usd?: number;
3122
- /** @description Only fire when total event volume ≥ this value (USD). */
3123
- min_volume_usd?: number;
3124
- /** @description Only fire when total event volume ≤ this value (USD). */
3125
- max_volume_usd?: number;
3126
- /** @description Only fire when buy volume within the event ≥ this value (USD). */
3127
- min_buy_usd?: number;
3128
- /** @description Only fire when sell volume within the event ≥ this value (USD). */
3129
- min_sell_volume_usd?: number;
3130
- /**
3131
- * Format: int64
3132
- * @description Only fire when the trader has traded in ≥ this many markets within the event.
3133
- */
3134
- min_markets_traded?: number;
3135
- /** @description Restrict to these PnL windows. */
3136
- timeframes?: ("1d" | "7d" | "30d" | "lifetime")[];
3137
- /** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
3138
- exclude_shortterm_markets?: boolean;
3139
- };
3140
- /** @description Subscription filters for the `condition_metrics` event. All fields are optional. */
3141
- MarketMetricsFilters: {
3142
- /** @description Restrict to these markets. Empty = all markets. */
3143
- condition_ids?: string[];
3144
- /** @description Restrict to these aggregation windows. Empty = all windows. */
3145
- timeframes?: ("1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d")[];
3146
- /** @description Only fire when volume ≥ this value (USD). */
3147
- min_volume_usd?: number;
3148
- /** @description Only fire when volume ≤ this value (USD). */
3149
- max_volume_usd?: number;
3150
- /**
3151
- * Format: int64
3152
- * @description Only fire when transaction count ≥ this value.
3153
- */
3154
- min_txns?: number;
3155
- /**
3156
- * Format: int64
3157
- * @description Only fire when unique trader count ≥ this value.
3158
- */
3159
- min_unique_traders?: number;
3160
- /** @description Only fire when total fees ≥ this value (USD). */
3161
- min_fees?: number;
3162
- };
3163
- /** @description Subscription filters for the `event_metrics` event. All fields are optional. */
3164
- EventMetricsFilters: {
3165
- /** @description Restrict to these events. Empty = all events. */
3166
- event_slugs?: string[];
3167
- /** @description Restrict to these aggregation windows. */
3168
- timeframes?: ("1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d")[];
3169
- /** @description Only fire when aggregated event volume ≥ this value (USD). */
3170
- min_volume_usd?: number;
3171
- max_volume_usd?: number;
3813
+ condition_id: string;
3814
+ oracle: string;
3815
+ proposed_outcome?: string;
3816
+ question?: string;
3817
+ image_url?: string;
3818
+ slug?: string;
3819
+ event_slug?: string;
3820
+ /** @enum {string} */
3821
+ trade_type: "ConditionResolution";
3822
+ } | {
3823
+ id: string;
3824
+ hash: string;
3172
3825
  /** Format: int64 */
3173
- min_txns?: number;
3826
+ block: number;
3174
3827
  /** Format: int64 */
3175
- min_unique_traders?: number;
3176
- min_fees?: number;
3177
- /** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
3178
- exclude_shortterm_markets?: boolean;
3179
- };
3180
- /** @description Subscription filters for the `position_metrics` event. All fields are optional. */
3181
- PositionMetricsFilters: {
3182
- /** @description Restrict to these outcome token IDs. */
3183
- position_ids?: string[];
3184
- /** @description Restrict to positions within these markets. */
3185
- condition_ids?: string[];
3186
- /** @description Restrict to positions with these outcome names (e.g. ["Yes", "No"]). */
3187
- outcomes?: string[];
3188
- /** @description Restrict to these aggregation windows. */
3189
- timeframes?: ("1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d")[];
3190
- /** @description Only fire when position volume ≥ this value (USD). */
3191
- min_volume_usd?: number;
3192
- max_volume_usd?: number;
3193
- min_buy_usd?: number;
3194
- min_sell_volume_usd?: number;
3195
- /** Format: int64 */
3196
- min_txns?: number;
3197
- /** Format: int64 */
3198
- min_unique_traders?: number;
3199
- /** @description Only fire when price change % ≥ this value. */
3200
- min_price_change_pct?: number;
3201
- /** @description Only fire when probability change % ≥ this value. */
3202
- min_probability_change_pct?: number;
3203
- min_fees?: number;
3204
- };
3205
- /** @description Subscription filters for the `market_volume_milestone` event. */
3206
- MarketVolumeMilestoneFilters: {
3207
- /** @description **Required.** Aggregation windows to monitor (e.g. ["1h", "24h"]). */
3208
- timeframes: ("1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d")[];
3209
- /** @description Restrict to these markets. Empty = all markets. */
3210
- condition_ids?: string[];
3211
- /** @description Specific USD milestones to trigger on (e.g. [10000, 100000, 1000000]). Empty = all milestones. */
3212
- milestone_amounts?: number[];
3213
- };
3214
- /** @description Subscription filters for the `event_volume_milestone` event. */
3215
- EventVolumeMilestoneFilters: {
3216
- /** @description **Required.** Aggregation windows to monitor. */
3217
- timeframes: ("1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d")[];
3218
- /** @description Restrict to these events. */
3219
- event_slugs?: string[];
3220
- /** @description Specific USD milestones to trigger on. */
3221
- milestone_amounts?: number[];
3222
- /** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
3223
- exclude_shortterm_markets?: boolean;
3224
- };
3225
- /** @description Subscription filters for the `position_volume_milestone` event. */
3226
- PositionVolumeMilestoneFilters: {
3227
- /** @description **Required.** Aggregation windows to monitor. */
3228
- timeframes: ("1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d")[];
3229
- /** @description Restrict to these outcome token IDs. */
3230
- position_ids?: string[];
3231
- /** @description Restrict to positions within these markets. */
3232
- condition_ids?: string[];
3233
- /** @description Specific USD milestones to trigger on. */
3234
- milestone_amounts?: number[];
3235
- };
3236
- /** @description Subscription filters for the `probability_spike` event. */
3237
- ProbabilitySpikeFilters: {
3238
- /** @description Restrict to specific outcome token IDs. Empty = all positions. */
3239
- position_ids?: string[];
3240
- /** @description Restrict to specific market condition IDs. Empty = all markets. */
3241
- condition_ids?: string[];
3242
- /** @description Restrict to specific events. Empty = all events. */
3243
- event_slugs?: string[];
3244
- /** @description Restrict to these outcome names (e.g. ["Yes", "No"]). */
3245
- outcomes?: string[];
3246
- /** @description Minimum probability percentage move to trigger (e.g. `10` for a 10% move). */
3247
- min_probability_change_pct?: number;
3248
- /**
3249
- * @description `"up"` = probability rising only (default when omitted), `"down"` = falling only, `"both"` = either direction.
3250
- * @enum {string}
3251
- */
3252
- spike_direction?: "up" | "down" | "both";
3253
- /** @description Observation window in seconds. The first trade in each window sets the reference price; subsequent trades are compared to it. E.g. `60` detects moves that occur within 60 seconds. */
3254
- window_secs?: number;
3255
- /** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
3256
- exclude_shortterm_markets?: boolean;
3257
- };
3258
- /** @description Subscription filters for the `price_spike` event. */
3259
- PriceSpikeFilters: {
3260
- /** @description Restrict to specific outcome token IDs. Empty = all positions. */
3261
- position_ids?: string[];
3262
- /** @description Restrict to specific market condition IDs. Empty = all markets. */
3263
- condition_ids?: string[];
3264
- /** @description Restrict to specific events. Empty = all events. */
3265
- event_slugs?: string[];
3266
- /** @description Restrict to these outcome names (e.g. ["Yes", "No"]). */
3267
- outcomes?: string[];
3268
- /** @description Minimum price percentage move to trigger (e.g. `10` for a 10% move). */
3269
- min_price_change_pct?: number;
3828
+ confirmed_at: number;
3829
+ /** Format: int64 */
3830
+ log_index: number;
3831
+ /** Format: int64 */
3832
+ block_index: number;
3833
+ oracle_contract: string;
3834
+ condition_id: string;
3835
+ question?: string;
3836
+ image_url?: string;
3837
+ slug?: string;
3838
+ event_slug?: string;
3839
+ /** @enum {string} */
3840
+ trade_type: "Reset" | "Flag" | "Unflag" | "Pause" | "Unpause";
3841
+ } | {
3842
+ id: string;
3843
+ hash: string;
3844
+ /** Format: int64 */
3845
+ block: number;
3846
+ /** Format: int64 */
3847
+ confirmed_at: number;
3848
+ /** Format: int64 */
3849
+ log_index: number;
3850
+ /** Format: int64 */
3851
+ block_index: number;
3852
+ oracle_contract: string;
3853
+ condition_id: string;
3854
+ proposed_outcome?: string;
3855
+ question?: string;
3856
+ image_url?: string;
3857
+ slug?: string;
3858
+ event_slug?: string;
3859
+ /** @enum {string} */
3860
+ trade_type: "ManualResolution";
3861
+ } | {
3862
+ id: string;
3863
+ hash: string;
3864
+ /** Format: int64 */
3865
+ block: number;
3866
+ /** Format: int64 */
3867
+ confirmed_at: number;
3868
+ /** Format: int64 */
3869
+ log_index: number;
3870
+ /** Format: int64 */
3871
+ block_index: number;
3872
+ oracle_contract: string;
3873
+ condition_id: string;
3874
+ proposed_outcome?: string;
3875
+ question?: string;
3876
+ image_url?: string;
3877
+ slug?: string;
3878
+ event_slug?: string;
3879
+ /** @enum {string} */
3880
+ trade_type: "NegRiskOutcomeReported";
3881
+ } | {
3882
+ id: string;
3883
+ hash: string;
3884
+ /** Format: int64 */
3885
+ block: number;
3886
+ /** Format: int64 */
3887
+ confirmed_at: number;
3888
+ /** Format: int64 */
3889
+ log_index: number;
3890
+ /** Format: int64 */
3891
+ block_index: number;
3892
+ condition_id: string;
3893
+ token0: string;
3894
+ token1: string;
3895
+ question?: string;
3896
+ image_url?: string;
3897
+ slug?: string;
3898
+ event_slug?: string;
3270
3899
  /**
3271
- * @description `"up"` = price rising only (default when omitted), `"down"` = falling only, `"both"` = either direction.
3900
+ * @description Exchange contract that processed the event
3272
3901
  * @enum {string}
3273
3902
  */
3274
- spike_direction?: "up" | "down" | "both";
3275
- /** @description Observation window in seconds. The first trade in each window sets the reference price; subsequent trades are compared to it. E.g. `60` detects moves that occur within 60 seconds. */
3276
- window_secs?: number;
3277
- /** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
3278
- exclude_shortterm_markets?: boolean;
3279
- };
3280
- /** @description Subscription filters for the `market_volume_spike` event. `spike_ratio` is required. */
3281
- MarketVolumeSpikeFilters: {
3282
- /** @description **Required.** Multiplier threshold (must be > 1.0). Fires when current volume >= snapshot × ratio. The snapshot is set automatically on first data and resets after each fire. */
3283
- spike_ratio: number;
3284
- /** @description Force snapshot reset after this many seconds (max 600 / 10 minutes). */
3285
- window_secs?: number;
3286
- /** @description Restrict to these markets. Empty = all markets. */
3287
- condition_ids?: string[];
3288
- /** @description Restrict to these aggregation windows. Empty = all windows. */
3289
- timeframes?: ("1m" | "5m" | "30m" | "1h" | "6h" | "1d" | "24h" | "7d" | "30d")[];
3290
- };
3291
- /** @description Subscription filters for the `event_volume_spike` event. `spike_ratio` is required. */
3292
- EventVolumeSpikeFilters: {
3293
- /** @description **Required.** Multiplier threshold (must be > 1.0). Fires when current volume >= snapshot × ratio. */
3294
- spike_ratio: number;
3295
- /** @description Force snapshot reset after this many seconds (max 600 / 10 minutes). */
3296
- window_secs?: number;
3297
- /** @description Restrict to these events. */
3298
- event_slugs?: string[];
3299
- /** @description Restrict to these aggregation windows. */
3300
- timeframes?: ("1m" | "5m" | "30m" | "1h" | "6h" | "1d" | "24h" | "7d" | "30d")[];
3301
- /** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
3302
- exclude_shortterm_markets?: boolean;
3303
- };
3304
- /** @description Subscription filters for the `position_volume_spike` event. `spike_ratio` is required. */
3305
- PositionVolumeSpikeFilters: {
3306
- /** @description **Required.** Multiplier threshold (must be > 1.0). Fires when current volume >= snapshot × ratio. */
3307
- spike_ratio: number;
3308
- /** @description Force snapshot reset after this many seconds (max 600 / 10 minutes). */
3309
- window_secs?: number;
3310
- /** @description Restrict to these outcome token IDs. */
3311
- position_ids?: string[];
3312
- /** @description Restrict to positions within these markets. */
3313
- condition_ids?: string[];
3314
- /** @description Restrict to these outcome names. */
3315
- outcomes?: string[];
3316
- /** @description Restrict to these aggregation windows. */
3317
- timeframes?: ("1m" | "5m" | "30m" | "1h" | "6h" | "1d" | "24h" | "7d" | "30d")[];
3318
- };
3319
- /** @description Subscription filters for the `close_to_bond` event. At least one of `min_probability` or `max_probability` is required. */
3320
- CloseToBondFilters: {
3321
- /** @description Trigger when the YES outcome price is ≥ this value (e.g. 0.95 for 95% certainty). At least one of `min_probability` or `max_probability` must be set. */
3322
- min_probability?: number;
3323
- /** @description Trigger when the YES outcome price is ≤ this value (e.g. 0.05 for near-certain NO). */
3324
- max_probability?: number;
3325
- /** @description Restrict to these markets. */
3326
- condition_ids?: string[];
3327
- /** @description Restrict to these outcome token IDs. */
3328
- position_ids?: string[];
3329
- /** @description Restrict to markets in these events. */
3330
- event_slugs?: string[];
3331
- /** @description Restrict to these outcome names (e.g. ["Yes", "No"]). */
3332
- outcomes?: string[];
3333
- /** @description Restrict by outcome index. 0 = Yes/Up, 1 = No. Position 0 usually represents the Up/Yes side in binary markets. */
3334
- position_outcome_indices?: number[];
3335
- /** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
3336
- exclude_shortterm_markets?: boolean;
3337
- } | unknown | unknown;
3338
- /** @description Subscription filters for the `market_created` event. All fields are optional. */
3339
- MarketCreatedFilters: {
3340
- /** @description Restrict to markets with these tags or category names (case-insensitive match). */
3341
- tags?: string[];
3342
- /** @description Restrict to markets belonging to these events. */
3343
- event_slugs?: string[];
3344
- /** @description When `true`, suppress webhooks for short-term "updown" markets (event slugs containing `updown`). Default: `false`. */
3345
- exclude_shortterm_markets?: boolean;
3346
- };
3347
- /** @description Subscription filters for the `oracle_events` event. All fields are optional. */
3348
- OracleEventsFilters: {
3349
- /** @description Restrict to these event types (case-insensitive). Empty = all. */
3350
- oracle_event_types?: ("AssertionMade" | "AssertionDisputed" | "AssertionSettled" | "RequestPrice" | "ProposePrice" | "DisputePrice" | "Settle" | "QuestionResolved" | "QuestionEmergencyResolved" | "QuestionReset" | "QuestionInitialized" | "QuestionPaused" | "QuestionUnpaused" | "QuestionFlagged" | "QuestionUnflagged" | "ConditionResolution" | "NegRiskOutcomeReported")[];
3351
- /** @description Restrict to events for these condition IDs. */
3352
- condition_ids?: string[];
3353
- };
3354
- /** @description Subscription filters for the `asset_price_tick` event. All fields are optional. */
3355
- AssetPriceTickFilters: {
3356
- /** @description Restrict to these crypto assets. Empty = all assets. */
3357
- asset_symbols?: ("BTC" | "ETH" | "SOL" | "XRP" | "DOGE" | "BNB" | "HYPE")[];
3358
- };
3359
- /** @description Subscription filters for the `asset_price_window_update` event. All fields are optional. */
3360
- AssetPriceWindowUpdateFilters: {
3361
- /** @description Restrict to these crypto assets. Empty = all assets. */
3362
- asset_symbols?: ("BTC" | "ETH" | "SOL" | "XRP" | "DOGE" | "BNB" | "HYPE")[];
3363
- /** @description Restrict to these candle sizes. Empty = all sizes. */
3364
- timeframes?: ("5m" | "15m" | "1h" | "4h" | "1d" | "24h")[];
3903
+ exchange: "CTFExchange" | "NegRiskExchange" | "ConditionalTokens" | "NegRiskAdapter" | "Unknown";
3904
+ /** @enum {string} */
3905
+ trade_type: "RegisterToken";
3365
3906
  };
3366
3907
  };
3367
3908
  responses: never;
@@ -4113,6 +4654,49 @@ export interface operations {
4113
4654
  };
4114
4655
  };
4115
4656
  };
4657
+ "tag-metrics": {
4658
+ parameters: {
4659
+ query?: never;
4660
+ header: {
4661
+ /** @description UUID of the webhook subscription that fired */
4662
+ "X-Webhook-ID": string;
4663
+ /** @description UUID of this specific delivery attempt (matches envelope `id` field) */
4664
+ "X-Delivery-ID": string;
4665
+ /** @description Event name string (e.g. `trader_first_trade`) */
4666
+ "X-Event-Type": string;
4667
+ /** @description Delivery attempt number (1 = first attempt) */
4668
+ "X-Attempt": number;
4669
+ /** @description HMAC-SHA256 of the raw request body: `sha256=<hex>`. Present only when the webhook has a secret configured. Verify with: HMAC-SHA256(secret, raw_body_bytes) == hex_part. */
4670
+ "X-Webhook-Signature"?: string;
4671
+ };
4672
+ path?: never;
4673
+ cookie?: never;
4674
+ };
4675
+ /** @description Webhook delivery envelope. The `data` field contains the event-specific payload. */
4676
+ requestBody: {
4677
+ content: {
4678
+ "application/json": components["schemas"]["WebhookDeliveryEnvelope"] & {
4679
+ data?: components["schemas"]["TagMetricsPayload"];
4680
+ };
4681
+ };
4682
+ };
4683
+ responses: {
4684
+ /** @description Webhook delivery acknowledged */
4685
+ 200: {
4686
+ headers: {
4687
+ [name: string]: unknown;
4688
+ };
4689
+ content?: never;
4690
+ };
4691
+ /** @description Server error (will retry) */
4692
+ 500: {
4693
+ headers: {
4694
+ [name: string]: unknown;
4695
+ };
4696
+ content?: never;
4697
+ };
4698
+ };
4699
+ };
4116
4700
  "position-metrics": {
4117
4701
  parameters: {
4118
4702
  query?: never;