@finatic/client 0.9.2 → 0.9.3
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/dist/index.d.ts +485 -174
- package/dist/index.js +928 -396
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +928 -397
- package/dist/index.mjs.map +1 -1
- package/package.json +23 -15
package/dist/index.d.ts
CHANGED
|
@@ -799,7 +799,7 @@ interface Accountstatus {
|
|
|
799
799
|
* FDX-style broker account schema following FDX Account patterns. Extends FDX Account schema with broker-specific fields.
|
|
800
800
|
*/
|
|
801
801
|
interface FDXBrokerAccount {
|
|
802
|
-
'
|
|
802
|
+
'id'?: string | null;
|
|
803
803
|
/**
|
|
804
804
|
* Broker-provided account identifier
|
|
805
805
|
*/
|
|
@@ -818,7 +818,8 @@ interface FDXBrokerAccount {
|
|
|
818
818
|
'institutionId'?: string | null;
|
|
819
819
|
'currencyCode'?: string | null;
|
|
820
820
|
'accountStatus'?: Accountstatus | null;
|
|
821
|
-
'
|
|
821
|
+
'subAccountType'?: string | null;
|
|
822
|
+
'accountClassification'?: string | null;
|
|
822
823
|
/**
|
|
823
824
|
* User-broker connection UUID
|
|
824
825
|
*/
|
|
@@ -1752,11 +1753,7 @@ interface Unrealizedprofitlosspercent {
|
|
|
1752
1753
|
* FDX-style broker position schema. Based on FDX Holdings, significantly extended for trading: - Short positions - Realized/unrealized P&L - Position lifecycle - Commission tracking
|
|
1753
1754
|
*/
|
|
1754
1755
|
interface FDXBrokerPosition {
|
|
1755
|
-
'
|
|
1756
|
-
/**
|
|
1757
|
-
* Position identifier
|
|
1758
|
-
*/
|
|
1759
|
-
'positionId': string;
|
|
1756
|
+
'id'?: string | null;
|
|
1760
1757
|
/**
|
|
1761
1758
|
* Broker account identifier
|
|
1762
1759
|
*/
|
|
@@ -4393,6 +4390,155 @@ interface Logger {
|
|
|
4393
4390
|
*/
|
|
4394
4391
|
declare function getLogger(config?: SdkConfig): Logger;
|
|
4395
4392
|
|
|
4393
|
+
/**
|
|
4394
|
+
* Pagination utilities for TypeScript SDK.
|
|
4395
|
+
*
|
|
4396
|
+
* Provides PaginatedData class for wrapping paginated responses with helper methods.
|
|
4397
|
+
*/
|
|
4398
|
+
/**
|
|
4399
|
+
* Standard FinaticResponse type for all API responses.
|
|
4400
|
+
*
|
|
4401
|
+
* This matches the FinaticResponse interface defined in wrapper files.
|
|
4402
|
+
*/
|
|
4403
|
+
interface FinaticResponse$3<T> {
|
|
4404
|
+
'_id'?: string;
|
|
4405
|
+
/**
|
|
4406
|
+
* Success payload containing data and optional meta
|
|
4407
|
+
*/
|
|
4408
|
+
'success': {
|
|
4409
|
+
'data': T;
|
|
4410
|
+
'meta'?: {
|
|
4411
|
+
[key: string]: any;
|
|
4412
|
+
} | null;
|
|
4413
|
+
};
|
|
4414
|
+
'error'?: {
|
|
4415
|
+
[key: string]: any;
|
|
4416
|
+
} | null;
|
|
4417
|
+
'warning'?: Array<{
|
|
4418
|
+
[key: string]: any;
|
|
4419
|
+
}> | null;
|
|
4420
|
+
}
|
|
4421
|
+
interface PaginationMeta {
|
|
4422
|
+
has_more: boolean;
|
|
4423
|
+
next_offset: number | null;
|
|
4424
|
+
current_offset: number;
|
|
4425
|
+
limit: number;
|
|
4426
|
+
}
|
|
4427
|
+
/**
|
|
4428
|
+
* PaginatedData wraps a data array with pagination metadata and helper methods.
|
|
4429
|
+
*
|
|
4430
|
+
* This class behaves like an array, so you can use it directly:
|
|
4431
|
+
* - paginatedData.length returns the number of items
|
|
4432
|
+
* - paginatedData[0] returns the first item
|
|
4433
|
+
* - paginatedData.forEach(...) works directly
|
|
4434
|
+
* - paginatedData.map(...) works directly
|
|
4435
|
+
*
|
|
4436
|
+
* It also provides pagination methods:
|
|
4437
|
+
* - hasMore: Check if there are more pages
|
|
4438
|
+
* - nextPage(): Get the next page
|
|
4439
|
+
* - prevPage(): Get the previous page
|
|
4440
|
+
* - firstPage(): Get the first page
|
|
4441
|
+
* - lastPage(): Get the last page
|
|
4442
|
+
*
|
|
4443
|
+
* @template T - The element type (e.g., FDXBrokerAccount)
|
|
4444
|
+
*
|
|
4445
|
+
* Usage:
|
|
4446
|
+
* ```typescript
|
|
4447
|
+
* const response = await sdk.getAccounts();
|
|
4448
|
+
* const accounts = response.success.data; // Can use directly as array!
|
|
4449
|
+
* console.log(accounts.length); // Works directly
|
|
4450
|
+
* console.log(accounts[0]); // Works directly
|
|
4451
|
+
* accounts.forEach(account => console.log(account)); // Works directly
|
|
4452
|
+
*
|
|
4453
|
+
* if (accounts.hasMore) {
|
|
4454
|
+
* const nextPage = await accounts.nextPage(); // Returns PaginatedData<FDXBrokerAccount>
|
|
4455
|
+
* const nextAccounts = nextPage; // Can use directly as array too!
|
|
4456
|
+
* }
|
|
4457
|
+
* ```
|
|
4458
|
+
*/
|
|
4459
|
+
declare class PaginatedData<T> {
|
|
4460
|
+
items: T[];
|
|
4461
|
+
private meta;
|
|
4462
|
+
private originalMethod;
|
|
4463
|
+
private currentParams;
|
|
4464
|
+
private wrapperInstance;
|
|
4465
|
+
constructor(items: T[], // The actual data array
|
|
4466
|
+
meta: PaginationMeta, originalMethod: (params?: any) => Promise<any>, currentParams: any, wrapperInstance: any);
|
|
4467
|
+
/**
|
|
4468
|
+
* Get the number of items (allows paginatedData.length).
|
|
4469
|
+
*/
|
|
4470
|
+
get length(): number;
|
|
4471
|
+
/**
|
|
4472
|
+
* Check if there are more pages available.
|
|
4473
|
+
*/
|
|
4474
|
+
get hasMore(): boolean;
|
|
4475
|
+
/**
|
|
4476
|
+
* Calls a function for each element in the array.
|
|
4477
|
+
*/
|
|
4478
|
+
forEach(callbackfn: (value: T, index: number, array: T[]) => void, thisArg?: any): void;
|
|
4479
|
+
/**
|
|
4480
|
+
* Creates a new array with the results of calling a function for every array element.
|
|
4481
|
+
*/
|
|
4482
|
+
map<U>(callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any): U[];
|
|
4483
|
+
/**
|
|
4484
|
+
* Returns the elements of an array that meet the condition specified in a callback function.
|
|
4485
|
+
*/
|
|
4486
|
+
filter(callbackfn: (value: T, index: number, array: T[]) => boolean, thisArg?: any): T[];
|
|
4487
|
+
/**
|
|
4488
|
+
* Returns the value of the first element in the array where predicate is true.
|
|
4489
|
+
*/
|
|
4490
|
+
find(predicate: (value: T, index: number, obj: T[]) => boolean, thisArg?: any): T | undefined;
|
|
4491
|
+
/**
|
|
4492
|
+
* Returns the index of the first element in the array where predicate is true.
|
|
4493
|
+
*/
|
|
4494
|
+
findIndex(predicate: (value: T, index: number, obj: T[]) => boolean, thisArg?: any): number;
|
|
4495
|
+
/**
|
|
4496
|
+
* Returns a section of an array.
|
|
4497
|
+
*/
|
|
4498
|
+
slice(start?: number, end?: number): T[];
|
|
4499
|
+
/**
|
|
4500
|
+
* Determines whether an array includes a certain element.
|
|
4501
|
+
*/
|
|
4502
|
+
includes(searchElement: T, fromIndex?: number): boolean;
|
|
4503
|
+
/**
|
|
4504
|
+
* Returns the index of the first occurrence of a value in an array.
|
|
4505
|
+
*/
|
|
4506
|
+
indexOf(searchElement: T, fromIndex?: number): number;
|
|
4507
|
+
/**
|
|
4508
|
+
* Returns a string representation of an array.
|
|
4509
|
+
*/
|
|
4510
|
+
toString(): string;
|
|
4511
|
+
/**
|
|
4512
|
+
* Returns a string representation of an array.
|
|
4513
|
+
*/
|
|
4514
|
+
toLocaleString(): string;
|
|
4515
|
+
/**
|
|
4516
|
+
* Get the next page of data.
|
|
4517
|
+
* @returns Promise<PaginatedData<T>> - The next page (not wrapped in FinaticResponse)
|
|
4518
|
+
* @throws Error if no more pages are available
|
|
4519
|
+
*/
|
|
4520
|
+
nextPage(): Promise<PaginatedData<T>>;
|
|
4521
|
+
/**
|
|
4522
|
+
* Get the previous page of data.
|
|
4523
|
+
* @returns Promise<PaginatedData<T>> - The previous page (not wrapped in FinaticResponse)
|
|
4524
|
+
* @throws Error if fetch fails
|
|
4525
|
+
*/
|
|
4526
|
+
prevPage(): Promise<PaginatedData<T>>;
|
|
4527
|
+
/**
|
|
4528
|
+
* Get the first page of data.
|
|
4529
|
+
* @returns Promise<PaginatedData<T>> - The first page (not wrapped in FinaticResponse)
|
|
4530
|
+
* @throws Error if fetch fails
|
|
4531
|
+
*/
|
|
4532
|
+
firstPage(): Promise<PaginatedData<T>>;
|
|
4533
|
+
/**
|
|
4534
|
+
* Get the last page of data.
|
|
4535
|
+
* Uses iterative approach to find the last page.
|
|
4536
|
+
* @returns Promise<PaginatedData<T>> - The last page (not wrapped in FinaticResponse)
|
|
4537
|
+
* @throws Error if fetch fails
|
|
4538
|
+
*/
|
|
4539
|
+
lastPage(): Promise<PaginatedData<T>>;
|
|
4540
|
+
}
|
|
4541
|
+
|
|
4396
4542
|
/**
|
|
4397
4543
|
* Generated wrapper functions for brokers operations (Phase 2A).
|
|
4398
4544
|
*
|
|
@@ -4423,91 +4569,164 @@ interface FinaticResponse$2<T> {
|
|
|
4423
4569
|
[key: string]: any;
|
|
4424
4570
|
}> | null;
|
|
4425
4571
|
}
|
|
4572
|
+
interface DisconnectCompanyFromBrokerParams$1 {
|
|
4573
|
+
/** Connection ID */
|
|
4574
|
+
connectionId: string;
|
|
4575
|
+
}
|
|
4426
4576
|
interface GetOrdersParams {
|
|
4577
|
+
/** Filter by broker ID */
|
|
4427
4578
|
brokerId?: string;
|
|
4579
|
+
/** Filter by connection ID */
|
|
4428
4580
|
connectionId?: string;
|
|
4581
|
+
/** Filter by broker provided account ID */
|
|
4429
4582
|
accountId?: string;
|
|
4583
|
+
/** Filter by symbol */
|
|
4430
4584
|
symbol?: string;
|
|
4585
|
+
/** Filter by order status (e.g., 'filled', 'pending_new', 'cancelled') */
|
|
4431
4586
|
orderStatus?: BrokerDataOrderStatusEnum;
|
|
4587
|
+
/** Filter by order side (e.g., 'buy', 'sell') */
|
|
4432
4588
|
side?: BrokerDataOrderSideEnum;
|
|
4589
|
+
/** Filter by asset type (e.g., 'stock', 'option', 'crypto', 'future') */
|
|
4433
4590
|
assetType?: BrokerDataAssetTypeEnum;
|
|
4591
|
+
/** Maximum number of orders to return */
|
|
4434
4592
|
limit?: number;
|
|
4593
|
+
/** Number of orders to skip for pagination */
|
|
4435
4594
|
offset?: number;
|
|
4595
|
+
/** Filter orders created after this timestamp */
|
|
4436
4596
|
createdAfter?: string;
|
|
4597
|
+
/** Filter orders created before this timestamp */
|
|
4437
4598
|
createdBefore?: string;
|
|
4599
|
+
/** Include order metadata in response (excluded by default for FDX compliance) */
|
|
4438
4600
|
includeMetadata?: boolean;
|
|
4439
4601
|
}
|
|
4440
4602
|
interface GetPositionsParams {
|
|
4603
|
+
/** Filter by broker ID */
|
|
4441
4604
|
brokerId?: string;
|
|
4605
|
+
/** Filter by connection ID */
|
|
4442
4606
|
connectionId?: string;
|
|
4607
|
+
/** Filter by broker provided account ID */
|
|
4443
4608
|
accountId?: string;
|
|
4609
|
+
/** Filter by symbol */
|
|
4444
4610
|
symbol?: string;
|
|
4611
|
+
/** Filter by position side (e.g., 'long', 'short') */
|
|
4445
4612
|
side?: BrokerDataOrderSideEnum;
|
|
4613
|
+
/** Filter by asset type (e.g., 'stock', 'option', 'crypto', 'future') */
|
|
4446
4614
|
assetType?: BrokerDataAssetTypeEnum;
|
|
4615
|
+
/** Filter by position status: 'open' (quantity > 0) or 'closed' (quantity = 0) */
|
|
4447
4616
|
positionStatus?: BrokerDataPositionStatusEnum;
|
|
4617
|
+
/** Maximum number of positions to return */
|
|
4448
4618
|
limit?: number;
|
|
4619
|
+
/** Number of positions to skip for pagination */
|
|
4449
4620
|
offset?: number;
|
|
4621
|
+
/** Filter positions updated after this timestamp */
|
|
4450
4622
|
updatedAfter?: string;
|
|
4623
|
+
/** Filter positions updated before this timestamp */
|
|
4451
4624
|
updatedBefore?: string;
|
|
4625
|
+
/** Include position metadata in response (excluded by default for FDX compliance) */
|
|
4452
4626
|
includeMetadata?: boolean;
|
|
4453
4627
|
}
|
|
4454
4628
|
interface GetBalancesParams {
|
|
4629
|
+
/** Filter by broker ID */
|
|
4455
4630
|
brokerId?: string;
|
|
4631
|
+
/** Filter by connection ID */
|
|
4456
4632
|
connectionId?: string;
|
|
4633
|
+
/** Filter by broker provided account ID */
|
|
4457
4634
|
accountId?: string;
|
|
4635
|
+
/** Filter by end-of-day snapshot status (true/false) */
|
|
4458
4636
|
isEndOfDaySnapshot?: boolean;
|
|
4637
|
+
/** Maximum number of balances to return */
|
|
4459
4638
|
limit?: number;
|
|
4639
|
+
/** Number of balances to skip for pagination */
|
|
4460
4640
|
offset?: number;
|
|
4641
|
+
/** Filter balances created after this timestamp */
|
|
4461
4642
|
balanceCreatedAfter?: string;
|
|
4643
|
+
/** Filter balances created before this timestamp */
|
|
4462
4644
|
balanceCreatedBefore?: string;
|
|
4645
|
+
/** Include balance metadata in response (excluded by default for FDX compliance) */
|
|
4463
4646
|
includeMetadata?: boolean;
|
|
4464
4647
|
}
|
|
4465
4648
|
interface GetAccountsParams {
|
|
4649
|
+
/** Filter by broker ID */
|
|
4466
4650
|
brokerId?: string;
|
|
4651
|
+
/** Filter by connection ID */
|
|
4467
4652
|
connectionId?: string;
|
|
4653
|
+
/** Filter by account type (e.g., 'margin', 'cash', 'crypto_wallet', 'live', 'sim') */
|
|
4468
4654
|
accountType?: BrokerDataAccountTypeEnum;
|
|
4655
|
+
/** Filter by account status (e.g., 'active', 'inactive') */
|
|
4469
4656
|
status?: AccountStatus;
|
|
4657
|
+
/** Filter by currency (e.g., 'USD', 'EUR') */
|
|
4470
4658
|
currency?: string;
|
|
4659
|
+
/** Maximum number of accounts to return */
|
|
4471
4660
|
limit?: number;
|
|
4661
|
+
/** Number of accounts to skip for pagination */
|
|
4472
4662
|
offset?: number;
|
|
4663
|
+
/** Include connection metadata in response (excluded by default for FDX compliance) */
|
|
4473
4664
|
includeMetadata?: boolean;
|
|
4474
4665
|
}
|
|
4475
4666
|
interface GetOrderFillsParams {
|
|
4667
|
+
/** Order ID */
|
|
4476
4668
|
orderId: string;
|
|
4669
|
+
/** Filter by connection ID */
|
|
4477
4670
|
connectionId?: string;
|
|
4671
|
+
/** Maximum number of fills to return */
|
|
4478
4672
|
limit?: number;
|
|
4673
|
+
/** Number of fills to skip for pagination */
|
|
4479
4674
|
offset?: number;
|
|
4675
|
+
/** Include fill metadata in response (excluded by default for FDX compliance) */
|
|
4480
4676
|
includeMetadata?: boolean;
|
|
4481
4677
|
}
|
|
4482
4678
|
interface GetOrderEventsParams {
|
|
4679
|
+
/** Order ID */
|
|
4483
4680
|
orderId: string;
|
|
4681
|
+
/** Filter by connection ID */
|
|
4484
4682
|
connectionId?: string;
|
|
4683
|
+
/** Maximum number of events to return */
|
|
4485
4684
|
limit?: number;
|
|
4685
|
+
/** Number of events to skip for pagination */
|
|
4486
4686
|
offset?: number;
|
|
4687
|
+
/** Include event metadata in response (excluded by default for FDX compliance) */
|
|
4487
4688
|
includeMetadata?: boolean;
|
|
4488
4689
|
}
|
|
4489
4690
|
interface GetOrderGroupsParams {
|
|
4691
|
+
/** Filter by broker ID */
|
|
4490
4692
|
brokerId?: string;
|
|
4693
|
+
/** Filter by connection ID */
|
|
4491
4694
|
connectionId?: string;
|
|
4695
|
+
/** Maximum number of order groups to return */
|
|
4492
4696
|
limit?: number;
|
|
4697
|
+
/** Number of order groups to skip for pagination */
|
|
4493
4698
|
offset?: number;
|
|
4699
|
+
/** Filter order groups created after this timestamp */
|
|
4494
4700
|
createdAfter?: string;
|
|
4701
|
+
/** Filter order groups created before this timestamp */
|
|
4495
4702
|
createdBefore?: string;
|
|
4703
|
+
/** Include group metadata in response (excluded by default for FDX compliance) */
|
|
4496
4704
|
includeMetadata?: boolean;
|
|
4497
4705
|
}
|
|
4498
4706
|
interface GetPositionLotsParams {
|
|
4707
|
+
/** Filter by broker ID */
|
|
4499
4708
|
brokerId?: string;
|
|
4709
|
+
/** Filter by connection ID */
|
|
4500
4710
|
connectionId?: string;
|
|
4711
|
+
/** Filter by broker provided account ID */
|
|
4501
4712
|
accountId?: string;
|
|
4713
|
+
/** Filter by symbol */
|
|
4502
4714
|
symbol?: string;
|
|
4715
|
+
/** Filter by position ID */
|
|
4503
4716
|
positionId?: string;
|
|
4717
|
+
/** Maximum number of position lots to return */
|
|
4504
4718
|
limit?: number;
|
|
4719
|
+
/** Number of position lots to skip for pagination */
|
|
4505
4720
|
offset?: number;
|
|
4506
4721
|
}
|
|
4507
4722
|
interface GetPositionLotFillsParams {
|
|
4723
|
+
/** Position lot ID */
|
|
4508
4724
|
lotId: string;
|
|
4725
|
+
/** Filter by connection ID */
|
|
4509
4726
|
connectionId?: string;
|
|
4727
|
+
/** Maximum number of fills to return */
|
|
4510
4728
|
limit?: number;
|
|
4729
|
+
/** Number of fills to skip for pagination */
|
|
4511
4730
|
offset?: number;
|
|
4512
4731
|
}
|
|
4513
4732
|
/**
|
|
@@ -4539,7 +4758,7 @@ declare class BrokersWrapper {
|
|
|
4539
4758
|
* -------
|
|
4540
4759
|
* FinaticResponse[list[BrokerInfo]]
|
|
4541
4760
|
* list of available brokers with their metadata.
|
|
4542
|
-
* @param No parameters required for this method
|
|
4761
|
+
* @param params No parameters required for this method
|
|
4543
4762
|
* @returns {Promise<FinaticResponse<BrokerInfo[]>>} Standard response with success/Error/Warning structure
|
|
4544
4763
|
*
|
|
4545
4764
|
* Generated from: GET /api/v1/brokers/
|
|
@@ -4548,7 +4767,7 @@ declare class BrokersWrapper {
|
|
|
4548
4767
|
* @example
|
|
4549
4768
|
* ```typescript-client
|
|
4550
4769
|
* // Example with no parameters
|
|
4551
|
-
* const result = await finatic.getBrokers();
|
|
4770
|
+
* const result = await finatic.getBrokers({});
|
|
4552
4771
|
*
|
|
4553
4772
|
* // Access the response data
|
|
4554
4773
|
* if (result.success) {
|
|
@@ -4556,7 +4775,7 @@ declare class BrokersWrapper {
|
|
|
4556
4775
|
* }
|
|
4557
4776
|
* ```
|
|
4558
4777
|
*/
|
|
4559
|
-
getBrokers(): Promise<FinaticResponse$2<BrokerInfo[]>>;
|
|
4778
|
+
getBrokers(params?: {}): Promise<FinaticResponse$2<BrokerInfo[]>>;
|
|
4560
4779
|
/**
|
|
4561
4780
|
* List Broker Connections
|
|
4562
4781
|
*
|
|
@@ -4565,7 +4784,7 @@ declare class BrokersWrapper {
|
|
|
4565
4784
|
* This endpoint is accessible from the portal and uses session-only authentication.
|
|
4566
4785
|
* Returns connections that the user has any permissions for, including the current
|
|
4567
4786
|
* company's permissions (read/write) for each connection.
|
|
4568
|
-
* @param No parameters required for this method
|
|
4787
|
+
* @param params No parameters required for this method
|
|
4569
4788
|
* @returns {Promise<FinaticResponse<UserBrokerConnectionWithPermissions[]>>} Standard response with success/Error/Warning structure
|
|
4570
4789
|
*
|
|
4571
4790
|
* Generated from: GET /api/v1/brokers/connections
|
|
@@ -4574,7 +4793,7 @@ declare class BrokersWrapper {
|
|
|
4574
4793
|
* @example
|
|
4575
4794
|
* ```typescript-client
|
|
4576
4795
|
* // Example with no parameters
|
|
4577
|
-
* const result = await finatic.getBrokerConnections();
|
|
4796
|
+
* const result = await finatic.getBrokerConnections({});
|
|
4578
4797
|
*
|
|
4579
4798
|
* // Access the response data
|
|
4580
4799
|
* if (result.success) {
|
|
@@ -4582,7 +4801,7 @@ declare class BrokersWrapper {
|
|
|
4582
4801
|
* }
|
|
4583
4802
|
* ```
|
|
4584
4803
|
*/
|
|
4585
|
-
getBrokerConnections(): Promise<FinaticResponse$2<UserBrokerConnectionWithPermissions[]>>;
|
|
4804
|
+
getBrokerConnections(params?: {}): Promise<FinaticResponse$2<UserBrokerConnectionWithPermissions[]>>;
|
|
4586
4805
|
/**
|
|
4587
4806
|
* Disconnect Company From Broker
|
|
4588
4807
|
*
|
|
@@ -4590,7 +4809,7 @@ declare class BrokersWrapper {
|
|
|
4590
4809
|
*
|
|
4591
4810
|
* If the company is the only one with access, the entire connection is deleted.
|
|
4592
4811
|
* If other companies have access, only the company's access is removed.
|
|
4593
|
-
* @param connectionId {string}
|
|
4812
|
+
* @param params.connectionId {string} Connection ID
|
|
4594
4813
|
* @returns {Promise<FinaticResponse<DisconnectActionResult>>} Standard response with success/Error/Warning structure
|
|
4595
4814
|
*
|
|
4596
4815
|
* Generated from: DELETE /api/v1/brokers/disconnect-company/{connection_id}
|
|
@@ -4599,7 +4818,9 @@ declare class BrokersWrapper {
|
|
|
4599
4818
|
* @example
|
|
4600
4819
|
* ```typescript-client
|
|
4601
4820
|
* // Minimal example with required parameters only
|
|
4602
|
-
* const result = await finatic.disconnectCompanyFromBroker(
|
|
4821
|
+
* const result = await finatic.disconnectCompanyFromBroker({
|
|
4822
|
+
connectionId: '00000000-0000-0000-0000-000000000000'
|
|
4823
|
+
* });
|
|
4603
4824
|
*
|
|
4604
4825
|
* // Access the response data
|
|
4605
4826
|
* if (result.success) {
|
|
@@ -4609,7 +4830,7 @@ declare class BrokersWrapper {
|
|
|
4609
4830
|
* }
|
|
4610
4831
|
* ```
|
|
4611
4832
|
*/
|
|
4612
|
-
disconnectCompanyFromBroker(
|
|
4833
|
+
disconnectCompanyFromBroker(params: DisconnectCompanyFromBrokerParams$1): Promise<FinaticResponse$2<DisconnectActionResult>>;
|
|
4613
4834
|
/**
|
|
4614
4835
|
* Get Orders
|
|
4615
4836
|
*
|
|
@@ -4617,19 +4838,19 @@ declare class BrokersWrapper {
|
|
|
4617
4838
|
*
|
|
4618
4839
|
* This endpoint is accessible from the portal and uses session-only authentication.
|
|
4619
4840
|
* Returns orders from connections the company has read access to.
|
|
4620
|
-
* @param brokerId {string} (optional)
|
|
4621
|
-
* @param connectionId {string} (optional)
|
|
4622
|
-
* @param accountId {string} (optional)
|
|
4623
|
-
* @param symbol {string} (optional)
|
|
4624
|
-
* @param orderStatus {BrokerDataOrderStatusEnum} (optional)
|
|
4625
|
-
* @param side {BrokerDataOrderSideEnum} (optional)
|
|
4626
|
-
* @param assetType {BrokerDataAssetTypeEnum} (optional)
|
|
4627
|
-
* @param limit {number} (optional)
|
|
4628
|
-
* @param offset {number} (optional)
|
|
4629
|
-
* @param createdAfter {string} (optional)
|
|
4630
|
-
* @param createdBefore {string} (optional)
|
|
4631
|
-
* @param includeMetadata {boolean} (optional)
|
|
4632
|
-
* @returns {Promise<FinaticResponse<FDXBrokerOrder
|
|
4841
|
+
* @param params.brokerId {string} (optional) Filter by broker ID
|
|
4842
|
+
* @param params.connectionId {string} (optional) Filter by connection ID
|
|
4843
|
+
* @param params.accountId {string} (optional) Filter by broker provided account ID
|
|
4844
|
+
* @param params.symbol {string} (optional) Filter by symbol
|
|
4845
|
+
* @param params.orderStatus {BrokerDataOrderStatusEnum} (optional) Filter by order status (e.g., 'filled', 'pending_new', 'cancelled')
|
|
4846
|
+
* @param params.side {BrokerDataOrderSideEnum} (optional) Filter by order side (e.g., 'buy', 'sell')
|
|
4847
|
+
* @param params.assetType {BrokerDataAssetTypeEnum} (optional) Filter by asset type (e.g., 'stock', 'option', 'crypto', 'future')
|
|
4848
|
+
* @param params.limit {number} (optional) Maximum number of orders to return
|
|
4849
|
+
* @param params.offset {number} (optional) Number of orders to skip for pagination
|
|
4850
|
+
* @param params.createdAfter {string} (optional) Filter orders created after this timestamp
|
|
4851
|
+
* @param params.createdBefore {string} (optional) Filter orders created before this timestamp
|
|
4852
|
+
* @param params.includeMetadata {boolean} (optional) Include order metadata in response (excluded by default for FDX compliance)
|
|
4853
|
+
* @returns {Promise<FinaticResponse<PaginatedData<FDXBrokerOrder>>>} Standard response with success/Error/Warning structure
|
|
4633
4854
|
*
|
|
4634
4855
|
* Generated from: GET /api/v1/brokers/data/orders
|
|
4635
4856
|
* @methodId get_orders_api_v1_brokers_data_orders_get
|
|
@@ -4637,7 +4858,7 @@ declare class BrokersWrapper {
|
|
|
4637
4858
|
* @example
|
|
4638
4859
|
* ```typescript-client
|
|
4639
4860
|
* // Example with no parameters
|
|
4640
|
-
* const result = await finatic.getOrders();
|
|
4861
|
+
* const result = await finatic.getOrders({});
|
|
4641
4862
|
*
|
|
4642
4863
|
* // Access the response data
|
|
4643
4864
|
* if (result.success) {
|
|
@@ -4647,7 +4868,11 @@ declare class BrokersWrapper {
|
|
|
4647
4868
|
* @example
|
|
4648
4869
|
* ```typescript-client
|
|
4649
4870
|
* // Full example with optional parameters
|
|
4650
|
-
* const result = await finatic.getOrders(
|
|
4871
|
+
* const result = await finatic.getOrders({
|
|
4872
|
+
brokerId: 'alpaca',
|
|
4873
|
+
connectionId: '00000000-0000-0000-0000-000000000000',
|
|
4874
|
+
accountId: '123456789'
|
|
4875
|
+
* });
|
|
4651
4876
|
*
|
|
4652
4877
|
* // Handle response with warnings
|
|
4653
4878
|
* if (result.success) {
|
|
@@ -4660,7 +4885,7 @@ declare class BrokersWrapper {
|
|
|
4660
4885
|
* }
|
|
4661
4886
|
* ```
|
|
4662
4887
|
*/
|
|
4663
|
-
getOrders(
|
|
4888
|
+
getOrders(params?: GetOrdersParams): Promise<FinaticResponse$2<PaginatedData<FDXBrokerOrder>>>;
|
|
4664
4889
|
/**
|
|
4665
4890
|
* Get Positions
|
|
4666
4891
|
*
|
|
@@ -4668,19 +4893,19 @@ declare class BrokersWrapper {
|
|
|
4668
4893
|
*
|
|
4669
4894
|
* This endpoint is accessible from the portal and uses session-only authentication.
|
|
4670
4895
|
* Returns positions from connections the company has read access to.
|
|
4671
|
-
* @param brokerId {string} (optional)
|
|
4672
|
-
* @param connectionId {string} (optional)
|
|
4673
|
-
* @param accountId {string} (optional)
|
|
4674
|
-
* @param symbol {string} (optional)
|
|
4675
|
-
* @param side {BrokerDataOrderSideEnum} (optional)
|
|
4676
|
-
* @param assetType {BrokerDataAssetTypeEnum} (optional)
|
|
4677
|
-
* @param positionStatus {BrokerDataPositionStatusEnum} (optional)
|
|
4678
|
-
* @param limit {number} (optional)
|
|
4679
|
-
* @param offset {number} (optional)
|
|
4680
|
-
* @param updatedAfter {string} (optional)
|
|
4681
|
-
* @param updatedBefore {string} (optional)
|
|
4682
|
-
* @param includeMetadata {boolean} (optional)
|
|
4683
|
-
* @returns {Promise<FinaticResponse<FDXBrokerPosition
|
|
4896
|
+
* @param params.brokerId {string} (optional) Filter by broker ID
|
|
4897
|
+
* @param params.connectionId {string} (optional) Filter by connection ID
|
|
4898
|
+
* @param params.accountId {string} (optional) Filter by broker provided account ID
|
|
4899
|
+
* @param params.symbol {string} (optional) Filter by symbol
|
|
4900
|
+
* @param params.side {BrokerDataOrderSideEnum} (optional) Filter by position side (e.g., 'long', 'short')
|
|
4901
|
+
* @param params.assetType {BrokerDataAssetTypeEnum} (optional) Filter by asset type (e.g., 'stock', 'option', 'crypto', 'future')
|
|
4902
|
+
* @param params.positionStatus {BrokerDataPositionStatusEnum} (optional) Filter by position status: 'open' (quantity > 0) or 'closed' (quantity = 0)
|
|
4903
|
+
* @param params.limit {number} (optional) Maximum number of positions to return
|
|
4904
|
+
* @param params.offset {number} (optional) Number of positions to skip for pagination
|
|
4905
|
+
* @param params.updatedAfter {string} (optional) Filter positions updated after this timestamp
|
|
4906
|
+
* @param params.updatedBefore {string} (optional) Filter positions updated before this timestamp
|
|
4907
|
+
* @param params.includeMetadata {boolean} (optional) Include position metadata in response (excluded by default for FDX compliance)
|
|
4908
|
+
* @returns {Promise<FinaticResponse<PaginatedData<FDXBrokerPosition>>>} Standard response with success/Error/Warning structure
|
|
4684
4909
|
*
|
|
4685
4910
|
* Generated from: GET /api/v1/brokers/data/positions
|
|
4686
4911
|
* @methodId get_positions_api_v1_brokers_data_positions_get
|
|
@@ -4688,7 +4913,7 @@ declare class BrokersWrapper {
|
|
|
4688
4913
|
* @example
|
|
4689
4914
|
* ```typescript-client
|
|
4690
4915
|
* // Example with no parameters
|
|
4691
|
-
* const result = await finatic.getPositions();
|
|
4916
|
+
* const result = await finatic.getPositions({});
|
|
4692
4917
|
*
|
|
4693
4918
|
* // Access the response data
|
|
4694
4919
|
* if (result.success) {
|
|
@@ -4698,7 +4923,11 @@ declare class BrokersWrapper {
|
|
|
4698
4923
|
* @example
|
|
4699
4924
|
* ```typescript-client
|
|
4700
4925
|
* // Full example with optional parameters
|
|
4701
|
-
* const result = await finatic.getPositions(
|
|
4926
|
+
* const result = await finatic.getPositions({
|
|
4927
|
+
brokerId: 'alpaca',
|
|
4928
|
+
connectionId: '00000000-0000-0000-0000-000000000000',
|
|
4929
|
+
accountId: '123456789'
|
|
4930
|
+
* });
|
|
4702
4931
|
*
|
|
4703
4932
|
* // Handle response with warnings
|
|
4704
4933
|
* if (result.success) {
|
|
@@ -4711,7 +4940,7 @@ declare class BrokersWrapper {
|
|
|
4711
4940
|
* }
|
|
4712
4941
|
* ```
|
|
4713
4942
|
*/
|
|
4714
|
-
getPositions(
|
|
4943
|
+
getPositions(params?: GetPositionsParams): Promise<FinaticResponse$2<PaginatedData<FDXBrokerPosition>>>;
|
|
4715
4944
|
/**
|
|
4716
4945
|
* Get Balances
|
|
4717
4946
|
*
|
|
@@ -4719,16 +4948,16 @@ declare class BrokersWrapper {
|
|
|
4719
4948
|
*
|
|
4720
4949
|
* This endpoint is accessible from the portal and uses session-only authentication.
|
|
4721
4950
|
* Returns balances from connections the company has read access to.
|
|
4722
|
-
* @param brokerId {string} (optional)
|
|
4723
|
-
* @param connectionId {string} (optional)
|
|
4724
|
-
* @param accountId {string} (optional)
|
|
4725
|
-
* @param isEndOfDaySnapshot {boolean} (optional)
|
|
4726
|
-
* @param limit {number} (optional)
|
|
4727
|
-
* @param offset {number} (optional)
|
|
4728
|
-
* @param balanceCreatedAfter {string} (optional)
|
|
4729
|
-
* @param balanceCreatedBefore {string} (optional)
|
|
4730
|
-
* @param includeMetadata {boolean} (optional)
|
|
4731
|
-
* @returns {Promise<FinaticResponse<FDXBrokerBalance
|
|
4951
|
+
* @param params.brokerId {string} (optional) Filter by broker ID
|
|
4952
|
+
* @param params.connectionId {string} (optional) Filter by connection ID
|
|
4953
|
+
* @param params.accountId {string} (optional) Filter by broker provided account ID
|
|
4954
|
+
* @param params.isEndOfDaySnapshot {boolean} (optional) Filter by end-of-day snapshot status (true/false)
|
|
4955
|
+
* @param params.limit {number} (optional) Maximum number of balances to return
|
|
4956
|
+
* @param params.offset {number} (optional) Number of balances to skip for pagination
|
|
4957
|
+
* @param params.balanceCreatedAfter {string} (optional) Filter balances created after this timestamp
|
|
4958
|
+
* @param params.balanceCreatedBefore {string} (optional) Filter balances created before this timestamp
|
|
4959
|
+
* @param params.includeMetadata {boolean} (optional) Include balance metadata in response (excluded by default for FDX compliance)
|
|
4960
|
+
* @returns {Promise<FinaticResponse<PaginatedData<FDXBrokerBalance>>>} Standard response with success/Error/Warning structure
|
|
4732
4961
|
*
|
|
4733
4962
|
* Generated from: GET /api/v1/brokers/data/balances
|
|
4734
4963
|
* @methodId get_balances_api_v1_brokers_data_balances_get
|
|
@@ -4736,7 +4965,7 @@ declare class BrokersWrapper {
|
|
|
4736
4965
|
* @example
|
|
4737
4966
|
* ```typescript-client
|
|
4738
4967
|
* // Example with no parameters
|
|
4739
|
-
* const result = await finatic.getBalances();
|
|
4968
|
+
* const result = await finatic.getBalances({});
|
|
4740
4969
|
*
|
|
4741
4970
|
* // Access the response data
|
|
4742
4971
|
* if (result.success) {
|
|
@@ -4746,7 +4975,11 @@ declare class BrokersWrapper {
|
|
|
4746
4975
|
* @example
|
|
4747
4976
|
* ```typescript-client
|
|
4748
4977
|
* // Full example with optional parameters
|
|
4749
|
-
* const result = await finatic.getBalances(
|
|
4978
|
+
* const result = await finatic.getBalances({
|
|
4979
|
+
brokerId: 'alpaca',
|
|
4980
|
+
connectionId: '00000000-0000-0000-0000-000000000000',
|
|
4981
|
+
accountId: '123456789'
|
|
4982
|
+
* });
|
|
4750
4983
|
*
|
|
4751
4984
|
* // Handle response with warnings
|
|
4752
4985
|
* if (result.success) {
|
|
@@ -4759,7 +4992,7 @@ declare class BrokersWrapper {
|
|
|
4759
4992
|
* }
|
|
4760
4993
|
* ```
|
|
4761
4994
|
*/
|
|
4762
|
-
getBalances(
|
|
4995
|
+
getBalances(params?: GetBalancesParams): Promise<FinaticResponse$2<PaginatedData<FDXBrokerBalance>>>;
|
|
4763
4996
|
/**
|
|
4764
4997
|
* Get Accounts
|
|
4765
4998
|
*
|
|
@@ -4767,15 +5000,15 @@ declare class BrokersWrapper {
|
|
|
4767
5000
|
*
|
|
4768
5001
|
* This endpoint is accessible from the portal and uses session-only authentication.
|
|
4769
5002
|
* Returns accounts from connections the company has read access to.
|
|
4770
|
-
* @param brokerId {string} (optional)
|
|
4771
|
-
* @param connectionId {string} (optional)
|
|
4772
|
-
* @param accountType {BrokerDataAccountTypeEnum} (optional)
|
|
4773
|
-
* @param status {AccountStatus} (optional)
|
|
4774
|
-
* @param currency {string} (optional)
|
|
4775
|
-
* @param limit {number} (optional)
|
|
4776
|
-
* @param offset {number} (optional)
|
|
4777
|
-
* @param includeMetadata {boolean} (optional)
|
|
4778
|
-
* @returns {Promise<FinaticResponse<FDXBrokerAccount
|
|
5003
|
+
* @param params.brokerId {string} (optional) Filter by broker ID
|
|
5004
|
+
* @param params.connectionId {string} (optional) Filter by connection ID
|
|
5005
|
+
* @param params.accountType {BrokerDataAccountTypeEnum} (optional) Filter by account type (e.g., 'margin', 'cash', 'crypto_wallet', 'live', 'sim')
|
|
5006
|
+
* @param params.status {AccountStatus} (optional) Filter by account status (e.g., 'active', 'inactive')
|
|
5007
|
+
* @param params.currency {string} (optional) Filter by currency (e.g., 'USD', 'EUR')
|
|
5008
|
+
* @param params.limit {number} (optional) Maximum number of accounts to return
|
|
5009
|
+
* @param params.offset {number} (optional) Number of accounts to skip for pagination
|
|
5010
|
+
* @param params.includeMetadata {boolean} (optional) Include connection metadata in response (excluded by default for FDX compliance)
|
|
5011
|
+
* @returns {Promise<FinaticResponse<PaginatedData<FDXBrokerAccount>>>} Standard response with success/Error/Warning structure
|
|
4779
5012
|
*
|
|
4780
5013
|
* Generated from: GET /api/v1/brokers/data/accounts
|
|
4781
5014
|
* @methodId get_accounts_api_v1_brokers_data_accounts_get
|
|
@@ -4783,7 +5016,7 @@ declare class BrokersWrapper {
|
|
|
4783
5016
|
* @example
|
|
4784
5017
|
* ```typescript-client
|
|
4785
5018
|
* // Example with no parameters
|
|
4786
|
-
* const result = await finatic.getAccounts();
|
|
5019
|
+
* const result = await finatic.getAccounts({});
|
|
4787
5020
|
*
|
|
4788
5021
|
* // Access the response data
|
|
4789
5022
|
* if (result.success) {
|
|
@@ -4793,7 +5026,11 @@ declare class BrokersWrapper {
|
|
|
4793
5026
|
* @example
|
|
4794
5027
|
* ```typescript-client
|
|
4795
5028
|
* // Full example with optional parameters
|
|
4796
|
-
* const result = await finatic.getAccounts(
|
|
5029
|
+
* const result = await finatic.getAccounts({
|
|
5030
|
+
brokerId: 'alpaca',
|
|
5031
|
+
connectionId: '00000000-0000-0000-0000-000000000000',
|
|
5032
|
+
accountType: 'margin'
|
|
5033
|
+
* });
|
|
4797
5034
|
*
|
|
4798
5035
|
* // Handle response with warnings
|
|
4799
5036
|
* if (result.success) {
|
|
@@ -4806,19 +5043,19 @@ declare class BrokersWrapper {
|
|
|
4806
5043
|
* }
|
|
4807
5044
|
* ```
|
|
4808
5045
|
*/
|
|
4809
|
-
getAccounts(
|
|
5046
|
+
getAccounts(params?: GetAccountsParams): Promise<FinaticResponse$2<PaginatedData<FDXBrokerAccount>>>;
|
|
4810
5047
|
/**
|
|
4811
5048
|
* Get Order Fills
|
|
4812
5049
|
*
|
|
4813
5050
|
* Get order fills for a specific order.
|
|
4814
5051
|
*
|
|
4815
5052
|
* This endpoint returns all execution fills for the specified order.
|
|
4816
|
-
* @param orderId {string}
|
|
4817
|
-
* @param connectionId {string} (optional)
|
|
4818
|
-
* @param limit {number} (optional)
|
|
4819
|
-
* @param offset {number} (optional)
|
|
4820
|
-
* @param includeMetadata {boolean} (optional)
|
|
4821
|
-
* @returns {Promise<FinaticResponse<FDXBrokerOrderFill
|
|
5053
|
+
* @param params.orderId {string} Order ID
|
|
5054
|
+
* @param params.connectionId {string} (optional) Filter by connection ID
|
|
5055
|
+
* @param params.limit {number} (optional) Maximum number of fills to return
|
|
5056
|
+
* @param params.offset {number} (optional) Number of fills to skip for pagination
|
|
5057
|
+
* @param params.includeMetadata {boolean} (optional) Include fill metadata in response (excluded by default for FDX compliance)
|
|
5058
|
+
* @returns {Promise<FinaticResponse<PaginatedData<FDXBrokerOrderFill>>>} Standard response with success/Error/Warning structure
|
|
4822
5059
|
*
|
|
4823
5060
|
* Generated from: GET /api/v1/brokers/data/orders/{order_id}/fills
|
|
4824
5061
|
* @methodId get_order_fills_api_v1_brokers_data_orders__order_id__fills_get
|
|
@@ -4826,7 +5063,9 @@ declare class BrokersWrapper {
|
|
|
4826
5063
|
* @example
|
|
4827
5064
|
* ```typescript-client
|
|
4828
5065
|
* // Minimal example with required parameters only
|
|
4829
|
-
* const result = await finatic.getOrderFills(
|
|
5066
|
+
* const result = await finatic.getOrderFills({
|
|
5067
|
+
orderId: '00000000-0000-0000-0000-000000000000'
|
|
5068
|
+
* });
|
|
4830
5069
|
*
|
|
4831
5070
|
* // Access the response data
|
|
4832
5071
|
* if (result.success) {
|
|
@@ -4838,7 +5077,12 @@ declare class BrokersWrapper {
|
|
|
4838
5077
|
* @example
|
|
4839
5078
|
* ```typescript-client
|
|
4840
5079
|
* // Full example with optional parameters
|
|
4841
|
-
* const result = await finatic.getOrderFills(
|
|
5080
|
+
* const result = await finatic.getOrderFills({
|
|
5081
|
+
orderId: '00000000-0000-0000-0000-000000000000',
|
|
5082
|
+
connectionId: '00000000-0000-0000-0000-000000000000',
|
|
5083
|
+
limit: 100,
|
|
5084
|
+
offset: 0
|
|
5085
|
+
* });
|
|
4842
5086
|
*
|
|
4843
5087
|
* // Handle response with warnings
|
|
4844
5088
|
* if (result.success) {
|
|
@@ -4851,19 +5095,19 @@ declare class BrokersWrapper {
|
|
|
4851
5095
|
* }
|
|
4852
5096
|
* ```
|
|
4853
5097
|
*/
|
|
4854
|
-
getOrderFills(
|
|
5098
|
+
getOrderFills(params: GetOrderFillsParams): Promise<FinaticResponse$2<PaginatedData<FDXBrokerOrderFill>>>;
|
|
4855
5099
|
/**
|
|
4856
5100
|
* Get Order Events
|
|
4857
5101
|
*
|
|
4858
5102
|
* Get order events for a specific order.
|
|
4859
5103
|
*
|
|
4860
5104
|
* This endpoint returns all lifecycle events for the specified order.
|
|
4861
|
-
* @param orderId {string}
|
|
4862
|
-
* @param connectionId {string} (optional)
|
|
4863
|
-
* @param limit {number} (optional)
|
|
4864
|
-
* @param offset {number} (optional)
|
|
4865
|
-
* @param includeMetadata {boolean} (optional)
|
|
4866
|
-
* @returns {Promise<FinaticResponse<FDXBrokerOrderEvent
|
|
5105
|
+
* @param params.orderId {string} Order ID
|
|
5106
|
+
* @param params.connectionId {string} (optional) Filter by connection ID
|
|
5107
|
+
* @param params.limit {number} (optional) Maximum number of events to return
|
|
5108
|
+
* @param params.offset {number} (optional) Number of events to skip for pagination
|
|
5109
|
+
* @param params.includeMetadata {boolean} (optional) Include event metadata in response (excluded by default for FDX compliance)
|
|
5110
|
+
* @returns {Promise<FinaticResponse<PaginatedData<FDXBrokerOrderEvent>>>} Standard response with success/Error/Warning structure
|
|
4867
5111
|
*
|
|
4868
5112
|
* Generated from: GET /api/v1/brokers/data/orders/{order_id}/events
|
|
4869
5113
|
* @methodId get_order_events_api_v1_brokers_data_orders__order_id__events_get
|
|
@@ -4871,7 +5115,9 @@ declare class BrokersWrapper {
|
|
|
4871
5115
|
* @example
|
|
4872
5116
|
* ```typescript-client
|
|
4873
5117
|
* // Minimal example with required parameters only
|
|
4874
|
-
* const result = await finatic.getOrderEvents(
|
|
5118
|
+
* const result = await finatic.getOrderEvents({
|
|
5119
|
+
orderId: '00000000-0000-0000-0000-000000000000'
|
|
5120
|
+
* });
|
|
4875
5121
|
*
|
|
4876
5122
|
* // Access the response data
|
|
4877
5123
|
* if (result.success) {
|
|
@@ -4883,7 +5129,12 @@ declare class BrokersWrapper {
|
|
|
4883
5129
|
* @example
|
|
4884
5130
|
* ```typescript-client
|
|
4885
5131
|
* // Full example with optional parameters
|
|
4886
|
-
* const result = await finatic.getOrderEvents(
|
|
5132
|
+
* const result = await finatic.getOrderEvents({
|
|
5133
|
+
orderId: '00000000-0000-0000-0000-000000000000',
|
|
5134
|
+
connectionId: '00000000-0000-0000-0000-000000000000',
|
|
5135
|
+
limit: 100,
|
|
5136
|
+
offset: 0
|
|
5137
|
+
* });
|
|
4887
5138
|
*
|
|
4888
5139
|
* // Handle response with warnings
|
|
4889
5140
|
* if (result.success) {
|
|
@@ -4896,21 +5147,21 @@ declare class BrokersWrapper {
|
|
|
4896
5147
|
* }
|
|
4897
5148
|
* ```
|
|
4898
5149
|
*/
|
|
4899
|
-
getOrderEvents(
|
|
5150
|
+
getOrderEvents(params: GetOrderEventsParams): Promise<FinaticResponse$2<PaginatedData<FDXBrokerOrderEvent>>>;
|
|
4900
5151
|
/**
|
|
4901
5152
|
* Get Order Groups
|
|
4902
5153
|
*
|
|
4903
5154
|
* Get order groups.
|
|
4904
5155
|
*
|
|
4905
5156
|
* This endpoint returns order groups that contain multiple orders.
|
|
4906
|
-
* @param brokerId {string} (optional)
|
|
4907
|
-
* @param connectionId {string} (optional)
|
|
4908
|
-
* @param limit {number} (optional)
|
|
4909
|
-
* @param offset {number} (optional)
|
|
4910
|
-
* @param createdAfter {string} (optional)
|
|
4911
|
-
* @param createdBefore {string} (optional)
|
|
4912
|
-
* @param includeMetadata {boolean} (optional)
|
|
4913
|
-
* @returns {Promise<FinaticResponse<FDXBrokerOrderGroup
|
|
5157
|
+
* @param params.brokerId {string} (optional) Filter by broker ID
|
|
5158
|
+
* @param params.connectionId {string} (optional) Filter by connection ID
|
|
5159
|
+
* @param params.limit {number} (optional) Maximum number of order groups to return
|
|
5160
|
+
* @param params.offset {number} (optional) Number of order groups to skip for pagination
|
|
5161
|
+
* @param params.createdAfter {string} (optional) Filter order groups created after this timestamp
|
|
5162
|
+
* @param params.createdBefore {string} (optional) Filter order groups created before this timestamp
|
|
5163
|
+
* @param params.includeMetadata {boolean} (optional) Include group metadata in response (excluded by default for FDX compliance)
|
|
5164
|
+
* @returns {Promise<FinaticResponse<PaginatedData<FDXBrokerOrderGroup>>>} Standard response with success/Error/Warning structure
|
|
4914
5165
|
*
|
|
4915
5166
|
* Generated from: GET /api/v1/brokers/data/orders/groups
|
|
4916
5167
|
* @methodId get_order_groups_api_v1_brokers_data_orders_groups_get
|
|
@@ -4918,7 +5169,7 @@ declare class BrokersWrapper {
|
|
|
4918
5169
|
* @example
|
|
4919
5170
|
* ```typescript-client
|
|
4920
5171
|
* // Example with no parameters
|
|
4921
|
-
* const result = await finatic.getOrderGroups();
|
|
5172
|
+
* const result = await finatic.getOrderGroups({});
|
|
4922
5173
|
*
|
|
4923
5174
|
* // Access the response data
|
|
4924
5175
|
* if (result.success) {
|
|
@@ -4928,7 +5179,11 @@ declare class BrokersWrapper {
|
|
|
4928
5179
|
* @example
|
|
4929
5180
|
* ```typescript-client
|
|
4930
5181
|
* // Full example with optional parameters
|
|
4931
|
-
* const result = await finatic.getOrderGroups(
|
|
5182
|
+
* const result = await finatic.getOrderGroups({
|
|
5183
|
+
brokerId: 'alpaca',
|
|
5184
|
+
connectionId: '00000000-0000-0000-0000-000000000000',
|
|
5185
|
+
limit: 100
|
|
5186
|
+
* });
|
|
4932
5187
|
*
|
|
4933
5188
|
* // Handle response with warnings
|
|
4934
5189
|
* if (result.success) {
|
|
@@ -4941,7 +5196,7 @@ declare class BrokersWrapper {
|
|
|
4941
5196
|
* }
|
|
4942
5197
|
* ```
|
|
4943
5198
|
*/
|
|
4944
|
-
getOrderGroups(
|
|
5199
|
+
getOrderGroups(params?: GetOrderGroupsParams): Promise<FinaticResponse$2<PaginatedData<FDXBrokerOrderGroup>>>;
|
|
4945
5200
|
/**
|
|
4946
5201
|
* Get Position Lots
|
|
4947
5202
|
*
|
|
@@ -4949,14 +5204,14 @@ declare class BrokersWrapper {
|
|
|
4949
5204
|
*
|
|
4950
5205
|
* This endpoint returns tax lots for positions, which are used for tax reporting.
|
|
4951
5206
|
* Each lot tracks when a position was opened/closed and at what prices.
|
|
4952
|
-
* @param brokerId {string} (optional)
|
|
4953
|
-
* @param connectionId {string} (optional)
|
|
4954
|
-
* @param accountId {string} (optional)
|
|
4955
|
-
* @param symbol {string} (optional)
|
|
4956
|
-
* @param positionId {string} (optional)
|
|
4957
|
-
* @param limit {number} (optional)
|
|
4958
|
-
* @param offset {number} (optional)
|
|
4959
|
-
* @returns {Promise<FinaticResponse<FDXBrokerPositionLot
|
|
5207
|
+
* @param params.brokerId {string} (optional) Filter by broker ID
|
|
5208
|
+
* @param params.connectionId {string} (optional) Filter by connection ID
|
|
5209
|
+
* @param params.accountId {string} (optional) Filter by broker provided account ID
|
|
5210
|
+
* @param params.symbol {string} (optional) Filter by symbol
|
|
5211
|
+
* @param params.positionId {string} (optional) Filter by position ID
|
|
5212
|
+
* @param params.limit {number} (optional) Maximum number of position lots to return
|
|
5213
|
+
* @param params.offset {number} (optional) Number of position lots to skip for pagination
|
|
5214
|
+
* @returns {Promise<FinaticResponse<PaginatedData<FDXBrokerPositionLot>>>} Standard response with success/Error/Warning structure
|
|
4960
5215
|
*
|
|
4961
5216
|
* Generated from: GET /api/v1/brokers/data/positions/lots
|
|
4962
5217
|
* @methodId get_position_lots_api_v1_brokers_data_positions_lots_get
|
|
@@ -4964,7 +5219,7 @@ declare class BrokersWrapper {
|
|
|
4964
5219
|
* @example
|
|
4965
5220
|
* ```typescript-client
|
|
4966
5221
|
* // Example with no parameters
|
|
4967
|
-
* const result = await finatic.getPositionLots();
|
|
5222
|
+
* const result = await finatic.getPositionLots({});
|
|
4968
5223
|
*
|
|
4969
5224
|
* // Access the response data
|
|
4970
5225
|
* if (result.success) {
|
|
@@ -4974,7 +5229,11 @@ declare class BrokersWrapper {
|
|
|
4974
5229
|
* @example
|
|
4975
5230
|
* ```typescript-client
|
|
4976
5231
|
* // Full example with optional parameters
|
|
4977
|
-
* const result = await finatic.getPositionLots(
|
|
5232
|
+
* const result = await finatic.getPositionLots({
|
|
5233
|
+
brokerId: 'alpaca',
|
|
5234
|
+
connectionId: '00000000-0000-0000-0000-000000000000',
|
|
5235
|
+
accountId: '123456789'
|
|
5236
|
+
* });
|
|
4978
5237
|
*
|
|
4979
5238
|
* // Handle response with warnings
|
|
4980
5239
|
* if (result.success) {
|
|
@@ -4987,18 +5246,18 @@ declare class BrokersWrapper {
|
|
|
4987
5246
|
* }
|
|
4988
5247
|
* ```
|
|
4989
5248
|
*/
|
|
4990
|
-
getPositionLots(
|
|
5249
|
+
getPositionLots(params?: GetPositionLotsParams): Promise<FinaticResponse$2<PaginatedData<FDXBrokerPositionLot>>>;
|
|
4991
5250
|
/**
|
|
4992
5251
|
* Get Position Lot Fills
|
|
4993
5252
|
*
|
|
4994
5253
|
* Get position lot fills for a specific lot.
|
|
4995
5254
|
*
|
|
4996
5255
|
* This endpoint returns all fills associated with a specific position lot.
|
|
4997
|
-
* @param lotId {string}
|
|
4998
|
-
* @param connectionId {string} (optional)
|
|
4999
|
-
* @param limit {number} (optional)
|
|
5000
|
-
* @param offset {number} (optional)
|
|
5001
|
-
* @returns {Promise<FinaticResponse<FDXBrokerPositionLotFill
|
|
5256
|
+
* @param params.lotId {string} Position lot ID
|
|
5257
|
+
* @param params.connectionId {string} (optional) Filter by connection ID
|
|
5258
|
+
* @param params.limit {number} (optional) Maximum number of fills to return
|
|
5259
|
+
* @param params.offset {number} (optional) Number of fills to skip for pagination
|
|
5260
|
+
* @returns {Promise<FinaticResponse<PaginatedData<FDXBrokerPositionLotFill>>>} Standard response with success/Error/Warning structure
|
|
5002
5261
|
*
|
|
5003
5262
|
* Generated from: GET /api/v1/brokers/data/positions/lots/{lot_id}/fills
|
|
5004
5263
|
* @methodId get_position_lot_fills_api_v1_brokers_data_positions_lots__lot_id__fills_get
|
|
@@ -5006,7 +5265,9 @@ declare class BrokersWrapper {
|
|
|
5006
5265
|
* @example
|
|
5007
5266
|
* ```typescript-client
|
|
5008
5267
|
* // Minimal example with required parameters only
|
|
5009
|
-
* const result = await finatic.getPositionLotFills(
|
|
5268
|
+
* const result = await finatic.getPositionLotFills({
|
|
5269
|
+
lotId: '00000000-0000-0000-0000-000000000000'
|
|
5270
|
+
* });
|
|
5010
5271
|
*
|
|
5011
5272
|
* // Access the response data
|
|
5012
5273
|
* if (result.success) {
|
|
@@ -5018,7 +5279,12 @@ declare class BrokersWrapper {
|
|
|
5018
5279
|
* @example
|
|
5019
5280
|
* ```typescript-client
|
|
5020
5281
|
* // Full example with optional parameters
|
|
5021
|
-
* const result = await finatic.getPositionLotFills(
|
|
5282
|
+
* const result = await finatic.getPositionLotFills({
|
|
5283
|
+
lotId: '00000000-0000-0000-0000-000000000000',
|
|
5284
|
+
connectionId: '00000000-0000-0000-0000-000000000000',
|
|
5285
|
+
limit: 100,
|
|
5286
|
+
offset: 0
|
|
5287
|
+
* });
|
|
5022
5288
|
*
|
|
5023
5289
|
* // Handle response with warnings
|
|
5024
5290
|
* if (result.success) {
|
|
@@ -5031,7 +5297,7 @@ declare class BrokersWrapper {
|
|
|
5031
5297
|
* }
|
|
5032
5298
|
* ```
|
|
5033
5299
|
*/
|
|
5034
|
-
getPositionLotFills(
|
|
5300
|
+
getPositionLotFills(params: GetPositionLotFillsParams): Promise<FinaticResponse$2<PaginatedData<FDXBrokerPositionLotFill>>>;
|
|
5035
5301
|
}
|
|
5036
5302
|
|
|
5037
5303
|
/**
|
|
@@ -5188,6 +5454,10 @@ interface FinaticResponse$1<T> {
|
|
|
5188
5454
|
[key: string]: any;
|
|
5189
5455
|
}> | null;
|
|
5190
5456
|
}
|
|
5457
|
+
interface GetCompanyParams$1 {
|
|
5458
|
+
/** Company ID */
|
|
5459
|
+
companyId: string;
|
|
5460
|
+
}
|
|
5191
5461
|
/**
|
|
5192
5462
|
* Company wrapper functions.
|
|
5193
5463
|
* Provides simplified method names and response unwrapping.
|
|
@@ -5209,7 +5479,7 @@ declare class CompanyWrapper {
|
|
|
5209
5479
|
* Get Company
|
|
5210
5480
|
*
|
|
5211
5481
|
* Get public company details by ID (no user check, no sensitive data).
|
|
5212
|
-
* @param companyId {string}
|
|
5482
|
+
* @param params.companyId {string} Company ID
|
|
5213
5483
|
* @returns {Promise<FinaticResponse<CompanyResponse>>} Standard response with success/Error/Warning structure
|
|
5214
5484
|
*
|
|
5215
5485
|
* Generated from: GET /api/v1/company/{company_id}
|
|
@@ -5218,7 +5488,9 @@ declare class CompanyWrapper {
|
|
|
5218
5488
|
* @example
|
|
5219
5489
|
* ```typescript-client
|
|
5220
5490
|
* // Minimal example with required parameters only
|
|
5221
|
-
* const result = await finatic.getCompany(
|
|
5491
|
+
* const result = await finatic.getCompany({
|
|
5492
|
+
companyId: '00000000-0000-0000-0000-000000000000'
|
|
5493
|
+
* });
|
|
5222
5494
|
*
|
|
5223
5495
|
* // Access the response data
|
|
5224
5496
|
* if (result.success) {
|
|
@@ -5228,7 +5500,7 @@ declare class CompanyWrapper {
|
|
|
5228
5500
|
* }
|
|
5229
5501
|
* ```
|
|
5230
5502
|
*/
|
|
5231
|
-
getCompany(
|
|
5503
|
+
getCompany(params: GetCompanyParams$1): Promise<FinaticResponse$1<CompanyResponse>>;
|
|
5232
5504
|
}
|
|
5233
5505
|
|
|
5234
5506
|
/**
|
|
@@ -5263,8 +5535,8 @@ declare const SessionApiAxiosParamCreator: (configuration?: Configuration) => {
|
|
|
5263
5535
|
/**
|
|
5264
5536
|
* Start a session with a one-time token.
|
|
5265
5537
|
* @summary Start Session
|
|
5266
|
-
* @param {string} oneTimeToken
|
|
5267
|
-
* @param {SessionStartRequest} sessionStartRequest
|
|
5538
|
+
* @param {string} oneTimeToken One-time use token obtained from init_session endpoint to authenticate and start the session
|
|
5539
|
+
* @param {SessionStartRequest} sessionStartRequest Session start request containing optional user ID to associate with the session
|
|
5268
5540
|
* @param {*} [options] Override http request option.
|
|
5269
5541
|
* @throws {RequiredError}
|
|
5270
5542
|
*/
|
|
@@ -5302,8 +5574,8 @@ declare const SessionApiFp: (configuration?: Configuration) => {
|
|
|
5302
5574
|
/**
|
|
5303
5575
|
* Start a session with a one-time token.
|
|
5304
5576
|
* @summary Start Session
|
|
5305
|
-
* @param {string} oneTimeToken
|
|
5306
|
-
* @param {SessionStartRequest} sessionStartRequest
|
|
5577
|
+
* @param {string} oneTimeToken One-time use token obtained from init_session endpoint to authenticate and start the session
|
|
5578
|
+
* @param {SessionStartRequest} sessionStartRequest Session start request containing optional user ID to associate with the session
|
|
5307
5579
|
* @param {*} [options] Override http request option.
|
|
5308
5580
|
* @throws {RequiredError}
|
|
5309
5581
|
*/
|
|
@@ -5418,7 +5690,13 @@ interface SessionApiInitSessionApiV1SessionInitPostRequest {
|
|
|
5418
5690
|
* Request parameters for startSessionApiV1SessionStartPost operation in SessionApi.
|
|
5419
5691
|
*/
|
|
5420
5692
|
interface SessionApiStartSessionApiV1SessionStartPostRequest {
|
|
5693
|
+
/**
|
|
5694
|
+
* One-time use token obtained from init_session endpoint to authenticate and start the session
|
|
5695
|
+
*/
|
|
5421
5696
|
readonly oneTimeToken: string;
|
|
5697
|
+
/**
|
|
5698
|
+
* Session start request containing optional user ID to associate with the session
|
|
5699
|
+
*/
|
|
5422
5700
|
readonly sessionStartRequest: SessionStartRequest;
|
|
5423
5701
|
}
|
|
5424
5702
|
/**
|
|
@@ -5489,6 +5767,20 @@ interface FinaticResponse<T> {
|
|
|
5489
5767
|
[key: string]: any;
|
|
5490
5768
|
}> | null;
|
|
5491
5769
|
}
|
|
5770
|
+
interface InitSessionParams {
|
|
5771
|
+
/** Company API key */
|
|
5772
|
+
xApiKey: string;
|
|
5773
|
+
}
|
|
5774
|
+
interface StartSessionParams {
|
|
5775
|
+
/** One-time use token obtained from init_session endpoint to authenticate and start the session */
|
|
5776
|
+
OneTimeToken: string;
|
|
5777
|
+
/** Session start request containing optional user ID to associate with the session */
|
|
5778
|
+
body: SessionStartRequest;
|
|
5779
|
+
}
|
|
5780
|
+
interface GetSessionUserParams {
|
|
5781
|
+
/** Session ID */
|
|
5782
|
+
sessionId: string;
|
|
5783
|
+
}
|
|
5492
5784
|
/**
|
|
5493
5785
|
* Session wrapper functions.
|
|
5494
5786
|
* Provides simplified method names and response unwrapping.
|
|
@@ -5510,7 +5802,7 @@ declare class SessionWrapper {
|
|
|
5510
5802
|
* Init Session
|
|
5511
5803
|
*
|
|
5512
5804
|
* Initialize a new session with company API key.
|
|
5513
|
-
* @param xApiKey {string}
|
|
5805
|
+
* @param params.xApiKey {string} Company API key
|
|
5514
5806
|
* @returns {Promise<FinaticResponse<TokenResponseData>>} Standard response with success/Error/Warning structure
|
|
5515
5807
|
*
|
|
5516
5808
|
* Generated from: POST /api/v1/session/init
|
|
@@ -5519,7 +5811,7 @@ declare class SessionWrapper {
|
|
|
5519
5811
|
* @example
|
|
5520
5812
|
* ```typescript-client
|
|
5521
5813
|
* // Example with no parameters
|
|
5522
|
-
* const result = await finatic.initSession();
|
|
5814
|
+
* const result = await finatic.initSession({});
|
|
5523
5815
|
*
|
|
5524
5816
|
* // Access the response data
|
|
5525
5817
|
* if (result.success) {
|
|
@@ -5527,13 +5819,13 @@ declare class SessionWrapper {
|
|
|
5527
5819
|
* }
|
|
5528
5820
|
* ```
|
|
5529
5821
|
*/
|
|
5530
|
-
initSession(
|
|
5822
|
+
initSession(params: InitSessionParams): Promise<FinaticResponse<TokenResponseData>>;
|
|
5531
5823
|
/**
|
|
5532
5824
|
* Start Session
|
|
5533
5825
|
*
|
|
5534
5826
|
* Start a session with a one-time token.
|
|
5535
|
-
* @param OneTimeToken {string}
|
|
5536
|
-
* @param body {SessionStartRequest}
|
|
5827
|
+
* @param params.OneTimeToken {string} One-time use token obtained from init_session endpoint to authenticate and start the session
|
|
5828
|
+
* @param params.body {SessionStartRequest} Session start request containing optional user ID to associate with the session
|
|
5537
5829
|
* @returns {Promise<FinaticResponse<SessionResponseData>>} Standard response with success/Error/Warning structure
|
|
5538
5830
|
*
|
|
5539
5831
|
* Generated from: POST /api/v1/session/start
|
|
@@ -5542,7 +5834,7 @@ declare class SessionWrapper {
|
|
|
5542
5834
|
* @example
|
|
5543
5835
|
* ```typescript-client
|
|
5544
5836
|
* // Example with no parameters
|
|
5545
|
-
* const result = await finatic.startSession();
|
|
5837
|
+
* const result = await finatic.startSession({});
|
|
5546
5838
|
*
|
|
5547
5839
|
* // Access the response data
|
|
5548
5840
|
* if (result.success) {
|
|
@@ -5550,7 +5842,7 @@ declare class SessionWrapper {
|
|
|
5550
5842
|
* }
|
|
5551
5843
|
* ```
|
|
5552
5844
|
*/
|
|
5553
|
-
startSession(
|
|
5845
|
+
startSession(params: StartSessionParams): Promise<FinaticResponse<SessionResponseData>>;
|
|
5554
5846
|
/**
|
|
5555
5847
|
* Get Portal Url
|
|
5556
5848
|
*
|
|
@@ -5558,7 +5850,7 @@ declare class SessionWrapper {
|
|
|
5558
5850
|
*
|
|
5559
5851
|
* The session must be in ACTIVE or AUTHENTICATING state and the request must come from the same device
|
|
5560
5852
|
* that initiated the session. Device info is automatically validated from the request.
|
|
5561
|
-
* @param No parameters required for this method
|
|
5853
|
+
* @param params No parameters required for this method
|
|
5562
5854
|
* @returns {Promise<FinaticResponse<PortalUrlResponse>>} Standard response with success/Error/Warning structure
|
|
5563
5855
|
*
|
|
5564
5856
|
* Generated from: GET /api/v1/session/portal
|
|
@@ -5567,7 +5859,7 @@ declare class SessionWrapper {
|
|
|
5567
5859
|
* @example
|
|
5568
5860
|
* ```typescript-client
|
|
5569
5861
|
* // Example with no parameters
|
|
5570
|
-
* const result = await finatic.getPortalUrl();
|
|
5862
|
+
* const result = await finatic.getPortalUrl({});
|
|
5571
5863
|
*
|
|
5572
5864
|
* // Access the response data
|
|
5573
5865
|
* if (result.success) {
|
|
@@ -5575,7 +5867,7 @@ declare class SessionWrapper {
|
|
|
5575
5867
|
* }
|
|
5576
5868
|
* ```
|
|
5577
5869
|
*/
|
|
5578
|
-
getPortalUrl(): Promise<FinaticResponse<PortalUrlResponse>>;
|
|
5870
|
+
getPortalUrl(params?: {}): Promise<FinaticResponse<PortalUrlResponse>>;
|
|
5579
5871
|
/**
|
|
5580
5872
|
* Get Session User
|
|
5581
5873
|
*
|
|
@@ -5591,7 +5883,7 @@ declare class SessionWrapper {
|
|
|
5591
5883
|
* - Generates fresh tokens (not returning stored ones)
|
|
5592
5884
|
* - Only accessible to authenticated sessions with user_id
|
|
5593
5885
|
* - Validates that header session_id matches path session_id
|
|
5594
|
-
* @param sessionId {string}
|
|
5886
|
+
* @param params.sessionId {string} Session ID
|
|
5595
5887
|
* @returns {Promise<FinaticResponse<SessionUserResponse>>} Standard response with success/Error/Warning structure
|
|
5596
5888
|
*
|
|
5597
5889
|
* Generated from: GET /api/v1/session/{session_id}/user
|
|
@@ -5600,7 +5892,9 @@ declare class SessionWrapper {
|
|
|
5600
5892
|
* @example
|
|
5601
5893
|
* ```typescript-client
|
|
5602
5894
|
* // Minimal example with required parameters only
|
|
5603
|
-
* const result = await finatic.getSessionUser(
|
|
5895
|
+
* const result = await finatic.getSessionUser({
|
|
5896
|
+
sessionId: 'sess_1234567890abcdef'
|
|
5897
|
+
* });
|
|
5604
5898
|
*
|
|
5605
5899
|
* // Access the response data
|
|
5606
5900
|
* if (result.success) {
|
|
@@ -5610,7 +5904,7 @@ declare class SessionWrapper {
|
|
|
5610
5904
|
* }
|
|
5611
5905
|
* ```
|
|
5612
5906
|
*/
|
|
5613
|
-
getSessionUser(
|
|
5907
|
+
getSessionUser(params: GetSessionUserParams): Promise<FinaticResponse<SessionUserResponse>>;
|
|
5614
5908
|
}
|
|
5615
5909
|
|
|
5616
5910
|
/**
|
|
@@ -5925,28 +6219,34 @@ declare class FinaticConnect$1 extends EventEmitter {
|
|
|
5925
6219
|
*
|
|
5926
6220
|
* @methodId get_portal_url_api_v1_session_portal_get
|
|
5927
6221
|
* @category session
|
|
5928
|
-
* @param
|
|
5929
|
-
* @param
|
|
5930
|
-
* @param
|
|
5931
|
-
* @param
|
|
6222
|
+
* @param params - Optional parameters object
|
|
6223
|
+
* @param params.theme - Optional theme preset or custom theme object
|
|
6224
|
+
* @param params.brokers - Optional array of broker IDs to filter
|
|
6225
|
+
* @param params.email - Optional email address
|
|
6226
|
+
* @param params.mode - Optional mode ('light' or 'dark')
|
|
5932
6227
|
* @returns Portal URL string
|
|
5933
6228
|
* @example
|
|
5934
6229
|
* ```typescript-client
|
|
5935
|
-
* const url = await finatic.getPortalUrl('
|
|
6230
|
+
* const url = await finatic.getPortalUrl({ theme: 'default', brokers: ['broker-1'], email: 'user@example.com', mode: 'dark' });
|
|
5936
6231
|
* ```
|
|
5937
6232
|
* @example
|
|
5938
6233
|
* ```typescript-server
|
|
5939
|
-
* const url = await finatic.getPortalUrl('
|
|
6234
|
+
* const url = await finatic.getPortalUrl({ theme: 'default', brokers: ['broker-1'], email: 'user@example.com', mode: 'dark' });
|
|
5940
6235
|
* ```
|
|
5941
6236
|
* @example
|
|
5942
6237
|
* ```python
|
|
5943
|
-
* url = await finatic.get_portal_url('
|
|
6238
|
+
* url = await finatic.get_portal_url(theme='default', brokers=['broker-1'], email='user@example.com', mode='dark')
|
|
5944
6239
|
* ```
|
|
5945
6240
|
*/
|
|
5946
|
-
getPortalUrl(
|
|
5947
|
-
|
|
5948
|
-
|
|
5949
|
-
|
|
6241
|
+
getPortalUrl(params?: {
|
|
6242
|
+
theme?: string | {
|
|
6243
|
+
preset?: string;
|
|
6244
|
+
custom?: Record<string, unknown>;
|
|
6245
|
+
};
|
|
6246
|
+
brokers?: string[];
|
|
6247
|
+
email?: string;
|
|
6248
|
+
mode?: 'light' | 'dark';
|
|
6249
|
+
}): Promise<string>;
|
|
5950
6250
|
/**
|
|
5951
6251
|
* Open portal in iframe (Client SDK only).
|
|
5952
6252
|
* The portal handles user authentication and linking to session at the source of truth.
|
|
@@ -5954,27 +6254,38 @@ declare class FinaticConnect$1 extends EventEmitter {
|
|
|
5954
6254
|
*
|
|
5955
6255
|
* @methodId open_portal_client_sdk
|
|
5956
6256
|
* @category session
|
|
5957
|
-
* @param
|
|
5958
|
-
* @param
|
|
5959
|
-
* @param
|
|
5960
|
-
* @param
|
|
6257
|
+
* @param params - Optional parameters object
|
|
6258
|
+
* @param params.theme - Optional theme preset or custom theme object
|
|
6259
|
+
* @param params.brokers - Optional array of broker IDs to filter
|
|
6260
|
+
* @param params.email - Optional email address
|
|
6261
|
+
* @param params.mode - Optional mode ('light' or 'dark')
|
|
5961
6262
|
* @param onSuccess - Optional callback when portal authentication succeeds
|
|
5962
6263
|
* @param onError - Optional callback when portal authentication fails
|
|
5963
6264
|
* @param onClose - Optional callback when portal is closed
|
|
5964
6265
|
* @returns Promise that resolves when portal is opened
|
|
5965
6266
|
* @example
|
|
5966
6267
|
* ```typescript-client
|
|
5967
|
-
* await finatic.openPortal(
|
|
6268
|
+
* await finatic.openPortal({
|
|
6269
|
+
* theme: 'default',
|
|
6270
|
+
* brokers: ['broker-1'],
|
|
6271
|
+
* email: 'user@example.com',
|
|
6272
|
+
* mode: 'dark'
|
|
6273
|
+
* },
|
|
5968
6274
|
* (userId) => console.log('User authenticated:', userId),
|
|
5969
6275
|
* (error) => console.error('Portal error:', error),
|
|
5970
6276
|
* () => console.log('Portal closed')
|
|
5971
6277
|
* );
|
|
5972
6278
|
* ```
|
|
5973
6279
|
*/
|
|
5974
|
-
openPortal(
|
|
5975
|
-
|
|
5976
|
-
|
|
5977
|
-
|
|
6280
|
+
openPortal(params?: {
|
|
6281
|
+
theme?: string | {
|
|
6282
|
+
preset?: string;
|
|
6283
|
+
custom?: Record<string, unknown>;
|
|
6284
|
+
};
|
|
6285
|
+
brokers?: string[];
|
|
6286
|
+
email?: string;
|
|
6287
|
+
mode?: 'light' | 'dark';
|
|
6288
|
+
}, onSuccess?: (userId: string) => void, onError?: (error: Error) => void, onClose?: () => void): Promise<void>;
|
|
5978
6289
|
/**
|
|
5979
6290
|
* Get current user ID (set after portal authentication).
|
|
5980
6291
|
*
|
|
@@ -6100,7 +6411,7 @@ declare class FinaticConnect$1 extends EventEmitter {
|
|
|
6100
6411
|
* print('Error:', result.error['message'])
|
|
6101
6412
|
* ```
|
|
6102
6413
|
*/
|
|
6103
|
-
getCompany(params
|
|
6414
|
+
getCompany(params: GetCompanyParams): Promise<Awaited<ReturnType<typeof this$1.company.getCompany>>>;
|
|
6104
6415
|
/**
|
|
6105
6416
|
* Get Brokers
|
|
6106
6417
|
*
|
|
@@ -6252,7 +6563,7 @@ declare class FinaticConnect$1 extends EventEmitter {
|
|
|
6252
6563
|
* print('Error:', result.error['message'])
|
|
6253
6564
|
* ```
|
|
6254
6565
|
*/
|
|
6255
|
-
disconnectCompanyFromBroker(params
|
|
6566
|
+
disconnectCompanyFromBroker(params: DisconnectCompanyFromBrokerParams): Promise<Awaited<ReturnType<typeof this$1.brokers.disconnectCompanyFromBroker>>>;
|
|
6256
6567
|
/**
|
|
6257
6568
|
* Get Orders
|
|
6258
6569
|
*
|
|
@@ -6330,7 +6641,7 @@ declare class FinaticConnect$1 extends EventEmitter {
|
|
|
6330
6641
|
* print('Error:', result.error['message'], result.error['code'])
|
|
6331
6642
|
* ```
|
|
6332
6643
|
*/
|
|
6333
|
-
getOrders(params?:
|
|
6644
|
+
getOrders(params?: GetOrdersParams): Promise<Awaited<ReturnType<typeof this$1.brokers.getOrders>>>;
|
|
6334
6645
|
/**
|
|
6335
6646
|
* Get Positions
|
|
6336
6647
|
*
|
|
@@ -6408,7 +6719,7 @@ declare class FinaticConnect$1 extends EventEmitter {
|
|
|
6408
6719
|
* print('Error:', result.error['message'], result.error['code'])
|
|
6409
6720
|
* ```
|
|
6410
6721
|
*/
|
|
6411
|
-
getPositions(params?:
|
|
6722
|
+
getPositions(params?: GetPositionsParams): Promise<Awaited<ReturnType<typeof this$1.brokers.getPositions>>>;
|
|
6412
6723
|
/**
|
|
6413
6724
|
* Get Balances
|
|
6414
6725
|
*
|
|
@@ -6486,7 +6797,7 @@ declare class FinaticConnect$1 extends EventEmitter {
|
|
|
6486
6797
|
* print('Error:', result.error['message'], result.error['code'])
|
|
6487
6798
|
* ```
|
|
6488
6799
|
*/
|
|
6489
|
-
getBalances(params?:
|
|
6800
|
+
getBalances(params?: GetBalancesParams): Promise<Awaited<ReturnType<typeof this$1.brokers.getBalances>>>;
|
|
6490
6801
|
/**
|
|
6491
6802
|
* Get Accounts
|
|
6492
6803
|
*
|
|
@@ -6564,7 +6875,7 @@ declare class FinaticConnect$1 extends EventEmitter {
|
|
|
6564
6875
|
* print('Error:', result.error['message'], result.error['code'])
|
|
6565
6876
|
* ```
|
|
6566
6877
|
*/
|
|
6567
|
-
getAccounts(params?:
|
|
6878
|
+
getAccounts(params?: GetAccountsParams): Promise<Awaited<ReturnType<typeof this$1.brokers.getAccounts>>>;
|
|
6568
6879
|
/**
|
|
6569
6880
|
* Get Order Fills
|
|
6570
6881
|
*
|
|
@@ -6650,7 +6961,7 @@ declare class FinaticConnect$1 extends EventEmitter {
|
|
|
6650
6961
|
* print('Error:', result.error['message'], result.error['code'])
|
|
6651
6962
|
* ```
|
|
6652
6963
|
*/
|
|
6653
|
-
getOrderFills(params
|
|
6964
|
+
getOrderFills(params: GetOrderFillsParams): Promise<Awaited<ReturnType<typeof this$1.brokers.getOrderFills>>>;
|
|
6654
6965
|
/**
|
|
6655
6966
|
* Get Order Events
|
|
6656
6967
|
*
|
|
@@ -6736,7 +7047,7 @@ declare class FinaticConnect$1 extends EventEmitter {
|
|
|
6736
7047
|
* print('Error:', result.error['message'], result.error['code'])
|
|
6737
7048
|
* ```
|
|
6738
7049
|
*/
|
|
6739
|
-
getOrderEvents(params
|
|
7050
|
+
getOrderEvents(params: GetOrderEventsParams): Promise<Awaited<ReturnType<typeof this$1.brokers.getOrderEvents>>>;
|
|
6740
7051
|
/**
|
|
6741
7052
|
* Get Order Groups
|
|
6742
7053
|
*
|
|
@@ -6813,7 +7124,7 @@ declare class FinaticConnect$1 extends EventEmitter {
|
|
|
6813
7124
|
* print('Error:', result.error['message'], result.error['code'])
|
|
6814
7125
|
* ```
|
|
6815
7126
|
*/
|
|
6816
|
-
getOrderGroups(params?:
|
|
7127
|
+
getOrderGroups(params?: GetOrderGroupsParams): Promise<Awaited<ReturnType<typeof this$1.brokers.getOrderGroups>>>;
|
|
6817
7128
|
/**
|
|
6818
7129
|
* Get Position Lots
|
|
6819
7130
|
*
|
|
@@ -6891,7 +7202,7 @@ declare class FinaticConnect$1 extends EventEmitter {
|
|
|
6891
7202
|
* print('Error:', result.error['message'], result.error['code'])
|
|
6892
7203
|
* ```
|
|
6893
7204
|
*/
|
|
6894
|
-
getPositionLots(params?:
|
|
7205
|
+
getPositionLots(params?: GetPositionLotsParams): Promise<Awaited<ReturnType<typeof this$1.brokers.getPositionLots>>>;
|
|
6895
7206
|
/**
|
|
6896
7207
|
* Get Position Lot Fills
|
|
6897
7208
|
*
|
|
@@ -6977,7 +7288,7 @@ declare class FinaticConnect$1 extends EventEmitter {
|
|
|
6977
7288
|
* print('Error:', result.error['message'], result.error['code'])
|
|
6978
7289
|
* ```
|
|
6979
7290
|
*/
|
|
6980
|
-
getPositionLotFills(params
|
|
7291
|
+
getPositionLotFills(params: GetPositionLotFillsParams): Promise<Awaited<ReturnType<typeof this$1.brokers.getPositionLotFills>>>;
|
|
6981
7292
|
/**
|
|
6982
7293
|
* Get all Orders across all pages.
|
|
6983
7294
|
* Auto-generated from paginated endpoint.
|
|
@@ -7544,5 +7855,5 @@ declare class FinaticConnect extends FinaticConnect$1 {
|
|
|
7544
7855
|
static readonly __CUSTOM_CLASS__ = true;
|
|
7545
7856
|
}
|
|
7546
7857
|
|
|
7547
|
-
export { AccountStatus, ApiError, BrokerDataAccountTypeEnum, BrokerDataAssetTypeEnum, BrokerDataOrderSideEnum, BrokerDataOrderStatusEnum, BrokerDataPositionStatusEnum, BrokersApi, BrokersApiAxiosParamCreator, BrokersApiFactory, BrokersApiFp, BrokersWrapper, CompanyApi, CompanyApiAxiosParamCreator, CompanyApiFactory, CompanyApiFp, CompanyWrapper, Configuration, EventEmitter, FDXAccountStatus, FDXAccountType, FDXAssetType, FDXBalanceType, FDXOrderClass, FDXOrderEventType, FDXOrderGroupType, FDXOrderSide, FDXOrderStatus, FDXOrderType, FDXPositionSide, FDXPositionStatus, FDXSecurityIdType, FDXTimeInForce, FinaticConnect, SessionApi, SessionApiAxiosParamCreator, SessionApiFactory, SessionApiFp, SessionStatus, SessionWrapper, ValidationError, addErrorInterceptor, addRequestInterceptor, addResponseInterceptor, appendBrokerFilterToURL, appendThemeToURL, applyErrorInterceptors, applyRequestInterceptors, applyResponseInterceptors, coerceEnumValue, convertToPlainObject, defaultConfig, generateCacheKey, generateRequestId, getCache, getConfig, getLogger, handleError, numberSchema, retryApiCall, stringSchema, unwrapAxiosResponse, validateParams };
|
|
7548
|
-
export type { Accounttype, ValidationError$1 as ApiValidationError, Assettype, Availablebalance, Availabletowithdraw, Averagebuyprice, Averagefillprice, Averagesellprice, Balancetype, BrokerInfo, BrokersApiDisconnectCompanyFromBrokerApiV1BrokersDisconnectCompanyConnectionIdDeleteRequest, BrokersApiGetAccountsApiV1BrokersDataAccountsGetRequest, BrokersApiGetBalancesApiV1BrokersDataBalancesGetRequest, BrokersApiGetOrderEventsApiV1BrokersDataOrdersOrderIdEventsGetRequest, BrokersApiGetOrderFillsApiV1BrokersDataOrdersOrderIdFillsGetRequest, BrokersApiGetOrderGroupsApiV1BrokersDataOrdersGroupsGetRequest, BrokersApiGetOrdersApiV1BrokersDataOrdersGetRequest, BrokersApiGetPositionLotFillsApiV1BrokersDataPositionsLotsLotIdFillsGetRequest, BrokersApiGetPositionLotsApiV1BrokersDataPositionsLotsGetRequest, BrokersApiGetPositionsApiV1BrokersDataPositionsGetRequest, BrokersApiInterface, Buyingpower, Cashbalance, Closedquantity, Closepriceavg, Commission, Commissionshare, CompanyApiGetCompanyApiV1CompanyCompanyIdGet0Request, CompanyApiGetCompanyApiV1CompanyCompanyIdGetRequest, CompanyApiInterface, CompanyResponse, ConfigurationParameters, Costbasis, Costbasis1, Costbasiswithcommission, Costbasiswithcommission1, Currentbalance, Currentprice, DisconnectActionResult, ErrorInterceptor, Eventtype, FDXBrokerAccount, FDXBrokerBalance, FDXBrokerOrder, FDXBrokerOrderEvent, FDXBrokerOrderFill, FDXBrokerOrderGroup, FDXBrokerPosition, FDXBrokerPositionLot, FDXBrokerPositionLotFill, FDXOrderGroupOrder, FDXOrderLeg, Filledquantity, Fillprice, Fillquantity, FinaticConnectOptions, FinaticResponseCompanyResponse, FinaticResponseDisconnectActionResult, FinaticResponseListBrokerInfo, FinaticResponseListFDXBrokerAccount, FinaticResponseListFDXBrokerBalance, FinaticResponseListFDXBrokerOrder, FinaticResponseListFDXBrokerOrderEvent, FinaticResponseListFDXBrokerOrderFill, FinaticResponseListFDXBrokerOrderGroup, FinaticResponseListFDXBrokerPosition, FinaticResponseListFDXBrokerPositionLot, FinaticResponseListFDXBrokerPositionLotFill, FinaticResponseListUserBrokerConnectionWithPermissions, FinaticResponsePortalUrlResponse, FinaticResponseSessionResponseData, FinaticResponseSessionUserResponse, FinaticResponseTokenResponseData, Futureunderlyingassettype, Grouptype, HTTPValidationError, Initialmargin, InterceptorChain, Limitprice, LogLevel, Logger, Maintenancemargin, Marketvalue, Netliquidationvalue, Openprice, Openquantity, Orderclass, Orderstatus, Ordertype, ParsedFinaticError, Pendingbalance, PortalUrlResponse, Previousstatus, Price, Quantity, Quantity1, Quantity2, Realizedprofitloss, Realizedprofitloss1, Realizedprofitlosspercent, Realizedprofitlosswithcommission, Realizedprofitlosswithcommission1, Remainingquantity, Remainingquantity1, RequestInterceptor, ResponseInterceptor, RetryOptions, SdkConfig, Securityidtype, SessionApiGetPortalUrlApiV1SessionPortalGetRequest, SessionApiGetSessionUserApiV1SessionSessionIdUserGetRequest, SessionApiInitSessionApiV1SessionInitPostRequest, SessionApiInterface, SessionApiStartSessionApiV1SessionStartPostRequest, SessionResponseData, SessionStartRequest, SessionUserResponse, Side, Side1, Side2, Side3, Status, Status1, Stopprice, Strikeprice, SuccessPayloadCompanyResponse, SuccessPayloadDisconnectActionResult, SuccessPayloadListBrokerInfo, SuccessPayloadListFDXBrokerAccount, SuccessPayloadListFDXBrokerBalance, SuccessPayloadListFDXBrokerOrder, SuccessPayloadListFDXBrokerOrderEvent, SuccessPayloadListFDXBrokerOrderFill, SuccessPayloadListFDXBrokerOrderGroup, SuccessPayloadListFDXBrokerPosition, SuccessPayloadListFDXBrokerPositionLot, SuccessPayloadListFDXBrokerPositionLotFill, SuccessPayloadListUserBrokerConnectionWithPermissions, SuccessPayloadPortalUrlResponse, SuccessPayloadSessionResponseData, SuccessPayloadSessionUserResponse, SuccessPayloadTokenResponseData, Timeinforce, TokenResponseData, Totalcashvalue, Totalrealizedpnl, Units, Unrealizedprofitloss, Unrealizedprofitlosspercent, UserBrokerConnectionWithPermissions, ValidationErrorLocInner };
|
|
7858
|
+
export { AccountStatus, ApiError, BrokerDataAccountTypeEnum, BrokerDataAssetTypeEnum, BrokerDataOrderSideEnum, BrokerDataOrderStatusEnum, BrokerDataPositionStatusEnum, BrokersApi, BrokersApiAxiosParamCreator, BrokersApiFactory, BrokersApiFp, BrokersWrapper, CompanyApi, CompanyApiAxiosParamCreator, CompanyApiFactory, CompanyApiFp, CompanyWrapper, Configuration, EventEmitter, FDXAccountStatus, FDXAccountType, FDXAssetType, FDXBalanceType, FDXOrderClass, FDXOrderEventType, FDXOrderGroupType, FDXOrderSide, FDXOrderStatus, FDXOrderType, FDXPositionSide, FDXPositionStatus, FDXSecurityIdType, FDXTimeInForce, FinaticConnect, PaginatedData, SessionApi, SessionApiAxiosParamCreator, SessionApiFactory, SessionApiFp, SessionStatus, SessionWrapper, ValidationError, addErrorInterceptor, addRequestInterceptor, addResponseInterceptor, appendBrokerFilterToURL, appendThemeToURL, applyErrorInterceptors, applyRequestInterceptors, applyResponseInterceptors, coerceEnumValue, convertToPlainObject, defaultConfig, generateCacheKey, generateRequestId, getCache, getConfig, getLogger, handleError, numberSchema, retryApiCall, stringSchema, unwrapAxiosResponse, validateParams };
|
|
7859
|
+
export type { Accounttype, ValidationError$1 as ApiValidationError, Assettype, Availablebalance, Availabletowithdraw, Averagebuyprice, Averagefillprice, Averagesellprice, Balancetype, BrokerInfo, BrokersApiDisconnectCompanyFromBrokerApiV1BrokersDisconnectCompanyConnectionIdDeleteRequest, BrokersApiGetAccountsApiV1BrokersDataAccountsGetRequest, BrokersApiGetBalancesApiV1BrokersDataBalancesGetRequest, BrokersApiGetOrderEventsApiV1BrokersDataOrdersOrderIdEventsGetRequest, BrokersApiGetOrderFillsApiV1BrokersDataOrdersOrderIdFillsGetRequest, BrokersApiGetOrderGroupsApiV1BrokersDataOrdersGroupsGetRequest, BrokersApiGetOrdersApiV1BrokersDataOrdersGetRequest, BrokersApiGetPositionLotFillsApiV1BrokersDataPositionsLotsLotIdFillsGetRequest, BrokersApiGetPositionLotsApiV1BrokersDataPositionsLotsGetRequest, BrokersApiGetPositionsApiV1BrokersDataPositionsGetRequest, BrokersApiInterface, Buyingpower, Cashbalance, Closedquantity, Closepriceavg, Commission, Commissionshare, CompanyApiGetCompanyApiV1CompanyCompanyIdGet0Request, CompanyApiGetCompanyApiV1CompanyCompanyIdGetRequest, CompanyApiInterface, CompanyResponse, ConfigurationParameters, Costbasis, Costbasis1, Costbasiswithcommission, Costbasiswithcommission1, Currentbalance, Currentprice, DisconnectActionResult, ErrorInterceptor, Eventtype, FDXBrokerAccount, FDXBrokerBalance, FDXBrokerOrder, FDXBrokerOrderEvent, FDXBrokerOrderFill, FDXBrokerOrderGroup, FDXBrokerPosition, FDXBrokerPositionLot, FDXBrokerPositionLotFill, FDXOrderGroupOrder, FDXOrderLeg, Filledquantity, Fillprice, Fillquantity, FinaticConnectOptions, FinaticResponse$3 as FinaticResponse, FinaticResponseCompanyResponse, FinaticResponseDisconnectActionResult, FinaticResponseListBrokerInfo, FinaticResponseListFDXBrokerAccount, FinaticResponseListFDXBrokerBalance, FinaticResponseListFDXBrokerOrder, FinaticResponseListFDXBrokerOrderEvent, FinaticResponseListFDXBrokerOrderFill, FinaticResponseListFDXBrokerOrderGroup, FinaticResponseListFDXBrokerPosition, FinaticResponseListFDXBrokerPositionLot, FinaticResponseListFDXBrokerPositionLotFill, FinaticResponseListUserBrokerConnectionWithPermissions, FinaticResponsePortalUrlResponse, FinaticResponseSessionResponseData, FinaticResponseSessionUserResponse, FinaticResponseTokenResponseData, Futureunderlyingassettype, Grouptype, HTTPValidationError, Initialmargin, InterceptorChain, Limitprice, LogLevel, Logger, Maintenancemargin, Marketvalue, Netliquidationvalue, Openprice, Openquantity, Orderclass, Orderstatus, Ordertype, PaginationMeta, ParsedFinaticError, Pendingbalance, PortalUrlResponse, Previousstatus, Price, Quantity, Quantity1, Quantity2, Realizedprofitloss, Realizedprofitloss1, Realizedprofitlosspercent, Realizedprofitlosswithcommission, Realizedprofitlosswithcommission1, Remainingquantity, Remainingquantity1, RequestInterceptor, ResponseInterceptor, RetryOptions, SdkConfig, Securityidtype, SessionApiGetPortalUrlApiV1SessionPortalGetRequest, SessionApiGetSessionUserApiV1SessionSessionIdUserGetRequest, SessionApiInitSessionApiV1SessionInitPostRequest, SessionApiInterface, SessionApiStartSessionApiV1SessionStartPostRequest, SessionResponseData, SessionStartRequest, SessionUserResponse, Side, Side1, Side2, Side3, Status, Status1, Stopprice, Strikeprice, SuccessPayloadCompanyResponse, SuccessPayloadDisconnectActionResult, SuccessPayloadListBrokerInfo, SuccessPayloadListFDXBrokerAccount, SuccessPayloadListFDXBrokerBalance, SuccessPayloadListFDXBrokerOrder, SuccessPayloadListFDXBrokerOrderEvent, SuccessPayloadListFDXBrokerOrderFill, SuccessPayloadListFDXBrokerOrderGroup, SuccessPayloadListFDXBrokerPosition, SuccessPayloadListFDXBrokerPositionLot, SuccessPayloadListFDXBrokerPositionLotFill, SuccessPayloadListUserBrokerConnectionWithPermissions, SuccessPayloadPortalUrlResponse, SuccessPayloadSessionResponseData, SuccessPayloadSessionUserResponse, SuccessPayloadTokenResponseData, Timeinforce, TokenResponseData, Totalcashvalue, Totalrealizedpnl, Units, Unrealizedprofitloss, Unrealizedprofitlosspercent, UserBrokerConnectionWithPermissions, ValidationErrorLocInner };
|