@clear-street/clearstreet 0.99.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.
- package/CHANGELOG.md +16 -0
- package/package.json +1 -1
- package/resources/v1/index.d.mts +2 -2
- package/resources/v1/index.d.mts.map +1 -1
- package/resources/v1/index.d.ts +2 -2
- package/resources/v1/index.d.ts.map +1 -1
- package/resources/v1/index.js.map +1 -1
- package/resources/v1/index.mjs.map +1 -1
- package/resources/v1/instrument-data/market-data.d.mts +90 -20
- package/resources/v1/instrument-data/market-data.d.mts.map +1 -1
- package/resources/v1/instrument-data/market-data.d.ts +90 -20
- package/resources/v1/instrument-data/market-data.d.ts.map +1 -1
- package/resources/v1/instrument-data/market-data.js +5 -7
- package/resources/v1/instrument-data/market-data.js.map +1 -1
- package/resources/v1/instrument-data/market-data.mjs +5 -7
- package/resources/v1/instrument-data/market-data.mjs.map +1 -1
- package/resources/v1/instruments.d.mts +45 -3
- package/resources/v1/instruments.d.mts.map +1 -1
- package/resources/v1/instruments.d.ts +45 -3
- package/resources/v1/instruments.d.ts.map +1 -1
- package/resources/v1/omni-ai/omni-ai.d.mts +1 -1
- package/resources/v1/omni-ai/omni-ai.d.ts +1 -1
- package/resources/v1/orders.d.mts +20 -7
- package/resources/v1/orders.d.mts.map +1 -1
- package/resources/v1/orders.d.ts +20 -7
- package/resources/v1/orders.d.ts.map +1 -1
- package/resources/v1/positions.d.mts +52 -1
- package/resources/v1/positions.d.mts.map +1 -1
- package/resources/v1/positions.d.ts +52 -1
- package/resources/v1/positions.d.ts.map +1 -1
- package/resources/v1/screener.d.mts +3 -3
- package/resources/v1/screener.d.ts +3 -3
- package/resources/v1/screener.js +2 -2
- package/resources/v1/screener.mjs +2 -2
- package/resources/v1/v1.d.mts +5 -5
- package/resources/v1/v1.d.mts.map +1 -1
- package/resources/v1/v1.d.ts +5 -5
- package/resources/v1/v1.d.ts.map +1 -1
- package/resources/v1/v1.js.map +1 -1
- package/resources/v1/v1.mjs.map +1 -1
- package/resources/v1/watchlist.d.mts +3 -3
- package/resources/v1/watchlist.d.ts +3 -3
- package/src/resources/v1/index.ts +2 -0
- package/src/resources/v1/instrument-data/market-data.ts +98 -20
- package/src/resources/v1/instruments.ts +51 -2
- package/src/resources/v1/omni-ai/omni-ai.ts +1 -1
- package/src/resources/v1/orders.ts +22 -7
- package/src/resources/v1/positions.ts +55 -0
- package/src/resources/v1/screener.ts +3 -3
- package/src/resources/v1/v1.ts +5 -1
- package/src/resources/v1/watchlist.ts +3 -3
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.mts.map +1 -1
- package/version.d.ts +1 -1
- package/version.d.ts.map +1 -1
- package/version.js +1 -1
- package/version.js.map +1 -1
- package/version.mjs +1 -1
- package/version.mjs.map +1 -1
|
@@ -11,6 +11,10 @@ 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
|
*
|
|
@@ -20,13 +24,7 @@ export class MarketData extends APIResource {
|
|
|
20
24
|
* fail to resolve are omitted from `data` and reported in `error` instead (see the
|
|
21
25
|
* 207/404 responses below).
|
|
22
26
|
*
|
|
23
|
-
* @
|
|
24
|
-
* ```ts
|
|
25
|
-
* const response =
|
|
26
|
-
* await client.v1.instrumentData.marketData.getDailySummaries(
|
|
27
|
-
* { instrument_ids: 'instrument_ids' },
|
|
28
|
-
* );
|
|
29
|
-
* ```
|
|
27
|
+
* @deprecated
|
|
30
28
|
*/
|
|
31
29
|
getDailySummaries(
|
|
32
30
|
query: MarketDataGetDailySummariesParams,
|
|
@@ -137,15 +135,42 @@ export interface MarketDataSnapshot {
|
|
|
137
135
|
*/
|
|
138
136
|
instrument_id: string;
|
|
139
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
|
+
|
|
140
162
|
/**
|
|
141
163
|
* Display symbol for the security.
|
|
142
164
|
*/
|
|
143
165
|
symbol: string;
|
|
144
166
|
|
|
145
167
|
/**
|
|
146
|
-
* Cumulative traded volume reported on the most recent trade, in
|
|
147
|
-
* equities or contracts for options. Absent when no trade is available.
|
|
148
|
-
*
|
|
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.
|
|
149
174
|
*/
|
|
150
175
|
cumulative_volume?: number | null;
|
|
151
176
|
|
|
@@ -177,11 +202,11 @@ export interface MarketDataSnapshot {
|
|
|
177
202
|
name?: string | null;
|
|
178
203
|
|
|
179
204
|
/**
|
|
180
|
-
*
|
|
181
|
-
*
|
|
182
|
-
* 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.
|
|
183
208
|
*/
|
|
184
|
-
|
|
209
|
+
open_interest?: number | null;
|
|
185
210
|
}
|
|
186
211
|
|
|
187
212
|
export type MarketDataSnapshotList = Array<MarketDataSnapshot>;
|
|
@@ -333,26 +358,78 @@ export interface SnapshotQuote {
|
|
|
333
358
|
}
|
|
334
359
|
|
|
335
360
|
/**
|
|
336
|
-
* 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`.
|
|
337
364
|
*/
|
|
338
365
|
export interface SnapshotSession {
|
|
366
|
+
/**
|
|
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.
|
|
372
|
+
*/
|
|
373
|
+
ohlv_applicable: boolean;
|
|
374
|
+
|
|
339
375
|
/**
|
|
340
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.
|
|
341
379
|
*/
|
|
342
|
-
change
|
|
380
|
+
change?: string | null;
|
|
343
381
|
|
|
344
382
|
/**
|
|
345
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.
|
|
346
386
|
*/
|
|
347
|
-
change_percent
|
|
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;
|
|
348
423
|
|
|
349
424
|
/**
|
|
350
425
|
* Previous session close price. Corporate-action-adjusted (stock dividends, cash
|
|
351
426
|
* dividends, and forward/reverse splits) when an adjustment exists for the close
|
|
352
427
|
* date; the raw close otherwise. An adjustment can carry the price beyond 2
|
|
353
|
-
* 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.
|
|
354
431
|
*/
|
|
355
|
-
previous_close
|
|
432
|
+
previous_close?: string | null;
|
|
356
433
|
|
|
357
434
|
/**
|
|
358
435
|
* Unadjusted (raw) previous session close. Present only when a corporate-action
|
|
@@ -381,7 +458,8 @@ export interface MarketDataGetDailySummariesParams {
|
|
|
381
458
|
export interface MarketDataGetSnapshotsParams {
|
|
382
459
|
/**
|
|
383
460
|
* Comma-separated instrument IDs (UUID) or symbols (equity tickers or OSI option
|
|
384
|
-
* symbols).
|
|
461
|
+
* symbols). Required; accepts 1 to 100 IDs. Duplicate resolved ids collapse to a
|
|
462
|
+
* single row.
|
|
385
463
|
*/
|
|
386
464
|
instrument_ids?: Array<OrdersAPI.InstrumentIDOrSymbol>;
|
|
387
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,
|
|
@@ -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
|
|
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
|
|
496
|
-
*
|
|
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
|
|
502
|
-
*
|
|
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
|
-
*
|
|
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,
|
|
@@ -158,8 +158,8 @@ export class Screener extends APIResource {
|
|
|
158
158
|
* `instrument_id` column is always prepended. Metadata carries `total_items`,
|
|
159
159
|
* `total_pages`, and `next_page_token` for paging.
|
|
160
160
|
*
|
|
161
|
-
*
|
|
162
|
-
*
|
|
161
|
+
* Screener results can shuffle between calls; reconcile by re-checking rows across
|
|
162
|
+
* pages rather than assuming stable ordering.
|
|
163
163
|
*
|
|
164
164
|
* @example
|
|
165
165
|
* ```ts
|
|
@@ -516,7 +516,7 @@ export interface ModifierDef {
|
|
|
516
516
|
args: Array<ModifierArg>;
|
|
517
517
|
|
|
518
518
|
/**
|
|
519
|
-
* `"ADD"` or `"SUBTRACT"`.
|
|
519
|
+
* The modifier operation name: one of `"ADD"` or `"SUBTRACT"`.
|
|
520
520
|
*/
|
|
521
521
|
name: string;
|
|
522
522
|
}
|
package/src/resources/v1/v1.ts
CHANGED
|
@@ -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,
|
|
@@ -311,7 +313,7 @@ export class V1 extends APIResource {
|
|
|
311
313
|
export type SecurityType = 'COMMON_STOCK' | 'INDEX' | 'OPTION' | 'CASH';
|
|
312
314
|
|
|
313
315
|
/**
|
|
314
|
-
* Sort direction sorted results
|
|
316
|
+
* Sort direction for sorted results
|
|
315
317
|
*/
|
|
316
318
|
export type SortDirection = 'ASC' | 'DESC';
|
|
317
319
|
|
|
@@ -436,6 +438,7 @@ export declare namespace V1 {
|
|
|
436
438
|
type OptionExpiryDate as OptionExpiryDate,
|
|
437
439
|
type OptionsContract as OptionsContract,
|
|
438
440
|
type OptionsContractList as OptionsContractList,
|
|
441
|
+
type TickRule as TickRule,
|
|
439
442
|
type InstrumentGetInstrumentByIDResponse as InstrumentGetInstrumentByIDResponse,
|
|
440
443
|
type InstrumentGetInstrumentsResponse as InstrumentGetInstrumentsResponse,
|
|
441
444
|
type InstrumentGetOptionContractsResponse as InstrumentGetOptionContractsResponse,
|
|
@@ -528,6 +531,7 @@ export declare namespace V1 {
|
|
|
528
531
|
type Position as Position,
|
|
529
532
|
type PositionInstruction as PositionInstruction,
|
|
530
533
|
type PositionInstructionList as PositionInstructionList,
|
|
534
|
+
type PositionInstructionRejection as PositionInstructionRejection,
|
|
531
535
|
type PositionInstructionStatus as PositionInstructionStatus,
|
|
532
536
|
type PositionInstructionType as PositionInstructionType,
|
|
533
537
|
type PositionList as PositionList,
|
|
@@ -136,12 +136,12 @@ export interface AddWatchlistItemData {
|
|
|
136
136
|
*/
|
|
137
137
|
export interface WatchlistDetail {
|
|
138
138
|
/**
|
|
139
|
-
*
|
|
139
|
+
* The unique identifier for the watchlist.
|
|
140
140
|
*/
|
|
141
141
|
id: string;
|
|
142
142
|
|
|
143
143
|
/**
|
|
144
|
-
*
|
|
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
|
-
*
|
|
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.
|
|
1
|
+
export const VERSION = '0.100.0'; // x-release-please-version
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.100.0";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.d.mts","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"version.d.mts","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,YAAY,CAAC"}
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.100.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,YAAY,CAAC"}
|
package/version.js
CHANGED
package/version.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":";;;AAAa,QAAA,OAAO,GAAG,
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":";;;AAAa,QAAA,OAAO,GAAG,SAAS,CAAC,CAAC,2BAA2B"}
|
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.100.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|
package/version.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.mjs","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,
|
|
1
|
+
{"version":3,"file":"version.mjs","sourceRoot":"","sources":["src/version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,SAAS,CAAC,CAAC,2BAA2B"}
|