@finatic/client 0.9.6 → 0.9.8

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 CHANGED
@@ -39,24 +39,24 @@ The portal allows users to connect their broker accounts. You can either:
39
39
  **Option A: Open portal in iframe (recommended)**
40
40
 
41
41
  ```typescript
42
- await finatic.openPortal(
43
- 'dark', // Theme: 'light' | 'dark' | theme object
44
- ['alpaca', 'tradier'], // Optional: Filter specific brokers
45
- 'user@example.com', // Optional: Pre-fill email
46
- 'modal', // Mode: 'modal' | 'fullscreen'
47
- (userId) => {
42
+ await finatic.openPortal({
43
+ theme: { preset: 'stockAlgos' }, // Theme: 'light' | 'dark' | theme object
44
+ brokers: ['alpaca', 'tradier'], // Optional: Filter specific brokers
45
+ email: 'user@example.com', // Optional: Pre-fill email
46
+ mode: 'dark', // Optional: 'light' | 'dark'
47
+ onSuccess: (userId) => {
48
48
  // User successfully authenticated
49
49
  console.log('User authenticated:', userId);
50
50
  },
51
- (error) => {
51
+ onError: (error) => {
52
52
  // Handle authentication error
53
53
  console.error('Portal error:', error);
54
54
  },
55
- () => {
55
+ onClose: () => {
56
56
  // Portal was closed
57
57
  console.log('Portal closed');
58
58
  }
59
- );
59
+ });
60
60
  ```
61
61
 
62
62
  **Option B: Get portal URL and redirect**
@@ -131,12 +131,10 @@ async function setupFinatic() {
131
131
  const finatic = await FinaticConnect.init(token);
132
132
 
133
133
  // 2. Open portal for authentication
134
- await finatic.openPortal(
135
- 'dark',
136
- undefined, // Show all brokers
137
- undefined, // No pre-filled email
138
- 'modal',
139
- async (userId) => {
134
+ await finatic.openPortal({
135
+ theme: { preset: 'stockAlgos' },
136
+ mode: 'dark',
137
+ onSuccess: async (userId) => {
140
138
  console.log('User authenticated:', userId);
141
139
 
142
140
  // 3. Fetch data after authentication
@@ -148,10 +146,10 @@ async function setupFinatic() {
148
146
  console.log('Positions:', positions);
149
147
  console.log('Accounts:', accounts);
150
148
  },
151
- (error) => {
149
+ onError: (error) => {
152
150
  console.error('Authentication failed:', error);
153
151
  }
154
- );
152
+ });
155
153
  }
156
154
 
157
155
  setupFinatic();
package/dist/index.d.ts CHANGED
@@ -131,9 +131,37 @@ declare class BaseAPI {
131
131
  * https://openapi-generator.tech
132
132
  * Do not edit the class manually.
133
133
  */
134
- declare enum AccountStatus {
135
- Active = "active",
136
- Inactive = "inactive"
134
+ interface Accounts {
135
+ 'id'?: string;
136
+ 'api_key_created_at'?: string | null;
137
+ 'api_key_expires_at'?: string | null;
138
+ 'api_key_hash'?: string | null;
139
+ 'api_key_last_used_at'?: string | null;
140
+ 'compliance_agreement'?: boolean | null;
141
+ 'created_at': string | null;
142
+ 'created_by'?: string | null;
143
+ 'email'?: string | null;
144
+ 'is_personal_account': boolean;
145
+ 'name': string;
146
+ 'onboarding_completed'?: boolean | null;
147
+ 'onboarding_step'?: number | null;
148
+ 'picture_url'?: string | null;
149
+ 'primary_owner_user_id': string;
150
+ 'public_data': any;
151
+ 'referral_source'?: string | null;
152
+ 'sandbox_api_key_hash'?: string | null;
153
+ 'sandbox_key_created_at'?: string | null;
154
+ 'sandbox_key_expires_at'?: string | null;
155
+ 'sandbox_key_last_used_at'?: string | null;
156
+ 'slug'?: string | null;
157
+ 'terms_accepted_at'?: string | null;
158
+ 'trading_enabled'?: boolean | null;
159
+ 'trading_usage_description'?: string | null;
160
+ 'updated_at': string | null;
161
+ 'updated_by'?: string | null;
162
+ 'use_case_features'?: {
163
+ [key: string]: any;
164
+ } | null;
137
165
  }
138
166
 
139
167
  /**
@@ -354,7 +382,7 @@ declare enum BrokerDataPositionStatusEnum {
354
382
  * Do not edit the class manually.
355
383
  */
356
384
  /**
357
- * Model for broker information.
385
+ * Model for broker information. This model represents metadata about an available broker integration. Used by the GET /brokers endpoint to return a list of all supported brokers with their capabilities, authentication requirements, and display information. The model provides clients with the information needed to: - Display broker options in UI - Determine authentication flow (OAuth vs API key) - Check feature availability - Handle broker aliases that resolve to base brokers Attributes ---------- id : str Unique broker identifier used in API requests (e.g., \"tradestation\", \"tasty_trade\"). This is the value used in BrokerConnectionRequest.broker_id. name : str Internal broker name, typically matching the id. Used for internal identification and logging. display_name : str Human-readable broker name for display in UI (e.g., \"TradeStation\", \"TastyTrade\"). Should be formatted for end-user presentation. description : str Detailed description of the broker, including supported features, account types, and any relevant information for users. website : str Official broker website URL. Used for linking and reference. features : list[str] List of supported features for this broker (e.g., [\"trading\", \"options\", \"futures\", \"crypto\"]). Used to determine what operations are available. auth_type : str Authentication method required by the broker. Common values: - \"oauth\": OAuth 2.0 flow (may be multi-step) - \"api_key\": API key/secret authentication - \"username_password\": Username and password authentication logo_path : str Path or URL to the broker\'s logo image. Used for UI display. is_active : bool Whether the broker integration is currently active and available for new connections. Inactive brokers may still support existing connections but cannot accept new ones. is_alias : bool Whether this broker entry is an alias that resolves to another broker. Default is False. When True, base_broker_id indicates the actual broker. base_broker_id : str | None The actual broker_id this alias resolves to. Only set when is_alias=True. Used to route requests to the correct broker adapter. Default is None. supports_trading : bool Whether this broker supports trading operations (placing, canceling, modifying orders). Default is True. Some brokers may be read-only. Notes ----- 1. **Broker Aliases**: Aliases allow multiple broker entries to share the same underlying implementation. Useful for rebranding or regional variants. 2. **Feature List**: The features list is used by clients to enable/disable UI elements and validate operation availability. 3. **Caching**: Broker information is loaded once at startup and cached. Changes require application restart to take effect. 4. **Auth Type Handling**: Clients should check auth_type to determine the appropriate authentication flow and UI components to display. Examples -------- >>> # Standard broker entry >>> broker = BrokerInfo( ... id=\"tradestation\", ... name=\"tradestation\", ... display_name=\"TradeStation\", ... description=\"Professional trading platform\", ... website=\"https://www.tradestation.com\", ... features=[\"trading\", \"options\", \"futures\"], ... auth_type=\"oauth\", ... logo_path=\"/logos/tradestation.png\", ... is_active=True, ... supports_trading=True, ... ) >>> # Broker alias >>> alias = BrokerInfo( ... id=\"tradestation_pro\", ... name=\"tradestation_pro\", ... display_name=\"TradeStation Pro\", ... description=\"TradeStation Professional\", ... website=\"https://www.tradestation.com\", ... features=[\"trading\", \"options\"], ... auth_type=\"oauth\", ... logo_path=\"/logos/tradestation_pro.png\", ... is_active=True, ... is_alias=True, ... base_broker_id=\"tradestation\", ... supports_trading=True, ... ) See Also -------- finaticapi.api.v1.routers.brokers.brokers_router.get_brokers : Endpoint that returns list of BrokerInfo BrokerConnectionRequest : Request model that uses broker_id from this model finatic_broker_factory.core.broker_factory.BrokerFactory.get_available_brokers : Factory method that provides broker data
358
386
  */
359
387
  interface BrokerInfo {
360
388
  'id': string;
@@ -473,31 +501,6 @@ interface Commission {
473
501
  interface Commissionshare {
474
502
  }
475
503
 
476
- /**
477
- * Finatic FastAPI Backend
478
- * FinaticAPI REST API
479
- *
480
- * The version of the OpenAPI document: 1.0.0
481
- *
482
- *
483
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
484
- * https://openapi-generator.tech
485
- * Do not edit the class manually.
486
- */
487
- /**
488
- * Schema for company response data - minimal public fields only.
489
- */
490
- interface CompanyResponse {
491
- 'name': string;
492
- 'email'?: string | null;
493
- 'use_case_features'?: Array<string> | null;
494
- 'is_active'?: boolean;
495
- 'trading_enabled'?: boolean;
496
- 'picture_url'?: string | null;
497
- 'created_at'?: string | null;
498
- 'updated_at'?: string | null;
499
- }
500
-
501
504
  /**
502
505
  * Finatic FastAPI Backend
503
506
  * FinaticAPI REST API
@@ -612,12 +615,11 @@ interface Currentprice {
612
615
  * Do not edit the class manually.
613
616
  */
614
617
  /**
615
- * Generic disconnect action result.
618
+ * Result model for disconnect company from broker connection endpoint. This model represents the outcome of disconnecting a company account from a broker connection. Used by the DELETE /disconnect-company/{connection_id} endpoint to return success or failure status along with a descriptive message. Disconnecting a company removes the company\'s access to the broker connection but does not delete the connection itself, which may still be accessible to other companies or the original user. Attributes ---------- success : bool Whether the disconnection operation completed successfully. True if the company was disconnected from the connection, False if an error occurred. message : str Human-readable message describing the result of the disconnection operation. Contains success confirmation or error details. Notes ----- 1. **Partial Removal**: Disconnecting a company only removes the company\'s access permissions. The underlying broker connection remains intact. 2. **CompanyAccess Table**: This operation removes or updates records in the CompanyAccess table that link the company to the broker connection. 3. **Multi-Company Support**: A single broker connection can be shared across multiple companies. Disconnecting one company does not affect others. Examples -------- >>> # Successful disconnection >>> result = DisconnectCompanyFromBrokerConnectionResult( ... success=True, ... message=\"Successfully disconnected company from broker connection\", ... ) >>> # Failed disconnection >>> result = DisconnectCompanyFromBrokerConnectionResult( ... success=False, ... message=\"Error: Company not associated with this connection\", ... ) See Also -------- finaticapi.api.v1.routers.brokers.brokers_router.disconnect_company_from_connection : Endpoint that returns this model finaticapi.core.services.broker_service.BrokerService.disconnect_company_from_connection : Service method that performs disconnection
616
619
  */
617
- interface DisconnectActionResult {
618
- '_id'?: string;
619
- 'success'?: boolean;
620
- 'message'?: string | null;
620
+ interface DisconnectCompanyFromBrokerConnectionResult {
621
+ 'success': boolean;
622
+ 'message': string;
621
623
  }
622
624
 
623
625
  /**
@@ -2233,6 +2235,39 @@ declare enum FDXTimeInForce {
2233
2235
  Fok = "FOK"
2234
2236
  }
2235
2237
 
2238
+ /**
2239
+ * Finatic FastAPI Backend
2240
+ * FinaticAPI REST API
2241
+ *
2242
+ * The version of the OpenAPI document: 1.0.0
2243
+ *
2244
+ *
2245
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
2246
+ * https://openapi-generator.tech
2247
+ * Do not edit the class manually.
2248
+ */
2249
+ /**
2250
+ * Error response schema for OpenAPI documentation. Errors include rich domain-specific codes (e.g., ORDER_NOT_FOUND, TRADE_ACCESS_DENIED) mapped to standardized types and HTTP status codes via ERROR_CODE_REGISTRY.
2251
+ */
2252
+ interface FinaticAPIErrorResponse {
2253
+ /**
2254
+ * Request trace identifier for tracking and debugging
2255
+ */
2256
+ 'trace_id': string;
2257
+ /**
2258
+ * Success payload with data=None for errors
2259
+ */
2260
+ 'success': {
2261
+ [key: string]: any;
2262
+ };
2263
+ /**
2264
+ * Error details with type (FinaticErrorType), code (domain-specific), message (human-readable), status (HTTP status code), and optional details. Error codes are mapped via ERROR_CODE_REGISTRY - see registry for available codes.
2265
+ */
2266
+ 'error': {
2267
+ [key: string]: any;
2268
+ };
2269
+ }
2270
+
2236
2271
  /**
2237
2272
  * Finatic FastAPI Backend
2238
2273
  * FinaticAPI REST API
@@ -2245,9 +2280,9 @@ declare enum FDXTimeInForce {
2245
2280
  * Do not edit the class manually.
2246
2281
  */
2247
2282
 
2248
- interface SuccessPayloadCompanyResponse {
2283
+ interface SuccessPayloadAccounts {
2249
2284
  '_id'?: string;
2250
- 'data'?: CompanyResponse | null;
2285
+ 'data'?: Accounts | null;
2251
2286
  'meta'?: {
2252
2287
  [key: string]: any;
2253
2288
  } | null;
@@ -2265,7 +2300,7 @@ interface SuccessPayloadCompanyResponse {
2265
2300
  * Do not edit the class manually.
2266
2301
  */
2267
2302
 
2268
- interface FinaticResponseCompanyResponse {
2303
+ interface FinaticResponseAccounts {
2269
2304
  /**
2270
2305
  * Request trace identifier for tracking and debugging. Auto-generated if not provided.
2271
2306
  */
@@ -2273,7 +2308,7 @@ interface FinaticResponseCompanyResponse {
2273
2308
  /**
2274
2309
  * Success payload containing data and optional meta
2275
2310
  */
2276
- 'success': SuccessPayloadCompanyResponse;
2311
+ 'success': SuccessPayloadAccounts;
2277
2312
  'error'?: {
2278
2313
  [key: string]: any;
2279
2314
  } | null;
@@ -2294,9 +2329,9 @@ interface FinaticResponseCompanyResponse {
2294
2329
  * Do not edit the class manually.
2295
2330
  */
2296
2331
 
2297
- interface SuccessPayloadDisconnectActionResult {
2332
+ interface SuccessPayloadDisconnectCompanyFromBrokerConnectionResult {
2298
2333
  '_id'?: string;
2299
- 'data'?: DisconnectActionResult | null;
2334
+ 'data'?: DisconnectCompanyFromBrokerConnectionResult | null;
2300
2335
  'meta'?: {
2301
2336
  [key: string]: any;
2302
2337
  } | null;
@@ -2314,7 +2349,7 @@ interface SuccessPayloadDisconnectActionResult {
2314
2349
  * Do not edit the class manually.
2315
2350
  */
2316
2351
 
2317
- interface FinaticResponseDisconnectActionResult {
2352
+ interface FinaticResponseDisconnectCompanyFromBrokerConnectionResult {
2318
2353
  /**
2319
2354
  * Request trace identifier for tracking and debugging. Auto-generated if not provided.
2320
2355
  */
@@ -2322,7 +2357,7 @@ interface FinaticResponseDisconnectActionResult {
2322
2357
  /**
2323
2358
  * Success payload containing data and optional meta
2324
2359
  */
2325
- 'success': SuccessPayloadDisconnectActionResult;
2360
+ 'success': SuccessPayloadDisconnectCompanyFromBrokerConnectionResult;
2326
2361
  'error'?: {
2327
2362
  [key: string]: any;
2328
2363
  } | null;
@@ -2833,13 +2868,13 @@ interface FinaticResponseListFDXBrokerPositionLotFill {
2833
2868
  * Do not edit the class manually.
2834
2869
  */
2835
2870
  /**
2836
- * Response model for user broker connection with permissions included. This extends UserBrokerConnections to include permissions from the CompanyAccess table. Used by the /connections endpoint to return connection data with permission information. Note: Internal circuit breaker fields (circuit_open, consecutive_failures, error_message, circuit_open_until) are excluded from the response as they are internal operational details.
2871
+ * Response model for user broker connection with permissions included. This model extends UserBrokerConnections to include company-level permissions from the CompanyAccess table. Used by the GET /connections endpoint to return connection data with permission information for the requesting company account. The model excludes internal circuit breaker fields (circuit_open, consecutive_failures, error_message, circuit_open_until) which are operational details and should not be exposed in API responses. This ensures clients only receive relevant connection and permission data. Fields are derived from the UserBrokerConnections SQLModel and kept in sync through the from_connection() factory method, which validates against the database schema and automatically excludes circuit breaker fields. Attributes ---------- id : UUID Unique identifier for the broker connection. Primary key in UserBrokerConnections table. Used to reference the connection in update and delete operations. user_id : UUID UUID of the user who owns this broker connection. Connections are user-scoped, but can be shared with company accounts via CompanyAccess records. broker_id : str Identifier of the broker this connection is for (e.g., \"tradestation\", \"tasty_trade\"). Determines which broker adapter handles requests. status : str | None Current status of the connection (e.g., \"active\", \"inactive\", \"error\"). None if status is not set. Used to determine if the connection is usable. connection_metadata : dict[str, Any] | None Additional metadata stored with the connection. May include account information, labels, notes, or broker-specific data. None if no metadata is stored. created_at : datetime | None Timestamp when the connection was first created. None if not available. Used for auditing and connection age tracking. updated_at : datetime | None Timestamp when the connection was last updated. None if not available. Used to track connection modifications. last_synced_at : datetime | None Timestamp when the connection was last synchronized with the broker\'s API. None if synchronization has not occurred. Used to determine data freshness. permissions : dict[str, bool] Permission levels for the current company account. Dictionary with keys: - \"read\": bool - Whether company can read broker data (positions, orders, accounts) - \"write\": bool - Whether company can execute trades and modify orders Default is {\"read\": False, \"write\": False} if no CompanyAccess record exists. Notes ----- 1. **Circuit Breaker Exclusion**: Internal circuit breaker fields are automatically excluded from serialization to prevent exposing operational details. The model_dump() method ensures these fields never appear in API responses. 2. **Schema Synchronization**: The from_connection() factory method ensures field compatibility with UserBrokerConnections SQLModel. Changes to the database schema should be reflected in this model. 3. **Permission Source**: Permissions are derived from the CompanyAccess table by joining on user_broker_connection_id and filtering by account_id (company). 4. **Default Permissions**: If no CompanyAccess record exists for the company, permissions default to {\"read\": False, \"write\": False}, effectively denying access until permissions are explicitly granted. 5. **Multi-Company Support**: The same connection can have different permissions for different companies. Permissions are always scoped to the requesting company. Examples -------- >>> # Create from UserBrokerConnections with permissions >>> connection_sqlmodel = UserBrokerConnections( ... id=UUID(\"123e4567-e89b-12d3-a456-426614174000\"), ... user_id=UUID(\"user-123\"), ... broker_id=\"tradestation\", ... status=\"active\", ... ) >>> # Factory method with permissions >>> connection = UserBrokerConnectionWithPermissions.from_connection( ... connection_sqlmodel, permissions={\"read\": True, \"write\": True} ... ) >>> # Serialize (circuit breaker fields automatically excluded) >>> data = connection.model_dump() >>> # data does not contain circuit_open, consecutive_failures, etc. See Also -------- from_connection : Factory method to create instances from UserBrokerConnections finaticapi.api.v1.routers.brokers.brokers_router.get_connections : Endpoint that returns this model finaticapi.core.services.broker_service.BrokerService.get_connections : Service method that builds these models finatic_broker_factory.core.standard_models.supabase.schema_sql_models_broker_data_latest.UserBrokerConnections : Database model this extends
2837
2872
  */
2838
2873
  interface UserBrokerConnectionWithPermissions {
2839
2874
  'id': string;
2840
2875
  'user_id': string;
2841
2876
  'broker_id': string;
2842
- 'status': string;
2877
+ 'status'?: string | null;
2843
2878
  'connection_metadata'?: {
2844
2879
  [key: string]: any;
2845
2880
  } | null;
@@ -3091,37 +3126,13 @@ interface FinaticResponseSessionResponseData {
3091
3126
  * Do not edit the class manually.
3092
3127
  */
3093
3128
  /**
3094
- * Response model for session user information and tokens.
3129
+ * Response model for session user information.
3095
3130
  */
3096
3131
  interface SessionUserResponse {
3097
3132
  /**
3098
3133
  * User ID
3099
3134
  */
3100
3135
  'user_id': string;
3101
- /**
3102
- * Freshly generated access token
3103
- */
3104
- 'access_token': string;
3105
- /**
3106
- * Freshly generated refresh token
3107
- */
3108
- 'refresh_token': string;
3109
- /**
3110
- * Token expiration time in seconds
3111
- */
3112
- 'expires_in': number;
3113
- /**
3114
- * Token type
3115
- */
3116
- 'token_type'?: string;
3117
- /**
3118
- * Token scope
3119
- */
3120
- 'scope'?: string;
3121
- /**
3122
- * Company ID
3123
- */
3124
- 'company_id': string;
3125
3136
  }
3126
3137
 
3127
3138
  /**
@@ -3324,7 +3335,7 @@ interface BrokersApiInterface {
3324
3335
  * @param {*} [options] Override http request option.
3325
3336
  * @throws {RequiredError}
3326
3337
  */
3327
- disconnectCompanyFromBrokerApiV1BrokersDisconnectCompanyConnectionIdDelete(requestParameters: BrokersApiDisconnectCompanyFromBrokerApiV1BrokersDisconnectCompanyConnectionIdDeleteRequest, options?: RawAxiosRequestConfig): AxiosPromise<FinaticResponseDisconnectActionResult>;
3338
+ disconnectCompanyFromBrokerApiV1BrokersDisconnectCompanyConnectionIdDelete(requestParameters: BrokersApiDisconnectCompanyFromBrokerApiV1BrokersDisconnectCompanyConnectionIdDeleteRequest, options?: RawAxiosRequestConfig): AxiosPromise<FinaticResponseDisconnectCompanyFromBrokerConnectionResult>;
3328
3339
  /**
3329
3340
  * Get accounts for all authorized broker connections. This endpoint is accessible from the portal and uses session-only authentication. Returns accounts from connections the company has read access to.
3330
3341
  * @summary Get Accounts
@@ -3437,10 +3448,6 @@ interface BrokersApiGetAccountsApiV1BrokersDataAccountsGetRequest {
3437
3448
  * Filter by account type (e.g., \&#39;margin\&#39;, \&#39;cash\&#39;, \&#39;crypto_wallet\&#39;, \&#39;live\&#39;, \&#39;sim\&#39;)
3438
3449
  */
3439
3450
  readonly accountType?: BrokerDataAccountTypeEnum | null;
3440
- /**
3441
- * Filter by account status (e.g., \&#39;active\&#39;, \&#39;inactive\&#39;)
3442
- */
3443
- readonly status?: AccountStatus | null;
3444
3451
  /**
3445
3452
  * Filter by currency (e.g., \&#39;USD\&#39;, \&#39;EUR\&#39;)
3446
3453
  */
@@ -3718,7 +3725,7 @@ interface BrokersApiGetPositionsApiV1BrokersDataPositionsGetRequest {
3718
3725
  */
3719
3726
  readonly assetType?: BrokerDataAssetTypeEnum | null;
3720
3727
  /**
3721
- * Filter by position status: \&#39;open\&#39; (quantity &gt; 0) or \&#39;closed\&#39; (quantity &#x3D; 0)
3728
+ * Filter by position status: \&#39;active\&#39; (open positions) or \&#39;closed\&#39; (closed positions). Use \&#39;all\&#39; or omit to get both.
3722
3729
  */
3723
3730
  readonly positionStatus?: BrokerDataPositionStatusEnum | null;
3724
3731
  /**
@@ -3753,7 +3760,7 @@ declare class BrokersApi extends BaseAPI implements BrokersApiInterface {
3753
3760
  * @param {*} [options] Override http request option.
3754
3761
  * @throws {RequiredError}
3755
3762
  */
3756
- disconnectCompanyFromBrokerApiV1BrokersDisconnectCompanyConnectionIdDelete(requestParameters: BrokersApiDisconnectCompanyFromBrokerApiV1BrokersDisconnectCompanyConnectionIdDeleteRequest, options?: RawAxiosRequestConfig): Promise<axios.AxiosResponse<FinaticResponseDisconnectActionResult, any, {}>>;
3763
+ disconnectCompanyFromBrokerApiV1BrokersDisconnectCompanyConnectionIdDelete(requestParameters: BrokersApiDisconnectCompanyFromBrokerApiV1BrokersDisconnectCompanyConnectionIdDeleteRequest, options?: RawAxiosRequestConfig): Promise<axios.AxiosResponse<FinaticResponseDisconnectCompanyFromBrokerConnectionResult, any, {}>>;
3757
3764
  /**
3758
3765
  * Get accounts for all authorized broker connections. This endpoint is accessible from the portal and uses session-only authentication. Returns accounts from connections the company has read access to.
3759
3766
  * @summary Get Accounts
@@ -4188,7 +4195,7 @@ interface GetPositionsParams {
4188
4195
  side?: BrokerDataOrderSideEnum;
4189
4196
  /** Filter by asset type (e.g., 'stock', 'option', 'crypto', 'future') */
4190
4197
  assetType?: BrokerDataAssetTypeEnum;
4191
- /** Filter by position status: 'open' (quantity > 0) or 'closed' (quantity = 0) */
4198
+ /** Filter by position status: 'active' (open positions) or 'closed' (closed positions). Use 'all' or omit to get both. */
4192
4199
  positionStatus?: BrokerDataPositionStatusEnum;
4193
4200
  /** Maximum number of positions to return */
4194
4201
  limit?: number;
@@ -4228,8 +4235,6 @@ interface GetAccountsParams {
4228
4235
  connectionId?: string;
4229
4236
  /** Filter by account type (e.g., 'margin', 'cash', 'crypto_wallet', 'live', 'sim') */
4230
4237
  accountType?: BrokerDataAccountTypeEnum;
4231
- /** Filter by account status (e.g., 'active', 'inactive') */
4232
- status?: AccountStatus;
4233
4238
  /** Filter by currency (e.g., 'USD', 'EUR') */
4234
4239
  currency?: string;
4235
4240
  /** Maximum number of accounts to return */
@@ -4386,7 +4391,7 @@ declare class BrokersWrapper {
4386
4391
  * If the company is the only one with access, the entire connection is deleted.
4387
4392
  * If other companies have access, only the company's access is removed.
4388
4393
  * @param params.connectionId {string} Connection ID
4389
- * @returns {Promise<FinaticResponse<DisconnectActionResult>>} Standard response with success/Error/Warning structure
4394
+ * @returns {Promise<FinaticResponse<DisconnectCompanyFromBrokerConnectionResult>>} Standard response with success/Error/Warning structure
4390
4395
  *
4391
4396
  * Generated from: DELETE /api/v1/brokers/disconnect-company/{connection_id}
4392
4397
  * @methodId disconnect_company_from_broker_api_v1_brokers_disconnect_company__connection_id__delete
@@ -4406,7 +4411,7 @@ declare class BrokersWrapper {
4406
4411
  * }
4407
4412
  * ```
4408
4413
  */
4409
- disconnectCompanyFromBroker(params: DisconnectCompanyFromBrokerParams): Promise<FinaticResponse$2<DisconnectActionResult>>;
4414
+ disconnectCompanyFromBroker(params: DisconnectCompanyFromBrokerParams): Promise<FinaticResponse$2<DisconnectCompanyFromBrokerConnectionResult>>;
4410
4415
  /**
4411
4416
  * Get Orders
4412
4417
  *
@@ -4475,7 +4480,7 @@ declare class BrokersWrapper {
4475
4480
  * @param params.symbol {string} (optional) Filter by symbol
4476
4481
  * @param params.side {BrokerDataOrderSideEnum} (optional) Filter by position side (e.g., 'long', 'short')
4477
4482
  * @param params.assetType {BrokerDataAssetTypeEnum} (optional) Filter by asset type (e.g., 'stock', 'option', 'crypto', 'future')
4478
- * @param params.positionStatus {BrokerDataPositionStatusEnum} (optional) Filter by position status: 'open' (quantity > 0) or 'closed' (quantity = 0)
4483
+ * @param params.positionStatus {BrokerDataPositionStatusEnum} (optional) Filter by position status: 'active' (open positions) or 'closed' (closed positions). Use 'all' or omit to get both.
4479
4484
  * @param params.limit {number} (optional) Maximum number of positions to return
4480
4485
  * @param params.offset {number} (optional) Number of positions to skip for pagination
4481
4486
  * @param params.updatedAfter {string} (optional) Filter positions updated after this timestamp
@@ -4579,7 +4584,6 @@ declare class BrokersWrapper {
4579
4584
  * @param params.brokerId {string} (optional) Filter by broker ID
4580
4585
  * @param params.connectionId {string} (optional) Filter by connection ID
4581
4586
  * @param params.accountType {BrokerDataAccountTypeEnum} (optional) Filter by account type (e.g., 'margin', 'cash', 'crypto_wallet', 'live', 'sim')
4582
- * @param params.status {AccountStatus} (optional) Filter by account status (e.g., 'active', 'inactive')
4583
4587
  * @param params.currency {string} (optional) Filter by currency (e.g., 'USD', 'EUR')
4584
4588
  * @param params.limit {number} (optional) Maximum number of accounts to return
4585
4589
  * @param params.offset {number} (optional) Number of accounts to skip for pagination
@@ -4887,15 +4891,7 @@ interface CompanyApiInterface {
4887
4891
  * @param {*} [options] Override http request option.
4888
4892
  * @throws {RequiredError}
4889
4893
  */
4890
- getCompanyApiV1CompanyCompanyIdGet(requestParameters: CompanyApiGetCompanyApiV1CompanyCompanyIdGetRequest, options?: RawAxiosRequestConfig): AxiosPromise<FinaticResponseCompanyResponse>;
4891
- /**
4892
- * Get public company details by ID (no user check, no sensitive data).
4893
- * @summary Get Company
4894
- * @param {CompanyApiGetCompanyApiV1CompanyCompanyIdGet0Request} requestParameters Request parameters.
4895
- * @param {*} [options] Override http request option.
4896
- * @throws {RequiredError}
4897
- */
4898
- getCompanyApiV1CompanyCompanyIdGet_1(requestParameters: CompanyApiGetCompanyApiV1CompanyCompanyIdGet0Request, options?: RawAxiosRequestConfig): AxiosPromise<FinaticResponseCompanyResponse>;
4894
+ getCompanyApiV1CompanyCompanyIdGet(requestParameters: CompanyApiGetCompanyApiV1CompanyCompanyIdGetRequest, options?: RawAxiosRequestConfig): AxiosPromise<FinaticResponseAccounts>;
4899
4895
  }
4900
4896
  /**
4901
4897
  * Request parameters for getCompanyApiV1CompanyCompanyIdGet operation in CompanyApi.
@@ -4906,15 +4902,6 @@ interface CompanyApiGetCompanyApiV1CompanyCompanyIdGetRequest {
4906
4902
  */
4907
4903
  readonly companyId: string;
4908
4904
  }
4909
- /**
4910
- * Request parameters for getCompanyApiV1CompanyCompanyIdGet_1 operation in CompanyApi.
4911
- */
4912
- interface CompanyApiGetCompanyApiV1CompanyCompanyIdGet0Request {
4913
- /**
4914
- * Company ID
4915
- */
4916
- readonly companyId: string;
4917
- }
4918
4905
  /**
4919
4906
  * CompanyApi - object-oriented interface
4920
4907
  */
@@ -4926,15 +4913,7 @@ declare class CompanyApi extends BaseAPI implements CompanyApiInterface {
4926
4913
  * @param {*} [options] Override http request option.
4927
4914
  * @throws {RequiredError}
4928
4915
  */
4929
- getCompanyApiV1CompanyCompanyIdGet(requestParameters: CompanyApiGetCompanyApiV1CompanyCompanyIdGetRequest, options?: RawAxiosRequestConfig): Promise<axios.AxiosResponse<FinaticResponseCompanyResponse, any, {}>>;
4930
- /**
4931
- * Get public company details by ID (no user check, no sensitive data).
4932
- * @summary Get Company
4933
- * @param {CompanyApiGetCompanyApiV1CompanyCompanyIdGet0Request} requestParameters Request parameters.
4934
- * @param {*} [options] Override http request option.
4935
- * @throws {RequiredError}
4936
- */
4937
- getCompanyApiV1CompanyCompanyIdGet_1(requestParameters: CompanyApiGetCompanyApiV1CompanyCompanyIdGet0Request, options?: RawAxiosRequestConfig): Promise<axios.AxiosResponse<FinaticResponseCompanyResponse, any, {}>>;
4916
+ getCompanyApiV1CompanyCompanyIdGet(requestParameters: CompanyApiGetCompanyApiV1CompanyCompanyIdGetRequest, options?: RawAxiosRequestConfig): Promise<axios.AxiosResponse<FinaticResponseAccounts, any, {}>>;
4938
4917
  }
4939
4918
 
4940
4919
  /**
@@ -4993,7 +4972,7 @@ declare class CompanyWrapper {
4993
4972
  *
4994
4973
  * Get public company details by ID (no user check, no sensitive data).
4995
4974
  * @param params.companyId {string} Company ID
4996
- * @returns {Promise<FinaticResponse<CompanyResponse>>} Standard response with success/Error/Warning structure
4975
+ * @returns {Promise<FinaticResponse<Accounts>>} Standard response with success/Error/Warning structure
4997
4976
  *
4998
4977
  * Generated from: GET /api/v1/company/{company_id}
4999
4978
  * @methodId get_company_api_v1_company__company_id__get
@@ -5013,7 +4992,7 @@ declare class CompanyWrapper {
5013
4992
  * }
5014
4993
  * ```
5015
4994
  */
5016
- getCompany(params: GetCompanyParams): Promise<FinaticResponse$1<CompanyResponse>>;
4995
+ getCompany(params: GetCompanyParams): Promise<FinaticResponse$1<Accounts>>;
5017
4996
  }
5018
4997
 
5019
4998
  /**
@@ -5029,7 +5008,7 @@ interface SessionApiInterface {
5029
5008
  */
5030
5009
  getPortalUrlApiV1SessionPortalGet(requestParameters: SessionApiGetPortalUrlApiV1SessionPortalGetRequest, options?: RawAxiosRequestConfig): AxiosPromise<FinaticResponsePortalUrlResponse>;
5031
5010
  /**
5032
- * Get user information and fresh tokens for a completed session. This endpoint is designed for server SDKs to retrieve user information and authentication tokens after successful OTP verification. Security: - Requires valid session in ACTIVE state - Validates device fingerprint binding - Generates fresh tokens (not returning stored ones) - Only accessible to authenticated sessions with user_id - Validates that header session_id matches path session_id
5011
+ * Get user information for a completed session. This endpoint is designed for server SDKs to retrieve user information after successful OTP verification. Security: - Requires valid session in ACTIVE state - Validates device fingerprint binding - Only accessible to authenticated sessions with user_id - Validates that header session_id matches path session_id
5033
5012
  * @summary Get Session User
5034
5013
  * @param {SessionApiGetSessionUserApiV1SessionSessionIdUserGetRequest} requestParameters Request parameters.
5035
5014
  * @param {*} [options] Override http request option.
@@ -5110,7 +5089,7 @@ declare class SessionApi extends BaseAPI implements SessionApiInterface {
5110
5089
  */
5111
5090
  getPortalUrlApiV1SessionPortalGet(requestParameters: SessionApiGetPortalUrlApiV1SessionPortalGetRequest, options?: RawAxiosRequestConfig): Promise<axios.AxiosResponse<FinaticResponsePortalUrlResponse, any, {}>>;
5112
5091
  /**
5113
- * Get user information and fresh tokens for a completed session. This endpoint is designed for server SDKs to retrieve user information and authentication tokens after successful OTP verification. Security: - Requires valid session in ACTIVE state - Validates device fingerprint binding - Generates fresh tokens (not returning stored ones) - Only accessible to authenticated sessions with user_id - Validates that header session_id matches path session_id
5092
+ * Get user information for a completed session. This endpoint is designed for server SDKs to retrieve user information after successful OTP verification. Security: - Requires valid session in ACTIVE state - Validates device fingerprint binding - Only accessible to authenticated sessions with user_id - Validates that header session_id matches path session_id
5114
5093
  * @summary Get Session User
5115
5094
  * @param {SessionApiGetSessionUserApiV1SessionSessionIdUserGetRequest} requestParameters Request parameters.
5116
5095
  * @param {*} [options] Override http request option.
@@ -5269,16 +5248,15 @@ declare class SessionWrapper {
5269
5248
  /**
5270
5249
  * Get Session User
5271
5250
  *
5272
- * Get user information and fresh tokens for a completed session.
5251
+ * Get user information for a completed session.
5273
5252
  *
5274
5253
  * This endpoint is designed for server SDKs to retrieve user information
5275
- * and authentication tokens after successful OTP verification.
5254
+ * after successful OTP verification.
5276
5255
  *
5277
5256
  *
5278
5257
  * Security:
5279
5258
  * - Requires valid session in ACTIVE state
5280
5259
  * - Validates device fingerprint binding
5281
- * - Generates fresh tokens (not returning stored ones)
5282
5260
  * - Only accessible to authenticated sessions with user_id
5283
5261
  * - Validates that header session_id matches path session_id
5284
5262
  * @param params.sessionId {string} Session ID
@@ -5652,29 +5630,37 @@ declare class FinaticConnect$1 extends EventEmitter {
5652
5630
  *
5653
5631
  * @methodId open_portal_client_sdk
5654
5632
  * @category session
5655
- * @param params - Optional parameters object
5656
- * @param params.theme - Optional theme preset or custom theme object
5657
- * @param params.brokers - Optional array of broker IDs to filter
5658
- * @param params.email - Optional email address
5659
- * @param params.mode - Optional mode ('light' or 'dark')
5660
- * @param onSuccess - Optional callback when portal authentication succeeds
5661
- * @param onError - Optional callback when portal authentication fails
5662
- * @param onClose - Optional callback when portal is closed
5663
5633
  * @returns Promise that resolves when portal is opened
5664
5634
  * @example
5665
5635
  * ```typescript-client
5636
+ * // Recommended: Single options object with callbacks
5666
5637
  * await finatic.openPortal({
5667
- * theme: 'default',
5638
+ * theme: { preset: 'stockAlgos' },
5668
5639
  * brokers: ['broker-1'],
5669
5640
  * email: 'user@example.com',
5670
- * mode: 'dark'
5671
- * },
5672
- * (userId) => console.log('User authenticated:', userId),
5673
- * (error) => console.error('Portal error:', error),
5674
- * () => console.log('Portal closed')
5675
- * );
5641
+ * mode: 'dark',
5642
+ * onSuccess: (userId) => console.log('User authenticated:', userId),
5643
+ * onError: (error) => console.error('Portal error:', error),
5644
+ * onClose: () => console.log('Portal closed')
5645
+ * });
5676
5646
  * ```
5677
5647
  */
5648
+ openPortal(options?: {
5649
+ theme?: string | {
5650
+ preset?: string;
5651
+ custom?: Record<string, unknown>;
5652
+ };
5653
+ brokers?: string[];
5654
+ email?: string;
5655
+ mode?: 'light' | 'dark';
5656
+ onSuccess?: (userId: string) => void;
5657
+ onError?: (error: Error) => void;
5658
+ onClose?: () => void;
5659
+ }): Promise<void>;
5660
+ /**
5661
+ * @deprecated Use the single options object pattern instead: openPortal({ theme, brokers, email, mode, onSuccess, onError, onClose })
5662
+ * This overload will be removed in a future version.
5663
+ */
5678
5664
  openPortal(params?: {
5679
5665
  theme?: string | {
5680
5666
  preset?: string;
@@ -7253,5 +7239,5 @@ declare class FinaticConnect extends FinaticConnect$1 {
7253
7239
  static readonly __CUSTOM_CLASS__ = true;
7254
7240
  }
7255
7241
 
7256
- export { AccountStatus, ApiError, BrokerDataAccountTypeEnum, BrokerDataAssetTypeEnum, BrokerDataOrderSideEnum, BrokerDataPositionStatusEnum, BrokersWrapper, CompanyWrapper, Configuration, EventEmitter, FDXAccountStatus, FDXAccountType, FDXAssetType, FDXBalanceType, FDXOrderClass, FDXOrderEventType, FDXOrderGroupType, FDXOrderSide, FDXOrderStatus, FDXOrderType, FDXPositionSide, FDXPositionStatus, FDXSecurityIdType, FDXTimeInForce, FinaticConnect, FinaticError, PaginatedData, 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 };
7257
- export type { Accounttype, ValidationError$1 as ApiValidationError, Assettype, Availablebalance, Availabletowithdraw, Averagebuyprice, Averagefillprice, Averagesellprice, Balancetype, BrokerInfo, Buyingpower, Cashbalance, Closedquantity, Closepriceavg, Commission, Commissionshare, 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, 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 };
7242
+ export { ApiError, BrokerDataAccountTypeEnum, BrokerDataAssetTypeEnum, BrokerDataOrderSideEnum, BrokerDataPositionStatusEnum, BrokersWrapper, CompanyWrapper, Configuration, EventEmitter, FDXAccountStatus, FDXAccountType, FDXAssetType, FDXBalanceType, FDXOrderClass, FDXOrderEventType, FDXOrderGroupType, FDXOrderSide, FDXOrderStatus, FDXOrderType, FDXPositionSide, FDXPositionStatus, FDXSecurityIdType, FDXTimeInForce, FinaticConnect, FinaticError, PaginatedData, 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 };
7243
+ export type { Accounts, Accounttype, ValidationError$1 as ApiValidationError, Assettype, Availablebalance, Availabletowithdraw, Averagebuyprice, Averagefillprice, Averagesellprice, Balancetype, BrokerInfo, Buyingpower, Cashbalance, Closedquantity, Closepriceavg, Commission, Commissionshare, ConfigurationParameters, Costbasis, Costbasis1, Costbasiswithcommission, Costbasiswithcommission1, Currentbalance, Currentprice, DisconnectCompanyFromBrokerConnectionResult, ErrorInterceptor, Eventtype, FDXBrokerAccount, FDXBrokerBalance, FDXBrokerOrder, FDXBrokerOrderEvent, FDXBrokerOrderFill, FDXBrokerOrderGroup, FDXBrokerPosition, FDXBrokerPositionLot, FDXBrokerPositionLotFill, FDXOrderGroupOrder, FDXOrderLeg, Filledquantity, Fillprice, Fillquantity, FinaticAPIErrorResponse, FinaticConnectOptions, FinaticResponse$3 as FinaticResponse, FinaticResponseAccounts, FinaticResponseDisconnectCompanyFromBrokerConnectionResult, 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, SessionResponseData, SessionStartRequest, SessionUserResponse, Side, Side1, Side2, Side3, Status, Status1, Stopprice, Strikeprice, SuccessPayloadAccounts, SuccessPayloadDisconnectCompanyFromBrokerConnectionResult, SuccessPayloadListBrokerInfo, SuccessPayloadListFDXBrokerAccount, SuccessPayloadListFDXBrokerBalance, SuccessPayloadListFDXBrokerOrder, SuccessPayloadListFDXBrokerOrderEvent, SuccessPayloadListFDXBrokerOrderFill, SuccessPayloadListFDXBrokerOrderGroup, SuccessPayloadListFDXBrokerPosition, SuccessPayloadListFDXBrokerPositionLot, SuccessPayloadListFDXBrokerPositionLotFill, SuccessPayloadListUserBrokerConnectionWithPermissions, SuccessPayloadPortalUrlResponse, SuccessPayloadSessionResponseData, SuccessPayloadSessionUserResponse, SuccessPayloadTokenResponseData, Timeinforce, TokenResponseData, Totalcashvalue, Totalrealizedpnl, Units, Unrealizedprofitloss, Unrealizedprofitlosspercent, UserBrokerConnectionWithPermissions, ValidationErrorLocInner };