@luisjpf/alpaca-sdk 0.2.9 → 0.3.2
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/README.md +9 -27
- package/dist/index.cjs +19 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +78 -153
- package/dist/index.d.ts +78 -153
- package/dist/index.js +19 -7
- package/dist/index.js.map +1 -1
- package/package.json +32 -13
package/dist/index.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ import * as openapi_fetch from 'openapi-fetch';
|
|
|
6
6
|
/** Environment for Alpaca API */
|
|
7
7
|
type AlpacaEnvironment = 'paper' | 'live';
|
|
8
8
|
/** Base configuration for all Alpaca clients */
|
|
9
|
-
interface AlpacaConfig
|
|
9
|
+
interface AlpacaConfig {
|
|
10
10
|
/** API Key ID */
|
|
11
11
|
keyId: string;
|
|
12
12
|
/** API Secret Key */
|
|
@@ -30,7 +30,7 @@ interface ResolvedAlpacaConfig {
|
|
|
30
30
|
baseUrl: string;
|
|
31
31
|
}
|
|
32
32
|
/** Request options for individual API calls */
|
|
33
|
-
interface RequestOptions
|
|
33
|
+
interface RequestOptions {
|
|
34
34
|
/** Custom timeout for this request */
|
|
35
35
|
timeout?: number;
|
|
36
36
|
/** Idempotency key for POST/PATCH requests */
|
|
@@ -286,19 +286,19 @@ declare const ALPACA_URLS: {
|
|
|
286
286
|
/**
|
|
287
287
|
* Resolve configuration with defaults
|
|
288
288
|
*/
|
|
289
|
-
declare function resolveConfig(config: AlpacaConfig
|
|
289
|
+
declare function resolveConfig(config: AlpacaConfig, apiType: 'trading' | 'broker' | 'marketData'): ResolvedAlpacaConfig;
|
|
290
290
|
/**
|
|
291
291
|
* Base fetch client with retry logic
|
|
292
292
|
*/
|
|
293
|
-
declare function fetchWithRetry<T>(url: string, init: RequestInit, config: ResolvedAlpacaConfig, options?: RequestOptions
|
|
293
|
+
declare function fetchWithRetry<T>(url: string, init: RequestInit, config: ResolvedAlpacaConfig, options?: RequestOptions): Promise<T>;
|
|
294
294
|
/**
|
|
295
295
|
* Create headers for API request
|
|
296
296
|
*/
|
|
297
|
-
declare function createHeaders(auth: AuthHeaders, options?: RequestOptions
|
|
297
|
+
declare function createHeaders(auth: AuthHeaders, options?: RequestOptions): Record<string, string>;
|
|
298
298
|
/**
|
|
299
299
|
* Create a configured fetch function for a specific API
|
|
300
300
|
*/
|
|
301
|
-
declare function createApiFetch(config: ResolvedAlpacaConfig, authType?: 'apiKey' | 'basic'): <T>(path: string, init?: RequestInit, options?: RequestOptions
|
|
301
|
+
declare function createApiFetch(config: ResolvedAlpacaConfig, authType?: 'apiKey' | 'basic'): <T>(path: string, init?: RequestInit, options?: RequestOptions) => Promise<T>;
|
|
302
302
|
|
|
303
303
|
/**
|
|
304
304
|
* Response unwrap helpers for openapi-fetch responses
|
|
@@ -356,31 +356,6 @@ declare function unwrapList<T>(result: OpenApiFetchResponse<T[] | null>): T[];
|
|
|
356
356
|
*/
|
|
357
357
|
declare function unwrapOptional<T>(result: OpenApiFetchResponse<T>): T | undefined;
|
|
358
358
|
|
|
359
|
-
/** Base configuration for all Alpaca clients */
|
|
360
|
-
interface AlpacaConfig$2 {
|
|
361
|
-
/** API Key ID */
|
|
362
|
-
keyId: string;
|
|
363
|
-
/** API Secret Key */
|
|
364
|
-
secretKey: string;
|
|
365
|
-
/** Use paper trading environment (default: true) */
|
|
366
|
-
paper?: boolean;
|
|
367
|
-
/** Request timeout in milliseconds (default: 30000) */
|
|
368
|
-
timeout?: number;
|
|
369
|
-
/** Maximum number of retries for failed requests (default: 2) */
|
|
370
|
-
maxRetries?: number;
|
|
371
|
-
/** Custom base URL override */
|
|
372
|
-
baseUrl?: string;
|
|
373
|
-
}
|
|
374
|
-
/** Request options for individual API calls */
|
|
375
|
-
interface RequestOptions$2 {
|
|
376
|
-
/** Custom timeout for this request */
|
|
377
|
-
timeout?: number;
|
|
378
|
-
/** Idempotency key for POST/PATCH requests */
|
|
379
|
-
idempotencyKey?: string;
|
|
380
|
-
/** AbortSignal for request cancellation */
|
|
381
|
-
signal?: AbortSignal;
|
|
382
|
-
}
|
|
383
|
-
|
|
384
359
|
/**
|
|
385
360
|
* This file was auto-generated by openapi-typescript.
|
|
386
361
|
* Do not make direct changes to the file.
|
|
@@ -5087,7 +5062,7 @@ type TimeInForce$1 = components$2['schemas']['TimeInForce'];
|
|
|
5087
5062
|
type OrderClass$1 = components$2['schemas']['OrderClass'];
|
|
5088
5063
|
type OrderRequest = NonNullable<operations$2['postOrder']['requestBody']>['content']['application/json'];
|
|
5089
5064
|
type PatchOrderRequest = components$2['schemas']['PatchOrderRequest'];
|
|
5090
|
-
type TradingClientConfig = AlpacaConfig
|
|
5065
|
+
type TradingClientConfig = AlpacaConfig;
|
|
5091
5066
|
/**
|
|
5092
5067
|
* Create a Trading API client
|
|
5093
5068
|
*/
|
|
@@ -5097,7 +5072,7 @@ declare function createTradingClient(config: TradingClientConfig): {
|
|
|
5097
5072
|
/** Account operations */
|
|
5098
5073
|
account: {
|
|
5099
5074
|
/** Get account information */
|
|
5100
|
-
get(options?: RequestOptions
|
|
5075
|
+
get(options?: RequestOptions): Promise<{
|
|
5101
5076
|
id: string;
|
|
5102
5077
|
account_number?: string;
|
|
5103
5078
|
status: components$2["schemas"]["AccountStatus"];
|
|
@@ -5136,7 +5111,7 @@ declare function createTradingClient(config: TradingClientConfig): {
|
|
|
5136
5111
|
pending_reg_taf_fees?: string;
|
|
5137
5112
|
}>;
|
|
5138
5113
|
/** Get account configurations */
|
|
5139
|
-
getConfigurations(options?: RequestOptions
|
|
5114
|
+
getConfigurations(options?: RequestOptions): Promise<{
|
|
5140
5115
|
dtbp_check?: "both" | "entry" | "exit";
|
|
5141
5116
|
trade_confirm_email?: string;
|
|
5142
5117
|
suspend_trade?: boolean;
|
|
@@ -5149,7 +5124,7 @@ declare function createTradingClient(config: TradingClientConfig): {
|
|
|
5149
5124
|
disable_overnight_trading?: boolean;
|
|
5150
5125
|
}>;
|
|
5151
5126
|
/** Update account configurations */
|
|
5152
|
-
updateConfigurations(updates: Partial<AccountConfigurations$1>, options?: RequestOptions
|
|
5127
|
+
updateConfigurations(updates: Partial<AccountConfigurations$1>, options?: RequestOptions): Promise<{
|
|
5153
5128
|
dtbp_check?: "both" | "entry" | "exit";
|
|
5154
5129
|
trade_confirm_email?: string;
|
|
5155
5130
|
suspend_trade?: boolean;
|
|
@@ -5162,7 +5137,7 @@ declare function createTradingClient(config: TradingClientConfig): {
|
|
|
5162
5137
|
disable_overnight_trading?: boolean;
|
|
5163
5138
|
}>;
|
|
5164
5139
|
/** Get account activities */
|
|
5165
|
-
getActivities(params?: operations$2["getAccountActivities"]["parameters"]["query"], options?: RequestOptions
|
|
5140
|
+
getActivities(params?: operations$2["getAccountActivities"]["parameters"]["query"], options?: RequestOptions): Promise<({
|
|
5166
5141
|
activity_type?: components$2["schemas"]["ActivityType"];
|
|
5167
5142
|
id?: string;
|
|
5168
5143
|
cum_qty?: string;
|
|
@@ -5190,7 +5165,7 @@ declare function createTradingClient(config: TradingClientConfig): {
|
|
|
5190
5165
|
created_at?: string;
|
|
5191
5166
|
})[]>;
|
|
5192
5167
|
/** Get portfolio history */
|
|
5193
|
-
getPortfolioHistory(params?: operations$2["getAccountPortfolioHistory"]["parameters"]["query"], options?: RequestOptions
|
|
5168
|
+
getPortfolioHistory(params?: operations$2["getAccountPortfolioHistory"]["parameters"]["query"], options?: RequestOptions): Promise<{
|
|
5194
5169
|
timestamp: number[];
|
|
5195
5170
|
equity: number[];
|
|
5196
5171
|
profit_loss: number[];
|
|
@@ -5204,7 +5179,7 @@ declare function createTradingClient(config: TradingClientConfig): {
|
|
|
5204
5179
|
/** Order operations */
|
|
5205
5180
|
orders: {
|
|
5206
5181
|
/** List all orders */
|
|
5207
|
-
list(params?: operations$2["getAllOrders"]["parameters"]["query"], options?: RequestOptions
|
|
5182
|
+
list(params?: operations$2["getAllOrders"]["parameters"]["query"], options?: RequestOptions): Promise<{
|
|
5208
5183
|
id?: string;
|
|
5209
5184
|
client_order_id?: string;
|
|
5210
5185
|
created_at?: string;
|
|
@@ -5240,7 +5215,7 @@ declare function createTradingClient(config: TradingClientConfig): {
|
|
|
5240
5215
|
position_intent?: components$2["schemas"]["PositionIntent"];
|
|
5241
5216
|
}[]>;
|
|
5242
5217
|
/** Get order by ID */
|
|
5243
|
-
get(orderId: string, options?: RequestOptions
|
|
5218
|
+
get(orderId: string, options?: RequestOptions): Promise<{
|
|
5244
5219
|
id?: string;
|
|
5245
5220
|
client_order_id?: string;
|
|
5246
5221
|
created_at?: string;
|
|
@@ -5276,7 +5251,7 @@ declare function createTradingClient(config: TradingClientConfig): {
|
|
|
5276
5251
|
position_intent?: components$2["schemas"]["PositionIntent"];
|
|
5277
5252
|
}>;
|
|
5278
5253
|
/** Get order by client order ID */
|
|
5279
|
-
getByClientOrderId(clientOrderId: string, options?: RequestOptions
|
|
5254
|
+
getByClientOrderId(clientOrderId: string, options?: RequestOptions): Promise<{
|
|
5280
5255
|
id?: string;
|
|
5281
5256
|
client_order_id?: string;
|
|
5282
5257
|
created_at?: string;
|
|
@@ -5312,7 +5287,7 @@ declare function createTradingClient(config: TradingClientConfig): {
|
|
|
5312
5287
|
position_intent?: components$2["schemas"]["PositionIntent"];
|
|
5313
5288
|
}>;
|
|
5314
5289
|
/** Create a new order */
|
|
5315
|
-
create(order: OrderRequest, options?: RequestOptions
|
|
5290
|
+
create(order: OrderRequest, options?: RequestOptions): Promise<{
|
|
5316
5291
|
id?: string;
|
|
5317
5292
|
client_order_id?: string;
|
|
5318
5293
|
created_at?: string;
|
|
@@ -5348,7 +5323,7 @@ declare function createTradingClient(config: TradingClientConfig): {
|
|
|
5348
5323
|
position_intent?: components$2["schemas"]["PositionIntent"];
|
|
5349
5324
|
}>;
|
|
5350
5325
|
/** Replace an existing order */
|
|
5351
|
-
replace(orderId: string, updates: PatchOrderRequest, options?: RequestOptions
|
|
5326
|
+
replace(orderId: string, updates: PatchOrderRequest, options?: RequestOptions): Promise<{
|
|
5352
5327
|
id?: string;
|
|
5353
5328
|
client_order_id?: string;
|
|
5354
5329
|
created_at?: string;
|
|
@@ -5384,9 +5359,9 @@ declare function createTradingClient(config: TradingClientConfig): {
|
|
|
5384
5359
|
position_intent?: components$2["schemas"]["PositionIntent"];
|
|
5385
5360
|
}>;
|
|
5386
5361
|
/** Cancel an order */
|
|
5387
|
-
cancel(orderId: string, options?: RequestOptions
|
|
5362
|
+
cancel(orderId: string, options?: RequestOptions): Promise<void>;
|
|
5388
5363
|
/** Cancel all open orders */
|
|
5389
|
-
cancelAll(options?: RequestOptions
|
|
5364
|
+
cancelAll(options?: RequestOptions): Promise<{
|
|
5390
5365
|
id?: string;
|
|
5391
5366
|
status?: number;
|
|
5392
5367
|
}[]>;
|
|
@@ -5394,7 +5369,7 @@ declare function createTradingClient(config: TradingClientConfig): {
|
|
|
5394
5369
|
/** Position operations */
|
|
5395
5370
|
positions: {
|
|
5396
5371
|
/** List all open positions */
|
|
5397
|
-
list(options?: RequestOptions
|
|
5372
|
+
list(options?: RequestOptions): Promise<{
|
|
5398
5373
|
asset_id: string;
|
|
5399
5374
|
symbol: string;
|
|
5400
5375
|
exchange: components$2["schemas"]["ExchangeForPosition"];
|
|
@@ -5415,7 +5390,7 @@ declare function createTradingClient(config: TradingClientConfig): {
|
|
|
5415
5390
|
asset_marginable: boolean;
|
|
5416
5391
|
}[]>;
|
|
5417
5392
|
/** Get position by symbol or asset ID */
|
|
5418
|
-
get(symbolOrAssetId: string, options?: RequestOptions
|
|
5393
|
+
get(symbolOrAssetId: string, options?: RequestOptions): Promise<{
|
|
5419
5394
|
asset_id: string;
|
|
5420
5395
|
symbol: string;
|
|
5421
5396
|
exchange: components$2["schemas"]["ExchangeForPosition"];
|
|
@@ -5436,7 +5411,7 @@ declare function createTradingClient(config: TradingClientConfig): {
|
|
|
5436
5411
|
asset_marginable: boolean;
|
|
5437
5412
|
}>;
|
|
5438
5413
|
/** Close a position */
|
|
5439
|
-
close(symbolOrAssetId: string, params?: operations$2["deleteOpenPosition"]["parameters"]["query"], options?: RequestOptions
|
|
5414
|
+
close(symbolOrAssetId: string, params?: operations$2["deleteOpenPosition"]["parameters"]["query"], options?: RequestOptions): Promise<{
|
|
5440
5415
|
id?: string;
|
|
5441
5416
|
client_order_id?: string;
|
|
5442
5417
|
created_at?: string;
|
|
@@ -5472,7 +5447,7 @@ declare function createTradingClient(config: TradingClientConfig): {
|
|
|
5472
5447
|
position_intent?: components$2["schemas"]["PositionIntent"];
|
|
5473
5448
|
}>;
|
|
5474
5449
|
/** Close all positions */
|
|
5475
|
-
closeAll(params?: operations$2["deleteAllOpenPositions"]["parameters"]["query"], options?: RequestOptions
|
|
5450
|
+
closeAll(params?: operations$2["deleteAllOpenPositions"]["parameters"]["query"], options?: RequestOptions): Promise<{
|
|
5476
5451
|
symbol: string;
|
|
5477
5452
|
status: string;
|
|
5478
5453
|
body?: components$2["schemas"]["Order"];
|
|
@@ -5481,7 +5456,7 @@ declare function createTradingClient(config: TradingClientConfig): {
|
|
|
5481
5456
|
/** Asset operations */
|
|
5482
5457
|
assets: {
|
|
5483
5458
|
/** List all assets */
|
|
5484
|
-
list(params?: operations$2["get-v2-assets"]["parameters"]["query"], options?: RequestOptions
|
|
5459
|
+
list(params?: operations$2["get-v2-assets"]["parameters"]["query"], options?: RequestOptions): Promise<{
|
|
5485
5460
|
id: string;
|
|
5486
5461
|
class: components$2["schemas"]["AssetClass"];
|
|
5487
5462
|
cusip?: string | null;
|
|
@@ -5500,7 +5475,7 @@ declare function createTradingClient(config: TradingClientConfig): {
|
|
|
5500
5475
|
attributes?: ("ptp_no_exception" | "ptp_with_exception" | "ipo" | "has_options" | "options_late_close")[];
|
|
5501
5476
|
}[]>;
|
|
5502
5477
|
/** Get asset by symbol or ID */
|
|
5503
|
-
get(symbolOrAssetId: string, options?: RequestOptions
|
|
5478
|
+
get(symbolOrAssetId: string, options?: RequestOptions): Promise<{
|
|
5504
5479
|
id: string;
|
|
5505
5480
|
class: components$2["schemas"]["AssetClass"];
|
|
5506
5481
|
cusip?: string | null;
|
|
@@ -5522,7 +5497,7 @@ declare function createTradingClient(config: TradingClientConfig): {
|
|
|
5522
5497
|
/** Clock operations */
|
|
5523
5498
|
clock: {
|
|
5524
5499
|
/** Get market clock */
|
|
5525
|
-
get(options?: RequestOptions
|
|
5500
|
+
get(options?: RequestOptions): Promise<{
|
|
5526
5501
|
timestamp?: string;
|
|
5527
5502
|
is_open?: boolean;
|
|
5528
5503
|
next_open?: string;
|
|
@@ -5532,7 +5507,7 @@ declare function createTradingClient(config: TradingClientConfig): {
|
|
|
5532
5507
|
/** Calendar operations */
|
|
5533
5508
|
calendar: {
|
|
5534
5509
|
/** Get market calendar */
|
|
5535
|
-
get(params?: operations$2["getCalendar"]["parameters"]["query"], options?: RequestOptions
|
|
5510
|
+
get(params?: operations$2["getCalendar"]["parameters"]["query"], options?: RequestOptions): Promise<{
|
|
5536
5511
|
date: string;
|
|
5537
5512
|
open: string;
|
|
5538
5513
|
close: string;
|
|
@@ -5542,7 +5517,7 @@ declare function createTradingClient(config: TradingClientConfig): {
|
|
|
5542
5517
|
/** Watchlist operations */
|
|
5543
5518
|
watchlists: {
|
|
5544
5519
|
/** List all watchlists */
|
|
5545
|
-
list(options?: RequestOptions
|
|
5520
|
+
list(options?: RequestOptions): Promise<{
|
|
5546
5521
|
id: string;
|
|
5547
5522
|
account_id: string;
|
|
5548
5523
|
created_at: string;
|
|
@@ -5550,7 +5525,7 @@ declare function createTradingClient(config: TradingClientConfig): {
|
|
|
5550
5525
|
name: string;
|
|
5551
5526
|
}[]>;
|
|
5552
5527
|
/** Get watchlist by ID */
|
|
5553
|
-
get(watchlistId: string, options?: RequestOptions
|
|
5528
|
+
get(watchlistId: string, options?: RequestOptions): Promise<{
|
|
5554
5529
|
id: string;
|
|
5555
5530
|
account_id: string;
|
|
5556
5531
|
created_at: string;
|
|
@@ -5562,7 +5537,7 @@ declare function createTradingClient(config: TradingClientConfig): {
|
|
|
5562
5537
|
create(params: {
|
|
5563
5538
|
name: string;
|
|
5564
5539
|
symbols?: string[];
|
|
5565
|
-
}, options?: RequestOptions
|
|
5540
|
+
}, options?: RequestOptions): Promise<{
|
|
5566
5541
|
id: string;
|
|
5567
5542
|
account_id: string;
|
|
5568
5543
|
created_at: string;
|
|
@@ -5574,7 +5549,7 @@ declare function createTradingClient(config: TradingClientConfig): {
|
|
|
5574
5549
|
update(watchlistId: string, params: {
|
|
5575
5550
|
name: string;
|
|
5576
5551
|
symbols?: string[];
|
|
5577
|
-
}, options?: RequestOptions
|
|
5552
|
+
}, options?: RequestOptions): Promise<{
|
|
5578
5553
|
id: string;
|
|
5579
5554
|
account_id: string;
|
|
5580
5555
|
created_at: string;
|
|
@@ -5583,7 +5558,7 @@ declare function createTradingClient(config: TradingClientConfig): {
|
|
|
5583
5558
|
assets?: components$2["schemas"]["Assets"][];
|
|
5584
5559
|
}>;
|
|
5585
5560
|
/** Add symbol to watchlist */
|
|
5586
|
-
addSymbol(watchlistId: string, symbol: string, options?: RequestOptions
|
|
5561
|
+
addSymbol(watchlistId: string, symbol: string, options?: RequestOptions): Promise<{
|
|
5587
5562
|
id: string;
|
|
5588
5563
|
account_id: string;
|
|
5589
5564
|
created_at: string;
|
|
@@ -5592,7 +5567,7 @@ declare function createTradingClient(config: TradingClientConfig): {
|
|
|
5592
5567
|
assets?: components$2["schemas"]["Assets"][];
|
|
5593
5568
|
}>;
|
|
5594
5569
|
/** Remove symbol from watchlist */
|
|
5595
|
-
removeSymbol(watchlistId: string, symbol: string, options?: RequestOptions
|
|
5570
|
+
removeSymbol(watchlistId: string, symbol: string, options?: RequestOptions): Promise<{
|
|
5596
5571
|
id: string;
|
|
5597
5572
|
account_id: string;
|
|
5598
5573
|
created_at: string;
|
|
@@ -5601,37 +5576,12 @@ declare function createTradingClient(config: TradingClientConfig): {
|
|
|
5601
5576
|
assets?: components$2["schemas"]["Assets"][];
|
|
5602
5577
|
}>;
|
|
5603
5578
|
/** Delete a watchlist */
|
|
5604
|
-
delete(watchlistId: string, options?: RequestOptions
|
|
5579
|
+
delete(watchlistId: string, options?: RequestOptions): Promise<void>;
|
|
5605
5580
|
};
|
|
5606
5581
|
};
|
|
5607
5582
|
/** Type inference helper for the trading client */
|
|
5608
5583
|
type TradingClient = ReturnType<typeof createTradingClient>;
|
|
5609
5584
|
|
|
5610
|
-
/** Base configuration for all Alpaca clients */
|
|
5611
|
-
interface AlpacaConfig$1 {
|
|
5612
|
-
/** API Key ID */
|
|
5613
|
-
keyId: string;
|
|
5614
|
-
/** API Secret Key */
|
|
5615
|
-
secretKey: string;
|
|
5616
|
-
/** Use paper trading environment (default: true) */
|
|
5617
|
-
paper?: boolean;
|
|
5618
|
-
/** Request timeout in milliseconds (default: 30000) */
|
|
5619
|
-
timeout?: number;
|
|
5620
|
-
/** Maximum number of retries for failed requests (default: 2) */
|
|
5621
|
-
maxRetries?: number;
|
|
5622
|
-
/** Custom base URL override */
|
|
5623
|
-
baseUrl?: string;
|
|
5624
|
-
}
|
|
5625
|
-
/** Request options for individual API calls */
|
|
5626
|
-
interface RequestOptions$1 {
|
|
5627
|
-
/** Custom timeout for this request */
|
|
5628
|
-
timeout?: number;
|
|
5629
|
-
/** Idempotency key for POST/PATCH requests */
|
|
5630
|
-
idempotencyKey?: string;
|
|
5631
|
-
/** AbortSignal for request cancellation */
|
|
5632
|
-
signal?: AbortSignal;
|
|
5633
|
-
}
|
|
5634
|
-
|
|
5635
5585
|
/**
|
|
5636
5586
|
* This file was auto-generated by openapi-typescript.
|
|
5637
5587
|
* Do not make direct changes to the file.
|
|
@@ -10734,7 +10684,7 @@ type NewsImage = components$1['schemas']['news_image'];
|
|
|
10734
10684
|
type MostActive = components$1['schemas']['most_active'];
|
|
10735
10685
|
type Mover = components$1['schemas']['mover'];
|
|
10736
10686
|
type CorporateActions = components$1['schemas']['corporate_actions'];
|
|
10737
|
-
type MarketDataClientConfig = AlpacaConfig
|
|
10687
|
+
type MarketDataClientConfig = AlpacaConfig;
|
|
10738
10688
|
/**
|
|
10739
10689
|
* Create a Market Data API client
|
|
10740
10690
|
*/
|
|
@@ -10744,7 +10694,7 @@ declare function createMarketDataClient(config: MarketDataClientConfig): {
|
|
|
10744
10694
|
/** Stock market data operations */
|
|
10745
10695
|
stocks: {
|
|
10746
10696
|
/** Get historical bars for multiple symbols */
|
|
10747
|
-
getBars(params: operations$1["StockBars"]["parameters"]["query"], options?: RequestOptions
|
|
10697
|
+
getBars(params: operations$1["StockBars"]["parameters"]["query"], options?: RequestOptions): Promise<{
|
|
10748
10698
|
bars: {
|
|
10749
10699
|
[key: string]: components$1["schemas"]["stock_bar"][];
|
|
10750
10700
|
};
|
|
@@ -10752,27 +10702,27 @@ declare function createMarketDataClient(config: MarketDataClientConfig): {
|
|
|
10752
10702
|
currency?: string;
|
|
10753
10703
|
}>;
|
|
10754
10704
|
/** Get historical bars for a single symbol */
|
|
10755
|
-
getSymbolBars(symbol: string, params: NonNullable<operations$1["StockBarSingle"]["parameters"]["query"]>, options?: RequestOptions
|
|
10705
|
+
getSymbolBars(symbol: string, params: NonNullable<operations$1["StockBarSingle"]["parameters"]["query"]>, options?: RequestOptions): Promise<{
|
|
10756
10706
|
symbol: string;
|
|
10757
10707
|
bars: components$1["schemas"]["stock_bar"][];
|
|
10758
10708
|
currency?: string;
|
|
10759
10709
|
next_page_token: components$1["schemas"]["next_page_token"];
|
|
10760
10710
|
}>;
|
|
10761
10711
|
/** Get latest bars for multiple symbols */
|
|
10762
|
-
getLatestBars(params: operations$1["StockLatestBars"]["parameters"]["query"], options?: RequestOptions
|
|
10712
|
+
getLatestBars(params: operations$1["StockLatestBars"]["parameters"]["query"], options?: RequestOptions): Promise<{
|
|
10763
10713
|
bars: {
|
|
10764
10714
|
[key: string]: components$1["schemas"]["stock_bar"];
|
|
10765
10715
|
};
|
|
10766
10716
|
currency?: string;
|
|
10767
10717
|
}>;
|
|
10768
10718
|
/** Get latest bar for a single symbol */
|
|
10769
|
-
getLatestBar(symbol: string, params?: Omit<NonNullable<operations$1["StockLatestBarSingle"]["parameters"]["query"]>, "symbol">, options?: RequestOptions
|
|
10719
|
+
getLatestBar(symbol: string, params?: Omit<NonNullable<operations$1["StockLatestBarSingle"]["parameters"]["query"]>, "symbol">, options?: RequestOptions): Promise<{
|
|
10770
10720
|
bar: components$1["schemas"]["stock_bar"];
|
|
10771
10721
|
symbol: string;
|
|
10772
10722
|
currency?: string;
|
|
10773
10723
|
}>;
|
|
10774
10724
|
/** Get historical trades for multiple symbols */
|
|
10775
|
-
getTrades(params: operations$1["StockTrades"]["parameters"]["query"], options?: RequestOptions
|
|
10725
|
+
getTrades(params: operations$1["StockTrades"]["parameters"]["query"], options?: RequestOptions): Promise<{
|
|
10776
10726
|
trades: {
|
|
10777
10727
|
[key: string]: components$1["schemas"]["stock_trade"][];
|
|
10778
10728
|
};
|
|
@@ -10780,27 +10730,27 @@ declare function createMarketDataClient(config: MarketDataClientConfig): {
|
|
|
10780
10730
|
next_page_token: components$1["schemas"]["next_page_token"];
|
|
10781
10731
|
}>;
|
|
10782
10732
|
/** Get historical trades for a single symbol */
|
|
10783
|
-
getSymbolTrades(symbol: string, params?: Omit<NonNullable<operations$1["StockTradeSingle"]["parameters"]["query"]>, "symbol">, options?: RequestOptions
|
|
10733
|
+
getSymbolTrades(symbol: string, params?: Omit<NonNullable<operations$1["StockTradeSingle"]["parameters"]["query"]>, "symbol">, options?: RequestOptions): Promise<{
|
|
10784
10734
|
symbol: string;
|
|
10785
10735
|
trades: components$1["schemas"]["stock_trade"][];
|
|
10786
10736
|
next_page_token: components$1["schemas"]["next_page_token"];
|
|
10787
10737
|
currency?: string;
|
|
10788
10738
|
}>;
|
|
10789
10739
|
/** Get latest trades for multiple symbols */
|
|
10790
|
-
getLatestTrades(params: operations$1["StockLatestTrades"]["parameters"]["query"], options?: RequestOptions
|
|
10740
|
+
getLatestTrades(params: operations$1["StockLatestTrades"]["parameters"]["query"], options?: RequestOptions): Promise<{
|
|
10791
10741
|
trades: {
|
|
10792
10742
|
[key: string]: components$1["schemas"]["stock_trade"];
|
|
10793
10743
|
};
|
|
10794
10744
|
currency?: string;
|
|
10795
10745
|
}>;
|
|
10796
10746
|
/** Get latest trade for a single symbol */
|
|
10797
|
-
getLatestTrade(symbol: string, params?: Omit<NonNullable<operations$1["StockLatestTradeSingle"]["parameters"]["query"]>, "symbol">, options?: RequestOptions
|
|
10747
|
+
getLatestTrade(symbol: string, params?: Omit<NonNullable<operations$1["StockLatestTradeSingle"]["parameters"]["query"]>, "symbol">, options?: RequestOptions): Promise<{
|
|
10798
10748
|
trade: components$1["schemas"]["stock_trade"];
|
|
10799
10749
|
symbol: string;
|
|
10800
10750
|
currency?: string;
|
|
10801
10751
|
}>;
|
|
10802
10752
|
/** Get historical quotes for multiple symbols */
|
|
10803
|
-
getQuotes(params: operations$1["StockQuotes"]["parameters"]["query"], options?: RequestOptions
|
|
10753
|
+
getQuotes(params: operations$1["StockQuotes"]["parameters"]["query"], options?: RequestOptions): Promise<{
|
|
10804
10754
|
quotes: {
|
|
10805
10755
|
[key: string]: components$1["schemas"]["stock_quote"][];
|
|
10806
10756
|
};
|
|
@@ -10808,27 +10758,27 @@ declare function createMarketDataClient(config: MarketDataClientConfig): {
|
|
|
10808
10758
|
next_page_token: components$1["schemas"]["next_page_token"];
|
|
10809
10759
|
}>;
|
|
10810
10760
|
/** Get historical quotes for a single symbol */
|
|
10811
|
-
getSymbolQuotes(symbol: string, params?: Omit<NonNullable<operations$1["StockQuoteSingle"]["parameters"]["query"]>, "symbol">, options?: RequestOptions
|
|
10761
|
+
getSymbolQuotes(symbol: string, params?: Omit<NonNullable<operations$1["StockQuoteSingle"]["parameters"]["query"]>, "symbol">, options?: RequestOptions): Promise<{
|
|
10812
10762
|
symbol: string;
|
|
10813
10763
|
quotes: components$1["schemas"]["stock_quote"][];
|
|
10814
10764
|
currency?: string;
|
|
10815
10765
|
next_page_token: components$1["schemas"]["next_page_token"];
|
|
10816
10766
|
}>;
|
|
10817
10767
|
/** Get latest quotes for multiple symbols */
|
|
10818
|
-
getLatestQuotes(params: operations$1["StockLatestQuotes"]["parameters"]["query"], options?: RequestOptions
|
|
10768
|
+
getLatestQuotes(params: operations$1["StockLatestQuotes"]["parameters"]["query"], options?: RequestOptions): Promise<{
|
|
10819
10769
|
quotes: {
|
|
10820
10770
|
[key: string]: components$1["schemas"]["stock_quote"];
|
|
10821
10771
|
};
|
|
10822
10772
|
currency?: string;
|
|
10823
10773
|
}>;
|
|
10824
10774
|
/** Get latest quote for a single symbol */
|
|
10825
|
-
getLatestQuote(symbol: string, params?: Omit<NonNullable<operations$1["StockLatestQuoteSingle"]["parameters"]["query"]>, "symbol">, options?: RequestOptions
|
|
10775
|
+
getLatestQuote(symbol: string, params?: Omit<NonNullable<operations$1["StockLatestQuoteSingle"]["parameters"]["query"]>, "symbol">, options?: RequestOptions): Promise<{
|
|
10826
10776
|
quote: components$1["schemas"]["stock_quote"];
|
|
10827
10777
|
symbol: string;
|
|
10828
10778
|
currency?: string;
|
|
10829
10779
|
}>;
|
|
10830
10780
|
/** Get snapshots for multiple symbols */
|
|
10831
|
-
getSnapshots(params: operations$1["StockSnapshots"]["parameters"]["query"], options?: RequestOptions
|
|
10781
|
+
getSnapshots(params: operations$1["StockSnapshots"]["parameters"]["query"], options?: RequestOptions): Promise<{
|
|
10832
10782
|
[key: string]: {
|
|
10833
10783
|
dailyBar?: components$1["schemas"]["stock_bar"];
|
|
10834
10784
|
latestQuote?: components$1["schemas"]["stock_quote"];
|
|
@@ -10838,7 +10788,7 @@ declare function createMarketDataClient(config: MarketDataClientConfig): {
|
|
|
10838
10788
|
};
|
|
10839
10789
|
}>;
|
|
10840
10790
|
/** Get snapshot for a single symbol */
|
|
10841
|
-
getSnapshot(symbol: string, params?: operations$1["StockSnapshotSingle"]["parameters"]["query"], options?: RequestOptions
|
|
10791
|
+
getSnapshot(symbol: string, params?: operations$1["StockSnapshotSingle"]["parameters"]["query"], options?: RequestOptions): Promise<{
|
|
10842
10792
|
symbol?: string;
|
|
10843
10793
|
currency?: string;
|
|
10844
10794
|
} & {
|
|
@@ -10849,7 +10799,7 @@ declare function createMarketDataClient(config: MarketDataClientConfig): {
|
|
|
10849
10799
|
prevDailyBar?: components$1["schemas"]["stock_bar"];
|
|
10850
10800
|
}>;
|
|
10851
10801
|
/** Get auctions for multiple symbols */
|
|
10852
|
-
getAuctions(params: operations$1["StockAuctions"]["parameters"]["query"], options?: RequestOptions
|
|
10802
|
+
getAuctions(params: operations$1["StockAuctions"]["parameters"]["query"], options?: RequestOptions): Promise<{
|
|
10853
10803
|
auctions: {
|
|
10854
10804
|
[key: string]: components$1["schemas"]["stock_daily_auctions"][];
|
|
10855
10805
|
};
|
|
@@ -10857,70 +10807,70 @@ declare function createMarketDataClient(config: MarketDataClientConfig): {
|
|
|
10857
10807
|
next_page_token: components$1["schemas"]["next_page_token"];
|
|
10858
10808
|
}>;
|
|
10859
10809
|
/** Get auctions for a single symbol */
|
|
10860
|
-
getSymbolAuctions(symbol: string, params?: Omit<NonNullable<operations$1["StockAuctionSingle"]["parameters"]["query"]>, "symbol">, options?: RequestOptions
|
|
10810
|
+
getSymbolAuctions(symbol: string, params?: Omit<NonNullable<operations$1["StockAuctionSingle"]["parameters"]["query"]>, "symbol">, options?: RequestOptions): Promise<{
|
|
10861
10811
|
symbol: string;
|
|
10862
10812
|
auctions: components$1["schemas"]["stock_daily_auctions"][];
|
|
10863
10813
|
currency?: string;
|
|
10864
10814
|
next_page_token: components$1["schemas"]["next_page_token"];
|
|
10865
10815
|
}>;
|
|
10866
10816
|
/** Get exchange code mappings */
|
|
10867
|
-
getExchanges(options?: RequestOptions
|
|
10817
|
+
getExchanges(options?: RequestOptions): Promise<{
|
|
10868
10818
|
[key: string]: string;
|
|
10869
10819
|
}>;
|
|
10870
10820
|
/** Get condition code mappings */
|
|
10871
|
-
getConditions(ticktype: "trade" | "quote", params: NonNullable<operations$1["StockMetaConditions"]["parameters"]["query"]>, options?: RequestOptions
|
|
10821
|
+
getConditions(ticktype: "trade" | "quote", params: NonNullable<operations$1["StockMetaConditions"]["parameters"]["query"]>, options?: RequestOptions): Promise<{
|
|
10872
10822
|
[key: string]: string;
|
|
10873
10823
|
}>;
|
|
10874
10824
|
};
|
|
10875
10825
|
/** Crypto market data operations */
|
|
10876
10826
|
crypto: {
|
|
10877
10827
|
/** Get historical bars */
|
|
10878
|
-
getBars(loc: "us" | "us-1" | "eu-1", params: operations$1["CryptoBars"]["parameters"]["query"], options?: RequestOptions
|
|
10828
|
+
getBars(loc: "us" | "us-1" | "eu-1", params: operations$1["CryptoBars"]["parameters"]["query"], options?: RequestOptions): Promise<{
|
|
10879
10829
|
bars: {
|
|
10880
10830
|
[key: string]: components$1["schemas"]["crypto_bar"][];
|
|
10881
10831
|
};
|
|
10882
10832
|
next_page_token: components$1["schemas"]["next_page_token"];
|
|
10883
10833
|
}>;
|
|
10884
10834
|
/** Get latest bars */
|
|
10885
|
-
getLatestBars(loc: "us" | "us-1" | "eu-1", params: operations$1["CryptoLatestBars"]["parameters"]["query"], options?: RequestOptions
|
|
10835
|
+
getLatestBars(loc: "us" | "us-1" | "eu-1", params: operations$1["CryptoLatestBars"]["parameters"]["query"], options?: RequestOptions): Promise<{
|
|
10886
10836
|
bars: {
|
|
10887
10837
|
[key: string]: components$1["schemas"]["crypto_bar"];
|
|
10888
10838
|
};
|
|
10889
10839
|
}>;
|
|
10890
10840
|
/** Get historical trades */
|
|
10891
|
-
getTrades(loc: "us" | "us-1" | "eu-1", params: operations$1["CryptoTrades"]["parameters"]["query"], options?: RequestOptions
|
|
10841
|
+
getTrades(loc: "us" | "us-1" | "eu-1", params: operations$1["CryptoTrades"]["parameters"]["query"], options?: RequestOptions): Promise<{
|
|
10892
10842
|
trades: {
|
|
10893
10843
|
[key: string]: components$1["schemas"]["crypto_trade"][];
|
|
10894
10844
|
};
|
|
10895
10845
|
next_page_token: components$1["schemas"]["next_page_token"];
|
|
10896
10846
|
}>;
|
|
10897
10847
|
/** Get latest trades */
|
|
10898
|
-
getLatestTrades(loc: "us" | "us-1" | "eu-1", params: operations$1["CryptoLatestTrades"]["parameters"]["query"], options?: RequestOptions
|
|
10848
|
+
getLatestTrades(loc: "us" | "us-1" | "eu-1", params: operations$1["CryptoLatestTrades"]["parameters"]["query"], options?: RequestOptions): Promise<{
|
|
10899
10849
|
trades: {
|
|
10900
10850
|
[key: string]: components$1["schemas"]["crypto_trade"];
|
|
10901
10851
|
};
|
|
10902
10852
|
}>;
|
|
10903
10853
|
/** Get historical quotes */
|
|
10904
|
-
getQuotes(loc: "us" | "us-1" | "eu-1", params: operations$1["CryptoQuotes"]["parameters"]["query"], options?: RequestOptions
|
|
10854
|
+
getQuotes(loc: "us" | "us-1" | "eu-1", params: operations$1["CryptoQuotes"]["parameters"]["query"], options?: RequestOptions): Promise<{
|
|
10905
10855
|
quotes: {
|
|
10906
10856
|
[key: string]: components$1["schemas"]["crypto_quote"][];
|
|
10907
10857
|
};
|
|
10908
10858
|
next_page_token: components$1["schemas"]["next_page_token"];
|
|
10909
10859
|
}>;
|
|
10910
10860
|
/** Get latest quotes */
|
|
10911
|
-
getLatestQuotes(loc: "us" | "us-1" | "eu-1", params: operations$1["CryptoLatestQuotes"]["parameters"]["query"], options?: RequestOptions
|
|
10861
|
+
getLatestQuotes(loc: "us" | "us-1" | "eu-1", params: operations$1["CryptoLatestQuotes"]["parameters"]["query"], options?: RequestOptions): Promise<{
|
|
10912
10862
|
quotes: {
|
|
10913
10863
|
[key: string]: components$1["schemas"]["crypto_quote"];
|
|
10914
10864
|
};
|
|
10915
10865
|
}>;
|
|
10916
10866
|
/** Get snapshots */
|
|
10917
|
-
getSnapshots(loc: "us" | "us-1" | "eu-1", params: operations$1["CryptoSnapshots"]["parameters"]["query"], options?: RequestOptions
|
|
10867
|
+
getSnapshots(loc: "us" | "us-1" | "eu-1", params: operations$1["CryptoSnapshots"]["parameters"]["query"], options?: RequestOptions): Promise<{
|
|
10918
10868
|
snapshots: {
|
|
10919
10869
|
[key: string]: components$1["schemas"]["crypto_snapshot"];
|
|
10920
10870
|
};
|
|
10921
10871
|
}>;
|
|
10922
10872
|
/** Get latest orderbooks */
|
|
10923
|
-
getLatestOrderbooks(loc: "us" | "us-1" | "eu-1", params: operations$1["CryptoLatestOrderbooks"]["parameters"]["query"], options?: RequestOptions
|
|
10873
|
+
getLatestOrderbooks(loc: "us" | "us-1" | "eu-1", params: operations$1["CryptoLatestOrderbooks"]["parameters"]["query"], options?: RequestOptions): Promise<{
|
|
10924
10874
|
orderbooks: {
|
|
10925
10875
|
[key: string]: components$1["schemas"]["crypto_orderbook"];
|
|
10926
10876
|
};
|
|
@@ -10929,7 +10879,7 @@ declare function createMarketDataClient(config: MarketDataClientConfig): {
|
|
|
10929
10879
|
/** Options market data operations */
|
|
10930
10880
|
options: {
|
|
10931
10881
|
/** Get historical bars */
|
|
10932
|
-
getBars(params: operations$1["optionBars"]["parameters"]["query"], options?: RequestOptions
|
|
10882
|
+
getBars(params: operations$1["optionBars"]["parameters"]["query"], options?: RequestOptions): Promise<{
|
|
10933
10883
|
bars: {
|
|
10934
10884
|
[key: string]: components$1["schemas"]["option_bar"][];
|
|
10935
10885
|
};
|
|
@@ -10937,7 +10887,7 @@ declare function createMarketDataClient(config: MarketDataClientConfig): {
|
|
|
10937
10887
|
currency?: string;
|
|
10938
10888
|
}>;
|
|
10939
10889
|
/** Get historical trades */
|
|
10940
|
-
getTrades(params: operations$1["OptionTrades"]["parameters"]["query"], options?: RequestOptions
|
|
10890
|
+
getTrades(params: operations$1["OptionTrades"]["parameters"]["query"], options?: RequestOptions): Promise<{
|
|
10941
10891
|
trades: {
|
|
10942
10892
|
[key: string]: components$1["schemas"]["option_trade"][];
|
|
10943
10893
|
};
|
|
@@ -10945,44 +10895,44 @@ declare function createMarketDataClient(config: MarketDataClientConfig): {
|
|
|
10945
10895
|
next_page_token: components$1["schemas"]["next_page_token"];
|
|
10946
10896
|
}>;
|
|
10947
10897
|
/** Get latest trades */
|
|
10948
|
-
getLatestTrades(params: operations$1["OptionLatestTrades"]["parameters"]["query"], options?: RequestOptions
|
|
10898
|
+
getLatestTrades(params: operations$1["OptionLatestTrades"]["parameters"]["query"], options?: RequestOptions): Promise<{
|
|
10949
10899
|
trades: {
|
|
10950
10900
|
[key: string]: components$1["schemas"]["option_trade"];
|
|
10951
10901
|
};
|
|
10952
10902
|
}>;
|
|
10953
10903
|
/** Get latest quotes */
|
|
10954
|
-
getLatestQuotes(params: operations$1["OptionLatestQuotes"]["parameters"]["query"], options?: RequestOptions
|
|
10904
|
+
getLatestQuotes(params: operations$1["OptionLatestQuotes"]["parameters"]["query"], options?: RequestOptions): Promise<{
|
|
10955
10905
|
quotes: {
|
|
10956
10906
|
[key: string]: components$1["schemas"]["option_quote"];
|
|
10957
10907
|
};
|
|
10958
10908
|
}>;
|
|
10959
10909
|
/** Get snapshots for multiple symbols */
|
|
10960
|
-
getSnapshots(params: operations$1["OptionSnapshots"]["parameters"]["query"], options?: RequestOptions
|
|
10910
|
+
getSnapshots(params: operations$1["OptionSnapshots"]["parameters"]["query"], options?: RequestOptions): Promise<{
|
|
10961
10911
|
snapshots: {
|
|
10962
10912
|
[key: string]: components$1["schemas"]["option_snapshot"];
|
|
10963
10913
|
};
|
|
10964
10914
|
next_page_token: components$1["schemas"]["next_page_token"];
|
|
10965
10915
|
}>;
|
|
10966
10916
|
/** Get option chain for underlying symbol */
|
|
10967
|
-
getChain(underlyingSymbol: string, params?: operations$1["OptionChain"]["parameters"]["query"], options?: RequestOptions
|
|
10917
|
+
getChain(underlyingSymbol: string, params?: operations$1["OptionChain"]["parameters"]["query"], options?: RequestOptions): Promise<{
|
|
10968
10918
|
snapshots: {
|
|
10969
10919
|
[key: string]: components$1["schemas"]["option_snapshot"];
|
|
10970
10920
|
};
|
|
10971
10921
|
next_page_token: components$1["schemas"]["next_page_token"];
|
|
10972
10922
|
}>;
|
|
10973
10923
|
/** Get exchange code mappings */
|
|
10974
|
-
getExchanges(options?: RequestOptions
|
|
10924
|
+
getExchanges(options?: RequestOptions): Promise<{
|
|
10975
10925
|
[key: string]: string;
|
|
10976
10926
|
}>;
|
|
10977
10927
|
/** Get condition code mappings */
|
|
10978
|
-
getConditions(ticktype: "trade" | "quote", options?: RequestOptions
|
|
10928
|
+
getConditions(ticktype: "trade" | "quote", options?: RequestOptions): Promise<{
|
|
10979
10929
|
[key: string]: string;
|
|
10980
10930
|
}>;
|
|
10981
10931
|
};
|
|
10982
10932
|
/** News operations */
|
|
10983
10933
|
news: {
|
|
10984
10934
|
/** Get news articles */
|
|
10985
|
-
get(params?: operations$1["News"]["parameters"]["query"], options?: RequestOptions
|
|
10935
|
+
get(params?: operations$1["News"]["parameters"]["query"], options?: RequestOptions): Promise<{
|
|
10986
10936
|
news: components$1["schemas"]["news"][];
|
|
10987
10937
|
next_page_token: components$1["schemas"]["next_page_token"];
|
|
10988
10938
|
}>;
|
|
@@ -10990,12 +10940,12 @@ declare function createMarketDataClient(config: MarketDataClientConfig): {
|
|
|
10990
10940
|
/** Screener operations */
|
|
10991
10941
|
screener: {
|
|
10992
10942
|
/** Get most active stocks */
|
|
10993
|
-
getMostActives(params?: operations$1["MostActives"]["parameters"]["query"], options?: RequestOptions
|
|
10943
|
+
getMostActives(params?: operations$1["MostActives"]["parameters"]["query"], options?: RequestOptions): Promise<{
|
|
10994
10944
|
most_actives: components$1["schemas"]["most_active"][];
|
|
10995
10945
|
last_updated: string;
|
|
10996
10946
|
}>;
|
|
10997
10947
|
/** Get market movers */
|
|
10998
|
-
getMovers(marketType: "stocks" | "crypto", params?: operations$1["Movers"]["parameters"]["query"], options?: RequestOptions
|
|
10948
|
+
getMovers(marketType: "stocks" | "crypto", params?: operations$1["Movers"]["parameters"]["query"], options?: RequestOptions): Promise<{
|
|
10999
10949
|
gainers: components$1["schemas"]["mover"][];
|
|
11000
10950
|
losers: components$1["schemas"]["mover"][];
|
|
11001
10951
|
market_type: components$1["schemas"]["market_type"];
|
|
@@ -11005,7 +10955,7 @@ declare function createMarketDataClient(config: MarketDataClientConfig): {
|
|
|
11005
10955
|
/** Corporate actions */
|
|
11006
10956
|
corporateActions: {
|
|
11007
10957
|
/** Get corporate actions */
|
|
11008
|
-
get(params: operations$1["CorporateActions"]["parameters"]["query"], options?: RequestOptions
|
|
10958
|
+
get(params: operations$1["CorporateActions"]["parameters"]["query"], options?: RequestOptions): Promise<{
|
|
11009
10959
|
corporate_actions: components$1["schemas"]["corporate_actions"];
|
|
11010
10960
|
next_page_token: components$1["schemas"]["next_page_token"];
|
|
11011
10961
|
}>;
|
|
@@ -11013,13 +10963,13 @@ declare function createMarketDataClient(config: MarketDataClientConfig): {
|
|
|
11013
10963
|
/** Forex operations */
|
|
11014
10964
|
forex: {
|
|
11015
10965
|
/** Get latest forex rates */
|
|
11016
|
-
getLatestRates(params: operations$1["LatestRates"]["parameters"]["query"], options?: RequestOptions
|
|
10966
|
+
getLatestRates(params: operations$1["LatestRates"]["parameters"]["query"], options?: RequestOptions): Promise<{
|
|
11017
10967
|
rates: {
|
|
11018
10968
|
[key: string]: components$1["schemas"]["forex_rate"];
|
|
11019
10969
|
};
|
|
11020
10970
|
}>;
|
|
11021
10971
|
/** Get historical forex rates */
|
|
11022
|
-
getRates(params: operations$1["Rates"]["parameters"]["query"], options?: RequestOptions
|
|
10972
|
+
getRates(params: operations$1["Rates"]["parameters"]["query"], options?: RequestOptions): Promise<{
|
|
11023
10973
|
rates: {
|
|
11024
10974
|
[key: string]: components$1["schemas"]["forex_rate"][];
|
|
11025
10975
|
};
|
|
@@ -11029,37 +10979,12 @@ declare function createMarketDataClient(config: MarketDataClientConfig): {
|
|
|
11029
10979
|
/** Logo operations */
|
|
11030
10980
|
logos: {
|
|
11031
10981
|
/** Get company logo */
|
|
11032
|
-
get(symbol: string, params?: operations$1["Logos"]["parameters"]["query"], options?: RequestOptions
|
|
10982
|
+
get(symbol: string, params?: operations$1["Logos"]["parameters"]["query"], options?: RequestOptions): Promise<string>;
|
|
11033
10983
|
};
|
|
11034
10984
|
};
|
|
11035
10985
|
/** Type inference helper for the market data client */
|
|
11036
10986
|
type MarketDataClient = ReturnType<typeof createMarketDataClient>;
|
|
11037
10987
|
|
|
11038
|
-
/** Base configuration for all Alpaca clients */
|
|
11039
|
-
interface AlpacaConfig {
|
|
11040
|
-
/** API Key ID */
|
|
11041
|
-
keyId: string;
|
|
11042
|
-
/** API Secret Key */
|
|
11043
|
-
secretKey: string;
|
|
11044
|
-
/** Use paper trading environment (default: true) */
|
|
11045
|
-
paper?: boolean;
|
|
11046
|
-
/** Request timeout in milliseconds (default: 30000) */
|
|
11047
|
-
timeout?: number;
|
|
11048
|
-
/** Maximum number of retries for failed requests (default: 2) */
|
|
11049
|
-
maxRetries?: number;
|
|
11050
|
-
/** Custom base URL override */
|
|
11051
|
-
baseUrl?: string;
|
|
11052
|
-
}
|
|
11053
|
-
/** Request options for individual API calls */
|
|
11054
|
-
interface RequestOptions {
|
|
11055
|
-
/** Custom timeout for this request */
|
|
11056
|
-
timeout?: number;
|
|
11057
|
-
/** Idempotency key for POST/PATCH requests */
|
|
11058
|
-
idempotencyKey?: string;
|
|
11059
|
-
/** AbortSignal for request cancellation */
|
|
11060
|
-
signal?: AbortSignal;
|
|
11061
|
-
}
|
|
11062
|
-
|
|
11063
10988
|
/**
|
|
11064
10989
|
* This file was auto-generated by openapi-typescript.
|
|
11065
10990
|
* Do not make direct changes to the file.
|
|
@@ -26786,7 +26711,7 @@ declare function createTradeUpdatesStream(config: StreamConfig): TradeUpdatesStr
|
|
|
26786
26711
|
* Unified Alpaca client
|
|
26787
26712
|
*/
|
|
26788
26713
|
|
|
26789
|
-
type AlpacaClientConfig = AlpacaConfig
|
|
26714
|
+
type AlpacaClientConfig = AlpacaConfig;
|
|
26790
26715
|
interface AlpacaClient {
|
|
26791
26716
|
trading: TradingClient;
|
|
26792
26717
|
broker: BrokerClient;
|
|
@@ -26802,4 +26727,4 @@ interface AlpacaClient {
|
|
|
26802
26727
|
*/
|
|
26803
26728
|
declare function createAlpacaClient(config: AlpacaClientConfig): AlpacaClient;
|
|
26804
26729
|
|
|
26805
|
-
export { type ACHRelationship, ALPACA_URLS, type AccountActivity, type AccountCreationRequest, type AccountDocument, type AccountExtended, type AccountStatus, type AccountUpdateRequest, type Activity, type ActivityType, type AlpacaClient, type AlpacaClientConfig, type AlpacaConfig
|
|
26730
|
+
export { type ACHRelationship, ALPACA_URLS, type AccountActivity, type AccountCreationRequest, type AccountDocument, type AccountExtended, type AccountStatus, type AccountUpdateRequest, type Activity, type ActivityType, type AlpacaClient, type AlpacaClientConfig, type AlpacaConfig, type AlpacaEnvironment, AlpacaError, type ApiError, type ApiKeyAuth, type AuthHeaders, type AuthenticationApiError, AuthenticationError, type BasicAuth, type Account as BrokerAccount, type AccountConfigurations as BrokerAccountConfigurations, type Calendar as BrokerCalendar, type BrokerClient, type BrokerClientConfig, type Clock as BrokerClock, type NonTradeActivity as BrokerNonTradeActivity, type Order as BrokerOrder, type OrderClass as BrokerOrderClass, type OrderSide as BrokerOrderSide, type OrderType as BrokerOrderType, type Position as BrokerPosition, type TimeInForce as BrokerTimeInForce, type TradeActivity as BrokerTradeActivity, type Contact, type CorporateActions, type CreateACHRelationshipRequest, type CreateOrderRequest, type CreateTransferRequest, type CryptoBar, type CryptoOrderbook, type CryptoQuote, type CryptoSnapshot, type CryptoStream, type CryptoTrade, type Disclosures, ErrorType, type ForbiddenApiError, ForbiddenError, type Identity, type InsufficientFundsApiError, InsufficientFundsError, type MarketClosedApiError, MarketClosedError, type MarketDataClient, type MarketDataClientConfig, type MostActive, type Mover, type News, type NewsImage, type NonTradeActivity$1 as NonTradeActivity, type NotFoundApiError, NotFoundError, NotImplementedError, type OAuthAuth, type OpenApiFetchResponse, type OptionBar, type OptionGreeks, type OptionQuote, type OptionSnapshot, type OptionTrade, type OrderRequest, type OrderStatus, type OwnerDocument, type PatchOrderRequest, type PortfolioHistory, type RateLimitApiError, RateLimitError, type RequestOptions, type ResolvedAlpacaConfig, type Result, type ServerApiError, ServerError, type StockAuction, type StockBar, type StockQuote, type StockSnapshot, type StockStream, type StockTrade, type StreamConfig, type StreamState, type TradeAccount, type TradeUpdatesStream, type Account$1 as TradingAccount, type AccountConfigurations$1 as TradingAccountConfigurations, type TradingActivity, type Asset as TradingAsset, type Calendar$1 as TradingCalendar, type TradingClient, type TradingClientConfig, type Clock$1 as TradingClock, type Order$1 as TradingOrder, type OrderClass$1 as TradingOrderClass, type OrderSide$1 as TradingOrderSide, type OrderType$1 as TradingOrderType, type Position$1 as TradingPosition, type TimeInForce$1 as TradingTimeInForce, type Transfer, type TransferDirection, type TransferType, type TrustedContact, type UnknownApiError, type ValidationApiError, ValidationError, type Watchlist, type WebSocketAuthMessage, createAlpacaClient, createAlpacaError, createApiError, createApiFetch, createApiKeyAuth, createBasicAuth, createBrokerClient, createCryptoStream, createHeaders, createMarketDataClient, createOAuthAuth, createStockStream, createTradeUpdatesStream, createTradingClient, createWebSocketAuth, createWebSocketOAuth, err, fetchWithRetry, isApiError, isAuthenticationError, isInsufficientFundsError, isMarketClosedError, isNotFoundError, isRateLimitError, isServerError, isValidationError, ok, resolveConfig, toApiError, unwrap, unwrapList, unwrapOptional };
|