@structbuild/sdk 0.6.4 → 0.6.5
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/webhooks.d.ts +52 -213
- package/dist/generated/ws-alerts.d.ts +51 -210
- package/dist/generated/ws.d.ts +47 -145
- package/dist/types/index.d.ts +0 -3
- package/package.json +1 -1
|
@@ -188,7 +188,7 @@ export interface webhooks {
|
|
|
188
188
|
put?: never;
|
|
189
189
|
/**
|
|
190
190
|
* Whale trade callback
|
|
191
|
-
* @description Fired when a trade meets the configured criteria. Use `min_usd_value` to filter by minimum trade size (optional, defaults to 0 — matches all trades), and `
|
|
191
|
+
* @description Fired when a trade meets the configured criteria. Use `min_usd_value` to filter by minimum trade size (optional, defaults to 0 — matches all trades), and `min_price`/`max_price` to restrict to a traded price range.
|
|
192
192
|
*/
|
|
193
193
|
post: operations["trader-whale-trade"];
|
|
194
194
|
delete?: never;
|
|
@@ -208,7 +208,7 @@ export interface webhooks {
|
|
|
208
208
|
put?: never;
|
|
209
209
|
/**
|
|
210
210
|
* New trade callback
|
|
211
|
-
* @description Fired on fill-style trades only (`OrderFilled`, `OrdersMatched`). Use `wallet_addresses` to watch specific traders, `min_usd_value` to filter by size, and `
|
|
211
|
+
* @description Fired on fill-style trades only (`OrderFilled`, `OrdersMatched`). Use `wallet_addresses` to watch specific traders, `min_usd_value` to filter by size, and `min_price`/`max_price` to restrict to a probability range.
|
|
212
212
|
*/
|
|
213
213
|
post: operations["trader-new-trade"];
|
|
214
214
|
delete?: never;
|
|
@@ -597,26 +597,6 @@ export interface webhooks {
|
|
|
597
597
|
patch?: never;
|
|
598
598
|
trace?: never;
|
|
599
599
|
};
|
|
600
|
-
"probability-spike": {
|
|
601
|
-
parameters: {
|
|
602
|
-
query?: never;
|
|
603
|
-
header?: never;
|
|
604
|
-
path?: never;
|
|
605
|
-
cookie?: never;
|
|
606
|
-
};
|
|
607
|
-
get?: never;
|
|
608
|
-
put?: never;
|
|
609
|
-
/**
|
|
610
|
-
* Probability spike callback
|
|
611
|
-
* @description Fired when a market's YES 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. Scope by market taxonomy with `tags` (matches a market's tags or category) and `series_slugs` (matches its parent series). Optional `min_probability`/`max_probability` gate the YES probability band, `min_txns`/`min_volume_usd` require a minimum number of trades or USD volume in the observation window.
|
|
612
|
-
*/
|
|
613
|
-
post: operations["probability-spike"];
|
|
614
|
-
delete?: never;
|
|
615
|
-
options?: never;
|
|
616
|
-
head?: never;
|
|
617
|
-
patch?: never;
|
|
618
|
-
trace?: never;
|
|
619
|
-
};
|
|
620
600
|
"price-spike": {
|
|
621
601
|
parameters: {
|
|
622
602
|
query?: never;
|
|
@@ -628,7 +608,7 @@ export interface webhooks {
|
|
|
628
608
|
put?: never;
|
|
629
609
|
/**
|
|
630
610
|
* Price spike callback
|
|
631
|
-
* @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. Scope by market taxonomy with `tags` (matches a market's tags or category) and `series_slugs` (matches its parent series). Optional `
|
|
611
|
+
* @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. Scope by market taxonomy with `tags` (matches a market's tags or category) and `series_slugs` (matches its parent series). Optional `min_price`/`max_price` gate the price band, `min_txns`/`min_volume_usd` require a minimum number of trades or USD volume in the observation window.
|
|
632
612
|
*/
|
|
633
613
|
post: operations["price-spike"];
|
|
634
614
|
delete?: never;
|
|
@@ -708,7 +688,7 @@ export interface webhooks {
|
|
|
708
688
|
put?: never;
|
|
709
689
|
/**
|
|
710
690
|
* Close to bond callback
|
|
711
|
-
* @description Fired when a trade occurs at a near-certain-outcome price. **At least one of `
|
|
691
|
+
* @description Fired when a trade occurs at a near-certain-outcome price. The alert matches on the traded position's own price — so you receive the trade for the exact `position_id` that hit the threshold. **At least one of `min_price` or `max_price` is required.** Use `min_price` (e.g. `0.95`) to trigger when the traded outcome is near-certain (price ≥ threshold); use `max_price` (e.g. `0.05`) for the near-zero side (price ≤ threshold). 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. Scope by market taxonomy with `tags` (matches a market's tags or category) and `series_slugs` (matches its parent series).
|
|
712
692
|
*/
|
|
713
693
|
post: operations["close-to-bond"];
|
|
714
694
|
delete?: never;
|
|
@@ -728,7 +708,7 @@ export interface webhooks {
|
|
|
728
708
|
put?: never;
|
|
729
709
|
/**
|
|
730
710
|
* Price threshold crossing callback
|
|
731
|
-
* @description Fired when an outcome's price
|
|
711
|
+
* @description Fired when an outcome's price crosses a target level (edge-triggered, fires once per crossing). **At least one of `min_price` or `max_price` is required.** Use `min_price` (e.g. `0.75`) to fire when the price crosses *up* to ≥ that level; use `max_price` (e.g. `0.25`) to fire when it crosses *down* to ≤ that level. Set `one_shot` to delete the subscription after the first delivery (requires `position_ids` or `condition_ids`). Set `fire_if_already_past` to fire immediately when the first observed price is already past the target. Optional scope filters: `condition_ids`, `position_ids`, `outcomes`, `position_outcome_indices` (`0` = Yes/Up, `1` = No), `event_slugs`, `tags` (a market's tags or category), `series_slugs` (parent series).
|
|
732
712
|
*/
|
|
733
713
|
post: operations["price-threshold"];
|
|
734
714
|
delete?: never;
|
|
@@ -1195,7 +1175,7 @@ export interface components {
|
|
|
1195
1175
|
};
|
|
1196
1176
|
/**
|
|
1197
1177
|
* @description Subscription filters for the `close_to_bond` event. At least one of
|
|
1198
|
-
* `
|
|
1178
|
+
* `min_price` or `max_price` is required (enforced at runtime).
|
|
1199
1179
|
*/
|
|
1200
1180
|
CloseToBondFilters: {
|
|
1201
1181
|
/**
|
|
@@ -1209,14 +1189,14 @@ export interface components {
|
|
|
1209
1189
|
series_slugs?: string[] | null;
|
|
1210
1190
|
/**
|
|
1211
1191
|
* Format: double
|
|
1212
|
-
* @description Trigger when the
|
|
1192
|
+
* @description Trigger when the traded position's price is ≥ this value (e.g. 0.95 for a near-certain outcome). At least one of `min_price` or `max_price` must be set.
|
|
1213
1193
|
*/
|
|
1214
|
-
|
|
1194
|
+
min_price?: number | null;
|
|
1215
1195
|
/**
|
|
1216
1196
|
* Format: double
|
|
1217
|
-
* @description Trigger when the
|
|
1197
|
+
* @description Trigger when the traded position's price is ≤ this value (e.g. 0.05 for a near-zero outcome).
|
|
1218
1198
|
*/
|
|
1219
|
-
|
|
1199
|
+
max_price?: number | null;
|
|
1220
1200
|
/** @description Restrict to these markets. */
|
|
1221
1201
|
condition_ids?: string[] | null;
|
|
1222
1202
|
/** @description Restrict to these outcome token IDs. */
|
|
@@ -1289,16 +1269,11 @@ export interface components {
|
|
|
1289
1269
|
* @description Price per share (0.0–1.0) — the value that triggered the notification
|
|
1290
1270
|
*/
|
|
1291
1271
|
price: number;
|
|
1292
|
-
/**
|
|
1293
|
-
* Format: double
|
|
1294
|
-
* @description Implied probability of the outcome (0.0–1.0)
|
|
1295
|
-
*/
|
|
1296
|
-
probability?: number | null;
|
|
1297
|
-
/** @description Which bond zone was entered: `"high"` (YES near-certain) or `"low"` (NO near-certain) */
|
|
1272
|
+
/** @description Which bond zone was entered: `"high"` (price ≥ `min_price`) or `"low"` (price ≤ `max_price`) */
|
|
1298
1273
|
bond_side: string;
|
|
1299
1274
|
/**
|
|
1300
1275
|
* Format: double
|
|
1301
|
-
* @description The
|
|
1276
|
+
* @description The price threshold from the subscriber's filter that was breached
|
|
1302
1277
|
*/
|
|
1303
1278
|
threshold: number;
|
|
1304
1279
|
};
|
|
@@ -2814,18 +2789,18 @@ export interface components {
|
|
|
2814
2789
|
* @description Polymarket webhook event types
|
|
2815
2790
|
* @enum {string}
|
|
2816
2791
|
*/
|
|
2817
|
-
PolymarketWebhookEvent: "trader_first_trade" | "trader_new_market" | "trader_whale_trade" | "trader_new_trade" | "trader_trade_event" | "trader_global_pnl" | "trader_market_pnl" | "trader_category_pnl" | "trader_position_resolved" | "trader_exit_markers" | "position_holder_metrics" | "condition_holder_metrics" | "event_holder_metrics" | "condition_metrics" | "event_metrics" | "tag_metrics" | "position_metrics" | "position_liquidity" | "market_liquidity" | "event_liquidity" | "market_volume_milestone" | "event_volume_milestone" | "position_volume_milestone" | "
|
|
2792
|
+
PolymarketWebhookEvent: "trader_first_trade" | "trader_new_market" | "trader_whale_trade" | "trader_new_trade" | "trader_trade_event" | "trader_global_pnl" | "trader_market_pnl" | "trader_category_pnl" | "trader_position_resolved" | "trader_exit_markers" | "position_holder_metrics" | "condition_holder_metrics" | "event_holder_metrics" | "condition_metrics" | "event_metrics" | "tag_metrics" | "position_metrics" | "position_liquidity" | "market_liquidity" | "event_liquidity" | "market_volume_milestone" | "event_volume_milestone" | "position_volume_milestone" | "market_volume_spike" | "event_volume_spike" | "position_volume_spike" | "close_to_bond" | "market_created" | "asset_price_tick" | "asset_price_window_update" | "price_spike" | "probability_spike" | "oracle_events" | "price_threshold" | "market_resolved" | "market_disputed";
|
|
2818
2793
|
/**
|
|
2819
2794
|
* @description Polymarket-specific webhook filters
|
|
2820
2795
|
*
|
|
2821
2796
|
* Different webhook handlers use different subsets of these fields.
|
|
2822
|
-
* The trade-driven events `price_spike
|
|
2797
|
+
* The trade-driven events `price_spike` and
|
|
2823
2798
|
* `close_to_bond` additionally accept `tags` (matches a market's tags OR its
|
|
2824
2799
|
* category) and `series_slugs` (matches the market's parent series); these are
|
|
2825
2800
|
* resolved from the tags/series the crawler enriches onto each trade.
|
|
2826
|
-
* - first_trade: wallet_addresses, min_usd_value,
|
|
2827
|
-
* - new_market: wallet_addresses, condition_ids, event_slugs, min_usd_value,
|
|
2828
|
-
* - whale_trade: min_usd_value (required),
|
|
2801
|
+
* - first_trade: wallet_addresses, min_usd_value, min_price, max_price, condition_ids, event_slugs, tags
|
|
2802
|
+
* - new_market: wallet_addresses, condition_ids, event_slugs, min_usd_value, min_price, max_price
|
|
2803
|
+
* - whale_trade: min_usd_value (required), min_price, max_price, condition_ids, event_slugs
|
|
2829
2804
|
* - global_pnl: traders, min_realized_pnl_usd, max_realized_pnl_usd, min_volume_usd, min_win_rate, min_markets_traded
|
|
2830
2805
|
* - market_pnl: traders, min_realized_pnl_usd, max_realized_pnl_usd, min_buy_usd, condition_ids, event_slugs
|
|
2831
2806
|
* - event_pnl: traders, min_realized_pnl_usd, max_realized_pnl_usd, min_volume_usd, event_slugs, min_markets_traded
|
|
@@ -2834,15 +2809,14 @@ export interface components {
|
|
|
2834
2809
|
* - tag_metrics: tags, min_volume_usd, max_volume_usd, min_fees, min_txns, timeframes
|
|
2835
2810
|
* - 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
|
|
2836
2811
|
* - volume_milestone: condition_ids, timeframes, milestone_amounts
|
|
2837
|
-
* - close_to_bond:
|
|
2812
|
+
* - close_to_bond: min_price (high zone threshold), max_price (low zone threshold), condition_ids, tags, series_slugs, position_ids, outcomes, position_outcome_indices, event_slugs, exclude_shortterm_markets
|
|
2838
2813
|
* - market_created: event_slugs, tags, exclude_shortterm_markets
|
|
2839
|
-
* - probability_spike: condition_ids, event_slugs, tags, series_slugs, outcomes, min_probability, max_probability, min_probability_change_pct, spike_direction, window_secs, exclude_shortterm_markets
|
|
2840
2814
|
* - price_spike: condition_ids, event_slugs, tags, series_slugs, outcomes, min_price_change_pct, spike_direction, window_secs, exclude_shortterm_markets
|
|
2841
|
-
* - trader_new_trade: wallet_addresses, min_usd_value,
|
|
2842
|
-
* - trader_trade_event: wallet_addresses, min_usd_value,
|
|
2843
|
-
* - trader_first_trade: wallet_addresses, min_usd_value,
|
|
2844
|
-
* - trader_new_market: wallet_addresses, condition_ids, event_slugs, min_usd_value,
|
|
2845
|
-
* - trader_whale_trade: min_usd_value (required),
|
|
2815
|
+
* - trader_new_trade: wallet_addresses, min_usd_value, min_price, max_price, condition_ids, event_slugs, trade_types, exclude_shortterm_markets
|
|
2816
|
+
* - trader_trade_event: wallet_addresses, min_usd_value, min_price, max_price, condition_ids, event_slugs, trade_types, exclude_shortterm_markets
|
|
2817
|
+
* - trader_first_trade: wallet_addresses, min_usd_value, min_price, max_price, exclude_shortterm_markets
|
|
2818
|
+
* - trader_new_market: wallet_addresses, condition_ids, event_slugs, min_usd_value, min_price, max_price, exclude_shortterm_markets
|
|
2819
|
+
* - trader_whale_trade: min_usd_value (required), min_price, max_price, condition_ids, event_slugs, exclude_shortterm_markets
|
|
2846
2820
|
* - trader_event_pnl: traders, min_realized_pnl_usd, max_realized_pnl_usd, min_volume_usd, event_slugs, min_markets_traded, exclude_shortterm_markets
|
|
2847
2821
|
* - trader_market_pnl: traders, min_realized_pnl_usd, max_realized_pnl_usd, min_buy_usd, condition_ids, event_slugs, exclude_shortterm_markets
|
|
2848
2822
|
*
|
|
@@ -2888,14 +2862,14 @@ export interface components {
|
|
|
2888
2862
|
series_slugs?: string[];
|
|
2889
2863
|
/**
|
|
2890
2864
|
* Format: double
|
|
2891
|
-
* @description Minimum
|
|
2865
|
+
* @description Minimum trade price threshold (0.0 - 1.0). Accepts the legacy `min_probability` key.
|
|
2892
2866
|
*/
|
|
2893
|
-
|
|
2867
|
+
min_price?: number | null;
|
|
2894
2868
|
/**
|
|
2895
2869
|
* Format: double
|
|
2896
|
-
* @description Maximum
|
|
2870
|
+
* @description Maximum trade price threshold (0.0 - 1.0). Accepts the legacy `max_probability` key.
|
|
2897
2871
|
*/
|
|
2898
|
-
|
|
2872
|
+
max_price?: number | null;
|
|
2899
2873
|
/**
|
|
2900
2874
|
* Format: double
|
|
2901
2875
|
* @description Minimum realized PnL (USD) - for PnL webhooks
|
|
@@ -3023,7 +2997,7 @@ export interface components {
|
|
|
3023
2997
|
/**
|
|
3024
2998
|
* @description When `true`, exclude all short-term "updown" markets (event slugs containing "updown").
|
|
3025
2999
|
* These are short-duration crypto price markets (e.g., "btc-updown-5m-…", "eth-updown-1h-…").
|
|
3026
|
-
* Supported by: close_to_bond, market_created, price_spike,
|
|
3000
|
+
* Supported by: close_to_bond, market_created, price_spike,
|
|
3027
3001
|
* trader_first_trade, trader_new_market, trader_whale_trade, trader_event_pnl, trader_market_pnl,
|
|
3028
3002
|
* event_metrics, event_volume_milestone, event_volume_spike.
|
|
3029
3003
|
*/
|
|
@@ -3037,7 +3011,7 @@ export interface components {
|
|
|
3037
3011
|
spike_direction?: null | components["schemas"]["SpikeDirection"];
|
|
3038
3012
|
/**
|
|
3039
3013
|
* Format: int64
|
|
3040
|
-
* @description Observation window in seconds for `
|
|
3014
|
+
* @description Observation window in seconds for `price_spike`.
|
|
3041
3015
|
*
|
|
3042
3016
|
* When set, the first trade seen for a position opens a window of this duration.
|
|
3043
3017
|
* The opening price becomes the baseline, and every subsequent trade within the
|
|
@@ -3740,12 +3714,12 @@ export interface components {
|
|
|
3740
3714
|
* Format: double
|
|
3741
3715
|
* @description Minimum YES probability (0-1).
|
|
3742
3716
|
*/
|
|
3743
|
-
|
|
3717
|
+
min_price?: number | null;
|
|
3744
3718
|
/**
|
|
3745
3719
|
* Format: double
|
|
3746
3720
|
* @description Maximum YES probability (0-1).
|
|
3747
3721
|
*/
|
|
3748
|
-
|
|
3722
|
+
max_price?: number | null;
|
|
3749
3723
|
/**
|
|
3750
3724
|
* Format: int64
|
|
3751
3725
|
* @description Minimum trades accumulated in the observation window before firing.
|
|
@@ -3812,14 +3786,14 @@ export interface components {
|
|
|
3812
3786
|
series_slugs?: string[] | null;
|
|
3813
3787
|
/**
|
|
3814
3788
|
* Format: double
|
|
3815
|
-
* @description Upward target — fire when the YES price crosses up to ≥ this value (e.g. 0.75 for 75%). At least one of `
|
|
3789
|
+
* @description Upward target — fire when the YES price crosses up to ≥ this value (e.g. 0.75 for 75%). At least one of `min_price` or `max_price` must be set.
|
|
3816
3790
|
*/
|
|
3817
|
-
|
|
3791
|
+
min_price?: number | null;
|
|
3818
3792
|
/**
|
|
3819
3793
|
* Format: double
|
|
3820
3794
|
* @description Downward target — fire when the YES price crosses down to ≤ this value (e.g. 0.25).
|
|
3821
3795
|
*/
|
|
3822
|
-
|
|
3796
|
+
max_price?: number | null;
|
|
3823
3797
|
/** @description When `true`, delete the subscription after its first delivery (fire-and-delete). Requires `position_ids` or `condition_ids`. Default: `false`. */
|
|
3824
3798
|
one_shot?: boolean | null;
|
|
3825
3799
|
/** @description When `true`, fire immediately if the first observed price is already past the target (no prior baseline). Default: `false` (wait for an actual crossing). */
|
|
@@ -3907,8 +3881,8 @@ export interface components {
|
|
|
3907
3881
|
*/
|
|
3908
3882
|
probability?: number | null;
|
|
3909
3883
|
/**
|
|
3910
|
-
* @description Crossing direction: `"up"` (crossed up to the `
|
|
3911
|
-
* `"down"` (crossed down to the `
|
|
3884
|
+
* @description Crossing direction: `"up"` (crossed up to the `min_price` target) or
|
|
3885
|
+
* `"down"` (crossed down to the `max_price` target)
|
|
3912
3886
|
*/
|
|
3913
3887
|
direction: string;
|
|
3914
3888
|
/**
|
|
@@ -3917,98 +3891,6 @@ export interface components {
|
|
|
3917
3891
|
*/
|
|
3918
3892
|
threshold: number;
|
|
3919
3893
|
};
|
|
3920
|
-
/** @description Subscription filters for the `probability_spike` event. */
|
|
3921
|
-
ProbabilitySpikeFilters: {
|
|
3922
|
-
/**
|
|
3923
|
-
* @description Fire-and-delete: when `true`, delete the subscription after its first
|
|
3924
|
-
* successful delivery. Applies to any webhook event.
|
|
3925
|
-
*/
|
|
3926
|
-
one_shot?: boolean | null;
|
|
3927
|
-
/** @description Restrict to specific outcome token IDs. Empty = all positions. */
|
|
3928
|
-
position_ids?: string[] | null;
|
|
3929
|
-
/** @description Restrict to specific market condition IDs. Empty = all markets. */
|
|
3930
|
-
condition_ids?: string[] | null;
|
|
3931
|
-
/** @description Restrict to specific events. Empty = all events. */
|
|
3932
|
-
event_slugs?: string[] | null;
|
|
3933
|
-
/** @description Restrict to these outcome names (e.g. \["Yes", "No"\]). */
|
|
3934
|
-
outcomes?: string[] | null;
|
|
3935
|
-
/**
|
|
3936
|
-
* Format: double
|
|
3937
|
-
* @description Minimum YES probability (0-1). At least one of `min_probability`/`max_probability` is enforced at runtime if you want a probability gate.
|
|
3938
|
-
*/
|
|
3939
|
-
min_probability?: number | null;
|
|
3940
|
-
/**
|
|
3941
|
-
* Format: double
|
|
3942
|
-
* @description Maximum YES probability (0-1).
|
|
3943
|
-
*/
|
|
3944
|
-
max_probability?: number | null;
|
|
3945
|
-
/** @description Restrict to markets carrying any of these tags or category names (case-insensitive). Empty = all. */
|
|
3946
|
-
tags?: string[] | null;
|
|
3947
|
-
/** @description Restrict to markets in any of these series (by slug, case-insensitive). Empty = all. */
|
|
3948
|
-
series_slugs?: string[] | null;
|
|
3949
|
-
/**
|
|
3950
|
-
* Format: double
|
|
3951
|
-
* @description Minimum probability percentage move to trigger (e.g. `10` for a 10% move).
|
|
3952
|
-
*/
|
|
3953
|
-
min_probability_change_pct?: number | null;
|
|
3954
|
-
/**
|
|
3955
|
-
* Format: int64
|
|
3956
|
-
* @description Minimum trades accumulated in the observation window before firing.
|
|
3957
|
-
*/
|
|
3958
|
-
min_txns?: number | null;
|
|
3959
|
-
/**
|
|
3960
|
-
* Format: double
|
|
3961
|
-
* @description Minimum USD volume accumulated in the observation window before firing.
|
|
3962
|
-
*/
|
|
3963
|
-
min_volume_usd?: number | null;
|
|
3964
|
-
spike_direction?: null | components["schemas"]["SpikeDirection"];
|
|
3965
|
-
/**
|
|
3966
|
-
* Format: int64
|
|
3967
|
-
* @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.
|
|
3968
|
-
*/
|
|
3969
|
-
window_secs?: number | null;
|
|
3970
|
-
/** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
|
|
3971
|
-
exclude_shortterm_markets?: boolean | null;
|
|
3972
|
-
};
|
|
3973
|
-
/** @description Position probability spike webhook payload */
|
|
3974
|
-
ProbabilitySpikePayload: {
|
|
3975
|
-
/** @description Outcome token ID. */
|
|
3976
|
-
position_id: string;
|
|
3977
|
-
/** @description Market condition ID. */
|
|
3978
|
-
condition_id?: string | null;
|
|
3979
|
-
/** @description Market question. */
|
|
3980
|
-
question?: string | null;
|
|
3981
|
-
/** @description Market slug. */
|
|
3982
|
-
market_slug?: string | null;
|
|
3983
|
-
/** @description Event slug. */
|
|
3984
|
-
event_slug?: string | null;
|
|
3985
|
-
/** @description Image URL. */
|
|
3986
|
-
image_url?: string | null;
|
|
3987
|
-
/** @description Outcome name. */
|
|
3988
|
-
outcome?: string | null;
|
|
3989
|
-
/**
|
|
3990
|
-
* Format: int32
|
|
3991
|
-
* @description Outcome index.
|
|
3992
|
-
*/
|
|
3993
|
-
outcome_index?: number | null;
|
|
3994
|
-
/**
|
|
3995
|
-
* Format: double
|
|
3996
|
-
* @description YES probability at the start of the observation window (the baseline snapshot)
|
|
3997
|
-
*/
|
|
3998
|
-
previous_probability: number;
|
|
3999
|
-
/**
|
|
4000
|
-
* Format: double
|
|
4001
|
-
* @description Current YES probability that triggered the spike
|
|
4002
|
-
*/
|
|
4003
|
-
current_probability: number;
|
|
4004
|
-
/** @description Direction of the spike: `"up"` (YES probability rising) or `"down"` (YES probability falling) */
|
|
4005
|
-
spike_direction: string;
|
|
4006
|
-
/**
|
|
4007
|
-
* Format: double
|
|
4008
|
-
* @description Detected spike percentage from the snapshot baseline. Positive = rising, negative = falling.
|
|
4009
|
-
*/
|
|
4010
|
-
spike_pct: number;
|
|
4011
|
-
};
|
|
4012
3894
|
/** @description V2 UMA OOv2: a price was proposed (resolution proposal). */
|
|
4013
3895
|
ProposePriceEvent: {
|
|
4014
3896
|
id: string;
|
|
@@ -4498,12 +4380,12 @@ export interface components {
|
|
|
4498
4380
|
* Format: double
|
|
4499
4381
|
* @description Only fire when the outcome probability is ≥ this value.
|
|
4500
4382
|
*/
|
|
4501
|
-
|
|
4383
|
+
min_price?: number | null;
|
|
4502
4384
|
/**
|
|
4503
4385
|
* Format: double
|
|
4504
4386
|
* @description Only fire when the outcome probability is ≤ this value.
|
|
4505
4387
|
*/
|
|
4506
|
-
|
|
4388
|
+
max_price?: number | null;
|
|
4507
4389
|
/** @description When `true`, suppress webhooks for short-term "updown" markets (event slugs containing `updown`). Default: `false`. */
|
|
4508
4390
|
exclude_shortterm_markets?: boolean | null;
|
|
4509
4391
|
};
|
|
@@ -4629,12 +4511,12 @@ export interface components {
|
|
|
4629
4511
|
* Format: double
|
|
4630
4512
|
* @description Only fire when the outcome probability is ≥ this value.
|
|
4631
4513
|
*/
|
|
4632
|
-
|
|
4514
|
+
min_price?: number | null;
|
|
4633
4515
|
/**
|
|
4634
4516
|
* Format: double
|
|
4635
4517
|
* @description Only fire when the outcome probability is ≤ this value.
|
|
4636
4518
|
*/
|
|
4637
|
-
|
|
4519
|
+
max_price?: number | null;
|
|
4638
4520
|
/** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
|
|
4639
4521
|
exclude_shortterm_markets?: boolean | null;
|
|
4640
4522
|
};
|
|
@@ -4661,12 +4543,12 @@ export interface components {
|
|
|
4661
4543
|
* Format: double
|
|
4662
4544
|
* @description Only fire when outcome probability is ≥ this value.
|
|
4663
4545
|
*/
|
|
4664
|
-
|
|
4546
|
+
min_price?: number | null;
|
|
4665
4547
|
/**
|
|
4666
4548
|
* Format: double
|
|
4667
4549
|
* @description Only fire when outcome probability is ≤ this value.
|
|
4668
4550
|
*/
|
|
4669
|
-
|
|
4551
|
+
max_price?: number | null;
|
|
4670
4552
|
/** @description Only fire for these fill-style trade types. Empty = OrderFilled and OrdersMatched only (default). */
|
|
4671
4553
|
trade_types?: ("OrderFilled" | "OrdersMatched")[] | null;
|
|
4672
4554
|
/** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
|
|
@@ -4718,12 +4600,12 @@ export interface components {
|
|
|
4718
4600
|
* Format: double
|
|
4719
4601
|
* @description Only fire when event probability is ≥ this value. Events without probability data do not match.
|
|
4720
4602
|
*/
|
|
4721
|
-
|
|
4603
|
+
min_price?: number | null;
|
|
4722
4604
|
/**
|
|
4723
4605
|
* Format: double
|
|
4724
4606
|
* @description Only fire when event probability is ≤ this value. Events without probability data do not match.
|
|
4725
4607
|
*/
|
|
4726
|
-
|
|
4608
|
+
max_price?: number | null;
|
|
4727
4609
|
/** @description Only fire for these trade types. Empty = all supported trade-event variants. */
|
|
4728
4610
|
trade_types?: ("OrderFilled" | "OrdersMatched" | "MakerRebate" | "Reward" | "Yield" | "Redemption" | "Merge" | "Split" | "Cancelled" | "PositionsConverted" | "Initialization" | "Proposal" | "Dispute" | "Settled" | "Resolution" | "ConditionResolution" | "Reset" | "Flag" | "Unflag" | "Pause" | "Unpause" | "ManualResolution" | "NegRiskOutcomeReported" | "RegisterToken")[] | null;
|
|
4729
4611
|
/** @description When `true`, suppress webhooks for short-term "updown" markets. Requires explicit `trade_types` that exclude `PositionsConverted`. Default: `false`. */
|
|
@@ -4752,12 +4634,12 @@ export interface components {
|
|
|
4752
4634
|
* Format: double
|
|
4753
4635
|
* @description Only fire when outcome probability is ≥ this value.
|
|
4754
4636
|
*/
|
|
4755
|
-
|
|
4637
|
+
min_price?: number | null;
|
|
4756
4638
|
/**
|
|
4757
4639
|
* Format: double
|
|
4758
4640
|
* @description Only fire when outcome probability is ≤ this value.
|
|
4759
4641
|
*/
|
|
4760
|
-
|
|
4642
|
+
max_price?: number | null;
|
|
4761
4643
|
/** @description When `true`, suppress webhooks for short-term "updown" markets. Default: `false`. */
|
|
4762
4644
|
exclude_shortterm_markets?: boolean | null;
|
|
4763
4645
|
};
|
|
@@ -4865,14 +4747,14 @@ export interface components {
|
|
|
4865
4747
|
min_usd_value?: number | null;
|
|
4866
4748
|
/**
|
|
4867
4749
|
* Format: double
|
|
4868
|
-
* @description Minimum
|
|
4750
|
+
* @description Minimum price threshold (0.0 - 1.0). Accepts the legacy `min_probability` key.
|
|
4869
4751
|
*/
|
|
4870
|
-
|
|
4752
|
+
min_price?: number | null;
|
|
4871
4753
|
/**
|
|
4872
4754
|
* Format: double
|
|
4873
|
-
* @description Maximum
|
|
4755
|
+
* @description Maximum price threshold (0.0 - 1.0). Accepts the legacy `max_probability` key.
|
|
4874
4756
|
*/
|
|
4875
|
-
|
|
4757
|
+
max_price?: number | null;
|
|
4876
4758
|
/**
|
|
4877
4759
|
* Format: double
|
|
4878
4760
|
* @description Minimum realized PnL (USD) — for global_pnl / market_pnl / event_pnl
|
|
@@ -4945,7 +4827,7 @@ export interface components {
|
|
|
4945
4827
|
min_price_change_pct?: number | null;
|
|
4946
4828
|
/**
|
|
4947
4829
|
* Format: double
|
|
4948
|
-
* @description Minimum probability change percentage
|
|
4830
|
+
* @description Minimum probability change percentage (legacy spike filter field)
|
|
4949
4831
|
*/
|
|
4950
4832
|
min_probability_change_pct?: number | null;
|
|
4951
4833
|
/**
|
|
@@ -4964,7 +4846,7 @@ export interface components {
|
|
|
4964
4846
|
spike_direction?: null | components["schemas"]["SpikeDirection"];
|
|
4965
4847
|
/**
|
|
4966
4848
|
* Format: int64
|
|
4967
|
-
* @description Observation window in seconds (max 600) — for
|
|
4849
|
+
* @description Observation window in seconds (max 600) — for price_spike, volume_spike
|
|
4968
4850
|
*/
|
|
4969
4851
|
window_secs?: number | null;
|
|
4970
4852
|
/** @description When true, suppress webhooks for short-term "updown" markets */
|
|
@@ -7065,49 +6947,6 @@ export interface operations {
|
|
|
7065
6947
|
};
|
|
7066
6948
|
};
|
|
7067
6949
|
};
|
|
7068
|
-
"probability-spike": {
|
|
7069
|
-
parameters: {
|
|
7070
|
-
query?: never;
|
|
7071
|
-
header: {
|
|
7072
|
-
/** @description UUID of the webhook subscription that fired */
|
|
7073
|
-
"X-Webhook-ID": string;
|
|
7074
|
-
/** @description UUID of this specific delivery attempt (matches envelope `id` field) */
|
|
7075
|
-
"X-Delivery-ID": string;
|
|
7076
|
-
/** @description Event name string (e.g. `trader_first_trade`) */
|
|
7077
|
-
"X-Event-Type": string;
|
|
7078
|
-
/** @description Delivery attempt number (1 = first attempt) */
|
|
7079
|
-
"X-Attempt": number;
|
|
7080
|
-
/** @description HMAC-SHA256 of the raw request body: `sha256=<hex>`. Present only when the webhook has a secret configured. Verify with: HMAC-SHA256(secret, raw_body_bytes) == hex_part. */
|
|
7081
|
-
"X-Webhook-Signature"?: string;
|
|
7082
|
-
};
|
|
7083
|
-
path?: never;
|
|
7084
|
-
cookie?: never;
|
|
7085
|
-
};
|
|
7086
|
-
/** @description Webhook delivery envelope. The `data` field contains the event-specific payload. */
|
|
7087
|
-
requestBody: {
|
|
7088
|
-
content: {
|
|
7089
|
-
"application/json": components["schemas"]["WebhookDeliveryEnvelope"] & {
|
|
7090
|
-
data?: components["schemas"]["ProbabilitySpikePayload"];
|
|
7091
|
-
};
|
|
7092
|
-
};
|
|
7093
|
-
};
|
|
7094
|
-
responses: {
|
|
7095
|
-
/** @description Webhook delivery acknowledged */
|
|
7096
|
-
200: {
|
|
7097
|
-
headers: {
|
|
7098
|
-
[name: string]: unknown;
|
|
7099
|
-
};
|
|
7100
|
-
content?: never;
|
|
7101
|
-
};
|
|
7102
|
-
/** @description Server error (will retry) */
|
|
7103
|
-
500: {
|
|
7104
|
-
headers: {
|
|
7105
|
-
[name: string]: unknown;
|
|
7106
|
-
};
|
|
7107
|
-
content?: never;
|
|
7108
|
-
};
|
|
7109
|
-
};
|
|
7110
|
-
};
|
|
7111
6950
|
"price-spike": {
|
|
7112
6951
|
parameters: {
|
|
7113
6952
|
query?: never;
|