@clear-street/clearstreet 0.90.0 → 0.92.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 (82) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/package.json +1 -1
  3. package/resources/v1/accounts.d.mts +105 -3
  4. package/resources/v1/accounts.d.mts.map +1 -1
  5. package/resources/v1/accounts.d.ts +105 -3
  6. package/resources/v1/accounts.d.ts.map +1 -1
  7. package/resources/v1/accounts.js +2 -1
  8. package/resources/v1/accounts.js.map +1 -1
  9. package/resources/v1/accounts.mjs +2 -1
  10. package/resources/v1/accounts.mjs.map +1 -1
  11. package/resources/v1/calendar.d.mts +1 -1
  12. package/resources/v1/calendar.d.mts.map +1 -1
  13. package/resources/v1/calendar.d.ts +1 -1
  14. package/resources/v1/calendar.d.ts.map +1 -1
  15. package/resources/v1/index.d.mts +3 -3
  16. package/resources/v1/index.d.mts.map +1 -1
  17. package/resources/v1/index.d.ts +3 -3
  18. package/resources/v1/index.d.ts.map +1 -1
  19. package/resources/v1/index.js.map +1 -1
  20. package/resources/v1/index.mjs.map +1 -1
  21. package/resources/v1/instrument-data/instrument-data.d.mts +20 -16
  22. package/resources/v1/instrument-data/instrument-data.d.mts.map +1 -1
  23. package/resources/v1/instrument-data/instrument-data.d.ts +20 -16
  24. package/resources/v1/instrument-data/instrument-data.d.ts.map +1 -1
  25. package/resources/v1/instrument-data/instrument-data.js +14 -10
  26. package/resources/v1/instrument-data/instrument-data.js.map +1 -1
  27. package/resources/v1/instrument-data/instrument-data.mjs +14 -10
  28. package/resources/v1/instrument-data/instrument-data.mjs.map +1 -1
  29. package/resources/v1/instruments.d.mts +4 -27
  30. package/resources/v1/instruments.d.mts.map +1 -1
  31. package/resources/v1/instruments.d.ts +4 -27
  32. package/resources/v1/instruments.d.ts.map +1 -1
  33. package/resources/v1/instruments.js +1 -3
  34. package/resources/v1/instruments.js.map +1 -1
  35. package/resources/v1/instruments.mjs +1 -3
  36. package/resources/v1/instruments.mjs.map +1 -1
  37. package/resources/v1/omni-ai/index.d.mts +1 -1
  38. package/resources/v1/omni-ai/index.d.mts.map +1 -1
  39. package/resources/v1/omni-ai/index.d.ts +1 -1
  40. package/resources/v1/omni-ai/index.d.ts.map +1 -1
  41. package/resources/v1/omni-ai/index.js.map +1 -1
  42. package/resources/v1/omni-ai/index.mjs.map +1 -1
  43. package/resources/v1/omni-ai/omni-ai.d.mts +44 -2
  44. package/resources/v1/omni-ai/omni-ai.d.mts.map +1 -1
  45. package/resources/v1/omni-ai/omni-ai.d.ts +44 -2
  46. package/resources/v1/omni-ai/omni-ai.d.ts.map +1 -1
  47. package/resources/v1/omni-ai/omni-ai.js.map +1 -1
  48. package/resources/v1/omni-ai/omni-ai.mjs.map +1 -1
  49. package/resources/v1/orders.d.mts +25 -8
  50. package/resources/v1/orders.d.mts.map +1 -1
  51. package/resources/v1/orders.d.ts +25 -8
  52. package/resources/v1/orders.d.ts.map +1 -1
  53. package/resources/v1/positions.d.mts +1 -1
  54. package/resources/v1/positions.d.ts +1 -1
  55. package/resources/v1/positions.js +1 -1
  56. package/resources/v1/positions.mjs +1 -1
  57. package/resources/v1/v1.d.mts +6 -6
  58. package/resources/v1/v1.d.mts.map +1 -1
  59. package/resources/v1/v1.d.ts +6 -6
  60. package/resources/v1/v1.d.ts.map +1 -1
  61. package/resources/v1/v1.js.map +1 -1
  62. package/resources/v1/v1.mjs.map +1 -1
  63. package/resources/v1/watchlist.d.mts +2 -2
  64. package/resources/v1/watchlist.d.ts +2 -2
  65. package/resources/v1/watchlist.js +1 -1
  66. package/resources/v1/watchlist.mjs +1 -1
  67. package/src/resources/v1/accounts.ts +126 -2
  68. package/src/resources/v1/calendar.ts +1 -1
  69. package/src/resources/v1/index.ts +5 -0
  70. package/src/resources/v1/instrument-data/instrument-data.ts +20 -16
  71. package/src/resources/v1/instruments.ts +4 -31
  72. package/src/resources/v1/omni-ai/index.ts +2 -0
  73. package/src/resources/v1/omni-ai/omni-ai.ts +53 -1
  74. package/src/resources/v1/orders.ts +28 -8
  75. package/src/resources/v1/positions.ts +1 -1
  76. package/src/resources/v1/v1.ts +10 -0
  77. package/src/resources/v1/watchlist.ts +2 -2
  78. package/src/version.ts +1 -1
  79. package/version.d.mts +1 -1
  80. package/version.d.ts +1 -1
  81. package/version.js +1 -1
  82. package/version.mjs +1 -1
@@ -28,7 +28,8 @@ export class Accounts extends APIResource {
28
28
  }
29
29
 
30
30
  /**
31
- * Fetch account details by ID
31
+ * Fetch account details by ID, including the mailing address, date of birth, phone
32
+ * number, and country of tax residency of the account-holder entity when on file.
32
33
  *
33
34
  * @example
34
35
  * ```ts
@@ -349,6 +350,127 @@ export type AccountSubtype = 'CASH' | 'MARGIN' | 'OTHER';
349
350
  */
350
351
  export type AccountType = 'CUSTOMER' | 'OTHER';
351
352
 
353
+ /**
354
+ * Represents a trading account
355
+ */
356
+ export interface AccountWithPersonalDetails {
357
+ /**
358
+ * The unique identifier for the account
359
+ */
360
+ id: number;
361
+
362
+ /**
363
+ * The account holder entity identifier
364
+ */
365
+ account_holder_entity_id: number;
366
+
367
+ /**
368
+ * The full legal name of the account
369
+ */
370
+ full_name: string;
371
+
372
+ /**
373
+ * The date the account was opened
374
+ */
375
+ open_date: string;
376
+
377
+ /**
378
+ * The options level of the account
379
+ */
380
+ options_level: number;
381
+
382
+ /**
383
+ * The short name of the account
384
+ */
385
+ short_name: string;
386
+
387
+ /**
388
+ * The current status of the account
389
+ */
390
+ status: AccountStatus;
391
+
392
+ /**
393
+ * The sub-type of account
394
+ */
395
+ subtype: AccountSubtype;
396
+
397
+ /**
398
+ * The type of account
399
+ */
400
+ type: AccountType;
401
+
402
+ /**
403
+ * The date the account was closed, if applicable When a null/undefined value is
404
+ * observed, it indicates it does not apply.
405
+ */
406
+ close_date?: string | null;
407
+
408
+ /**
409
+ * The country of tax residency of the account-holder entity. `null` when not on
410
+ * file or entity reference data is unavailable. When a null/undefined value is
411
+ * observed, it indicates that there is no available data.
412
+ */
413
+ country_of_tax_residency?: string | null;
414
+
415
+ /**
416
+ * The date of birth of the account holder's primary contact. `null` when not on
417
+ * file or entity reference data is unavailable. When a null/undefined value is
418
+ * observed, it indicates that there is no available data.
419
+ */
420
+ date_of_birth?: string | null;
421
+
422
+ /**
423
+ * The mailing address of the account-holder entity. `null` when no mailing address
424
+ * is on file or entity reference data is unavailable. When a null/undefined value
425
+ * is observed, it indicates that there is no available data.
426
+ */
427
+ mailing_address?: Address | null;
428
+
429
+ /**
430
+ * The phone number of the account holder's primary contact. `null` when not on
431
+ * file or entity reference data is unavailable. When a null/undefined value is
432
+ * observed, it indicates that there is no available data.
433
+ */
434
+ phone_number?: string | null;
435
+ }
436
+
437
+ /**
438
+ * A postal address.
439
+ */
440
+ export interface Address {
441
+ /**
442
+ * City
443
+ */
444
+ city: string;
445
+
446
+ /**
447
+ * Country
448
+ */
449
+ country: string;
450
+
451
+ /**
452
+ * First street address line
453
+ */
454
+ line1: string;
455
+
456
+ /**
457
+ * Postal code
458
+ */
459
+ postal_code: string;
460
+
461
+ /**
462
+ * Second street address line When a null/undefined value is observed, it indicates
463
+ * it does not apply.
464
+ */
465
+ line2?: string | null;
466
+
467
+ /**
468
+ * State or province When a null/undefined value is observed, it indicates it does
469
+ * not apply.
470
+ */
471
+ state?: string | null;
472
+ }
473
+
352
474
  export interface MarginDetails {
353
475
  /**
354
476
  * @deprecated The number of day trades executed over the 5 most recent trading
@@ -557,7 +679,7 @@ export interface AccountGetAccountByIDResponse extends Shared.BaseResponse {
557
679
  /**
558
680
  * Represents a trading account
559
681
  */
560
- data: Account;
682
+ data: AccountWithPersonalDetails;
561
683
  }
562
684
 
563
685
  export interface AccountGetAccountsResponse extends Shared.BaseResponse {
@@ -634,6 +756,8 @@ export declare namespace Accounts {
634
756
  type AccountStatus as AccountStatus,
635
757
  type AccountSubtype as AccountSubtype,
636
758
  type AccountType as AccountType,
759
+ type AccountWithPersonalDetails as AccountWithPersonalDetails,
760
+ type Address as Address,
637
761
  type MarginDetails as MarginDetails,
638
762
  type MarginDetailsUsage as MarginDetailsUsage,
639
763
  type MarginSessionDetails as MarginSessionDetails,
@@ -203,7 +203,7 @@ export interface CalendarGetMarketHoursCalendarParams {
203
203
  /**
204
204
  * Market type to query (us_equities, us_options). If omitted, returns all markets.
205
205
  */
206
- market?: MarketType;
206
+ market?: 'us_equities' | 'us_options';
207
207
  }
208
208
 
209
209
  export declare namespace Calendar {
@@ -11,6 +11,8 @@ export {
11
11
  type AccountStatus,
12
12
  type AccountSubtype,
13
13
  type AccountType,
14
+ type AccountWithPersonalDetails,
15
+ type Address,
14
16
  type MarginDetails,
15
17
  type MarginDetailsUsage,
16
18
  type MarginSessionDetails,
@@ -120,6 +122,8 @@ export {
120
122
  type OpenEntitlementConsentAction,
121
123
  type OpenScreenerAction,
122
124
  type PrefillCancelOrderAction,
125
+ type PrefillModifyOrderAction,
126
+ type PrefillModifyOrderRequest,
123
127
  type PrefillNewOrderAction,
124
128
  type PrefillOrderAction,
125
129
  type PromptButtonAction,
@@ -139,6 +143,7 @@ export {
139
143
  type OrderStatus,
140
144
  type OrderType,
141
145
  type QueueState,
146
+ type ReplaceOrderRequest,
142
147
  type RequestOrderType,
143
148
  type RequestTimeInForce,
144
149
  type Side,
@@ -41,9 +41,15 @@ export class InstrumentData extends APIResource {
41
41
  news: NewsAPI.News = new NewsAPI.News(this._client);
42
42
 
43
43
  /**
44
- * List instrument events across all securities.
44
+ * List instrument events across all securities, grouped by date.
45
45
  *
46
- * Retrieves all instrument events grouped by date.
46
+ * Date range defaults (anchored on the current trading day, or the next trading
47
+ * day if today is a weekend or US market holiday):
48
+ *
49
+ * - Unfiltered (no `instrument_ids`): a single trading day (`from_date` =
50
+ * `to_date` = anchor); the requested span is capped at 6 days.
51
+ * - Filtered (with `instrument_ids`): a 30-day lookback ending on the anchor
52
+ * (`from_date` = anchor − 30 days, `to_date` = anchor).
47
53
  *
48
54
  * @example
49
55
  * ```ts
@@ -65,12 +71,12 @@ export class InstrumentData extends APIResource {
65
71
  * ```ts
66
72
  * const response =
67
73
  * await client.v1.instrumentData.getInstrumentAnalystConsensus(
68
- * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
74
+ * 'x',
69
75
  * );
70
76
  * ```
71
77
  */
72
78
  getInstrumentAnalystConsensus(
73
- instrumentID: OrdersAPI.InstrumentIDOrSymbol,
79
+ instrumentID: string,
74
80
  query: InstrumentDataGetInstrumentAnalystConsensusParams | null | undefined = {},
75
81
  options?: RequestOptions,
76
82
  ): APIPromise<InstrumentDataGetInstrumentAnalystConsensusResponse> {
@@ -92,12 +98,12 @@ export class InstrumentData extends APIResource {
92
98
  * ```ts
93
99
  * const response =
94
100
  * await client.v1.instrumentData.getInstrumentBalanceSheetStatements(
95
- * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
101
+ * 'x',
96
102
  * );
97
103
  * ```
98
104
  */
99
105
  getInstrumentBalanceSheetStatements(
100
- instrumentID: OrdersAPI.InstrumentIDOrSymbol,
106
+ instrumentID: string,
101
107
  query: InstrumentDataGetInstrumentBalanceSheetStatementsParams | null | undefined = {},
102
108
  options?: RequestOptions,
103
109
  ): APIPromise<InstrumentDataGetInstrumentBalanceSheetStatementsResponse> {
@@ -115,12 +121,12 @@ export class InstrumentData extends APIResource {
115
121
  * ```ts
116
122
  * const response =
117
123
  * await client.v1.instrumentData.getInstrumentCashFlowStatements(
118
- * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
124
+ * 'x',
119
125
  * );
120
126
  * ```
121
127
  */
122
128
  getInstrumentCashFlowStatements(
123
- instrumentID: OrdersAPI.InstrumentIDOrSymbol,
129
+ instrumentID: string,
124
130
  query: InstrumentDataGetInstrumentCashFlowStatementsParams | null | undefined = {},
125
131
  options?: RequestOptions,
126
132
  ): APIPromise<InstrumentDataGetInstrumentCashFlowStatementsResponse> {
@@ -142,13 +148,11 @@ export class InstrumentData extends APIResource {
142
148
  * @example
143
149
  * ```ts
144
150
  * const response =
145
- * await client.v1.instrumentData.getInstrumentEvents(
146
- * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
147
- * );
151
+ * await client.v1.instrumentData.getInstrumentEvents('x');
148
152
  * ```
149
153
  */
150
154
  getInstrumentEvents(
151
- instrumentID: OrdersAPI.InstrumentIDOrSymbol,
155
+ instrumentID: string,
152
156
  query: InstrumentDataGetInstrumentEventsParams | null | undefined = {},
153
157
  options?: RequestOptions,
154
158
  ): APIPromise<InstrumentDataGetInstrumentEventsResponse> {
@@ -162,12 +166,12 @@ export class InstrumentData extends APIResource {
162
166
  * ```ts
163
167
  * const response =
164
168
  * await client.v1.instrumentData.getInstrumentFundamentals(
165
- * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
169
+ * 'x',
166
170
  * );
167
171
  * ```
168
172
  */
169
173
  getInstrumentFundamentals(
170
- instrumentID: OrdersAPI.InstrumentIDOrSymbol,
174
+ instrumentID: string,
171
175
  options?: RequestOptions,
172
176
  ): APIPromise<InstrumentDataGetInstrumentFundamentalsResponse> {
173
177
  return this._client.get(path`/v1/instruments/${instrumentID}/fundamentals`, options);
@@ -186,12 +190,12 @@ export class InstrumentData extends APIResource {
186
190
  * ```ts
187
191
  * const response =
188
192
  * await client.v1.instrumentData.getInstrumentIncomeStatements(
189
- * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
193
+ * 'x',
190
194
  * );
191
195
  * ```
192
196
  */
193
197
  getInstrumentIncomeStatements(
194
- instrumentID: OrdersAPI.InstrumentIDOrSymbol,
198
+ instrumentID: string,
195
199
  query: InstrumentDataGetInstrumentIncomeStatementsParams | null | undefined = {},
196
200
  options?: RequestOptions,
197
201
  ): APIPromise<InstrumentDataGetInstrumentIncomeStatementsResponse> {
@@ -2,7 +2,6 @@
2
2
 
3
3
  import { APIResource } from '../../core/resource';
4
4
  import * as Shared from '../shared';
5
- import * as OrdersAPI from './orders';
6
5
  import * as V1API from './v1';
7
6
  import { APIPromise } from '../../core/api-promise';
8
7
  import { RequestOptions } from '../../internal/request-options';
@@ -18,13 +17,11 @@ export class Instruments extends APIResource {
18
17
  * @example
19
18
  * ```ts
20
19
  * const response =
21
- * await client.v1.instruments.getInstrumentByID(
22
- * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
23
- * );
20
+ * await client.v1.instruments.getInstrumentByID('x');
24
21
  * ```
25
22
  */
26
23
  getInstrumentByID(
27
- instrumentID: OrdersAPI.InstrumentIDOrSymbol,
24
+ instrumentID: string,
28
25
  query: InstrumentGetInstrumentByIDParams | null | undefined = {},
29
26
  options?: RequestOptions,
30
27
  ): APIPromise<InstrumentGetInstrumentByIDResponse> {
@@ -178,12 +175,6 @@ export interface Instrument {
178
175
  */
179
176
  adv?: string | null;
180
177
 
181
- /**
182
- * @deprecated Deprecated. Always null. When a null/undefined value is observed, it
183
- * indicates it does not apply.
184
- */
185
- expiry?: string | null;
186
-
187
178
  /**
188
179
  * The type of security (e.g., Common Stock, ETF) When a null/undefined value is
189
180
  * observed, it indicates that there is no available data.
@@ -226,12 +217,6 @@ export interface Instrument {
226
217
  * null/undefined value is observed, it indicates that there is no available data.
227
218
  */
228
219
  short_margin_rate?: string | null;
229
-
230
- /**
231
- * @deprecated Deprecated. Always null. When a null/undefined value is observed, it
232
- * indicates it does not apply.
233
- */
234
- strike_price?: string | null;
235
220
  }
236
221
 
237
222
  export interface InstrumentCore {
@@ -307,12 +292,6 @@ export interface InstrumentCore {
307
292
  */
308
293
  adv?: string | null;
309
294
 
310
- /**
311
- * @deprecated Deprecated. Always null. When a null/undefined value is observed, it
312
- * indicates it does not apply.
313
- */
314
- expiry?: string | null;
315
-
316
295
  /**
317
296
  * The type of security (e.g., Common Stock, ETF) When a null/undefined value is
318
297
  * observed, it indicates that there is no available data.
@@ -348,12 +327,6 @@ export interface InstrumentCore {
348
327
  * null/undefined value is observed, it indicates that there is no available data.
349
328
  */
350
329
  short_margin_rate?: string | null;
351
-
352
- /**
353
- * @deprecated Deprecated. Always null. When a null/undefined value is observed, it
354
- * indicates it does not apply.
355
- */
356
- strike_price?: string | null;
357
330
  }
358
331
 
359
332
  export type InstrumentCoreList = Array<InstrumentCore>;
@@ -532,7 +505,7 @@ export interface InstrumentGetOptionContractsParams {
532
505
  /**
533
506
  * Filter by contract type: CALL or PUT
534
507
  */
535
- contract_type?: ContractType;
508
+ contract_type?: 'CALL' | 'PUT';
536
509
 
537
510
  /**
538
511
  * Filter to contracts expiring on this date (YYYY-MM-DD)
@@ -559,7 +532,7 @@ export interface InstrumentGetOptionContractsParams {
559
532
  /**
560
533
  * Instrument identifier or symbol of the underlying equity/index
561
534
  */
562
- underlying_instrument_id?: OrdersAPI.InstrumentIDOrSymbol;
535
+ underlying_instrument_id?: string;
563
536
  }
564
537
 
565
538
  export interface InstrumentSearchInstrumentsParams {
@@ -41,6 +41,8 @@ export {
41
41
  type OpenEntitlementConsentAction,
42
42
  type OpenScreenerAction,
43
43
  type PrefillCancelOrderAction,
44
+ type PrefillModifyOrderAction,
45
+ type PrefillModifyOrderRequest,
44
46
  type PrefillNewOrderAction,
45
47
  type PrefillOrderAction,
46
48
  type PromptButtonAction,
@@ -297,6 +297,48 @@ export interface PrefillCancelOrderAction {
297
297
  orders: Array<OrdersAPI.CancelOrderRequest>;
298
298
  }
299
299
 
300
+ /**
301
+ * Modify-order prefill action.
302
+ */
303
+ export interface PrefillModifyOrderAction {
304
+ /**
305
+ * Modification targets and deltas needed to construct replace-order API requests.
306
+ */
307
+ orders: Array<PrefillModifyOrderRequest>;
308
+ }
309
+
310
+ /**
311
+ * Request to replace (modify) an existing order
312
+ *
313
+ * At least one field must be provided.
314
+ */
315
+ export interface PrefillModifyOrderRequest {
316
+ /**
317
+ * Account ID that owns the order.
318
+ */
319
+ account_id?: number;
320
+
321
+ /**
322
+ * New limit price for the order
323
+ */
324
+ limit_price?: string | null;
325
+
326
+ /**
327
+ * Order ID to modify.
328
+ */
329
+ order_id?: string;
330
+
331
+ /**
332
+ * New quantity for the order
333
+ */
334
+ quantity?: string | null;
335
+
336
+ /**
337
+ * New stop price for the order
338
+ */
339
+ stop_price?: string | null;
340
+ }
341
+
300
342
  /**
301
343
  * New-order prefill action.
302
344
  */
@@ -316,7 +358,8 @@ export interface PrefillNewOrderAction {
316
358
  */
317
359
  export type PrefillOrderAction =
318
360
  | PrefillOrderAction.PrefillNewOrderAction
319
- | PrefillOrderAction.PrefillCancelOrderAction;
361
+ | PrefillOrderAction.PrefillCancelOrderAction
362
+ | PrefillOrderAction.PrefillModifyOrderAction;
320
363
 
321
364
  export namespace PrefillOrderAction {
322
365
  /**
@@ -332,6 +375,13 @@ export namespace PrefillOrderAction {
332
375
  export interface PrefillCancelOrderAction extends OmniAIAPI.PrefillCancelOrderAction {
333
376
  action_type: 'CANCEL';
334
377
  }
378
+
379
+ /**
380
+ * Modify one or more existing orders.
381
+ */
382
+ export interface PrefillModifyOrderAction extends OmniAIAPI.PrefillModifyOrderAction {
383
+ action_type: 'MODIFY';
384
+ }
335
385
  }
336
386
 
337
387
  /**
@@ -443,6 +493,8 @@ export declare namespace OmniAI {
443
493
  type OpenEntitlementConsentAction as OpenEntitlementConsentAction,
444
494
  type OpenScreenerAction as OpenScreenerAction,
445
495
  type PrefillCancelOrderAction as PrefillCancelOrderAction,
496
+ type PrefillModifyOrderAction as PrefillModifyOrderAction,
497
+ type PrefillModifyOrderRequest as PrefillModifyOrderRequest,
446
498
  type PrefillNewOrderAction as PrefillNewOrderAction,
447
499
  type PrefillOrderAction as PrefillOrderAction,
448
500
  type PromptButtonAction as PromptButtonAction,
@@ -222,7 +222,8 @@ export interface Execution {
222
222
  export type ExecutionList = Array<Execution>;
223
223
 
224
224
  /**
225
- * Instrument identifier
225
+ * Instrument identifier: either an instrument UUID or a symbol (symbol for
226
+ * equities, OSI for options). Non-UUID inputs are resolved server-side.
226
227
  */
227
228
  export type InstrumentIDOrSymbol = string;
228
229
 
@@ -270,7 +271,8 @@ export interface NewOrderRequest {
270
271
  extended_hours?: boolean | null;
271
272
 
272
273
  /**
273
- * Instrument identifier
274
+ * Instrument ID (UUID) or symbol (equity ticker or OSI option symbol). Either
275
+ * `symbol` or `instrument_id` must be provided.
274
276
  */
275
277
  instrument_id?: InstrumentIDOrSymbol | null;
276
278
 
@@ -538,6 +540,28 @@ export type OrderType =
538
540
  */
539
541
  export type QueueState = 'AWAITING_RELEASE' | 'RELEASED';
540
542
 
543
+ /**
544
+ * Request to replace (modify) an existing order
545
+ *
546
+ * At least one field must be provided.
547
+ */
548
+ export interface ReplaceOrderRequest {
549
+ /**
550
+ * New limit price for the order
551
+ */
552
+ limit_price?: string | null;
553
+
554
+ /**
555
+ * New quantity for the order
556
+ */
557
+ quantity?: string | null;
558
+
559
+ /**
560
+ * New stop price for the order
561
+ */
562
+ stop_price?: string | null;
563
+ }
564
+
541
565
  /**
542
566
  * Strict order-type enum for order submission/replacement requests.
543
567
  */
@@ -550,7 +574,7 @@ export type RequestOrderType =
550
574
  | 'TRAILING_STOP_LIMIT';
551
575
 
552
576
  /**
553
- * Strict time-in-force enum for order submission/replacement requests.
577
+ * Strict time-in-force enum for order submission requests.
554
578
  */
555
579
  export type RequestTimeInForce =
556
580
  | 'DAY'
@@ -801,11 +825,6 @@ export interface OrderReplaceOrderParams {
801
825
  * Body param: New stop price for the order
802
826
  */
803
827
  stop_price?: string | null;
804
-
805
- /**
806
- * Body param: New time in force for the order
807
- */
808
- time_in_force?: RequestTimeInForce;
809
828
  }
810
829
 
811
830
  export interface OrderSubmitOrdersParams {
@@ -824,6 +843,7 @@ export declare namespace Orders {
824
843
  type OrderStatus as OrderStatus,
825
844
  type OrderType as OrderType,
826
845
  type QueueState as QueueState,
846
+ type ReplaceOrderRequest as ReplaceOrderRequest,
827
847
  type RequestOrderType as RequestOrderType,
828
848
  type RequestTimeInForce as RequestTimeInForce,
829
849
  type Side as Side,
@@ -48,7 +48,7 @@ export class Positions extends APIResource {
48
48
  * @example
49
49
  * ```ts
50
50
  * const response = await client.v1.positions.closePosition(
51
- * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
51
+ * 'x',
52
52
  * { account_id: 0 },
53
53
  * );
54
54
  * ```
@@ -20,7 +20,9 @@ import {
20
20
  AccountStatus,
21
21
  AccountSubtype,
22
22
  AccountType,
23
+ AccountWithPersonalDetails,
23
24
  Accounts,
25
+ Address,
24
26
  MarginDetails,
25
27
  MarginDetailsUsage,
26
28
  MarginSessionDetails,
@@ -95,6 +97,7 @@ import {
95
97
  OrderType,
96
98
  Orders,
97
99
  QueueState,
100
+ ReplaceOrderRequest,
98
101
  RequestOrderType,
99
102
  RequestTimeInForce,
100
103
  Side,
@@ -233,6 +236,8 @@ import {
233
236
  OpenEntitlementConsentAction,
234
237
  OpenScreenerAction,
235
238
  PrefillCancelOrderAction,
239
+ PrefillModifyOrderAction,
240
+ PrefillModifyOrderRequest,
236
241
  PrefillNewOrderAction,
237
242
  PrefillOrderAction,
238
243
  PromptButtonAction,
@@ -288,6 +293,8 @@ export declare namespace V1 {
288
293
  type AccountStatus as AccountStatus,
289
294
  type AccountSubtype as AccountSubtype,
290
295
  type AccountType as AccountType,
296
+ type AccountWithPersonalDetails as AccountWithPersonalDetails,
297
+ type Address as Address,
291
298
  type MarginDetails as MarginDetails,
292
299
  type MarginDetailsUsage as MarginDetailsUsage,
293
300
  type MarginSessionDetails as MarginSessionDetails,
@@ -407,6 +414,8 @@ export declare namespace V1 {
407
414
  type OpenEntitlementConsentAction as OpenEntitlementConsentAction,
408
415
  type OpenScreenerAction as OpenScreenerAction,
409
416
  type PrefillCancelOrderAction as PrefillCancelOrderAction,
417
+ type PrefillModifyOrderAction as PrefillModifyOrderAction,
418
+ type PrefillModifyOrderRequest as PrefillModifyOrderRequest,
410
419
  type PrefillNewOrderAction as PrefillNewOrderAction,
411
420
  type PrefillOrderAction as PrefillOrderAction,
412
421
  type PromptButtonAction as PromptButtonAction,
@@ -427,6 +436,7 @@ export declare namespace V1 {
427
436
  type OrderStatus as OrderStatus,
428
437
  type OrderType as OrderType,
429
438
  type QueueState as QueueState,
439
+ type ReplaceOrderRequest as ReplaceOrderRequest,
430
440
  type RequestOrderType as RequestOrderType,
431
441
  type RequestTimeInForce as RequestTimeInForce,
432
442
  type Side as Side,
@@ -19,7 +19,7 @@ export class Watchlist extends APIResource {
19
19
  * ```ts
20
20
  * const response = await client.v1.watchlist.addWatchlistItem(
21
21
  * '550e8400-e29b-41d4-a716-446655440000',
22
- * { instrument_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' },
22
+ * { instrument_id: 'x' },
23
23
  * );
24
24
  * ```
25
25
  */
@@ -240,7 +240,7 @@ export interface WatchlistGetWatchlistsResponse extends Shared.BaseResponse {
240
240
 
241
241
  export interface WatchlistAddWatchlistItemParams {
242
242
  /**
243
- * Instrument identifier
243
+ * Instrument ID (UUID) or symbol (equity ticker or OSI option symbol).
244
244
  */
245
245
  instrument_id: OrdersAPI.InstrumentIDOrSymbol;
246
246
  }
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.90.0'; // x-release-please-version
1
+ export const VERSION = '0.92.0'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.90.0";
1
+ export declare const VERSION = "0.92.0";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.90.0";
1
+ export declare const VERSION = "0.92.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.90.0'; // x-release-please-version
4
+ exports.VERSION = '0.92.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '0.90.0'; // x-release-please-version
1
+ export const VERSION = '0.92.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map