@clear-street/clearstreet 0.103.0 → 0.105.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 +19 -0
- package/client.d.mts +0 -1
- package/client.d.mts.map +1 -1
- package/client.d.ts +0 -1
- package/client.d.ts.map +1 -1
- package/package.json +1 -1
- package/resources/shared.d.mts +3 -4
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +3 -4
- package/resources/shared.d.ts.map +1 -1
- package/resources/v1/accounts.d.mts +15 -3
- package/resources/v1/accounts.d.mts.map +1 -1
- package/resources/v1/accounts.d.ts +15 -3
- package/resources/v1/accounts.d.ts.map +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 +2 -1
- package/resources/v1/instrument-data/market-data.d.mts.map +1 -1
- package/resources/v1/instrument-data/market-data.d.ts +2 -1
- package/resources/v1/instrument-data/market-data.d.ts.map +1 -1
- package/resources/v1/instruments.d.mts +9 -4
- package/resources/v1/instruments.d.mts.map +1 -1
- package/resources/v1/instruments.d.ts +9 -4
- package/resources/v1/instruments.d.ts.map +1 -1
- package/resources/v1/instruments.js +2 -2
- package/resources/v1/instruments.mjs +2 -2
- package/resources/v1/locates.d.mts +123 -1
- package/resources/v1/locates.d.mts.map +1 -1
- package/resources/v1/locates.d.ts +123 -1
- package/resources/v1/locates.d.ts.map +1 -1
- package/resources/v1/locates.js +33 -0
- package/resources/v1/locates.js.map +1 -1
- package/resources/v1/locates.mjs +33 -0
- package/resources/v1/locates.mjs.map +1 -1
- package/resources/v1/omni-ai/entitlements.d.mts +58 -10
- package/resources/v1/omni-ai/entitlements.d.mts.map +1 -1
- package/resources/v1/omni-ai/entitlements.d.ts +58 -10
- package/resources/v1/omni-ai/entitlements.d.ts.map +1 -1
- package/resources/v1/omni-ai/entitlements.js +35 -9
- package/resources/v1/omni-ai/entitlements.js.map +1 -1
- package/resources/v1/omni-ai/entitlements.mjs +35 -9
- package/resources/v1/omni-ai/entitlements.mjs.map +1 -1
- package/resources/v1/omni-ai/index.d.mts +1 -1
- package/resources/v1/omni-ai/index.d.mts.map +1 -1
- package/resources/v1/omni-ai/index.d.ts +1 -1
- package/resources/v1/omni-ai/index.d.ts.map +1 -1
- package/resources/v1/omni-ai/index.js.map +1 -1
- package/resources/v1/omni-ai/index.mjs.map +1 -1
- package/resources/v1/omni-ai/omni-ai.d.mts +4 -3
- package/resources/v1/omni-ai/omni-ai.d.mts.map +1 -1
- package/resources/v1/omni-ai/omni-ai.d.ts +4 -3
- package/resources/v1/omni-ai/omni-ai.d.ts.map +1 -1
- package/resources/v1/omni-ai/omni-ai.js.map +1 -1
- package/resources/v1/omni-ai/omni-ai.mjs.map +1 -1
- package/resources/v1/orders.d.mts +2 -1
- package/resources/v1/orders.d.mts.map +1 -1
- package/resources/v1/orders.d.ts +2 -1
- package/resources/v1/orders.d.ts.map +1 -1
- package/resources/v1/private-markets/index.d.mts +2 -4
- package/resources/v1/private-markets/index.d.mts.map +1 -1
- package/resources/v1/private-markets/index.d.ts +2 -4
- package/resources/v1/private-markets/index.d.ts.map +1 -1
- package/resources/v1/private-markets/index.js +1 -5
- package/resources/v1/private-markets/index.js.map +1 -1
- package/resources/v1/private-markets/index.mjs +0 -2
- package/resources/v1/private-markets/index.mjs.map +1 -1
- package/resources/v1/private-markets/iois.d.mts +151 -1
- package/resources/v1/private-markets/iois.d.mts.map +1 -1
- package/resources/v1/private-markets/iois.d.ts +151 -1
- package/resources/v1/private-markets/iois.d.ts.map +1 -1
- package/resources/v1/private-markets/iois.js +75 -0
- package/resources/v1/private-markets/iois.js.map +1 -1
- package/resources/v1/private-markets/iois.mjs +75 -0
- package/resources/v1/private-markets/iois.mjs.map +1 -1
- package/resources/v1/private-markets/private-markets.d.mts +494 -133
- package/resources/v1/private-markets/private-markets.d.mts.map +1 -1
- package/resources/v1/private-markets/private-markets.d.ts +494 -133
- package/resources/v1/private-markets/private-markets.d.ts.map +1 -1
- package/resources/v1/private-markets/private-markets.js +0 -76
- package/resources/v1/private-markets/private-markets.js.map +1 -1
- package/resources/v1/private-markets/private-markets.mjs +0 -76
- package/resources/v1/private-markets/private-markets.mjs.map +1 -1
- package/resources/v1/v1.d.mts +4 -4
- package/resources/v1/v1.d.mts.map +1 -1
- package/resources/v1/v1.d.ts +4 -4
- 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/src/client.ts +0 -1
- package/src/resources/shared.ts +1 -3
- package/src/resources/v1/accounts.ts +18 -3
- package/src/resources/v1/index.ts +32 -7
- package/src/resources/v1/instrument-data/market-data.ts +2 -1
- package/src/resources/v1/instruments.ts +10 -4
- package/src/resources/v1/locates.ts +164 -0
- package/src/resources/v1/omni-ai/entitlements.ts +84 -9
- package/src/resources/v1/omni-ai/index.ts +6 -0
- package/src/resources/v1/omni-ai/omni-ai.ts +14 -1
- package/src/resources/v1/orders.ts +2 -1
- package/src/resources/v1/private-markets/index.ts +32 -38
- package/src/resources/v1/private-markets/iois.ts +205 -1
- package/src/resources/v1/private-markets/private-markets.ts +622 -209
- package/src/resources/v1/v1.ts +64 -14
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
- package/resources/v1/private-markets/companies.d.mts +0 -368
- package/resources/v1/private-markets/companies.d.mts.map +0 -1
- package/resources/v1/private-markets/companies.d.ts +0 -368
- package/resources/v1/private-markets/companies.d.ts.map +0 -1
- package/resources/v1/private-markets/companies.js +0 -9
- package/resources/v1/private-markets/companies.js.map +0 -1
- package/resources/v1/private-markets/companies.mjs +0 -5
- package/resources/v1/private-markets/companies.mjs.map +0 -1
- package/resources/v1/private-markets/spvs.d.mts +0 -158
- package/resources/v1/private-markets/spvs.d.mts.map +0 -1
- package/resources/v1/private-markets/spvs.d.ts +0 -158
- package/resources/v1/private-markets/spvs.d.ts.map +0 -1
- package/resources/v1/private-markets/spvs.js +0 -9
- package/resources/v1/private-markets/spvs.js.map +0 -1
- package/resources/v1/private-markets/spvs.mjs +0 -5
- package/resources/v1/private-markets/spvs.mjs.map +0 -1
- package/src/resources/v1/private-markets/companies.ts +0 -483
- package/src/resources/v1/private-markets/spvs.ts +0 -201
package/src/resources/shared.ts
CHANGED
|
@@ -19,7 +19,7 @@ export interface APIError {
|
|
|
19
19
|
* Additional error details, if any. This can include structured information such
|
|
20
20
|
* as field violations or error metadata.
|
|
21
21
|
*/
|
|
22
|
-
details?:
|
|
22
|
+
details?: Array<{ [key: string]: unknown }>;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
export interface BaseResponse {
|
|
@@ -34,8 +34,6 @@ export interface BaseResponse {
|
|
|
34
34
|
error?: APIError | null;
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
export type ErrorDetails = Array<{ [key: string]: unknown }>;
|
|
38
|
-
|
|
39
37
|
/**
|
|
40
38
|
* Metadata for the response. This will always contain a request ID which can be
|
|
41
39
|
* used to identify the request to Clear Street for tracing, and optionally may
|
|
@@ -172,7 +172,7 @@ export interface AccountBalances {
|
|
|
172
172
|
/**
|
|
173
173
|
* The total buying power available in the account: base buying power plus the open
|
|
174
174
|
* order adjustment, where base buying power is maintenance margin excess times the
|
|
175
|
-
* multiplier for intraday and
|
|
175
|
+
* multiplier for intraday and overnight margin excess times the multiplier for
|
|
176
176
|
* overnight.
|
|
177
177
|
*/
|
|
178
178
|
buying_power: string;
|
|
@@ -515,6 +515,16 @@ export interface MarginDetails {
|
|
|
515
515
|
*/
|
|
516
516
|
overnight_details: MarginSessionDetails;
|
|
517
517
|
|
|
518
|
+
/**
|
|
519
|
+
* The difference between equity and the overnight margin requirement.
|
|
520
|
+
*/
|
|
521
|
+
overnight_margin_excess: string;
|
|
522
|
+
|
|
523
|
+
/**
|
|
524
|
+
* The amount of equity required to hold current positions overnight.
|
|
525
|
+
*/
|
|
526
|
+
overnight_margin_requirement: string;
|
|
527
|
+
|
|
518
528
|
/**
|
|
519
529
|
* Optional top margin contributors, returned only when explicitly requested.
|
|
520
530
|
*/
|
|
@@ -543,8 +553,8 @@ export interface MarginSessionDetails {
|
|
|
543
553
|
/**
|
|
544
554
|
* Maximum buying power available in the account during the session: base buying
|
|
545
555
|
* power plus the open order adjustment, where base buying power is maintenance
|
|
546
|
-
* margin excess times the multiplier for intraday and
|
|
547
|
-
* the multiplier for overnight.
|
|
556
|
+
* margin excess times the multiplier for intraday and overnight margin excess
|
|
557
|
+
* times the multiplier for overnight.
|
|
548
558
|
*/
|
|
549
559
|
buying_power: string;
|
|
550
560
|
|
|
@@ -571,6 +581,11 @@ export interface MarginTopContributor {
|
|
|
571
581
|
*/
|
|
572
582
|
market_value: string;
|
|
573
583
|
|
|
584
|
+
/**
|
|
585
|
+
* Overnight margin requirement attributable to this underlying.
|
|
586
|
+
*/
|
|
587
|
+
overnight_margin_requirement: string;
|
|
588
|
+
|
|
574
589
|
/**
|
|
575
590
|
* UUID of the underlying security contributing to margin requirement.
|
|
576
591
|
*/
|
|
@@ -115,12 +115,19 @@ export {
|
|
|
115
115
|
} from './instruments';
|
|
116
116
|
export {
|
|
117
117
|
Locates,
|
|
118
|
+
type Locate,
|
|
119
|
+
type LocateList,
|
|
118
120
|
type LocateRate,
|
|
119
121
|
type LocateRateResult,
|
|
120
122
|
type LocateRateResultList,
|
|
123
|
+
type LocateStatus,
|
|
124
|
+
type LocateGetLocateByIDResponse,
|
|
121
125
|
type LocateGetLocateRateByIDResponse,
|
|
122
126
|
type LocateGetLocateRatesResponse,
|
|
127
|
+
type LocateGetLocatesResponse,
|
|
128
|
+
type LocateGetLocateByIDParams,
|
|
123
129
|
type LocateGetLocateRatesParams,
|
|
130
|
+
type LocateGetLocatesParams,
|
|
124
131
|
} from './locates';
|
|
125
132
|
export {
|
|
126
133
|
OmniAI,
|
|
@@ -222,17 +229,35 @@ export {
|
|
|
222
229
|
} from './positions';
|
|
223
230
|
export {
|
|
224
231
|
PrivateMarkets,
|
|
225
|
-
type
|
|
232
|
+
type ChargedBy,
|
|
233
|
+
type CompanyCategory,
|
|
234
|
+
type CompanyCitation,
|
|
235
|
+
type CompanyCustomer,
|
|
236
|
+
type CompanyDetail,
|
|
237
|
+
type CompanyDocumentPreview,
|
|
238
|
+
type CompanyDocumentRelation,
|
|
239
|
+
type CompanyDocumentResource,
|
|
240
|
+
type CompanyDocumentType,
|
|
241
|
+
type CompanyHeadquarters,
|
|
242
|
+
type CompanyLegalEntity,
|
|
243
|
+
type CompanyMetricPoint,
|
|
244
|
+
type CompanyMetricSeries,
|
|
245
|
+
type CompanyNarrativeSection,
|
|
246
|
+
type CompanyPerson,
|
|
247
|
+
type CompanyPersonRole,
|
|
248
|
+
type CompanyProfileResource,
|
|
249
|
+
type CompanySocialLink,
|
|
250
|
+
type CompanySocialType,
|
|
251
|
+
type FeeFrequency,
|
|
252
|
+
type FeeType,
|
|
253
|
+
type MetricFrequency,
|
|
254
|
+
type MetricKey,
|
|
255
|
+
type SpvDetail,
|
|
256
|
+
type SpvFeeTermResource,
|
|
226
257
|
type PrivateMarketGetCompanyByIDResponse,
|
|
227
|
-
type PrivateMarketGetIoisResponse,
|
|
228
258
|
type PrivateMarketGetSpvByIDResponse,
|
|
229
|
-
type PrivateMarketUpdateIoiResponse,
|
|
230
|
-
type PrivateMarketCreateIoiParams,
|
|
231
|
-
type PrivateMarketDeleteIoiParams,
|
|
232
259
|
type PrivateMarketGetCompanyByIDParams,
|
|
233
|
-
type PrivateMarketGetIoisParams,
|
|
234
260
|
type PrivateMarketGetSpvByIDParams,
|
|
235
|
-
type PrivateMarketUpdateIoiParams,
|
|
236
261
|
} from './private-markets/index';
|
|
237
262
|
export {
|
|
238
263
|
Screener,
|
|
@@ -232,7 +232,8 @@ export interface SnapshotGreeks {
|
|
|
232
232
|
gamma: string;
|
|
233
233
|
|
|
234
234
|
/**
|
|
235
|
-
* Implied volatility
|
|
235
|
+
* Implied volatility. Temporarily withheld: always `0`. Do not use this value; it
|
|
236
|
+
* is not a market implied volatility.
|
|
236
237
|
*/
|
|
237
238
|
iv: string;
|
|
238
239
|
|
|
@@ -49,8 +49,8 @@ export class Instruments extends APIResource {
|
|
|
49
49
|
* List options contracts.
|
|
50
50
|
*
|
|
51
51
|
* Returns options contracts with options-specific metadata. Exactly one identifier
|
|
52
|
-
* must be provided: `
|
|
53
|
-
*
|
|
52
|
+
* must be provided: `root`/`underlying_instrument_id` (list all contracts for that
|
|
53
|
+
* underlier) or `contract_ids` (look up specific contracts directly).
|
|
54
54
|
* `expiry`/`contract_type` apply as filters in either case.
|
|
55
55
|
*
|
|
56
56
|
* @example
|
|
@@ -621,7 +621,7 @@ export interface InstrumentGetOptionContractsParams {
|
|
|
621
621
|
/**
|
|
622
622
|
* Comma-separated contract instrument IDs (UUID) or OSI option symbols to look up
|
|
623
623
|
* directly, bypassing underlier expansion. Mutually exclusive with
|
|
624
|
-
*
|
|
624
|
+
* root/underlying_instrument_id; up to 100 values.
|
|
625
625
|
*/
|
|
626
626
|
contract_ids?: Array<OrdersAPI.InstrumentIDOrSymbol>;
|
|
627
627
|
|
|
@@ -654,7 +654,13 @@ export interface InstrumentGetOptionContractsParams {
|
|
|
654
654
|
page_token?: string;
|
|
655
655
|
|
|
656
656
|
/**
|
|
657
|
-
*
|
|
657
|
+
* OSI option root symbol (e.g., AAPL, SPXW). Index roots also include their weekly
|
|
658
|
+
* series (e.g., SPX includes SPXW).
|
|
659
|
+
*/
|
|
660
|
+
root?: string;
|
|
661
|
+
|
|
662
|
+
/**
|
|
663
|
+
* Deprecated: use `root`. If both are sent, the values must match.
|
|
658
664
|
*/
|
|
659
665
|
underlier?: string;
|
|
660
666
|
|
|
@@ -11,6 +11,29 @@ import { path } from '../../internal/utils/path';
|
|
|
11
11
|
* Query locate requests, granted locates, and cached locate borrow rates.
|
|
12
12
|
*/
|
|
13
13
|
export class Locates extends APIResource {
|
|
14
|
+
/**
|
|
15
|
+
* > **Beta** — this endpoint may change before general availability.
|
|
16
|
+
*
|
|
17
|
+
* Fetch one locate by id, matched against the locate request id, locate id, and
|
|
18
|
+
* client request id, across all days in force.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```ts
|
|
22
|
+
* const response = await client.v1.locates.getLocateByID(
|
|
23
|
+
* 'id',
|
|
24
|
+
* { account_id: 0 },
|
|
25
|
+
* );
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
getLocateByID(
|
|
29
|
+
id: string,
|
|
30
|
+
params: LocateGetLocateByIDParams,
|
|
31
|
+
options?: RequestOptions,
|
|
32
|
+
): APIPromise<LocateGetLocateByIDResponse> {
|
|
33
|
+
const { account_id } = params;
|
|
34
|
+
return this._client.get(path`/v1/accounts/${account_id}/locates/${id}`, options);
|
|
35
|
+
}
|
|
36
|
+
|
|
14
37
|
/**
|
|
15
38
|
* > **Beta** — this endpoint may change before general availability.
|
|
16
39
|
*
|
|
@@ -53,8 +76,100 @@ export class Locates extends APIResource {
|
|
|
53
76
|
): APIPromise<LocateGetLocateRatesResponse> {
|
|
54
77
|
return this._client.get('/v1/locates/rates', { query, ...options });
|
|
55
78
|
}
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* > **Beta** — this endpoint may change before general availability.
|
|
82
|
+
*
|
|
83
|
+
* List locates for the account on one effective date, which defaults to today's
|
|
84
|
+
* New York calendar date. Filter by comma-separated statuses and instrument ids or
|
|
85
|
+
* symbols.
|
|
86
|
+
*
|
|
87
|
+
* @example
|
|
88
|
+
* ```ts
|
|
89
|
+
* const response = await client.v1.locates.getLocates(0);
|
|
90
|
+
* ```
|
|
91
|
+
*/
|
|
92
|
+
getLocates(
|
|
93
|
+
accountID: number,
|
|
94
|
+
query: LocateGetLocatesParams | null | undefined = {},
|
|
95
|
+
options?: RequestOptions,
|
|
96
|
+
): APIPromise<LocateGetLocatesResponse> {
|
|
97
|
+
return this._client.get(path`/v1/accounts/${accountID}/locates`, { query, ...options });
|
|
98
|
+
}
|
|
56
99
|
}
|
|
57
100
|
|
|
101
|
+
/**
|
|
102
|
+
* A locate request joined with the locate granted for it, if any.
|
|
103
|
+
*/
|
|
104
|
+
export interface Locate {
|
|
105
|
+
/**
|
|
106
|
+
* Account the locate is booked to.
|
|
107
|
+
*/
|
|
108
|
+
account_id: number;
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Caller-assigned id of the locate request.
|
|
112
|
+
*/
|
|
113
|
+
client_request_id: string;
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* New York calendar date the locate is in force for.
|
|
117
|
+
*/
|
|
118
|
+
effective_date: string;
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Instrument id.
|
|
122
|
+
*/
|
|
123
|
+
instrument_id: string;
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Engine-assigned locate request id.
|
|
127
|
+
*/
|
|
128
|
+
locate_request_id: string;
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* Number of shares requested.
|
|
132
|
+
*/
|
|
133
|
+
requested_quantity: number;
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* Presented status of the locate.
|
|
137
|
+
*/
|
|
138
|
+
status: LocateStatus;
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* Engine-assigned locate id; set once the locate is granted. When a null/undefined
|
|
142
|
+
* value is observed, it indicates it does not apply.
|
|
143
|
+
*/
|
|
144
|
+
locate_id?: string | null;
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* Number of shares granted; set once the locate is granted. When a null/undefined
|
|
148
|
+
* value is observed, it indicates it does not apply.
|
|
149
|
+
*/
|
|
150
|
+
quantity?: number | null;
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* Client order id the request relates to, if any. When a null/undefined value is
|
|
154
|
+
* observed, it indicates it does not apply.
|
|
155
|
+
*/
|
|
156
|
+
related_order_id?: string | null;
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* Number of granted shares reserved. When a null/undefined value is observed, it
|
|
160
|
+
* indicates it does not apply.
|
|
161
|
+
*/
|
|
162
|
+
reserved_quantity?: number | null;
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* Number of granted shares already used. When a null/undefined value is observed,
|
|
166
|
+
* it indicates it does not apply.
|
|
167
|
+
*/
|
|
168
|
+
used_quantity?: number | null;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
export type LocateList = Array<Locate>;
|
|
172
|
+
|
|
58
173
|
/**
|
|
59
174
|
* A locate borrow rate for an instrument.
|
|
60
175
|
*/
|
|
@@ -100,6 +215,19 @@ export interface LocateRateResult {
|
|
|
100
215
|
|
|
101
216
|
export type LocateRateResultList = Array<LocateRateResult>;
|
|
102
217
|
|
|
218
|
+
/**
|
|
219
|
+
* The presented status of a locate: the locate-request lifecycle plus `EXPIRED`
|
|
220
|
+
* for accepted locates whose effective date has passed.
|
|
221
|
+
*/
|
|
222
|
+
export type LocateStatus = 'REQUESTED' | 'ACCEPTED' | 'REJECTED' | 'EXPIRED';
|
|
223
|
+
|
|
224
|
+
export interface LocateGetLocateByIDResponse extends Shared.BaseResponse {
|
|
225
|
+
/**
|
|
226
|
+
* A locate request joined with the locate granted for it, if any.
|
|
227
|
+
*/
|
|
228
|
+
data: Locate;
|
|
229
|
+
}
|
|
230
|
+
|
|
103
231
|
export interface LocateGetLocateRateByIDResponse extends Shared.BaseResponse {
|
|
104
232
|
/**
|
|
105
233
|
* A locate borrow rate for an instrument.
|
|
@@ -111,6 +239,17 @@ export interface LocateGetLocateRatesResponse extends Shared.BaseResponse {
|
|
|
111
239
|
data: LocateRateResultList;
|
|
112
240
|
}
|
|
113
241
|
|
|
242
|
+
export interface LocateGetLocatesResponse extends Shared.BaseResponse {
|
|
243
|
+
data: LocateList;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
export interface LocateGetLocateByIDParams {
|
|
247
|
+
/**
|
|
248
|
+
* Account identifier
|
|
249
|
+
*/
|
|
250
|
+
account_id: number;
|
|
251
|
+
}
|
|
252
|
+
|
|
114
253
|
export interface LocateGetLocateRatesParams {
|
|
115
254
|
/**
|
|
116
255
|
* Comma-separated instrument IDs (UUID) or symbols; at least one, at most 1,000.
|
|
@@ -118,13 +257,38 @@ export interface LocateGetLocateRatesParams {
|
|
|
118
257
|
instrument_ids: Array<OrdersAPI.InstrumentIDOrSymbol>;
|
|
119
258
|
}
|
|
120
259
|
|
|
260
|
+
export interface LocateGetLocatesParams {
|
|
261
|
+
/**
|
|
262
|
+
* Effective date to list; defaults to today's New York calendar date. Explicit
|
|
263
|
+
* dates are used unchanged, including weekends and holidays.
|
|
264
|
+
*/
|
|
265
|
+
effective_date?: string;
|
|
266
|
+
|
|
267
|
+
/**
|
|
268
|
+
* Comma-separated instrument IDs (UUID) or symbols.
|
|
269
|
+
*/
|
|
270
|
+
instrument_ids?: Array<OrdersAPI.InstrumentIDOrSymbol>;
|
|
271
|
+
|
|
272
|
+
/**
|
|
273
|
+
* Comma-separated locate statuses to filter by
|
|
274
|
+
*/
|
|
275
|
+
status?: Array<'REQUESTED' | 'ACCEPTED' | 'REJECTED' | 'EXPIRED'>;
|
|
276
|
+
}
|
|
277
|
+
|
|
121
278
|
export declare namespace Locates {
|
|
122
279
|
export {
|
|
280
|
+
type Locate as Locate,
|
|
281
|
+
type LocateList as LocateList,
|
|
123
282
|
type LocateRate as LocateRate,
|
|
124
283
|
type LocateRateResult as LocateRateResult,
|
|
125
284
|
type LocateRateResultList as LocateRateResultList,
|
|
285
|
+
type LocateStatus as LocateStatus,
|
|
286
|
+
type LocateGetLocateByIDResponse as LocateGetLocateByIDResponse,
|
|
126
287
|
type LocateGetLocateRateByIDResponse as LocateGetLocateRateByIDResponse,
|
|
127
288
|
type LocateGetLocateRatesResponse as LocateGetLocateRatesResponse,
|
|
289
|
+
type LocateGetLocatesResponse as LocateGetLocatesResponse,
|
|
290
|
+
type LocateGetLocateByIDParams as LocateGetLocateByIDParams,
|
|
128
291
|
type LocateGetLocateRatesParams as LocateGetLocateRatesParams,
|
|
292
|
+
type LocateGetLocatesParams as LocateGetLocatesParams,
|
|
129
293
|
};
|
|
130
294
|
}
|
|
@@ -34,13 +34,9 @@ export class Entitlements extends APIResource {
|
|
|
34
34
|
/**
|
|
35
35
|
* Revoke one entitlement grant by id.
|
|
36
36
|
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
* await client.v1.omniAI.entitlements.deleteEntitlement(
|
|
41
|
-
* 'entitlement_id',
|
|
42
|
-
* );
|
|
43
|
-
* ```
|
|
37
|
+
* Deprecated -- use `POST /omni-ai/entitlements/opt-out`.
|
|
38
|
+
*
|
|
39
|
+
* @deprecated
|
|
44
40
|
*/
|
|
45
41
|
deleteEntitlement(
|
|
46
42
|
entitlementID: string,
|
|
@@ -65,20 +61,58 @@ export class Entitlements extends APIResource {
|
|
|
65
61
|
}
|
|
66
62
|
|
|
67
63
|
/**
|
|
68
|
-
*
|
|
64
|
+
* Whether each entitlement is enabled, per account. Accounts with no recorded
|
|
65
|
+
* choice are enabled by default. Without `account_id`, covers every account the
|
|
66
|
+
* caller can access.
|
|
69
67
|
*
|
|
70
68
|
* @example
|
|
71
69
|
* ```ts
|
|
72
70
|
* const response =
|
|
73
|
-
* await client.v1.omniAI.entitlements.
|
|
71
|
+
* await client.v1.omniAI.entitlements.getEntitlementStatus();
|
|
74
72
|
* ```
|
|
75
73
|
*/
|
|
74
|
+
getEntitlementStatus(
|
|
75
|
+
query: EntitlementGetEntitlementStatusParams | null | undefined = {},
|
|
76
|
+
options?: RequestOptions,
|
|
77
|
+
): APIPromise<EntitlementGetEntitlementStatusResponse> {
|
|
78
|
+
return this._client.get('/v1/omni-ai/entitlement-status', { query, ...options });
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* List caller's active entitlement grants.
|
|
83
|
+
*
|
|
84
|
+
* Deprecated -- use `GET /omni-ai/entitlement-status`; this lists explicit grants
|
|
85
|
+
* only and omits accounts that are enabled by default.
|
|
86
|
+
*
|
|
87
|
+
* @deprecated
|
|
88
|
+
*/
|
|
76
89
|
getEntitlements(
|
|
77
90
|
query: EntitlementGetEntitlementsParams | null | undefined = {},
|
|
78
91
|
options?: RequestOptions,
|
|
79
92
|
): APIPromise<EntitlementGetEntitlementsResponse> {
|
|
80
93
|
return this._client.get('/v1/omni-ai/entitlements', { query, ...options });
|
|
81
94
|
}
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Turn off one-or-more entitlements for the given accounts. Idempotent: accounts
|
|
98
|
+
* that are already opted out are left as they are. To turn an entitlement back on,
|
|
99
|
+
* sign the agreement with `POST /omni-ai/entitlements`.
|
|
100
|
+
*
|
|
101
|
+
* @example
|
|
102
|
+
* ```ts
|
|
103
|
+
* const response =
|
|
104
|
+
* await client.v1.omniAI.entitlements.optOutEntitlements({
|
|
105
|
+
* account_ids: [100019, 100021],
|
|
106
|
+
* entitlement_codes: ['omni.account_data'],
|
|
107
|
+
* });
|
|
108
|
+
* ```
|
|
109
|
+
*/
|
|
110
|
+
optOutEntitlements(
|
|
111
|
+
body: EntitlementOptOutEntitlementsParams,
|
|
112
|
+
options?: RequestOptions,
|
|
113
|
+
): APIPromise<EntitlementOptOutEntitlementsResponse> {
|
|
114
|
+
return this._client.post('/v1/omni-ai/entitlements/opt-out', { body, ...options });
|
|
115
|
+
}
|
|
82
116
|
}
|
|
83
117
|
|
|
84
118
|
export interface DeleteEntitlementResponse {
|
|
@@ -125,6 +159,23 @@ export interface EntitlementResource {
|
|
|
125
159
|
|
|
126
160
|
export type EntitlementResourceList = Array<EntitlementResource>;
|
|
127
161
|
|
|
162
|
+
/**
|
|
163
|
+
* Whether an entitlement is enabled for one account. Accounts the user never chose
|
|
164
|
+
* for are enabled by default.
|
|
165
|
+
*/
|
|
166
|
+
export interface EntitlementStatusResource {
|
|
167
|
+
account_id: number;
|
|
168
|
+
|
|
169
|
+
enabled: boolean;
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* Stable entitlement code granted by an agreement.
|
|
173
|
+
*/
|
|
174
|
+
entitlement_code: OmniAIAPI.EntitlementCode;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
export type EntitlementStatusResourceList = Array<EntitlementStatusResource>;
|
|
178
|
+
|
|
128
179
|
export interface EntitlementCreateEntitlementsResponse extends Shared.BaseResponse {
|
|
129
180
|
data: EntitlementResourceList;
|
|
130
181
|
}
|
|
@@ -137,10 +188,18 @@ export interface EntitlementGetEntitlementAgreementsResponse extends Shared.Base
|
|
|
137
188
|
data: EntitlementAgreementResourceList;
|
|
138
189
|
}
|
|
139
190
|
|
|
191
|
+
export interface EntitlementGetEntitlementStatusResponse extends Shared.BaseResponse {
|
|
192
|
+
data: EntitlementStatusResourceList;
|
|
193
|
+
}
|
|
194
|
+
|
|
140
195
|
export interface EntitlementGetEntitlementsResponse extends Shared.BaseResponse {
|
|
141
196
|
data: EntitlementResourceList;
|
|
142
197
|
}
|
|
143
198
|
|
|
199
|
+
export interface EntitlementOptOutEntitlementsResponse extends Shared.BaseResponse {
|
|
200
|
+
data: EntitlementStatusResourceList;
|
|
201
|
+
}
|
|
202
|
+
|
|
144
203
|
export interface EntitlementCreateEntitlementsParams {
|
|
145
204
|
account_ids: Array<number>;
|
|
146
205
|
|
|
@@ -149,10 +208,20 @@ export interface EntitlementCreateEntitlementsParams {
|
|
|
149
208
|
entitlement_codes: Array<OmniAIAPI.EntitlementCode>;
|
|
150
209
|
}
|
|
151
210
|
|
|
211
|
+
export interface EntitlementGetEntitlementStatusParams {
|
|
212
|
+
account_id?: number;
|
|
213
|
+
}
|
|
214
|
+
|
|
152
215
|
export interface EntitlementGetEntitlementsParams {
|
|
153
216
|
account_id?: number;
|
|
154
217
|
}
|
|
155
218
|
|
|
219
|
+
export interface EntitlementOptOutEntitlementsParams {
|
|
220
|
+
account_ids: Array<number>;
|
|
221
|
+
|
|
222
|
+
entitlement_codes: Array<OmniAIAPI.EntitlementCode>;
|
|
223
|
+
}
|
|
224
|
+
|
|
156
225
|
export declare namespace Entitlements {
|
|
157
226
|
export {
|
|
158
227
|
type DeleteEntitlementResponse as DeleteEntitlementResponse,
|
|
@@ -160,11 +229,17 @@ export declare namespace Entitlements {
|
|
|
160
229
|
type EntitlementAgreementResourceList as EntitlementAgreementResourceList,
|
|
161
230
|
type EntitlementResource as EntitlementResource,
|
|
162
231
|
type EntitlementResourceList as EntitlementResourceList,
|
|
232
|
+
type EntitlementStatusResource as EntitlementStatusResource,
|
|
233
|
+
type EntitlementStatusResourceList as EntitlementStatusResourceList,
|
|
163
234
|
type EntitlementCreateEntitlementsResponse as EntitlementCreateEntitlementsResponse,
|
|
164
235
|
type EntitlementDeleteEntitlementResponse as EntitlementDeleteEntitlementResponse,
|
|
165
236
|
type EntitlementGetEntitlementAgreementsResponse as EntitlementGetEntitlementAgreementsResponse,
|
|
237
|
+
type EntitlementGetEntitlementStatusResponse as EntitlementGetEntitlementStatusResponse,
|
|
166
238
|
type EntitlementGetEntitlementsResponse as EntitlementGetEntitlementsResponse,
|
|
239
|
+
type EntitlementOptOutEntitlementsResponse as EntitlementOptOutEntitlementsResponse,
|
|
167
240
|
type EntitlementCreateEntitlementsParams as EntitlementCreateEntitlementsParams,
|
|
241
|
+
type EntitlementGetEntitlementStatusParams as EntitlementGetEntitlementStatusParams,
|
|
168
242
|
type EntitlementGetEntitlementsParams as EntitlementGetEntitlementsParams,
|
|
243
|
+
type EntitlementOptOutEntitlementsParams as EntitlementOptOutEntitlementsParams,
|
|
169
244
|
};
|
|
170
245
|
}
|
|
@@ -7,12 +7,18 @@ export {
|
|
|
7
7
|
type EntitlementAgreementResourceList,
|
|
8
8
|
type EntitlementResource,
|
|
9
9
|
type EntitlementResourceList,
|
|
10
|
+
type EntitlementStatusResource,
|
|
11
|
+
type EntitlementStatusResourceList,
|
|
10
12
|
type EntitlementCreateEntitlementsResponse,
|
|
11
13
|
type EntitlementDeleteEntitlementResponse,
|
|
12
14
|
type EntitlementGetEntitlementAgreementsResponse,
|
|
15
|
+
type EntitlementGetEntitlementStatusResponse,
|
|
13
16
|
type EntitlementGetEntitlementsResponse,
|
|
17
|
+
type EntitlementOptOutEntitlementsResponse,
|
|
14
18
|
type EntitlementCreateEntitlementsParams,
|
|
19
|
+
type EntitlementGetEntitlementStatusParams,
|
|
15
20
|
type EntitlementGetEntitlementsParams,
|
|
21
|
+
type EntitlementOptOutEntitlementsParams,
|
|
16
22
|
} from './entitlements';
|
|
17
23
|
export {
|
|
18
24
|
Messages,
|
|
@@ -13,10 +13,16 @@ import {
|
|
|
13
13
|
EntitlementCreateEntitlementsResponse,
|
|
14
14
|
EntitlementDeleteEntitlementResponse,
|
|
15
15
|
EntitlementGetEntitlementAgreementsResponse,
|
|
16
|
+
EntitlementGetEntitlementStatusParams,
|
|
17
|
+
EntitlementGetEntitlementStatusResponse,
|
|
16
18
|
EntitlementGetEntitlementsParams,
|
|
17
19
|
EntitlementGetEntitlementsResponse,
|
|
20
|
+
EntitlementOptOutEntitlementsParams,
|
|
21
|
+
EntitlementOptOutEntitlementsResponse,
|
|
18
22
|
EntitlementResource,
|
|
19
23
|
EntitlementResourceList,
|
|
24
|
+
EntitlementStatusResource,
|
|
25
|
+
EntitlementStatusResourceList,
|
|
20
26
|
Entitlements,
|
|
21
27
|
} from './entitlements';
|
|
22
28
|
import * as MessagesAPI from './messages';
|
|
@@ -536,7 +542,8 @@ export interface PrefillNewOrderRequest {
|
|
|
536
542
|
* Optional execution strategy. One of `SOR`, `VWAP`, `TWAP`, or `DMA`. Defaults to
|
|
537
543
|
* `SOR`, the only strategy OTC common-stock orders support. `VWAP` and `TWAP` are
|
|
538
544
|
* supported only on `MARKET` and `LIMIT` orders, and `DMA` only on `LIMIT` orders;
|
|
539
|
-
* all three require `DAY` time-in-force.
|
|
545
|
+
* all three require `DAY` time-in-force. `VWAP`, `TWAP`, and `DMA` do not support
|
|
546
|
+
* `extended_hours`.
|
|
540
547
|
*/
|
|
541
548
|
strategy?: OrdersAPI.OrderStrategy | null;
|
|
542
549
|
|
|
@@ -726,12 +733,18 @@ export declare namespace OmniAI {
|
|
|
726
733
|
type EntitlementAgreementResourceList as EntitlementAgreementResourceList,
|
|
727
734
|
type EntitlementResource as EntitlementResource,
|
|
728
735
|
type EntitlementResourceList as EntitlementResourceList,
|
|
736
|
+
type EntitlementStatusResource as EntitlementStatusResource,
|
|
737
|
+
type EntitlementStatusResourceList as EntitlementStatusResourceList,
|
|
729
738
|
type EntitlementCreateEntitlementsResponse as EntitlementCreateEntitlementsResponse,
|
|
730
739
|
type EntitlementDeleteEntitlementResponse as EntitlementDeleteEntitlementResponse,
|
|
731
740
|
type EntitlementGetEntitlementAgreementsResponse as EntitlementGetEntitlementAgreementsResponse,
|
|
741
|
+
type EntitlementGetEntitlementStatusResponse as EntitlementGetEntitlementStatusResponse,
|
|
732
742
|
type EntitlementGetEntitlementsResponse as EntitlementGetEntitlementsResponse,
|
|
743
|
+
type EntitlementOptOutEntitlementsResponse as EntitlementOptOutEntitlementsResponse,
|
|
733
744
|
type EntitlementCreateEntitlementsParams as EntitlementCreateEntitlementsParams,
|
|
745
|
+
type EntitlementGetEntitlementStatusParams as EntitlementGetEntitlementStatusParams,
|
|
734
746
|
type EntitlementGetEntitlementsParams as EntitlementGetEntitlementsParams,
|
|
747
|
+
type EntitlementOptOutEntitlementsParams as EntitlementOptOutEntitlementsParams,
|
|
735
748
|
};
|
|
736
749
|
|
|
737
750
|
export {
|
|
@@ -312,7 +312,8 @@ export interface NewOrderRequest {
|
|
|
312
312
|
* Optional execution strategy. One of `SOR`, `VWAP`, `TWAP`, or `DMA`. Defaults to
|
|
313
313
|
* `SOR`, the only strategy OTC common-stock orders support. `VWAP` and `TWAP` are
|
|
314
314
|
* supported only on `MARKET` and `LIMIT` orders, and `DMA` only on `LIMIT` orders;
|
|
315
|
-
* all three require `DAY` time-in-force.
|
|
315
|
+
* all three require `DAY` time-in-force. `VWAP`, `TWAP`, and `DMA` do not support
|
|
316
|
+
* `extended_hours`.
|
|
316
317
|
*/
|
|
317
318
|
strategy?: OrderStrategy | null;
|
|
318
319
|
|