@structbuild/sdk 0.5.8 → 0.5.10
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 +8 -6
- package/dist/generated/webhooks.d.ts +172 -19
- package/dist/generated/ws-alerts.d.ts +104 -13
- package/dist/generated/ws.d.ts +119 -17
- package/dist/index.cjs +5 -1
- package/dist/index.cjs.map +3 -3
- package/dist/index.js +5 -1
- package/dist/index.js.map +3 -3
- package/dist/namespaces/webhooks.d.ts +2 -1
- package/dist/types/index.d.ts +6 -0
- package/package.json +1 -1
|
@@ -563,7 +563,7 @@ export interface paths {
|
|
|
563
563
|
};
|
|
564
564
|
/**
|
|
565
565
|
* Get event chart
|
|
566
|
-
* @description Retrieve price data over time for up to 4
|
|
566
|
+
* @description Retrieve price data over time for up to 4 highest-volume markets in an event. Perfect for rendering multi-line charts showing price movement across top markets. TradingView-style: resolution parameter determines both candle size and implicit lookback period.
|
|
567
567
|
*/
|
|
568
568
|
get: operations["get_event_chart"];
|
|
569
569
|
put?: never;
|
|
@@ -1956,6 +1956,8 @@ export interface components {
|
|
|
1956
1956
|
/** Format: int64 */
|
|
1957
1957
|
t: number;
|
|
1958
1958
|
};
|
|
1959
|
+
/** @enum {string} */
|
|
1960
|
+
AssetCandlestickResolution: "1S" | "1" | "5" | "15" | "30" | "60" | "240" | "D" | "1D";
|
|
1959
1961
|
/** @description One bucket of an asset's price history at a fixed time-window resolution. */
|
|
1960
1962
|
AssetPriceHistoryRow: {
|
|
1961
1963
|
asset_symbol: string;
|
|
@@ -1997,7 +1999,7 @@ export interface components {
|
|
|
1997
1999
|
* active in the selected timeframe.
|
|
1998
2000
|
* @enum {string}
|
|
1999
2001
|
*/
|
|
2000
|
-
TagSortBy: "volume" | "shares_volume" | "txns" | "unique_traders" | "unique_makers" | "unique_takers" | "fees";
|
|
2002
|
+
TagSortBy: "volume" | "builder_volume" | "shares_volume" | "builder_shares_volume" | "txns" | "builder_txns" | "unique_traders" | "unique_builder_traders" | "unique_makers" | "unique_takers" | "fees" | "builder_fees";
|
|
2001
2003
|
BondMarket: {
|
|
2002
2004
|
condition_id: string;
|
|
2003
2005
|
title?: string | null;
|
|
@@ -4224,7 +4226,7 @@ export interface components {
|
|
|
4224
4226
|
* @description Timeframe values accepted by webhook metric, milestone, spike, and asset-price filters.
|
|
4225
4227
|
* @enum {string}
|
|
4226
4228
|
*/
|
|
4227
|
-
WebhookTimeframe: "1m" | "5m" | "15m" | "30m" | "1h" | "4h" | "6h" | "1d" | "24h" | "7d" | "30d";
|
|
4229
|
+
WebhookTimeframe: "1m" | "5m" | "15m" | "30m" | "1h" | "4h" | "6h" | "1d" | "24h" | "7d" | "30d" | "lifetime";
|
|
4228
4230
|
/**
|
|
4229
4231
|
* @description Sort metric for the trader → builders list.
|
|
4230
4232
|
* @enum {string}
|
|
@@ -5619,8 +5621,8 @@ export interface operations {
|
|
|
5619
5621
|
query: {
|
|
5620
5622
|
/** @description Asset ticker: BTC, ETH, XRP, SOL, DOGE, BNB, HYPE */
|
|
5621
5623
|
asset_symbol: components["schemas"]["AssetSymbol"];
|
|
5622
|
-
/** @description Candle interval: 1, 5, 15, 30, 60, 240, D, 1D */
|
|
5623
|
-
resolution: components["schemas"]["
|
|
5624
|
+
/** @description Candle interval (TradingView naming): 1S (1 second), 1, 5, 15, 30, 60, 240, D, 1D */
|
|
5625
|
+
resolution: components["schemas"]["AssetCandlestickResolution"];
|
|
5624
5626
|
/** @description Number of candles (max: 2500) */
|
|
5625
5627
|
count_back?: number;
|
|
5626
5628
|
/** @description Start timestamp (Unix seconds) */
|
|
@@ -6368,7 +6370,7 @@ export interface operations {
|
|
|
6368
6370
|
};
|
|
6369
6371
|
requestBody?: never;
|
|
6370
6372
|
responses: {
|
|
6371
|
-
/** @description Price data over time for up to 4
|
|
6373
|
+
/** @description Price data over time for up to 4 highest-volume markets */
|
|
6372
6374
|
200: {
|
|
6373
6375
|
headers: {
|
|
6374
6376
|
[name: string]: unknown;
|
|
@@ -75,6 +75,26 @@ export interface paths {
|
|
|
75
75
|
patch?: never;
|
|
76
76
|
trace?: never;
|
|
77
77
|
};
|
|
78
|
+
"/webhooks/{webhook_id}/logs": {
|
|
79
|
+
parameters: {
|
|
80
|
+
query?: never;
|
|
81
|
+
header?: never;
|
|
82
|
+
path?: never;
|
|
83
|
+
cookie?: never;
|
|
84
|
+
};
|
|
85
|
+
/**
|
|
86
|
+
* Get webhook delivery logs
|
|
87
|
+
* @description Returns delivery logs for a webhook (newest first), including the send time and the payload we delivered (large payloads and error messages may be truncated). Retained for 7 days. Keyset-paginated via `pagination_key`.
|
|
88
|
+
*/
|
|
89
|
+
get: operations["get_webhook_logs"];
|
|
90
|
+
put?: never;
|
|
91
|
+
post?: never;
|
|
92
|
+
delete?: never;
|
|
93
|
+
options?: never;
|
|
94
|
+
head?: never;
|
|
95
|
+
patch?: never;
|
|
96
|
+
trace?: never;
|
|
97
|
+
};
|
|
78
98
|
"/webhooks/{webhook_id}/rotate-secret": {
|
|
79
99
|
parameters: {
|
|
80
100
|
query?: never;
|
|
@@ -288,7 +308,7 @@ export interface webhooks {
|
|
|
288
308
|
put?: never;
|
|
289
309
|
/**
|
|
290
310
|
* Market metrics callback
|
|
291
|
-
* @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`).
|
|
311
|
+
* @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`, `lifetime`).
|
|
292
312
|
*/
|
|
293
313
|
post: operations["market-metrics"];
|
|
294
314
|
delete?: never;
|
|
@@ -308,7 +328,7 @@ export interface webhooks {
|
|
|
308
328
|
put?: never;
|
|
309
329
|
/**
|
|
310
330
|
* Event metrics callback
|
|
311
|
-
* @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`).
|
|
331
|
+
* @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`, `lifetime`).
|
|
312
332
|
*/
|
|
313
333
|
post: operations["event-metrics"];
|
|
314
334
|
delete?: never;
|
|
@@ -328,7 +348,7 @@ export interface webhooks {
|
|
|
328
348
|
put?: never;
|
|
329
349
|
/**
|
|
330
350
|
* Tag metrics callback
|
|
331
|
-
* @description Fired when a tag's volume or transaction metrics cross a configured threshold. Use `timeframes` to restrict to specific windows (valid values: `1m`, `5m`, `30m`, `1h`, `6h`, `24h`, `7d`, `30d`).
|
|
351
|
+
* @description Fired when a tag's volume or transaction metrics cross a configured threshold. Use `timeframes` to restrict to specific windows (valid values: `1m`, `5m`, `30m`, `1h`, `6h`, `24h`, `7d`, `30d`, `lifetime`).
|
|
332
352
|
*/
|
|
333
353
|
post: operations["tag-metrics"];
|
|
334
354
|
delete?: never;
|
|
@@ -348,7 +368,7 @@ export interface webhooks {
|
|
|
348
368
|
put?: never;
|
|
349
369
|
/**
|
|
350
370
|
* Position metrics callback
|
|
351
|
-
* @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`).
|
|
371
|
+
* @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`, `lifetime`).
|
|
352
372
|
*/
|
|
353
373
|
post: operations["position-metrics"];
|
|
354
374
|
delete?: never;
|
|
@@ -368,7 +388,7 @@ export interface webhooks {
|
|
|
368
388
|
put?: never;
|
|
369
389
|
/**
|
|
370
390
|
* Market volume milestone callback
|
|
371
|
-
* @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.
|
|
391
|
+
* @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`, `lifetime`. Optional `milestone_amounts` restricts to specific USD thresholds (e.g. `[10000, 100000]`). Optional `condition_ids` restricts to specific markets.
|
|
372
392
|
*/
|
|
373
393
|
post: operations["market-volume-milestone"];
|
|
374
394
|
delete?: never;
|
|
@@ -388,7 +408,7 @@ export interface webhooks {
|
|
|
388
408
|
put?: never;
|
|
389
409
|
/**
|
|
390
410
|
* Event volume milestone callback
|
|
391
|
-
* @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.
|
|
411
|
+
* @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`, `lifetime`. Optional `milestone_amounts` restricts to specific USD thresholds. Optional `event_slugs` restricts to specific events.
|
|
392
412
|
*/
|
|
393
413
|
post: operations["event-volume-milestone"];
|
|
394
414
|
delete?: never;
|
|
@@ -408,7 +428,7 @@ export interface webhooks {
|
|
|
408
428
|
put?: never;
|
|
409
429
|
/**
|
|
410
430
|
* Position volume milestone callback
|
|
411
|
-
* @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.
|
|
431
|
+
* @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`, `lifetime`. Optional `milestone_amounts` restricts to specific USD thresholds. Optional `position_ids` or `condition_ids` restrict to specific positions/markets.
|
|
412
432
|
*/
|
|
413
433
|
post: operations["position-volume-milestone"];
|
|
414
434
|
delete?: never;
|
|
@@ -428,7 +448,7 @@ export interface webhooks {
|
|
|
428
448
|
put?: never;
|
|
429
449
|
/**
|
|
430
450
|
* Probability spike callback
|
|
431
|
-
* @description Fired when a
|
|
451
|
+
* @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. 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.
|
|
432
452
|
*/
|
|
433
453
|
post: operations["probability-spike"];
|
|
434
454
|
delete?: never;
|
|
@@ -468,7 +488,7 @@ export interface webhooks {
|
|
|
468
488
|
put?: never;
|
|
469
489
|
/**
|
|
470
490
|
* Market volume spike callback
|
|
471
|
-
* @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.
|
|
491
|
+
* @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`, `lifetime`. Optional `condition_ids` restricts to specific markets.
|
|
472
492
|
*/
|
|
473
493
|
post: operations["market-volume-spike"];
|
|
474
494
|
delete?: never;
|
|
@@ -880,7 +900,7 @@ export interface components {
|
|
|
880
900
|
/** @description Market condition ID */
|
|
881
901
|
condition_id?: string | null;
|
|
882
902
|
/** @description Aggregation window */
|
|
883
|
-
timeframe?: null | ("1m" | "5m" | "15m" | "30m" | "1h" | "4h" | "6h" | "1d" | "24h" | "7d" | "30d");
|
|
903
|
+
timeframe?: null | ("1m" | "5m" | "15m" | "30m" | "1h" | "4h" | "6h" | "1d" | "24h" | "7d" | "30d" | "lifetime");
|
|
884
904
|
/**
|
|
885
905
|
* Format: double
|
|
886
906
|
* @description Total trading volume in USD for this timeframe
|
|
@@ -1038,7 +1058,7 @@ export interface components {
|
|
|
1038
1058
|
/** @description Event slug */
|
|
1039
1059
|
event_slug?: string | null;
|
|
1040
1060
|
/** @description Aggregation window */
|
|
1041
|
-
timeframe?: null | ("1m" | "5m" | "15m" | "30m" | "1h" | "4h" | "6h" | "1d" | "24h" | "7d" | "30d");
|
|
1061
|
+
timeframe?: null | ("1m" | "5m" | "15m" | "30m" | "1h" | "4h" | "6h" | "1d" | "24h" | "7d" | "30d" | "lifetime");
|
|
1042
1062
|
/**
|
|
1043
1063
|
* Format: double
|
|
1044
1064
|
* @description Total aggregated volume across all markets in the event (USD)
|
|
@@ -1713,6 +1733,16 @@ export interface components {
|
|
|
1713
1733
|
exchange: "CTFExchange" | "NegRiskExchange" | "ConditionalTokens" | "NegRiskAdapter" | "CTFExchangeV2" | "NegRiskExchangeV2" | "Unknown";
|
|
1714
1734
|
/** @description Trade type (webhook events only fire on order fills) */
|
|
1715
1735
|
trade_type: "OrderFilled" | "OrdersMatched";
|
|
1736
|
+
/**
|
|
1737
|
+
* @description CLOB V2 builder code (lower-cased `0x...` bytes32 hex). Absent on V1
|
|
1738
|
+
* trades; may be `0x0000…` for V2 trades placed without a builder code.
|
|
1739
|
+
*/
|
|
1740
|
+
builder_code?: string | null;
|
|
1741
|
+
/**
|
|
1742
|
+
* Format: double
|
|
1743
|
+
* @description Builder fee in USDC. Absent when no builder code is attached.
|
|
1744
|
+
*/
|
|
1745
|
+
builder_fee?: number | null;
|
|
1716
1746
|
};
|
|
1717
1747
|
/**
|
|
1718
1748
|
* @description Oracle event variants accepted by `oracle_events.oracle_event_types`.
|
|
@@ -1782,6 +1812,13 @@ export interface components {
|
|
|
1782
1812
|
/** @description Restrict to events for these condition IDs. */
|
|
1783
1813
|
condition_ids?: string[] | null;
|
|
1784
1814
|
};
|
|
1815
|
+
/** @description Pagination metadata to include in API responses */
|
|
1816
|
+
PaginationMeta: {
|
|
1817
|
+
/** @description Whether there are more results available */
|
|
1818
|
+
has_more: boolean;
|
|
1819
|
+
/** @description Pagination key for the next page (if has_more is true) */
|
|
1820
|
+
pagination_key?: string | null;
|
|
1821
|
+
};
|
|
1785
1822
|
/**
|
|
1786
1823
|
* @description PnL aggregation windows accepted by `*_pnl.timeframes`.
|
|
1787
1824
|
* @enum {string}
|
|
@@ -2035,7 +2072,7 @@ export interface components {
|
|
|
2035
2072
|
*/
|
|
2036
2073
|
outcome_index?: number | null;
|
|
2037
2074
|
/** @description Aggregation window */
|
|
2038
|
-
timeframe?: null | ("1m" | "5m" | "15m" | "30m" | "1h" | "4h" | "6h" | "1d" | "24h" | "7d" | "30d");
|
|
2075
|
+
timeframe?: null | ("1m" | "5m" | "15m" | "30m" | "1h" | "4h" | "6h" | "1d" | "24h" | "7d" | "30d" | "lifetime");
|
|
2039
2076
|
/**
|
|
2040
2077
|
* Format: double
|
|
2041
2078
|
* @description Total trading volume in USD
|
|
@@ -2405,15 +2442,15 @@ export interface components {
|
|
|
2405
2442
|
outcome_index?: number | null;
|
|
2406
2443
|
/**
|
|
2407
2444
|
* Format: double
|
|
2408
|
-
* @description
|
|
2445
|
+
* @description YES probability at the start of the observation window (the baseline snapshot)
|
|
2409
2446
|
*/
|
|
2410
2447
|
previous_probability: number;
|
|
2411
2448
|
/**
|
|
2412
2449
|
* Format: double
|
|
2413
|
-
* @description Current probability that triggered the spike
|
|
2450
|
+
* @description Current YES probability that triggered the spike
|
|
2414
2451
|
*/
|
|
2415
2452
|
current_probability: number;
|
|
2416
|
-
/** @description Direction of the spike: `"up"` (probability rising) or `"down"` (probability falling) */
|
|
2453
|
+
/** @description Direction of the spike: `"up"` (YES probability rising) or `"down"` (YES probability falling) */
|
|
2417
2454
|
spike_direction: string;
|
|
2418
2455
|
/**
|
|
2419
2456
|
* Format: double
|
|
@@ -2735,7 +2772,7 @@ export interface components {
|
|
|
2735
2772
|
/** @description Tag label or slug */
|
|
2736
2773
|
tag?: string | null;
|
|
2737
2774
|
/** @description Aggregation window */
|
|
2738
|
-
timeframe?: null | ("1m" | "5m" | "15m" | "30m" | "1h" | "4h" | "6h" | "1d" | "24h" | "7d" | "30d");
|
|
2775
|
+
timeframe?: null | ("1m" | "5m" | "15m" | "30m" | "1h" | "4h" | "6h" | "1d" | "24h" | "7d" | "30d" | "lifetime");
|
|
2739
2776
|
/**
|
|
2740
2777
|
* Format: double
|
|
2741
2778
|
* @description Total aggregated volume for the tag (USD)
|
|
@@ -2802,7 +2839,7 @@ export interface components {
|
|
|
2802
2839
|
* full set of typed prediction-trade variants.
|
|
2803
2840
|
* @enum {string}
|
|
2804
2841
|
*/
|
|
2805
|
-
TradeEventFilterType: "OrderFilled" | "Redemption" | "Merge" | "Split" | "Cancelled" | "PositionsConverted" | "
|
|
2842
|
+
TradeEventFilterType: "OrderFilled" | "OrdersMatched" | "MakerRebate" | "Reward" | "Yield" | "Redemption" | "Merge" | "Split" | "Cancelled" | "PositionsConverted" | "Initialization" | "Proposal" | "Dispute" | "Settled" | "Resolution" | "ConditionResolution" | "Reset" | "Flag" | "Unflag" | "Pause" | "Unpause" | "ManualResolution" | "NegRiskOutcomeReported" | "RegisterToken";
|
|
2806
2843
|
/** @description Subscription filters for the `trader_event_pnl` event. All fields are optional. */
|
|
2807
2844
|
TraderEventPnlFilters: {
|
|
2808
2845
|
/** @description Track only these trader wallet addresses. */
|
|
@@ -3050,7 +3087,7 @@ export interface components {
|
|
|
3050
3087
|
*/
|
|
3051
3088
|
max_probability?: number | null;
|
|
3052
3089
|
/** @description Only fire for these trade types. Empty = all supported trade-event variants. */
|
|
3053
|
-
trade_types?: ("OrderFilled" | "Redemption" | "Merge" | "Split" | "Cancelled" | "PositionsConverted" | "
|
|
3090
|
+
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;
|
|
3054
3091
|
/** @description When `true`, suppress webhooks for short-term "updown" markets. Requires explicit `trade_types` that exclude `PositionsConverted`. Default: `false`. */
|
|
3055
3092
|
exclude_shortterm_markets?: boolean | null;
|
|
3056
3093
|
};
|
|
@@ -3292,6 +3329,49 @@ export interface components {
|
|
|
3292
3329
|
/** @description Total count */
|
|
3293
3330
|
total: number;
|
|
3294
3331
|
};
|
|
3332
|
+
/** @description A single webhook delivery log entry (GET /v1/webhooks/{id}/logs) */
|
|
3333
|
+
WebhookLogEntry: {
|
|
3334
|
+
/** @description When the payload was sent (RFC3339, millisecond precision) */
|
|
3335
|
+
sent_at: string;
|
|
3336
|
+
/** @description The full payload we delivered, parsed back to JSON */
|
|
3337
|
+
payload: unknown;
|
|
3338
|
+
/** @description Event type (e.g. "trader_first_trade") */
|
|
3339
|
+
event: string;
|
|
3340
|
+
/** @description Unique delivery id */
|
|
3341
|
+
delivery_id: string;
|
|
3342
|
+
/**
|
|
3343
|
+
* Format: int32
|
|
3344
|
+
* @description Final attempt number for this dispatch
|
|
3345
|
+
*/
|
|
3346
|
+
attempt: number;
|
|
3347
|
+
/** @description Whether delivery ultimately succeeded */
|
|
3348
|
+
success: boolean;
|
|
3349
|
+
/**
|
|
3350
|
+
* Format: int32
|
|
3351
|
+
* @description HTTP status code from the endpoint (0 = no response / transport error)
|
|
3352
|
+
*/
|
|
3353
|
+
status_code: number;
|
|
3354
|
+
/**
|
|
3355
|
+
* Format: int32
|
|
3356
|
+
* @description Total dispatch time in milliseconds (including retries)
|
|
3357
|
+
*/
|
|
3358
|
+
latency_ms: number;
|
|
3359
|
+
/** @description Destination URL the payload was POSTed to */
|
|
3360
|
+
url: string;
|
|
3361
|
+
/** @description Error message when delivery failed (omitted when empty) */
|
|
3362
|
+
error?: string;
|
|
3363
|
+
};
|
|
3364
|
+
/** @description Response for GET /v1/webhooks/{id}/logs */
|
|
3365
|
+
WebhookLogsResponseBody: {
|
|
3366
|
+
/** @description The webhook these logs belong to */
|
|
3367
|
+
webhook_id: string;
|
|
3368
|
+
/** @description Number of log entries returned */
|
|
3369
|
+
total: number;
|
|
3370
|
+
/** @description Delivery log entries, newest first */
|
|
3371
|
+
logs: components["schemas"]["WebhookLogEntry"][];
|
|
3372
|
+
/** @description Cursor pagination metadata */
|
|
3373
|
+
pagination: components["schemas"]["PaginationMeta"];
|
|
3374
|
+
};
|
|
3295
3375
|
/** @description Webhook response (returned from API) */
|
|
3296
3376
|
WebhookResponse: {
|
|
3297
3377
|
/** @description Unique webhook ID */
|
|
@@ -3353,7 +3433,7 @@ export interface components {
|
|
|
3353
3433
|
* @description Timeframe values accepted by webhook metric, milestone, spike, and asset-price filters.
|
|
3354
3434
|
* @enum {string}
|
|
3355
3435
|
*/
|
|
3356
|
-
WebhookTimeframe: "1m" | "5m" | "15m" | "30m" | "1h" | "4h" | "6h" | "1d" | "24h" | "7d" | "30d";
|
|
3436
|
+
WebhookTimeframe: "1m" | "5m" | "15m" | "30m" | "1h" | "4h" | "6h" | "1d" | "24h" | "7d" | "30d" | "lifetime";
|
|
3357
3437
|
/** @description Payload delivered when a trade exceeds the configured size and probability thresholds */
|
|
3358
3438
|
WhaleTradePayload: {
|
|
3359
3439
|
/** @description Limit-order maker wallet address (lowercase) */
|
|
@@ -3424,6 +3504,16 @@ export interface components {
|
|
|
3424
3504
|
exchange: "CTFExchange" | "NegRiskExchange" | "ConditionalTokens" | "NegRiskAdapter" | "CTFExchangeV2" | "NegRiskExchangeV2" | "Unknown";
|
|
3425
3505
|
/** @description Trade type (webhook events only fire on order fills) */
|
|
3426
3506
|
trade_type: "OrderFilled" | "OrdersMatched";
|
|
3507
|
+
/**
|
|
3508
|
+
* @description CLOB V2 builder code (lower-cased `0x...` bytes32 hex). Absent on V1
|
|
3509
|
+
* trades; may be `0x0000…` for V2 trades placed without a builder code.
|
|
3510
|
+
*/
|
|
3511
|
+
builder_code?: string | null;
|
|
3512
|
+
/**
|
|
3513
|
+
* Format: double
|
|
3514
|
+
* @description Builder fee in USDC. Absent when no builder code is attached.
|
|
3515
|
+
*/
|
|
3516
|
+
builder_fee?: number | null;
|
|
3427
3517
|
};
|
|
3428
3518
|
/** @description Outer envelope for every webhook HTTP POST delivery. The `data` field contains the event-specific payload. Delivery headers sent with every POST: `X-Webhook-ID` (subscription UUID), `X-Delivery-ID` (this attempt's UUID), `X-Event-Type` (event name string, e.g. `trader_first_trade`), `X-Attempt` (attempt number, 1-indexed). When the webhook has a secret configured, `X-Webhook-Signature: sha256=<hmac-hex>` is also included — compute HMAC-SHA256 over the raw request body using your secret to verify. */
|
|
3429
3519
|
WebhookDeliveryEnvelope: {
|
|
@@ -3493,6 +3583,10 @@ export interface components {
|
|
|
3493
3583
|
* @enum {string}
|
|
3494
3584
|
*/
|
|
3495
3585
|
exchange: "CTFExchange" | "NegRiskExchange" | "ConditionalTokens" | "NegRiskAdapter" | "Unknown";
|
|
3586
|
+
/** @description CLOB V2 builder code (lower-cased `0x...` bytes32 hex). Absent on V1 trades; may be `0x0000…` for V2 trades placed without a builder code. */
|
|
3587
|
+
builder_code?: string;
|
|
3588
|
+
/** @description Builder fee in USDC. Absent when no builder code is attached. */
|
|
3589
|
+
builder_fee?: number;
|
|
3496
3590
|
/** @enum {string} */
|
|
3497
3591
|
trade_type: "OrderFilled" | "OrdersMatched";
|
|
3498
3592
|
} | {
|
|
@@ -3538,6 +3632,10 @@ export interface components {
|
|
|
3538
3632
|
* @enum {string}
|
|
3539
3633
|
*/
|
|
3540
3634
|
exchange: "CTFExchange" | "NegRiskExchange" | "ConditionalTokens" | "NegRiskAdapter" | "Unknown";
|
|
3635
|
+
/** @description CLOB V2 builder code (lower-cased `0x...` bytes32 hex). Absent on V1 trades; may be `0x0000…` for V2 trades placed without a builder code. */
|
|
3636
|
+
builder_code?: string;
|
|
3637
|
+
/** @description Builder fee in USDC. Absent when no builder code is attached. */
|
|
3638
|
+
builder_fee?: number;
|
|
3541
3639
|
/** @enum {string} */
|
|
3542
3640
|
trade_type: "MakerRebate" | "Reward" | "Yield";
|
|
3543
3641
|
} | {
|
|
@@ -3679,6 +3777,15 @@ export interface components {
|
|
|
3679
3777
|
market_id: string;
|
|
3680
3778
|
index_set: string;
|
|
3681
3779
|
shares_amount: number;
|
|
3780
|
+
fee?: number;
|
|
3781
|
+
fee_pct?: number;
|
|
3782
|
+
/** @description Per-position conversion amounts. */
|
|
3783
|
+
position_details?: {
|
|
3784
|
+
position_id: string;
|
|
3785
|
+
outcome_index: number;
|
|
3786
|
+
outcome?: string;
|
|
3787
|
+
amount: string;
|
|
3788
|
+
}[];
|
|
3682
3789
|
/**
|
|
3683
3790
|
* @description Exchange contract that processed the event
|
|
3684
3791
|
* @enum {string}
|
|
@@ -4184,6 +4291,52 @@ export interface operations {
|
|
|
4184
4291
|
};
|
|
4185
4292
|
};
|
|
4186
4293
|
};
|
|
4294
|
+
get_webhook_logs: {
|
|
4295
|
+
parameters: {
|
|
4296
|
+
query?: {
|
|
4297
|
+
/** @description Results per page (default 10, max 250) */
|
|
4298
|
+
limit?: number;
|
|
4299
|
+
/** @description Start time, Unix milliseconds (inclusive) */
|
|
4300
|
+
from?: number;
|
|
4301
|
+
/** @description End time, Unix milliseconds (inclusive) */
|
|
4302
|
+
to?: number;
|
|
4303
|
+
/** @description Cursor from a previous response */
|
|
4304
|
+
pagination_key?: string;
|
|
4305
|
+
};
|
|
4306
|
+
header?: never;
|
|
4307
|
+
path: {
|
|
4308
|
+
/** @description Webhook UUID */
|
|
4309
|
+
webhook_id: string;
|
|
4310
|
+
};
|
|
4311
|
+
cookie?: never;
|
|
4312
|
+
};
|
|
4313
|
+
requestBody?: never;
|
|
4314
|
+
responses: {
|
|
4315
|
+
/** @description Delivery logs */
|
|
4316
|
+
200: {
|
|
4317
|
+
headers: {
|
|
4318
|
+
[name: string]: unknown;
|
|
4319
|
+
};
|
|
4320
|
+
content: {
|
|
4321
|
+
"application/json": components["schemas"]["WebhookLogsResponseBody"];
|
|
4322
|
+
};
|
|
4323
|
+
};
|
|
4324
|
+
/** @description Missing or invalid API key */
|
|
4325
|
+
401: {
|
|
4326
|
+
headers: {
|
|
4327
|
+
[name: string]: unknown;
|
|
4328
|
+
};
|
|
4329
|
+
content?: never;
|
|
4330
|
+
};
|
|
4331
|
+
/** @description Webhook not found or not owned by user */
|
|
4332
|
+
404: {
|
|
4333
|
+
headers: {
|
|
4334
|
+
[name: string]: unknown;
|
|
4335
|
+
};
|
|
4336
|
+
content?: never;
|
|
4337
|
+
};
|
|
4338
|
+
};
|
|
4339
|
+
};
|
|
4187
4340
|
rotate_secret: {
|
|
4188
4341
|
parameters: {
|
|
4189
4342
|
query?: never;
|