@clear-street/clearstreet 0.102.0 → 0.104.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 +23 -0
- package/package.json +1 -1
- package/resources/v1/index.d.mts +2 -1
- package/resources/v1/index.d.mts.map +1 -1
- package/resources/v1/index.d.ts +2 -1
- package/resources/v1/index.d.ts.map +1 -1
- package/resources/v1/index.js +3 -1
- package/resources/v1/index.js.map +1 -1
- package/resources/v1/index.mjs +1 -0
- package/resources/v1/index.mjs.map +1 -1
- package/resources/v1/instrument-data/instrument-data.d.mts +22 -4
- package/resources/v1/instrument-data/instrument-data.d.mts.map +1 -1
- package/resources/v1/instrument-data/instrument-data.d.ts +22 -4
- package/resources/v1/instrument-data/instrument-data.d.ts.map +1 -1
- package/resources/v1/instrument-data/instrument-data.js.map +1 -1
- package/resources/v1/instrument-data/instrument-data.mjs.map +1 -1
- package/resources/v1/instrument-data/market-data.d.mts +21 -3
- package/resources/v1/instrument-data/market-data.d.mts.map +1 -1
- package/resources/v1/instrument-data/market-data.d.ts +21 -3
- package/resources/v1/instrument-data/market-data.d.ts.map +1 -1
- package/resources/v1/instrument-data/market-data.js +5 -0
- package/resources/v1/instrument-data/market-data.js.map +1 -1
- package/resources/v1/instrument-data/market-data.mjs +5 -0
- package/resources/v1/instrument-data/market-data.mjs.map +1 -1
- package/resources/v1/locates.d.mts +220 -0
- package/resources/v1/locates.d.mts.map +1 -0
- package/resources/v1/locates.d.ts +220 -0
- package/resources/v1/locates.d.ts.map +1 -0
- package/resources/v1/locates.js +81 -0
- package/resources/v1/locates.js.map +1 -0
- package/resources/v1/locates.mjs +77 -0
- package/resources/v1/locates.mjs.map +1 -0
- 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 +6 -5
- package/resources/v1/omni-ai/omni-ai.d.mts.map +1 -1
- package/resources/v1/omni-ai/omni-ai.d.ts +6 -5
- 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/omni-ai/threads.d.mts +8 -2
- package/resources/v1/omni-ai/threads.d.mts.map +1 -1
- package/resources/v1/omni-ai/threads.d.ts +8 -2
- package/resources/v1/omni-ai/threads.d.ts.map +1 -1
- package/resources/v1/omni-ai/threads.js +4 -2
- package/resources/v1/omni-ai/threads.js.map +1 -1
- package/resources/v1/omni-ai/threads.mjs +4 -2
- package/resources/v1/omni-ai/threads.mjs.map +1 -1
- package/resources/v1/orders.d.mts +24 -6
- package/resources/v1/orders.d.mts.map +1 -1
- package/resources/v1/orders.d.ts +24 -6
- 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 +6 -2
- package/resources/v1/v1.d.mts.map +1 -1
- package/resources/v1/v1.d.ts +6 -2
- package/resources/v1/v1.d.ts.map +1 -1
- package/resources/v1/v1.js +4 -0
- package/resources/v1/v1.js.map +1 -1
- package/resources/v1/v1.mjs +4 -0
- package/resources/v1/v1.mjs.map +1 -1
- package/src/resources/v1/index.ts +41 -7
- package/src/resources/v1/instrument-data/instrument-data.ts +24 -4
- package/src/resources/v1/instrument-data/market-data.ts +23 -3
- package/src/resources/v1/locates.ts +294 -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 +16 -3
- package/src/resources/v1/omni-ai/threads.ts +8 -2
- package/src/resources/v1/orders.ts +31 -6
- 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 +86 -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
|
@@ -27,6 +27,11 @@ export declare class MarketData extends APIResource {
|
|
|
27
27
|
/**
|
|
28
28
|
* Get market data snapshots for one or more securities.
|
|
29
29
|
*
|
|
30
|
+
* Two targeting modes, mutually exclusive: `instrument_ids` (1-100 ids), or
|
|
31
|
+
* `underlying_instrument_id` + `expiry` together, which resolves the underlier's
|
|
32
|
+
* option chain for that expiry and returns a snapshot for every contract in it
|
|
33
|
+
* (uncapped).
|
|
34
|
+
*
|
|
30
35
|
* @example
|
|
31
36
|
* ```ts
|
|
32
37
|
* const response =
|
|
@@ -189,7 +194,8 @@ export interface SnapshotGreeks {
|
|
|
189
194
|
*/
|
|
190
195
|
gamma: string;
|
|
191
196
|
/**
|
|
192
|
-
* Implied volatility
|
|
197
|
+
* Implied volatility. Temporarily withheld: always `0`. Do not use this value; it
|
|
198
|
+
* is not a market implied volatility.
|
|
193
199
|
*/
|
|
194
200
|
iv: string;
|
|
195
201
|
/**
|
|
@@ -386,12 +392,24 @@ export interface MarketDataGetDailySummariesParams {
|
|
|
386
392
|
instrument_ids: string;
|
|
387
393
|
}
|
|
388
394
|
export interface MarketDataGetSnapshotsParams {
|
|
395
|
+
/**
|
|
396
|
+
* Filter the option chain to contracts expiring on this date (YYYY-MM-DD). Must be
|
|
397
|
+
* provided together with `underlying_instrument_id`.
|
|
398
|
+
*/
|
|
399
|
+
expiry?: string;
|
|
389
400
|
/**
|
|
390
401
|
* Comma-separated instrument IDs (UUID) or symbols (equity tickers or OSI option
|
|
391
|
-
* symbols).
|
|
392
|
-
*
|
|
402
|
+
* symbols). Accepts 1 to 100 IDs; duplicate resolved ids collapse to a single row.
|
|
403
|
+
* Required unless `underlying_instrument_id` and `expiry` are provided; mutually
|
|
404
|
+
* exclusive with that pair.
|
|
393
405
|
*/
|
|
394
406
|
instrument_ids?: Array<OrdersAPI.InstrumentIDOrSymbol>;
|
|
407
|
+
/**
|
|
408
|
+
* Instrument identifier or symbol of the underlying equity/index for an option
|
|
409
|
+
* chain. Must be provided together with `expiry`; mutually exclusive with
|
|
410
|
+
* `instrument_ids`.
|
|
411
|
+
*/
|
|
412
|
+
underlying_instrument_id?: string;
|
|
395
413
|
}
|
|
396
414
|
export declare namespace MarketData {
|
|
397
415
|
export { type DailySummary as DailySummary, type DailySummaryList as DailySummaryList, type MarketDataSnapshot as MarketDataSnapshot, type MarketDataSnapshotList as MarketDataSnapshotList, type SnapshotGreeks as SnapshotGreeks, type SnapshotLastTrade as SnapshotLastTrade, type SnapshotQuote as SnapshotQuote, type SnapshotSession as SnapshotSession, type MarketDataGetDailySummariesResponse as MarketDataGetDailySummariesResponse, type MarketDataGetSnapshotsResponse as MarketDataGetSnapshotsResponse, type MarketDataGetDailySummariesParams as MarketDataGetDailySummariesParams, type MarketDataGetSnapshotsParams as MarketDataGetSnapshotsParams, };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"market-data.d.ts","sourceRoot":"","sources":["../../../src/resources/v1/instrument-data/market-data.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,kCAA+B;AACrD,OAAO,KAAK,MAAM,wBAAqB;AACvC,OAAO,KAAK,SAAS,qBAAkB;AACvC,OAAO,EAAE,UAAU,EAAE,qCAAkC;AACvD,OAAO,EAAE,cAAc,EAAE,6CAA0C;AAEnE;;GAEG;AACH,qBAAa,UAAW,SAAQ,WAAW;IACzC;;;;;;;;;;;;;;;OAeG;IACH,iBAAiB,CACf,KAAK,EAAE,iCAAiC,EACxC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,mCAAmC,CAAC;IAIlD
|
|
1
|
+
{"version":3,"file":"market-data.d.ts","sourceRoot":"","sources":["../../../src/resources/v1/instrument-data/market-data.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,kCAA+B;AACrD,OAAO,KAAK,MAAM,wBAAqB;AACvC,OAAO,KAAK,SAAS,qBAAkB;AACvC,OAAO,EAAE,UAAU,EAAE,qCAAkC;AACvD,OAAO,EAAE,cAAc,EAAE,6CAA0C;AAEnE;;GAEG;AACH,qBAAa,UAAW,SAAQ,WAAW;IACzC;;;;;;;;;;;;;;;OAeG;IACH,iBAAiB,CACf,KAAK,EAAE,iCAAiC,EACxC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,mCAAmC,CAAC;IAIlD;;;;;;;;;;;;;OAaG;IACH,YAAY,CACV,KAAK,GAAE,4BAA4B,GAAG,IAAI,GAAG,SAAc,EAC3D,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,8BAA8B,CAAC;CAG9C;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IAEtB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAErB;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEpB;;;;OAIG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB;;;OAGG;IACH,IAAI,CAAC,E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AI,iBAAiB,EAC3C,KAAK,aAAa,IAAI,aAAa,EACnC,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,mCAAmC,IAAI,mCAAmC,EAC/E,KAAK,8BAA8B,IAAI,8BAA8B,EACrE,KAAK,iCAAiC,IAAI,iCAAiC,EAC3E,KAAK,4BAA4B,IAAI,4BAA4B,GAClE,CAAC;CACH"}
|
|
@@ -29,6 +29,11 @@ class MarketData extends resource_1.APIResource {
|
|
|
29
29
|
/**
|
|
30
30
|
* Get market data snapshots for one or more securities.
|
|
31
31
|
*
|
|
32
|
+
* Two targeting modes, mutually exclusive: `instrument_ids` (1-100 ids), or
|
|
33
|
+
* `underlying_instrument_id` + `expiry` together, which resolves the underlier's
|
|
34
|
+
* option chain for that expiry and returns a snapshot for every contract in it
|
|
35
|
+
* (uncapped).
|
|
36
|
+
*
|
|
32
37
|
* @example
|
|
33
38
|
* ```ts
|
|
34
39
|
* const response =
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"market-data.js","sourceRoot":"","sources":["../../../src/resources/v1/instrument-data/market-data.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wDAAqD;AAMrD;;GAEG;AACH,MAAa,UAAW,SAAQ,sBAAW;IACzC;;;;;;;;;;;;;;;OAeG;IACH,iBAAiB,CACf,KAAwC,EACxC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,+BAA+B,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAClF,CAAC;IAED
|
|
1
|
+
{"version":3,"file":"market-data.js","sourceRoot":"","sources":["../../../src/resources/v1/instrument-data/market-data.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wDAAqD;AAMrD;;GAEG;AACH,MAAa,UAAW,SAAQ,sBAAW;IACzC;;;;;;;;;;;;;;;OAeG;IACH,iBAAiB,CACf,KAAwC,EACxC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,+BAA+B,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAClF,CAAC;IAED;;;;;;;;;;;;;OAaG;IACH,YAAY,CACV,QAAyD,EAAE,EAC3D,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,0BAA0B,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC7E,CAAC;CACF;AA5CD,gCA4CC"}
|
|
@@ -26,6 +26,11 @@ export class MarketData extends APIResource {
|
|
|
26
26
|
/**
|
|
27
27
|
* Get market data snapshots for one or more securities.
|
|
28
28
|
*
|
|
29
|
+
* Two targeting modes, mutually exclusive: `instrument_ids` (1-100 ids), or
|
|
30
|
+
* `underlying_instrument_id` + `expiry` together, which resolves the underlier's
|
|
31
|
+
* option chain for that expiry and returns a snapshot for every contract in it
|
|
32
|
+
* (uncapped).
|
|
33
|
+
*
|
|
29
34
|
* @example
|
|
30
35
|
* ```ts
|
|
31
36
|
* const response =
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"market-data.mjs","sourceRoot":"","sources":["../../../src/resources/v1/instrument-data/market-data.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,mCAA+B;AAMrD;;GAEG;AACH,MAAM,OAAO,UAAW,SAAQ,WAAW;IACzC;;;;;;;;;;;;;;;OAeG;IACH,iBAAiB,CACf,KAAwC,EACxC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,+BAA+B,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAClF,CAAC;IAED
|
|
1
|
+
{"version":3,"file":"market-data.mjs","sourceRoot":"","sources":["../../../src/resources/v1/instrument-data/market-data.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,mCAA+B;AAMrD;;GAEG;AACH,MAAM,OAAO,UAAW,SAAQ,WAAW;IACzC;;;;;;;;;;;;;;;OAeG;IACH,iBAAiB,CACf,KAAwC,EACxC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,+BAA+B,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAClF,CAAC;IAED;;;;;;;;;;;;;OAaG;IACH,YAAY,CACV,QAAyD,EAAE,EAC3D,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,0BAA0B,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC7E,CAAC;CACF"}
|
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
import { APIResource } from "../../core/resource.mjs";
|
|
2
|
+
import * as Shared from "../shared.mjs";
|
|
3
|
+
import * as OrdersAPI from "./orders.mjs";
|
|
4
|
+
import { APIPromise } from "../../core/api-promise.mjs";
|
|
5
|
+
import { RequestOptions } from "../../internal/request-options.mjs";
|
|
6
|
+
/**
|
|
7
|
+
* Query locate requests, granted locates, and cached locate borrow rates.
|
|
8
|
+
*/
|
|
9
|
+
export declare class Locates extends APIResource {
|
|
10
|
+
/**
|
|
11
|
+
* > **Beta** — this endpoint may change before general availability.
|
|
12
|
+
*
|
|
13
|
+
* Fetch one locate by id, matched against the locate request id, locate id, and
|
|
14
|
+
* client request id, across all days in force.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```ts
|
|
18
|
+
* const response = await client.v1.locates.getLocateByID(
|
|
19
|
+
* 'id',
|
|
20
|
+
* { account_id: 0 },
|
|
21
|
+
* );
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
getLocateByID(id: string, params: LocateGetLocateByIDParams, options?: RequestOptions): APIPromise<LocateGetLocateByIDResponse>;
|
|
25
|
+
/**
|
|
26
|
+
* > **Beta** — this endpoint may change before general availability.
|
|
27
|
+
*
|
|
28
|
+
* Fetch the cached locate borrow rate for one instrument. Rates refresh
|
|
29
|
+
* periodically; `404` means no rate is currently cached for the instrument.
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* ```ts
|
|
33
|
+
* const response = await client.v1.locates.getLocateRateByID(
|
|
34
|
+
* 'x',
|
|
35
|
+
* );
|
|
36
|
+
* ```
|
|
37
|
+
*/
|
|
38
|
+
getLocateRateByID(instrumentID: OrdersAPI.InstrumentIDOrSymbol, options?: RequestOptions): APIPromise<LocateGetLocateRateByIDResponse>;
|
|
39
|
+
/**
|
|
40
|
+
* > **Beta** — this endpoint may change before general availability.
|
|
41
|
+
*
|
|
42
|
+
* Fetch the cached locate borrow rates for up to 1,000 instruments. The response
|
|
43
|
+
* returns one row per requested instrument, in request order. Each row carries
|
|
44
|
+
* either the `rate` or an `error` — a `404` when the instrument is unknown or has
|
|
45
|
+
* no cached rate. The status is `207` when any row has an error, `200` when every
|
|
46
|
+
* instrument resolved to a rate.
|
|
47
|
+
*
|
|
48
|
+
* @example
|
|
49
|
+
* ```ts
|
|
50
|
+
* const response = await client.v1.locates.getLocateRates({
|
|
51
|
+
* instrument_ids: ['x'],
|
|
52
|
+
* });
|
|
53
|
+
* ```
|
|
54
|
+
*/
|
|
55
|
+
getLocateRates(query: LocateGetLocateRatesParams, options?: RequestOptions): APIPromise<LocateGetLocateRatesResponse>;
|
|
56
|
+
/**
|
|
57
|
+
* > **Beta** — this endpoint may change before general availability.
|
|
58
|
+
*
|
|
59
|
+
* List locates for the account on one effective date, which defaults to today's
|
|
60
|
+
* New York calendar date. Filter by comma-separated statuses and instrument ids or
|
|
61
|
+
* symbols.
|
|
62
|
+
*
|
|
63
|
+
* @example
|
|
64
|
+
* ```ts
|
|
65
|
+
* const response = await client.v1.locates.getLocates(0);
|
|
66
|
+
* ```
|
|
67
|
+
*/
|
|
68
|
+
getLocates(accountID: number, query?: LocateGetLocatesParams | null | undefined, options?: RequestOptions): APIPromise<LocateGetLocatesResponse>;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* A locate request joined with the locate granted for it, if any.
|
|
72
|
+
*/
|
|
73
|
+
export interface Locate {
|
|
74
|
+
/**
|
|
75
|
+
* Account the locate is booked to.
|
|
76
|
+
*/
|
|
77
|
+
account_id: number;
|
|
78
|
+
/**
|
|
79
|
+
* Caller-assigned id of the locate request.
|
|
80
|
+
*/
|
|
81
|
+
client_request_id: string;
|
|
82
|
+
/**
|
|
83
|
+
* New York calendar date the locate is in force for.
|
|
84
|
+
*/
|
|
85
|
+
effective_date: string;
|
|
86
|
+
/**
|
|
87
|
+
* Instrument id.
|
|
88
|
+
*/
|
|
89
|
+
instrument_id: string;
|
|
90
|
+
/**
|
|
91
|
+
* Engine-assigned locate request id.
|
|
92
|
+
*/
|
|
93
|
+
locate_request_id: string;
|
|
94
|
+
/**
|
|
95
|
+
* Number of shares requested.
|
|
96
|
+
*/
|
|
97
|
+
requested_quantity: number;
|
|
98
|
+
/**
|
|
99
|
+
* Presented status of the locate.
|
|
100
|
+
*/
|
|
101
|
+
status: LocateStatus;
|
|
102
|
+
/**
|
|
103
|
+
* Engine-assigned locate id; set once the locate is granted. When a null/undefined
|
|
104
|
+
* value is observed, it indicates it does not apply.
|
|
105
|
+
*/
|
|
106
|
+
locate_id?: string | null;
|
|
107
|
+
/**
|
|
108
|
+
* Number of shares granted; set once the locate is granted. When a null/undefined
|
|
109
|
+
* value is observed, it indicates it does not apply.
|
|
110
|
+
*/
|
|
111
|
+
quantity?: number | null;
|
|
112
|
+
/**
|
|
113
|
+
* Client order id the request relates to, if any. When a null/undefined value is
|
|
114
|
+
* observed, it indicates it does not apply.
|
|
115
|
+
*/
|
|
116
|
+
related_order_id?: string | null;
|
|
117
|
+
/**
|
|
118
|
+
* Number of granted shares reserved. When a null/undefined value is observed, it
|
|
119
|
+
* indicates it does not apply.
|
|
120
|
+
*/
|
|
121
|
+
reserved_quantity?: number | null;
|
|
122
|
+
/**
|
|
123
|
+
* Number of granted shares already used. When a null/undefined value is observed,
|
|
124
|
+
* it indicates it does not apply.
|
|
125
|
+
*/
|
|
126
|
+
used_quantity?: number | null;
|
|
127
|
+
}
|
|
128
|
+
export type LocateList = Array<Locate>;
|
|
129
|
+
/**
|
|
130
|
+
* A locate borrow rate for an instrument.
|
|
131
|
+
*/
|
|
132
|
+
export interface LocateRate {
|
|
133
|
+
/**
|
|
134
|
+
* Instrument id the rate applies to.
|
|
135
|
+
*/
|
|
136
|
+
instrument_id: string;
|
|
137
|
+
/**
|
|
138
|
+
* Borrow rate, expressed as a decimal (e.g. 0.037012 for 3.7012%).
|
|
139
|
+
*/
|
|
140
|
+
rate: string;
|
|
141
|
+
/**
|
|
142
|
+
* When the rate was requested from the locates venue.
|
|
143
|
+
*/
|
|
144
|
+
as_of?: string | null;
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* A requested instrument with either its cached borrow rate or an error.
|
|
148
|
+
*/
|
|
149
|
+
export interface LocateRateResult {
|
|
150
|
+
/**
|
|
151
|
+
* The instrument id (UUID) or symbol, echoed exactly as requested, so each result
|
|
152
|
+
* maps back to its request.
|
|
153
|
+
*/
|
|
154
|
+
instrument: OrdersAPI.InstrumentIDOrSymbol;
|
|
155
|
+
/**
|
|
156
|
+
* Why no rate is present — a `404` when the instrument is unknown or has no cached
|
|
157
|
+
* rate. Omitted when `rate` is present.
|
|
158
|
+
*/
|
|
159
|
+
error?: Shared.APIError | null;
|
|
160
|
+
/**
|
|
161
|
+
* The cached borrow rate. Present when a rate was found; omitted when `error` is
|
|
162
|
+
* present.
|
|
163
|
+
*/
|
|
164
|
+
rate?: LocateRate | null;
|
|
165
|
+
}
|
|
166
|
+
export type LocateRateResultList = Array<LocateRateResult>;
|
|
167
|
+
/**
|
|
168
|
+
* The presented status of a locate: the locate-request lifecycle plus `EXPIRED`
|
|
169
|
+
* for accepted locates whose effective date has passed.
|
|
170
|
+
*/
|
|
171
|
+
export type LocateStatus = 'REQUESTED' | 'ACCEPTED' | 'REJECTED' | 'EXPIRED';
|
|
172
|
+
export interface LocateGetLocateByIDResponse extends Shared.BaseResponse {
|
|
173
|
+
/**
|
|
174
|
+
* A locate request joined with the locate granted for it, if any.
|
|
175
|
+
*/
|
|
176
|
+
data: Locate;
|
|
177
|
+
}
|
|
178
|
+
export interface LocateGetLocateRateByIDResponse extends Shared.BaseResponse {
|
|
179
|
+
/**
|
|
180
|
+
* A locate borrow rate for an instrument.
|
|
181
|
+
*/
|
|
182
|
+
data: LocateRate;
|
|
183
|
+
}
|
|
184
|
+
export interface LocateGetLocateRatesResponse extends Shared.BaseResponse {
|
|
185
|
+
data: LocateRateResultList;
|
|
186
|
+
}
|
|
187
|
+
export interface LocateGetLocatesResponse extends Shared.BaseResponse {
|
|
188
|
+
data: LocateList;
|
|
189
|
+
}
|
|
190
|
+
export interface LocateGetLocateByIDParams {
|
|
191
|
+
/**
|
|
192
|
+
* Account identifier
|
|
193
|
+
*/
|
|
194
|
+
account_id: number;
|
|
195
|
+
}
|
|
196
|
+
export interface LocateGetLocateRatesParams {
|
|
197
|
+
/**
|
|
198
|
+
* Comma-separated instrument IDs (UUID) or symbols; at least one, at most 1,000.
|
|
199
|
+
*/
|
|
200
|
+
instrument_ids: Array<OrdersAPI.InstrumentIDOrSymbol>;
|
|
201
|
+
}
|
|
202
|
+
export interface LocateGetLocatesParams {
|
|
203
|
+
/**
|
|
204
|
+
* Effective date to list; defaults to today's New York calendar date. Explicit
|
|
205
|
+
* dates are used unchanged, including weekends and holidays.
|
|
206
|
+
*/
|
|
207
|
+
effective_date?: string;
|
|
208
|
+
/**
|
|
209
|
+
* Comma-separated instrument IDs (UUID) or symbols.
|
|
210
|
+
*/
|
|
211
|
+
instrument_ids?: Array<OrdersAPI.InstrumentIDOrSymbol>;
|
|
212
|
+
/**
|
|
213
|
+
* Comma-separated locate statuses to filter by
|
|
214
|
+
*/
|
|
215
|
+
status?: Array<'REQUESTED' | 'ACCEPTED' | 'REJECTED' | 'EXPIRED'>;
|
|
216
|
+
}
|
|
217
|
+
export declare namespace Locates {
|
|
218
|
+
export { type Locate as Locate, type LocateList as LocateList, type LocateRate as LocateRate, type LocateRateResult as LocateRateResult, type LocateRateResultList as LocateRateResultList, type LocateStatus as LocateStatus, type LocateGetLocateByIDResponse as LocateGetLocateByIDResponse, type LocateGetLocateRateByIDResponse as LocateGetLocateRateByIDResponse, type LocateGetLocateRatesResponse as LocateGetLocateRatesResponse, type LocateGetLocatesResponse as LocateGetLocatesResponse, type LocateGetLocateByIDParams as LocateGetLocateByIDParams, type LocateGetLocateRatesParams as LocateGetLocateRatesParams, type LocateGetLocatesParams as LocateGetLocatesParams, };
|
|
219
|
+
}
|
|
220
|
+
//# sourceMappingURL=locates.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"locates.d.mts","sourceRoot":"","sources":["../../src/resources/v1/locates.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAClD,OAAO,KAAK,MAAM,sBAAkB;AACpC,OAAO,KAAK,SAAS,qBAAiB;AACtC,OAAO,EAAE,UAAU,EAAE,mCAA+B;AACpD,OAAO,EAAE,cAAc,EAAE,2CAAuC;AAGhE;;GAEG;AACH,qBAAa,OAAQ,SAAQ,WAAW;IACtC;;;;;;;;;;;;;OAaG;IACH,aAAa,CACX,EAAE,EAAE,MAAM,EACV,MAAM,EAAE,yBAAyB,EACjC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,2BAA2B,CAAC;IAK1C;;;;;;;;;;;;OAYG;IACH,iBAAiB,CACf,YAAY,EAAE,SAAS,CAAC,oBAAoB,EAC5C,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,+BAA+B,CAAC;IAI9C;;;;;;;;;;;;;;;OAeG;IACH,cAAc,CACZ,KAAK,EAAE,0BAA0B,EACjC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,4BAA4B,CAAC;IAI3C;;;;;;;;;;;OAWG;IACH,UAAU,CACR,SAAS,E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B,IAAI,oBAAoB,EACjD,KAAK,YAAY,IAAI,YAAY,EACjC,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,+BAA+B,IAAI,+BAA+B,EACvE,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,sBAAsB,IAAI,sBAAsB,GACtD,CAAC;CACH"}
|
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
import { APIResource } from "../../core/resource.js";
|
|
2
|
+
import * as Shared from "../shared.js";
|
|
3
|
+
import * as OrdersAPI from "./orders.js";
|
|
4
|
+
import { APIPromise } from "../../core/api-promise.js";
|
|
5
|
+
import { RequestOptions } from "../../internal/request-options.js";
|
|
6
|
+
/**
|
|
7
|
+
* Query locate requests, granted locates, and cached locate borrow rates.
|
|
8
|
+
*/
|
|
9
|
+
export declare class Locates extends APIResource {
|
|
10
|
+
/**
|
|
11
|
+
* > **Beta** — this endpoint may change before general availability.
|
|
12
|
+
*
|
|
13
|
+
* Fetch one locate by id, matched against the locate request id, locate id, and
|
|
14
|
+
* client request id, across all days in force.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```ts
|
|
18
|
+
* const response = await client.v1.locates.getLocateByID(
|
|
19
|
+
* 'id',
|
|
20
|
+
* { account_id: 0 },
|
|
21
|
+
* );
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
getLocateByID(id: string, params: LocateGetLocateByIDParams, options?: RequestOptions): APIPromise<LocateGetLocateByIDResponse>;
|
|
25
|
+
/**
|
|
26
|
+
* > **Beta** — this endpoint may change before general availability.
|
|
27
|
+
*
|
|
28
|
+
* Fetch the cached locate borrow rate for one instrument. Rates refresh
|
|
29
|
+
* periodically; `404` means no rate is currently cached for the instrument.
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* ```ts
|
|
33
|
+
* const response = await client.v1.locates.getLocateRateByID(
|
|
34
|
+
* 'x',
|
|
35
|
+
* );
|
|
36
|
+
* ```
|
|
37
|
+
*/
|
|
38
|
+
getLocateRateByID(instrumentID: OrdersAPI.InstrumentIDOrSymbol, options?: RequestOptions): APIPromise<LocateGetLocateRateByIDResponse>;
|
|
39
|
+
/**
|
|
40
|
+
* > **Beta** — this endpoint may change before general availability.
|
|
41
|
+
*
|
|
42
|
+
* Fetch the cached locate borrow rates for up to 1,000 instruments. The response
|
|
43
|
+
* returns one row per requested instrument, in request order. Each row carries
|
|
44
|
+
* either the `rate` or an `error` — a `404` when the instrument is unknown or has
|
|
45
|
+
* no cached rate. The status is `207` when any row has an error, `200` when every
|
|
46
|
+
* instrument resolved to a rate.
|
|
47
|
+
*
|
|
48
|
+
* @example
|
|
49
|
+
* ```ts
|
|
50
|
+
* const response = await client.v1.locates.getLocateRates({
|
|
51
|
+
* instrument_ids: ['x'],
|
|
52
|
+
* });
|
|
53
|
+
* ```
|
|
54
|
+
*/
|
|
55
|
+
getLocateRates(query: LocateGetLocateRatesParams, options?: RequestOptions): APIPromise<LocateGetLocateRatesResponse>;
|
|
56
|
+
/**
|
|
57
|
+
* > **Beta** — this endpoint may change before general availability.
|
|
58
|
+
*
|
|
59
|
+
* List locates for the account on one effective date, which defaults to today's
|
|
60
|
+
* New York calendar date. Filter by comma-separated statuses and instrument ids or
|
|
61
|
+
* symbols.
|
|
62
|
+
*
|
|
63
|
+
* @example
|
|
64
|
+
* ```ts
|
|
65
|
+
* const response = await client.v1.locates.getLocates(0);
|
|
66
|
+
* ```
|
|
67
|
+
*/
|
|
68
|
+
getLocates(accountID: number, query?: LocateGetLocatesParams | null | undefined, options?: RequestOptions): APIPromise<LocateGetLocatesResponse>;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* A locate request joined with the locate granted for it, if any.
|
|
72
|
+
*/
|
|
73
|
+
export interface Locate {
|
|
74
|
+
/**
|
|
75
|
+
* Account the locate is booked to.
|
|
76
|
+
*/
|
|
77
|
+
account_id: number;
|
|
78
|
+
/**
|
|
79
|
+
* Caller-assigned id of the locate request.
|
|
80
|
+
*/
|
|
81
|
+
client_request_id: string;
|
|
82
|
+
/**
|
|
83
|
+
* New York calendar date the locate is in force for.
|
|
84
|
+
*/
|
|
85
|
+
effective_date: string;
|
|
86
|
+
/**
|
|
87
|
+
* Instrument id.
|
|
88
|
+
*/
|
|
89
|
+
instrument_id: string;
|
|
90
|
+
/**
|
|
91
|
+
* Engine-assigned locate request id.
|
|
92
|
+
*/
|
|
93
|
+
locate_request_id: string;
|
|
94
|
+
/**
|
|
95
|
+
* Number of shares requested.
|
|
96
|
+
*/
|
|
97
|
+
requested_quantity: number;
|
|
98
|
+
/**
|
|
99
|
+
* Presented status of the locate.
|
|
100
|
+
*/
|
|
101
|
+
status: LocateStatus;
|
|
102
|
+
/**
|
|
103
|
+
* Engine-assigned locate id; set once the locate is granted. When a null/undefined
|
|
104
|
+
* value is observed, it indicates it does not apply.
|
|
105
|
+
*/
|
|
106
|
+
locate_id?: string | null;
|
|
107
|
+
/**
|
|
108
|
+
* Number of shares granted; set once the locate is granted. When a null/undefined
|
|
109
|
+
* value is observed, it indicates it does not apply.
|
|
110
|
+
*/
|
|
111
|
+
quantity?: number | null;
|
|
112
|
+
/**
|
|
113
|
+
* Client order id the request relates to, if any. When a null/undefined value is
|
|
114
|
+
* observed, it indicates it does not apply.
|
|
115
|
+
*/
|
|
116
|
+
related_order_id?: string | null;
|
|
117
|
+
/**
|
|
118
|
+
* Number of granted shares reserved. When a null/undefined value is observed, it
|
|
119
|
+
* indicates it does not apply.
|
|
120
|
+
*/
|
|
121
|
+
reserved_quantity?: number | null;
|
|
122
|
+
/**
|
|
123
|
+
* Number of granted shares already used. When a null/undefined value is observed,
|
|
124
|
+
* it indicates it does not apply.
|
|
125
|
+
*/
|
|
126
|
+
used_quantity?: number | null;
|
|
127
|
+
}
|
|
128
|
+
export type LocateList = Array<Locate>;
|
|
129
|
+
/**
|
|
130
|
+
* A locate borrow rate for an instrument.
|
|
131
|
+
*/
|
|
132
|
+
export interface LocateRate {
|
|
133
|
+
/**
|
|
134
|
+
* Instrument id the rate applies to.
|
|
135
|
+
*/
|
|
136
|
+
instrument_id: string;
|
|
137
|
+
/**
|
|
138
|
+
* Borrow rate, expressed as a decimal (e.g. 0.037012 for 3.7012%).
|
|
139
|
+
*/
|
|
140
|
+
rate: string;
|
|
141
|
+
/**
|
|
142
|
+
* When the rate was requested from the locates venue.
|
|
143
|
+
*/
|
|
144
|
+
as_of?: string | null;
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* A requested instrument with either its cached borrow rate or an error.
|
|
148
|
+
*/
|
|
149
|
+
export interface LocateRateResult {
|
|
150
|
+
/**
|
|
151
|
+
* The instrument id (UUID) or symbol, echoed exactly as requested, so each result
|
|
152
|
+
* maps back to its request.
|
|
153
|
+
*/
|
|
154
|
+
instrument: OrdersAPI.InstrumentIDOrSymbol;
|
|
155
|
+
/**
|
|
156
|
+
* Why no rate is present — a `404` when the instrument is unknown or has no cached
|
|
157
|
+
* rate. Omitted when `rate` is present.
|
|
158
|
+
*/
|
|
159
|
+
error?: Shared.APIError | null;
|
|
160
|
+
/**
|
|
161
|
+
* The cached borrow rate. Present when a rate was found; omitted when `error` is
|
|
162
|
+
* present.
|
|
163
|
+
*/
|
|
164
|
+
rate?: LocateRate | null;
|
|
165
|
+
}
|
|
166
|
+
export type LocateRateResultList = Array<LocateRateResult>;
|
|
167
|
+
/**
|
|
168
|
+
* The presented status of a locate: the locate-request lifecycle plus `EXPIRED`
|
|
169
|
+
* for accepted locates whose effective date has passed.
|
|
170
|
+
*/
|
|
171
|
+
export type LocateStatus = 'REQUESTED' | 'ACCEPTED' | 'REJECTED' | 'EXPIRED';
|
|
172
|
+
export interface LocateGetLocateByIDResponse extends Shared.BaseResponse {
|
|
173
|
+
/**
|
|
174
|
+
* A locate request joined with the locate granted for it, if any.
|
|
175
|
+
*/
|
|
176
|
+
data: Locate;
|
|
177
|
+
}
|
|
178
|
+
export interface LocateGetLocateRateByIDResponse extends Shared.BaseResponse {
|
|
179
|
+
/**
|
|
180
|
+
* A locate borrow rate for an instrument.
|
|
181
|
+
*/
|
|
182
|
+
data: LocateRate;
|
|
183
|
+
}
|
|
184
|
+
export interface LocateGetLocateRatesResponse extends Shared.BaseResponse {
|
|
185
|
+
data: LocateRateResultList;
|
|
186
|
+
}
|
|
187
|
+
export interface LocateGetLocatesResponse extends Shared.BaseResponse {
|
|
188
|
+
data: LocateList;
|
|
189
|
+
}
|
|
190
|
+
export interface LocateGetLocateByIDParams {
|
|
191
|
+
/**
|
|
192
|
+
* Account identifier
|
|
193
|
+
*/
|
|
194
|
+
account_id: number;
|
|
195
|
+
}
|
|
196
|
+
export interface LocateGetLocateRatesParams {
|
|
197
|
+
/**
|
|
198
|
+
* Comma-separated instrument IDs (UUID) or symbols; at least one, at most 1,000.
|
|
199
|
+
*/
|
|
200
|
+
instrument_ids: Array<OrdersAPI.InstrumentIDOrSymbol>;
|
|
201
|
+
}
|
|
202
|
+
export interface LocateGetLocatesParams {
|
|
203
|
+
/**
|
|
204
|
+
* Effective date to list; defaults to today's New York calendar date. Explicit
|
|
205
|
+
* dates are used unchanged, including weekends and holidays.
|
|
206
|
+
*/
|
|
207
|
+
effective_date?: string;
|
|
208
|
+
/**
|
|
209
|
+
* Comma-separated instrument IDs (UUID) or symbols.
|
|
210
|
+
*/
|
|
211
|
+
instrument_ids?: Array<OrdersAPI.InstrumentIDOrSymbol>;
|
|
212
|
+
/**
|
|
213
|
+
* Comma-separated locate statuses to filter by
|
|
214
|
+
*/
|
|
215
|
+
status?: Array<'REQUESTED' | 'ACCEPTED' | 'REJECTED' | 'EXPIRED'>;
|
|
216
|
+
}
|
|
217
|
+
export declare namespace Locates {
|
|
218
|
+
export { type Locate as Locate, type LocateList as LocateList, type LocateRate as LocateRate, type LocateRateResult as LocateRateResult, type LocateRateResultList as LocateRateResultList, type LocateStatus as LocateStatus, type LocateGetLocateByIDResponse as LocateGetLocateByIDResponse, type LocateGetLocateRateByIDResponse as LocateGetLocateRateByIDResponse, type LocateGetLocateRatesResponse as LocateGetLocateRatesResponse, type LocateGetLocatesResponse as LocateGetLocatesResponse, type LocateGetLocateByIDParams as LocateGetLocateByIDParams, type LocateGetLocateRatesParams as LocateGetLocateRatesParams, type LocateGetLocatesParams as LocateGetLocatesParams, };
|
|
219
|
+
}
|
|
220
|
+
//# sourceMappingURL=locates.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"locates.d.ts","sourceRoot":"","sources":["../../src/resources/v1/locates.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,+BAA4B;AAClD,OAAO,KAAK,MAAM,qBAAkB;AACpC,OAAO,KAAK,SAAS,oBAAiB;AACtC,OAAO,EAAE,UAAU,EAAE,kCAA+B;AACpD,OAAO,EAAE,cAAc,EAAE,0CAAuC;AAGhE;;GAEG;AACH,qBAAa,OAAQ,SAAQ,WAAW;IACtC;;;;;;;;;;;;;OAaG;IACH,aAAa,CACX,EAAE,EAAE,MAAM,EACV,MAAM,EAAE,yBAAyB,EACjC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,2BAA2B,CAAC;IAK1C;;;;;;;;;;;;OAYG;IACH,iBAAiB,CACf,YAAY,EAAE,SAAS,CAAC,oBAAoB,EAC5C,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,+BAA+B,CAAC;IAI9C;;;;;;;;;;;;;;;OAeG;IACH,cAAc,CACZ,KAAK,EAAE,0BAA0B,EACjC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,4BAA4B,CAAC;IAI3C;;;;;;;;;;;OAWG;IACH,UAAU,CACR,SAAS,EAAE,MAAM,EACjB,KAAK,GAAE,sBAAsB,GAAG,IAAI,GAAG,SAAc,EACrD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,wB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AA+B,EACvE,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,sBAAsB,IAAI,sBAAsB,GACtD,CAAC;CACH"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Locates = void 0;
|
|
5
|
+
const resource_1 = require("../../core/resource.js");
|
|
6
|
+
const path_1 = require("../../internal/utils/path.js");
|
|
7
|
+
/**
|
|
8
|
+
* Query locate requests, granted locates, and cached locate borrow rates.
|
|
9
|
+
*/
|
|
10
|
+
class Locates extends resource_1.APIResource {
|
|
11
|
+
/**
|
|
12
|
+
* > **Beta** — this endpoint may change before general availability.
|
|
13
|
+
*
|
|
14
|
+
* Fetch one locate by id, matched against the locate request id, locate id, and
|
|
15
|
+
* client request id, across all days in force.
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* ```ts
|
|
19
|
+
* const response = await client.v1.locates.getLocateByID(
|
|
20
|
+
* 'id',
|
|
21
|
+
* { account_id: 0 },
|
|
22
|
+
* );
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
getLocateByID(id, params, options) {
|
|
26
|
+
const { account_id } = params;
|
|
27
|
+
return this._client.get((0, path_1.path) `/v1/accounts/${account_id}/locates/${id}`, options);
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* > **Beta** — this endpoint may change before general availability.
|
|
31
|
+
*
|
|
32
|
+
* Fetch the cached locate borrow rate for one instrument. Rates refresh
|
|
33
|
+
* periodically; `404` means no rate is currently cached for the instrument.
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* ```ts
|
|
37
|
+
* const response = await client.v1.locates.getLocateRateByID(
|
|
38
|
+
* 'x',
|
|
39
|
+
* );
|
|
40
|
+
* ```
|
|
41
|
+
*/
|
|
42
|
+
getLocateRateByID(instrumentID, options) {
|
|
43
|
+
return this._client.get((0, path_1.path) `/v1/locates/rates/${instrumentID}`, options);
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* > **Beta** — this endpoint may change before general availability.
|
|
47
|
+
*
|
|
48
|
+
* Fetch the cached locate borrow rates for up to 1,000 instruments. The response
|
|
49
|
+
* returns one row per requested instrument, in request order. Each row carries
|
|
50
|
+
* either the `rate` or an `error` — a `404` when the instrument is unknown or has
|
|
51
|
+
* no cached rate. The status is `207` when any row has an error, `200` when every
|
|
52
|
+
* instrument resolved to a rate.
|
|
53
|
+
*
|
|
54
|
+
* @example
|
|
55
|
+
* ```ts
|
|
56
|
+
* const response = await client.v1.locates.getLocateRates({
|
|
57
|
+
* instrument_ids: ['x'],
|
|
58
|
+
* });
|
|
59
|
+
* ```
|
|
60
|
+
*/
|
|
61
|
+
getLocateRates(query, options) {
|
|
62
|
+
return this._client.get('/v1/locates/rates', { query, ...options });
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* > **Beta** — this endpoint may change before general availability.
|
|
66
|
+
*
|
|
67
|
+
* List locates for the account on one effective date, which defaults to today's
|
|
68
|
+
* New York calendar date. Filter by comma-separated statuses and instrument ids or
|
|
69
|
+
* symbols.
|
|
70
|
+
*
|
|
71
|
+
* @example
|
|
72
|
+
* ```ts
|
|
73
|
+
* const response = await client.v1.locates.getLocates(0);
|
|
74
|
+
* ```
|
|
75
|
+
*/
|
|
76
|
+
getLocates(accountID, query = {}, options) {
|
|
77
|
+
return this._client.get((0, path_1.path) `/v1/accounts/${accountID}/locates`, { query, ...options });
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
exports.Locates = Locates;
|
|
81
|
+
//# sourceMappingURL=locates.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"locates.js","sourceRoot":"","sources":["../../src/resources/v1/locates.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAKlD,uDAAiD;AAEjD;;GAEG;AACH,MAAa,OAAQ,SAAQ,sBAAW;IACtC;;;;;;;;;;;;;OAaG;IACH,aAAa,CACX,EAAU,EACV,MAAiC,EACjC,OAAwB;QAExB,MAAM,EAAE,UAAU,EAAE,GAAG,MAAM,CAAC;QAC9B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,gBAAgB,UAAU,YAAY,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IACnF,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,iBAAiB,CACf,YAA4C,EAC5C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,qBAAqB,YAAY,EAAE,EAAE,OAAO,CAAC,CAAC;IAC5E,CAAC;IAED;;;;;;;;;;;;;;;OAeG;IACH,cAAc,CACZ,KAAiC,EACjC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,mBAAmB,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACtE,CAAC;IAED;;;;;;;;;;;OAWG;IACH,UAAU,CACR,SAAiB,EACjB,QAAmD,EAAE,EACrD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,gBAAgB,SAAS,UAAU,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC1F,CAAC;CACF;AAtFD,0BAsFC"}
|