@clear-street/clearstreet 0.101.0 → 0.103.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 (95) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/client.d.mts +1 -0
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +1 -0
  5. package/client.d.ts.map +1 -1
  6. package/package.json +1 -1
  7. package/resources/shared.d.mts +4 -3
  8. package/resources/shared.d.mts.map +1 -1
  9. package/resources/shared.d.ts +4 -3
  10. package/resources/shared.d.ts.map +1 -1
  11. package/resources/v1/calendar.d.mts +153 -1
  12. package/resources/v1/calendar.d.mts.map +1 -1
  13. package/resources/v1/calendar.d.ts +153 -1
  14. package/resources/v1/calendar.d.ts.map +1 -1
  15. package/resources/v1/calendar.js +17 -0
  16. package/resources/v1/calendar.js.map +1 -1
  17. package/resources/v1/calendar.mjs +17 -0
  18. package/resources/v1/calendar.mjs.map +1 -1
  19. package/resources/v1/index.d.mts +2 -1
  20. package/resources/v1/index.d.mts.map +1 -1
  21. package/resources/v1/index.d.ts +2 -1
  22. package/resources/v1/index.d.ts.map +1 -1
  23. package/resources/v1/index.js +3 -1
  24. package/resources/v1/index.js.map +1 -1
  25. package/resources/v1/index.mjs +1 -0
  26. package/resources/v1/index.mjs.map +1 -1
  27. package/resources/v1/instrument-data/instrument-data.d.mts +22 -4
  28. package/resources/v1/instrument-data/instrument-data.d.mts.map +1 -1
  29. package/resources/v1/instrument-data/instrument-data.d.ts +22 -4
  30. package/resources/v1/instrument-data/instrument-data.d.ts.map +1 -1
  31. package/resources/v1/instrument-data/instrument-data.js.map +1 -1
  32. package/resources/v1/instrument-data/instrument-data.mjs.map +1 -1
  33. package/resources/v1/instrument-data/market-data.d.mts +19 -2
  34. package/resources/v1/instrument-data/market-data.d.mts.map +1 -1
  35. package/resources/v1/instrument-data/market-data.d.ts +19 -2
  36. package/resources/v1/instrument-data/market-data.d.ts.map +1 -1
  37. package/resources/v1/instrument-data/market-data.js +5 -0
  38. package/resources/v1/instrument-data/market-data.js.map +1 -1
  39. package/resources/v1/instrument-data/market-data.mjs +5 -0
  40. package/resources/v1/instrument-data/market-data.mjs.map +1 -1
  41. package/resources/v1/locates.d.mts +98 -0
  42. package/resources/v1/locates.d.mts.map +1 -0
  43. package/resources/v1/locates.d.ts +98 -0
  44. package/resources/v1/locates.d.ts.map +1 -0
  45. package/resources/v1/locates.js +48 -0
  46. package/resources/v1/locates.js.map +1 -0
  47. package/resources/v1/locates.mjs +44 -0
  48. package/resources/v1/locates.mjs.map +1 -0
  49. package/resources/v1/omni-ai/omni-ai.d.mts +4 -3
  50. package/resources/v1/omni-ai/omni-ai.d.mts.map +1 -1
  51. package/resources/v1/omni-ai/omni-ai.d.ts +4 -3
  52. package/resources/v1/omni-ai/omni-ai.d.ts.map +1 -1
  53. package/resources/v1/omni-ai/omni-ai.js.map +1 -1
  54. package/resources/v1/omni-ai/omni-ai.mjs.map +1 -1
  55. package/resources/v1/omni-ai/threads.d.mts +8 -2
  56. package/resources/v1/omni-ai/threads.d.mts.map +1 -1
  57. package/resources/v1/omni-ai/threads.d.ts +8 -2
  58. package/resources/v1/omni-ai/threads.d.ts.map +1 -1
  59. package/resources/v1/omni-ai/threads.js +4 -2
  60. package/resources/v1/omni-ai/threads.js.map +1 -1
  61. package/resources/v1/omni-ai/threads.mjs +4 -2
  62. package/resources/v1/omni-ai/threads.mjs.map +1 -1
  63. package/resources/v1/orders.d.mts +63 -27
  64. package/resources/v1/orders.d.mts.map +1 -1
  65. package/resources/v1/orders.d.ts +63 -27
  66. package/resources/v1/orders.d.ts.map +1 -1
  67. package/resources/v1/positions.d.mts +13 -11
  68. package/resources/v1/positions.d.mts.map +1 -1
  69. package/resources/v1/positions.d.ts +13 -11
  70. package/resources/v1/positions.d.ts.map +1 -1
  71. package/resources/v1/v1.d.mts +6 -2
  72. package/resources/v1/v1.d.mts.map +1 -1
  73. package/resources/v1/v1.d.ts +6 -2
  74. package/resources/v1/v1.d.ts.map +1 -1
  75. package/resources/v1/v1.js +4 -0
  76. package/resources/v1/v1.js.map +1 -1
  77. package/resources/v1/v1.mjs +4 -0
  78. package/resources/v1/v1.mjs.map +1 -1
  79. package/src/client.ts +1 -0
  80. package/src/resources/shared.ts +3 -1
  81. package/src/resources/v1/calendar.ts +188 -0
  82. package/src/resources/v1/index.ts +15 -0
  83. package/src/resources/v1/instrument-data/instrument-data.ts +24 -4
  84. package/src/resources/v1/instrument-data/market-data.ts +21 -2
  85. package/src/resources/v1/locates.ts +130 -0
  86. package/src/resources/v1/omni-ai/omni-ai.ts +4 -3
  87. package/src/resources/v1/omni-ai/threads.ts +8 -2
  88. package/src/resources/v1/orders.ts +70 -27
  89. package/src/resources/v1/positions.ts +14 -11
  90. package/src/resources/v1/v1.ts +34 -0
  91. package/src/version.ts +1 -1
  92. package/version.d.mts +1 -1
  93. package/version.d.ts +1 -1
  94. package/version.js +1 -1
  95. package/version.mjs +1 -1
@@ -1021,11 +1021,21 @@ export interface InstrumentEventIpoItem {
1021
1021
  exchange?: string | null;
1022
1022
 
1023
1023
  /**
1024
- * IPO market cap. When a null/undefined value is observed, it indicates that there
1025
- * is no available data.
1024
+ * @deprecated Deprecated: use `offering_amount`, which carries the same value.
1025
+ * This is not a market capitalization. When a null/undefined value is observed, it
1026
+ * indicates that there is no available data.
1026
1027
  */
1027
1028
  market_cap?: string | null;
1028
1029
 
1030
+ /**
1031
+ * IPO maximum aggregate offering value: all offered shares, including
1032
+ * over-allotment (greenshoe) shares, at the top of the price range. This is an
1033
+ * upper bound. It assumes full exercise of the over-allotment option and pricing
1034
+ * at the top of the range. When a null/undefined value is observed, it indicates
1035
+ * that there is no available data.
1036
+ */
1037
+ offering_amount?: string | null;
1038
+
1029
1039
  /**
1030
1040
  * IPO price range. When a null/undefined value is observed, it indicates that
1031
1041
  * there is no available data.
@@ -1412,11 +1422,21 @@ export interface InstrumentIpoEvent {
1412
1422
  exchange?: string | null;
1413
1423
 
1414
1424
  /**
1415
- * IPO market cap. When a null/undefined value is observed, it indicates that there
1416
- * is no available data.
1425
+ * @deprecated Deprecated: use `offering_amount`, which carries the same value.
1426
+ * This is not a market capitalization. When a null/undefined value is observed, it
1427
+ * indicates that there is no available data.
1417
1428
  */
1418
1429
  market_cap?: string | null;
1419
1430
 
1431
+ /**
1432
+ * IPO maximum aggregate offering value: all offered shares, including
1433
+ * over-allotment (greenshoe) shares, at the top of the price range. This is an
1434
+ * upper bound. It assumes full exercise of the over-allotment option and pricing
1435
+ * at the top of the range. When a null/undefined value is observed, it indicates
1436
+ * that there is no available data.
1437
+ */
1438
+ offering_amount?: string | null;
1439
+
1420
1440
  /**
1421
1441
  * IPO price range. When a null/undefined value is observed, it indicates that
1422
1442
  * there is no available data.
@@ -36,6 +36,11 @@ export class MarketData extends APIResource {
36
36
  /**
37
37
  * Get market data snapshots for one or more securities.
38
38
  *
39
+ * Two targeting modes, mutually exclusive: `instrument_ids` (1-100 ids), or
40
+ * `underlying_instrument_id` + `expiry` together, which resolves the underlier's
41
+ * option chain for that expiry and returns a snapshot for every contract in it
42
+ * (uncapped).
43
+ *
39
44
  * @example
40
45
  * ```ts
41
46
  * const response =
@@ -456,12 +461,26 @@ export interface MarketDataGetDailySummariesParams {
456
461
  }
457
462
 
458
463
  export interface MarketDataGetSnapshotsParams {
464
+ /**
465
+ * Filter the option chain to contracts expiring on this date (YYYY-MM-DD). Must be
466
+ * provided together with `underlying_instrument_id`.
467
+ */
468
+ expiry?: string;
469
+
459
470
  /**
460
471
  * Comma-separated instrument IDs (UUID) or symbols (equity tickers or OSI option
461
- * symbols). Required; accepts 1 to 100 IDs. Duplicate resolved ids collapse to a
462
- * single row.
472
+ * symbols). Accepts 1 to 100 IDs; duplicate resolved ids collapse to a single row.
473
+ * Required unless `underlying_instrument_id` and `expiry` are provided; mutually
474
+ * exclusive with that pair.
463
475
  */
464
476
  instrument_ids?: Array<OrdersAPI.InstrumentIDOrSymbol>;
477
+
478
+ /**
479
+ * Instrument identifier or symbol of the underlying equity/index for an option
480
+ * chain. Must be provided together with `expiry`; mutually exclusive with
481
+ * `instrument_ids`.
482
+ */
483
+ underlying_instrument_id?: string;
465
484
  }
466
485
 
467
486
  export declare namespace MarketData {
@@ -0,0 +1,130 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../../core/resource';
4
+ import * as Shared from '../shared';
5
+ import * as OrdersAPI from './orders';
6
+ import { APIPromise } from '../../core/api-promise';
7
+ import { RequestOptions } from '../../internal/request-options';
8
+ import { path } from '../../internal/utils/path';
9
+
10
+ /**
11
+ * Query locate requests, granted locates, and cached locate borrow rates.
12
+ */
13
+ export class Locates extends APIResource {
14
+ /**
15
+ * > **Beta** — this endpoint may change before general availability.
16
+ *
17
+ * Fetch the cached locate borrow rate for one instrument. Rates refresh
18
+ * periodically; `404` means no rate is currently cached for the instrument.
19
+ *
20
+ * @example
21
+ * ```ts
22
+ * const response = await client.v1.locates.getLocateRateByID(
23
+ * 'x',
24
+ * );
25
+ * ```
26
+ */
27
+ getLocateRateByID(
28
+ instrumentID: OrdersAPI.InstrumentIDOrSymbol,
29
+ options?: RequestOptions,
30
+ ): APIPromise<LocateGetLocateRateByIDResponse> {
31
+ return this._client.get(path`/v1/locates/rates/${instrumentID}`, options);
32
+ }
33
+
34
+ /**
35
+ * > **Beta** — this endpoint may change before general availability.
36
+ *
37
+ * Fetch the cached locate borrow rates for up to 1,000 instruments. The response
38
+ * returns one row per requested instrument, in request order. Each row carries
39
+ * either the `rate` or an `error` — a `404` when the instrument is unknown or has
40
+ * no cached rate. The status is `207` when any row has an error, `200` when every
41
+ * instrument resolved to a rate.
42
+ *
43
+ * @example
44
+ * ```ts
45
+ * const response = await client.v1.locates.getLocateRates({
46
+ * instrument_ids: ['x'],
47
+ * });
48
+ * ```
49
+ */
50
+ getLocateRates(
51
+ query: LocateGetLocateRatesParams,
52
+ options?: RequestOptions,
53
+ ): APIPromise<LocateGetLocateRatesResponse> {
54
+ return this._client.get('/v1/locates/rates', { query, ...options });
55
+ }
56
+ }
57
+
58
+ /**
59
+ * A locate borrow rate for an instrument.
60
+ */
61
+ export interface LocateRate {
62
+ /**
63
+ * Instrument id the rate applies to.
64
+ */
65
+ instrument_id: string;
66
+
67
+ /**
68
+ * Borrow rate, expressed as a decimal (e.g. 0.037012 for 3.7012%).
69
+ */
70
+ rate: string;
71
+
72
+ /**
73
+ * When the rate was requested from the locates venue.
74
+ */
75
+ as_of?: string | null;
76
+ }
77
+
78
+ /**
79
+ * A requested instrument with either its cached borrow rate or an error.
80
+ */
81
+ export interface LocateRateResult {
82
+ /**
83
+ * The instrument id (UUID) or symbol, echoed exactly as requested, so each result
84
+ * maps back to its request.
85
+ */
86
+ instrument: OrdersAPI.InstrumentIDOrSymbol;
87
+
88
+ /**
89
+ * Why no rate is present — a `404` when the instrument is unknown or has no cached
90
+ * rate. Omitted when `rate` is present.
91
+ */
92
+ error?: Shared.APIError | null;
93
+
94
+ /**
95
+ * The cached borrow rate. Present when a rate was found; omitted when `error` is
96
+ * present.
97
+ */
98
+ rate?: LocateRate | null;
99
+ }
100
+
101
+ export type LocateRateResultList = Array<LocateRateResult>;
102
+
103
+ export interface LocateGetLocateRateByIDResponse extends Shared.BaseResponse {
104
+ /**
105
+ * A locate borrow rate for an instrument.
106
+ */
107
+ data: LocateRate;
108
+ }
109
+
110
+ export interface LocateGetLocateRatesResponse extends Shared.BaseResponse {
111
+ data: LocateRateResultList;
112
+ }
113
+
114
+ export interface LocateGetLocateRatesParams {
115
+ /**
116
+ * Comma-separated instrument IDs (UUID) or symbols; at least one, at most 1,000.
117
+ */
118
+ instrument_ids: Array<OrdersAPI.InstrumentIDOrSymbol>;
119
+ }
120
+
121
+ export declare namespace Locates {
122
+ export {
123
+ type LocateRate as LocateRate,
124
+ type LocateRateResult as LocateRateResult,
125
+ type LocateRateResultList as LocateRateResultList,
126
+ type LocateGetLocateRateByIDResponse as LocateGetLocateRateByIDResponse,
127
+ type LocateGetLocateRatesResponse as LocateGetLocateRatesResponse,
128
+ type LocateGetLocateRatesParams as LocateGetLocateRatesParams,
129
+ };
130
+ }
@@ -533,9 +533,10 @@ export interface PrefillNewOrderRequest {
533
533
  stop_price?: string | null;
534
534
 
535
535
  /**
536
- * Optional execution strategy. Omit to use standard routing. One of `SOR`, `VWAP`,
537
- * or `TWAP`. Supported only on `MARKET` and `LIMIT` orders with `DAY`
538
- * time-in-force, and not supported on OTC common-stock orders.
536
+ * Optional execution strategy. One of `SOR`, `VWAP`, `TWAP`, or `DMA`. Defaults to
537
+ * `SOR`, the only strategy OTC common-stock orders support. `VWAP` and `TWAP` are
538
+ * supported only on `MARKET` and `LIMIT` orders, and `DMA` only on `LIMIT` orders;
539
+ * all three require `DAY` time-in-force.
539
540
  */
540
541
  strategy?: OrdersAPI.OrderStrategy | null;
541
542
 
@@ -138,8 +138,10 @@ export class Threads extends APIResource {
138
138
  }
139
139
 
140
140
  /**
141
- * List authorized conversation metadata, newest first. Use `page_size` and
142
- * `page_token` for pagination, and the messages endpoint for conversation history.
141
+ * List authorized conversation metadata, most recently active first (by
142
+ * `updated_at`, which a new message moves). Use `page_size` and `page_token` for
143
+ * pagination, and the messages endpoint for conversation history. A thread that
144
+ * gets a message while you page moves to the first page.
143
145
  *
144
146
  * With `account_id`, list only conversations linked to that account and require
145
147
  * current account access. Without it, list only conversations with no linked
@@ -323,6 +325,10 @@ export interface Thread {
323
325
 
324
326
  title: string;
325
327
 
328
+ /**
329
+ * Time of the last activity: a new message in the thread or a change to the
330
+ * thread.
331
+ */
326
332
  updated_at: string;
327
333
  }
328
334
 
@@ -172,7 +172,8 @@ export interface Execution {
172
172
  order_id: string;
173
173
 
174
174
  /**
175
- * Filled quantity.
175
+ * Filled quantity. For a strategy-level multileg fill this is the net strategy
176
+ * quantity, not a per-leg quantity.
176
177
  */
177
178
  quantity: string;
178
179
 
@@ -187,9 +188,9 @@ export interface Execution {
187
188
  transaction_time: string;
188
189
 
189
190
  /**
190
- * Unique instrument identifier. `null` when this fill has no single resolvable
191
- * instrument. When a null/undefined value is observed, it indicates it does not
192
- * apply.
191
+ * Unique instrument identifier. `null` when this is a strategy-level multileg fill
192
+ * whose legs are reported individually in `legs[]`. When a null/undefined value is
193
+ * observed, it indicates it does not apply.
193
194
  */
194
195
  instrument_id?: string | null;
195
196
 
@@ -200,8 +201,9 @@ export interface Execution {
200
201
  price?: string | null;
201
202
 
202
203
  /**
203
- * Trading symbol. `null` when this fill has no single resolvable instrument. When
204
- * a null/undefined value is observed, it indicates it does not apply.
204
+ * Trading symbol. `null` when this is a strategy-level multileg fill whose legs
205
+ * are reported individually in `legs[]`. When a null/undefined value is observed,
206
+ * it indicates it does not apply.
205
207
  */
206
208
  symbol?: string | null;
207
209
 
@@ -307,9 +309,10 @@ export interface NewOrderRequest {
307
309
  stop_price?: string | null;
308
310
 
309
311
  /**
310
- * Optional execution strategy. Omit to use standard routing. One of `SOR`, `VWAP`,
311
- * or `TWAP`. Supported only on `MARKET` and `LIMIT` orders with `DAY`
312
- * time-in-force, and not supported on OTC common-stock orders.
312
+ * Optional execution strategy. One of `SOR`, `VWAP`, `TWAP`, or `DMA`. Defaults to
313
+ * `SOR`, the only strategy OTC common-stock orders support. `VWAP` and `TWAP` are
314
+ * supported only on `MARKET` and `LIMIT` orders, and `DMA` only on `LIMIT` orders;
315
+ * all three require `DAY` time-in-force.
313
316
  */
314
317
  strategy?: OrderStrategy | null;
315
318
 
@@ -431,15 +434,16 @@ export interface Order {
431
434
  extended_hours?: boolean | null;
432
435
 
433
436
  /**
434
- * Instrument identifier for the traded instrument. `null` when the order has no
435
- * single resolvable instrument. When a null/undefined value is observed, it
436
- * indicates it does not apply.
437
+ * Instrument identifier for the traded instrument. `null` when the order is a
438
+ * multileg strategy whose legs are reported individually in `legs[]`. When a
439
+ * null/undefined value is observed, it indicates it does not apply.
437
440
  */
438
441
  instrument_id?: string | null;
439
442
 
440
443
  /**
441
- * Type of security. `null` when the order has no single resolvable instrument.
442
- * When a null/undefined value is observed, it indicates it does not apply.
444
+ * Type of security. `null` when the order is a multileg strategy whose legs are
445
+ * reported individually in `legs[]`. When a null/undefined value is observed, it
446
+ * indicates it does not apply.
443
447
  */
444
448
  instrument_type?: V1API.SecurityType | null;
445
449
 
@@ -480,8 +484,9 @@ export interface Order {
480
484
  strategy?: Order.Strategy;
481
485
 
482
486
  /**
483
- * Trading symbol. `null` when the order has no single resolvable instrument. When
484
- * a null/undefined value is observed, it indicates it does not apply.
487
+ * Trading symbol. `null` when the order is a multileg strategy whose legs are
488
+ * reported individually in `legs[]`. When a null/undefined value is observed, it
489
+ * indicates it does not apply.
485
490
  */
486
491
  symbol?: string | null;
487
492
 
@@ -549,7 +554,12 @@ export namespace Order {
549
554
  /**
550
555
  * Execution strategy type.
551
556
  */
552
- type: string;
557
+ type: 'SOR' | 'VWAP' | 'TWAP' | 'DMA';
558
+
559
+ /**
560
+ * Venue code the order is routed to. DMA only.
561
+ */
562
+ destination?: string;
553
563
 
554
564
  /**
555
565
  * UTC timestamp (RFC 3339) at which execution ends.
@@ -591,9 +601,13 @@ export type OrderStatus =
591
601
 
592
602
  /**
593
603
  * Optional execution strategy controlling how the order is worked in the market.
594
- * Omit to use standard routing. One of `SOR`, `VWAP`, or `TWAP`.
604
+ * Omit to use standard routing. One of `SOR`, `VWAP`, `TWAP`, or `DMA`.
595
605
  */
596
- export type OrderStrategy = OrderStrategy.Type | OrderStrategy.UnionMember1 | OrderStrategy.UnionMember2;
606
+ export type OrderStrategy =
607
+ | OrderStrategy.Type
608
+ | OrderStrategy.UnionMember1
609
+ | OrderStrategy.UnionMember2
610
+ | OrderStrategy.UnionMember3;
597
611
 
598
612
  export namespace OrderStrategy {
599
613
  /**
@@ -651,6 +665,21 @@ export namespace OrderStrategy {
651
665
  */
652
666
  start_at?: string;
653
667
  }
668
+
669
+ /**
670
+ * Direct Market Access. Routes the order straight to the named venue.
671
+ */
672
+ export interface UnionMember3 {
673
+ /**
674
+ * Venue code the order is routed to.
675
+ */
676
+ destination: string;
677
+
678
+ /**
679
+ * Execution strategy type.
680
+ */
681
+ type: 'DMA';
682
+ }
654
683
  }
655
684
 
656
685
  /**
@@ -970,26 +999,40 @@ export interface OrderGetOrdersParams {
970
999
  export namespace OrderGetOrdersParams {
971
1000
  export interface UpdatedAt {
972
1001
  /**
973
- * > **Alpha** — this parameter is experimental and may change or be removed at any
974
- * > time.
1002
+ * Return only rows where `updated_at` is strictly after the given value. A bare
1003
+ * `YYYY-MM-DD` date expands to the end of that day (UTC), so this matches from the
1004
+ * start of the following day. See
1005
+ * [Range filters](https://docs.clearstreet.com/guides/api-fundamentals#range-filters)
1006
+ * for accepted formats, bare-date expansion, and combining bounds. Returns 400 if
1007
+ * the resulting range is inverted.
975
1008
  */
976
1009
  gt?: string;
977
1010
 
978
1011
  /**
979
- * > **Alpha** — this parameter is experimental and may change or be removed at any
980
- * > time.
1012
+ * Return only rows where `updated_at` is on or after the given value. A bare
1013
+ * `YYYY-MM-DD` date expands to the start of that day (UTC). See
1014
+ * [Range filters](https://docs.clearstreet.com/guides/api-fundamentals#range-filters)
1015
+ * for accepted formats, bare-date expansion, and combining bounds. Returns 400 if
1016
+ * the resulting range is inverted.
981
1017
  */
982
1018
  gte?: string;
983
1019
 
984
1020
  /**
985
- * > **Alpha** — this parameter is experimental and may change or be removed at any
986
- * > time.
1021
+ * Return only rows where `updated_at` is strictly before the given value. A bare
1022
+ * `YYYY-MM-DD` date expands to the start of that day (UTC). See
1023
+ * [Range filters](https://docs.clearstreet.com/guides/api-fundamentals#range-filters)
1024
+ * for accepted formats, bare-date expansion, and combining bounds. Returns 400 if
1025
+ * the resulting range is inverted.
987
1026
  */
988
1027
  lt?: string;
989
1028
 
990
1029
  /**
991
- * > **Alpha** — this parameter is experimental and may change or be removed at any
992
- * > time.
1030
+ * Return only rows where `updated_at` is on or before the given value. A bare
1031
+ * `YYYY-MM-DD` date expands to the end of that day (UTC), so this matches through
1032
+ * the end of that day. See
1033
+ * [Range filters](https://docs.clearstreet.com/guides/api-fundamentals#range-filters)
1034
+ * for accepted formats, bare-date expansion, and combining bounds. Returns 400 if
1035
+ * the resulting range is inverted.
993
1036
  */
994
1037
  lte?: string;
995
1038
  }
@@ -350,12 +350,11 @@ export interface PositionInstruction {
350
350
  created_at?: string | null;
351
351
 
352
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.
353
+ * Machine-readable counterpart to `rejection_reason`: a stable reason code,
354
+ * human-readable `description`, and params, present on every rejected row — on
355
+ * submit, cancel, get, and list alike. Branch on `rejection.reason` and read
356
+ * `rejection.description` instead of the top-level `rejection_reason`. When a
357
+ * null/undefined value is observed, it indicates it does not apply.
359
358
  */
360
359
  rejection?: PositionInstructionRejection | null;
361
360
 
@@ -385,13 +384,17 @@ export type PositionInstructionList = Array<PositionInstruction>;
385
384
  /**
386
385
  * Machine-readable detail for a rejected position instruction.
387
386
  *
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`.
387
+ * Present on every rejected row, across the full lifecycle — submit, cancel, get,
388
+ * and list. Branch on `reason` for programmatic handling and template your own
389
+ * copy from `metadata`, or show `description` directly.
393
390
  */
394
391
  export interface PositionInstructionRejection {
392
+ /**
393
+ * Human-readable explanation of the rejection. Duplicates the top-level
394
+ * `rejection_reason`; prefer this field.
395
+ */
396
+ description: string;
397
+
395
398
  /**
396
399
  * Namespacing domain of the `reason` code — `com.clearstreet.oems.exercise` for
397
400
  * reasons OEMS validates, `com.clearstreet.oems.clearing` for clearing-owned
@@ -39,10 +39,16 @@ import * as CalendarAPI from './calendar';
39
39
  import {
40
40
  Calendar,
41
41
  CalendarGetClockResponse,
42
+ CalendarGetEconomicEventsCalendarParams,
43
+ CalendarGetEconomicEventsCalendarResponse,
42
44
  CalendarGetMarketHoursCalendarParams,
43
45
  CalendarGetMarketHoursCalendarResponse,
44
46
  ClockDetail,
45
47
  DayType,
48
+ EconomicEvent,
49
+ EconomicEventImpact,
50
+ EconomicEventList,
51
+ EconomicEventUnit,
46
52
  MarketHoursDetail,
47
53
  MarketHoursDetailList,
48
54
  MarketSessionType,
@@ -73,6 +79,16 @@ import {
73
79
  OptionsContractList,
74
80
  TickRule,
75
81
  } from './instruments';
82
+ import * as LocatesAPI from './locates';
83
+ import {
84
+ LocateGetLocateRateByIDResponse,
85
+ LocateGetLocateRatesParams,
86
+ LocateGetLocateRatesResponse,
87
+ LocateRate,
88
+ LocateRateResult,
89
+ LocateRateResultList,
90
+ Locates,
91
+ } from './locates';
76
92
  import * as OmniFeedAPI from './omni-feed';
77
93
  import {
78
94
  FeedItem,
@@ -299,6 +315,7 @@ export class V1 extends APIResource {
299
315
  calendar: CalendarAPI.Calendar = new CalendarAPI.Calendar(this._client);
300
316
  instrumentData: InstrumentDataAPI.InstrumentData = new InstrumentDataAPI.InstrumentData(this._client);
301
317
  instruments: InstrumentsAPI.Instruments = new InstrumentsAPI.Instruments(this._client);
318
+ locates: LocatesAPI.Locates = new LocatesAPI.Locates(this._client);
302
319
  omniAI: OmniAIAPI.OmniAI = new OmniAIAPI.OmniAI(this._client);
303
320
  omniFeed: OmniFeedAPI.OmniFeed = new OmniFeedAPI.OmniFeed(this._client);
304
321
  orders: OrdersAPI.Orders = new OrdersAPI.Orders(this._client);
@@ -323,6 +340,7 @@ V1.APIVersion = APIVersion;
323
340
  V1.Calendar = Calendar;
324
341
  V1.InstrumentData = InstrumentData;
325
342
  V1.Instruments = Instruments;
343
+ V1.Locates = Locates;
326
344
  V1.OmniAI = OmniAI;
327
345
  V1.OmniFeed = OmniFeed;
328
346
  V1.Orders = Orders;
@@ -376,6 +394,10 @@ export declare namespace V1 {
376
394
  Calendar as Calendar,
377
395
  type ClockDetail as ClockDetail,
378
396
  type DayType as DayType,
397
+ type EconomicEvent as EconomicEvent,
398
+ type EconomicEventImpact as EconomicEventImpact,
399
+ type EconomicEventList as EconomicEventList,
400
+ type EconomicEventUnit as EconomicEventUnit,
379
401
  type MarketHoursDetail as MarketHoursDetail,
380
402
  type MarketHoursDetailList as MarketHoursDetailList,
381
403
  type MarketSessionType as MarketSessionType,
@@ -384,7 +406,9 @@ export declare namespace V1 {
384
406
  type SessionSchedule as SessionSchedule,
385
407
  type TradingSessions as TradingSessions,
386
408
  type CalendarGetClockResponse as CalendarGetClockResponse,
409
+ type CalendarGetEconomicEventsCalendarResponse as CalendarGetEconomicEventsCalendarResponse,
387
410
  type CalendarGetMarketHoursCalendarResponse as CalendarGetMarketHoursCalendarResponse,
411
+ type CalendarGetEconomicEventsCalendarParams as CalendarGetEconomicEventsCalendarParams,
388
412
  type CalendarGetMarketHoursCalendarParams as CalendarGetMarketHoursCalendarParams,
389
413
  };
390
414
 
@@ -450,6 +474,16 @@ export declare namespace V1 {
450
474
  type InstrumentSearchInstrumentsParams as InstrumentSearchInstrumentsParams,
451
475
  };
452
476
 
477
+ export {
478
+ Locates as Locates,
479
+ type LocateRate as LocateRate,
480
+ type LocateRateResult as LocateRateResult,
481
+ type LocateRateResultList as LocateRateResultList,
482
+ type LocateGetLocateRateByIDResponse as LocateGetLocateRateByIDResponse,
483
+ type LocateGetLocateRatesResponse as LocateGetLocateRatesResponse,
484
+ type LocateGetLocateRatesParams as LocateGetLocateRatesParams,
485
+ };
486
+
453
487
  export {
454
488
  OmniAI as OmniAI,
455
489
  type ActionButton as ActionButton,
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.101.0'; // x-release-please-version
1
+ export const VERSION = '0.103.0'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.101.0";
1
+ export declare const VERSION = "0.103.0";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.101.0";
1
+ export declare const VERSION = "0.103.0";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '0.101.0'; // x-release-please-version
4
+ exports.VERSION = '0.103.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '0.101.0'; // x-release-please-version
1
+ export const VERSION = '0.103.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map