@structbuild/sdk 0.1.22 → 0.1.24

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.
@@ -1227,7 +1227,7 @@ export interface components {
1227
1227
  daily_rate: number | null;
1228
1228
  };
1229
1229
  /** @enum {string} */
1230
- MarketSortBy: "volume" | "txns" | "unique_traders" | "liquidity" | "holders" | "end_time" | "start_time" | "created_time" | "created_at" | "relevance";
1230
+ MarketSortBy: "volume" | "txns" | "unique_traders" | "liquidity" | "holders" | "end_time" | "start_time" | "created_time" | "relevance";
1231
1231
  /** @enum {string} */
1232
1232
  MarketStatus: "open" | "closed" | "all";
1233
1233
  MarketVolumeChartResponse: {
@@ -1745,6 +1745,11 @@ export interface components {
1745
1745
  };
1746
1746
  /** @enum {string} */
1747
1747
  SortDirection: "asc" | "desc";
1748
+ /**
1749
+ * @description Direction filter for spike webhooks.
1750
+ * @enum {string}
1751
+ */
1752
+ SpikeDirection: "up" | "down" | "both";
1748
1753
  /** @description Token outcome (position) */
1749
1754
  TokenOutcome: {
1750
1755
  token_id: string;
@@ -1909,6 +1914,16 @@ export interface components {
1909
1914
  /** Format: int32 */
1910
1915
  stc: number;
1911
1916
  };
1917
+ /**
1918
+ * @description Crypto asset symbols accepted by `asset_price_tick` and `asset_price_window_update` filters.
1919
+ * @enum {string}
1920
+ */
1921
+ WebhookAssetSymbol: "BTC" | "ETH" | "SOL" | "XRP";
1922
+ /**
1923
+ * @description Timeframe values accepted by webhook metric, milestone, spike, and asset-price filters.
1924
+ * @enum {string}
1925
+ */
1926
+ WebhookTimeframe: "1m" | "5m" | "15m" | "30m" | "1h" | "6h" | "1d" | "24h" | "7d" | "30d";
1912
1927
  };
1913
1928
  responses: never;
1914
1929
  parameters: never;
@@ -2377,7 +2392,7 @@ export interface operations {
2377
2392
  search?: string;
2378
2393
  /** @description Filter by status: open, closed, or all (default: all) */
2379
2394
  status?: components["schemas"]["MarketStatus"];
2380
- /** @description Sort: volume, txns, unique_traders, liquidity, holders, end_time, start_time, created_time, created_at, relevance */
2395
+ /** @description Sort: volume, txns, unique_traders, liquidity, holders, end_time, start_time, created_time, relevance */
2381
2396
  sort_by?: components["schemas"]["MarketSortBy"];
2382
2397
  /** @description Sort direction: asc, desc (default: desc) */
2383
2398
  sort_dir?: components["schemas"]["SortDirection"];
@@ -168,7 +168,7 @@ export interface webhooks {
168
168
  put?: never;
169
169
  /**
170
170
  * Whale trade callback
171
- * @description Fired when a trade meets the configured criteria. Use `min_usd_value` to filter by minimum trade size (optional, defaults to 0 — matches all trades), and `min_probability`/`max_probability` to restrict to a probability range. Array filters (`condition_ids`, `event_slugs`, `wallet_addresses`) accept at most 500 entries each.
171
+ * @description Fired when a trade meets the configured criteria. Use `min_usd_value` to filter by minimum trade size (optional, defaults to 0 — matches all trades), and `min_probability`/`max_probability` to restrict to a probability range.
172
172
  */
173
173
  post: operations["trader-whale-trade"];
174
174
  delete?: never;
@@ -248,7 +248,7 @@ export interface webhooks {
248
248
  put?: never;
249
249
  /**
250
250
  * Market metrics callback
251
- * @description Fired when a market'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`). All array filters accept at most 500 entries each.
251
+ * @description Fired when a market'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`).
252
252
  */
253
253
  post: operations["market-metrics"];
254
254
  delete?: never;
@@ -268,7 +268,7 @@ export interface webhooks {
268
268
  put?: never;
269
269
  /**
270
270
  * Event metrics callback
271
- * @description Fired when an event'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`). All array filters accept at most 500 entries each.
271
+ * @description Fired when an event'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`).
272
272
  */
273
273
  post: operations["event-metrics"];
274
274
  delete?: never;
@@ -288,7 +288,7 @@ export interface webhooks {
288
288
  put?: never;
289
289
  /**
290
290
  * Position metrics callback
291
- * @description Fired when a position'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`). All array filters accept at most 500 entries each.
291
+ * @description Fired when a position'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`).
292
292
  */
293
293
  post: operations["position-metrics"];
294
294
  delete?: never;
@@ -308,7 +308,7 @@ export interface webhooks {
308
308
  put?: never;
309
309
  /**
310
310
  * Market volume milestone callback
311
- * @description Fired once per org when a market's trading volume crosses a milestone in the specified timeframe. **`timeframes` is required** (e.g. `["1h", "24h"]`) — valid values: `1m`, `5m`, `30m`, `1h`, `6h`, `24h`, `7d`, `30d`. Optional `milestone_amounts` restricts to specific USD thresholds (e.g. `[10000, 100000]`). Optional `condition_ids` restricts to specific markets. Each milestone fires at most once per minute per org. All array filters accept at most 500 entries each.
311
+ * @description Fired when a market's trading volume crosses a milestone threshold in the specified timeframe. **`timeframes` is required** (e.g. `["1h", "24h"]`) — valid values: `1m`, `5m`, `30m`, `1h`, `6h`, `24h`, `7d`, `30d`. Optional `milestone_amounts` restricts to specific USD thresholds (e.g. `[10000, 100000]`). Optional `condition_ids` restricts to specific markets.
312
312
  */
313
313
  post: operations["market-volume-milestone"];
314
314
  delete?: never;
@@ -328,7 +328,7 @@ export interface webhooks {
328
328
  put?: never;
329
329
  /**
330
330
  * Event volume milestone callback
331
- * @description Fired once per org when an event's trading volume crosses a milestone in the specified timeframe. **`timeframes` is required** (e.g. `["1h", "24h"]`) — valid values: `1m`, `5m`, `30m`, `1h`, `6h`, `24h`, `7d`, `30d`. Optional `milestone_amounts` restricts to specific USD thresholds. Optional `event_slugs` restricts to specific events. Each milestone fires at most once per minute per org. All array filters accept at most 500 entries each.
331
+ * @description Fired when an event's trading volume crosses a milestone threshold in the specified timeframe. **`timeframes` is required** (e.g. `["1h", "24h"]`) — valid values: `1m`, `5m`, `30m`, `1h`, `6h`, `24h`, `7d`, `30d`. Optional `milestone_amounts` restricts to specific USD thresholds. Optional `event_slugs` restricts to specific events.
332
332
  */
333
333
  post: operations["event-volume-milestone"];
334
334
  delete?: never;
@@ -348,7 +348,7 @@ export interface webhooks {
348
348
  put?: never;
349
349
  /**
350
350
  * Position volume milestone callback
351
- * @description Fired once per org when a position's trading volume crosses a milestone in the specified timeframe. **`timeframes` is required** (e.g. `["1h", "24h"]`) — valid values: `1m`, `5m`, `30m`, `1h`, `6h`, `24h`, `7d`, `30d`. Optional `milestone_amounts` restricts to specific USD thresholds. Optional `position_ids` or `condition_ids` restrict to specific positions/markets. Each milestone fires at most once per minute per org. All array filters accept at most 500 entries each.
351
+ * @description Fired when a position's trading volume crosses a milestone threshold in the specified timeframe. **`timeframes` is required** (e.g. `["1h", "24h"]`) — valid values: `1m`, `5m`, `30m`, `1h`, `6h`, `24h`, `7d`, `30d`. Optional `milestone_amounts` restricts to specific USD thresholds. Optional `position_ids` or `condition_ids` restrict to specific positions/markets.
352
352
  */
353
353
  post: operations["position-volume-milestone"];
354
354
  delete?: never;
@@ -368,7 +368,7 @@ export interface webhooks {
368
368
  put?: never;
369
369
  /**
370
370
  * Probability spike callback
371
- * @description Fired when a position's probability changes by at least `min_probability_change_pct` percent (relative to open) within the specified timeframe. **`timeframes` is required** (e.g. `["5m", "1h"]`) valid values: `1m`, `5m`, `30m`, `1h`, `6h`, `24h`, `7d`, `30d`. Optional filters: `position_ids`, `outcomes`, `min_probability_change_pct`. `probability_change_pct` in the payload is relative (e.g. `83.3` for a move from 30%→55%) and can be negative for downward moves. All array filters accept at most 500 entries each.
371
+ * @description Fired when a position's probability moves significantly. Use `min_probability_change_pct` to set the minimum move (e.g. `10` for 10%). Use `window_secs` to observe moves within a specific time window (e.g. `60` for 60 seconds). Use `spike_direction` (`"up"` | `"down"` | `"both"`) defaults to `"up"` when not provided. Filter by `position_ids` or `outcomes` to narrow scope.
372
372
  */
373
373
  post: operations["probability-spike"];
374
374
  delete?: never;
@@ -377,6 +377,26 @@ export interface webhooks {
377
377
  patch?: never;
378
378
  trace?: never;
379
379
  };
380
+ "price-spike": {
381
+ parameters: {
382
+ query?: never;
383
+ header?: never;
384
+ path?: never;
385
+ cookie?: never;
386
+ };
387
+ get?: never;
388
+ put?: never;
389
+ /**
390
+ * Price spike callback
391
+ * @description Fired when a position's price moves significantly. Use `min_price_change_pct` to set the minimum move (e.g. `10` for 10%). Use `window_secs` to observe moves within a specific time window. Use `spike_direction` (`"up"` | `"down"` | `"both"`) — defaults to `"up"` when not provided. Filter by `position_ids` or `outcomes` to narrow scope.
392
+ */
393
+ post: operations["price-spike"];
394
+ delete?: never;
395
+ options?: never;
396
+ head?: never;
397
+ patch?: never;
398
+ trace?: never;
399
+ };
380
400
  "market-volume-spike": {
381
401
  parameters: {
382
402
  query?: never;
@@ -388,7 +408,7 @@ export interface webhooks {
388
408
  put?: never;
389
409
  /**
390
410
  * Market volume spike callback
391
- * @description Fired when a market's volume in a timeframe exceeds the user-defined baseline by the configured ratio (e.g. 2x baseline). Requires `baseline_volume_usd` and `spike_ratio` in the subscription filter. Optional `timeframes` restricts to specific windows — valid values: `1m`, `5m`, `30m`, `1h`, `6h`, `24h`, `7d`, `30d`. Optional `condition_ids` restricts to specific markets. All array filters accept at most 500 entries each.
411
+ * @description Fired when a market's trading volume grows by a multiple of `spike_ratio` within a timeframe. Requires `spike_ratio` (> 1.0, e.g. `2.0` fires when volume doubles). Optional `window_secs` sets the observation window in seconds (max 600). Optional `timeframes` — valid values: `1m`, `5m`, `30m`, `1h`, `6h`, `1d`, `24h`, `7d`, `30d`. Optional `condition_ids` restricts to specific markets.
392
412
  */
393
413
  post: operations["market-volume-spike"];
394
414
  delete?: never;
@@ -408,7 +428,7 @@ export interface webhooks {
408
428
  put?: never;
409
429
  /**
410
430
  * Event volume spike callback
411
- * @description Fired when an event's aggregated volume in a timeframe exceeds the user-defined baseline by the configured ratio. Requires `baseline_volume_usd` and `spike_ratio` in the subscription filter. Optional `timeframes` and `event_slugs` filter by timeframe and event. 1-minute cooldown per org prevents repeated firing. All array filters accept at most 500 entries each.
431
+ * @description Fired when an event's aggregated trading volume grows by a multiple of `spike_ratio` within a timeframe. Requires `spike_ratio` (> 1.0, e.g. `2.0` fires when volume doubles). Optional `window_secs` sets the observation window in seconds (max 600). Optional `timeframes` and `event_slugs` to narrow scope.
412
432
  */
413
433
  post: operations["event-volume-spike"];
414
434
  delete?: never;
@@ -428,7 +448,7 @@ export interface webhooks {
428
448
  put?: never;
429
449
  /**
430
450
  * Position volume spike callback
431
- * @description Fired when a position's volume in a timeframe exceeds the user-defined baseline by the configured ratio. Requires `baseline_volume_usd` and `spike_ratio` in the subscription filter. Optional `position_ids`, `condition_ids`, `outcomes`, and `timeframes` for narrowing scope. 1-minute cooldown per org prevents repeated firing. All array filters accept at most 500 entries each.
451
+ * @description Fired when a position's trading volume grows by a multiple of `spike_ratio` within a timeframe. Requires `spike_ratio` (> 1.0, e.g. `2.0` fires when volume doubles). Optional `window_secs` sets the observation window in seconds (max 600). Optional `position_ids`, `condition_ids`, `outcomes`, and `timeframes` to narrow scope.
432
452
  */
433
453
  post: operations["position-volume-spike"];
434
454
  delete?: never;
@@ -448,7 +468,7 @@ export interface webhooks {
448
468
  put?: never;
449
469
  /**
450
470
  * Close to bond callback
451
- * @description Fired when a trade occurs at a near-certain-outcome price. **At least one of `min_probability` or `max_probability` is required.** Use `min_probability` (e.g. `0.95`) to trigger when YES is near-certain; use `max_probability` (e.g. `0.05`) for NO near-certain. Optional filters: `position_outcome_indices` — restrict by outcome index (`0` = Yes/Up, `1` = No; position 0 usually represents Yes/Up in binary markets); `condition_ids` — restrict to specific markets; `position_ids` — restrict to specific outcome tokens; `outcomes` — restrict by outcome name (e.g. `"Yes"`, `"No"`); `event_slugs` — restrict to specific events. Deduplication: each org is notified at most once per 6 hours while a position remains in the bond zone. All array filters accept at most 500 entries each.
471
+ * @description Fired when a trade occurs at a near-certain-outcome price. **At least one of `min_probability` or `max_probability` is required.** Use `min_probability` (e.g. `0.95`) to trigger when YES is near-certain; use `max_probability` (e.g. `0.05`) for NO near-certain. Optional filters: `position_outcome_indices` — restrict by outcome index (`0` = Yes/Up, `1` = No); `condition_ids` — restrict to specific markets; `position_ids` — restrict to specific outcome tokens; `outcomes` — restrict by outcome name (e.g. `"Yes"`, `"No"`); `event_slugs` — restrict to specific events.
452
472
  */
453
473
  post: operations["close-to-bond"];
454
474
  delete?: never;
@@ -468,7 +488,7 @@ export interface webhooks {
468
488
  put?: never;
469
489
  /**
470
490
  * Market created callback
471
- * @description Fired when a new prediction market is detected on-chain (ConditionPreparation event), enriched with Gamma API metadata. Filterable by `tags`, `condition_ids`, `event_slugs`, and `exclude_shorterm_market_timeframes`. All array filters accept at most 500 entries each.
491
+ * @description Fired when a new prediction market is created on Polymarket. Filterable by `tags` and `event_slugs`.
472
492
  */
473
493
  post: operations["market-created"];
474
494
  delete?: never;
@@ -488,7 +508,7 @@ export interface webhooks {
488
508
  put?: never;
489
509
  /**
490
510
  * Asset price tick callback
491
- * @description Fired on every raw Chainlink price tick received from the WebSocket feed for crypto assets (BTC, ETH, SOL, XRP). Use `asset_symbols` to restrict to specific assets (empty = all, max 500 entries). Use `min_usd_value` as a minimum price filter.
511
+ * @description Fired when the price of a tracked crypto asset updates (BTC, ETH, SOL, XRP). Use `asset_symbols` to restrict to specific assets (empty = all).
492
512
  */
493
513
  post: operations["asset-price-tick"];
494
514
  delete?: never;
@@ -508,7 +528,7 @@ export interface webhooks {
508
528
  put?: never;
509
529
  /**
510
530
  * Asset price window update callback
511
- * @description Fired twice per candle: once when the window opens (`update_type: "open"`) and once when it closes with a confirmed close price (`update_type: "close"`). Use `asset_symbols` to restrict to specific assets (BTC, ETH, SOL, XRP; max 500 entries). Use `timeframes` to restrict to specific candle sizes — valid values: `"5m"`, `"15m"`, `"1h"`, `"1d"`, `"24h"` (max 500 entries).
531
+ * @description Fired at the start and end of each price candle for tracked crypto assets (BTC, ETH, SOL, XRP). Payload includes `update_type` (`"open"` or `"close"`) indicating whether the candle is opening or closing. Use `asset_symbols` to restrict to specific assets. Use `timeframes` to restrict to specific candle sizes — valid values: `"5m"`, `"15m"`, `"1h"`, `"1d"`, `"24h"`.
512
532
  */
513
533
  post: operations["asset-price-window-update"];
514
534
  delete?: never;
@@ -739,20 +759,20 @@ export interface components {
739
759
  */
740
760
  txns: number;
741
761
  };
742
- /** @description Payload delivered when an event's aggregated volume in a timeframe exceeds the configured baseline by the spike ratio */
762
+ /** @description Payload delivered when an event's aggregated volume has spiked since the last snapshot */
743
763
  EventVolumeSpikePayload: {
744
764
  /** @description Event slug */
745
765
  event_slug: string;
746
766
  /** @description Aggregation window (e.g. "1h", "24h") */
747
767
  timeframe: string;
748
- /** @description Current aggregated event volume at time of trigger (USD) */
768
+ /** @description Current aggregated event volume at time of the spike (USD) */
749
769
  current_volume_usd: number;
750
- /** @description User-configured baseline volume (USD) */
751
- baseline_volume_usd: number;
752
- /** @description Spike ratio threshold triggered (e.g. 2.0 for 2x) */
753
- spike_ratio: number;
754
- /** @description Calculated threshold = baseline × ratio (USD) */
755
- threshold_usd: number;
770
+ /** @description Volume at the snapshot baseline (USD) */
771
+ snapshot_volume_usd: number;
772
+ /** @description New volume since the snapshot that triggered this notification (USD) */
773
+ delta_volume_usd: number;
774
+ /** @description Volume growth as a percentage of the snapshot (e.g. 200.0 means volume tripled) */
775
+ spike_pct: number;
756
776
  /** Format: int64 */
757
777
  txns: number;
758
778
  fees: number;
@@ -997,20 +1017,20 @@ export interface components {
997
1017
  */
998
1018
  last_trade_at?: number | null;
999
1019
  };
1000
- /** @description Payload delivered when a market's volume in a timeframe exceeds the configured baseline by the spike ratio */
1020
+ /** @description Payload delivered when a market's volume has spiked since the last snapshot */
1001
1021
  MarketVolumeSpikePayload: {
1002
1022
  /** @description Market condition ID */
1003
1023
  condition_id: string;
1004
1024
  /** @description Aggregation window (e.g. "1h", "24h") */
1005
1025
  timeframe: string;
1006
- /** @description Current volume that triggered the spike (USD) */
1026
+ /** @description Current volume at the time of the spike (USD) */
1007
1027
  current_volume_usd: number;
1008
- /** @description User-configured baseline volume for comparison (USD) */
1009
- baseline_volume_usd: number;
1010
- /** @description Spike ratio threshold that was triggered (e.g. 2.0 for 2x) */
1011
- spike_ratio: number;
1012
- /** @description Calculated threshold = baseline × ratio (USD) */
1013
- threshold_usd: number;
1028
+ /** @description Volume at the snapshot baseline (USD) */
1029
+ snapshot_volume_usd: number;
1030
+ /** @description New volume since the snapshot that triggered this notification (USD) */
1031
+ delta_volume_usd: number;
1032
+ /** @description Volume growth as a percentage of the snapshot (e.g. 200.0 means volume tripled) */
1033
+ spike_pct: number;
1014
1034
  /**
1015
1035
  * Format: int64
1016
1036
  * @description Total transactions in this timeframe
@@ -1082,7 +1102,7 @@ export interface components {
1082
1102
  * @description Polymarket webhook event types
1083
1103
  * @enum {string}
1084
1104
  */
1085
- PolymarketWebhookEvent: "trader_first_trade" | "trader_new_market" | "trader_whale_trade" | "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";
1105
+ PolymarketWebhookEvent: "trader_first_trade" | "trader_new_market" | "trader_whale_trade" | "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";
1086
1106
  /**
1087
1107
  * @description Polymarket-specific webhook filters
1088
1108
  *
@@ -1097,7 +1117,15 @@ export interface components {
1097
1117
  * - event_metrics: event_slugs, min_volume_usd, max_volume_usd, min_fees, min_txns, timeframes
1098
1118
  * - 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
1099
1119
  * - volume_milestone: condition_ids, timeframes, milestone_amounts
1100
- * - close_to_bond: min_probability (high zone threshold), max_probability (low zone threshold), condition_ids, position_ids, outcomes, position_outcome_indices, event_slugs
1120
+ * - 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
1121
+ * - market_created: event_slugs, tags, exclude_shortterm_markets
1122
+ * - probability_spike: condition_ids, event_slugs, outcomes, min_probability_change_pct, spike_direction, window_secs, exclude_shortterm_markets
1123
+ * - price_spike: condition_ids, event_slugs, outcomes, min_price_change_pct, spike_direction, window_secs, exclude_shortterm_markets
1124
+ * - trader_first_trade: wallet_addresses, min_usd_value, min_probability, max_probability, exclude_shortterm_markets
1125
+ * - trader_new_market: wallet_addresses, condition_ids, event_slugs, min_usd_value, min_probability, max_probability, exclude_shortterm_markets
1126
+ * - trader_whale_trade: min_usd_value (required), min_probability, max_probability, condition_ids, event_slugs, exclude_shortterm_markets
1127
+ * - trader_event_pnl: traders, min_realized_pnl_usd, max_realized_pnl_usd, min_volume_usd, event_slugs, min_markets_traded, exclude_shortterm_markets
1128
+ * - trader_market_pnl: traders, min_realized_pnl_usd, max_realized_pnl_usd, min_buy_usd, condition_ids, event_slugs, exclude_shortterm_markets
1101
1129
  *
1102
1130
  * Implements Hash + Eq manually (f64 fields use bit representation)
1103
1131
  */
@@ -1211,16 +1239,10 @@ export interface components {
1211
1239
  * @description Minimum probability change percentage - for position metrics webhooks
1212
1240
  */
1213
1241
  min_probability_change_pct?: number | null;
1214
- /** @description Timeframes to track - for metrics webhooks (1m, 5m, 30m, 1h, 6h, 24h, 7d, 30d). Max 500 entries. */
1215
- timeframes?: string[];
1242
+ /** @description Timeframes to track - for metrics webhooks (1m, 5m, 30m, 1h, 6h, 24h, 7d, 30d). */
1243
+ timeframes?: components["schemas"]["WebhookTimeframe"][];
1216
1244
  /** @description Milestone amounts to track - for volume milestone webhooks (e.g., 10000, 100000, 1000000). Max 500 entries. */
1217
1245
  milestone_amounts?: number[];
1218
- /**
1219
- * Format: double
1220
- * @description User's baseline volume for spike detection (USD) - for volume spike webhooks
1221
- * Example: 50000.0 for $50k baseline
1222
- */
1223
- baseline_volume_usd?: number | null;
1224
1246
  /**
1225
1247
  * Format: double
1226
1248
  * @description Spike ratio multiplier (must be > 1.0) - for volume spike webhooks
@@ -1228,16 +1250,31 @@ export interface components {
1228
1250
  */
1229
1251
  spike_ratio?: number | null;
1230
1252
  /**
1231
- * @description Exclude short-term trading markets by timeframe (e.g., ["5m", "15m", "30m", "1h"])
1232
- * Filters out event slugs containing these timeframe patterns (auto-wrapped: "5m" "-5m-")
1233
- * Example: Excludes "btc-updown-5m-1771678800" when "5m" is in the list. Max 500 entries.
1253
+ * @description When `true`, exclude all short-term "updown" markets (event slugs containing "updown").
1254
+ * These are short-duration crypto price markets (e.g., "btc-updown-5m-…", "eth-updown-1h-…").
1255
+ * Supported by: close_to_bond, market_created, price_spike, probability_spike,
1256
+ * trader_first_trade, trader_new_market, trader_whale_trade, trader_event_pnl, trader_market_pnl,
1257
+ * event_metrics, event_volume_milestone, event_volume_spike.
1234
1258
  */
1235
- exclude_shorterm_market_timeframes?: string[];
1259
+ exclude_shortterm_markets?: boolean;
1236
1260
  /**
1237
1261
  * @description Filter by crypto asset symbol — for `asset_price_tick` and `asset_price_window_update` webhooks.
1238
- * Valid values: "BTC", "ETH", "SOL", "XRP". Empty = all assets. Max 500 entries.
1262
+ * Valid values: "BTC", "ETH", "SOL", "XRP". Empty = all assets.
1239
1263
  */
1240
- asset_symbols?: string[];
1264
+ asset_symbols?: components["schemas"]["WebhookAssetSymbol"][];
1265
+ spike_direction?: null | components["schemas"]["SpikeDirection"];
1266
+ /**
1267
+ * Format: int64
1268
+ * @description Observation window in seconds for `probability_spike` and `price_spike`.
1269
+ *
1270
+ * When set, the first trade seen for a position opens a window of this duration.
1271
+ * The opening price becomes the baseline, and every subsequent trade within the
1272
+ * window is compared to it. When the window expires the next trade starts a new
1273
+ * window. If omitted, the baseline accumulates indefinitely until a spike fires.
1274
+ *
1275
+ * Example: `60` to detect spikes that happen within 60 seconds.
1276
+ */
1277
+ window_secs?: number | null;
1241
1278
  };
1242
1279
  /** @description Payload delivered when a position's volume or transaction metrics cross a configured threshold */
1243
1280
  PositionMetricsPayload: {
@@ -1309,7 +1346,7 @@ export interface components {
1309
1346
  /** Format: int64 */
1310
1347
  sells: number;
1311
1348
  };
1312
- /** @description Payload delivered when a position's volume in a timeframe exceeds the configured baseline by the spike ratio */
1349
+ /** @description Payload delivered when a position's volume has spiked since the last snapshot */
1313
1350
  PositionVolumeSpikePayload: {
1314
1351
  /** @description ERC-1155 outcome token ID */
1315
1352
  position_id: string;
@@ -1321,22 +1358,25 @@ export interface components {
1321
1358
  outcome_index?: number | null;
1322
1359
  /** @description Aggregation window (e.g. "1h", "24h") */
1323
1360
  timeframe: string;
1324
- /** @description Current position volume at time of trigger (USD) */
1361
+ /** @description Current position volume at the time of the spike (USD) */
1325
1362
  current_volume_usd: number;
1326
- /** @description User-configured baseline volume (USD) */
1327
- baseline_volume_usd: number;
1328
- /** @description Spike ratio threshold triggered (e.g. 2.0 for 2x) */
1329
- spike_ratio: number;
1330
- /** @description Calculated threshold = baseline × ratio (USD) */
1331
- threshold_usd: number;
1363
+ /** @description Volume at the snapshot baseline (USD) */
1364
+ snapshot_volume_usd: number;
1365
+ /** @description New volume since the snapshot that triggered this notification (USD) */
1366
+ delta_volume_usd: number;
1367
+ /** @description Volume growth as a percentage of the snapshot (e.g. 200.0 means volume tripled) */
1368
+ spike_pct: number;
1332
1369
  /** Format: int64 */
1333
1370
  txns: number;
1334
1371
  fees: number;
1335
1372
  };
1336
- /** @description Payload delivered when a position's probability changes by at least the configured percentage within a timeframe */
1337
1373
  ProbabilitySpikePayload: {
1338
- /** @description ERC-1155 outcome token ID */
1374
+ /** @description Outcome token ID */
1339
1375
  position_id: string;
1376
+ /** @description Market condition ID */
1377
+ condition_id?: string | null;
1378
+ /** @description Event slug */
1379
+ event_slug?: string | null;
1340
1380
  /** @description Outcome name (e.g. "Yes", "No") */
1341
1381
  outcome?: string | null;
1342
1382
  /**
@@ -1344,27 +1384,13 @@ export interface components {
1344
1384
  * @description Outcome index
1345
1385
  */
1346
1386
  outcome_index?: number | null;
1347
- /** @description Aggregation window (e.g. "5m", "1h") */
1348
- timeframe: string;
1349
- /** @description Probability at the start of the timeframe (0.0–1.0) */
1350
- probability_open: number;
1351
- /** @description Probability at the end of the timeframe (0.0–1.0) */
1352
- probability_close: number;
1353
- /** @description Absolute probability change (e.g. 0.25 for a 25 percentage-point move) */
1354
- probability_change: number;
1355
- /** @description Relative percentage change vs open (e.g. 83.3 for a 30%→55% move). Negative for downward moves. */
1356
- probability_change_pct: number;
1357
- /** @description Outcome token price at timeframe open */
1358
- price_open: number;
1359
- /** @description Outcome token price at timeframe close */
1360
- price_close: number;
1361
- /** @description Total USD volume during the timeframe */
1362
- volume_usd: number;
1363
1387
  /**
1364
- * Format: int64
1365
- * @description Number of transactions during the timeframe
1388
+ * @description `"up"` = probability rising, `"down"` = probability falling
1389
+ * @enum {string}
1366
1390
  */
1367
- txns: number;
1391
+ spike_direction: "up" | "down";
1392
+ /** @description Percentage move that triggered this notification. Positive = up, negative = down. */
1393
+ spike_pct: number;
1368
1394
  };
1369
1395
  /** @description Response for POST /v1/webhook/{id}/rotate-secret */
1370
1396
  RotateSecretResponse: {
@@ -1376,6 +1402,11 @@ export interface components {
1376
1402
  */
1377
1403
  rotated_at: number;
1378
1404
  };
1405
+ /**
1406
+ * @description Direction filter for spike webhooks.
1407
+ * @enum {string}
1408
+ */
1409
+ SpikeDirection: "up" | "down" | "both";
1379
1410
  /** @description Request body for updating a webhook */
1380
1411
  UpdateWebhookRequestBody: {
1381
1412
  /** @description Destination URL for webhook deliveries (must be HTTPS) */
@@ -1406,6 +1437,11 @@ export interface components {
1406
1437
  */
1407
1438
  txns: number;
1408
1439
  };
1440
+ /**
1441
+ * @description Crypto asset symbols accepted by `asset_price_tick` and `asset_price_window_update` filters.
1442
+ * @enum {string}
1443
+ */
1444
+ WebhookAssetSymbol: "BTC" | "ETH" | "SOL" | "XRP";
1409
1445
  /** @description Single event type entry for the events list */
1410
1446
  WebhookEventInfo: {
1411
1447
  /** @description Event type identifier (e.g. "first_trade") */
@@ -1521,28 +1557,21 @@ export interface components {
1521
1557
  /**
1522
1558
  * @description Timeframes to filter by (e.g. ["1h", "24h", "7d"]) — **required** for volume_milestone
1523
1559
  * webhooks (market/event/position), optional for metrics webhooks.
1524
- * Valid values: "1m", "5m", "30m", "1h", "6h", "24h", "7d", "30d". Max 500 entries.
1560
+ * Valid values: "1m", "5m", "30m", "1h", "6h", "24h", "7d", "30d".
1525
1561
  */
1526
- timeframes?: string[];
1562
+ timeframes?: components["schemas"]["WebhookTimeframe"][];
1527
1563
  /** @description Milestone amounts to trigger on (USD) — for volume_milestone webhooks. Max 500 entries. */
1528
1564
  milestone_amounts?: number[];
1529
- /**
1530
- * Format: double
1531
- * @description User-defined baseline volume for spike detection (USD) — for volume_spike
1532
- */
1533
- baseline_volume_usd?: number | null;
1534
1565
  /**
1535
1566
  * Format: double
1536
1567
  * @description Spike ratio multiplier (must be > 1.0) — for volume_spike. E.g. 2.0 for 2x baseline
1537
1568
  */
1538
1569
  spike_ratio?: number | null;
1539
- /** @description Exclude short-term trading markets by timeframe pattern (e.g. ["5m", "15m"]). Max 500 entries. */
1540
- exclude_shorterm_market_timeframes?: string[];
1541
1570
  /**
1542
1571
  * @description Filter by crypto asset symbol — for `asset_price_tick` and `asset_price_window_update`.
1543
- * Valid values: "BTC", "ETH", "SOL", "XRP". Empty = all assets (send everything). Max 500 entries.
1572
+ * Valid values: "BTC", "ETH", "SOL", "XRP". Empty = all assets (send everything).
1544
1573
  */
1545
- asset_symbols?: string[];
1574
+ asset_symbols?: components["schemas"]["WebhookAssetSymbol"][];
1546
1575
  };
1547
1576
  /** @description List webhooks response */
1548
1577
  WebhookListResponseBody: {
@@ -1605,6 +1634,11 @@ export interface components {
1605
1634
  */
1606
1635
  duration_ms: number;
1607
1636
  };
1637
+ /**
1638
+ * @description Timeframe values accepted by webhook metric, milestone, spike, and asset-price filters.
1639
+ * @enum {string}
1640
+ */
1641
+ WebhookTimeframe: "1m" | "5m" | "15m" | "30m" | "1h" | "6h" | "1d" | "24h" | "7d" | "30d";
1608
1642
  /** @description Payload delivered when a trade exceeds the configured size and probability thresholds */
1609
1643
  WhaleTradePayload: {
1610
1644
  /** @description Limit-order maker wallet address (lowercase) */
@@ -1659,6 +1693,28 @@ export interface components {
1659
1693
  /** @description Trade type identifier */
1660
1694
  trade_type: string;
1661
1695
  };
1696
+ PriceSpikePayload: {
1697
+ /** @description Outcome token ID */
1698
+ position_id: string;
1699
+ /** @description Market condition ID */
1700
+ condition_id?: string | null;
1701
+ /** @description Event slug */
1702
+ event_slug?: string | null;
1703
+ /** @description Outcome name (e.g. "Yes", "No") */
1704
+ outcome?: string | null;
1705
+ /**
1706
+ * Format: int16
1707
+ * @description Outcome index
1708
+ */
1709
+ outcome_index?: number | null;
1710
+ /**
1711
+ * @description `"up"` = price rising, `"down"` = price falling
1712
+ * @enum {string}
1713
+ */
1714
+ spike_direction: "up" | "down";
1715
+ /** @description Percentage move that triggered this notification. Positive = up, negative = down. */
1716
+ spike_pct: number;
1717
+ };
1662
1718
  /** @description Subscription filters for the `trader_first_trade` event. All fields are optional. */
1663
1719
  TraderFirstTradeFilters: {
1664
1720
  /** @description Only fire for trades by these wallet addresses (lowercase). Empty = all traders. */
@@ -1673,6 +1729,8 @@ export interface components {
1673
1729
  min_probability?: number;
1674
1730
  /** @description Only fire when the outcome probability is ≤ this value. */
1675
1731
  max_probability?: number;
1732
+ /** @description When `true`, suppress webhooks for short-term "updown" markets (event slugs containing `updown`). Default: `false`. */
1733
+ exclude_shortterm_markets?: boolean;
1676
1734
  };
1677
1735
  /** @description Subscription filters for the `trader_new_market` event. All fields are optional. */
1678
1736
  TraderNewMarketFilters: {
@@ -1682,6 +1740,8 @@ export interface components {
1682
1740
  condition_ids?: string[];
1683
1741
  /** @description Restrict to markets belonging to these events. */
1684
1742
  event_slugs?: string[];
1743
+ /** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
1744
+ exclude_shortterm_markets?: boolean;
1685
1745
  };
1686
1746
  /** @description Subscription filters for the `trader_whale_trade` event. All fields are optional. */
1687
1747
  TraderWhaleTradeFilters: {
@@ -1700,6 +1760,8 @@ export interface components {
1700
1760
  min_probability?: number;
1701
1761
  /** @description Only fire when outcome probability is ≤ this value. */
1702
1762
  max_probability?: number;
1763
+ /** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
1764
+ exclude_shortterm_markets?: boolean;
1703
1765
  };
1704
1766
  /** @description Subscription filters for the `trader_global_pnl` event. All fields are optional. */
1705
1767
  TraderGlobalPnlFilters: {
@@ -1711,6 +1773,12 @@ export interface components {
1711
1773
  max_realized_pnl_usd?: number;
1712
1774
  /** @description Only fire when total trading volume ≥ this value (USD). */
1713
1775
  min_volume_usd?: number;
1776
+ /** @description Only fire when total trading volume ≤ this value (USD). */
1777
+ max_volume_usd?: number;
1778
+ /** @description Only fire when buy volume ≥ this value (USD). */
1779
+ min_buy_usd?: number;
1780
+ /** @description Only fire when sell volume ≥ this value (USD). */
1781
+ min_sell_volume_usd?: number;
1714
1782
  /** @description Only fire when market win rate ≥ this percentage (0.0–100.0). */
1715
1783
  min_win_rate?: number;
1716
1784
  /**
@@ -1733,10 +1801,18 @@ export interface components {
1733
1801
  min_realized_pnl_usd?: number;
1734
1802
  /** @description Only fire when per-market realized PnL ≤ this value (USD). */
1735
1803
  max_realized_pnl_usd?: number;
1804
+ /** @description Only fire when total volume (buy + sell + redemption + merge) ≥ this value (USD). */
1805
+ min_volume_usd?: number;
1806
+ /** @description Only fire when total volume ≤ this value (USD). */
1807
+ max_volume_usd?: number;
1736
1808
  /** @description Only fire when buy volume in the market ≥ this value (USD). */
1737
1809
  min_buy_usd?: number;
1810
+ /** @description Only fire when sell volume in the market ≥ this value (USD). */
1811
+ min_sell_volume_usd?: number;
1738
1812
  /** @description Restrict to these PnL windows. */
1739
1813
  timeframes?: ("1d" | "7d" | "30d" | "lifetime")[];
1814
+ /** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
1815
+ exclude_shortterm_markets?: boolean;
1740
1816
  };
1741
1817
  /** @description Subscription filters for the `trader_event_pnl` event. All fields are optional. */
1742
1818
  TraderEventPnlFilters: {
@@ -1750,6 +1826,12 @@ export interface components {
1750
1826
  max_realized_pnl_usd?: number;
1751
1827
  /** @description Only fire when total event volume ≥ this value (USD). */
1752
1828
  min_volume_usd?: number;
1829
+ /** @description Only fire when total event volume ≤ this value (USD). */
1830
+ max_volume_usd?: number;
1831
+ /** @description Only fire when buy volume within the event ≥ this value (USD). */
1832
+ min_buy_usd?: number;
1833
+ /** @description Only fire when sell volume within the event ≥ this value (USD). */
1834
+ min_sell_volume_usd?: number;
1753
1835
  /**
1754
1836
  * Format: int64
1755
1837
  * @description Only fire when the trader has traded in ≥ this many markets within the event.
@@ -1757,6 +1839,8 @@ export interface components {
1757
1839
  min_markets_traded?: number;
1758
1840
  /** @description Restrict to these PnL windows. */
1759
1841
  timeframes?: ("1d" | "7d" | "30d" | "lifetime")[];
1842
+ /** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
1843
+ exclude_shortterm_markets?: boolean;
1760
1844
  };
1761
1845
  /** @description Subscription filters for the `condition_metrics` event. All fields are optional. */
1762
1846
  MarketMetricsFilters: {
@@ -1797,6 +1881,8 @@ export interface components {
1797
1881
  /** Format: int64 */
1798
1882
  min_unique_traders?: number;
1799
1883
  min_fees?: number;
1884
+ /** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
1885
+ exclude_shortterm_markets?: boolean;
1800
1886
  };
1801
1887
  /** @description Subscription filters for the `position_metrics` event. All fields are optional. */
1802
1888
  PositionMetricsFilters: {
@@ -1840,6 +1926,8 @@ export interface components {
1840
1926
  event_slugs?: string[];
1841
1927
  /** @description Specific USD milestones to trigger on. */
1842
1928
  milestone_amounts?: number[];
1929
+ /** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
1930
+ exclude_shortterm_markets?: boolean;
1843
1931
  };
1844
1932
  /** @description Subscription filters for the `position_volume_milestone` event. */
1845
1933
  PositionVolumeMilestoneFilters: {
@@ -1854,43 +1942,78 @@ export interface components {
1854
1942
  };
1855
1943
  /** @description Subscription filters for the `probability_spike` event. */
1856
1944
  ProbabilitySpikeFilters: {
1857
- /** @description **Required.** Windows to monitor for probability changes. */
1858
- timeframes: ("1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d")[];
1859
- /** @description Restrict to these outcome token IDs. */
1945
+ /** @description Restrict to specific outcome token IDs. Empty = all positions. */
1860
1946
  position_ids?: string[];
1861
- /** @description Restrict to these outcome names (e.g. ["Yes"]). */
1947
+ /** @description Restrict to specific market condition IDs. Empty = all markets. */
1948
+ condition_ids?: string[];
1949
+ /** @description Restrict to specific events. Empty = all events. */
1950
+ event_slugs?: string[];
1951
+ /** @description Restrict to these outcome names (e.g. ["Yes", "No"]). */
1862
1952
  outcomes?: string[];
1863
- /** @description Only fire when the relative probability change this percentage. E.g. 50 fires when probability moves ≥ 50% relative to open. */
1953
+ /** @description Minimum probability percentage move to trigger (e.g. `10` for a 10% move). */
1864
1954
  min_probability_change_pct?: number;
1955
+ /**
1956
+ * @description `"up"` = probability rising only (default when omitted), `"down"` = falling only, `"both"` = either direction.
1957
+ * @enum {string}
1958
+ */
1959
+ spike_direction?: "up" | "down" | "both";
1960
+ /** @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. */
1961
+ window_secs?: number;
1962
+ /** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
1963
+ exclude_shortterm_markets?: boolean;
1865
1964
  };
1866
- /** @description Subscription filters for the `market_volume_spike` event. */
1965
+ /** @description Subscription filters for the `price_spike` event. */
1966
+ PriceSpikeFilters: {
1967
+ /** @description Restrict to specific outcome token IDs. Empty = all positions. */
1968
+ position_ids?: string[];
1969
+ /** @description Restrict to specific market condition IDs. Empty = all markets. */
1970
+ condition_ids?: string[];
1971
+ /** @description Restrict to specific events. Empty = all events. */
1972
+ event_slugs?: string[];
1973
+ /** @description Restrict to these outcome names (e.g. ["Yes", "No"]). */
1974
+ outcomes?: string[];
1975
+ /** @description Minimum price percentage move to trigger (e.g. `10` for a 10% move). */
1976
+ min_price_change_pct?: number;
1977
+ /**
1978
+ * @description `"up"` = price rising only (default when omitted), `"down"` = falling only, `"both"` = either direction.
1979
+ * @enum {string}
1980
+ */
1981
+ spike_direction?: "up" | "down" | "both";
1982
+ /** @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. */
1983
+ window_secs?: number;
1984
+ /** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
1985
+ exclude_shortterm_markets?: boolean;
1986
+ };
1987
+ /** @description Subscription filters for the `market_volume_spike` event. `spike_ratio` is required. */
1867
1988
  MarketVolumeSpikeFilters: {
1868
- /** @description **Required.** Your baseline volume for comparison (USD). E.g. 50000 for a $50k baseline. */
1869
- baseline_volume_usd: number;
1870
- /** @description **Required.** Multiplier threshold (must be > 1.0). E.g. 2.0 fires when volume exceeds 2× the baseline. */
1989
+ /** @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. */
1871
1990
  spike_ratio: number;
1991
+ /** @description Force snapshot reset after this many seconds (max 600 / 10 minutes). */
1992
+ window_secs?: number;
1872
1993
  /** @description Restrict to these markets. Empty = all markets. */
1873
1994
  condition_ids?: string[];
1874
1995
  /** @description Restrict to these aggregation windows. Empty = all windows. */
1875
- timeframes?: ("1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d")[];
1996
+ timeframes?: ("1m" | "5m" | "30m" | "1h" | "6h" | "1d" | "24h" | "7d" | "30d")[];
1876
1997
  };
1877
- /** @description Subscription filters for the `event_volume_spike` event. */
1998
+ /** @description Subscription filters for the `event_volume_spike` event. `spike_ratio` is required. */
1878
1999
  EventVolumeSpikeFilters: {
1879
- /** @description **Required.** Your baseline volume for comparison (USD). */
1880
- baseline_volume_usd: number;
1881
- /** @description **Required.** Multiplier threshold (must be > 1.0). */
2000
+ /** @description **Required.** Multiplier threshold (must be > 1.0). Fires when current volume >= snapshot × ratio. */
1882
2001
  spike_ratio: number;
2002
+ /** @description Force snapshot reset after this many seconds (max 600 / 10 minutes). */
2003
+ window_secs?: number;
1883
2004
  /** @description Restrict to these events. */
1884
2005
  event_slugs?: string[];
1885
2006
  /** @description Restrict to these aggregation windows. */
1886
- timeframes?: ("1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d")[];
2007
+ timeframes?: ("1m" | "5m" | "30m" | "1h" | "6h" | "1d" | "24h" | "7d" | "30d")[];
2008
+ /** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
2009
+ exclude_shortterm_markets?: boolean;
1887
2010
  };
1888
- /** @description Subscription filters for the `position_volume_spike` event. */
2011
+ /** @description Subscription filters for the `position_volume_spike` event. `spike_ratio` is required. */
1889
2012
  PositionVolumeSpikeFilters: {
1890
- /** @description **Required.** Your baseline volume for comparison (USD). */
1891
- baseline_volume_usd: number;
1892
- /** @description **Required.** Multiplier threshold (must be > 1.0). */
2013
+ /** @description **Required.** Multiplier threshold (must be > 1.0). Fires when current volume >= snapshot × ratio. */
1893
2014
  spike_ratio: number;
2015
+ /** @description Force snapshot reset after this many seconds (max 600 / 10 minutes). */
2016
+ window_secs?: number;
1894
2017
  /** @description Restrict to these outcome token IDs. */
1895
2018
  position_ids?: string[];
1896
2019
  /** @description Restrict to positions within these markets. */
@@ -1898,7 +2021,7 @@ export interface components {
1898
2021
  /** @description Restrict to these outcome names. */
1899
2022
  outcomes?: string[];
1900
2023
  /** @description Restrict to these aggregation windows. */
1901
- timeframes?: ("1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d")[];
2024
+ timeframes?: ("1m" | "5m" | "30m" | "1h" | "6h" | "1d" | "24h" | "7d" | "30d")[];
1902
2025
  };
1903
2026
  /** @description Subscription filters for the `close_to_bond` event. At least one of `min_probability` or `max_probability` is required. */
1904
2027
  CloseToBondFilters: {
@@ -1916,6 +2039,8 @@ export interface components {
1916
2039
  outcomes?: string[];
1917
2040
  /** @description Restrict by outcome index. 0 = Yes/Up, 1 = No. Position 0 usually represents the Up/Yes side in binary markets. */
1918
2041
  position_outcome_indices?: number[];
2042
+ /** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
2043
+ exclude_shortterm_markets?: boolean;
1919
2044
  };
1920
2045
  /** @description Subscription filters for the `market_created` event. All fields are optional. */
1921
2046
  MarketCreatedFilters: {
@@ -1925,15 +2050,13 @@ export interface components {
1925
2050
  condition_ids?: string[];
1926
2051
  /** @description Restrict to markets belonging to these events. */
1927
2052
  event_slugs?: string[];
1928
- /** @description Exclude short-term trading markets whose event slug contains these timeframe patterns (e.g. ["5m", "15m", "30m", "1h"]). Each value is auto-wrapped: "5m" → "-5m-". */
1929
- exclude_shorterm_market_timeframes?: string[];
2053
+ /** @description When `true`, suppress webhooks for short-term "updown" markets (event slugs containing `updown`). Default: `false`. */
2054
+ exclude_shortterm_markets?: boolean;
1930
2055
  };
1931
2056
  /** @description Subscription filters for the `asset_price_tick` event. All fields are optional. */
1932
2057
  AssetPriceTickFilters: {
1933
2058
  /** @description Restrict to these crypto assets. Empty = all assets. */
1934
2059
  asset_symbols?: ("BTC" | "ETH" | "SOL" | "XRP")[];
1935
- /** @description Minimum asset price in USD. Only fire ticks where price ≥ this value. */
1936
- min_usd_value?: number;
1937
2060
  };
1938
2061
  /** @description Subscription filters for the `asset_price_window_update` event. All fields are optional. */
1939
2062
  AssetPriceWindowUpdateFilters: {
@@ -2639,6 +2762,35 @@ export interface operations {
2639
2762
  };
2640
2763
  };
2641
2764
  };
2765
+ "price-spike": {
2766
+ parameters: {
2767
+ query?: never;
2768
+ header?: never;
2769
+ path?: never;
2770
+ cookie?: never;
2771
+ };
2772
+ requestBody: {
2773
+ content: {
2774
+ "application/json": components["schemas"]["PriceSpikePayload"];
2775
+ };
2776
+ };
2777
+ responses: {
2778
+ /** @description Webhook delivery acknowledged */
2779
+ 200: {
2780
+ headers: {
2781
+ [name: string]: unknown;
2782
+ };
2783
+ content?: never;
2784
+ };
2785
+ /** @description Server error (will retry) */
2786
+ 500: {
2787
+ headers: {
2788
+ [name: string]: unknown;
2789
+ };
2790
+ content?: never;
2791
+ };
2792
+ };
2793
+ };
2642
2794
  "market-volume-spike": {
2643
2795
  parameters: {
2644
2796
  query?: never;
@@ -47,6 +47,7 @@ export type SearchResponse = Schemas["SearchResponse"];
47
47
  export type SearchSortBy = Schemas["SearchSortBy"];
48
48
  export type SimpleTimeframeMetrics = Schemas["SimpleTimeframeMetrics"];
49
49
  export type SortDirection = Schemas["SortDirection"];
50
+ export type SpikeDirection = Schemas["SpikeDirection"];
50
51
  export type TokenOutcome = Schemas["TokenOutcome"];
51
52
  export type Trader = Schemas["Trader"];
52
53
  export type TraderInfo = Schemas["TraderInfo"];
@@ -68,6 +69,8 @@ export type MarketStatus = Schemas["MarketStatus"];
68
69
  export type OutcomeIndex = Schemas["OutcomeIndex"];
69
70
  export type PositionChartDataPoint = Schemas["PositionChartDataPoint"];
70
71
  export type TradeType = Schemas["TradeType"];
72
+ export type WebhookAssetSymbol = Schemas["WebhookAssetSymbol"];
73
+ export type WebhookTimeframe = Schemas["WebhookTimeframe"];
71
74
  export type Series = Schemas["PolymarketSeries"];
72
75
  export type Trade = Schemas["PredictionTradeResponse"];
73
76
  export type Candlestick = Schemas["PredictionCandlestickBar"];
@@ -297,6 +300,11 @@ export type CloseToBondFilters = WebhookSchemas["CloseToBondFilters"];
297
300
  export type MarketCreatedFilters = WebhookSchemas["MarketCreatedFilters"];
298
301
  export type AssetPriceTickFilters = WebhookSchemas["AssetPriceTickFilters"];
299
302
  export type AssetPriceWindowUpdateFilters = WebhookSchemas["AssetPriceWindowUpdateFilters"];
303
+ export type PriceSpikePayload = WebhookSchemas["PriceSpikePayload"];
304
+ export type PriceSpikeFilters = WebhookSchemas["PriceSpikeFilters"];
305
+ export type WebhookSpikeDirection = WebhookSchemas["SpikeDirection"];
306
+ export type WebhookWebhookAssetSymbol = WebhookSchemas["WebhookAssetSymbol"];
307
+ export type WebhookWebhookTimeframe = WebhookSchemas["WebhookTimeframe"];
300
308
  export interface ListWebhooksParams extends WebhookOperationQuery<"list_webhooks"> {
301
309
  }
302
310
  export interface GetWebhookParams {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@structbuild/sdk",
3
- "version": "0.1.22",
3
+ "version": "0.1.24",
4
4
  "type": "module",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.js",