@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.
@@ -152,7 +152,7 @@ export interface paths {
152
152
  };
153
153
  /**
154
154
  * Get market holders
155
- * @description Retrieve holders of a market grouped by outcome, sorted by shares held. Identify the market with either `condition_id` or `market_slug` — exactly one must be provided. Each holder includes a nested `pnl` object with position-level PnL sourced from the position PnL table.
155
+ * @description Retrieve holders of a market grouped by outcome, sorted by shares held. Identify the market with either `condition_id` or `market_slug` — exactly one must be provided. Each holder includes a nested `pnl` object with position-level PnL.
156
156
  */
157
157
  get: operations["get_market_holders"];
158
158
  put?: never;
@@ -192,7 +192,7 @@ export interface paths {
192
192
  };
193
193
  /**
194
194
  * Get position holders
195
- * @description Retrieve holders of a specific position (ERC1155 token), sorted by shares held. Each holder includes a nested `pnl` object with position-level PnL (realized_pnl_usd, buy_usd, sell_usd, avg_entry_price, avg_exit_price, total_buys, total_sells, total_fees, first/last_trade_at) sourced from the position PnL table — no extra joins required at query time. Uses cursor-based pagination for efficient traversal.
195
+ * @description Retrieve holders of a specific position (ERC1155 token), sorted by shares held. Each holder includes a nested `pnl` object with position-level PnL (realized_pnl_usd, buy_usd, sell_usd, avg_entry_price, avg_exit_price, total_buys, total_sells, total_fees, first/last_trade_at). Uses cursor-based pagination for efficient traversal.
196
196
  */
197
197
  get: operations["get_position_holders"];
198
198
  put?: never;
@@ -496,7 +496,7 @@ export interface paths {
496
496
  *
497
497
  * All three categories are queried in parallel. Each has independent cursor-based pagination via its own `*_pagination_key`.
498
498
  *
499
- * **Trader search** matches by wallet address (exact, `0x...` 42 chars) or by display name / pseudonym (ILIKE).
499
+ * **Trader search** matches by wallet address (exact, `0x...` 42 chars) or by display name / pseudonym (case-insensitive partial match).
500
500
  *
501
501
  * **sort_by / timeframe** apply to events and markets. Some sort fields only apply to one category (e.g. `liquidity` and `holders` are markets-only; `title`, `creation_date`, `start_date`, `end_date` are events-only) — unrecognised fields fall back to `volume`.
502
502
  */
@@ -1227,7 +1227,7 @@ export interface components {
1227
1227
  daily_rate: number | null;
1228
1228
  };
1229
1229
  /** @enum {string} */
1230
- MarketSortBy: "volume" | "txns" | "unique_traders" | "liquidity" | "holders" | "end_time" | "start_time" | "created_time" | "created_at" | "relevance";
1230
+ MarketSortBy: "volume" | "txns" | "unique_traders" | "liquidity" | "holders" | "end_time" | "start_time" | "created_time" | "relevance";
1231
1231
  /** @enum {string} */
1232
1232
  MarketStatus: "open" | "closed" | "all";
1233
1233
  MarketVolumeChartResponse: {
@@ -1745,6 +1745,11 @@ export interface components {
1745
1745
  };
1746
1746
  /** @enum {string} */
1747
1747
  SortDirection: "asc" | "desc";
1748
+ /**
1749
+ * @description Direction filter for spike webhooks.
1750
+ * @enum {string}
1751
+ */
1752
+ SpikeDirection: "up" | "down" | "both";
1748
1753
  /** @description Token outcome (position) */
1749
1754
  TokenOutcome: {
1750
1755
  token_id: string;
@@ -1909,6 +1914,16 @@ export interface components {
1909
1914
  /** Format: int32 */
1910
1915
  stc: number;
1911
1916
  };
1917
+ /**
1918
+ * @description Crypto asset symbols accepted by `asset_price_tick` and `asset_price_window_update` filters.
1919
+ * @enum {string}
1920
+ */
1921
+ WebhookAssetSymbol: "BTC" | "ETH" | "SOL" | "XRP";
1922
+ /**
1923
+ * @description Timeframe values accepted by webhook metric, milestone, spike, and asset-price filters.
1924
+ * @enum {string}
1925
+ */
1926
+ WebhookTimeframe: "1m" | "5m" | "15m" | "30m" | "1h" | "6h" | "1d" | "24h" | "7d" | "30d";
1912
1927
  };
1913
1928
  responses: never;
1914
1929
  parameters: never;
@@ -2266,7 +2281,7 @@ export interface operations {
2266
2281
  };
2267
2282
  requestBody?: never;
2268
2283
  responses: {
2269
- /** @description Market holder count history with automatic view selection (1m/5m/15m/1h/6h buckets) */
2284
+ /** @description Market holder count history with automatic granularity (1m/5m/15m/1h/6h buckets) */
2270
2285
  200: {
2271
2286
  headers: {
2272
2287
  [name: string]: unknown;
@@ -2340,7 +2355,7 @@ export interface operations {
2340
2355
  };
2341
2356
  requestBody?: never;
2342
2357
  responses: {
2343
- /** @description Position holder count history with automatic view selection (1m/5m/15m/1h/6h buckets) */
2358
+ /** @description Position holder count history with automatic granularity (1m/5m/15m/1h/6h buckets) */
2344
2359
  200: {
2345
2360
  headers: {
2346
2361
  [name: string]: unknown;
@@ -2371,13 +2386,13 @@ export interface operations {
2371
2386
  market_slugs?: string;
2372
2387
  /** @description Filter by event slug(s) - comma-separated (max 50) */
2373
2388
  event_slugs?: string;
2374
- /** @description Filter by position ID(s) - comma-separated (max 50), resolved via market_outcomes table */
2389
+ /** @description Filter by position ID(s) - comma-separated (max 50) */
2375
2390
  position_ids?: string;
2376
2391
  /** @description Search in title (3-100 characters) */
2377
2392
  search?: string;
2378
2393
  /** @description Filter by status: open, closed, or all (default: all) */
2379
2394
  status?: components["schemas"]["MarketStatus"];
2380
- /** @description Sort: volume, txns, unique_traders, liquidity, holders, end_time, start_time, created_time, created_at, relevance */
2395
+ /** @description Sort: volume, txns, unique_traders, liquidity, holders, end_time, start_time, created_time, relevance */
2381
2396
  sort_by?: components["schemas"]["MarketSortBy"];
2382
2397
  /** @description Sort direction: asc, desc (default: desc) */
2383
2398
  sort_dir?: components["schemas"]["SortDirection"];