@structbuild/sdk 0.1.21 → 0.1.23
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 +23 -8
- package/dist/generated/webhooks.d.ts +848 -501
- package/dist/types/index.d.ts +28 -0
- package/package.json +1 -1
|
@@ -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`).
|
|
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`).
|
|
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`).
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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;
|
|
@@ -520,133 +540,118 @@ export interface webhooks {
|
|
|
520
540
|
}
|
|
521
541
|
export interface components {
|
|
522
542
|
schemas: {
|
|
523
|
-
/** @description
|
|
543
|
+
/** @description Payload delivered on every raw Chainlink price tick for a tracked crypto asset */
|
|
524
544
|
AssetPriceTickPayload: {
|
|
525
|
-
/** @description Asset symbol: "BTC", "ETH", "SOL", or "XRP" */
|
|
526
|
-
symbol: string;
|
|
527
545
|
/**
|
|
528
|
-
*
|
|
529
|
-
* @
|
|
546
|
+
* @description Asset symbol
|
|
547
|
+
* @enum {string}
|
|
530
548
|
*/
|
|
549
|
+
symbol: "BTC" | "ETH" | "SOL" | "XRP";
|
|
550
|
+
/** @description Current asset price in USD from the Chainlink feed */
|
|
531
551
|
price: number;
|
|
532
552
|
/**
|
|
533
553
|
* Format: int64
|
|
534
|
-
* @description Tick timestamp
|
|
554
|
+
* @description Tick timestamp (milliseconds since Unix epoch)
|
|
535
555
|
*/
|
|
536
556
|
timestamp_ms: number;
|
|
537
557
|
};
|
|
538
|
-
/** @description
|
|
558
|
+
/** @description Payload delivered twice per candle — once on open and once on close. `close_price` is 0.0 on the "open" update. */
|
|
539
559
|
AssetPriceWindowUpdatePayload: {
|
|
540
|
-
/**
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
560
|
+
/**
|
|
561
|
+
* @description Asset symbol
|
|
562
|
+
* @enum {string}
|
|
563
|
+
*/
|
|
564
|
+
symbol: "BTC" | "ETH" | "SOL" | "XRP";
|
|
565
|
+
/**
|
|
566
|
+
* @description Candle / window size
|
|
567
|
+
* @enum {string}
|
|
568
|
+
*/
|
|
569
|
+
variant: "5m" | "15m" | "1h" | "1d" | "24h";
|
|
544
570
|
/**
|
|
545
571
|
* Format: int64
|
|
546
|
-
* @description Window start timestamp (milliseconds since epoch)
|
|
572
|
+
* @description Window start timestamp (milliseconds since Unix epoch)
|
|
547
573
|
*/
|
|
548
574
|
start_time: number;
|
|
549
575
|
/**
|
|
550
576
|
* Format: int64
|
|
551
|
-
* @description Window end timestamp (milliseconds since epoch)
|
|
577
|
+
* @description Window end timestamp (milliseconds since Unix epoch)
|
|
552
578
|
*/
|
|
553
579
|
end_time: number;
|
|
554
|
-
/**
|
|
555
|
-
* Format: double
|
|
556
|
-
* @description Opening price at start_time
|
|
557
|
-
*/
|
|
580
|
+
/** @description Opening price at start_time (USD) */
|
|
558
581
|
open_price: number;
|
|
582
|
+
/** @description Closing price at end_time (USD). 0.0 when update_type is "open" (not yet available). */
|
|
583
|
+
close_price: number;
|
|
559
584
|
/**
|
|
560
|
-
*
|
|
561
|
-
* @
|
|
585
|
+
* @description "open" when the candle opens, "close" when it closes with a confirmed price
|
|
586
|
+
* @enum {string}
|
|
562
587
|
*/
|
|
563
|
-
|
|
564
|
-
/** @description "open" when the window starts, "close" when the window is complete */
|
|
565
|
-
update_type: string;
|
|
588
|
+
update_type: "open" | "close";
|
|
566
589
|
};
|
|
567
|
-
/** @description
|
|
590
|
+
/** @description Payload delivered when a trade occurs at a near-certain-outcome price */
|
|
568
591
|
CloseToBondPayload: {
|
|
569
|
-
/** @description
|
|
592
|
+
/** @description Limit-order maker wallet address (lowercase) */
|
|
570
593
|
trader: string;
|
|
571
|
-
/** @description
|
|
594
|
+
/** @description Order filler wallet address (lowercase) */
|
|
572
595
|
taker: string;
|
|
573
|
-
/** @description
|
|
596
|
+
/** @description ERC-1155 outcome token ID */
|
|
574
597
|
position_id: string;
|
|
575
|
-
/** @description
|
|
598
|
+
/** @description Parent market condition ID */
|
|
576
599
|
condition_id?: string | null;
|
|
577
600
|
/** @description Outcome name (e.g. "Yes", "No") */
|
|
578
601
|
outcome?: string | null;
|
|
579
|
-
/**
|
|
580
|
-
* Format: int32
|
|
581
|
-
* @description Outcome index (0 = Yes/Up, 1 = No). Position 0 usually represents Yes/Up.
|
|
582
|
-
*/
|
|
602
|
+
/** @description 0 = Yes/Up, 1 = No */
|
|
583
603
|
outcome_index?: number | null;
|
|
584
|
-
/** @description Market question */
|
|
585
604
|
question?: string | null;
|
|
586
|
-
/** @description Market slug */
|
|
587
605
|
market_slug?: string | null;
|
|
588
|
-
/** @description Event slug */
|
|
589
606
|
event_slug?: string | null;
|
|
590
|
-
/** @description Trade ID */
|
|
591
607
|
trade_id: string;
|
|
592
608
|
/** @description Transaction hash */
|
|
593
609
|
hash: string;
|
|
594
|
-
/**
|
|
595
|
-
* Format: int64
|
|
596
|
-
* @description Block number
|
|
597
|
-
*/
|
|
610
|
+
/** Format: int64 */
|
|
598
611
|
block: number;
|
|
599
612
|
/**
|
|
600
613
|
* Format: int64
|
|
601
|
-
* @description
|
|
614
|
+
* @description Unix seconds
|
|
602
615
|
*/
|
|
603
616
|
confirmed_at: number;
|
|
604
|
-
/**
|
|
605
|
-
* Format: double
|
|
606
|
-
* @description USD size of the trade
|
|
607
|
-
*/
|
|
617
|
+
/** @description USD size of the trade */
|
|
608
618
|
amount_usd: number;
|
|
609
|
-
/**
|
|
610
|
-
* Format: double
|
|
611
|
-
* @description Outcome shares traded
|
|
612
|
-
*/
|
|
613
619
|
shares_amount: number;
|
|
614
|
-
/**
|
|
615
|
-
* Format: double
|
|
616
|
-
* @description Fee paid (USD)
|
|
617
|
-
*/
|
|
620
|
+
/** @description Fee paid in USD */
|
|
618
621
|
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
|
-
*/
|
|
622
|
+
/** @enum {string} */
|
|
623
|
+
side: "Buy" | "Sell";
|
|
624
|
+
/** @description Price that triggered the notification (0.0–1.0) */
|
|
625
625
|
price: number;
|
|
626
|
-
/**
|
|
627
|
-
* Format: double
|
|
628
|
-
* @description Implied probability of the outcome (0.0–1.0)
|
|
629
|
-
*/
|
|
626
|
+
/** @description Implied probability (0.0–1.0) */
|
|
630
627
|
probability?: number | null;
|
|
631
|
-
/** @description Which bond zone was entered: `"high"` (YES near-certain) or `"low"` (NO near-certain) */
|
|
632
|
-
bond_side: string;
|
|
633
628
|
/**
|
|
634
|
-
*
|
|
635
|
-
* @
|
|
629
|
+
* @description "high" when near YES (price ≥ threshold), "low" when near NO (price ≤ threshold)
|
|
630
|
+
* @enum {string}
|
|
636
631
|
*/
|
|
632
|
+
bond_side: "high" | "low";
|
|
633
|
+
/** @description The probability threshold from the subscription filter that was breached */
|
|
637
634
|
threshold: number;
|
|
638
635
|
};
|
|
639
|
-
/** @description
|
|
636
|
+
/** @description Payload delivered when a market's volume or transaction metrics cross a configured threshold */
|
|
640
637
|
ConditionMetricsPayload: {
|
|
638
|
+
/** @description Market condition ID */
|
|
641
639
|
condition_id?: string | null;
|
|
640
|
+
/** @description Aggregation window (e.g. "1h", "24h") */
|
|
642
641
|
timeframe?: string | null;
|
|
643
|
-
/**
|
|
642
|
+
/** @description Total trading volume in USD for this timeframe */
|
|
644
643
|
volume_usd?: number | null;
|
|
645
|
-
/**
|
|
644
|
+
/** @description Total fees collected in USD */
|
|
646
645
|
fees?: number | null;
|
|
647
|
-
/**
|
|
646
|
+
/**
|
|
647
|
+
* Format: int64
|
|
648
|
+
* @description Total number of transactions
|
|
649
|
+
*/
|
|
648
650
|
txns?: number | null;
|
|
649
|
-
/**
|
|
651
|
+
/**
|
|
652
|
+
* Format: int64
|
|
653
|
+
* @description Number of unique traders
|
|
654
|
+
*/
|
|
650
655
|
unique_traders?: number | null;
|
|
651
656
|
};
|
|
652
657
|
/** @description Request body for creating a webhook */
|
|
@@ -665,26 +670,42 @@ export interface components {
|
|
|
665
670
|
DeleteWebhookResponse: {
|
|
666
671
|
deleted: boolean;
|
|
667
672
|
};
|
|
668
|
-
/** @description
|
|
673
|
+
/** @description Payload delivered when an event's aggregated volume or transaction metrics cross a configured threshold */
|
|
669
674
|
EventMetricsPayload: {
|
|
675
|
+
/** @description Event slug */
|
|
670
676
|
event_slug?: string | null;
|
|
677
|
+
/** @description Aggregation window (e.g. "1h", "24h") */
|
|
671
678
|
timeframe?: string | null;
|
|
672
|
-
/**
|
|
679
|
+
/** @description Total aggregated volume across all markets in the event (USD) */
|
|
673
680
|
volume_usd?: number | null;
|
|
674
|
-
/**
|
|
681
|
+
/** @description Total fees collected in USD */
|
|
675
682
|
fees?: number | null;
|
|
676
|
-
/**
|
|
683
|
+
/**
|
|
684
|
+
* Format: int64
|
|
685
|
+
* @description Total number of transactions
|
|
686
|
+
*/
|
|
677
687
|
txns?: number | null;
|
|
678
|
-
/**
|
|
688
|
+
/**
|
|
689
|
+
* Format: int64
|
|
690
|
+
* @description Number of unique traders
|
|
691
|
+
*/
|
|
679
692
|
unique_traders?: number | null;
|
|
680
693
|
};
|
|
681
|
-
/** @description
|
|
694
|
+
/** @description Payload delivered when a trader's per-event PnL crosses a configured threshold */
|
|
682
695
|
EventPnlPayload: {
|
|
696
|
+
/** @description Trader wallet address (lowercase) */
|
|
683
697
|
trader?: string | null;
|
|
698
|
+
/** @description Event slug */
|
|
684
699
|
event_slug?: string | null;
|
|
685
|
-
/**
|
|
686
|
-
|
|
687
|
-
|
|
700
|
+
/**
|
|
701
|
+
* @description PnL aggregation window
|
|
702
|
+
* @enum {string}
|
|
703
|
+
*/
|
|
704
|
+
timeframe: "1d" | "7d" | "30d" | "lifetime";
|
|
705
|
+
/**
|
|
706
|
+
* Format: int64
|
|
707
|
+
* @description Number of distinct markets traded in this event
|
|
708
|
+
*/
|
|
688
709
|
markets_traded?: number | null;
|
|
689
710
|
/** Format: int64 */
|
|
690
711
|
outcomes_traded?: number | null;
|
|
@@ -696,47 +717,41 @@ export interface components {
|
|
|
696
717
|
total_redemptions?: number | null;
|
|
697
718
|
/** Format: int64 */
|
|
698
719
|
total_merges?: number | null;
|
|
699
|
-
/**
|
|
720
|
+
/** @description Total volume in USD */
|
|
700
721
|
total_volume_usd?: number | null;
|
|
701
|
-
/** Format: double */
|
|
702
722
|
buy_usd?: number | null;
|
|
703
|
-
/** Format: double */
|
|
704
723
|
sell_usd?: number | null;
|
|
705
|
-
/** Format: double */
|
|
706
724
|
redemption_usd?: number | null;
|
|
707
|
-
/** Format: double */
|
|
708
725
|
merge_usd?: number | null;
|
|
709
|
-
/**
|
|
726
|
+
/** @description Realized PnL in USD for this event */
|
|
710
727
|
realized_pnl_usd?: number | null;
|
|
711
728
|
/** Format: int64 */
|
|
712
729
|
winning_markets?: number | null;
|
|
713
730
|
/** Format: int64 */
|
|
714
731
|
losing_markets?: number | null;
|
|
715
|
-
/** Format: double */
|
|
716
732
|
total_fees?: number | null;
|
|
717
|
-
/**
|
|
733
|
+
/**
|
|
734
|
+
* Format: int64
|
|
735
|
+
* @description Unix seconds
|
|
736
|
+
*/
|
|
718
737
|
first_trade_at?: number | null;
|
|
719
|
-
/**
|
|
738
|
+
/**
|
|
739
|
+
* Format: int64
|
|
740
|
+
* @description Unix seconds
|
|
741
|
+
*/
|
|
720
742
|
last_trade_at?: number | null;
|
|
721
743
|
};
|
|
722
|
-
/** @description
|
|
744
|
+
/** @description Payload delivered when an event's aggregated trading volume crosses a USD milestone */
|
|
723
745
|
EventVolumeMilestonePayload: {
|
|
746
|
+
/** @description Event slug */
|
|
724
747
|
event_slug: string;
|
|
748
|
+
/** @description Aggregation window (e.g. "1h", "24h") */
|
|
725
749
|
timeframe: string;
|
|
726
|
-
/**
|
|
727
|
-
* Format: double
|
|
728
|
-
* @description Milestone amount reached (USD)
|
|
729
|
-
*/
|
|
750
|
+
/** @description The USD milestone amount that was crossed */
|
|
730
751
|
milestone_usd: number;
|
|
731
|
-
/**
|
|
732
|
-
* Format: double
|
|
733
|
-
* @description Current volume (USD) that triggered the milestone
|
|
734
|
-
*/
|
|
752
|
+
/** @description Current aggregated event volume at time of trigger (USD) */
|
|
735
753
|
current_volume_usd: number;
|
|
736
|
-
/**
|
|
737
|
-
* Format: double
|
|
738
|
-
* @description Total fees collected in this timeframe
|
|
739
|
-
*/
|
|
754
|
+
/** @description Total fees in USD for this timeframe */
|
|
740
755
|
fees: number;
|
|
741
756
|
/**
|
|
742
757
|
* Format: int64
|
|
@@ -744,67 +759,47 @@ export interface components {
|
|
|
744
759
|
*/
|
|
745
760
|
txns: number;
|
|
746
761
|
};
|
|
747
|
-
/** @description
|
|
762
|
+
/** @description Payload delivered when an event's aggregated volume has spiked since the last snapshot */
|
|
748
763
|
EventVolumeSpikePayload: {
|
|
764
|
+
/** @description Event slug */
|
|
749
765
|
event_slug: string;
|
|
766
|
+
/** @description Aggregation window (e.g. "1h", "24h") */
|
|
750
767
|
timeframe: string;
|
|
751
|
-
/**
|
|
752
|
-
* Format: double
|
|
753
|
-
* @description Current aggregated event volume that triggered the spike (USD)
|
|
754
|
-
*/
|
|
768
|
+
/** @description Current aggregated event volume at time of the spike (USD) */
|
|
755
769
|
current_volume_usd: number;
|
|
756
|
-
/**
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
* @description Spike ratio threshold that was triggered
|
|
764
|
-
*/
|
|
765
|
-
spike_ratio: number;
|
|
766
|
-
/**
|
|
767
|
-
* Format: double
|
|
768
|
-
* @description Calculated threshold that was crossed (baseline * ratio)
|
|
769
|
-
*/
|
|
770
|
-
threshold_usd: number;
|
|
771
|
-
/**
|
|
772
|
-
* Format: int64
|
|
773
|
-
* @description Total transactions in this timeframe
|
|
774
|
-
*/
|
|
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;
|
|
776
|
+
/** Format: int64 */
|
|
775
777
|
txns: number;
|
|
776
|
-
/**
|
|
777
|
-
* Format: double
|
|
778
|
-
* @description Total fees in this timeframe
|
|
779
|
-
*/
|
|
780
778
|
fees: number;
|
|
781
779
|
};
|
|
782
|
-
/** @description
|
|
780
|
+
/** @description Payload delivered when a tracked trader executes their first-ever trade on Polymarket */
|
|
783
781
|
FirstTradePayload: {
|
|
784
|
-
/** @description
|
|
782
|
+
/** @description Limit-order maker wallet address (lowercase) */
|
|
785
783
|
trader: string;
|
|
786
|
-
/** @description
|
|
784
|
+
/** @description Order filler wallet address (lowercase) */
|
|
787
785
|
taker: string;
|
|
788
|
-
/** @description
|
|
786
|
+
/** @description ERC-1155 outcome token ID */
|
|
789
787
|
position_id: string;
|
|
790
|
-
/** @description
|
|
788
|
+
/** @description Parent market condition ID (0x-prefixed hex) */
|
|
791
789
|
condition_id?: string | null;
|
|
792
|
-
/** @description
|
|
790
|
+
/** @description Outcome name (e.g. "Yes", "No") */
|
|
793
791
|
outcome?: string | null;
|
|
794
|
-
/**
|
|
795
|
-
* Format: int32
|
|
796
|
-
* @description Outcome index (0 = Yes, 1 = No)
|
|
797
|
-
*/
|
|
792
|
+
/** @description Outcome index: 0 = Yes/Up, 1 = No */
|
|
798
793
|
outcome_index?: number | null;
|
|
799
|
-
/** @description Market question
|
|
794
|
+
/** @description Market question text */
|
|
800
795
|
question?: string | null;
|
|
801
|
-
/** @description Market slug
|
|
796
|
+
/** @description Market slug */
|
|
802
797
|
market_slug?: string | null;
|
|
803
|
-
/** @description
|
|
798
|
+
/** @description Parent event slug */
|
|
804
799
|
event_slug?: string | null;
|
|
805
|
-
/** @description
|
|
800
|
+
/** @description Unique trade identifier */
|
|
806
801
|
trade_id: string;
|
|
807
|
-
/** @description Transaction hash
|
|
802
|
+
/** @description Transaction hash */
|
|
808
803
|
hash: string;
|
|
809
804
|
/**
|
|
810
805
|
* Format: int64
|
|
@@ -813,114 +808,149 @@ export interface components {
|
|
|
813
808
|
block: number;
|
|
814
809
|
/**
|
|
815
810
|
* Format: int64
|
|
816
|
-
* @description
|
|
811
|
+
* @description Block confirmation timestamp (Unix seconds)
|
|
817
812
|
*/
|
|
818
813
|
confirmed_at: number;
|
|
819
|
-
/**
|
|
814
|
+
/** @description USD size of the trade (6 decimal places) */
|
|
820
815
|
amount_usd: number;
|
|
821
|
-
/**
|
|
816
|
+
/** @description Outcome shares traded (6 decimal places) */
|
|
822
817
|
shares_amount: number;
|
|
823
|
-
/**
|
|
818
|
+
/** @description Fee paid in USD (6 decimal places) */
|
|
824
819
|
fee: number;
|
|
825
|
-
/** @description Trade side (Buy/Sell, zero-copy Arc) */
|
|
826
|
-
side: string;
|
|
827
820
|
/**
|
|
828
|
-
*
|
|
829
|
-
* @
|
|
821
|
+
* @description Trade direction
|
|
822
|
+
* @enum {string}
|
|
830
823
|
*/
|
|
824
|
+
side: "Buy" | "Sell";
|
|
825
|
+
/** @description Outcome token price (0.0–1.0) */
|
|
831
826
|
price: number;
|
|
827
|
+
/** @description Exchange identifier */
|
|
832
828
|
exchange: string;
|
|
829
|
+
/** @description Trade type identifier */
|
|
833
830
|
trade_type: string;
|
|
834
831
|
};
|
|
835
|
-
/** @description
|
|
832
|
+
/** @description Payload delivered when a trader's global PnL (across all markets) crosses a configured threshold */
|
|
836
833
|
GlobalPnlPayload: {
|
|
834
|
+
/** @description Trader wallet address (lowercase) */
|
|
837
835
|
trader?: string | null;
|
|
838
|
-
/**
|
|
839
|
-
|
|
840
|
-
|
|
836
|
+
/**
|
|
837
|
+
* @description PnL aggregation window
|
|
838
|
+
* @enum {string}
|
|
839
|
+
*/
|
|
840
|
+
timeframe: "1d" | "7d" | "30d" | "lifetime";
|
|
841
|
+
/** @description Realized PnL in USD (positive = profit, negative = loss) */
|
|
841
842
|
realized_pnl_usd?: number | null;
|
|
842
|
-
/**
|
|
843
|
+
/**
|
|
844
|
+
* Format: int64
|
|
845
|
+
* @description Number of distinct events traded
|
|
846
|
+
*/
|
|
843
847
|
events_traded?: number | null;
|
|
844
|
-
/**
|
|
848
|
+
/**
|
|
849
|
+
* Format: int64
|
|
850
|
+
* @description Number of distinct markets traded
|
|
851
|
+
*/
|
|
845
852
|
markets_traded?: number | null;
|
|
846
|
-
/**
|
|
853
|
+
/**
|
|
854
|
+
* Format: int64
|
|
855
|
+
* @description Total buy transactions
|
|
856
|
+
*/
|
|
847
857
|
total_buys?: number | null;
|
|
848
|
-
/**
|
|
858
|
+
/**
|
|
859
|
+
* Format: int64
|
|
860
|
+
* @description Total sell transactions
|
|
861
|
+
*/
|
|
849
862
|
total_sells?: number | null;
|
|
850
|
-
/**
|
|
863
|
+
/**
|
|
864
|
+
* Format: int64
|
|
865
|
+
* @description Total redemption transactions
|
|
866
|
+
*/
|
|
851
867
|
total_redemptions?: number | null;
|
|
852
|
-
/**
|
|
868
|
+
/**
|
|
869
|
+
* Format: int64
|
|
870
|
+
* @description Total merge transactions
|
|
871
|
+
*/
|
|
853
872
|
total_merges?: number | null;
|
|
854
|
-
/**
|
|
873
|
+
/** @description Total USD volume (buys + sells + redemptions + merges) */
|
|
855
874
|
total_volume_usd?: number | null;
|
|
856
|
-
/**
|
|
875
|
+
/** @description Total buy volume in USD */
|
|
857
876
|
buy_volume_usd?: number | null;
|
|
858
|
-
/**
|
|
877
|
+
/** @description Total sell volume in USD */
|
|
859
878
|
sell_volume_usd?: number | null;
|
|
860
|
-
/**
|
|
879
|
+
/** @description Total redemption volume in USD */
|
|
861
880
|
redemption_volume_usd?: number | null;
|
|
862
|
-
/**
|
|
881
|
+
/** @description Total merge volume in USD */
|
|
863
882
|
merge_volume_usd?: number | null;
|
|
864
|
-
/**
|
|
883
|
+
/**
|
|
884
|
+
* Format: int64
|
|
885
|
+
* @description Number of markets where trader realised a profit
|
|
886
|
+
*/
|
|
865
887
|
markets_won?: number | null;
|
|
866
|
-
/**
|
|
888
|
+
/**
|
|
889
|
+
* Format: int64
|
|
890
|
+
* @description Number of markets where trader realised a loss
|
|
891
|
+
*/
|
|
867
892
|
markets_lost?: number | null;
|
|
868
|
-
/**
|
|
893
|
+
/** @description Market win rate as a percentage (0.0–100.0) */
|
|
869
894
|
market_win_rate_pct?: number | null;
|
|
870
|
-
/**
|
|
895
|
+
/** @description Average PnL per market in USD */
|
|
871
896
|
avg_pnl_per_market?: number | null;
|
|
872
|
-
/**
|
|
897
|
+
/** @description Average PnL per trade in USD */
|
|
873
898
|
avg_pnl_per_trade?: number | null;
|
|
874
|
-
/**
|
|
899
|
+
/** @description Average hold time across all positions (seconds) */
|
|
875
900
|
avg_hold_time_seconds?: number | null;
|
|
876
|
-
/**
|
|
901
|
+
/** @description Total fees paid in USD */
|
|
877
902
|
total_fees?: number | null;
|
|
878
|
-
/**
|
|
903
|
+
/** @description Best single-trade PnL in USD */
|
|
879
904
|
best_trade_pnl_usd?: number | null;
|
|
905
|
+
/** @description Condition ID of the best trade */
|
|
880
906
|
best_trade_condition_id?: string | null;
|
|
881
|
-
/**
|
|
907
|
+
/** @description Worst single-trade PnL in USD */
|
|
882
908
|
worst_trade_pnl_usd?: number | null;
|
|
909
|
+
/** @description Condition ID of the worst trade */
|
|
883
910
|
worst_trade_condition_id?: string | null;
|
|
884
|
-
/**
|
|
911
|
+
/**
|
|
912
|
+
* Format: int64
|
|
913
|
+
* @description Timestamp of the first trade (Unix seconds)
|
|
914
|
+
*/
|
|
885
915
|
first_trade_at?: number | null;
|
|
886
|
-
/**
|
|
916
|
+
/**
|
|
917
|
+
* Format: int64
|
|
918
|
+
* @description Timestamp of the most recent trade (Unix seconds)
|
|
919
|
+
*/
|
|
887
920
|
last_trade_at?: number | null;
|
|
888
921
|
};
|
|
889
922
|
/** @description Response for GET /v1/webhook/events */
|
|
890
923
|
ListEventsResponse: {
|
|
891
924
|
events: components["schemas"]["WebhookEventInfo"][];
|
|
892
925
|
};
|
|
893
|
-
/** @description
|
|
926
|
+
/** @description An outcome entry within a newly created market */
|
|
894
927
|
MarketCreatedOutcome: {
|
|
895
|
-
/**
|
|
896
|
-
* Format: int32
|
|
897
|
-
* @description Outcome index (0 = Yes, 1 = No)
|
|
898
|
-
*/
|
|
928
|
+
/** @description Outcome index (0 = Yes, 1 = No) */
|
|
899
929
|
index: number;
|
|
900
930
|
/** @description Outcome name (e.g. "Yes", "No") */
|
|
901
931
|
name: string;
|
|
902
|
-
/** @description
|
|
932
|
+
/** @description ERC-1155 position token ID for this outcome */
|
|
903
933
|
position_id: string;
|
|
904
934
|
};
|
|
905
|
-
/** @description
|
|
935
|
+
/** @description Payload delivered when a new prediction market is detected on-chain and enriched with Gamma API metadata */
|
|
906
936
|
MarketCreatedPayload: {
|
|
907
937
|
/** @description Condition ID (0x-prefixed hex, lowercase) */
|
|
908
938
|
condition_id: string;
|
|
909
939
|
/** @description Market slug */
|
|
910
940
|
market_slug: string;
|
|
911
|
-
/** @description
|
|
941
|
+
/** @description Parent event slug */
|
|
912
942
|
event_slug?: string | null;
|
|
913
|
-
/** @description
|
|
943
|
+
/** @description Parent event ID */
|
|
914
944
|
event_id?: string | null;
|
|
915
|
-
/** @description
|
|
945
|
+
/** @description Parent event title */
|
|
916
946
|
event_title?: string | null;
|
|
917
|
-
/** @description Series slug */
|
|
947
|
+
/** @description Series slug (for recurring markets) */
|
|
918
948
|
series_slug?: string | null;
|
|
919
|
-
/** @description
|
|
949
|
+
/** @description List of market outcomes with their position IDs */
|
|
920
950
|
outcomes: components["schemas"]["MarketCreatedOutcome"][];
|
|
921
|
-
/** @description
|
|
951
|
+
/** @description Full market question text */
|
|
922
952
|
question: string;
|
|
923
|
-
/** @description
|
|
953
|
+
/** @description Short display title */
|
|
924
954
|
title?: string | null;
|
|
925
955
|
/** @description Market description */
|
|
926
956
|
description: string;
|
|
@@ -932,25 +962,24 @@ export interface components {
|
|
|
932
962
|
image_url?: string | null;
|
|
933
963
|
/** @description Whether this is a neg-risk market */
|
|
934
964
|
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
965
|
};
|
|
946
|
-
/** @description
|
|
966
|
+
/** @description Payload delivered when a trader's per-market PnL crosses a configured threshold */
|
|
947
967
|
MarketPnlPayload: {
|
|
968
|
+
/** @description Trader wallet address (lowercase) */
|
|
948
969
|
trader?: string | null;
|
|
970
|
+
/** @description Market condition ID */
|
|
949
971
|
condition_id?: string | null;
|
|
972
|
+
/** @description Parent event slug */
|
|
950
973
|
event_slug?: string | null;
|
|
951
|
-
/**
|
|
952
|
-
|
|
953
|
-
|
|
974
|
+
/**
|
|
975
|
+
* @description PnL aggregation window
|
|
976
|
+
* @enum {string}
|
|
977
|
+
*/
|
|
978
|
+
timeframe: "1d" | "7d" | "30d" | "lifetime";
|
|
979
|
+
/**
|
|
980
|
+
* Format: int64
|
|
981
|
+
* @description Number of distinct outcomes traded in this market
|
|
982
|
+
*/
|
|
954
983
|
outcomes_traded?: number | null;
|
|
955
984
|
/** Format: int64 */
|
|
956
985
|
total_buys?: number | null;
|
|
@@ -960,89 +989,77 @@ export interface components {
|
|
|
960
989
|
total_redemptions?: number | null;
|
|
961
990
|
/** Format: int64 */
|
|
962
991
|
total_merges?: number | null;
|
|
963
|
-
/**
|
|
992
|
+
/** @description Total buy volume in USD */
|
|
964
993
|
buy_usd?: number | null;
|
|
965
|
-
/**
|
|
994
|
+
/** @description Total sell volume in USD */
|
|
966
995
|
sell_usd?: number | null;
|
|
967
|
-
/**
|
|
996
|
+
/** @description Total redemption volume in USD */
|
|
968
997
|
redemption_usd?: number | null;
|
|
969
|
-
/**
|
|
998
|
+
/** @description Total merge volume in USD */
|
|
970
999
|
merge_usd?: number | null;
|
|
971
|
-
/**
|
|
1000
|
+
/** @description Realized PnL in USD for this market */
|
|
972
1001
|
realized_pnl_usd?: number | null;
|
|
973
|
-
/**
|
|
1002
|
+
/**
|
|
1003
|
+
* Format: int64
|
|
1004
|
+
* @description Number of outcomes with positive PnL
|
|
1005
|
+
*/
|
|
974
1006
|
winning_outcomes?: number | null;
|
|
975
|
-
/**
|
|
1007
|
+
/** @description Total fees paid in USD for this market */
|
|
976
1008
|
total_fees?: number | null;
|
|
977
|
-
/**
|
|
1009
|
+
/**
|
|
1010
|
+
* Format: int64
|
|
1011
|
+
* @description Timestamp of first trade in market (Unix seconds)
|
|
1012
|
+
*/
|
|
978
1013
|
first_trade_at?: number | null;
|
|
979
|
-
/**
|
|
1014
|
+
/**
|
|
1015
|
+
* Format: int64
|
|
1016
|
+
* @description Timestamp of most recent trade in market (Unix seconds)
|
|
1017
|
+
*/
|
|
980
1018
|
last_trade_at?: number | null;
|
|
981
1019
|
};
|
|
982
|
-
/** @description
|
|
1020
|
+
/** @description Payload delivered when a market's volume has spiked since the last snapshot */
|
|
983
1021
|
MarketVolumeSpikePayload: {
|
|
1022
|
+
/** @description Market condition ID */
|
|
984
1023
|
condition_id: string;
|
|
1024
|
+
/** @description Aggregation window (e.g. "1h", "24h") */
|
|
985
1025
|
timeframe: string;
|
|
986
|
-
/**
|
|
987
|
-
* Format: double
|
|
988
|
-
* @description Current volume that triggered the spike (USD)
|
|
989
|
-
*/
|
|
1026
|
+
/** @description Current volume at the time of the spike (USD) */
|
|
990
1027
|
current_volume_usd: number;
|
|
991
|
-
/**
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
* Format: double
|
|
998
|
-
* @description Spike ratio threshold that was triggered
|
|
999
|
-
*/
|
|
1000
|
-
spike_ratio: number;
|
|
1001
|
-
/**
|
|
1002
|
-
* Format: double
|
|
1003
|
-
* @description Calculated threshold that was crossed (baseline * ratio)
|
|
1004
|
-
*/
|
|
1005
|
-
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;
|
|
1006
1034
|
/**
|
|
1007
1035
|
* Format: int64
|
|
1008
1036
|
* @description Total transactions in this timeframe
|
|
1009
1037
|
*/
|
|
1010
1038
|
txns: number;
|
|
1011
|
-
/**
|
|
1012
|
-
* Format: double
|
|
1013
|
-
* @description Total fees in this timeframe
|
|
1014
|
-
*/
|
|
1039
|
+
/** @description Total fees in USD for this timeframe */
|
|
1015
1040
|
fees: number;
|
|
1016
1041
|
};
|
|
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
|
-
*/
|
|
1042
|
+
/** @description Payload delivered when a trader places their first trade in a specific market (fires once per trader+market pair) */
|
|
1023
1043
|
NewMarketPayload: {
|
|
1024
|
-
/** @description
|
|
1044
|
+
/** @description Limit-order maker wallet address (lowercase) */
|
|
1025
1045
|
trader: string;
|
|
1026
|
-
/** @description
|
|
1046
|
+
/** @description Order filler wallet address (lowercase) */
|
|
1027
1047
|
taker: string;
|
|
1028
|
-
/** @description
|
|
1048
|
+
/** @description ERC-1155 outcome token ID */
|
|
1029
1049
|
position_id: string;
|
|
1030
|
-
/** @description
|
|
1050
|
+
/** @description Parent market condition ID */
|
|
1031
1051
|
condition_id?: string | null;
|
|
1032
1052
|
/** @description Outcome name (e.g. "Yes", "No") */
|
|
1033
1053
|
outcome?: string | null;
|
|
1034
|
-
/**
|
|
1035
|
-
* Format: int32
|
|
1036
|
-
* @description Outcome index (0 = Yes, 1 = No)
|
|
1037
|
-
*/
|
|
1054
|
+
/** @description Outcome index: 0 = Yes/Up, 1 = No */
|
|
1038
1055
|
outcome_index?: number | null;
|
|
1039
|
-
/** @description Market question */
|
|
1056
|
+
/** @description Market question text */
|
|
1040
1057
|
question?: string | null;
|
|
1041
1058
|
/** @description Market slug */
|
|
1042
1059
|
market_slug?: string | null;
|
|
1043
|
-
/** @description
|
|
1060
|
+
/** @description Parent event slug */
|
|
1044
1061
|
event_slug?: string | null;
|
|
1045
|
-
/** @description
|
|
1062
|
+
/** @description Unique trade identifier */
|
|
1046
1063
|
trade_id: string;
|
|
1047
1064
|
/** @description Transaction hash */
|
|
1048
1065
|
hash: string;
|
|
@@ -1053,37 +1070,27 @@ export interface components {
|
|
|
1053
1070
|
block: number;
|
|
1054
1071
|
/**
|
|
1055
1072
|
* Format: int64
|
|
1056
|
-
* @description
|
|
1073
|
+
* @description Block confirmation timestamp (Unix seconds)
|
|
1057
1074
|
*/
|
|
1058
1075
|
confirmed_at: number;
|
|
1059
|
-
/**
|
|
1060
|
-
* Format: double
|
|
1061
|
-
* @description USD size of the trade
|
|
1062
|
-
*/
|
|
1076
|
+
/** @description USD size of the trade (6 decimal places) */
|
|
1063
1077
|
amount_usd: number;
|
|
1064
|
-
/**
|
|
1065
|
-
* Format: double
|
|
1066
|
-
* @description Outcome shares traded
|
|
1067
|
-
*/
|
|
1078
|
+
/** @description Outcome shares traded (6 decimal places) */
|
|
1068
1079
|
shares_amount: number;
|
|
1069
|
-
/**
|
|
1070
|
-
* Format: double
|
|
1071
|
-
* @description Fee paid (USD)
|
|
1072
|
-
*/
|
|
1080
|
+
/** @description Fee paid in USD (6 decimal places) */
|
|
1073
1081
|
fee: number;
|
|
1074
|
-
/** @description Trade side ("Buy" or "Sell") */
|
|
1075
|
-
side: string;
|
|
1076
1082
|
/**
|
|
1077
|
-
*
|
|
1078
|
-
* @
|
|
1083
|
+
* @description Trade direction
|
|
1084
|
+
* @enum {string}
|
|
1079
1085
|
*/
|
|
1086
|
+
side: "Buy" | "Sell";
|
|
1087
|
+
/** @description Outcome token price (0.0–1.0) */
|
|
1080
1088
|
price: number;
|
|
1081
|
-
/**
|
|
1082
|
-
* Format: double
|
|
1083
|
-
* @description Implied probability (0.0–1.0); None when outcome is unknown
|
|
1084
|
-
*/
|
|
1089
|
+
/** @description Implied probability (0.0–1.0); null when outcome is unknown */
|
|
1085
1090
|
probability?: number | null;
|
|
1091
|
+
/** @description Exchange identifier */
|
|
1086
1092
|
exchange: string;
|
|
1093
|
+
/** @description Trade type identifier */
|
|
1087
1094
|
trade_type: string;
|
|
1088
1095
|
};
|
|
1089
1096
|
/**
|
|
@@ -1095,7 +1102,7 @@ export interface components {
|
|
|
1095
1102
|
* @description Polymarket webhook event types
|
|
1096
1103
|
* @enum {string}
|
|
1097
1104
|
*/
|
|
1098
|
-
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";
|
|
1099
1106
|
/**
|
|
1100
1107
|
* @description Polymarket-specific webhook filters
|
|
1101
1108
|
*
|
|
@@ -1110,25 +1117,33 @@ export interface components {
|
|
|
1110
1117
|
* - event_metrics: event_slugs, min_volume_usd, max_volume_usd, min_fees, min_txns, timeframes
|
|
1111
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
|
|
1112
1119
|
* - volume_milestone: condition_ids, timeframes, milestone_amounts
|
|
1113
|
-
* - 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
|
|
1114
1129
|
*
|
|
1115
1130
|
* Implements Hash + Eq manually (f64 fields use bit representation)
|
|
1116
1131
|
*/
|
|
1117
1132
|
PolymarketWebhookFilter: {
|
|
1118
|
-
/** @description Filter by wallet addresses (for first_trade, normalized to lowercase) */
|
|
1133
|
+
/** @description Filter by wallet addresses (for first_trade, normalized to lowercase). Max 500 entries. */
|
|
1119
1134
|
wallet_addresses?: string[];
|
|
1120
|
-
/** @description Filter by trader addresses (for PnL webhooks, normalized to lowercase) */
|
|
1135
|
+
/** @description Filter by trader addresses (for PnL webhooks, normalized to lowercase). Max 500 entries. */
|
|
1121
1136
|
traders?: string[];
|
|
1122
|
-
/** @description Filter by market/condition IDs */
|
|
1137
|
+
/** @description Filter by market/condition IDs. Max 500 entries. */
|
|
1123
1138
|
condition_ids?: string[];
|
|
1124
1139
|
/**
|
|
1125
1140
|
* Format: double
|
|
1126
1141
|
* @description Filter by minimum USD value (for trades)
|
|
1127
1142
|
*/
|
|
1128
1143
|
min_usd_value?: number | null;
|
|
1129
|
-
/** @description Filter by event slugs */
|
|
1144
|
+
/** @description Filter by event slugs. Max 500 entries. */
|
|
1130
1145
|
event_slugs?: string[];
|
|
1131
|
-
/** @description Filter by tags */
|
|
1146
|
+
/** @description Filter by tags. Max 500 entries. */
|
|
1132
1147
|
tags?: string[];
|
|
1133
1148
|
/**
|
|
1134
1149
|
* Format: double
|
|
@@ -1185,13 +1200,13 @@ export interface components {
|
|
|
1185
1200
|
* @description Maximum net shares - for position PnL webhooks
|
|
1186
1201
|
*/
|
|
1187
1202
|
max_net_shares?: number | null;
|
|
1188
|
-
/** @description Filter by position IDs - for position PnL webhooks */
|
|
1203
|
+
/** @description Filter by position IDs - for position PnL webhooks. Max 500 entries. */
|
|
1189
1204
|
position_ids?: string[];
|
|
1190
|
-
/** @description Filter by outcomes (e.g., "Yes", "No") - for position PnL webhooks */
|
|
1205
|
+
/** @description Filter by outcomes (e.g., "Yes", "No") - for position PnL webhooks. Max 500 entries. */
|
|
1191
1206
|
outcomes?: string[];
|
|
1192
1207
|
/**
|
|
1193
1208
|
* @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.
|
|
1209
|
+
* When non-empty, only trades whose outcome_index is in this list will match. Max 500 entries.
|
|
1195
1210
|
*/
|
|
1196
1211
|
position_outcome_indices?: number[];
|
|
1197
1212
|
/**
|
|
@@ -1224,16 +1239,10 @@ export interface components {
|
|
|
1224
1239
|
* @description Minimum probability change percentage - for position metrics webhooks
|
|
1225
1240
|
*/
|
|
1226
1241
|
min_probability_change_pct?: number | null;
|
|
1227
|
-
/** @description Timeframes to track - for metrics webhooks (1m, 5m, 30m, 1h, 6h, 24h, 7d, 30d) */
|
|
1228
|
-
timeframes?:
|
|
1229
|
-
/** @description Milestone amounts to track - for volume milestone webhooks (e.g., 10000, 100000, 1000000) */
|
|
1242
|
+
/** @description Timeframes to track - for metrics webhooks (1m, 5m, 30m, 1h, 6h, 24h, 7d, 30d). */
|
|
1243
|
+
timeframes?: components["schemas"]["WebhookTimeframe"][];
|
|
1244
|
+
/** @description Milestone amounts to track - for volume milestone webhooks (e.g., 10000, 100000, 1000000). Max 500 entries. */
|
|
1230
1245
|
milestone_amounts?: number[];
|
|
1231
|
-
/**
|
|
1232
|
-
* Format: double
|
|
1233
|
-
* @description User's baseline volume for spike detection (USD) - for volume spike webhooks
|
|
1234
|
-
* Example: 50000.0 for $50k baseline
|
|
1235
|
-
*/
|
|
1236
|
-
baseline_volume_usd?: number | null;
|
|
1237
1246
|
/**
|
|
1238
1247
|
* Format: double
|
|
1239
1248
|
* @description Spike ratio multiplier (must be > 1.0) - for volume spike webhooks
|
|
@@ -1241,37 +1250,52 @@ export interface components {
|
|
|
1241
1250
|
*/
|
|
1242
1251
|
spike_ratio?: number | null;
|
|
1243
1252
|
/**
|
|
1244
|
-
* @description
|
|
1245
|
-
*
|
|
1246
|
-
*
|
|
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.
|
|
1247
1258
|
*/
|
|
1248
|
-
|
|
1259
|
+
exclude_shortterm_markets?: boolean;
|
|
1249
1260
|
/**
|
|
1250
1261
|
* @description Filter by crypto asset symbol — for `asset_price_tick` and `asset_price_window_update` webhooks.
|
|
1251
1262
|
* Valid values: "BTC", "ETH", "SOL", "XRP". Empty = all assets.
|
|
1252
1263
|
*/
|
|
1253
|
-
asset_symbols?:
|
|
1264
|
+
asset_symbols?: components["schemas"]["WebhookAssetSymbol"][];
|
|
1265
|
+
spike_direction?: null | components["schemas"]["SpikeDirection"];
|
|
1254
1266
|
/**
|
|
1255
|
-
*
|
|
1256
|
-
*
|
|
1257
|
-
*
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
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;
|
|
1278
|
+
};
|
|
1279
|
+
/** @description Payload delivered when a position's volume or transaction metrics cross a configured threshold */
|
|
1262
1280
|
PositionMetricsPayload: {
|
|
1281
|
+
/** @description ERC-1155 outcome token ID */
|
|
1263
1282
|
position_id?: string | null;
|
|
1283
|
+
/** @description Outcome name (e.g. "Yes", "No") */
|
|
1264
1284
|
outcome?: string | null;
|
|
1265
|
-
/**
|
|
1285
|
+
/**
|
|
1286
|
+
* Format: int16
|
|
1287
|
+
* @description Outcome index
|
|
1288
|
+
*/
|
|
1266
1289
|
outcome_index?: number | null;
|
|
1290
|
+
/** @description Aggregation window (e.g. "1h", "24h") */
|
|
1267
1291
|
timeframe?: string | null;
|
|
1268
|
-
/**
|
|
1292
|
+
/** @description Total trading volume in USD */
|
|
1269
1293
|
volume_usd?: number | null;
|
|
1270
|
-
/**
|
|
1294
|
+
/** @description Buy volume in USD */
|
|
1271
1295
|
buy_volume_usd?: number | null;
|
|
1272
|
-
/**
|
|
1296
|
+
/** @description Sell volume in USD */
|
|
1273
1297
|
sell_volume_usd?: number | null;
|
|
1274
|
-
/**
|
|
1298
|
+
/** @description Total fees in USD */
|
|
1275
1299
|
fees?: number | null;
|
|
1276
1300
|
/** Format: int64 */
|
|
1277
1301
|
txns?: number | null;
|
|
@@ -1281,158 +1305,92 @@ export interface components {
|
|
|
1281
1305
|
sells?: number | null;
|
|
1282
1306
|
/** Format: int64 */
|
|
1283
1307
|
unique_traders?: number | null;
|
|
1284
|
-
/** Format: double */
|
|
1285
1308
|
price_open?: number | null;
|
|
1286
|
-
/** Format: double */
|
|
1287
1309
|
price_close?: number | null;
|
|
1288
|
-
/** Format: double */
|
|
1289
1310
|
price_high?: number | null;
|
|
1290
|
-
/** Format: double */
|
|
1291
1311
|
price_low?: number | null;
|
|
1292
|
-
/** Format: double */
|
|
1293
1312
|
probability_open?: number | null;
|
|
1294
|
-
/** Format: double */
|
|
1295
1313
|
probability_close?: number | null;
|
|
1296
|
-
/** Format: double */
|
|
1297
1314
|
probability_high?: number | null;
|
|
1298
|
-
/** Format: double */
|
|
1299
1315
|
probability_low?: number | null;
|
|
1300
1316
|
};
|
|
1301
|
-
/** @description
|
|
1317
|
+
/** @description Payload delivered when a position's trading volume crosses a USD milestone */
|
|
1302
1318
|
PositionVolumeMilestonePayload: {
|
|
1319
|
+
/** @description Parent market condition ID */
|
|
1303
1320
|
condition_id?: string | null;
|
|
1321
|
+
/** @description ERC-1155 outcome token ID */
|
|
1304
1322
|
position_id: string;
|
|
1323
|
+
/** @description Outcome name (e.g. "Yes", "No") */
|
|
1305
1324
|
outcome?: string | null;
|
|
1306
|
-
/** Format: int32 */
|
|
1307
|
-
outcome_index?: number | null;
|
|
1308
|
-
timeframe: string;
|
|
1309
1325
|
/**
|
|
1310
|
-
* Format:
|
|
1311
|
-
* @description
|
|
1326
|
+
* Format: int16
|
|
1327
|
+
* @description Outcome index
|
|
1312
1328
|
*/
|
|
1329
|
+
outcome_index?: number | null;
|
|
1330
|
+
/** @description Aggregation window (e.g. "1h", "24h") */
|
|
1331
|
+
timeframe: string;
|
|
1332
|
+
/** @description The USD milestone amount that was crossed */
|
|
1313
1333
|
milestone_usd: number;
|
|
1314
|
-
/**
|
|
1315
|
-
* Format: double
|
|
1316
|
-
* @description Current volume (USD) that triggered the milestone
|
|
1317
|
-
*/
|
|
1334
|
+
/** @description Current position volume at time of trigger (USD) */
|
|
1318
1335
|
current_volume_usd: number;
|
|
1319
|
-
/**
|
|
1320
|
-
* Format: double
|
|
1321
|
-
* @description Buy volume (USD)
|
|
1322
|
-
*/
|
|
1336
|
+
/** @description Buy volume in USD for this timeframe */
|
|
1323
1337
|
buy_volume_usd: number;
|
|
1324
|
-
/**
|
|
1325
|
-
* Format: double
|
|
1326
|
-
* @description Sell volume (USD)
|
|
1327
|
-
*/
|
|
1338
|
+
/** @description Sell volume in USD for this timeframe */
|
|
1328
1339
|
sell_volume_usd: number;
|
|
1329
|
-
/**
|
|
1330
|
-
* Format: double
|
|
1331
|
-
* @description Total fees collected in this timeframe
|
|
1332
|
-
*/
|
|
1340
|
+
/** @description Total fees in USD */
|
|
1333
1341
|
fees: number;
|
|
1334
|
-
/**
|
|
1335
|
-
* Format: int64
|
|
1336
|
-
* @description Total transactions in this timeframe
|
|
1337
|
-
*/
|
|
1342
|
+
/** Format: int64 */
|
|
1338
1343
|
txns: number;
|
|
1339
|
-
/**
|
|
1340
|
-
* Format: int64
|
|
1341
|
-
* @description Buy transactions
|
|
1342
|
-
*/
|
|
1344
|
+
/** Format: int64 */
|
|
1343
1345
|
buys: number;
|
|
1344
|
-
/**
|
|
1345
|
-
* Format: int64
|
|
1346
|
-
* @description Sell transactions
|
|
1347
|
-
*/
|
|
1346
|
+
/** Format: int64 */
|
|
1348
1347
|
sells: number;
|
|
1349
1348
|
};
|
|
1350
|
-
/** @description
|
|
1349
|
+
/** @description Payload delivered when a position's volume has spiked since the last snapshot */
|
|
1351
1350
|
PositionVolumeSpikePayload: {
|
|
1351
|
+
/** @description ERC-1155 outcome token ID */
|
|
1352
1352
|
position_id: string;
|
|
1353
|
+
/** @description Parent market condition ID */
|
|
1353
1354
|
condition_id: string;
|
|
1355
|
+
/** @description Outcome name (e.g. "Yes", "No") */
|
|
1354
1356
|
outcome?: string | null;
|
|
1355
|
-
/** Format:
|
|
1357
|
+
/** Format: int16 */
|
|
1356
1358
|
outcome_index?: number | null;
|
|
1359
|
+
/** @description Aggregation window (e.g. "1h", "24h") */
|
|
1357
1360
|
timeframe: string;
|
|
1358
|
-
/**
|
|
1359
|
-
* Format: double
|
|
1360
|
-
* @description Current position volume that triggered the spike (USD)
|
|
1361
|
-
*/
|
|
1361
|
+
/** @description Current position volume at the time of the spike (USD) */
|
|
1362
1362
|
current_volume_usd: number;
|
|
1363
|
-
/**
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
* @description Spike ratio threshold that was triggered
|
|
1371
|
-
*/
|
|
1372
|
-
spike_ratio: number;
|
|
1373
|
-
/**
|
|
1374
|
-
* Format: double
|
|
1375
|
-
* @description Calculated threshold that was crossed (baseline * ratio)
|
|
1376
|
-
*/
|
|
1377
|
-
threshold_usd: number;
|
|
1378
|
-
/**
|
|
1379
|
-
* Format: int64
|
|
1380
|
-
* @description Total transactions in this timeframe
|
|
1381
|
-
*/
|
|
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;
|
|
1369
|
+
/** Format: int64 */
|
|
1382
1370
|
txns: number;
|
|
1383
|
-
/**
|
|
1384
|
-
* Format: double
|
|
1385
|
-
* @description Total fees in this timeframe
|
|
1386
|
-
*/
|
|
1387
1371
|
fees: number;
|
|
1388
1372
|
};
|
|
1389
|
-
/** @description Position probability spike webhook payload */
|
|
1390
1373
|
ProbabilitySpikePayload: {
|
|
1374
|
+
/** @description Outcome token ID */
|
|
1391
1375
|
position_id: string;
|
|
1376
|
+
/** @description Market condition ID */
|
|
1377
|
+
condition_id?: string | null;
|
|
1378
|
+
/** @description Event slug */
|
|
1379
|
+
event_slug?: string | null;
|
|
1380
|
+
/** @description Outcome name (e.g. "Yes", "No") */
|
|
1392
1381
|
outcome?: string | null;
|
|
1393
|
-
/** Format: int32 */
|
|
1394
|
-
outcome_index?: number | null;
|
|
1395
|
-
timeframe: string;
|
|
1396
1382
|
/**
|
|
1397
|
-
* Format:
|
|
1398
|
-
* @description
|
|
1399
|
-
*/
|
|
1400
|
-
probability_open: number;
|
|
1401
|
-
/**
|
|
1402
|
-
* Format: double
|
|
1403
|
-
* @description Probability at the end of the timeframe (0.0 - 1.0)
|
|
1383
|
+
* Format: int16
|
|
1384
|
+
* @description Outcome index
|
|
1404
1385
|
*/
|
|
1405
|
-
|
|
1406
|
-
/**
|
|
1407
|
-
* Format: double
|
|
1408
|
-
* @description Absolute probability change (e.g., 0.25 for 25 percentage points)
|
|
1409
|
-
*/
|
|
1410
|
-
probability_change: number;
|
|
1411
|
-
/**
|
|
1412
|
-
* Format: double
|
|
1413
|
-
* @description Percentage change relative to open (e.g., 83.33 for 30% -> 55%)
|
|
1414
|
-
*/
|
|
1415
|
-
probability_change_pct: number;
|
|
1416
|
-
/**
|
|
1417
|
-
* Format: double
|
|
1418
|
-
* @description Price at open (0.0 - 1.0)
|
|
1419
|
-
*/
|
|
1420
|
-
price_open: number;
|
|
1421
|
-
/**
|
|
1422
|
-
* Format: double
|
|
1423
|
-
* @description Price at close (0.0 - 1.0)
|
|
1424
|
-
*/
|
|
1425
|
-
price_close: number;
|
|
1426
|
-
/**
|
|
1427
|
-
* Format: double
|
|
1428
|
-
* @description Volume during the timeframe (USD)
|
|
1429
|
-
*/
|
|
1430
|
-
volume_usd: number;
|
|
1386
|
+
outcome_index?: number | null;
|
|
1431
1387
|
/**
|
|
1432
|
-
*
|
|
1433
|
-
* @
|
|
1388
|
+
* @description `"up"` = probability rising, `"down"` = probability falling
|
|
1389
|
+
* @enum {string}
|
|
1434
1390
|
*/
|
|
1435
|
-
|
|
1391
|
+
spike_direction: "up" | "down";
|
|
1392
|
+
/** @description Percentage move that triggered this notification. Positive = up, negative = down. */
|
|
1393
|
+
spike_pct: number;
|
|
1436
1394
|
};
|
|
1437
1395
|
/** @description Response for POST /v1/webhook/{id}/rotate-secret */
|
|
1438
1396
|
RotateSecretResponse: {
|
|
@@ -1444,6 +1402,11 @@ export interface components {
|
|
|
1444
1402
|
*/
|
|
1445
1403
|
rotated_at: number;
|
|
1446
1404
|
};
|
|
1405
|
+
/**
|
|
1406
|
+
* @description Direction filter for spike webhooks.
|
|
1407
|
+
* @enum {string}
|
|
1408
|
+
*/
|
|
1409
|
+
SpikeDirection: "up" | "down" | "both";
|
|
1447
1410
|
/** @description Request body for updating a webhook */
|
|
1448
1411
|
UpdateWebhookRequestBody: {
|
|
1449
1412
|
/** @description Destination URL for webhook deliveries (must be HTTPS) */
|
|
@@ -1456,24 +1419,17 @@ export interface components {
|
|
|
1456
1419
|
/** @description Description/name */
|
|
1457
1420
|
description?: string | null;
|
|
1458
1421
|
};
|
|
1459
|
-
/** @description
|
|
1422
|
+
/** @description Payload delivered when a market's trading volume crosses a USD milestone in the specified timeframe */
|
|
1460
1423
|
VolumeMilestonePayload: {
|
|
1424
|
+
/** @description Market condition ID */
|
|
1461
1425
|
condition_id: string;
|
|
1426
|
+
/** @description Aggregation window that crossed the milestone (e.g. "1h", "24h") */
|
|
1462
1427
|
timeframe: string;
|
|
1463
|
-
/**
|
|
1464
|
-
* Format: double
|
|
1465
|
-
* @description Milestone amount reached (USD)
|
|
1466
|
-
*/
|
|
1428
|
+
/** @description The USD milestone amount that was crossed */
|
|
1467
1429
|
milestone_usd: number;
|
|
1468
|
-
/**
|
|
1469
|
-
* Format: double
|
|
1470
|
-
* @description Current volume (USD) that triggered the milestone
|
|
1471
|
-
*/
|
|
1430
|
+
/** @description Current volume at time of trigger (USD) */
|
|
1472
1431
|
current_volume_usd: number;
|
|
1473
|
-
/**
|
|
1474
|
-
* Format: double
|
|
1475
|
-
* @description Total fees collected in this timeframe
|
|
1476
|
-
*/
|
|
1432
|
+
/** @description Total fees in USD for this timeframe */
|
|
1477
1433
|
fees: number;
|
|
1478
1434
|
/**
|
|
1479
1435
|
* Format: int64
|
|
@@ -1481,6 +1437,11 @@ export interface components {
|
|
|
1481
1437
|
*/
|
|
1482
1438
|
txns: number;
|
|
1483
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";
|
|
1484
1445
|
/** @description Single event type entry for the events list */
|
|
1485
1446
|
WebhookEventInfo: {
|
|
1486
1447
|
/** @description Event type identifier (e.g. "first_trade") */
|
|
@@ -1499,19 +1460,19 @@ export interface components {
|
|
|
1499
1460
|
};
|
|
1500
1461
|
/** @description Webhook filters request body */
|
|
1501
1462
|
WebhookFiltersBody: {
|
|
1502
|
-
/** @description Filter by wallet addresses (for first_trade / new_market / whale_trade) */
|
|
1463
|
+
/** @description Filter by wallet addresses (for first_trade / new_market / whale_trade). Max 500 entries. */
|
|
1503
1464
|
wallet_addresses?: string[];
|
|
1504
|
-
/** @description Filter by trader addresses (for PnL webhooks) */
|
|
1465
|
+
/** @description Filter by trader addresses (for PnL webhooks). Max 500 entries. */
|
|
1505
1466
|
traders?: string[];
|
|
1506
|
-
/** @description Filter by market/condition IDs */
|
|
1467
|
+
/** @description Filter by market/condition IDs. Max 500 entries. */
|
|
1507
1468
|
condition_ids?: string[];
|
|
1508
|
-
/** @description Filter by position IDs (for position metrics / close_to_bond) */
|
|
1469
|
+
/** @description Filter by position IDs (for position metrics / close_to_bond). Max 500 entries. */
|
|
1509
1470
|
position_ids?: string[];
|
|
1510
|
-
/** @description Filter by event slugs */
|
|
1471
|
+
/** @description Filter by event slugs. Max 500 entries. */
|
|
1511
1472
|
event_slugs?: string[];
|
|
1512
|
-
/** @description Filter by outcomes (e.g. "Yes", "No") — for position metrics / close_to_bond */
|
|
1473
|
+
/** @description Filter by outcomes (e.g. "Yes", "No") — for position metrics / close_to_bond. Max 500 entries. */
|
|
1513
1474
|
outcomes?: string[];
|
|
1514
|
-
/** @description Filter by position outcome index — for close_to_bond. Position 0 = Yes/Up, 1 = No. */
|
|
1475
|
+
/** @description Filter by position outcome index — for close_to_bond. Position 0 = Yes/Up, 1 = No. Max 500 entries. */
|
|
1515
1476
|
position_outcome_indices?: number[];
|
|
1516
1477
|
/**
|
|
1517
1478
|
* Format: double
|
|
@@ -1598,26 +1559,19 @@ export interface components {
|
|
|
1598
1559
|
* webhooks (market/event/position), optional for metrics webhooks.
|
|
1599
1560
|
* Valid values: "1m", "5m", "30m", "1h", "6h", "24h", "7d", "30d".
|
|
1600
1561
|
*/
|
|
1601
|
-
timeframes?:
|
|
1602
|
-
/** @description Milestone amounts to trigger on (USD) — for volume_milestone webhooks */
|
|
1562
|
+
timeframes?: components["schemas"]["WebhookTimeframe"][];
|
|
1563
|
+
/** @description Milestone amounts to trigger on (USD) — for volume_milestone webhooks. Max 500 entries. */
|
|
1603
1564
|
milestone_amounts?: number[];
|
|
1604
|
-
/**
|
|
1605
|
-
* Format: double
|
|
1606
|
-
* @description User-defined baseline volume for spike detection (USD) — for volume_spike
|
|
1607
|
-
*/
|
|
1608
|
-
baseline_volume_usd?: number | null;
|
|
1609
1565
|
/**
|
|
1610
1566
|
* Format: double
|
|
1611
1567
|
* @description Spike ratio multiplier (must be > 1.0) — for volume_spike. E.g. 2.0 for 2x baseline
|
|
1612
1568
|
*/
|
|
1613
1569
|
spike_ratio?: number | null;
|
|
1614
|
-
/** @description Exclude short-term trading markets by timeframe pattern (e.g. ["5m", "15m"]) */
|
|
1615
|
-
exclude_shorterm_market_timeframes?: string[];
|
|
1616
1570
|
/**
|
|
1617
1571
|
* @description Filter by crypto asset symbol — for `asset_price_tick` and `asset_price_window_update`.
|
|
1618
1572
|
* Valid values: "BTC", "ETH", "SOL", "XRP". Empty = all assets (send everything).
|
|
1619
1573
|
*/
|
|
1620
|
-
asset_symbols?:
|
|
1574
|
+
asset_symbols?: components["schemas"]["WebhookAssetSymbol"][];
|
|
1621
1575
|
};
|
|
1622
1576
|
/** @description List webhooks response */
|
|
1623
1577
|
WebhookListResponseBody: {
|
|
@@ -1680,30 +1634,32 @@ export interface components {
|
|
|
1680
1634
|
*/
|
|
1681
1635
|
duration_ms: number;
|
|
1682
1636
|
};
|
|
1683
|
-
/**
|
|
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";
|
|
1642
|
+
/** @description Payload delivered when a trade exceeds the configured size and probability thresholds */
|
|
1684
1643
|
WhaleTradePayload: {
|
|
1685
|
-
/** @description
|
|
1644
|
+
/** @description Limit-order maker wallet address (lowercase) */
|
|
1686
1645
|
trader: string;
|
|
1687
|
-
/** @description
|
|
1646
|
+
/** @description Order filler wallet address (lowercase) */
|
|
1688
1647
|
taker: string;
|
|
1689
|
-
/** @description
|
|
1648
|
+
/** @description ERC-1155 outcome token ID */
|
|
1690
1649
|
position_id: string;
|
|
1691
|
-
/** @description
|
|
1650
|
+
/** @description Parent market condition ID */
|
|
1692
1651
|
condition_id?: string | null;
|
|
1693
1652
|
/** @description Outcome name (e.g. "Yes", "No") */
|
|
1694
1653
|
outcome?: string | null;
|
|
1695
|
-
/**
|
|
1696
|
-
* Format: int32
|
|
1697
|
-
* @description Outcome index (0 = Yes, 1 = No)
|
|
1698
|
-
*/
|
|
1654
|
+
/** @description Outcome index: 0 = Yes/Up, 1 = No */
|
|
1699
1655
|
outcome_index?: number | null;
|
|
1700
|
-
/** @description Market question */
|
|
1656
|
+
/** @description Market question text */
|
|
1701
1657
|
question?: string | null;
|
|
1702
1658
|
/** @description Market slug */
|
|
1703
1659
|
market_slug?: string | null;
|
|
1704
|
-
/** @description
|
|
1660
|
+
/** @description Parent event slug */
|
|
1705
1661
|
event_slug?: string | null;
|
|
1706
|
-
/** @description
|
|
1662
|
+
/** @description Unique trade identifier */
|
|
1707
1663
|
trade_id: string;
|
|
1708
1664
|
/** @description Transaction hash */
|
|
1709
1665
|
hash: string;
|
|
@@ -1714,38 +1670,400 @@ export interface components {
|
|
|
1714
1670
|
block: number;
|
|
1715
1671
|
/**
|
|
1716
1672
|
* Format: int64
|
|
1717
|
-
* @description
|
|
1673
|
+
* @description Block confirmation timestamp (Unix seconds)
|
|
1718
1674
|
*/
|
|
1719
1675
|
confirmed_at: number;
|
|
1676
|
+
/** @description USD size of the trade (6 decimal places) */
|
|
1677
|
+
amount_usd: number;
|
|
1678
|
+
/** @description Outcome shares traded (6 decimal places) */
|
|
1679
|
+
shares_amount: number;
|
|
1680
|
+
/** @description Fee paid in USD (6 decimal places) */
|
|
1681
|
+
fee: number;
|
|
1720
1682
|
/**
|
|
1721
|
-
*
|
|
1722
|
-
* @
|
|
1683
|
+
* @description Trade direction
|
|
1684
|
+
* @enum {string}
|
|
1723
1685
|
*/
|
|
1724
|
-
|
|
1686
|
+
side: "Buy" | "Sell";
|
|
1687
|
+
/** @description Outcome token price (0.0–1.0) */
|
|
1688
|
+
price: number;
|
|
1689
|
+
/** @description Implied probability (0.0–1.0); null when outcome is unknown */
|
|
1690
|
+
probability?: number | null;
|
|
1691
|
+
/** @description Exchange identifier */
|
|
1692
|
+
exchange: string;
|
|
1693
|
+
/** @description Trade type identifier */
|
|
1694
|
+
trade_type: string;
|
|
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;
|
|
1725
1705
|
/**
|
|
1726
|
-
* Format:
|
|
1727
|
-
* @description Outcome
|
|
1706
|
+
* Format: int16
|
|
1707
|
+
* @description Outcome index
|
|
1728
1708
|
*/
|
|
1729
|
-
|
|
1709
|
+
outcome_index?: number | null;
|
|
1730
1710
|
/**
|
|
1731
|
-
*
|
|
1732
|
-
* @
|
|
1711
|
+
* @description `"up"` = price rising, `"down"` = price falling
|
|
1712
|
+
* @enum {string}
|
|
1733
1713
|
*/
|
|
1734
|
-
|
|
1735
|
-
/** @description
|
|
1736
|
-
|
|
1714
|
+
spike_direction: "up" | "down";
|
|
1715
|
+
/** @description Percentage move that triggered this notification. Positive = up, negative = down. */
|
|
1716
|
+
spike_pct: number;
|
|
1717
|
+
};
|
|
1718
|
+
/** @description Subscription filters for the `trader_first_trade` event. All fields are optional. */
|
|
1719
|
+
TraderFirstTradeFilters: {
|
|
1720
|
+
/** @description Only fire for trades by these wallet addresses (lowercase). Empty = all traders. */
|
|
1721
|
+
wallet_addresses?: string[];
|
|
1722
|
+
/** @description Restrict to trades in these markets. Empty = all markets. */
|
|
1723
|
+
condition_ids?: string[];
|
|
1724
|
+
/** @description Restrict to trades in markets belonging to these events. */
|
|
1725
|
+
event_slugs?: string[];
|
|
1726
|
+
/** @description Minimum trade size in USD. Omit to match all sizes. */
|
|
1727
|
+
min_usd_value?: number;
|
|
1728
|
+
/** @description Only fire when the outcome probability is ≥ this value. */
|
|
1729
|
+
min_probability?: number;
|
|
1730
|
+
/** @description Only fire when the outcome probability is ≤ this value. */
|
|
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;
|
|
1734
|
+
};
|
|
1735
|
+
/** @description Subscription filters for the `trader_new_market` event. All fields are optional. */
|
|
1736
|
+
TraderNewMarketFilters: {
|
|
1737
|
+
/** @description Only fire for these wallet addresses (lowercase). Empty = all traders. */
|
|
1738
|
+
wallet_addresses?: string[];
|
|
1739
|
+
/** @description Restrict to these markets. */
|
|
1740
|
+
condition_ids?: string[];
|
|
1741
|
+
/** @description Restrict to markets belonging to these events. */
|
|
1742
|
+
event_slugs?: string[];
|
|
1743
|
+
/** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
|
|
1744
|
+
exclude_shortterm_markets?: boolean;
|
|
1745
|
+
};
|
|
1746
|
+
/** @description Subscription filters for the `trader_whale_trade` event. All fields are optional. */
|
|
1747
|
+
TraderWhaleTradeFilters: {
|
|
1748
|
+
/** @description Only fire for trades by these wallet addresses. Empty = all traders. */
|
|
1749
|
+
wallet_addresses?: string[];
|
|
1750
|
+
/** @description Restrict to these markets. */
|
|
1751
|
+
condition_ids?: string[];
|
|
1752
|
+
/** @description Restrict to markets belonging to these events. */
|
|
1753
|
+
event_slugs?: string[];
|
|
1737
1754
|
/**
|
|
1738
|
-
*
|
|
1739
|
-
* @
|
|
1755
|
+
* @description Minimum trade size in USD. Defaults to 0 (matches all trades).
|
|
1756
|
+
* @default 0
|
|
1740
1757
|
*/
|
|
1741
|
-
|
|
1758
|
+
min_usd_value: number;
|
|
1759
|
+
/** @description Only fire when outcome probability is ≥ this value. */
|
|
1760
|
+
min_probability?: number;
|
|
1761
|
+
/** @description Only fire when outcome probability is ≤ this value. */
|
|
1762
|
+
max_probability?: number;
|
|
1763
|
+
/** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
|
|
1764
|
+
exclude_shortterm_markets?: boolean;
|
|
1765
|
+
};
|
|
1766
|
+
/** @description Subscription filters for the `trader_global_pnl` event. All fields are optional. */
|
|
1767
|
+
TraderGlobalPnlFilters: {
|
|
1768
|
+
/** @description Track only these trader wallet addresses. Empty = all traders. */
|
|
1769
|
+
traders?: string[];
|
|
1770
|
+
/** @description Only fire when realized PnL ≥ this value (USD). Use negative values for loss thresholds. */
|
|
1771
|
+
min_realized_pnl_usd?: number;
|
|
1772
|
+
/** @description Only fire when realized PnL ≤ this value (USD). */
|
|
1773
|
+
max_realized_pnl_usd?: number;
|
|
1774
|
+
/** @description Only fire when total trading volume ≥ this value (USD). */
|
|
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;
|
|
1782
|
+
/** @description Only fire when market win rate ≥ this percentage (0.0–100.0). */
|
|
1783
|
+
min_win_rate?: number;
|
|
1742
1784
|
/**
|
|
1743
|
-
* Format:
|
|
1744
|
-
* @description
|
|
1785
|
+
* Format: int64
|
|
1786
|
+
* @description Only fire when the trader has traded in ≥ this many markets.
|
|
1745
1787
|
*/
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1788
|
+
min_markets_traded?: number;
|
|
1789
|
+
/** @description Restrict to these PnL windows. Empty = all windows. */
|
|
1790
|
+
timeframes?: ("1d" | "7d" | "30d" | "lifetime")[];
|
|
1791
|
+
};
|
|
1792
|
+
/** @description Subscription filters for the `trader_market_pnl` event. All fields are optional. */
|
|
1793
|
+
TraderMarketPnlFilters: {
|
|
1794
|
+
/** @description Track only these trader wallet addresses. */
|
|
1795
|
+
traders?: string[];
|
|
1796
|
+
/** @description Restrict to these markets. */
|
|
1797
|
+
condition_ids?: string[];
|
|
1798
|
+
/** @description Restrict to markets in these events. */
|
|
1799
|
+
event_slugs?: string[];
|
|
1800
|
+
/** @description Only fire when per-market realized PnL ≥ this value (USD). */
|
|
1801
|
+
min_realized_pnl_usd?: number;
|
|
1802
|
+
/** @description Only fire when per-market realized PnL ≤ this value (USD). */
|
|
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;
|
|
1808
|
+
/** @description Only fire when buy volume in the market ≥ this value (USD). */
|
|
1809
|
+
min_buy_usd?: number;
|
|
1810
|
+
/** @description Only fire when sell volume in the market ≥ this value (USD). */
|
|
1811
|
+
min_sell_volume_usd?: number;
|
|
1812
|
+
/** @description Restrict to these PnL windows. */
|
|
1813
|
+
timeframes?: ("1d" | "7d" | "30d" | "lifetime")[];
|
|
1814
|
+
/** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
|
|
1815
|
+
exclude_shortterm_markets?: boolean;
|
|
1816
|
+
};
|
|
1817
|
+
/** @description Subscription filters for the `trader_event_pnl` event. All fields are optional. */
|
|
1818
|
+
TraderEventPnlFilters: {
|
|
1819
|
+
/** @description Track only these trader wallet addresses. */
|
|
1820
|
+
traders?: string[];
|
|
1821
|
+
/** @description Restrict to these events. */
|
|
1822
|
+
event_slugs?: string[];
|
|
1823
|
+
/** @description Only fire when per-event realized PnL ≥ this value (USD). */
|
|
1824
|
+
min_realized_pnl_usd?: number;
|
|
1825
|
+
/** @description Only fire when per-event realized PnL ≤ this value (USD). */
|
|
1826
|
+
max_realized_pnl_usd?: number;
|
|
1827
|
+
/** @description Only fire when total event volume ≥ this value (USD). */
|
|
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;
|
|
1835
|
+
/**
|
|
1836
|
+
* Format: int64
|
|
1837
|
+
* @description Only fire when the trader has traded in ≥ this many markets within the event.
|
|
1838
|
+
*/
|
|
1839
|
+
min_markets_traded?: number;
|
|
1840
|
+
/** @description Restrict to these PnL windows. */
|
|
1841
|
+
timeframes?: ("1d" | "7d" | "30d" | "lifetime")[];
|
|
1842
|
+
/** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
|
|
1843
|
+
exclude_shortterm_markets?: boolean;
|
|
1844
|
+
};
|
|
1845
|
+
/** @description Subscription filters for the `condition_metrics` event. All fields are optional. */
|
|
1846
|
+
MarketMetricsFilters: {
|
|
1847
|
+
/** @description Restrict to these markets. Empty = all markets. */
|
|
1848
|
+
condition_ids?: string[];
|
|
1849
|
+
/** @description Restrict to markets in these events. */
|
|
1850
|
+
event_slugs?: string[];
|
|
1851
|
+
/** @description Restrict to these aggregation windows. Empty = all windows. */
|
|
1852
|
+
timeframes?: ("1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d")[];
|
|
1853
|
+
/** @description Only fire when volume ≥ this value (USD). */
|
|
1854
|
+
min_volume_usd?: number;
|
|
1855
|
+
/** @description Only fire when volume ≤ this value (USD). */
|
|
1856
|
+
max_volume_usd?: number;
|
|
1857
|
+
/**
|
|
1858
|
+
* Format: int64
|
|
1859
|
+
* @description Only fire when transaction count ≥ this value.
|
|
1860
|
+
*/
|
|
1861
|
+
min_txns?: number;
|
|
1862
|
+
/**
|
|
1863
|
+
* Format: int64
|
|
1864
|
+
* @description Only fire when unique trader count ≥ this value.
|
|
1865
|
+
*/
|
|
1866
|
+
min_unique_traders?: number;
|
|
1867
|
+
/** @description Only fire when total fees ≥ this value (USD). */
|
|
1868
|
+
min_fees?: number;
|
|
1869
|
+
};
|
|
1870
|
+
/** @description Subscription filters for the `event_metrics` event. All fields are optional. */
|
|
1871
|
+
EventMetricsFilters: {
|
|
1872
|
+
/** @description Restrict to these events. Empty = all events. */
|
|
1873
|
+
event_slugs?: string[];
|
|
1874
|
+
/** @description Restrict to these aggregation windows. */
|
|
1875
|
+
timeframes?: ("1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d")[];
|
|
1876
|
+
/** @description Only fire when aggregated event volume ≥ this value (USD). */
|
|
1877
|
+
min_volume_usd?: number;
|
|
1878
|
+
max_volume_usd?: number;
|
|
1879
|
+
/** Format: int64 */
|
|
1880
|
+
min_txns?: number;
|
|
1881
|
+
/** Format: int64 */
|
|
1882
|
+
min_unique_traders?: number;
|
|
1883
|
+
min_fees?: number;
|
|
1884
|
+
/** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
|
|
1885
|
+
exclude_shortterm_markets?: boolean;
|
|
1886
|
+
};
|
|
1887
|
+
/** @description Subscription filters for the `position_metrics` event. All fields are optional. */
|
|
1888
|
+
PositionMetricsFilters: {
|
|
1889
|
+
/** @description Restrict to these outcome token IDs. */
|
|
1890
|
+
position_ids?: string[];
|
|
1891
|
+
/** @description Restrict to positions within these markets. */
|
|
1892
|
+
condition_ids?: string[];
|
|
1893
|
+
/** @description Restrict to positions with these outcome names (e.g. ["Yes", "No"]). */
|
|
1894
|
+
outcomes?: string[];
|
|
1895
|
+
/** @description Restrict to these aggregation windows. */
|
|
1896
|
+
timeframes?: ("1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d")[];
|
|
1897
|
+
/** @description Only fire when position volume ≥ this value (USD). */
|
|
1898
|
+
min_volume_usd?: number;
|
|
1899
|
+
max_volume_usd?: number;
|
|
1900
|
+
min_buy_usd?: number;
|
|
1901
|
+
min_sell_volume_usd?: number;
|
|
1902
|
+
/** Format: int64 */
|
|
1903
|
+
min_txns?: number;
|
|
1904
|
+
/** Format: int64 */
|
|
1905
|
+
min_unique_traders?: number;
|
|
1906
|
+
/** @description Only fire when price change % ≥ this value. */
|
|
1907
|
+
min_price_change_pct?: number;
|
|
1908
|
+
/** @description Only fire when probability change % ≥ this value. */
|
|
1909
|
+
min_probability_change_pct?: number;
|
|
1910
|
+
min_fees?: number;
|
|
1911
|
+
};
|
|
1912
|
+
/** @description Subscription filters for the `market_volume_milestone` event. */
|
|
1913
|
+
MarketVolumeMilestoneFilters: {
|
|
1914
|
+
/** @description **Required.** Aggregation windows to monitor (e.g. ["1h", "24h"]). */
|
|
1915
|
+
timeframes: ("1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d")[];
|
|
1916
|
+
/** @description Restrict to these markets. Empty = all markets. */
|
|
1917
|
+
condition_ids?: string[];
|
|
1918
|
+
/** @description Specific USD milestones to trigger on (e.g. [10000, 100000, 1000000]). Empty = all milestones. */
|
|
1919
|
+
milestone_amounts?: number[];
|
|
1920
|
+
};
|
|
1921
|
+
/** @description Subscription filters for the `event_volume_milestone` event. */
|
|
1922
|
+
EventVolumeMilestoneFilters: {
|
|
1923
|
+
/** @description **Required.** Aggregation windows to monitor. */
|
|
1924
|
+
timeframes: ("1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d")[];
|
|
1925
|
+
/** @description Restrict to these events. */
|
|
1926
|
+
event_slugs?: string[];
|
|
1927
|
+
/** @description Specific USD milestones to trigger on. */
|
|
1928
|
+
milestone_amounts?: number[];
|
|
1929
|
+
/** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
|
|
1930
|
+
exclude_shortterm_markets?: boolean;
|
|
1931
|
+
};
|
|
1932
|
+
/** @description Subscription filters for the `position_volume_milestone` event. */
|
|
1933
|
+
PositionVolumeMilestoneFilters: {
|
|
1934
|
+
/** @description **Required.** Aggregation windows to monitor. */
|
|
1935
|
+
timeframes: ("1m" | "5m" | "30m" | "1h" | "6h" | "24h" | "7d" | "30d")[];
|
|
1936
|
+
/** @description Restrict to these outcome token IDs. */
|
|
1937
|
+
position_ids?: string[];
|
|
1938
|
+
/** @description Restrict to positions within these markets. */
|
|
1939
|
+
condition_ids?: string[];
|
|
1940
|
+
/** @description Specific USD milestones to trigger on. */
|
|
1941
|
+
milestone_amounts?: number[];
|
|
1942
|
+
};
|
|
1943
|
+
/** @description Subscription filters for the `probability_spike` event. */
|
|
1944
|
+
ProbabilitySpikeFilters: {
|
|
1945
|
+
/** @description Restrict to specific outcome token IDs. Empty = all positions. */
|
|
1946
|
+
position_ids?: string[];
|
|
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"]). */
|
|
1952
|
+
outcomes?: string[];
|
|
1953
|
+
/** @description Minimum probability percentage move to trigger (e.g. `10` for a 10% move). */
|
|
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;
|
|
1964
|
+
};
|
|
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. */
|
|
1988
|
+
MarketVolumeSpikeFilters: {
|
|
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. */
|
|
1990
|
+
spike_ratio: number;
|
|
1991
|
+
/** @description Force snapshot reset after this many seconds (max 600 / 10 minutes). */
|
|
1992
|
+
window_secs?: number;
|
|
1993
|
+
/** @description Restrict to these markets. Empty = all markets. */
|
|
1994
|
+
condition_ids?: string[];
|
|
1995
|
+
/** @description Restrict to these aggregation windows. Empty = all windows. */
|
|
1996
|
+
timeframes?: ("1m" | "5m" | "30m" | "1h" | "6h" | "1d" | "24h" | "7d" | "30d")[];
|
|
1997
|
+
};
|
|
1998
|
+
/** @description Subscription filters for the `event_volume_spike` event. `spike_ratio` is required. */
|
|
1999
|
+
EventVolumeSpikeFilters: {
|
|
2000
|
+
/** @description **Required.** Multiplier threshold (must be > 1.0). Fires when current volume >= snapshot × ratio. */
|
|
2001
|
+
spike_ratio: number;
|
|
2002
|
+
/** @description Force snapshot reset after this many seconds (max 600 / 10 minutes). */
|
|
2003
|
+
window_secs?: number;
|
|
2004
|
+
/** @description Restrict to these events. */
|
|
2005
|
+
event_slugs?: string[];
|
|
2006
|
+
/** @description Restrict to these aggregation windows. */
|
|
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;
|
|
2010
|
+
};
|
|
2011
|
+
/** @description Subscription filters for the `position_volume_spike` event. `spike_ratio` is required. */
|
|
2012
|
+
PositionVolumeSpikeFilters: {
|
|
2013
|
+
/** @description **Required.** Multiplier threshold (must be > 1.0). Fires when current volume >= snapshot × ratio. */
|
|
2014
|
+
spike_ratio: number;
|
|
2015
|
+
/** @description Force snapshot reset after this many seconds (max 600 / 10 minutes). */
|
|
2016
|
+
window_secs?: number;
|
|
2017
|
+
/** @description Restrict to these outcome token IDs. */
|
|
2018
|
+
position_ids?: string[];
|
|
2019
|
+
/** @description Restrict to positions within these markets. */
|
|
2020
|
+
condition_ids?: string[];
|
|
2021
|
+
/** @description Restrict to these outcome names. */
|
|
2022
|
+
outcomes?: string[];
|
|
2023
|
+
/** @description Restrict to these aggregation windows. */
|
|
2024
|
+
timeframes?: ("1m" | "5m" | "30m" | "1h" | "6h" | "1d" | "24h" | "7d" | "30d")[];
|
|
2025
|
+
};
|
|
2026
|
+
/** @description Subscription filters for the `close_to_bond` event. At least one of `min_probability` or `max_probability` is required. */
|
|
2027
|
+
CloseToBondFilters: {
|
|
2028
|
+
/** @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. */
|
|
2029
|
+
min_probability?: number;
|
|
2030
|
+
/** @description Trigger when the YES outcome price is ≤ this value (e.g. 0.05 for near-certain NO). */
|
|
2031
|
+
max_probability?: number;
|
|
2032
|
+
/** @description Restrict to these markets. */
|
|
2033
|
+
condition_ids?: string[];
|
|
2034
|
+
/** @description Restrict to these outcome token IDs. */
|
|
2035
|
+
position_ids?: string[];
|
|
2036
|
+
/** @description Restrict to markets in these events. */
|
|
2037
|
+
event_slugs?: string[];
|
|
2038
|
+
/** @description Restrict to these outcome names (e.g. ["Yes", "No"]). */
|
|
2039
|
+
outcomes?: string[];
|
|
2040
|
+
/** @description Restrict by outcome index. 0 = Yes/Up, 1 = No. Position 0 usually represents the Up/Yes side in binary markets. */
|
|
2041
|
+
position_outcome_indices?: number[];
|
|
2042
|
+
/** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
|
|
2043
|
+
exclude_shortterm_markets?: boolean;
|
|
2044
|
+
};
|
|
2045
|
+
/** @description Subscription filters for the `market_created` event. All fields are optional. */
|
|
2046
|
+
MarketCreatedFilters: {
|
|
2047
|
+
/** @description Restrict to markets with these tags or category names (case-insensitive match). */
|
|
2048
|
+
tags?: string[];
|
|
2049
|
+
/** @description Restrict to these specific markets. */
|
|
2050
|
+
condition_ids?: string[];
|
|
2051
|
+
/** @description Restrict to markets belonging to these events. */
|
|
2052
|
+
event_slugs?: string[];
|
|
2053
|
+
/** @description When `true`, suppress webhooks for short-term "updown" markets (event slugs containing `updown`). Default: `false`. */
|
|
2054
|
+
exclude_shortterm_markets?: boolean;
|
|
2055
|
+
};
|
|
2056
|
+
/** @description Subscription filters for the `asset_price_tick` event. All fields are optional. */
|
|
2057
|
+
AssetPriceTickFilters: {
|
|
2058
|
+
/** @description Restrict to these crypto assets. Empty = all assets. */
|
|
2059
|
+
asset_symbols?: ("BTC" | "ETH" | "SOL" | "XRP")[];
|
|
2060
|
+
};
|
|
2061
|
+
/** @description Subscription filters for the `asset_price_window_update` event. All fields are optional. */
|
|
2062
|
+
AssetPriceWindowUpdateFilters: {
|
|
2063
|
+
/** @description Restrict to these crypto assets. Empty = all assets. */
|
|
2064
|
+
asset_symbols?: ("BTC" | "ETH" | "SOL" | "XRP")[];
|
|
2065
|
+
/** @description Restrict to these candle sizes. Empty = all sizes. */
|
|
2066
|
+
timeframes?: ("5m" | "15m" | "1h" | "1d" | "24h")[];
|
|
1749
2067
|
};
|
|
1750
2068
|
};
|
|
1751
2069
|
responses: never;
|
|
@@ -2444,6 +2762,35 @@ export interface operations {
|
|
|
2444
2762
|
};
|
|
2445
2763
|
};
|
|
2446
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
|
+
};
|
|
2447
2794
|
"market-volume-spike": {
|
|
2448
2795
|
parameters: {
|
|
2449
2796
|
query?: never;
|