@clear-street/clearstreet 0.98.0 → 0.100.0

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.
Files changed (64) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/package.json +1 -1
  3. package/resources/v1/index.d.mts +3 -3
  4. package/resources/v1/index.d.mts.map +1 -1
  5. package/resources/v1/index.d.ts +3 -3
  6. package/resources/v1/index.d.ts.map +1 -1
  7. package/resources/v1/index.js.map +1 -1
  8. package/resources/v1/index.mjs.map +1 -1
  9. package/resources/v1/instrument-data/market-data.d.mts +101 -28
  10. package/resources/v1/instrument-data/market-data.d.mts.map +1 -1
  11. package/resources/v1/instrument-data/market-data.d.ts +101 -28
  12. package/resources/v1/instrument-data/market-data.d.ts.map +1 -1
  13. package/resources/v1/instrument-data/market-data.js +10 -11
  14. package/resources/v1/instrument-data/market-data.js.map +1 -1
  15. package/resources/v1/instrument-data/market-data.mjs +10 -11
  16. package/resources/v1/instrument-data/market-data.mjs.map +1 -1
  17. package/resources/v1/instruments.d.mts +45 -3
  18. package/resources/v1/instruments.d.mts.map +1 -1
  19. package/resources/v1/instruments.d.ts +45 -3
  20. package/resources/v1/instruments.d.ts.map +1 -1
  21. package/resources/v1/omni-ai/omni-ai.d.mts +1 -1
  22. package/resources/v1/omni-ai/omni-ai.d.ts +1 -1
  23. package/resources/v1/orders.d.mts +20 -7
  24. package/resources/v1/orders.d.mts.map +1 -1
  25. package/resources/v1/orders.d.ts +20 -7
  26. package/resources/v1/orders.d.ts.map +1 -1
  27. package/resources/v1/positions.d.mts +52 -1
  28. package/resources/v1/positions.d.mts.map +1 -1
  29. package/resources/v1/positions.d.ts +52 -1
  30. package/resources/v1/positions.d.ts.map +1 -1
  31. package/resources/v1/screener.d.mts +58 -8
  32. package/resources/v1/screener.d.mts.map +1 -1
  33. package/resources/v1/screener.d.ts +58 -8
  34. package/resources/v1/screener.d.ts.map +1 -1
  35. package/resources/v1/screener.js +25 -6
  36. package/resources/v1/screener.js.map +1 -1
  37. package/resources/v1/screener.mjs +25 -6
  38. package/resources/v1/screener.mjs.map +1 -1
  39. package/resources/v1/v1.d.mts +7 -7
  40. package/resources/v1/v1.d.mts.map +1 -1
  41. package/resources/v1/v1.d.ts +7 -7
  42. package/resources/v1/v1.d.ts.map +1 -1
  43. package/resources/v1/v1.js.map +1 -1
  44. package/resources/v1/v1.mjs.map +1 -1
  45. package/resources/v1/watchlist.d.mts +3 -3
  46. package/resources/v1/watchlist.d.ts +3 -3
  47. package/src/resources/v1/index.ts +4 -0
  48. package/src/resources/v1/instrument-data/market-data.ts +109 -28
  49. package/src/resources/v1/instruments.ts +51 -2
  50. package/src/resources/v1/omni-ai/omni-ai.ts +1 -1
  51. package/src/resources/v1/orders.ts +22 -7
  52. package/src/resources/v1/positions.ts +55 -0
  53. package/src/resources/v1/screener.ts +72 -7
  54. package/src/resources/v1/v1.ts +9 -1
  55. package/src/resources/v1/watchlist.ts +3 -3
  56. package/src/version.ts +1 -1
  57. package/version.d.mts +1 -1
  58. package/version.d.mts.map +1 -1
  59. package/version.d.ts +1 -1
  60. package/version.d.ts.map +1 -1
  61. package/version.js +1 -1
  62. package/version.js.map +1 -1
  63. package/version.mjs +1 -1
  64. package/version.mjs.map +1 -1
@@ -11,21 +11,20 @@ import { RequestOptions } from '../../../internal/request-options';
11
11
  */
12
12
  export class MarketData extends APIResource {
13
13
  /**
14
+ * **Deprecated**: use `GET /market-data/snapshot` instead, which now reports the
15
+ * same open/high/low/volume/open-interest fields under `session` and top-level
16
+ * `open_interest`.
17
+ *
14
18
  * Returns the most recent open, high, low, volume (OHLV) and current price for the
15
19
  * requested instruments.
16
20
  *
17
- * Response contract: every request returns one row per **unique** `instrument_id`,
18
- * in first-seen request order. Unresolvable IDs come back with `symbol = null` and
19
- * every market-data field `null`; resolvable IDs with no available data come back
20
- * with `symbol` populated but market-data fields `null`.
21
+ * Response contract: every request returns one row per **unique** resolved
22
+ * `instrument_id`, in first-seen request order. Resolvable ids with no available
23
+ * data come back with `symbol` populated but market-data fields `null`. Ids that
24
+ * fail to resolve are omitted from `data` and reported in `error` instead (see the
25
+ * 207/404 responses below).
21
26
  *
22
- * @example
23
- * ```ts
24
- * const response =
25
- * await client.v1.instrumentData.marketData.getDailySummaries(
26
- * { instrument_ids: 'instrument_ids' },
27
- * );
28
- * ```
27
+ * @deprecated
29
28
  */
30
29
  getDailySummaries(
31
30
  query: MarketDataGetDailySummariesParams,
@@ -136,15 +135,42 @@ export interface MarketDataSnapshot {
136
135
  */
137
136
  instrument_id: string;
138
137
 
138
+ /**
139
+ * Session-level pricing and OHLV metrics. Always present; each inner field is
140
+ * independently nullable.
141
+ */
142
+ session: SnapshotSession;
143
+
144
+ /**
145
+ * Whether the SEC Rule 201 short-sale price test is currently restricting short
146
+ * sales in this security, from the trading-status feed.
147
+ *
148
+ * `true` restricts non-exempt short sales at or below the national best bid.
149
+ * `null` means we have no answer, either because no trading status has been seen
150
+ * for this security yet or because Rule 201 does not cover this security type. A
151
+ * `null` is not a statement that short selling is unrestricted, and must not be
152
+ * treated as clear to short.
153
+ *
154
+ * This is the current market condition, not a statement about whether Clear Street
155
+ * will reject your order. It is also distinct from `is_short_prohibited` on the
156
+ * instrument endpoints, which is a standing property of the security rather than a
157
+ * live circuit breaker. When a null/undefined value is observed, it indicates that
158
+ * there is no available data.
159
+ */
160
+ short_sale_restricted: boolean | null;
161
+
139
162
  /**
140
163
  * Display symbol for the security.
141
164
  */
142
165
  symbol: string;
143
166
 
144
167
  /**
145
- * Cumulative traded volume reported on the most recent trade, in shares for
146
- * equities or contracts for options. Absent when no trade is available. When a
147
- * null/undefined value is observed, it indicates that there is no available data.
168
+ * @deprecated Cumulative traded volume reported on the most recent trade, in
169
+ * shares for equities or contracts for options. Absent when no trade is available.
170
+ *
171
+ * Deprecated: use `session.cumulative_volume`, the same value from the same
172
+ * source. When a null/undefined value is observed, it indicates that there is no
173
+ * available data.
148
174
  */
149
175
  cumulative_volume?: number | null;
150
176
 
@@ -162,8 +188,10 @@ export interface MarketDataSnapshot {
162
188
  last_quote?: SnapshotQuote | null;
163
189
 
164
190
  /**
165
- * Most recent last-sale trade if available. When a null/undefined value is
166
- * observed, it indicates that there is no available data.
191
+ * Most recent last-sale-eligible trade if available. Omitted when the most recent
192
+ * known print is ineligible (e.g. an odd lot or an out-of-sequence report) rather
193
+ * than showing that print's price. When a null/undefined value is observed, it
194
+ * indicates that there is no available data.
167
195
  */
168
196
  last_trade?: SnapshotLastTrade | null;
169
197
 
@@ -174,11 +202,11 @@ export interface MarketDataSnapshot {
174
202
  name?: string | null;
175
203
 
176
204
  /**
177
- * Session metrics computed from previous close and last trade, if available. When
178
- * a null/undefined value is observed, it indicates that there is no available
179
- * data.
205
+ * Open interest (outstanding contracts) as of the most recent OPRA Refresh.
206
+ * Populated for options only; absent for equities and indices. When a
207
+ * null/undefined value is observed, it indicates that there is no available data.
180
208
  */
181
- session?: SnapshotSession | null;
209
+ open_interest?: number | null;
182
210
  }
183
211
 
184
212
  export type MarketDataSnapshotList = Array<MarketDataSnapshot>;
@@ -330,26 +358,78 @@ export interface SnapshotQuote {
330
358
  }
331
359
 
332
360
  /**
333
- * Session-level pricing metrics for a market data snapshot.
361
+ * Session-level pricing and OHLV metrics for a market data snapshot. Always
362
+ * present on the snapshot row; every field here is independently nullable except
363
+ * `ohlv_applicable`.
334
364
  */
335
365
  export interface SnapshotSession {
336
366
  /**
337
- * Absolute change from previous close to last trade.
367
+ * `false` only for instrument types with no OHLV by definition (e.g. an index
368
+ * instrument, whose price is a computed level rather than a traded security) --
369
+ * `open`/`high`/`low`/`ohlv_date`/`cumulative_volume` are then always absent.
370
+ * `true` otherwise, even when those fields simply haven't loaded yet. Always
371
+ * serialized.
338
372
  */
339
- change: string;
373
+ ohlv_applicable: boolean;
340
374
 
341
375
  /**
342
- * Percent change from previous close to last trade.
376
+ * Absolute change from previous close to the most recent last-sale-eligible trade.
377
+ * Absent when either side of the computation is unavailable. When a null/undefined
378
+ * value is observed, it indicates that there is no available data.
343
379
  */
344
- change_percent: string;
380
+ change?: string | null;
381
+
382
+ /**
383
+ * Percent change from previous close to the most recent last-sale-eligible trade.
384
+ * Absent under the same conditions as `change`. When a null/undefined value is
385
+ * observed, it indicates that there is no available data.
386
+ */
387
+ change_percent?: string | null;
388
+
389
+ /**
390
+ * Cumulative traded volume for the current session, in shares for equities or
391
+ * contracts for options. Always reflects the current session, even when
392
+ * `ohlv_date` trails it. Absent when `ohlv_applicable` is `false`, or when no
393
+ * trade is available. When a null/undefined value is observed, it indicates that
394
+ * there is no available data.
395
+ */
396
+ cumulative_volume?: number | null;
397
+
398
+ /**
399
+ * Session high. When a null/undefined value is observed, it indicates that there
400
+ * is no available data.
401
+ */
402
+ high?: string | null;
403
+
404
+ /**
405
+ * Session low. When a null/undefined value is observed, it indicates that there is
406
+ * no available data.
407
+ */
408
+ low?: string | null;
409
+
410
+ /**
411
+ * Session date the open/high/low values represent, US/Eastern. May trail the
412
+ * current session until the upstream feed rolls. When a null/undefined value is
413
+ * observed, it indicates that there is no available data.
414
+ */
415
+ ohlv_date?: string | null;
416
+
417
+ /**
418
+ * Session opening price, from the day's OHLC bar. Absent when `ohlv_applicable` is
419
+ * `false`, or when the bar has not loaded yet. When a null/undefined value is
420
+ * observed, it indicates that there is no available data.
421
+ */
422
+ open?: string | null;
345
423
 
346
424
  /**
347
425
  * Previous session close price. Corporate-action-adjusted (stock dividends, cash
348
426
  * dividends, and forward/reverse splits) when an adjustment exists for the close
349
427
  * date; the raw close otherwise. An adjustment can carry the price beyond 2
350
- * decimal places.
428
+ * decimal places. Absent when no previous close is on record (e.g. an instrument's
429
+ * first session). When a null/undefined value is observed, it indicates that there
430
+ * is no available data.
351
431
  */
352
- previous_close: string;
432
+ previous_close?: string | null;
353
433
 
354
434
  /**
355
435
  * Unadjusted (raw) previous session close. Present only when a corporate-action
@@ -378,7 +458,8 @@ export interface MarketDataGetDailySummariesParams {
378
458
  export interface MarketDataGetSnapshotsParams {
379
459
  /**
380
460
  * Comma-separated instrument IDs (UUID) or symbols (equity tickers or OSI option
381
- * symbols).
461
+ * symbols). Required; accepts 1 to 100 IDs. Duplicate resolved ids collapse to a
462
+ * single row.
382
463
  */
383
464
  instrument_ids?: Array<OrdersAPI.InstrumentIDOrSymbol>;
384
465
  }
@@ -148,7 +148,9 @@ export interface Instrument {
148
148
  is_ptp: boolean;
149
149
 
150
150
  /**
151
- * Indicates if short selling is prohibited for the instrument
151
+ * Indicates if short selling is prohibited for the instrument. This is a standing
152
+ * property of the security. For the live Rule 201 circuit breaker, see
153
+ * `short_sale_restricted` on the market-data snapshot.
152
154
  */
153
155
  is_short_prohibited: boolean;
154
156
 
@@ -239,6 +241,13 @@ export interface Instrument {
239
241
  * null/undefined value is observed, it indicates that there is no available data.
240
242
  */
241
243
  short_margin_rate?: string | null;
244
+
245
+ /**
246
+ * Price bands this instrument quotes on, ascending. Absent when we have no
247
+ * schedule for it, which includes an option whose penny-program status our
248
+ * reference data never supplied.
249
+ */
250
+ tick_rules?: Array<TickRule>;
242
251
  }
243
252
 
244
253
  export interface InstrumentCore {
@@ -284,7 +293,9 @@ export interface InstrumentCore {
284
293
  is_ptp: boolean;
285
294
 
286
295
  /**
287
- * Indicates if short selling is prohibited for the instrument
296
+ * Indicates if short selling is prohibited for the instrument. This is a standing
297
+ * property of the security. For the live Rule 201 circuit breaker, see
298
+ * `short_sale_restricted` on the market-data snapshot.
288
299
  */
289
300
  is_short_prohibited: boolean;
290
301
 
@@ -357,6 +368,13 @@ export interface InstrumentCore {
357
368
  * null/undefined value is observed, it indicates that there is no available data.
358
369
  */
359
370
  short_margin_rate?: string | null;
371
+
372
+ /**
373
+ * Price bands this instrument quotes on, ascending. Absent when we have no
374
+ * schedule for it, which includes an option whose penny-program status our
375
+ * reference data never supplied.
376
+ */
377
+ tick_rules?: Array<TickRule>;
360
378
  }
361
379
 
362
380
  export type InstrumentCoreList = Array<InstrumentCore>;
@@ -479,6 +497,12 @@ export interface OptionsContract {
479
497
  */
480
498
  open_interest?: number | null;
481
499
 
500
+ /**
501
+ * Price bands this contract quotes on, ascending. Absent when our reference data
502
+ * never supplied the contract's penny-program status.
503
+ */
504
+ tick_rules?: Array<TickRule>;
505
+
482
506
  /**
483
507
  * Instrument ID of the underlying instrument, when available When a null/undefined
484
508
  * value is observed, it indicates that there is no available data.
@@ -488,6 +512,30 @@ export interface OptionsContract {
488
512
 
489
513
  export type OptionsContractList = Array<OptionsContract>;
490
514
 
515
+ /**
516
+ * One band of an instrument's tick schedule. A price in the band is valid only if
517
+ * it is a whole multiple of `tick_size`. Bands describe the instrument itself: on
518
+ * an equity they say nothing about that equity's option chain.
519
+ */
520
+ export interface TickRule {
521
+ /**
522
+ * Lowest price in the band, inclusive.
523
+ */
524
+ start_price: string;
525
+
526
+ /**
527
+ * Minimum price increment within the band.
528
+ */
529
+ tick_size: string;
530
+
531
+ /**
532
+ * Upper bound of the band, exclusive. Absent on the last band, which runs to
533
+ * infinity. When a null/undefined value is observed, it indicates it does not
534
+ * apply.
535
+ */
536
+ end_price?: string | null;
537
+ }
538
+
491
539
  export interface InstrumentGetInstrumentByIDResponse extends Shared.BaseResponse {
492
540
  /**
493
541
  * Represents a tradable financial instrument.
@@ -675,6 +723,7 @@ export declare namespace Instruments {
675
723
  type OptionExpiryDate as OptionExpiryDate,
676
724
  type OptionsContract as OptionsContract,
677
725
  type OptionsContractList as OptionsContractList,
726
+ type TickRule as TickRule,
678
727
  type InstrumentGetInstrumentByIDResponse as InstrumentGetInstrumentByIDResponse,
679
728
  type InstrumentGetInstrumentsResponse as InstrumentGetInstrumentsResponse,
680
729
  type InstrumentGetOptionContractsResponse as InstrumentGetOptionContractsResponse,
@@ -454,7 +454,7 @@ export interface PrefillNewOrderAction {
454
454
  }
455
455
 
456
456
  /**
457
- * Request to submit a new order (PlaceOrderRequest from spec)
457
+ * Request to submit a new order
458
458
  */
459
459
  export interface PrefillNewOrderRequest {
460
460
  /**
@@ -213,6 +213,12 @@ export interface Execution {
213
213
  */
214
214
  underlying_instrument_id?: string | null;
215
215
 
216
+ /**
217
+ * Type of the underlying instrument, alongside `underlying_instrument_id`. When a
218
+ * null/undefined value is observed, it indicates it does not apply.
219
+ */
220
+ underlying_instrument_type?: V1API.SecurityType | null;
221
+
216
222
  /**
217
223
  * Venue where this fill occurred, as reported by that venue. Distinct from an
218
224
  * order's `venue`, which is the routing destination. Codes are not normalized, so
@@ -231,7 +237,7 @@ export type ExecutionList = Array<Execution>;
231
237
  export type InstrumentIDOrSymbol = string;
232
238
 
233
239
  /**
234
- * Request to submit a new order (PlaceOrderRequest from spec)
240
+ * Request to submit a new order
235
241
  */
236
242
  export interface NewOrderRequest {
237
243
  /**
@@ -492,14 +498,18 @@ export interface Order {
492
498
  trailing_stop_px?: string | null;
493
499
 
494
500
  /**
495
- * Trailing watermark price for trailing orders When a null/undefined value is
496
- * observed, it indicates it does not apply.
501
+ * Trailing watermark price for trailing orders. Strategy-computed, so it is absent
502
+ * on the order-submission acknowledgement and only appears once fetched via the
503
+ * order fetch or list endpoints. When a null/undefined value is observed, it
504
+ * indicates it does not apply.
497
505
  */
498
506
  trailing_watermark_px?: string | null;
499
507
 
500
508
  /**
501
- * Trailing watermark timestamp for trailing orders When a null/undefined value is
502
- * observed, it indicates it does not apply.
509
+ * Trailing watermark timestamp for trailing orders. Strategy-computed, so it is
510
+ * absent on the order-submission acknowledgement and only appears once fetched via
511
+ * the order fetch or list endpoints. When a null/undefined value is observed, it
512
+ * indicates it does not apply.
503
513
  */
504
514
  trailing_watermark_ts?: string | null;
505
515
 
@@ -511,6 +521,12 @@ export interface Order {
511
521
  * apply.
512
522
  */
513
523
  underlying_instrument_id?: string | null;
524
+
525
+ /**
526
+ * Type of the underlying instrument, alongside `underlying_instrument_id`. When a
527
+ * null/undefined value is observed, it indicates it does not apply.
528
+ */
529
+ underlying_instrument_type?: V1API.SecurityType | null;
514
530
  }
515
531
 
516
532
  export type OrderList = Array<Order>;
@@ -603,8 +619,7 @@ export type RequestOrderType =
603
619
  | 'TRAILING_STOP_LIMIT';
604
620
 
605
621
  /**
606
- * Position effect for a multileg strategy leg: client-attested open/close intent.
607
- * Required on every leg of a multileg order submission.
622
+ * Client-attested open/close intent for an order.
608
623
  */
609
624
  export type RequestPositionEffect = 'OPEN' | 'CLOSE';
610
625
 
@@ -270,6 +270,12 @@ export interface Position {
270
270
  */
271
271
  underlying_instrument_id?: string | null;
272
272
 
273
+ /**
274
+ * Type of the underlying instrument, alongside `underlying_instrument_id` When a
275
+ * null/undefined value is observed, it indicates it does not apply.
276
+ */
277
+ underlying_instrument_type?: V1API.SecurityType | null;
278
+
273
279
  /**
274
280
  * The total unrealized profit or loss for this position based on current market
275
281
  * value When a null/undefined value is observed, it indicates that there is no
@@ -343,6 +349,16 @@ export interface PositionInstruction {
343
349
  */
344
350
  created_at?: string | null;
345
351
 
352
+ /**
353
+ * Machine-readable counterpart to `rejection_reason`: a stable reason code plus
354
+ * params, present on every rejected row that has a `rejection_reason` — on submit,
355
+ * cancel, get, and list alike. Branch on `rejection.reason` instead of parsing
356
+ * `rejection_reason`. Forward-only: instructions rejected before this field
357
+ * shipped may carry only `rejection_reason`. When a null/undefined value is
358
+ * observed, it indicates it does not apply.
359
+ */
360
+ rejection?: PositionInstructionRejection | null;
361
+
346
362
  /**
347
363
  * Human-readable explanation populated on any non-success terminal status —
348
364
  * `REJECTED` or `CANCEL_FAILED`. On a `207 Multi-Status` batch submit the
@@ -366,6 +382,44 @@ export interface PositionInstruction {
366
382
 
367
383
  export type PositionInstructionList = Array<PositionInstruction>;
368
384
 
385
+ /**
386
+ * Machine-readable detail for a rejected position instruction.
387
+ *
388
+ * Present on every rejected row that carries a `rejection_reason`, across the full
389
+ * lifecycle — submit, cancel, get, and list. Branch on `reason` for programmatic
390
+ * handling and template your own copy from `metadata`; `rejection_reason` remains
391
+ * the human-readable fallback. Forward-only: instructions rejected before this
392
+ * field shipped may carry only `rejection_reason`.
393
+ */
394
+ export interface PositionInstructionRejection {
395
+ /**
396
+ * Namespacing domain of the `reason` code — `com.clearstreet.oems.exercise` for
397
+ * reasons OEMS validates, `com.clearstreet.oems.clearing` for clearing-owned
398
+ * reasons.
399
+ */
400
+ domain: string;
401
+
402
+ /**
403
+ * Reason-specific parameters as a string→string map. Which keys are present
404
+ * depends on `reason`:
405
+ *
406
+ * - `INSUFFICIENT_POSITION` → `available`, `requested`
407
+ * - `DNE_NOT_ON_EXPIRY` / `CEA_NOT_ON_EXPIRY` → `expiry`, `business_date`
408
+ * - `EXERCISE_PAST_CUTOFF` → `cutoff_time`
409
+ * - `DUPLICATE_INSTRUCTION` → `existing_id`
410
+ *
411
+ * Empty for reasons that carry no parameters. New keys may be added over time, so
412
+ * treat unknown keys leniently.
413
+ */
414
+ metadata: { [key: string]: string };
415
+
416
+ /**
417
+ * Stable, machine-readable reason code, e.g. `DNE_NOT_ON_EXPIRY`,
418
+ * `INSUFFICIENT_POSITION`, `OPTIONS_LEVEL_EXCEEDED`, `EXERCISE_PAST_CUTOFF`.
419
+ */
420
+ reason: string;
421
+ }
422
+
369
423
  /**
370
424
  * Lifecycle status of a position instruction.
371
425
  *
@@ -550,6 +604,7 @@ export declare namespace Positions {
550
604
  type Position as Position,
551
605
  type PositionInstruction as PositionInstruction,
552
606
  type PositionInstructionList as PositionInstructionList,
607
+ type PositionInstructionRejection as PositionInstructionRejection,
553
608
  type PositionInstructionStatus as PositionInstructionStatus,
554
609
  type PositionInstructionType as PositionInstructionType,
555
610
  type PositionList as PositionList,
@@ -97,18 +97,42 @@ export class Screener extends APIResource {
97
97
  }
98
98
 
99
99
  /**
100
- * Update a saved screener configuration.
100
+ * Partially update a saved screener configuration.
101
101
  *
102
- * Replaces the screener configuration for the authenticated user. If `name` is
103
- * null, the existing name is preserved.
102
+ * Every field is optional. Omitting a field, or sending it as `null`, leaves the
103
+ * stored value unchanged. Sending a field's empty value clears it: `columns: []`
104
+ * clears the stored columns, `sorts: []` clears the stored sort, and `filters: []`
105
+ * clears the stored filters. `name: ""` is rejected -- a screener's name cannot be
106
+ * cleared. `shared: false` sets it to `false`; it is a value, not a clear.
107
+ *
108
+ * Unknown fields are rejected with a 422.
104
109
  *
105
110
  * @example
106
111
  * ```ts
107
- * const response = await client.v1.screener.replaceScreener(
112
+ * const response = await client.v1.screener.patchScreener(
108
113
  * '550e8400-e29b-41d4-a716-446655440000',
109
114
  * );
110
115
  * ```
111
116
  */
117
+ patchScreener(
118
+ screenerID: string,
119
+ body: ScreenerPatchScreenerParams,
120
+ options?: RequestOptions,
121
+ ): APIPromise<ScreenerPatchScreenerResponse> {
122
+ return this._client.patch(path`/v1/saved-screeners/${screenerID}`, { body, ...options });
123
+ }
124
+
125
+ /**
126
+ * Update a saved screener configuration.
127
+ *
128
+ * Replaces the screener configuration for the authenticated user. If `name` is
129
+ * null, the existing name is preserved.
130
+ *
131
+ * Deprecated -- use `PATCH /saved-screeners/{screener_id}`; PUT replaces omitted
132
+ * `columns`, `filters` and `sorts` with empty values.
133
+ *
134
+ * @deprecated
135
+ */
112
136
  replaceScreener(
113
137
  screenerID: string,
114
138
  body: ScreenerReplaceScreenerParams,
@@ -134,8 +158,8 @@ export class Screener extends APIResource {
134
158
  * `instrument_id` column is always prepended. Metadata carries `total_items`,
135
159
  * `total_pages`, and `next_page_token` for paging.
136
160
  *
137
- * Due to the volatility of screener responses we recommend reconciling page
138
- * results since results can shuffle between calls.
161
+ * Screener results can shuffle between calls; reconcile by re-checking rows across
162
+ * pages rather than assuming stable ordering.
139
163
  *
140
164
  * @example
141
165
  * ```ts
@@ -492,7 +516,7 @@ export interface ModifierDef {
492
516
  args: Array<ModifierArg>;
493
517
 
494
518
  /**
495
- * `"ADD"` or `"SUBTRACT"`.
519
+ * The modifier operation name: one of `"ADD"` or `"SUBTRACT"`.
496
520
  */
497
521
  name: string;
498
522
  }
@@ -745,6 +769,13 @@ export interface ScreenerGetScreenersResponse extends Shared.BaseResponse {
745
769
  data: ScreenerEntryList;
746
770
  }
747
771
 
772
+ export interface ScreenerPatchScreenerResponse extends Shared.BaseResponse {
773
+ /**
774
+ * A saved screener configuration entry
775
+ */
776
+ data: ScreenerEntry;
777
+ }
778
+
748
779
  export interface ScreenerReplaceScreenerResponse extends Shared.BaseResponse {
749
780
  /**
750
781
  * A saved screener configuration entry
@@ -784,6 +815,38 @@ export interface ScreenerCreateScreenerParams {
784
815
  sorts?: Array<SortSpec> | null;
785
816
  }
786
817
 
818
+ export interface ScreenerPatchScreenerParams {
819
+ /**
820
+ * Structured field references to include when running this screener. Omit or send
821
+ * `null` to leave unchanged; `[]` clears the stored columns.
822
+ */
823
+ columns?: Array<FieldRef> | null;
824
+
825
+ /**
826
+ * Structured search filter criteria. Omit or send `null` to leave unchanged; `[]`
827
+ * clears the stored filters.
828
+ */
829
+ filters?: Array<SearchFilter> | null;
830
+
831
+ /**
832
+ * The name for this screener configuration. Omit or send `null` to leave
833
+ * unchanged. Cannot be set to an empty string.
834
+ */
835
+ name?: string | null;
836
+
837
+ /**
838
+ * Whether any user may fetch this screener by id. Omit or send `null` to leave
839
+ * unchanged. `false` is a value, not a clear.
840
+ */
841
+ shared?: boolean | null;
842
+
843
+ /**
844
+ * Multi-field sort specifications. Omit or send `null` to leave unchanged; `[]`
845
+ * clears the stored sort.
846
+ */
847
+ sorts?: Array<SortSpec> | null;
848
+ }
849
+
787
850
  export interface ScreenerReplaceScreenerParams {
788
851
  /**
789
852
  * Structured field references to include when running this screener
@@ -880,9 +943,11 @@ export declare namespace Screener {
880
943
  type ScreenerGetScreenerByIDResponse as ScreenerGetScreenerByIDResponse,
881
944
  type ScreenerGetScreenerCatalogResponse as ScreenerGetScreenerCatalogResponse,
882
945
  type ScreenerGetScreenersResponse as ScreenerGetScreenersResponse,
946
+ type ScreenerPatchScreenerResponse as ScreenerPatchScreenerResponse,
883
947
  type ScreenerReplaceScreenerResponse as ScreenerReplaceScreenerResponse,
884
948
  type ScreenerSearchScreenerResponse as ScreenerSearchScreenerResponse,
885
949
  type ScreenerCreateScreenerParams as ScreenerCreateScreenerParams,
950
+ type ScreenerPatchScreenerParams as ScreenerPatchScreenerParams,
886
951
  type ScreenerReplaceScreenerParams as ScreenerReplaceScreenerParams,
887
952
  type ScreenerSearchScreenerParams as ScreenerSearchScreenerParams,
888
953
  };
@@ -71,6 +71,7 @@ import {
71
71
  OptionExpiryDate,
72
72
  OptionsContract,
73
73
  OptionsContractList,
74
+ TickRule,
74
75
  } from './instruments';
75
76
  import * as OmniFeedAPI from './omni-feed';
76
77
  import {
@@ -133,6 +134,7 @@ import {
133
134
  PositionGetPositionsResponse,
134
135
  PositionInstruction,
135
136
  PositionInstructionList,
137
+ PositionInstructionRejection,
136
138
  PositionInstructionStatus,
137
139
  PositionInstructionType,
138
140
  PositionList,
@@ -171,6 +173,8 @@ import {
171
173
  ScreenerGetScreenerByIDResponse,
172
174
  ScreenerGetScreenerCatalogResponse,
173
175
  ScreenerGetScreenersResponse,
176
+ ScreenerPatchScreenerParams,
177
+ ScreenerPatchScreenerResponse,
174
178
  ScreenerReplaceScreenerParams,
175
179
  ScreenerReplaceScreenerResponse,
176
180
  ScreenerRow,
@@ -309,7 +313,7 @@ export class V1 extends APIResource {
309
313
  export type SecurityType = 'COMMON_STOCK' | 'INDEX' | 'OPTION' | 'CASH';
310
314
 
311
315
  /**
312
- * Sort direction sorted results
316
+ * Sort direction for sorted results
313
317
  */
314
318
  export type SortDirection = 'ASC' | 'DESC';
315
319
 
@@ -434,6 +438,7 @@ export declare namespace V1 {
434
438
  type OptionExpiryDate as OptionExpiryDate,
435
439
  type OptionsContract as OptionsContract,
436
440
  type OptionsContractList as OptionsContractList,
441
+ type TickRule as TickRule,
437
442
  type InstrumentGetInstrumentByIDResponse as InstrumentGetInstrumentByIDResponse,
438
443
  type InstrumentGetInstrumentsResponse as InstrumentGetInstrumentsResponse,
439
444
  type InstrumentGetOptionContractsResponse as InstrumentGetOptionContractsResponse,
@@ -526,6 +531,7 @@ export declare namespace V1 {
526
531
  type Position as Position,
527
532
  type PositionInstruction as PositionInstruction,
528
533
  type PositionInstructionList as PositionInstructionList,
534
+ type PositionInstructionRejection as PositionInstructionRejection,
529
535
  type PositionInstructionStatus as PositionInstructionStatus,
530
536
  type PositionInstructionType as PositionInstructionType,
531
537
  type PositionList as PositionList,
@@ -593,9 +599,11 @@ export declare namespace V1 {
593
599
  type ScreenerGetScreenerByIDResponse as ScreenerGetScreenerByIDResponse,
594
600
  type ScreenerGetScreenerCatalogResponse as ScreenerGetScreenerCatalogResponse,
595
601
  type ScreenerGetScreenersResponse as ScreenerGetScreenersResponse,
602
+ type ScreenerPatchScreenerResponse as ScreenerPatchScreenerResponse,
596
603
  type ScreenerReplaceScreenerResponse as ScreenerReplaceScreenerResponse,
597
604
  type ScreenerSearchScreenerResponse as ScreenerSearchScreenerResponse,
598
605
  type ScreenerCreateScreenerParams as ScreenerCreateScreenerParams,
606
+ type ScreenerPatchScreenerParams as ScreenerPatchScreenerParams,
599
607
  type ScreenerReplaceScreenerParams as ScreenerReplaceScreenerParams,
600
608
  type ScreenerSearchScreenerParams as ScreenerSearchScreenerParams,
601
609
  };
@@ -136,12 +136,12 @@ export interface AddWatchlistItemData {
136
136
  */
137
137
  export interface WatchlistDetail {
138
138
  /**
139
- * Watchlist ID
139
+ * The unique identifier for the watchlist.
140
140
  */
141
141
  id: string;
142
142
 
143
143
  /**
144
- * Creation timestamp
144
+ * The timestamp when the watchlist was created.
145
145
  */
146
146
  created_at: string;
147
147
 
@@ -151,7 +151,7 @@ export interface WatchlistDetail {
151
151
  items: Array<WatchlistItemEntry>;
152
152
 
153
153
  /**
154
- * Watchlist name
154
+ * The user-provided watchlist name.
155
155
  */
156
156
  name: string;
157
157
  }
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.98.0'; // x-release-please-version
1
+ export const VERSION = '0.100.0'; // x-release-please-version