@structbuild/sdk 0.1.21 → 0.1.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/generated/polymarket.d.ts +6 -6
- package/dist/generated/webhooks.d.ts +661 -466
- package/dist/types/index.d.ts +20 -0
- package/package.json +1 -1
|
@@ -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.
|
|
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.
|
|
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
|
|
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.
|
|
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
|
|
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.
|
|
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
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
372
372
|
*/
|
|
373
373
|
post: operations["probability-spike"];
|
|
374
374
|
delete?: never;
|
|
@@ -388,7 +388,7 @@ export interface webhooks {
|
|
|
388
388
|
put?: never;
|
|
389
389
|
/**
|
|
390
390
|
* 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.
|
|
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.
|
|
392
392
|
*/
|
|
393
393
|
post: operations["market-volume-spike"];
|
|
394
394
|
delete?: never;
|
|
@@ -408,7 +408,7 @@ export interface webhooks {
|
|
|
408
408
|
put?: never;
|
|
409
409
|
/**
|
|
410
410
|
* 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.
|
|
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.
|
|
412
412
|
*/
|
|
413
413
|
post: operations["event-volume-spike"];
|
|
414
414
|
delete?: never;
|
|
@@ -428,7 +428,7 @@ export interface webhooks {
|
|
|
428
428
|
put?: never;
|
|
429
429
|
/**
|
|
430
430
|
* 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.
|
|
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.
|
|
432
432
|
*/
|
|
433
433
|
post: operations["position-volume-spike"];
|
|
434
434
|
delete?: never;
|
|
@@ -448,7 +448,7 @@ export interface webhooks {
|
|
|
448
448
|
put?: never;
|
|
449
449
|
/**
|
|
450
450
|
* 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.
|
|
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.
|
|
452
452
|
*/
|
|
453
453
|
post: operations["close-to-bond"];
|
|
454
454
|
delete?: never;
|
|
@@ -468,7 +468,7 @@ export interface webhooks {
|
|
|
468
468
|
put?: never;
|
|
469
469
|
/**
|
|
470
470
|
* 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`.
|
|
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.
|
|
472
472
|
*/
|
|
473
473
|
post: operations["market-created"];
|
|
474
474
|
delete?: never;
|
|
@@ -488,7 +488,7 @@ export interface webhooks {
|
|
|
488
488
|
put?: never;
|
|
489
489
|
/**
|
|
490
490
|
* 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). Use `min_usd_value` as a minimum price filter.
|
|
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.
|
|
492
492
|
*/
|
|
493
493
|
post: operations["asset-price-tick"];
|
|
494
494
|
delete?: never;
|
|
@@ -508,7 +508,7 @@ export interface webhooks {
|
|
|
508
508
|
put?: never;
|
|
509
509
|
/**
|
|
510
510
|
* 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). Use `timeframes` to restrict to specific candle sizes — valid values: `"5m"`, `"15m"`, `"1h"`, `"24h"
|
|
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).
|
|
512
512
|
*/
|
|
513
513
|
post: operations["asset-price-window-update"];
|
|
514
514
|
delete?: never;
|
|
@@ -520,133 +520,118 @@ export interface webhooks {
|
|
|
520
520
|
}
|
|
521
521
|
export interface components {
|
|
522
522
|
schemas: {
|
|
523
|
-
/** @description
|
|
523
|
+
/** @description Payload delivered on every raw Chainlink price tick for a tracked crypto asset */
|
|
524
524
|
AssetPriceTickPayload: {
|
|
525
|
-
/** @description Asset symbol: "BTC", "ETH", "SOL", or "XRP" */
|
|
526
|
-
symbol: string;
|
|
527
525
|
/**
|
|
528
|
-
*
|
|
529
|
-
* @
|
|
526
|
+
* @description Asset symbol
|
|
527
|
+
* @enum {string}
|
|
530
528
|
*/
|
|
529
|
+
symbol: "BTC" | "ETH" | "SOL" | "XRP";
|
|
530
|
+
/** @description Current asset price in USD from the Chainlink feed */
|
|
531
531
|
price: number;
|
|
532
532
|
/**
|
|
533
533
|
* Format: int64
|
|
534
|
-
* @description Tick timestamp
|
|
534
|
+
* @description Tick timestamp (milliseconds since Unix epoch)
|
|
535
535
|
*/
|
|
536
536
|
timestamp_ms: number;
|
|
537
537
|
};
|
|
538
|
-
/** @description
|
|
538
|
+
/** @description Payload delivered twice per candle — once on open and once on close. `close_price` is 0.0 on the "open" update. */
|
|
539
539
|
AssetPriceWindowUpdatePayload: {
|
|
540
|
-
/**
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
540
|
+
/**
|
|
541
|
+
* @description Asset symbol
|
|
542
|
+
* @enum {string}
|
|
543
|
+
*/
|
|
544
|
+
symbol: "BTC" | "ETH" | "SOL" | "XRP";
|
|
545
|
+
/**
|
|
546
|
+
* @description Candle / window size
|
|
547
|
+
* @enum {string}
|
|
548
|
+
*/
|
|
549
|
+
variant: "5m" | "15m" | "1h" | "1d" | "24h";
|
|
544
550
|
/**
|
|
545
551
|
* Format: int64
|
|
546
|
-
* @description Window start timestamp (milliseconds since epoch)
|
|
552
|
+
* @description Window start timestamp (milliseconds since Unix epoch)
|
|
547
553
|
*/
|
|
548
554
|
start_time: number;
|
|
549
555
|
/**
|
|
550
556
|
* Format: int64
|
|
551
|
-
* @description Window end timestamp (milliseconds since epoch)
|
|
557
|
+
* @description Window end timestamp (milliseconds since Unix epoch)
|
|
552
558
|
*/
|
|
553
559
|
end_time: number;
|
|
554
|
-
/**
|
|
555
|
-
* Format: double
|
|
556
|
-
* @description Opening price at start_time
|
|
557
|
-
*/
|
|
560
|
+
/** @description Opening price at start_time (USD) */
|
|
558
561
|
open_price: number;
|
|
562
|
+
/** @description Closing price at end_time (USD). 0.0 when update_type is "open" (not yet available). */
|
|
563
|
+
close_price: number;
|
|
559
564
|
/**
|
|
560
|
-
*
|
|
561
|
-
* @
|
|
565
|
+
* @description "open" when the candle opens, "close" when it closes with a confirmed price
|
|
566
|
+
* @enum {string}
|
|
562
567
|
*/
|
|
563
|
-
|
|
564
|
-
/** @description "open" when the window starts, "close" when the window is complete */
|
|
565
|
-
update_type: string;
|
|
568
|
+
update_type: "open" | "close";
|
|
566
569
|
};
|
|
567
|
-
/** @description
|
|
570
|
+
/** @description Payload delivered when a trade occurs at a near-certain-outcome price */
|
|
568
571
|
CloseToBondPayload: {
|
|
569
|
-
/** @description
|
|
572
|
+
/** @description Limit-order maker wallet address (lowercase) */
|
|
570
573
|
trader: string;
|
|
571
|
-
/** @description
|
|
574
|
+
/** @description Order filler wallet address (lowercase) */
|
|
572
575
|
taker: string;
|
|
573
|
-
/** @description
|
|
576
|
+
/** @description ERC-1155 outcome token ID */
|
|
574
577
|
position_id: string;
|
|
575
|
-
/** @description
|
|
578
|
+
/** @description Parent market condition ID */
|
|
576
579
|
condition_id?: string | null;
|
|
577
580
|
/** @description Outcome name (e.g. "Yes", "No") */
|
|
578
581
|
outcome?: string | null;
|
|
579
|
-
/**
|
|
580
|
-
* Format: int32
|
|
581
|
-
* @description Outcome index (0 = Yes/Up, 1 = No). Position 0 usually represents Yes/Up.
|
|
582
|
-
*/
|
|
582
|
+
/** @description 0 = Yes/Up, 1 = No */
|
|
583
583
|
outcome_index?: number | null;
|
|
584
|
-
/** @description Market question */
|
|
585
584
|
question?: string | null;
|
|
586
|
-
/** @description Market slug */
|
|
587
585
|
market_slug?: string | null;
|
|
588
|
-
/** @description Event slug */
|
|
589
586
|
event_slug?: string | null;
|
|
590
|
-
/** @description Trade ID */
|
|
591
587
|
trade_id: string;
|
|
592
588
|
/** @description Transaction hash */
|
|
593
589
|
hash: string;
|
|
594
|
-
/**
|
|
595
|
-
* Format: int64
|
|
596
|
-
* @description Block number
|
|
597
|
-
*/
|
|
590
|
+
/** Format: int64 */
|
|
598
591
|
block: number;
|
|
599
592
|
/**
|
|
600
593
|
* Format: int64
|
|
601
|
-
* @description
|
|
594
|
+
* @description Unix seconds
|
|
602
595
|
*/
|
|
603
596
|
confirmed_at: number;
|
|
604
|
-
/**
|
|
605
|
-
* Format: double
|
|
606
|
-
* @description USD size of the trade
|
|
607
|
-
*/
|
|
597
|
+
/** @description USD size of the trade */
|
|
608
598
|
amount_usd: number;
|
|
609
|
-
/**
|
|
610
|
-
* Format: double
|
|
611
|
-
* @description Outcome shares traded
|
|
612
|
-
*/
|
|
613
599
|
shares_amount: number;
|
|
614
|
-
/**
|
|
615
|
-
* Format: double
|
|
616
|
-
* @description Fee paid (USD)
|
|
617
|
-
*/
|
|
600
|
+
/** @description Fee paid in USD */
|
|
618
601
|
fee: number;
|
|
619
|
-
/** @
|
|
620
|
-
side:
|
|
621
|
-
/**
|
|
622
|
-
* Format: double
|
|
623
|
-
* @description Price per share (0.0–1.0) — the value that triggered the notification
|
|
624
|
-
*/
|
|
602
|
+
/** @enum {string} */
|
|
603
|
+
side: "Buy" | "Sell";
|
|
604
|
+
/** @description Price that triggered the notification (0.0–1.0) */
|
|
625
605
|
price: number;
|
|
626
|
-
/**
|
|
627
|
-
* Format: double
|
|
628
|
-
* @description Implied probability of the outcome (0.0–1.0)
|
|
629
|
-
*/
|
|
606
|
+
/** @description Implied probability (0.0–1.0) */
|
|
630
607
|
probability?: number | null;
|
|
631
|
-
/** @description Which bond zone was entered: `"high"` (YES near-certain) or `"low"` (NO near-certain) */
|
|
632
|
-
bond_side: string;
|
|
633
608
|
/**
|
|
634
|
-
*
|
|
635
|
-
* @
|
|
609
|
+
* @description "high" when near YES (price ≥ threshold), "low" when near NO (price ≤ threshold)
|
|
610
|
+
* @enum {string}
|
|
636
611
|
*/
|
|
612
|
+
bond_side: "high" | "low";
|
|
613
|
+
/** @description The probability threshold from the subscription filter that was breached */
|
|
637
614
|
threshold: number;
|
|
638
615
|
};
|
|
639
|
-
/** @description
|
|
616
|
+
/** @description Payload delivered when a market's volume or transaction metrics cross a configured threshold */
|
|
640
617
|
ConditionMetricsPayload: {
|
|
618
|
+
/** @description Market condition ID */
|
|
641
619
|
condition_id?: string | null;
|
|
620
|
+
/** @description Aggregation window (e.g. "1h", "24h") */
|
|
642
621
|
timeframe?: string | null;
|
|
643
|
-
/**
|
|
622
|
+
/** @description Total trading volume in USD for this timeframe */
|
|
644
623
|
volume_usd?: number | null;
|
|
645
|
-
/**
|
|
624
|
+
/** @description Total fees collected in USD */
|
|
646
625
|
fees?: number | null;
|
|
647
|
-
/**
|
|
626
|
+
/**
|
|
627
|
+
* Format: int64
|
|
628
|
+
* @description Total number of transactions
|
|
629
|
+
*/
|
|
648
630
|
txns?: number | null;
|
|
649
|
-
/**
|
|
631
|
+
/**
|
|
632
|
+
* Format: int64
|
|
633
|
+
* @description Number of unique traders
|
|
634
|
+
*/
|
|
650
635
|
unique_traders?: number | null;
|
|
651
636
|
};
|
|
652
637
|
/** @description Request body for creating a webhook */
|
|
@@ -665,26 +650,42 @@ export interface components {
|
|
|
665
650
|
DeleteWebhookResponse: {
|
|
666
651
|
deleted: boolean;
|
|
667
652
|
};
|
|
668
|
-
/** @description
|
|
653
|
+
/** @description Payload delivered when an event's aggregated volume or transaction metrics cross a configured threshold */
|
|
669
654
|
EventMetricsPayload: {
|
|
655
|
+
/** @description Event slug */
|
|
670
656
|
event_slug?: string | null;
|
|
657
|
+
/** @description Aggregation window (e.g. "1h", "24h") */
|
|
671
658
|
timeframe?: string | null;
|
|
672
|
-
/**
|
|
659
|
+
/** @description Total aggregated volume across all markets in the event (USD) */
|
|
673
660
|
volume_usd?: number | null;
|
|
674
|
-
/**
|
|
661
|
+
/** @description Total fees collected in USD */
|
|
675
662
|
fees?: number | null;
|
|
676
|
-
/**
|
|
663
|
+
/**
|
|
664
|
+
* Format: int64
|
|
665
|
+
* @description Total number of transactions
|
|
666
|
+
*/
|
|
677
667
|
txns?: number | null;
|
|
678
|
-
/**
|
|
668
|
+
/**
|
|
669
|
+
* Format: int64
|
|
670
|
+
* @description Number of unique traders
|
|
671
|
+
*/
|
|
679
672
|
unique_traders?: number | null;
|
|
680
673
|
};
|
|
681
|
-
/** @description
|
|
674
|
+
/** @description Payload delivered when a trader's per-event PnL crosses a configured threshold */
|
|
682
675
|
EventPnlPayload: {
|
|
676
|
+
/** @description Trader wallet address (lowercase) */
|
|
683
677
|
trader?: string | null;
|
|
678
|
+
/** @description Event slug */
|
|
684
679
|
event_slug?: string | null;
|
|
685
|
-
/**
|
|
686
|
-
|
|
687
|
-
|
|
680
|
+
/**
|
|
681
|
+
* @description PnL aggregation window
|
|
682
|
+
* @enum {string}
|
|
683
|
+
*/
|
|
684
|
+
timeframe: "1d" | "7d" | "30d" | "lifetime";
|
|
685
|
+
/**
|
|
686
|
+
* Format: int64
|
|
687
|
+
* @description Number of distinct markets traded in this event
|
|
688
|
+
*/
|
|
688
689
|
markets_traded?: number | null;
|
|
689
690
|
/** Format: int64 */
|
|
690
691
|
outcomes_traded?: number | null;
|
|
@@ -696,47 +697,41 @@ export interface components {
|
|
|
696
697
|
total_redemptions?: number | null;
|
|
697
698
|
/** Format: int64 */
|
|
698
699
|
total_merges?: number | null;
|
|
699
|
-
/**
|
|
700
|
+
/** @description Total volume in USD */
|
|
700
701
|
total_volume_usd?: number | null;
|
|
701
|
-
/** Format: double */
|
|
702
702
|
buy_usd?: number | null;
|
|
703
|
-
/** Format: double */
|
|
704
703
|
sell_usd?: number | null;
|
|
705
|
-
/** Format: double */
|
|
706
704
|
redemption_usd?: number | null;
|
|
707
|
-
/** Format: double */
|
|
708
705
|
merge_usd?: number | null;
|
|
709
|
-
/**
|
|
706
|
+
/** @description Realized PnL in USD for this event */
|
|
710
707
|
realized_pnl_usd?: number | null;
|
|
711
708
|
/** Format: int64 */
|
|
712
709
|
winning_markets?: number | null;
|
|
713
710
|
/** Format: int64 */
|
|
714
711
|
losing_markets?: number | null;
|
|
715
|
-
/** Format: double */
|
|
716
712
|
total_fees?: number | null;
|
|
717
|
-
/**
|
|
713
|
+
/**
|
|
714
|
+
* Format: int64
|
|
715
|
+
* @description Unix seconds
|
|
716
|
+
*/
|
|
718
717
|
first_trade_at?: number | null;
|
|
719
|
-
/**
|
|
718
|
+
/**
|
|
719
|
+
* Format: int64
|
|
720
|
+
* @description Unix seconds
|
|
721
|
+
*/
|
|
720
722
|
last_trade_at?: number | null;
|
|
721
723
|
};
|
|
722
|
-
/** @description
|
|
724
|
+
/** @description Payload delivered when an event's aggregated trading volume crosses a USD milestone */
|
|
723
725
|
EventVolumeMilestonePayload: {
|
|
726
|
+
/** @description Event slug */
|
|
724
727
|
event_slug: string;
|
|
728
|
+
/** @description Aggregation window (e.g. "1h", "24h") */
|
|
725
729
|
timeframe: string;
|
|
726
|
-
/**
|
|
727
|
-
* Format: double
|
|
728
|
-
* @description Milestone amount reached (USD)
|
|
729
|
-
*/
|
|
730
|
+
/** @description The USD milestone amount that was crossed */
|
|
730
731
|
milestone_usd: number;
|
|
731
|
-
/**
|
|
732
|
-
* Format: double
|
|
733
|
-
* @description Current volume (USD) that triggered the milestone
|
|
734
|
-
*/
|
|
732
|
+
/** @description Current aggregated event volume at time of trigger (USD) */
|
|
735
733
|
current_volume_usd: number;
|
|
736
|
-
/**
|
|
737
|
-
* Format: double
|
|
738
|
-
* @description Total fees collected in this timeframe
|
|
739
|
-
*/
|
|
734
|
+
/** @description Total fees in USD for this timeframe */
|
|
740
735
|
fees: number;
|
|
741
736
|
/**
|
|
742
737
|
* Format: int64
|
|
@@ -744,67 +739,47 @@ export interface components {
|
|
|
744
739
|
*/
|
|
745
740
|
txns: number;
|
|
746
741
|
};
|
|
747
|
-
/** @description
|
|
742
|
+
/** @description Payload delivered when an event's aggregated volume in a timeframe exceeds the configured baseline by the spike ratio */
|
|
748
743
|
EventVolumeSpikePayload: {
|
|
744
|
+
/** @description Event slug */
|
|
749
745
|
event_slug: string;
|
|
746
|
+
/** @description Aggregation window (e.g. "1h", "24h") */
|
|
750
747
|
timeframe: string;
|
|
751
|
-
/**
|
|
752
|
-
* Format: double
|
|
753
|
-
* @description Current aggregated event volume that triggered the spike (USD)
|
|
754
|
-
*/
|
|
748
|
+
/** @description Current aggregated event volume at time of trigger (USD) */
|
|
755
749
|
current_volume_usd: number;
|
|
756
|
-
/**
|
|
757
|
-
* Format: double
|
|
758
|
-
* @description User's baseline volume for comparison (USD)
|
|
759
|
-
*/
|
|
750
|
+
/** @description User-configured baseline volume (USD) */
|
|
760
751
|
baseline_volume_usd: number;
|
|
761
|
-
/**
|
|
762
|
-
* Format: double
|
|
763
|
-
* @description Spike ratio threshold that was triggered
|
|
764
|
-
*/
|
|
752
|
+
/** @description Spike ratio threshold triggered (e.g. 2.0 for 2x) */
|
|
765
753
|
spike_ratio: number;
|
|
766
|
-
/**
|
|
767
|
-
* Format: double
|
|
768
|
-
* @description Calculated threshold that was crossed (baseline * ratio)
|
|
769
|
-
*/
|
|
754
|
+
/** @description Calculated threshold = baseline × ratio (USD) */
|
|
770
755
|
threshold_usd: number;
|
|
771
|
-
/**
|
|
772
|
-
* Format: int64
|
|
773
|
-
* @description Total transactions in this timeframe
|
|
774
|
-
*/
|
|
756
|
+
/** Format: int64 */
|
|
775
757
|
txns: number;
|
|
776
|
-
/**
|
|
777
|
-
* Format: double
|
|
778
|
-
* @description Total fees in this timeframe
|
|
779
|
-
*/
|
|
780
758
|
fees: number;
|
|
781
759
|
};
|
|
782
|
-
/** @description
|
|
760
|
+
/** @description Payload delivered when a tracked trader executes their first-ever trade on Polymarket */
|
|
783
761
|
FirstTradePayload: {
|
|
784
|
-
/** @description
|
|
762
|
+
/** @description Limit-order maker wallet address (lowercase) */
|
|
785
763
|
trader: string;
|
|
786
|
-
/** @description
|
|
764
|
+
/** @description Order filler wallet address (lowercase) */
|
|
787
765
|
taker: string;
|
|
788
|
-
/** @description
|
|
766
|
+
/** @description ERC-1155 outcome token ID */
|
|
789
767
|
position_id: string;
|
|
790
|
-
/** @description
|
|
768
|
+
/** @description Parent market condition ID (0x-prefixed hex) */
|
|
791
769
|
condition_id?: string | null;
|
|
792
|
-
/** @description
|
|
770
|
+
/** @description Outcome name (e.g. "Yes", "No") */
|
|
793
771
|
outcome?: string | null;
|
|
794
|
-
/**
|
|
795
|
-
* Format: int32
|
|
796
|
-
* @description Outcome index (0 = Yes, 1 = No)
|
|
797
|
-
*/
|
|
772
|
+
/** @description Outcome index: 0 = Yes/Up, 1 = No */
|
|
798
773
|
outcome_index?: number | null;
|
|
799
|
-
/** @description Market question
|
|
774
|
+
/** @description Market question text */
|
|
800
775
|
question?: string | null;
|
|
801
|
-
/** @description Market slug
|
|
776
|
+
/** @description Market slug */
|
|
802
777
|
market_slug?: string | null;
|
|
803
|
-
/** @description
|
|
778
|
+
/** @description Parent event slug */
|
|
804
779
|
event_slug?: string | null;
|
|
805
|
-
/** @description
|
|
780
|
+
/** @description Unique trade identifier */
|
|
806
781
|
trade_id: string;
|
|
807
|
-
/** @description Transaction hash
|
|
782
|
+
/** @description Transaction hash */
|
|
808
783
|
hash: string;
|
|
809
784
|
/**
|
|
810
785
|
* Format: int64
|
|
@@ -813,114 +788,149 @@ export interface components {
|
|
|
813
788
|
block: number;
|
|
814
789
|
/**
|
|
815
790
|
* Format: int64
|
|
816
|
-
* @description
|
|
791
|
+
* @description Block confirmation timestamp (Unix seconds)
|
|
817
792
|
*/
|
|
818
793
|
confirmed_at: number;
|
|
819
|
-
/**
|
|
794
|
+
/** @description USD size of the trade (6 decimal places) */
|
|
820
795
|
amount_usd: number;
|
|
821
|
-
/**
|
|
796
|
+
/** @description Outcome shares traded (6 decimal places) */
|
|
822
797
|
shares_amount: number;
|
|
823
|
-
/**
|
|
798
|
+
/** @description Fee paid in USD (6 decimal places) */
|
|
824
799
|
fee: number;
|
|
825
|
-
/** @description Trade side (Buy/Sell, zero-copy Arc) */
|
|
826
|
-
side: string;
|
|
827
800
|
/**
|
|
828
|
-
*
|
|
829
|
-
* @
|
|
801
|
+
* @description Trade direction
|
|
802
|
+
* @enum {string}
|
|
830
803
|
*/
|
|
804
|
+
side: "Buy" | "Sell";
|
|
805
|
+
/** @description Outcome token price (0.0–1.0) */
|
|
831
806
|
price: number;
|
|
807
|
+
/** @description Exchange identifier */
|
|
832
808
|
exchange: string;
|
|
809
|
+
/** @description Trade type identifier */
|
|
833
810
|
trade_type: string;
|
|
834
811
|
};
|
|
835
|
-
/** @description
|
|
812
|
+
/** @description Payload delivered when a trader's global PnL (across all markets) crosses a configured threshold */
|
|
836
813
|
GlobalPnlPayload: {
|
|
814
|
+
/** @description Trader wallet address (lowercase) */
|
|
837
815
|
trader?: string | null;
|
|
838
|
-
/**
|
|
839
|
-
|
|
840
|
-
|
|
816
|
+
/**
|
|
817
|
+
* @description PnL aggregation window
|
|
818
|
+
* @enum {string}
|
|
819
|
+
*/
|
|
820
|
+
timeframe: "1d" | "7d" | "30d" | "lifetime";
|
|
821
|
+
/** @description Realized PnL in USD (positive = profit, negative = loss) */
|
|
841
822
|
realized_pnl_usd?: number | null;
|
|
842
|
-
/**
|
|
823
|
+
/**
|
|
824
|
+
* Format: int64
|
|
825
|
+
* @description Number of distinct events traded
|
|
826
|
+
*/
|
|
843
827
|
events_traded?: number | null;
|
|
844
|
-
/**
|
|
828
|
+
/**
|
|
829
|
+
* Format: int64
|
|
830
|
+
* @description Number of distinct markets traded
|
|
831
|
+
*/
|
|
845
832
|
markets_traded?: number | null;
|
|
846
|
-
/**
|
|
833
|
+
/**
|
|
834
|
+
* Format: int64
|
|
835
|
+
* @description Total buy transactions
|
|
836
|
+
*/
|
|
847
837
|
total_buys?: number | null;
|
|
848
|
-
/**
|
|
838
|
+
/**
|
|
839
|
+
* Format: int64
|
|
840
|
+
* @description Total sell transactions
|
|
841
|
+
*/
|
|
849
842
|
total_sells?: number | null;
|
|
850
|
-
/**
|
|
843
|
+
/**
|
|
844
|
+
* Format: int64
|
|
845
|
+
* @description Total redemption transactions
|
|
846
|
+
*/
|
|
851
847
|
total_redemptions?: number | null;
|
|
852
|
-
/**
|
|
848
|
+
/**
|
|
849
|
+
* Format: int64
|
|
850
|
+
* @description Total merge transactions
|
|
851
|
+
*/
|
|
853
852
|
total_merges?: number | null;
|
|
854
|
-
/**
|
|
853
|
+
/** @description Total USD volume (buys + sells + redemptions + merges) */
|
|
855
854
|
total_volume_usd?: number | null;
|
|
856
|
-
/**
|
|
855
|
+
/** @description Total buy volume in USD */
|
|
857
856
|
buy_volume_usd?: number | null;
|
|
858
|
-
/**
|
|
857
|
+
/** @description Total sell volume in USD */
|
|
859
858
|
sell_volume_usd?: number | null;
|
|
860
|
-
/**
|
|
859
|
+
/** @description Total redemption volume in USD */
|
|
861
860
|
redemption_volume_usd?: number | null;
|
|
862
|
-
/**
|
|
861
|
+
/** @description Total merge volume in USD */
|
|
863
862
|
merge_volume_usd?: number | null;
|
|
864
|
-
/**
|
|
863
|
+
/**
|
|
864
|
+
* Format: int64
|
|
865
|
+
* @description Number of markets where trader realised a profit
|
|
866
|
+
*/
|
|
865
867
|
markets_won?: number | null;
|
|
866
|
-
/**
|
|
868
|
+
/**
|
|
869
|
+
* Format: int64
|
|
870
|
+
* @description Number of markets where trader realised a loss
|
|
871
|
+
*/
|
|
867
872
|
markets_lost?: number | null;
|
|
868
|
-
/**
|
|
873
|
+
/** @description Market win rate as a percentage (0.0–100.0) */
|
|
869
874
|
market_win_rate_pct?: number | null;
|
|
870
|
-
/**
|
|
875
|
+
/** @description Average PnL per market in USD */
|
|
871
876
|
avg_pnl_per_market?: number | null;
|
|
872
|
-
/**
|
|
877
|
+
/** @description Average PnL per trade in USD */
|
|
873
878
|
avg_pnl_per_trade?: number | null;
|
|
874
|
-
/**
|
|
879
|
+
/** @description Average hold time across all positions (seconds) */
|
|
875
880
|
avg_hold_time_seconds?: number | null;
|
|
876
|
-
/**
|
|
881
|
+
/** @description Total fees paid in USD */
|
|
877
882
|
total_fees?: number | null;
|
|
878
|
-
/**
|
|
883
|
+
/** @description Best single-trade PnL in USD */
|
|
879
884
|
best_trade_pnl_usd?: number | null;
|
|
885
|
+
/** @description Condition ID of the best trade */
|
|
880
886
|
best_trade_condition_id?: string | null;
|
|
881
|
-
/**
|
|
887
|
+
/** @description Worst single-trade PnL in USD */
|
|
882
888
|
worst_trade_pnl_usd?: number | null;
|
|
889
|
+
/** @description Condition ID of the worst trade */
|
|
883
890
|
worst_trade_condition_id?: string | null;
|
|
884
|
-
/**
|
|
891
|
+
/**
|
|
892
|
+
* Format: int64
|
|
893
|
+
* @description Timestamp of the first trade (Unix seconds)
|
|
894
|
+
*/
|
|
885
895
|
first_trade_at?: number | null;
|
|
886
|
-
/**
|
|
896
|
+
/**
|
|
897
|
+
* Format: int64
|
|
898
|
+
* @description Timestamp of the most recent trade (Unix seconds)
|
|
899
|
+
*/
|
|
887
900
|
last_trade_at?: number | null;
|
|
888
901
|
};
|
|
889
902
|
/** @description Response for GET /v1/webhook/events */
|
|
890
903
|
ListEventsResponse: {
|
|
891
904
|
events: components["schemas"]["WebhookEventInfo"][];
|
|
892
905
|
};
|
|
893
|
-
/** @description
|
|
906
|
+
/** @description An outcome entry within a newly created market */
|
|
894
907
|
MarketCreatedOutcome: {
|
|
895
|
-
/**
|
|
896
|
-
* Format: int32
|
|
897
|
-
* @description Outcome index (0 = Yes, 1 = No)
|
|
898
|
-
*/
|
|
908
|
+
/** @description Outcome index (0 = Yes, 1 = No) */
|
|
899
909
|
index: number;
|
|
900
910
|
/** @description Outcome name (e.g. "Yes", "No") */
|
|
901
911
|
name: string;
|
|
902
|
-
/** @description
|
|
912
|
+
/** @description ERC-1155 position token ID for this outcome */
|
|
903
913
|
position_id: string;
|
|
904
914
|
};
|
|
905
|
-
/** @description
|
|
915
|
+
/** @description Payload delivered when a new prediction market is detected on-chain and enriched with Gamma API metadata */
|
|
906
916
|
MarketCreatedPayload: {
|
|
907
917
|
/** @description Condition ID (0x-prefixed hex, lowercase) */
|
|
908
918
|
condition_id: string;
|
|
909
919
|
/** @description Market slug */
|
|
910
920
|
market_slug: string;
|
|
911
|
-
/** @description
|
|
921
|
+
/** @description Parent event slug */
|
|
912
922
|
event_slug?: string | null;
|
|
913
|
-
/** @description
|
|
923
|
+
/** @description Parent event ID */
|
|
914
924
|
event_id?: string | null;
|
|
915
|
-
/** @description
|
|
925
|
+
/** @description Parent event title */
|
|
916
926
|
event_title?: string | null;
|
|
917
|
-
/** @description Series slug */
|
|
927
|
+
/** @description Series slug (for recurring markets) */
|
|
918
928
|
series_slug?: string | null;
|
|
919
|
-
/** @description
|
|
929
|
+
/** @description List of market outcomes with their position IDs */
|
|
920
930
|
outcomes: components["schemas"]["MarketCreatedOutcome"][];
|
|
921
|
-
/** @description
|
|
931
|
+
/** @description Full market question text */
|
|
922
932
|
question: string;
|
|
923
|
-
/** @description
|
|
933
|
+
/** @description Short display title */
|
|
924
934
|
title?: string | null;
|
|
925
935
|
/** @description Market description */
|
|
926
936
|
description: string;
|
|
@@ -932,25 +942,24 @@ export interface components {
|
|
|
932
942
|
image_url?: string | null;
|
|
933
943
|
/** @description Whether this is a neg-risk market */
|
|
934
944
|
neg_risk: boolean;
|
|
935
|
-
/**
|
|
936
|
-
* Format: int64
|
|
937
|
-
* @description Block number where ConditionPreparation was emitted
|
|
938
|
-
*/
|
|
939
|
-
block: number;
|
|
940
|
-
/**
|
|
941
|
-
* Format: int64
|
|
942
|
-
* @description Block timestamp (Unix seconds)
|
|
943
|
-
*/
|
|
944
|
-
block_timestamp: number;
|
|
945
945
|
};
|
|
946
|
-
/** @description
|
|
946
|
+
/** @description Payload delivered when a trader's per-market PnL crosses a configured threshold */
|
|
947
947
|
MarketPnlPayload: {
|
|
948
|
+
/** @description Trader wallet address (lowercase) */
|
|
948
949
|
trader?: string | null;
|
|
950
|
+
/** @description Market condition ID */
|
|
949
951
|
condition_id?: string | null;
|
|
952
|
+
/** @description Parent event slug */
|
|
950
953
|
event_slug?: string | null;
|
|
951
|
-
/**
|
|
952
|
-
|
|
953
|
-
|
|
954
|
+
/**
|
|
955
|
+
* @description PnL aggregation window
|
|
956
|
+
* @enum {string}
|
|
957
|
+
*/
|
|
958
|
+
timeframe: "1d" | "7d" | "30d" | "lifetime";
|
|
959
|
+
/**
|
|
960
|
+
* Format: int64
|
|
961
|
+
* @description Number of distinct outcomes traded in this market
|
|
962
|
+
*/
|
|
954
963
|
outcomes_traded?: number | null;
|
|
955
964
|
/** Format: int64 */
|
|
956
965
|
total_buys?: number | null;
|
|
@@ -960,89 +969,77 @@ export interface components {
|
|
|
960
969
|
total_redemptions?: number | null;
|
|
961
970
|
/** Format: int64 */
|
|
962
971
|
total_merges?: number | null;
|
|
963
|
-
/**
|
|
972
|
+
/** @description Total buy volume in USD */
|
|
964
973
|
buy_usd?: number | null;
|
|
965
|
-
/**
|
|
974
|
+
/** @description Total sell volume in USD */
|
|
966
975
|
sell_usd?: number | null;
|
|
967
|
-
/**
|
|
976
|
+
/** @description Total redemption volume in USD */
|
|
968
977
|
redemption_usd?: number | null;
|
|
969
|
-
/**
|
|
978
|
+
/** @description Total merge volume in USD */
|
|
970
979
|
merge_usd?: number | null;
|
|
971
|
-
/**
|
|
980
|
+
/** @description Realized PnL in USD for this market */
|
|
972
981
|
realized_pnl_usd?: number | null;
|
|
973
|
-
/**
|
|
982
|
+
/**
|
|
983
|
+
* Format: int64
|
|
984
|
+
* @description Number of outcomes with positive PnL
|
|
985
|
+
*/
|
|
974
986
|
winning_outcomes?: number | null;
|
|
975
|
-
/**
|
|
987
|
+
/** @description Total fees paid in USD for this market */
|
|
976
988
|
total_fees?: number | null;
|
|
977
|
-
/**
|
|
989
|
+
/**
|
|
990
|
+
* Format: int64
|
|
991
|
+
* @description Timestamp of first trade in market (Unix seconds)
|
|
992
|
+
*/
|
|
978
993
|
first_trade_at?: number | null;
|
|
979
|
-
/**
|
|
994
|
+
/**
|
|
995
|
+
* Format: int64
|
|
996
|
+
* @description Timestamp of most recent trade in market (Unix seconds)
|
|
997
|
+
*/
|
|
980
998
|
last_trade_at?: number | null;
|
|
981
999
|
};
|
|
982
|
-
/** @description
|
|
1000
|
+
/** @description Payload delivered when a market's volume in a timeframe exceeds the configured baseline by the spike ratio */
|
|
983
1001
|
MarketVolumeSpikePayload: {
|
|
1002
|
+
/** @description Market condition ID */
|
|
984
1003
|
condition_id: string;
|
|
1004
|
+
/** @description Aggregation window (e.g. "1h", "24h") */
|
|
985
1005
|
timeframe: string;
|
|
986
|
-
/**
|
|
987
|
-
* Format: double
|
|
988
|
-
* @description Current volume that triggered the spike (USD)
|
|
989
|
-
*/
|
|
1006
|
+
/** @description Current volume that triggered the spike (USD) */
|
|
990
1007
|
current_volume_usd: number;
|
|
991
|
-
/**
|
|
992
|
-
* Format: double
|
|
993
|
-
* @description User's baseline volume for comparison (USD)
|
|
994
|
-
*/
|
|
1008
|
+
/** @description User-configured baseline volume for comparison (USD) */
|
|
995
1009
|
baseline_volume_usd: number;
|
|
996
|
-
/**
|
|
997
|
-
* Format: double
|
|
998
|
-
* @description Spike ratio threshold that was triggered
|
|
999
|
-
*/
|
|
1010
|
+
/** @description Spike ratio threshold that was triggered (e.g. 2.0 for 2x) */
|
|
1000
1011
|
spike_ratio: number;
|
|
1001
|
-
/**
|
|
1002
|
-
* Format: double
|
|
1003
|
-
* @description Calculated threshold that was crossed (baseline * ratio)
|
|
1004
|
-
*/
|
|
1012
|
+
/** @description Calculated threshold = baseline × ratio (USD) */
|
|
1005
1013
|
threshold_usd: number;
|
|
1006
1014
|
/**
|
|
1007
1015
|
* Format: int64
|
|
1008
1016
|
* @description Total transactions in this timeframe
|
|
1009
1017
|
*/
|
|
1010
1018
|
txns: number;
|
|
1011
|
-
/**
|
|
1012
|
-
* Format: double
|
|
1013
|
-
* @description Total fees in this timeframe
|
|
1014
|
-
*/
|
|
1019
|
+
/** @description Total fees in USD for this timeframe */
|
|
1015
1020
|
fees: number;
|
|
1016
1021
|
};
|
|
1017
|
-
/**
|
|
1018
|
-
* @description New market entry webhook payload
|
|
1019
|
-
*
|
|
1020
|
-
* Fired when a trader places their first trade in a specific condition/market.
|
|
1021
|
-
* The payload contains the full details of the triggering trade.
|
|
1022
|
-
*/
|
|
1022
|
+
/** @description Payload delivered when a trader places their first trade in a specific market (fires once per trader+market pair) */
|
|
1023
1023
|
NewMarketPayload: {
|
|
1024
|
-
/** @description
|
|
1024
|
+
/** @description Limit-order maker wallet address (lowercase) */
|
|
1025
1025
|
trader: string;
|
|
1026
|
-
/** @description
|
|
1026
|
+
/** @description Order filler wallet address (lowercase) */
|
|
1027
1027
|
taker: string;
|
|
1028
|
-
/** @description
|
|
1028
|
+
/** @description ERC-1155 outcome token ID */
|
|
1029
1029
|
position_id: string;
|
|
1030
|
-
/** @description
|
|
1030
|
+
/** @description Parent market condition ID */
|
|
1031
1031
|
condition_id?: string | null;
|
|
1032
1032
|
/** @description Outcome name (e.g. "Yes", "No") */
|
|
1033
1033
|
outcome?: string | null;
|
|
1034
|
-
/**
|
|
1035
|
-
* Format: int32
|
|
1036
|
-
* @description Outcome index (0 = Yes, 1 = No)
|
|
1037
|
-
*/
|
|
1034
|
+
/** @description Outcome index: 0 = Yes/Up, 1 = No */
|
|
1038
1035
|
outcome_index?: number | null;
|
|
1039
|
-
/** @description Market question */
|
|
1036
|
+
/** @description Market question text */
|
|
1040
1037
|
question?: string | null;
|
|
1041
1038
|
/** @description Market slug */
|
|
1042
1039
|
market_slug?: string | null;
|
|
1043
|
-
/** @description
|
|
1040
|
+
/** @description Parent event slug */
|
|
1044
1041
|
event_slug?: string | null;
|
|
1045
|
-
/** @description
|
|
1042
|
+
/** @description Unique trade identifier */
|
|
1046
1043
|
trade_id: string;
|
|
1047
1044
|
/** @description Transaction hash */
|
|
1048
1045
|
hash: string;
|
|
@@ -1053,37 +1050,27 @@ export interface components {
|
|
|
1053
1050
|
block: number;
|
|
1054
1051
|
/**
|
|
1055
1052
|
* Format: int64
|
|
1056
|
-
* @description
|
|
1053
|
+
* @description Block confirmation timestamp (Unix seconds)
|
|
1057
1054
|
*/
|
|
1058
1055
|
confirmed_at: number;
|
|
1059
|
-
/**
|
|
1060
|
-
* Format: double
|
|
1061
|
-
* @description USD size of the trade
|
|
1062
|
-
*/
|
|
1056
|
+
/** @description USD size of the trade (6 decimal places) */
|
|
1063
1057
|
amount_usd: number;
|
|
1064
|
-
/**
|
|
1065
|
-
* Format: double
|
|
1066
|
-
* @description Outcome shares traded
|
|
1067
|
-
*/
|
|
1058
|
+
/** @description Outcome shares traded (6 decimal places) */
|
|
1068
1059
|
shares_amount: number;
|
|
1069
|
-
/**
|
|
1070
|
-
* Format: double
|
|
1071
|
-
* @description Fee paid (USD)
|
|
1072
|
-
*/
|
|
1060
|
+
/** @description Fee paid in USD (6 decimal places) */
|
|
1073
1061
|
fee: number;
|
|
1074
|
-
/** @description Trade side ("Buy" or "Sell") */
|
|
1075
|
-
side: string;
|
|
1076
1062
|
/**
|
|
1077
|
-
*
|
|
1078
|
-
* @
|
|
1063
|
+
* @description Trade direction
|
|
1064
|
+
* @enum {string}
|
|
1079
1065
|
*/
|
|
1066
|
+
side: "Buy" | "Sell";
|
|
1067
|
+
/** @description Outcome token price (0.0–1.0) */
|
|
1080
1068
|
price: number;
|
|
1081
|
-
/**
|
|
1082
|
-
* Format: double
|
|
1083
|
-
* @description Implied probability (0.0–1.0); None when outcome is unknown
|
|
1084
|
-
*/
|
|
1069
|
+
/** @description Implied probability (0.0–1.0); null when outcome is unknown */
|
|
1085
1070
|
probability?: number | null;
|
|
1071
|
+
/** @description Exchange identifier */
|
|
1086
1072
|
exchange: string;
|
|
1073
|
+
/** @description Trade type identifier */
|
|
1087
1074
|
trade_type: string;
|
|
1088
1075
|
};
|
|
1089
1076
|
/**
|
|
@@ -1115,20 +1102,20 @@ export interface components {
|
|
|
1115
1102
|
* Implements Hash + Eq manually (f64 fields use bit representation)
|
|
1116
1103
|
*/
|
|
1117
1104
|
PolymarketWebhookFilter: {
|
|
1118
|
-
/** @description Filter by wallet addresses (for first_trade, normalized to lowercase) */
|
|
1105
|
+
/** @description Filter by wallet addresses (for first_trade, normalized to lowercase). Max 500 entries. */
|
|
1119
1106
|
wallet_addresses?: string[];
|
|
1120
|
-
/** @description Filter by trader addresses (for PnL webhooks, normalized to lowercase) */
|
|
1107
|
+
/** @description Filter by trader addresses (for PnL webhooks, normalized to lowercase). Max 500 entries. */
|
|
1121
1108
|
traders?: string[];
|
|
1122
|
-
/** @description Filter by market/condition IDs */
|
|
1109
|
+
/** @description Filter by market/condition IDs. Max 500 entries. */
|
|
1123
1110
|
condition_ids?: string[];
|
|
1124
1111
|
/**
|
|
1125
1112
|
* Format: double
|
|
1126
1113
|
* @description Filter by minimum USD value (for trades)
|
|
1127
1114
|
*/
|
|
1128
1115
|
min_usd_value?: number | null;
|
|
1129
|
-
/** @description Filter by event slugs */
|
|
1116
|
+
/** @description Filter by event slugs. Max 500 entries. */
|
|
1130
1117
|
event_slugs?: string[];
|
|
1131
|
-
/** @description Filter by tags */
|
|
1118
|
+
/** @description Filter by tags. Max 500 entries. */
|
|
1132
1119
|
tags?: string[];
|
|
1133
1120
|
/**
|
|
1134
1121
|
* Format: double
|
|
@@ -1185,13 +1172,13 @@ export interface components {
|
|
|
1185
1172
|
* @description Maximum net shares - for position PnL webhooks
|
|
1186
1173
|
*/
|
|
1187
1174
|
max_net_shares?: number | null;
|
|
1188
|
-
/** @description Filter by position IDs - for position PnL webhooks */
|
|
1175
|
+
/** @description Filter by position IDs - for position PnL webhooks. Max 500 entries. */
|
|
1189
1176
|
position_ids?: string[];
|
|
1190
|
-
/** @description Filter by outcomes (e.g., "Yes", "No") - for position PnL webhooks */
|
|
1177
|
+
/** @description Filter by outcomes (e.g., "Yes", "No") - for position PnL webhooks. Max 500 entries. */
|
|
1191
1178
|
outcomes?: string[];
|
|
1192
1179
|
/**
|
|
1193
1180
|
* @description Filter by position outcome index — for close_to_bond. Position 0 usually represents Yes/Up, 1 = No.
|
|
1194
|
-
* When non-empty, only trades whose outcome_index is in this list will match.
|
|
1181
|
+
* When non-empty, only trades whose outcome_index is in this list will match. Max 500 entries.
|
|
1195
1182
|
*/
|
|
1196
1183
|
position_outcome_indices?: number[];
|
|
1197
1184
|
/**
|
|
@@ -1224,9 +1211,9 @@ export interface components {
|
|
|
1224
1211
|
* @description Minimum probability change percentage - for position metrics webhooks
|
|
1225
1212
|
*/
|
|
1226
1213
|
min_probability_change_pct?: number | null;
|
|
1227
|
-
/** @description Timeframes to track - for metrics webhooks (1m, 5m, 30m, 1h, 6h, 24h, 7d, 30d) */
|
|
1214
|
+
/** @description Timeframes to track - for metrics webhooks (1m, 5m, 30m, 1h, 6h, 24h, 7d, 30d). Max 500 entries. */
|
|
1228
1215
|
timeframes?: string[];
|
|
1229
|
-
/** @description Milestone amounts to track - for volume milestone webhooks (e.g., 10000, 100000, 1000000) */
|
|
1216
|
+
/** @description Milestone amounts to track - for volume milestone webhooks (e.g., 10000, 100000, 1000000). Max 500 entries. */
|
|
1230
1217
|
milestone_amounts?: number[];
|
|
1231
1218
|
/**
|
|
1232
1219
|
* Format: double
|
|
@@ -1243,35 +1230,35 @@ export interface components {
|
|
|
1243
1230
|
/**
|
|
1244
1231
|
* @description Exclude short-term trading markets by timeframe (e.g., ["5m", "15m", "30m", "1h"])
|
|
1245
1232
|
* Filters out event slugs containing these timeframe patterns (auto-wrapped: "5m" → "-5m-")
|
|
1246
|
-
* Example: Excludes "btc-updown-5m-1771678800" when "5m" is in the list
|
|
1233
|
+
* Example: Excludes "btc-updown-5m-1771678800" when "5m" is in the list. Max 500 entries.
|
|
1247
1234
|
*/
|
|
1248
1235
|
exclude_shorterm_market_timeframes?: string[];
|
|
1249
1236
|
/**
|
|
1250
1237
|
* @description Filter by crypto asset symbol — for `asset_price_tick` and `asset_price_window_update` webhooks.
|
|
1251
|
-
* Valid values: "BTC", "ETH", "SOL", "XRP". Empty = all assets.
|
|
1238
|
+
* Valid values: "BTC", "ETH", "SOL", "XRP". Empty = all assets. Max 500 entries.
|
|
1252
1239
|
*/
|
|
1253
1240
|
asset_symbols?: string[];
|
|
1254
|
-
/**
|
|
1255
|
-
* @description When `true` (default), skip markets that have no Gamma metadata (title, category, tags).
|
|
1256
|
-
* Bare on-chain markets detected before Gamma enrichment arrives will be suppressed.
|
|
1257
|
-
* Set to `false` to receive all `market_created` events regardless of metadata availability.
|
|
1258
|
-
*/
|
|
1259
|
-
filter_no_metadata?: boolean;
|
|
1260
1241
|
};
|
|
1261
|
-
/** @description
|
|
1242
|
+
/** @description Payload delivered when a position's volume or transaction metrics cross a configured threshold */
|
|
1262
1243
|
PositionMetricsPayload: {
|
|
1244
|
+
/** @description ERC-1155 outcome token ID */
|
|
1263
1245
|
position_id?: string | null;
|
|
1246
|
+
/** @description Outcome name (e.g. "Yes", "No") */
|
|
1264
1247
|
outcome?: string | null;
|
|
1265
|
-
/**
|
|
1248
|
+
/**
|
|
1249
|
+
* Format: int16
|
|
1250
|
+
* @description Outcome index
|
|
1251
|
+
*/
|
|
1266
1252
|
outcome_index?: number | null;
|
|
1253
|
+
/** @description Aggregation window (e.g. "1h", "24h") */
|
|
1267
1254
|
timeframe?: string | null;
|
|
1268
|
-
/**
|
|
1255
|
+
/** @description Total trading volume in USD */
|
|
1269
1256
|
volume_usd?: number | null;
|
|
1270
|
-
/**
|
|
1257
|
+
/** @description Buy volume in USD */
|
|
1271
1258
|
buy_volume_usd?: number | null;
|
|
1272
|
-
/**
|
|
1259
|
+
/** @description Sell volume in USD */
|
|
1273
1260
|
sell_volume_usd?: number | null;
|
|
1274
|
-
/**
|
|
1261
|
+
/** @description Total fees in USD */
|
|
1275
1262
|
fees?: number | null;
|
|
1276
1263
|
/** Format: int64 */
|
|
1277
1264
|
txns?: number | null;
|
|
@@ -1281,156 +1268,101 @@ export interface components {
|
|
|
1281
1268
|
sells?: number | null;
|
|
1282
1269
|
/** Format: int64 */
|
|
1283
1270
|
unique_traders?: number | null;
|
|
1284
|
-
/** Format: double */
|
|
1285
1271
|
price_open?: number | null;
|
|
1286
|
-
/** Format: double */
|
|
1287
1272
|
price_close?: number | null;
|
|
1288
|
-
/** Format: double */
|
|
1289
1273
|
price_high?: number | null;
|
|
1290
|
-
/** Format: double */
|
|
1291
1274
|
price_low?: number | null;
|
|
1292
|
-
/** Format: double */
|
|
1293
1275
|
probability_open?: number | null;
|
|
1294
|
-
/** Format: double */
|
|
1295
1276
|
probability_close?: number | null;
|
|
1296
|
-
/** Format: double */
|
|
1297
1277
|
probability_high?: number | null;
|
|
1298
|
-
/** Format: double */
|
|
1299
1278
|
probability_low?: number | null;
|
|
1300
1279
|
};
|
|
1301
|
-
/** @description
|
|
1280
|
+
/** @description Payload delivered when a position's trading volume crosses a USD milestone */
|
|
1302
1281
|
PositionVolumeMilestonePayload: {
|
|
1282
|
+
/** @description Parent market condition ID */
|
|
1303
1283
|
condition_id?: string | null;
|
|
1284
|
+
/** @description ERC-1155 outcome token ID */
|
|
1304
1285
|
position_id: string;
|
|
1286
|
+
/** @description Outcome name (e.g. "Yes", "No") */
|
|
1305
1287
|
outcome?: string | null;
|
|
1306
|
-
/** Format: int32 */
|
|
1307
|
-
outcome_index?: number | null;
|
|
1308
|
-
timeframe: string;
|
|
1309
1288
|
/**
|
|
1310
|
-
* Format:
|
|
1311
|
-
* @description
|
|
1289
|
+
* Format: int16
|
|
1290
|
+
* @description Outcome index
|
|
1312
1291
|
*/
|
|
1292
|
+
outcome_index?: number | null;
|
|
1293
|
+
/** @description Aggregation window (e.g. "1h", "24h") */
|
|
1294
|
+
timeframe: string;
|
|
1295
|
+
/** @description The USD milestone amount that was crossed */
|
|
1313
1296
|
milestone_usd: number;
|
|
1314
|
-
/**
|
|
1315
|
-
* Format: double
|
|
1316
|
-
* @description Current volume (USD) that triggered the milestone
|
|
1317
|
-
*/
|
|
1297
|
+
/** @description Current position volume at time of trigger (USD) */
|
|
1318
1298
|
current_volume_usd: number;
|
|
1319
|
-
/**
|
|
1320
|
-
* Format: double
|
|
1321
|
-
* @description Buy volume (USD)
|
|
1322
|
-
*/
|
|
1299
|
+
/** @description Buy volume in USD for this timeframe */
|
|
1323
1300
|
buy_volume_usd: number;
|
|
1324
|
-
/**
|
|
1325
|
-
* Format: double
|
|
1326
|
-
* @description Sell volume (USD)
|
|
1327
|
-
*/
|
|
1301
|
+
/** @description Sell volume in USD for this timeframe */
|
|
1328
1302
|
sell_volume_usd: number;
|
|
1329
|
-
/**
|
|
1330
|
-
* Format: double
|
|
1331
|
-
* @description Total fees collected in this timeframe
|
|
1332
|
-
*/
|
|
1303
|
+
/** @description Total fees in USD */
|
|
1333
1304
|
fees: number;
|
|
1334
|
-
/**
|
|
1335
|
-
* Format: int64
|
|
1336
|
-
* @description Total transactions in this timeframe
|
|
1337
|
-
*/
|
|
1305
|
+
/** Format: int64 */
|
|
1338
1306
|
txns: number;
|
|
1339
|
-
/**
|
|
1340
|
-
* Format: int64
|
|
1341
|
-
* @description Buy transactions
|
|
1342
|
-
*/
|
|
1307
|
+
/** Format: int64 */
|
|
1343
1308
|
buys: number;
|
|
1344
|
-
/**
|
|
1345
|
-
* Format: int64
|
|
1346
|
-
* @description Sell transactions
|
|
1347
|
-
*/
|
|
1309
|
+
/** Format: int64 */
|
|
1348
1310
|
sells: number;
|
|
1349
1311
|
};
|
|
1350
|
-
/** @description
|
|
1312
|
+
/** @description Payload delivered when a position's volume in a timeframe exceeds the configured baseline by the spike ratio */
|
|
1351
1313
|
PositionVolumeSpikePayload: {
|
|
1314
|
+
/** @description ERC-1155 outcome token ID */
|
|
1352
1315
|
position_id: string;
|
|
1316
|
+
/** @description Parent market condition ID */
|
|
1353
1317
|
condition_id: string;
|
|
1318
|
+
/** @description Outcome name (e.g. "Yes", "No") */
|
|
1354
1319
|
outcome?: string | null;
|
|
1355
|
-
/** Format:
|
|
1320
|
+
/** Format: int16 */
|
|
1356
1321
|
outcome_index?: number | null;
|
|
1322
|
+
/** @description Aggregation window (e.g. "1h", "24h") */
|
|
1357
1323
|
timeframe: string;
|
|
1358
|
-
/**
|
|
1359
|
-
* Format: double
|
|
1360
|
-
* @description Current position volume that triggered the spike (USD)
|
|
1361
|
-
*/
|
|
1324
|
+
/** @description Current position volume at time of trigger (USD) */
|
|
1362
1325
|
current_volume_usd: number;
|
|
1363
|
-
/**
|
|
1364
|
-
* Format: double
|
|
1365
|
-
* @description User's baseline volume for comparison (USD)
|
|
1366
|
-
*/
|
|
1326
|
+
/** @description User-configured baseline volume (USD) */
|
|
1367
1327
|
baseline_volume_usd: number;
|
|
1368
|
-
/**
|
|
1369
|
-
* Format: double
|
|
1370
|
-
* @description Spike ratio threshold that was triggered
|
|
1371
|
-
*/
|
|
1328
|
+
/** @description Spike ratio threshold triggered (e.g. 2.0 for 2x) */
|
|
1372
1329
|
spike_ratio: number;
|
|
1373
|
-
/**
|
|
1374
|
-
* Format: double
|
|
1375
|
-
* @description Calculated threshold that was crossed (baseline * ratio)
|
|
1376
|
-
*/
|
|
1330
|
+
/** @description Calculated threshold = baseline × ratio (USD) */
|
|
1377
1331
|
threshold_usd: number;
|
|
1378
|
-
/**
|
|
1379
|
-
* Format: int64
|
|
1380
|
-
* @description Total transactions in this timeframe
|
|
1381
|
-
*/
|
|
1332
|
+
/** Format: int64 */
|
|
1382
1333
|
txns: number;
|
|
1383
|
-
/**
|
|
1384
|
-
* Format: double
|
|
1385
|
-
* @description Total fees in this timeframe
|
|
1386
|
-
*/
|
|
1387
1334
|
fees: number;
|
|
1388
1335
|
};
|
|
1389
|
-
/** @description
|
|
1336
|
+
/** @description Payload delivered when a position's probability changes by at least the configured percentage within a timeframe */
|
|
1390
1337
|
ProbabilitySpikePayload: {
|
|
1338
|
+
/** @description ERC-1155 outcome token ID */
|
|
1391
1339
|
position_id: string;
|
|
1340
|
+
/** @description Outcome name (e.g. "Yes", "No") */
|
|
1392
1341
|
outcome?: string | null;
|
|
1393
|
-
/** Format: int32 */
|
|
1394
|
-
outcome_index?: number | null;
|
|
1395
|
-
timeframe: string;
|
|
1396
1342
|
/**
|
|
1397
|
-
* Format:
|
|
1398
|
-
* @description
|
|
1343
|
+
* Format: int16
|
|
1344
|
+
* @description Outcome index
|
|
1399
1345
|
*/
|
|
1346
|
+
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) */
|
|
1400
1350
|
probability_open: number;
|
|
1401
|
-
/**
|
|
1402
|
-
* Format: double
|
|
1403
|
-
* @description Probability at the end of the timeframe (0.0 - 1.0)
|
|
1404
|
-
*/
|
|
1351
|
+
/** @description Probability at the end of the timeframe (0.0–1.0) */
|
|
1405
1352
|
probability_close: number;
|
|
1406
|
-
/**
|
|
1407
|
-
* Format: double
|
|
1408
|
-
* @description Absolute probability change (e.g., 0.25 for 25 percentage points)
|
|
1409
|
-
*/
|
|
1353
|
+
/** @description Absolute probability change (e.g. 0.25 for a 25 percentage-point move) */
|
|
1410
1354
|
probability_change: number;
|
|
1411
|
-
/**
|
|
1412
|
-
* Format: double
|
|
1413
|
-
* @description Percentage change relative to open (e.g., 83.33 for 30% -> 55%)
|
|
1414
|
-
*/
|
|
1355
|
+
/** @description Relative percentage change vs open (e.g. 83.3 for a 30%→55% move). Negative for downward moves. */
|
|
1415
1356
|
probability_change_pct: number;
|
|
1416
|
-
/**
|
|
1417
|
-
* Format: double
|
|
1418
|
-
* @description Price at open (0.0 - 1.0)
|
|
1419
|
-
*/
|
|
1357
|
+
/** @description Outcome token price at timeframe open */
|
|
1420
1358
|
price_open: number;
|
|
1421
|
-
/**
|
|
1422
|
-
* Format: double
|
|
1423
|
-
* @description Price at close (0.0 - 1.0)
|
|
1424
|
-
*/
|
|
1359
|
+
/** @description Outcome token price at timeframe close */
|
|
1425
1360
|
price_close: number;
|
|
1426
|
-
/**
|
|
1427
|
-
* Format: double
|
|
1428
|
-
* @description Volume during the timeframe (USD)
|
|
1429
|
-
*/
|
|
1361
|
+
/** @description Total USD volume during the timeframe */
|
|
1430
1362
|
volume_usd: number;
|
|
1431
1363
|
/**
|
|
1432
1364
|
* Format: int64
|
|
1433
|
-
* @description Number of transactions
|
|
1365
|
+
* @description Number of transactions during the timeframe
|
|
1434
1366
|
*/
|
|
1435
1367
|
txns: number;
|
|
1436
1368
|
};
|
|
@@ -1456,24 +1388,17 @@ export interface components {
|
|
|
1456
1388
|
/** @description Description/name */
|
|
1457
1389
|
description?: string | null;
|
|
1458
1390
|
};
|
|
1459
|
-
/** @description
|
|
1391
|
+
/** @description Payload delivered when a market's trading volume crosses a USD milestone in the specified timeframe */
|
|
1460
1392
|
VolumeMilestonePayload: {
|
|
1393
|
+
/** @description Market condition ID */
|
|
1461
1394
|
condition_id: string;
|
|
1395
|
+
/** @description Aggregation window that crossed the milestone (e.g. "1h", "24h") */
|
|
1462
1396
|
timeframe: string;
|
|
1463
|
-
/**
|
|
1464
|
-
* Format: double
|
|
1465
|
-
* @description Milestone amount reached (USD)
|
|
1466
|
-
*/
|
|
1397
|
+
/** @description The USD milestone amount that was crossed */
|
|
1467
1398
|
milestone_usd: number;
|
|
1468
|
-
/**
|
|
1469
|
-
* Format: double
|
|
1470
|
-
* @description Current volume (USD) that triggered the milestone
|
|
1471
|
-
*/
|
|
1399
|
+
/** @description Current volume at time of trigger (USD) */
|
|
1472
1400
|
current_volume_usd: number;
|
|
1473
|
-
/**
|
|
1474
|
-
* Format: double
|
|
1475
|
-
* @description Total fees collected in this timeframe
|
|
1476
|
-
*/
|
|
1401
|
+
/** @description Total fees in USD for this timeframe */
|
|
1477
1402
|
fees: number;
|
|
1478
1403
|
/**
|
|
1479
1404
|
* Format: int64
|
|
@@ -1499,19 +1424,19 @@ export interface components {
|
|
|
1499
1424
|
};
|
|
1500
1425
|
/** @description Webhook filters request body */
|
|
1501
1426
|
WebhookFiltersBody: {
|
|
1502
|
-
/** @description Filter by wallet addresses (for first_trade / new_market / whale_trade) */
|
|
1427
|
+
/** @description Filter by wallet addresses (for first_trade / new_market / whale_trade). Max 500 entries. */
|
|
1503
1428
|
wallet_addresses?: string[];
|
|
1504
|
-
/** @description Filter by trader addresses (for PnL webhooks) */
|
|
1429
|
+
/** @description Filter by trader addresses (for PnL webhooks). Max 500 entries. */
|
|
1505
1430
|
traders?: string[];
|
|
1506
|
-
/** @description Filter by market/condition IDs */
|
|
1431
|
+
/** @description Filter by market/condition IDs. Max 500 entries. */
|
|
1507
1432
|
condition_ids?: string[];
|
|
1508
|
-
/** @description Filter by position IDs (for position metrics / close_to_bond) */
|
|
1433
|
+
/** @description Filter by position IDs (for position metrics / close_to_bond). Max 500 entries. */
|
|
1509
1434
|
position_ids?: string[];
|
|
1510
|
-
/** @description Filter by event slugs */
|
|
1435
|
+
/** @description Filter by event slugs. Max 500 entries. */
|
|
1511
1436
|
event_slugs?: string[];
|
|
1512
|
-
/** @description Filter by outcomes (e.g. "Yes", "No") — for position metrics / close_to_bond */
|
|
1437
|
+
/** @description Filter by outcomes (e.g. "Yes", "No") — for position metrics / close_to_bond. Max 500 entries. */
|
|
1513
1438
|
outcomes?: string[];
|
|
1514
|
-
/** @description Filter by position outcome index — for close_to_bond. Position 0 = Yes/Up, 1 = No. */
|
|
1439
|
+
/** @description Filter by position outcome index — for close_to_bond. Position 0 = Yes/Up, 1 = No. Max 500 entries. */
|
|
1515
1440
|
position_outcome_indices?: number[];
|
|
1516
1441
|
/**
|
|
1517
1442
|
* Format: double
|
|
@@ -1596,10 +1521,10 @@ export interface components {
|
|
|
1596
1521
|
/**
|
|
1597
1522
|
* @description Timeframes to filter by (e.g. ["1h", "24h", "7d"]) — **required** for volume_milestone
|
|
1598
1523
|
* webhooks (market/event/position), optional for metrics webhooks.
|
|
1599
|
-
* Valid values: "1m", "5m", "30m", "1h", "6h", "24h", "7d", "30d".
|
|
1524
|
+
* Valid values: "1m", "5m", "30m", "1h", "6h", "24h", "7d", "30d". Max 500 entries.
|
|
1600
1525
|
*/
|
|
1601
1526
|
timeframes?: string[];
|
|
1602
|
-
/** @description Milestone amounts to trigger on (USD) — for volume_milestone webhooks */
|
|
1527
|
+
/** @description Milestone amounts to trigger on (USD) — for volume_milestone webhooks. Max 500 entries. */
|
|
1603
1528
|
milestone_amounts?: number[];
|
|
1604
1529
|
/**
|
|
1605
1530
|
* Format: double
|
|
@@ -1611,11 +1536,11 @@ export interface components {
|
|
|
1611
1536
|
* @description Spike ratio multiplier (must be > 1.0) — for volume_spike. E.g. 2.0 for 2x baseline
|
|
1612
1537
|
*/
|
|
1613
1538
|
spike_ratio?: number | null;
|
|
1614
|
-
/** @description Exclude short-term trading markets by timeframe pattern (e.g. ["5m", "15m"]) */
|
|
1539
|
+
/** @description Exclude short-term trading markets by timeframe pattern (e.g. ["5m", "15m"]). Max 500 entries. */
|
|
1615
1540
|
exclude_shorterm_market_timeframes?: string[];
|
|
1616
1541
|
/**
|
|
1617
1542
|
* @description Filter by crypto asset symbol — for `asset_price_tick` and `asset_price_window_update`.
|
|
1618
|
-
* Valid values: "BTC", "ETH", "SOL", "XRP". Empty = all assets (send everything).
|
|
1543
|
+
* Valid values: "BTC", "ETH", "SOL", "XRP". Empty = all assets (send everything). Max 500 entries.
|
|
1619
1544
|
*/
|
|
1620
1545
|
asset_symbols?: string[];
|
|
1621
1546
|
};
|
|
@@ -1680,30 +1605,27 @@ export interface components {
|
|
|
1680
1605
|
*/
|
|
1681
1606
|
duration_ms: number;
|
|
1682
1607
|
};
|
|
1683
|
-
/** @description
|
|
1608
|
+
/** @description Payload delivered when a trade exceeds the configured size and probability thresholds */
|
|
1684
1609
|
WhaleTradePayload: {
|
|
1685
|
-
/** @description
|
|
1610
|
+
/** @description Limit-order maker wallet address (lowercase) */
|
|
1686
1611
|
trader: string;
|
|
1687
|
-
/** @description
|
|
1612
|
+
/** @description Order filler wallet address (lowercase) */
|
|
1688
1613
|
taker: string;
|
|
1689
|
-
/** @description
|
|
1614
|
+
/** @description ERC-1155 outcome token ID */
|
|
1690
1615
|
position_id: string;
|
|
1691
|
-
/** @description
|
|
1616
|
+
/** @description Parent market condition ID */
|
|
1692
1617
|
condition_id?: string | null;
|
|
1693
1618
|
/** @description Outcome name (e.g. "Yes", "No") */
|
|
1694
1619
|
outcome?: string | null;
|
|
1695
|
-
/**
|
|
1696
|
-
* Format: int32
|
|
1697
|
-
* @description Outcome index (0 = Yes, 1 = No)
|
|
1698
|
-
*/
|
|
1620
|
+
/** @description Outcome index: 0 = Yes/Up, 1 = No */
|
|
1699
1621
|
outcome_index?: number | null;
|
|
1700
|
-
/** @description Market question */
|
|
1622
|
+
/** @description Market question text */
|
|
1701
1623
|
question?: string | null;
|
|
1702
1624
|
/** @description Market slug */
|
|
1703
1625
|
market_slug?: string | null;
|
|
1704
|
-
/** @description
|
|
1626
|
+
/** @description Parent event slug */
|
|
1705
1627
|
event_slug?: string | null;
|
|
1706
|
-
/** @description
|
|
1628
|
+
/** @description Unique trade identifier */
|
|
1707
1629
|
trade_id: string;
|
|
1708
1630
|
/** @description Transaction hash */
|
|
1709
1631
|
hash: string;
|
|
@@ -1714,38 +1636,311 @@ export interface components {
|
|
|
1714
1636
|
block: number;
|
|
1715
1637
|
/**
|
|
1716
1638
|
* Format: int64
|
|
1717
|
-
* @description
|
|
1639
|
+
* @description Block confirmation timestamp (Unix seconds)
|
|
1718
1640
|
*/
|
|
1719
1641
|
confirmed_at: number;
|
|
1642
|
+
/** @description USD size of the trade (6 decimal places) */
|
|
1643
|
+
amount_usd: number;
|
|
1644
|
+
/** @description Outcome shares traded (6 decimal places) */
|
|
1645
|
+
shares_amount: number;
|
|
1646
|
+
/** @description Fee paid in USD (6 decimal places) */
|
|
1647
|
+
fee: number;
|
|
1720
1648
|
/**
|
|
1721
|
-
*
|
|
1722
|
-
* @
|
|
1649
|
+
* @description Trade direction
|
|
1650
|
+
* @enum {string}
|
|
1723
1651
|
*/
|
|
1724
|
-
|
|
1652
|
+
side: "Buy" | "Sell";
|
|
1653
|
+
/** @description Outcome token price (0.0–1.0) */
|
|
1654
|
+
price: number;
|
|
1655
|
+
/** @description Implied probability (0.0–1.0); null when outcome is unknown */
|
|
1656
|
+
probability?: number | null;
|
|
1657
|
+
/** @description Exchange identifier */
|
|
1658
|
+
exchange: string;
|
|
1659
|
+
/** @description Trade type identifier */
|
|
1660
|
+
trade_type: string;
|
|
1661
|
+
};
|
|
1662
|
+
/** @description Subscription filters for the `trader_first_trade` event. All fields are optional. */
|
|
1663
|
+
TraderFirstTradeFilters: {
|
|
1664
|
+
/** @description Only fire for trades by these wallet addresses (lowercase). Empty = all traders. */
|
|
1665
|
+
wallet_addresses?: string[];
|
|
1666
|
+
/** @description Restrict to trades in these markets. Empty = all markets. */
|
|
1667
|
+
condition_ids?: string[];
|
|
1668
|
+
/** @description Restrict to trades in markets belonging to these events. */
|
|
1669
|
+
event_slugs?: string[];
|
|
1670
|
+
/** @description Minimum trade size in USD. Omit to match all sizes. */
|
|
1671
|
+
min_usd_value?: number;
|
|
1672
|
+
/** @description Only fire when the outcome probability is ≥ this value. */
|
|
1673
|
+
min_probability?: number;
|
|
1674
|
+
/** @description Only fire when the outcome probability is ≤ this value. */
|
|
1675
|
+
max_probability?: number;
|
|
1676
|
+
};
|
|
1677
|
+
/** @description Subscription filters for the `trader_new_market` event. All fields are optional. */
|
|
1678
|
+
TraderNewMarketFilters: {
|
|
1679
|
+
/** @description Only fire for these wallet addresses (lowercase). Empty = all traders. */
|
|
1680
|
+
wallet_addresses?: string[];
|
|
1681
|
+
/** @description Restrict to these markets. */
|
|
1682
|
+
condition_ids?: string[];
|
|
1683
|
+
/** @description Restrict to markets belonging to these events. */
|
|
1684
|
+
event_slugs?: string[];
|
|
1685
|
+
};
|
|
1686
|
+
/** @description Subscription filters for the `trader_whale_trade` event. All fields are optional. */
|
|
1687
|
+
TraderWhaleTradeFilters: {
|
|
1688
|
+
/** @description Only fire for trades by these wallet addresses. Empty = all traders. */
|
|
1689
|
+
wallet_addresses?: string[];
|
|
1690
|
+
/** @description Restrict to these markets. */
|
|
1691
|
+
condition_ids?: string[];
|
|
1692
|
+
/** @description Restrict to markets belonging to these events. */
|
|
1693
|
+
event_slugs?: string[];
|
|
1725
1694
|
/**
|
|
1726
|
-
*
|
|
1727
|
-
* @
|
|
1695
|
+
* @description Minimum trade size in USD. Defaults to 0 (matches all trades).
|
|
1696
|
+
* @default 0
|
|
1728
1697
|
*/
|
|
1729
|
-
|
|
1698
|
+
min_usd_value: number;
|
|
1699
|
+
/** @description Only fire when outcome probability is ≥ this value. */
|
|
1700
|
+
min_probability?: number;
|
|
1701
|
+
/** @description Only fire when outcome probability is ≤ this value. */
|
|
1702
|
+
max_probability?: number;
|
|
1703
|
+
};
|
|
1704
|
+
/** @description Subscription filters for the `trader_global_pnl` event. All fields are optional. */
|
|
1705
|
+
TraderGlobalPnlFilters: {
|
|
1706
|
+
/** @description Track only these trader wallet addresses. Empty = all traders. */
|
|
1707
|
+
traders?: string[];
|
|
1708
|
+
/** @description Only fire when realized PnL ≥ this value (USD). Use negative values for loss thresholds. */
|
|
1709
|
+
min_realized_pnl_usd?: number;
|
|
1710
|
+
/** @description Only fire when realized PnL ≤ this value (USD). */
|
|
1711
|
+
max_realized_pnl_usd?: number;
|
|
1712
|
+
/** @description Only fire when total trading volume ≥ this value (USD). */
|
|
1713
|
+
min_volume_usd?: number;
|
|
1714
|
+
/** @description Only fire when market win rate ≥ this percentage (0.0–100.0). */
|
|
1715
|
+
min_win_rate?: number;
|
|
1730
1716
|
/**
|
|
1731
|
-
* Format:
|
|
1732
|
-
* @description
|
|
1717
|
+
* Format: int64
|
|
1718
|
+
* @description Only fire when the trader has traded in ≥ this many markets.
|
|
1733
1719
|
*/
|
|
1734
|
-
|
|
1735
|
-
/** @description
|
|
1736
|
-
|
|
1720
|
+
min_markets_traded?: number;
|
|
1721
|
+
/** @description Restrict to these PnL windows. Empty = all windows. */
|
|
1722
|
+
timeframes?: ("1d" | "7d" | "30d" | "lifetime")[];
|
|
1723
|
+
};
|
|
1724
|
+
/** @description Subscription filters for the `trader_market_pnl` event. All fields are optional. */
|
|
1725
|
+
TraderMarketPnlFilters: {
|
|
1726
|
+
/** @description Track only these trader wallet addresses. */
|
|
1727
|
+
traders?: string[];
|
|
1728
|
+
/** @description Restrict to these markets. */
|
|
1729
|
+
condition_ids?: string[];
|
|
1730
|
+
/** @description Restrict to markets in these events. */
|
|
1731
|
+
event_slugs?: string[];
|
|
1732
|
+
/** @description Only fire when per-market realized PnL ≥ this value (USD). */
|
|
1733
|
+
min_realized_pnl_usd?: number;
|
|
1734
|
+
/** @description Only fire when per-market realized PnL ≤ this value (USD). */
|
|
1735
|
+
max_realized_pnl_usd?: number;
|
|
1736
|
+
/** @description Only fire when buy volume in the market ≥ this value (USD). */
|
|
1737
|
+
min_buy_usd?: number;
|
|
1738
|
+
/** @description Restrict to these PnL windows. */
|
|
1739
|
+
timeframes?: ("1d" | "7d" | "30d" | "lifetime")[];
|
|
1740
|
+
};
|
|
1741
|
+
/** @description Subscription filters for the `trader_event_pnl` event. All fields are optional. */
|
|
1742
|
+
TraderEventPnlFilters: {
|
|
1743
|
+
/** @description Track only these trader wallet addresses. */
|
|
1744
|
+
traders?: string[];
|
|
1745
|
+
/** @description Restrict to these events. */
|
|
1746
|
+
event_slugs?: string[];
|
|
1747
|
+
/** @description Only fire when per-event realized PnL ≥ this value (USD). */
|
|
1748
|
+
min_realized_pnl_usd?: number;
|
|
1749
|
+
/** @description Only fire when per-event realized PnL ≤ this value (USD). */
|
|
1750
|
+
max_realized_pnl_usd?: number;
|
|
1751
|
+
/** @description Only fire when total event volume ≥ this value (USD). */
|
|
1752
|
+
min_volume_usd?: number;
|
|
1737
1753
|
/**
|
|
1738
|
-
* Format:
|
|
1739
|
-
* @description
|
|
1754
|
+
* Format: int64
|
|
1755
|
+
* @description Only fire when the trader has traded in ≥ this many markets within the event.
|
|
1740
1756
|
*/
|
|
1741
|
-
|
|
1757
|
+
min_markets_traded?: number;
|
|
1758
|
+
/** @description Restrict to these PnL windows. */
|
|
1759
|
+
timeframes?: ("1d" | "7d" | "30d" | "lifetime")[];
|
|
1760
|
+
};
|
|
1761
|
+
/** @description Subscription filters for the `condition_metrics` event. All fields are optional. */
|
|
1762
|
+
MarketMetricsFilters: {
|
|
1763
|
+
/** @description Restrict to these markets. Empty = all markets. */
|
|
1764
|
+
condition_ids?: string[];
|
|
1765
|
+
/** @description Restrict to markets in these events. */
|
|
1766
|
+
event_slugs?: string[];
|
|
1767
|
+
/** @description Restrict to these aggregation windows. Empty = all windows. */
|
|
1768
|
+
timeframes?: ("1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d")[];
|
|
1769
|
+
/** @description Only fire when volume ≥ this value (USD). */
|
|
1770
|
+
min_volume_usd?: number;
|
|
1771
|
+
/** @description Only fire when volume ≤ this value (USD). */
|
|
1772
|
+
max_volume_usd?: number;
|
|
1742
1773
|
/**
|
|
1743
|
-
* Format:
|
|
1744
|
-
* @description
|
|
1774
|
+
* Format: int64
|
|
1775
|
+
* @description Only fire when transaction count ≥ this value.
|
|
1745
1776
|
*/
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1777
|
+
min_txns?: number;
|
|
1778
|
+
/**
|
|
1779
|
+
* Format: int64
|
|
1780
|
+
* @description Only fire when unique trader count ≥ this value.
|
|
1781
|
+
*/
|
|
1782
|
+
min_unique_traders?: number;
|
|
1783
|
+
/** @description Only fire when total fees ≥ this value (USD). */
|
|
1784
|
+
min_fees?: number;
|
|
1785
|
+
};
|
|
1786
|
+
/** @description Subscription filters for the `event_metrics` event. All fields are optional. */
|
|
1787
|
+
EventMetricsFilters: {
|
|
1788
|
+
/** @description Restrict to these events. Empty = all events. */
|
|
1789
|
+
event_slugs?: string[];
|
|
1790
|
+
/** @description Restrict to these aggregation windows. */
|
|
1791
|
+
timeframes?: ("1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d")[];
|
|
1792
|
+
/** @description Only fire when aggregated event volume ≥ this value (USD). */
|
|
1793
|
+
min_volume_usd?: number;
|
|
1794
|
+
max_volume_usd?: number;
|
|
1795
|
+
/** Format: int64 */
|
|
1796
|
+
min_txns?: number;
|
|
1797
|
+
/** Format: int64 */
|
|
1798
|
+
min_unique_traders?: number;
|
|
1799
|
+
min_fees?: number;
|
|
1800
|
+
};
|
|
1801
|
+
/** @description Subscription filters for the `position_metrics` event. All fields are optional. */
|
|
1802
|
+
PositionMetricsFilters: {
|
|
1803
|
+
/** @description Restrict to these outcome token IDs. */
|
|
1804
|
+
position_ids?: string[];
|
|
1805
|
+
/** @description Restrict to positions within these markets. */
|
|
1806
|
+
condition_ids?: string[];
|
|
1807
|
+
/** @description Restrict to positions with these outcome names (e.g. ["Yes", "No"]). */
|
|
1808
|
+
outcomes?: string[];
|
|
1809
|
+
/** @description Restrict to these aggregation windows. */
|
|
1810
|
+
timeframes?: ("1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d")[];
|
|
1811
|
+
/** @description Only fire when position volume ≥ this value (USD). */
|
|
1812
|
+
min_volume_usd?: number;
|
|
1813
|
+
max_volume_usd?: number;
|
|
1814
|
+
min_buy_usd?: number;
|
|
1815
|
+
min_sell_volume_usd?: number;
|
|
1816
|
+
/** Format: int64 */
|
|
1817
|
+
min_txns?: number;
|
|
1818
|
+
/** Format: int64 */
|
|
1819
|
+
min_unique_traders?: number;
|
|
1820
|
+
/** @description Only fire when price change % ≥ this value. */
|
|
1821
|
+
min_price_change_pct?: number;
|
|
1822
|
+
/** @description Only fire when probability change % ≥ this value. */
|
|
1823
|
+
min_probability_change_pct?: number;
|
|
1824
|
+
min_fees?: number;
|
|
1825
|
+
};
|
|
1826
|
+
/** @description Subscription filters for the `market_volume_milestone` event. */
|
|
1827
|
+
MarketVolumeMilestoneFilters: {
|
|
1828
|
+
/** @description **Required.** Aggregation windows to monitor (e.g. ["1h", "24h"]). */
|
|
1829
|
+
timeframes: ("1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d")[];
|
|
1830
|
+
/** @description Restrict to these markets. Empty = all markets. */
|
|
1831
|
+
condition_ids?: string[];
|
|
1832
|
+
/** @description Specific USD milestones to trigger on (e.g. [10000, 100000, 1000000]). Empty = all milestones. */
|
|
1833
|
+
milestone_amounts?: number[];
|
|
1834
|
+
};
|
|
1835
|
+
/** @description Subscription filters for the `event_volume_milestone` event. */
|
|
1836
|
+
EventVolumeMilestoneFilters: {
|
|
1837
|
+
/** @description **Required.** Aggregation windows to monitor. */
|
|
1838
|
+
timeframes: ("1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d")[];
|
|
1839
|
+
/** @description Restrict to these events. */
|
|
1840
|
+
event_slugs?: string[];
|
|
1841
|
+
/** @description Specific USD milestones to trigger on. */
|
|
1842
|
+
milestone_amounts?: number[];
|
|
1843
|
+
};
|
|
1844
|
+
/** @description Subscription filters for the `position_volume_milestone` event. */
|
|
1845
|
+
PositionVolumeMilestoneFilters: {
|
|
1846
|
+
/** @description **Required.** Aggregation windows to monitor. */
|
|
1847
|
+
timeframes: ("1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d")[];
|
|
1848
|
+
/** @description Restrict to these outcome token IDs. */
|
|
1849
|
+
position_ids?: string[];
|
|
1850
|
+
/** @description Restrict to positions within these markets. */
|
|
1851
|
+
condition_ids?: string[];
|
|
1852
|
+
/** @description Specific USD milestones to trigger on. */
|
|
1853
|
+
milestone_amounts?: number[];
|
|
1854
|
+
};
|
|
1855
|
+
/** @description Subscription filters for the `probability_spike` event. */
|
|
1856
|
+
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. */
|
|
1860
|
+
position_ids?: string[];
|
|
1861
|
+
/** @description Restrict to these outcome names (e.g. ["Yes"]). */
|
|
1862
|
+
outcomes?: string[];
|
|
1863
|
+
/** @description Only fire when the relative probability change ≥ this percentage. E.g. 50 fires when probability moves ≥ 50% relative to open. */
|
|
1864
|
+
min_probability_change_pct?: number;
|
|
1865
|
+
};
|
|
1866
|
+
/** @description Subscription filters for the `market_volume_spike` event. */
|
|
1867
|
+
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. */
|
|
1871
|
+
spike_ratio: number;
|
|
1872
|
+
/** @description Restrict to these markets. Empty = all markets. */
|
|
1873
|
+
condition_ids?: string[];
|
|
1874
|
+
/** @description Restrict to these aggregation windows. Empty = all windows. */
|
|
1875
|
+
timeframes?: ("1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d")[];
|
|
1876
|
+
};
|
|
1877
|
+
/** @description Subscription filters for the `event_volume_spike` event. */
|
|
1878
|
+
EventVolumeSpikeFilters: {
|
|
1879
|
+
/** @description **Required.** Your baseline volume for comparison (USD). */
|
|
1880
|
+
baseline_volume_usd: number;
|
|
1881
|
+
/** @description **Required.** Multiplier threshold (must be > 1.0). */
|
|
1882
|
+
spike_ratio: number;
|
|
1883
|
+
/** @description Restrict to these events. */
|
|
1884
|
+
event_slugs?: string[];
|
|
1885
|
+
/** @description Restrict to these aggregation windows. */
|
|
1886
|
+
timeframes?: ("1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d")[];
|
|
1887
|
+
};
|
|
1888
|
+
/** @description Subscription filters for the `position_volume_spike` event. */
|
|
1889
|
+
PositionVolumeSpikeFilters: {
|
|
1890
|
+
/** @description **Required.** Your baseline volume for comparison (USD). */
|
|
1891
|
+
baseline_volume_usd: number;
|
|
1892
|
+
/** @description **Required.** Multiplier threshold (must be > 1.0). */
|
|
1893
|
+
spike_ratio: number;
|
|
1894
|
+
/** @description Restrict to these outcome token IDs. */
|
|
1895
|
+
position_ids?: string[];
|
|
1896
|
+
/** @description Restrict to positions within these markets. */
|
|
1897
|
+
condition_ids?: string[];
|
|
1898
|
+
/** @description Restrict to these outcome names. */
|
|
1899
|
+
outcomes?: string[];
|
|
1900
|
+
/** @description Restrict to these aggregation windows. */
|
|
1901
|
+
timeframes?: ("1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d")[];
|
|
1902
|
+
};
|
|
1903
|
+
/** @description Subscription filters for the `close_to_bond` event. At least one of `min_probability` or `max_probability` is required. */
|
|
1904
|
+
CloseToBondFilters: {
|
|
1905
|
+
/** @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. */
|
|
1906
|
+
min_probability?: number;
|
|
1907
|
+
/** @description Trigger when the YES outcome price is ≤ this value (e.g. 0.05 for near-certain NO). */
|
|
1908
|
+
max_probability?: number;
|
|
1909
|
+
/** @description Restrict to these markets. */
|
|
1910
|
+
condition_ids?: string[];
|
|
1911
|
+
/** @description Restrict to these outcome token IDs. */
|
|
1912
|
+
position_ids?: string[];
|
|
1913
|
+
/** @description Restrict to markets in these events. */
|
|
1914
|
+
event_slugs?: string[];
|
|
1915
|
+
/** @description Restrict to these outcome names (e.g. ["Yes", "No"]). */
|
|
1916
|
+
outcomes?: string[];
|
|
1917
|
+
/** @description Restrict by outcome index. 0 = Yes/Up, 1 = No. Position 0 usually represents the Up/Yes side in binary markets. */
|
|
1918
|
+
position_outcome_indices?: number[];
|
|
1919
|
+
};
|
|
1920
|
+
/** @description Subscription filters for the `market_created` event. All fields are optional. */
|
|
1921
|
+
MarketCreatedFilters: {
|
|
1922
|
+
/** @description Restrict to markets with these tags or category names (case-insensitive match). */
|
|
1923
|
+
tags?: string[];
|
|
1924
|
+
/** @description Restrict to these specific markets. */
|
|
1925
|
+
condition_ids?: string[];
|
|
1926
|
+
/** @description Restrict to markets belonging to these events. */
|
|
1927
|
+
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[];
|
|
1930
|
+
};
|
|
1931
|
+
/** @description Subscription filters for the `asset_price_tick` event. All fields are optional. */
|
|
1932
|
+
AssetPriceTickFilters: {
|
|
1933
|
+
/** @description Restrict to these crypto assets. Empty = all assets. */
|
|
1934
|
+
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
|
+
};
|
|
1938
|
+
/** @description Subscription filters for the `asset_price_window_update` event. All fields are optional. */
|
|
1939
|
+
AssetPriceWindowUpdateFilters: {
|
|
1940
|
+
/** @description Restrict to these crypto assets. Empty = all assets. */
|
|
1941
|
+
asset_symbols?: ("BTC" | "ETH" | "SOL" | "XRP")[];
|
|
1942
|
+
/** @description Restrict to these candle sizes. Empty = all sizes. */
|
|
1943
|
+
timeframes?: ("5m" | "15m" | "1h" | "1d" | "24h")[];
|
|
1749
1944
|
};
|
|
1750
1945
|
};
|
|
1751
1946
|
responses: never;
|