@finatic/client 0.9.9 → 0.9.10

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.js CHANGED
@@ -1388,25 +1388,6 @@ exports.FinaticBrokerFactoryBrokersRobinhoodExecutorsConsumerRobinhoodOrderModif
1388
1388
  FinaticBrokerFactoryBrokersRobinhoodExecutorsConsumerRobinhoodOrderModifyQueryParamsRobinhoodOptionSpreadLegEffectEnum["Close"] = "close";
1389
1389
  })(exports.FinaticBrokerFactoryBrokersRobinhoodExecutorsConsumerRobinhoodOrderModifyQueryParamsRobinhoodOptionSpreadLegEffectEnum || (exports.FinaticBrokerFactoryBrokersRobinhoodExecutorsConsumerRobinhoodOrderModifyQueryParamsRobinhoodOptionSpreadLegEffectEnum = {}));
1390
1390
 
1391
- /* tslint:disable */
1392
- /* eslint-disable */
1393
- /**
1394
- * Finatic FastAPI Backend
1395
- * FinaticAPI REST API
1396
- *
1397
- * The version of the OpenAPI document: 1.0.0
1398
- *
1399
- *
1400
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
1401
- * https://openapi-generator.tech
1402
- * Do not edit the class manually.
1403
- */
1404
- exports.FinaticBrokerFactoryBrokersRobinhoodExecutorsConsumerRobinhoodOrderPlaceQueryParamsRobinhoodOptionSpreadLegPositionEffectEnum = void 0;
1405
- (function (FinaticBrokerFactoryBrokersRobinhoodExecutorsConsumerRobinhoodOrderPlaceQueryParamsRobinhoodOptionSpreadLegPositionEffectEnum) {
1406
- FinaticBrokerFactoryBrokersRobinhoodExecutorsConsumerRobinhoodOrderPlaceQueryParamsRobinhoodOptionSpreadLegPositionEffectEnum["Open"] = "open";
1407
- FinaticBrokerFactoryBrokersRobinhoodExecutorsConsumerRobinhoodOrderPlaceQueryParamsRobinhoodOptionSpreadLegPositionEffectEnum["Close"] = "close";
1408
- })(exports.FinaticBrokerFactoryBrokersRobinhoodExecutorsConsumerRobinhoodOrderPlaceQueryParamsRobinhoodOptionSpreadLegPositionEffectEnum || (exports.FinaticBrokerFactoryBrokersRobinhoodExecutorsConsumerRobinhoodOrderPlaceQueryParamsRobinhoodOptionSpreadLegPositionEffectEnum = {}));
1409
-
1410
1391
  /* tslint:disable */
1411
1392
  /* eslint-disable */
1412
1393
  /**
@@ -2311,6 +2292,25 @@ exports.RobinhoodOptionMarketOrderPlaceQueryParamsOptionTypeEnum = void 0;
2311
2292
  RobinhoodOptionMarketOrderPlaceQueryParamsOptionTypeEnum["Both"] = "both";
2312
2293
  })(exports.RobinhoodOptionMarketOrderPlaceQueryParamsOptionTypeEnum || (exports.RobinhoodOptionMarketOrderPlaceQueryParamsOptionTypeEnum = {}));
2313
2294
 
2295
+ /* tslint:disable */
2296
+ /* eslint-disable */
2297
+ /**
2298
+ * Finatic FastAPI Backend
2299
+ * FinaticAPI REST API
2300
+ *
2301
+ * The version of the OpenAPI document: 1.0.0
2302
+ *
2303
+ *
2304
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
2305
+ * https://openapi-generator.tech
2306
+ * Do not edit the class manually.
2307
+ */
2308
+ exports.RobinhoodOptionSpreadLegPositionEffectEnum = void 0;
2309
+ (function (RobinhoodOptionSpreadLegPositionEffectEnum) {
2310
+ RobinhoodOptionSpreadLegPositionEffectEnum["Open"] = "open";
2311
+ RobinhoodOptionSpreadLegPositionEffectEnum["Close"] = "close";
2312
+ })(exports.RobinhoodOptionSpreadLegPositionEffectEnum || (exports.RobinhoodOptionSpreadLegPositionEffectEnum = {}));
2313
+
2314
2314
  /* tslint:disable */
2315
2315
  /* eslint-disable */
2316
2316
  /**
@@ -3265,9 +3265,9 @@ class BrokersWrapper {
3265
3265
  * ```typescript-client
3266
3266
  * // Full example with optional parameters
3267
3267
  * const result = await finatic.getBalances({
3268
- brokerId: 'alpaca',
3269
- connectionId: '00000000-0000-0000-0000-000000000000',
3270
- accountId: '123456789'
3268
+ brokerId: 'example-id',
3269
+ connectionId: 'example-id',
3270
+ accountId: 'example-id'
3271
3271
  * });
3272
3272
  *
3273
3273
  * // Handle response with warnings
@@ -3452,8 +3452,8 @@ class BrokersWrapper {
3452
3452
  * ```typescript-client
3453
3453
  * // Full example with optional parameters
3454
3454
  * const result = await finatic.getAccounts({
3455
- brokerId: 'alpaca',
3456
- connectionId: '00000000-0000-0000-0000-000000000000',
3455
+ brokerId: 'example-id',
3456
+ connectionId: 'example-id',
3457
3457
  accountType: 'margin'
3458
3458
  * });
3459
3459
  *
@@ -3931,7 +3931,7 @@ class BrokersWrapper {
3931
3931
  * ```typescript-client
3932
3932
  * // Minimal example with required parameters only
3933
3933
  * const result = await finatic.disconnectCompanyFromBroker({
3934
- connectionId: '00000000-0000-0000-0000-000000000000'
3934
+ connectionId: 'example-id'
3935
3935
  * });
3936
3936
  *
3937
3937
  * // Access the response data
@@ -4106,9 +4106,9 @@ class BrokersWrapper {
4106
4106
  * ```typescript-client
4107
4107
  * // Full example with optional parameters
4108
4108
  * const result = await finatic.getOrders({
4109
- brokerId: 'alpaca',
4110
- connectionId: '00000000-0000-0000-0000-000000000000',
4111
- accountId: '123456789'
4109
+ brokerId: 'example-id',
4110
+ connectionId: 'example-id',
4111
+ accountId: 'example-id'
4112
4112
  * });
4113
4113
  *
4114
4114
  * // Handle response with warnings
@@ -4310,9 +4310,9 @@ class BrokersWrapper {
4310
4310
  * ```typescript-client
4311
4311
  * // Full example with optional parameters
4312
4312
  * const result = await finatic.getPositions({
4313
- brokerId: 'alpaca',
4314
- connectionId: '00000000-0000-0000-0000-000000000000',
4315
- accountId: '123456789'
4313
+ brokerId: 'example-id',
4314
+ connectionId: 'example-id',
4315
+ accountId: 'example-id'
4316
4316
  * });
4317
4317
  *
4318
4318
  * // Handle response with warnings
@@ -4518,9 +4518,9 @@ class BrokersWrapper {
4518
4518
  * ```typescript-client
4519
4519
  * // Full example with optional parameters
4520
4520
  * const result = await finatic.getTransactions({
4521
- brokerId: 'alpaca',
4522
- connectionId: '00000000-0000-0000-0000-000000000000',
4523
- accountId: '123456789'
4521
+ brokerId: 'example-id',
4522
+ connectionId: 'example-id',
4523
+ accountId: 'example-id'
4524
4524
  * });
4525
4525
  *
4526
4526
  * // Handle response with warnings
@@ -4692,7 +4692,7 @@ class BrokersWrapper {
4692
4692
  * ```typescript-client
4693
4693
  * // Minimal example with required parameters only
4694
4694
  * const result = await finatic.getOrderFills({
4695
- orderId: '00000000-0000-0000-0000-000000000000'
4695
+ orderId: 'example-id'
4696
4696
  * });
4697
4697
  *
4698
4698
  * // Access the response data
@@ -4706,9 +4706,9 @@ class BrokersWrapper {
4706
4706
  * ```typescript-client
4707
4707
  * // Full example with optional parameters
4708
4708
  * const result = await finatic.getOrderFills({
4709
- orderId: '00000000-0000-0000-0000-000000000000',
4710
- connectionId: '00000000-0000-0000-0000-000000000000',
4711
- limit: 100,
4709
+ orderId: 'example-id',
4710
+ connectionId: 'example-id',
4711
+ limit: 0,
4712
4712
  offset: 0
4713
4713
  * });
4714
4714
  *
@@ -4881,7 +4881,7 @@ class BrokersWrapper {
4881
4881
  * ```typescript-client
4882
4882
  * // Minimal example with required parameters only
4883
4883
  * const result = await finatic.getOrderEvents({
4884
- orderId: '00000000-0000-0000-0000-000000000000'
4884
+ orderId: 'example-id'
4885
4885
  * });
4886
4886
  *
4887
4887
  * // Access the response data
@@ -4895,9 +4895,9 @@ class BrokersWrapper {
4895
4895
  * ```typescript-client
4896
4896
  * // Full example with optional parameters
4897
4897
  * const result = await finatic.getOrderEvents({
4898
- orderId: '00000000-0000-0000-0000-000000000000',
4899
- connectionId: '00000000-0000-0000-0000-000000000000',
4900
- limit: 100,
4898
+ orderId: 'example-id',
4899
+ connectionId: 'example-id',
4900
+ limit: 0,
4901
4901
  offset: 0
4902
4902
  * });
4903
4903
  *
@@ -5082,9 +5082,9 @@ class BrokersWrapper {
5082
5082
  * ```typescript-client
5083
5083
  * // Full example with optional parameters
5084
5084
  * const result = await finatic.getOrderGroups({
5085
- brokerId: 'alpaca',
5086
- connectionId: '00000000-0000-0000-0000-000000000000',
5087
- limit: 100
5085
+ brokerId: 'example-id',
5086
+ connectionId: 'example-id',
5087
+ limit: 0
5088
5088
  * });
5089
5089
  *
5090
5090
  * // Handle response with warnings
@@ -5269,9 +5269,9 @@ class BrokersWrapper {
5269
5269
  * ```typescript-client
5270
5270
  * // Full example with optional parameters
5271
5271
  * const result = await finatic.getPositionLots({
5272
- brokerId: 'alpaca',
5273
- connectionId: '00000000-0000-0000-0000-000000000000',
5274
- accountId: '123456789'
5272
+ brokerId: 'example-id',
5273
+ connectionId: 'example-id',
5274
+ accountId: 'example-id'
5275
5275
  * });
5276
5276
  *
5277
5277
  * // Handle response with warnings
@@ -5442,7 +5442,7 @@ class BrokersWrapper {
5442
5442
  * ```typescript-client
5443
5443
  * // Minimal example with required parameters only
5444
5444
  * const result = await finatic.getPositionLotFills({
5445
- lotId: '00000000-0000-0000-0000-000000000000'
5445
+ lotId: 'example-id'
5446
5446
  * });
5447
5447
  *
5448
5448
  * // Access the response data
@@ -5456,9 +5456,9 @@ class BrokersWrapper {
5456
5456
  * ```typescript-client
5457
5457
  * // Full example with optional parameters
5458
5458
  * const result = await finatic.getPositionLotFills({
5459
- lotId: '00000000-0000-0000-0000-000000000000',
5460
- connectionId: '00000000-0000-0000-0000-000000000000',
5461
- limit: 100,
5459
+ lotId: 'example-id',
5460
+ connectionId: 'example-id',
5461
+ limit: 0,
5462
5462
  offset: 0
5463
5463
  * });
5464
5464
  *
@@ -5614,62 +5614,24 @@ class BrokersWrapper {
5614
5614
  /**
5615
5615
  * Place Order
5616
5616
  *
5617
- * Create a new order via the specified broker connection.
5618
- *
5619
- * This endpoint is accessible from the portal and uses session-only authentication.
5620
- * Requires trading permissions for the company.
5621
- *
5622
- * Standard parameters
5623
- * -------------------
5624
- * The following fields constitute the unified Finatic *common order schema* and
5625
- * therefore appear individually as query parameters in the autogenerated
5626
- * OpenAPI documentation:
5627
- *
5628
- * - ``broker``
5629
- * - ``account_number``
5630
- * - ``order_type``
5631
- * - ``asset_type``
5632
- * - ``action``
5633
- * - ``time_in_force``
5634
- * - ``symbol``
5635
- * - ``order_qty``
5636
- *
5637
- * They are surfaced as *query* parameters **only to make the accepted fields
5638
- * obvious in the interactive docs**. In production usage you should send these
5639
- * fields inside the JSON body (see ``order_request``) so that the entire order
5640
- * specification travels in one payload. (Nothing will break if you send both, but there is no need to do so.)
5641
- *
5642
- * Body payload & broker-specific extras
5643
- * -------------------------------------
5644
- *
5645
- * Put the standard parameters plus any broker-specific extensions under the
5646
- * ``order`` key of the body. Refer to the bundled OpenAPI examples below to
5647
- * see complete payloads for common order types (market, limit, spreads, etc.)
5648
- * across supported brokers.
5649
- *
5650
- * For a formal reference of broker-specific extensions inspect the
5651
- * ``BrokerOrderPlaceExtras`` schema.
5652
- *
5653
- * The endpoint resolves the active ``user_broker_connection`` by calling the
5654
- * ``get_user_broker_connection_ids_for_broker`` RPC in Supabase. If no active
5655
- * connection exists it returns a list of *available* brokers so your client
5656
- * can guide the user accordingly.
5657
- *
5658
- * Broker Notes
5659
- * ------------
5660
- * - The responses that you get back from the broker are not always the same.
5661
- * The response models are validated for each broker, but we do not standardize the repsonses.
5662
- *
5663
- * - Tasty Trade: If you want to trade options for a particular stock, first fetch the full
5664
- * option chain via the GET https://api.tastyworks.com/option-chains/{stock_symbol}/nested endpoint.
5665
- * This endpoint returns all available expirations that tastytrade offers for that equity symbol.
5666
- * Each expiration contains a list of strikes, where each strike has a call and put field representing
5667
- * the call symbol and put symbol respectively.
5668
- *
5669
- * We are planning to add a new endpoint to fetch the option chain for a particular stock and
5670
- * handle this logic for you, but for now you need to fetch the option chain manually.
5671
- * @param params.body {PlaceOrderApiBetaBrokersOrdersPostRequest} (optional) Broker-specific extra parameters object. This is used to pass in broker-specific fields if you want to send a reqeust to a broker API with the parameters that EXTEND our standardized query parameters.
5672
- * @param params.connectionId {string} (optional) Temporary bypass for testing: specify connection ID directly
5617
+ * Place a new order through the specified broker.
5618
+ *
5619
+ * Creates an order using the broker connection associated with your account.
5620
+ * The order structure includes common fields (symbol, quantity, order type, etc.)
5621
+ * shared across all brokers, plus broker-specific fields that vary by broker.
5622
+ *
5623
+ * Common order fields include: broker, accountNumber, orderType, assetType,
5624
+ * action, timeInForce, symbol, and orderQty. Additional broker-specific fields
5625
+ * can be included in the order object - see the broker-specific tabs in the
5626
+ * parameters section for details.
5627
+ * @param params.broker {string} Broker identifier (robinhood, tasty_trade, ninja_trader)
5628
+ * @param params.accountNumber {number} Account number for the order
5629
+ * @param params.order.orderType {string} Type of order (market, limit, etc.)
5630
+ * @param params.order.assetType {string} Type of asset (equity, equity_option, crypto, forex)
5631
+ * @param params.order.action {string} Order action (buy, sell)
5632
+ * @param params.order.timeInForce {string} Time in force for the order
5633
+ * @param params.order.symbol {string} Trading symbol
5634
+ * @param params.order.orderQty {number} Order quantity
5673
5635
  * @returns {Promise<FinaticResponse<OrderActionResult>>} Standard response with success/Error/Warning structure
5674
5636
  *
5675
5637
  * Generated from: POST /api/beta/brokers/orders
@@ -5677,35 +5639,30 @@ class BrokersWrapper {
5677
5639
  * @category brokers
5678
5640
  * @example
5679
5641
  * ```typescript-client
5680
- * // Example with no parameters
5681
- * const result = await finatic.placeOrder({});
5682
- *
5683
- * // Access the response data
5684
- * if (result.success) {
5685
- * console.log('Data:', result.success.data);
5686
- * }
5687
- * ```
5688
- * @example
5689
- * ```typescript-client
5690
- * // Full example with optional parameters
5642
+ * // This method requires broker and order with required fields:
5691
5643
  * const result = await finatic.placeOrder({
5692
- connectionId: '00000000-0000-0000-0000-000000000000'
5644
+ broker: 'robinhood',
5645
+ order: {
5646
+ orderType: 'market',
5647
+ assetType: 'equity',
5648
+ action: 'buy',
5649
+ timeInForce: 'day',
5650
+ symbol: 'AAPL',
5651
+ orderQty: 10
5652
+ }
5693
5653
  * });
5694
5654
  *
5695
- * // Handle response with warnings
5655
+ * // Access the response data
5696
5656
  * if (result.success) {
5697
5657
  * console.log('Data:', result.success.data);
5698
- * if (result.warning && result.warning.length > 0) {
5699
- * console.warn('Warnings:', result.warning);
5700
- * }
5701
5658
  * } else if (result.error) {
5702
- * console.error('Error:', result.error.message, result.error.code);
5659
+ * console.error('Error:', result.error.message);
5703
5660
  * }
5704
5661
  * ```
5705
5662
  */
5706
5663
  async placeOrder(params) {
5707
- // Use params object (with default empty object)
5708
- const resolvedParams = params || {}; // Authentication check
5664
+ // Use params object (required parameters present)
5665
+ const resolvedParams = params; // Authentication check
5709
5666
  if (!this.sessionId || !this.companyId) {
5710
5667
  throw new Error('Session not initialized. Call startSession() first.');
5711
5668
  }
@@ -5734,7 +5691,7 @@ class BrokersWrapper {
5734
5691
  });
5735
5692
  try {
5736
5693
  const response = await retryApiCall(async () => {
5737
- const apiResponse = await this.api.placeOrderApiBetaBrokersOrdersPost({ ...(resolvedParams.connectionId !== undefined ? { connectionId: resolvedParams.connectionId } : {}), placeOrderApiBetaBrokersOrdersPostRequest: resolvedParams.body ?? null }, { headers: { 'x-request-id': requestId, ...(this.sessionId && this.companyId ? { 'x-session-id': this.sessionId, 'x-company-id': this.companyId, ...(this.csrfToken ? { 'x-csrf-token': this.csrfToken } : {}) } : {}) } });
5694
+ const apiResponse = await this.api.placeOrderApiBetaBrokersOrdersPost({ placeOrderApiBetaBrokersOrdersPostRequest: { broker: resolvedParams.broker, order: { accountNumber: resolvedParams.accountNumber, ...resolvedParams.order, ...(resolvedParams.order.timeInForce !== undefined && typeof resolvedParams.order.timeInForce === 'string' ? { timeInForce: { timeInForce: resolvedParams.order.timeInForce } } : resolvedParams.order.timeInForce !== undefined ? { timeInForce: resolvedParams.order.timeInForce } : {}) } } }, { headers: { 'x-request-id': requestId, ...(this.sessionId && this.companyId ? { 'x-session-id': this.sessionId, 'x-company-id': this.companyId, ...(this.csrfToken ? { 'x-csrf-token': this.csrfToken } : {}) } : {}) } });
5738
5695
  return await applyResponseInterceptors(apiResponse, this.sdkConfig);
5739
5696
  }, {}, this.sdkConfig);
5740
5697
  // Unwrap axios response immediately - get FinaticResponse object
@@ -5834,11 +5791,8 @@ class BrokersWrapper {
5834
5791
  *
5835
5792
  * Cancel an existing order.
5836
5793
  *
5837
- * This endpoint is accessible from the portal and uses session-only authentication.
5838
- * Requires trading permissions for the company.
5839
- *
5840
- * The order_id is used to identify the order and automatically resolve the
5841
- * broker connection from the orders table.
5794
+ * Cancels an order by its order ID. The broker connection is automatically
5795
+ * resolved from the order record.
5842
5796
  * @param params.orderId {string} Order ID
5843
5797
  * @returns {Promise<FinaticResponse<OrderActionResult>>} Standard response with success/Error/Warning structure
5844
5798
  *
@@ -5849,7 +5803,7 @@ class BrokersWrapper {
5849
5803
  * ```typescript-client
5850
5804
  * // Minimal example with required parameters only
5851
5805
  * const result = await finatic.cancelOrder({
5852
- orderId: 'order_1234567890abcdef'
5806
+ orderId: 'example-id'
5853
5807
  * });
5854
5808
  *
5855
5809
  * // Access the response data
@@ -5991,12 +5945,18 @@ class BrokersWrapper {
5991
5945
  *
5992
5946
  * Modify an existing order.
5993
5947
  *
5994
- * This endpoint is accessible from the portal and uses session-only authentication.
5995
- * Requires trading permissions for the company.
5948
+ * Updates an order's parameters (price, quantity, etc.) by order ID.
5949
+ * The order structure follows the same pattern as placing orders, with common
5950
+ * fields shared across brokers and broker-specific fields available per broker.
5996
5951
  * @param params.orderId {string} Order ID
5997
- * @param params.body {ModifyOrderApiBetaBrokersOrdersOrderIdPatchRequest} (optional) Broker-specific *modify order* payload. Pass **all** standard parameters plus any broker-specific extensions under the `order` key. See the schema for a formal reference.
5998
- * @param params.accountNumber {string} (optional) Account number owning the order
5999
- * @param params.connectionId {string} (optional) Temporary bypass for testing: specify connection ID directly
5952
+ * @param params.broker {string} Broker identifier (robinhood, tasty_trade, ninja_trader)
5953
+ * @param params.accountNumber {number} Account number for the order
5954
+ * @param params.order.orderType {string} Type of order (market, limit, etc.)
5955
+ * @param params.order.assetType {string} Type of asset (equity, equity_option, crypto, forex)
5956
+ * @param params.order.action {string} Order action (buy, sell)
5957
+ * @param params.order.timeInForce {string} Time in force for the order
5958
+ * @param params.order.symbol {string} Trading symbol
5959
+ * @param params.order.orderQty {number} Order quantity
6000
5960
  * @returns {Promise<FinaticResponse<OrderActionResult>>} Standard response with success/Error/Warning structure
6001
5961
  *
6002
5962
  * Generated from: PATCH /api/beta/brokers/orders/{order_id}
@@ -6006,7 +5966,7 @@ class BrokersWrapper {
6006
5966
  * ```typescript-client
6007
5967
  * // Minimal example with required parameters only
6008
5968
  * const result = await finatic.modifyOrder({
6009
- orderId: 'order_1234567890abcdef'
5969
+ orderId: 'example-id'
6010
5970
  * });
6011
5971
  *
6012
5972
  * // Access the response data
@@ -6016,25 +5976,6 @@ class BrokersWrapper {
6016
5976
  * console.error('Error:', result.error.message);
6017
5977
  * }
6018
5978
  * ```
6019
- * @example
6020
- * ```typescript-client
6021
- * // Full example with optional parameters
6022
- * const result = await finatic.modifyOrder({
6023
- orderId: 'order_1234567890abcdef',
6024
- accountNumber: '123456789',
6025
- connectionId: '00000000-0000-0000-0000-000000000000'
6026
- * });
6027
- *
6028
- * // Handle response with warnings
6029
- * if (result.success) {
6030
- * console.log('Data:', result.success.data);
6031
- * if (result.warning && result.warning.length > 0) {
6032
- * console.warn('Warnings:', result.warning);
6033
- * }
6034
- * } else if (result.error) {
6035
- * console.error('Error:', result.error.message, result.error.code);
6036
- * }
6037
- * ```
6038
5979
  */
6039
5980
  async modifyOrder(params) {
6040
5981
  // Use params object (required parameters present)
@@ -6067,7 +6008,7 @@ class BrokersWrapper {
6067
6008
  });
6068
6009
  try {
6069
6010
  const response = await retryApiCall(async () => {
6070
- const apiResponse = await this.api.modifyOrderApiBetaBrokersOrdersOrderIdPatch({ orderId: resolvedParams.orderId ?? null, ...(resolvedParams.accountNumber !== undefined ? { accountNumber: resolvedParams.accountNumber } : {}), ...(resolvedParams.connectionId !== undefined ? { connectionId: resolvedParams.connectionId } : {}), modifyOrderApiBetaBrokersOrdersOrderIdPatchRequest: resolvedParams.body ?? null }, { headers: { 'x-request-id': requestId, ...(this.sessionId && this.companyId ? { 'x-session-id': this.sessionId, 'x-company-id': this.companyId, ...(this.csrfToken ? { 'x-csrf-token': this.csrfToken } : {}) } : {}) } });
6011
+ const apiResponse = await this.api.modifyOrderApiBetaBrokersOrdersOrderIdPatch({ placeOrderApiBetaBrokersOrdersPostRequest: { broker: resolvedParams.broker, order: { accountNumber: resolvedParams.accountNumber, ...resolvedParams.order, ...(resolvedParams.order.timeInForce !== undefined && typeof resolvedParams.order.timeInForce === 'string' ? { timeInForce: { timeInForce: resolvedParams.order.timeInForce } } : resolvedParams.order.timeInForce !== undefined ? { timeInForce: resolvedParams.order.timeInForce } : {}) } } }, { headers: { 'x-request-id': requestId, ...(this.sessionId && this.companyId ? { 'x-session-id': this.sessionId, 'x-company-id': this.companyId, ...(this.csrfToken ? { 'x-csrf-token': this.csrfToken } : {}) } : {}) } });
6071
6012
  return await applyResponseInterceptors(apiResponse, this.sdkConfig);
6072
6013
  }, {}, this.sdkConfig);
6073
6014
  // Unwrap axios response immediately - get FinaticResponse object
@@ -6215,7 +6156,7 @@ class CompanyWrapper {
6215
6156
  * ```typescript-client
6216
6157
  * // Minimal example with required parameters only
6217
6158
  * const result = await finatic.getCompany({
6218
- companyId: '00000000-0000-0000-0000-000000000000'
6159
+ companyId: 'example-id'
6219
6160
  * });
6220
6161
  *
6221
6162
  * // Access the response data
@@ -6392,7 +6333,7 @@ class SessionWrapper {
6392
6333
  *
6393
6334
  * Initialize a new session with company API key.
6394
6335
  * @param params.xApiKey {string} Company API key
6395
- * @returns {Promise<FinaticResponse<void>>} Standard response with success/Error/Warning structure
6336
+ * @returns {Promise<FinaticResponse<TokenResponseData>>} Standard response with success/Error/Warning structure
6396
6337
  *
6397
6338
  * Generated from: POST /api/beta/session/init
6398
6339
  * @methodId init_session_api_beta_session_init_post
@@ -6536,21 +6477,12 @@ class SessionWrapper {
6536
6477
  * Start a session with a one-time token.
6537
6478
  * @param params.OneTimeToken {string} One-time use token obtained from init_session endpoint to authenticate and start the session
6538
6479
  * @param params.body {SessionStartRequest} Session start request containing optional user ID to associate with the session
6539
- * @returns {Promise<FinaticResponse<void>>} Standard response with success/Error/Warning structure
6480
+ * @returns {Promise<FinaticResponse<SessionResponseData>>} Standard response with success/Error/Warning structure
6540
6481
  *
6541
6482
  * Generated from: POST /api/beta/session/start
6542
6483
  * @methodId start_session_api_beta_session_start_post
6543
6484
  * @category session
6544
- * @example
6545
- * ```typescript-client
6546
- * // Example with no parameters
6547
- * const result = await finatic.startSession({});
6548
- *
6549
- * // Access the response data
6550
- * if (result.success) {
6551
- * console.log('Data:', result.success.data);
6552
- * }
6553
- * ```
6485
+
6554
6486
  */
6555
6487
  async startSession(params) {
6556
6488
  // Use params object (required parameters present)
@@ -6682,7 +6614,7 @@ class SessionWrapper {
6682
6614
  * The session must be in ACTIVE or AUTHENTICATING state and the request must come from the same device
6683
6615
  * that initiated the session. Device info is automatically validated from the request.
6684
6616
  * @param params No parameters required for this method
6685
- * @returns {Promise<FinaticResponse<void>>} Standard response with success/Error/Warning structure
6617
+ * @returns {Promise<FinaticResponse<PortalUrlResponse>>} Standard response with success/Error/Warning structure
6686
6618
  *
6687
6619
  * Generated from: GET /api/beta/session/portal
6688
6620
  * @methodId get_portal_url_api_beta_session_portal_get
@@ -6839,7 +6771,7 @@ class SessionWrapper {
6839
6771
  * - Only accessible to authenticated sessions with user_id
6840
6772
  * - Validates that header session_id matches path session_id
6841
6773
  * @param params.sessionId {string} Session ID
6842
- * @returns {Promise<FinaticResponse<void>>} Standard response with success/Error/Warning structure
6774
+ * @returns {Promise<FinaticResponse<SessionUserResponse>>} Standard response with success/Error/Warning structure
6843
6775
  *
6844
6776
  * Generated from: GET /api/beta/session/{session_id}/user
6845
6777
  * @methodId get_session_user_api_beta_session__session_id__user_get
@@ -6848,7 +6780,7 @@ class SessionWrapper {
6848
6780
  * ```typescript-client
6849
6781
  * // Minimal example with required parameters only
6850
6782
  * const result = await finatic.getSessionUser({
6851
- sessionId: 'sess_1234567890abcdef'
6783
+ sessionId: 'example-id'
6852
6784
  * });
6853
6785
  *
6854
6786
  * // Access the response data
@@ -10720,7 +10652,7 @@ class SessionApi extends BaseAPI {
10720
10652
  const BrokersApiAxiosParamCreator = function (configuration) {
10721
10653
  return {
10722
10654
  /**
10723
- * Cancel an existing order. This endpoint is accessible from the portal and uses session-only authentication. Requires trading permissions for the company. The order_id is used to identify the order and automatically resolve the broker connection from the orders table.
10655
+ * Cancel an existing order. Cancels an order by its order ID. The broker connection is automatically resolved from the order record.
10724
10656
  * @summary Cancel Order
10725
10657
  * @param {string} orderId Order ID
10726
10658
  * @param {*} [options] Override http request option.
@@ -11416,7 +11348,7 @@ const BrokersApiAxiosParamCreator = function (configuration) {
11416
11348
  };
11417
11349
  },
11418
11350
  /**
11419
- * Modify an existing order. This endpoint is accessible from the portal and uses session-only authentication. Requires trading permissions for the company.
11351
+ * Modify an existing order. Updates an order\'s parameters (price, quantity, etc.) by order ID. The order structure follows the same pattern as placing orders, with common fields shared across brokers and broker-specific fields available per broker.
11420
11352
  * @summary Modify Order
11421
11353
  * @param {string} orderId Order ID
11422
11354
  * @param {string | null} [accountNumber] Account number owning the order
@@ -11457,7 +11389,7 @@ const BrokersApiAxiosParamCreator = function (configuration) {
11457
11389
  };
11458
11390
  },
11459
11391
  /**
11460
- * Create a new order via the specified broker connection. This endpoint is accessible from the portal and uses session-only authentication. Requires trading permissions for the company. Standard parameters ------------------- The following fields constitute the unified Finatic *common order schema* and therefore appear individually as query parameters in the autogenerated OpenAPI documentation: - ``broker`` - ``account_number`` - ``order_type`` - ``asset_type`` - ``action`` - ``time_in_force`` - ``symbol`` - ``order_qty`` They are surfaced as *query* parameters **only to make the accepted fields obvious in the interactive docs**. In production usage you should send these fields inside the JSON body (see ``order_request``) so that the entire order specification travels in one payload. (Nothing will break if you send both, but there is no need to do so.) Body payload & broker-specific extras ------------------------------------- Put the standard parameters plus any broker-specific extensions under the ``order`` key of the body. Refer to the bundled OpenAPI examples below to see complete payloads for common order types (market, limit, spreads, etc.) across supported brokers. For a formal reference of broker-specific extensions inspect the ``BrokerOrderPlaceExtras`` schema. The endpoint resolves the active ``user_broker_connection`` by calling the ``get_user_broker_connection_ids_for_broker`` RPC in Supabase. If no active connection exists it returns a list of *available* brokers so your client can guide the user accordingly. Broker Notes ------------ - The responses that you get back from the broker are not always the same. The response models are validated for each broker, but we do not standardize the repsonses. - Tasty Trade: If you want to trade options for a particular stock, first fetch the full option chain via the GET https://api.tastyworks.com/option-chains/{stock_symbol}/nested endpoint. This endpoint returns all available expirations that tastytrade offers for that equity symbol. Each expiration contains a list of strikes, where each strike has a call and put field representing the call symbol and put symbol respectively. We are planning to add a new endpoint to fetch the option chain for a particular stock and handle this logic for you, but for now you need to fetch the option chain manually.
11392
+ * Place a new order through the specified broker. Creates an order using the broker connection associated with your account. The order structure includes common fields (symbol, quantity, order type, etc.) shared across all brokers, plus broker-specific fields that vary by broker. Common order fields include: broker, accountNumber, orderType, assetType, action, timeInForce, symbol, and orderQty. Additional broker-specific fields can be included in the order object - see the broker-specific tabs in the parameters section for details.
11461
11393
  * @summary Place Order
11462
11394
  * @param {string | null} [connectionId] Temporary bypass for testing: specify connection ID directly
11463
11395
  * @param {PlaceOrderApiBetaBrokersOrdersPostRequest | null} [placeOrderApiBetaBrokersOrdersPostRequest]
@@ -11498,7 +11430,7 @@ const BrokersApiFp = function (configuration) {
11498
11430
  const localVarAxiosParamCreator = BrokersApiAxiosParamCreator(configuration);
11499
11431
  return {
11500
11432
  /**
11501
- * Cancel an existing order. This endpoint is accessible from the portal and uses session-only authentication. Requires trading permissions for the company. The order_id is used to identify the order and automatically resolve the broker connection from the orders table.
11433
+ * Cancel an existing order. Cancels an order by its order ID. The broker connection is automatically resolved from the order record.
11502
11434
  * @summary Cancel Order
11503
11435
  * @param {string} orderId Order ID
11504
11436
  * @param {*} [options] Override http request option.
@@ -11745,7 +11677,7 @@ const BrokersApiFp = function (configuration) {
11745
11677
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
11746
11678
  },
11747
11679
  /**
11748
- * Modify an existing order. This endpoint is accessible from the portal and uses session-only authentication. Requires trading permissions for the company.
11680
+ * Modify an existing order. Updates an order\'s parameters (price, quantity, etc.) by order ID. The order structure follows the same pattern as placing orders, with common fields shared across brokers and broker-specific fields available per broker.
11749
11681
  * @summary Modify Order
11750
11682
  * @param {string} orderId Order ID
11751
11683
  * @param {string | null} [accountNumber] Account number owning the order
@@ -11761,7 +11693,7 @@ const BrokersApiFp = function (configuration) {
11761
11693
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
11762
11694
  },
11763
11695
  /**
11764
- * Create a new order via the specified broker connection. This endpoint is accessible from the portal and uses session-only authentication. Requires trading permissions for the company. Standard parameters ------------------- The following fields constitute the unified Finatic *common order schema* and therefore appear individually as query parameters in the autogenerated OpenAPI documentation: - ``broker`` - ``account_number`` - ``order_type`` - ``asset_type`` - ``action`` - ``time_in_force`` - ``symbol`` - ``order_qty`` They are surfaced as *query* parameters **only to make the accepted fields obvious in the interactive docs**. In production usage you should send these fields inside the JSON body (see ``order_request``) so that the entire order specification travels in one payload. (Nothing will break if you send both, but there is no need to do so.) Body payload & broker-specific extras ------------------------------------- Put the standard parameters plus any broker-specific extensions under the ``order`` key of the body. Refer to the bundled OpenAPI examples below to see complete payloads for common order types (market, limit, spreads, etc.) across supported brokers. For a formal reference of broker-specific extensions inspect the ``BrokerOrderPlaceExtras`` schema. The endpoint resolves the active ``user_broker_connection`` by calling the ``get_user_broker_connection_ids_for_broker`` RPC in Supabase. If no active connection exists it returns a list of *available* brokers so your client can guide the user accordingly. Broker Notes ------------ - The responses that you get back from the broker are not always the same. The response models are validated for each broker, but we do not standardize the repsonses. - Tasty Trade: If you want to trade options for a particular stock, first fetch the full option chain via the GET https://api.tastyworks.com/option-chains/{stock_symbol}/nested endpoint. This endpoint returns all available expirations that tastytrade offers for that equity symbol. Each expiration contains a list of strikes, where each strike has a call and put field representing the call symbol and put symbol respectively. We are planning to add a new endpoint to fetch the option chain for a particular stock and handle this logic for you, but for now you need to fetch the option chain manually.
11696
+ * Place a new order through the specified broker. Creates an order using the broker connection associated with your account. The order structure includes common fields (symbol, quantity, order type, etc.) shared across all brokers, plus broker-specific fields that vary by broker. Common order fields include: broker, accountNumber, orderType, assetType, action, timeInForce, symbol, and orderQty. Additional broker-specific fields can be included in the order object - see the broker-specific tabs in the parameters section for details.
11765
11697
  * @summary Place Order
11766
11698
  * @param {string | null} [connectionId] Temporary bypass for testing: specify connection ID directly
11767
11699
  * @param {PlaceOrderApiBetaBrokersOrdersPostRequest | null} [placeOrderApiBetaBrokersOrdersPostRequest]
@@ -11781,7 +11713,7 @@ const BrokersApiFp = function (configuration) {
11781
11713
  */
11782
11714
  class BrokersApi extends BaseAPI {
11783
11715
  /**
11784
- * Cancel an existing order. This endpoint is accessible from the portal and uses session-only authentication. Requires trading permissions for the company. The order_id is used to identify the order and automatically resolve the broker connection from the orders table.
11716
+ * Cancel an existing order. Cancels an order by its order ID. The broker connection is automatically resolved from the order record.
11785
11717
  * @summary Cancel Order
11786
11718
  * @param {BrokersApiCancelOrderApiBetaBrokersOrdersOrderIdDeleteRequest} requestParameters Request parameters.
11787
11719
  * @param {*} [options] Override http request option.
@@ -11919,7 +11851,7 @@ class BrokersApi extends BaseAPI {
11919
11851
  return BrokersApiFp(this.configuration).listBrokerConnectionsApiBetaBrokersConnectionsGet(options).then((request) => request(this.axios, this.basePath));
11920
11852
  }
11921
11853
  /**
11922
- * Modify an existing order. This endpoint is accessible from the portal and uses session-only authentication. Requires trading permissions for the company.
11854
+ * Modify an existing order. Updates an order\'s parameters (price, quantity, etc.) by order ID. The order structure follows the same pattern as placing orders, with common fields shared across brokers and broker-specific fields available per broker.
11923
11855
  * @summary Modify Order
11924
11856
  * @param {BrokersApiModifyOrderApiBetaBrokersOrdersOrderIdPatchRequest} requestParameters Request parameters.
11925
11857
  * @param {*} [options] Override http request option.
@@ -11929,7 +11861,7 @@ class BrokersApi extends BaseAPI {
11929
11861
  return BrokersApiFp(this.configuration).modifyOrderApiBetaBrokersOrdersOrderIdPatch(requestParameters.orderId, requestParameters.accountNumber, requestParameters.connectionId, requestParameters.modifyOrderApiBetaBrokersOrdersOrderIdPatchRequest, options).then((request) => request(this.axios, this.basePath));
11930
11862
  }
11931
11863
  /**
11932
- * Create a new order via the specified broker connection. This endpoint is accessible from the portal and uses session-only authentication. Requires trading permissions for the company. Standard parameters ------------------- The following fields constitute the unified Finatic *common order schema* and therefore appear individually as query parameters in the autogenerated OpenAPI documentation: - ``broker`` - ``account_number`` - ``order_type`` - ``asset_type`` - ``action`` - ``time_in_force`` - ``symbol`` - ``order_qty`` They are surfaced as *query* parameters **only to make the accepted fields obvious in the interactive docs**. In production usage you should send these fields inside the JSON body (see ``order_request``) so that the entire order specification travels in one payload. (Nothing will break if you send both, but there is no need to do so.) Body payload & broker-specific extras ------------------------------------- Put the standard parameters plus any broker-specific extensions under the ``order`` key of the body. Refer to the bundled OpenAPI examples below to see complete payloads for common order types (market, limit, spreads, etc.) across supported brokers. For a formal reference of broker-specific extensions inspect the ``BrokerOrderPlaceExtras`` schema. The endpoint resolves the active ``user_broker_connection`` by calling the ``get_user_broker_connection_ids_for_broker`` RPC in Supabase. If no active connection exists it returns a list of *available* brokers so your client can guide the user accordingly. Broker Notes ------------ - The responses that you get back from the broker are not always the same. The response models are validated for each broker, but we do not standardize the repsonses. - Tasty Trade: If you want to trade options for a particular stock, first fetch the full option chain via the GET https://api.tastyworks.com/option-chains/{stock_symbol}/nested endpoint. This endpoint returns all available expirations that tastytrade offers for that equity symbol. Each expiration contains a list of strikes, where each strike has a call and put field representing the call symbol and put symbol respectively. We are planning to add a new endpoint to fetch the option chain for a particular stock and handle this logic for you, but for now you need to fetch the option chain manually.
11864
+ * Place a new order through the specified broker. Creates an order using the broker connection associated with your account. The order structure includes common fields (symbol, quantity, order type, etc.) shared across all brokers, plus broker-specific fields that vary by broker. Common order fields include: broker, accountNumber, orderType, assetType, action, timeInForce, symbol, and orderQty. Additional broker-specific fields can be included in the order object - see the broker-specific tabs in the parameters section for details.
11933
11865
  * @summary Place Order
11934
11866
  * @param {BrokersApiPlaceOrderApiBetaBrokersOrdersPostRequest} requestParameters Request parameters.
11935
11867
  * @param {*} [options] Override http request option.
@@ -12478,7 +12410,9 @@ let FinaticConnect$1 = class FinaticConnect extends EventEmitter {
12478
12410
  const data = response?.success?.data;
12479
12411
  return {
12480
12412
  user_id: data?.user_id || '',
12481
- company_id: data?.company_id || this.companyId || '',
12413
+ // The 'getSessionUser' endpoint currently returns 'SessionUserResponse' which contains 'user_id'.
12414
+ // Company context is tracked from 'startSession' and stored on the instance.
12415
+ company_id: this.companyId || '',
12482
12416
  };
12483
12417
  }
12484
12418
  /**
@@ -12509,18 +12443,12 @@ let FinaticConnect$1 = class FinaticConnect extends EventEmitter {
12509
12443
  * Get Company
12510
12444
  *
12511
12445
  * Get public company details by ID (no user check, no sensitive data).
12512
- *
12513
- * Convenience method that delegates to company wrapper.
12514
- *
12515
- * @param params - Optional parameters object. Only include the fields you want to use.
12516
- * Example: getCompany({ accountId: "123", limit: 10, offset: 0 })
12517
- * @returns FinaticResponse with success, error, and warning fields
12518
12446
  * @methodId get_company_api_beta_company__company_id__get
12519
12447
  * @category company
12520
12448
  * @example
12521
12449
  * ```typescript-client
12522
12450
  * // Minimal example with required parameters only
12523
- * const result = await finatic.getCompany({ companyId: '00000000-0000-0000-0000-000000000000' });
12451
+ * const result = await finatic.getCompany({ companyId: 'example-id' });
12524
12452
  *
12525
12453
  * // Access the response data
12526
12454
  * if (result.success) {
@@ -12532,7 +12460,7 @@ let FinaticConnect$1 = class FinaticConnect extends EventEmitter {
12532
12460
  * @example
12533
12461
  * ```typescript-server
12534
12462
  * // Minimal example with required parameters only
12535
- * const result = await finatic.getCompany({ companyId: '00000000-0000-0000-0000-000000000000' });
12463
+ * const result = await finatic.getCompany({ companyId: 'example-id' });
12536
12464
  *
12537
12465
  * // Access the response data
12538
12466
  * if (result.success) {
@@ -12545,7 +12473,7 @@ let FinaticConnect$1 = class FinaticConnect extends EventEmitter {
12545
12473
  * ```python
12546
12474
  * # Minimal example with required parameters only
12547
12475
  * result = await finatic.get_company(
12548
- * company_id='00000000-0000-0000-0000-000000000000'
12476
+ * company_id='example'
12549
12477
  * )
12550
12478
  *
12551
12479
  * # Access the response data
@@ -12566,12 +12494,6 @@ let FinaticConnect$1 = class FinaticConnect extends EventEmitter {
12566
12494
  * Returns array of current balances (one per unit_code per account).
12567
12495
  * This endpoint is accessible from the portal and uses session-only authentication.
12568
12496
  * Returns balances from connections the company has read access to.
12569
- *
12570
- * Convenience method that delegates to brokers wrapper.
12571
- *
12572
- * @param params - Optional parameters object. Only include the fields you want to use.
12573
- * Example: getBalances({ accountId: "123", limit: 10, offset: 0 })
12574
- * @returns FinaticResponse with success, error, and warning fields
12575
12497
  * @methodId get_balances_api_beta_brokers_data_balances_get
12576
12498
  * @category brokers
12577
12499
  * @example
@@ -12587,7 +12509,7 @@ let FinaticConnect$1 = class FinaticConnect extends EventEmitter {
12587
12509
  * @example
12588
12510
  * ```typescript-client
12589
12511
  * // Full example with optional parameters
12590
- * const result = await finatic.getBalances({ brokerId: 'alpaca', connectionId: '00000000-0000-0000-0000-000000000000', accountId: '123456789' });
12512
+ * const result = await finatic.getBalances({ brokerId: 'example-id', connectionId: 'example-id', accountId: 'example-id' });
12591
12513
  *
12592
12514
  * // Handle response with warnings
12593
12515
  * if (result.success) {
@@ -12622,9 +12544,9 @@ let FinaticConnect$1 = class FinaticConnect extends EventEmitter {
12622
12544
  * ```python
12623
12545
  * # Full example with optional parameters
12624
12546
  * result = await finatic.get_balances(
12625
- * broker_id='alpaca',
12626
- connection_id='00000000-0000-0000-0000-000000000000',
12627
- account_id='123456789'
12547
+ * broker_id='example',
12548
+ connection_id='example',
12549
+ account_id='example'
12628
12550
  * )
12629
12551
  *
12630
12552
  * # Handle response with warnings
@@ -12646,12 +12568,6 @@ let FinaticConnect$1 = class FinaticConnect extends EventEmitter {
12646
12568
  *
12647
12569
  * This endpoint is accessible from the portal and uses session-only authentication.
12648
12570
  * Returns accounts from connections the company has read access to.
12649
- *
12650
- * Convenience method that delegates to brokers wrapper.
12651
- *
12652
- * @param params - Optional parameters object. Only include the fields you want to use.
12653
- * Example: getAccounts({ accountId: "123", limit: 10, offset: 0 })
12654
- * @returns FinaticResponse with success, error, and warning fields
12655
12571
  * @methodId get_accounts_api_beta_brokers_data_accounts_get
12656
12572
  * @category brokers
12657
12573
  * @example
@@ -12667,7 +12583,7 @@ let FinaticConnect$1 = class FinaticConnect extends EventEmitter {
12667
12583
  * @example
12668
12584
  * ```typescript-client
12669
12585
  * // Full example with optional parameters
12670
- * const result = await finatic.getAccounts({ brokerId: 'alpaca', connectionId: '00000000-0000-0000-0000-000000000000', accountType: 'margin' });
12586
+ * const result = await finatic.getAccounts({ brokerId: 'example-id', connectionId: 'example-id', accountType: 'margin' });
12671
12587
  *
12672
12588
  * // Handle response with warnings
12673
12589
  * if (result.success) {
@@ -12702,8 +12618,8 @@ let FinaticConnect$1 = class FinaticConnect extends EventEmitter {
12702
12618
  * ```python
12703
12619
  * # Full example with optional parameters
12704
12620
  * result = await finatic.get_accounts(
12705
- * broker_id='alpaca',
12706
- connection_id='00000000-0000-0000-0000-000000000000',
12621
+ * broker_id='example',
12622
+ connection_id='example',
12707
12623
  account_type='margin'
12708
12624
  * )
12709
12625
  *
@@ -12731,12 +12647,6 @@ let FinaticConnect$1 = class FinaticConnect extends EventEmitter {
12731
12647
  * -------
12732
12648
  * FinaticResponse[list[BrokerInfo]]
12733
12649
  * list of available brokers with their metadata.
12734
- *
12735
- * Convenience method that delegates to brokers wrapper.
12736
- *
12737
- * @param params - Optional parameters object. Only include the fields you want to use.
12738
- * Example: getBrokers({ accountId: "123", limit: 10, offset: 0 })
12739
- * @returns FinaticResponse with success, error, and warning fields
12740
12650
  * @methodId get_brokers_api_beta_brokers__get
12741
12651
  * @category brokers
12742
12652
  * @example
@@ -12780,12 +12690,6 @@ let FinaticConnect$1 = class FinaticConnect extends EventEmitter {
12780
12690
  * This endpoint is accessible from the portal and uses session-only authentication.
12781
12691
  * Returns connections that the user has any permissions for, including the current
12782
12692
  * company's permissions (read/write) for each connection.
12783
- *
12784
- * Convenience method that delegates to brokers wrapper.
12785
- *
12786
- * @param params - Optional parameters object. Only include the fields you want to use.
12787
- * Example: getBrokerConnections({ accountId: "123", limit: 10, offset: 0 })
12788
- * @returns FinaticResponse with success, error, and warning fields
12789
12693
  * @methodId list_broker_connections_api_beta_brokers_connections_get
12790
12694
  * @category brokers
12791
12695
  * @example
@@ -12828,18 +12732,12 @@ let FinaticConnect$1 = class FinaticConnect extends EventEmitter {
12828
12732
  *
12829
12733
  * If the company is the only one with access, the entire connection is deleted.
12830
12734
  * If other companies have access, only the company's access is removed.
12831
- *
12832
- * Convenience method that delegates to brokers wrapper.
12833
- *
12834
- * @param params - Optional parameters object. Only include the fields you want to use.
12835
- * Example: disconnectCompanyFromBroker({ accountId: "123", limit: 10, offset: 0 })
12836
- * @returns FinaticResponse with success, error, and warning fields
12837
12735
  * @methodId disconnect_company_from_broker_api_beta_brokers_disconnect_company__connection_id__delete
12838
12736
  * @category brokers
12839
12737
  * @example
12840
12738
  * ```typescript-client
12841
12739
  * // Minimal example with required parameters only
12842
- * const result = await finatic.disconnectCompanyFromBroker({ connectionId: '00000000-0000-0000-0000-000000000000' });
12740
+ * const result = await finatic.disconnectCompanyFromBroker({ connectionId: 'example-id' });
12843
12741
  *
12844
12742
  * // Access the response data
12845
12743
  * if (result.success) {
@@ -12851,7 +12749,7 @@ let FinaticConnect$1 = class FinaticConnect extends EventEmitter {
12851
12749
  * @example
12852
12750
  * ```typescript-server
12853
12751
  * // Minimal example with required parameters only
12854
- * const result = await finatic.disconnectCompanyFromBroker({ connectionId: '00000000-0000-0000-0000-000000000000' });
12752
+ * const result = await finatic.disconnectCompanyFromBroker({ connectionId: 'example-id' });
12855
12753
  *
12856
12754
  * // Access the response data
12857
12755
  * if (result.success) {
@@ -12864,7 +12762,7 @@ let FinaticConnect$1 = class FinaticConnect extends EventEmitter {
12864
12762
  * ```python
12865
12763
  * # Minimal example with required parameters only
12866
12764
  * result = await finatic.disconnect_company_from_broker(
12867
- * connection_id='00000000-0000-0000-0000-000000000000'
12765
+ * connection_id='example'
12868
12766
  * )
12869
12767
  *
12870
12768
  * # Access the response data
@@ -12884,12 +12782,6 @@ let FinaticConnect$1 = class FinaticConnect extends EventEmitter {
12884
12782
  *
12885
12783
  * This endpoint is accessible from the portal and uses session-only authentication.
12886
12784
  * Returns orders from connections the company has read access to.
12887
- *
12888
- * Convenience method that delegates to brokers wrapper.
12889
- *
12890
- * @param params - Optional parameters object. Only include the fields you want to use.
12891
- * Example: getOrders({ accountId: "123", limit: 10, offset: 0 })
12892
- * @returns FinaticResponse with success, error, and warning fields
12893
12785
  * @methodId get_orders_api_beta_brokers_data_orders_get
12894
12786
  * @category brokers
12895
12787
  * @example
@@ -12905,7 +12797,7 @@ let FinaticConnect$1 = class FinaticConnect extends EventEmitter {
12905
12797
  * @example
12906
12798
  * ```typescript-client
12907
12799
  * // Full example with optional parameters
12908
- * const result = await finatic.getOrders({ brokerId: 'alpaca', connectionId: '00000000-0000-0000-0000-000000000000', accountId: '123456789' });
12800
+ * const result = await finatic.getOrders({ brokerId: 'example-id', connectionId: 'example-id', accountId: 'example-id' });
12909
12801
  *
12910
12802
  * // Handle response with warnings
12911
12803
  * if (result.success) {
@@ -12940,9 +12832,9 @@ let FinaticConnect$1 = class FinaticConnect extends EventEmitter {
12940
12832
  * ```python
12941
12833
  * # Full example with optional parameters
12942
12834
  * result = await finatic.get_orders(
12943
- * broker_id='alpaca',
12944
- connection_id='00000000-0000-0000-0000-000000000000',
12945
- account_id='123456789'
12835
+ * broker_id='example',
12836
+ connection_id='example',
12837
+ account_id='example'
12946
12838
  * )
12947
12839
  *
12948
12840
  * # Handle response with warnings
@@ -12964,12 +12856,6 @@ let FinaticConnect$1 = class FinaticConnect extends EventEmitter {
12964
12856
  *
12965
12857
  * This endpoint is accessible from the portal and uses session-only authentication.
12966
12858
  * Returns positions from connections the company has read access to.
12967
- *
12968
- * Convenience method that delegates to brokers wrapper.
12969
- *
12970
- * @param params - Optional parameters object. Only include the fields you want to use.
12971
- * Example: getPositions({ accountId: "123", limit: 10, offset: 0 })
12972
- * @returns FinaticResponse with success, error, and warning fields
12973
12859
  * @methodId get_positions_api_beta_brokers_data_positions_get
12974
12860
  * @category brokers
12975
12861
  * @example
@@ -12985,7 +12871,7 @@ let FinaticConnect$1 = class FinaticConnect extends EventEmitter {
12985
12871
  * @example
12986
12872
  * ```typescript-client
12987
12873
  * // Full example with optional parameters
12988
- * const result = await finatic.getPositions({ brokerId: 'alpaca', connectionId: '00000000-0000-0000-0000-000000000000', accountId: '123456789' });
12874
+ * const result = await finatic.getPositions({ brokerId: 'example-id', connectionId: 'example-id', accountId: 'example-id' });
12989
12875
  *
12990
12876
  * // Handle response with warnings
12991
12877
  * if (result.success) {
@@ -13020,9 +12906,9 @@ let FinaticConnect$1 = class FinaticConnect extends EventEmitter {
13020
12906
  * ```python
13021
12907
  * # Full example with optional parameters
13022
12908
  * result = await finatic.get_positions(
13023
- * broker_id='alpaca',
13024
- connection_id='00000000-0000-0000-0000-000000000000',
13025
- account_id='123456789'
12909
+ * broker_id='example',
12910
+ connection_id='example',
12911
+ account_id='example'
13026
12912
  * )
13027
12913
  *
13028
12914
  * # Handle response with warnings
@@ -13044,12 +12930,6 @@ let FinaticConnect$1 = class FinaticConnect extends EventEmitter {
13044
12930
  *
13045
12931
  * Returns transactions from connections the company has read access to.
13046
12932
  * This endpoint is accessible from the portal and uses session-only authentication.
13047
- *
13048
- * Convenience method that delegates to brokers wrapper.
13049
- *
13050
- * @param params - Optional parameters object. Only include the fields you want to use.
13051
- * Example: getTransactions({ accountId: "123", limit: 10, offset: 0 })
13052
- * @returns FinaticResponse with success, error, and warning fields
13053
12933
  * @methodId get_transactions_api_beta_brokers_data_transactions_get
13054
12934
  * @category brokers
13055
12935
  * @example
@@ -13065,7 +12945,7 @@ let FinaticConnect$1 = class FinaticConnect extends EventEmitter {
13065
12945
  * @example
13066
12946
  * ```typescript-client
13067
12947
  * // Full example with optional parameters
13068
- * const result = await finatic.getTransactions({ brokerId: 'alpaca', connectionId: '00000000-0000-0000-0000-000000000000', accountId: '123456789' });
12948
+ * const result = await finatic.getTransactions({ brokerId: 'example-id', connectionId: 'example-id', accountId: 'example-id' });
13069
12949
  *
13070
12950
  * // Handle response with warnings
13071
12951
  * if (result.success) {
@@ -13100,9 +12980,9 @@ let FinaticConnect$1 = class FinaticConnect extends EventEmitter {
13100
12980
  * ```python
13101
12981
  * # Full example with optional parameters
13102
12982
  * result = await finatic.get_transactions(
13103
- * broker_id='alpaca',
13104
- connection_id='00000000-0000-0000-0000-000000000000',
13105
- account_id='123456789'
12983
+ * broker_id='example',
12984
+ connection_id='example',
12985
+ account_id='example'
13106
12986
  * )
13107
12987
  *
13108
12988
  * # Handle response with warnings
@@ -13123,18 +13003,12 @@ let FinaticConnect$1 = class FinaticConnect extends EventEmitter {
13123
13003
  * Get order fills for a specific order.
13124
13004
  *
13125
13005
  * This endpoint returns all execution fills for the specified order.
13126
- *
13127
- * Convenience method that delegates to brokers wrapper.
13128
- *
13129
- * @param params - Optional parameters object. Only include the fields you want to use.
13130
- * Example: getOrderFills({ accountId: "123", limit: 10, offset: 0 })
13131
- * @returns FinaticResponse with success, error, and warning fields
13132
13006
  * @methodId get_order_fills_api_beta_brokers_data_orders__order_id__fills_get
13133
13007
  * @category brokers
13134
13008
  * @example
13135
13009
  * ```typescript-client
13136
13010
  * // Minimal example with required parameters only
13137
- * const result = await finatic.getOrderFills({ orderId: '00000000-0000-0000-0000-000000000000' });
13011
+ * const result = await finatic.getOrderFills({ orderId: 'example-id' });
13138
13012
  *
13139
13013
  * // Access the response data
13140
13014
  * if (result.success) {
@@ -13146,7 +13020,7 @@ let FinaticConnect$1 = class FinaticConnect extends EventEmitter {
13146
13020
  * @example
13147
13021
  * ```typescript-client
13148
13022
  * // Full example with optional parameters
13149
- * const result = await finatic.getOrderFills({ orderId: '00000000-0000-0000-0000-000000000000', connectionId: '00000000-0000-0000-0000-000000000000', limit: 100, offset: 0 });
13023
+ * const result = await finatic.getOrderFills({ orderId: 'example-id', connectionId: 'example-id', limit: 0, offset: 0 });
13150
13024
  *
13151
13025
  * // Handle response with warnings
13152
13026
  * if (result.success) {
@@ -13161,7 +13035,7 @@ let FinaticConnect$1 = class FinaticConnect extends EventEmitter {
13161
13035
  * @example
13162
13036
  * ```typescript-server
13163
13037
  * // Minimal example with required parameters only
13164
- * const result = await finatic.getOrderFills({ orderId: '00000000-0000-0000-0000-000000000000' });
13038
+ * const result = await finatic.getOrderFills({ orderId: 'example-id' });
13165
13039
  *
13166
13040
  * // Access the response data
13167
13041
  * if (result.success) {
@@ -13174,7 +13048,7 @@ let FinaticConnect$1 = class FinaticConnect extends EventEmitter {
13174
13048
  * ```python
13175
13049
  * # Minimal example with required parameters only
13176
13050
  * result = await finatic.get_order_fills(
13177
- * order_id='00000000-0000-0000-0000-000000000000'
13051
+ * order_id='example'
13178
13052
  * )
13179
13053
  *
13180
13054
  * # Access the response data
@@ -13187,10 +13061,10 @@ let FinaticConnect$1 = class FinaticConnect extends EventEmitter {
13187
13061
  * ```python
13188
13062
  * # Full example with optional parameters
13189
13063
  * result = await finatic.get_order_fills(
13190
- * order_id='00000000-0000-0000-0000-000000000000',
13191
- connection_id='00000000-0000-0000-0000-000000000000',
13192
- limit=100,
13193
- offset=0
13064
+ * order_id='example',
13065
+ connection_id='example',
13066
+ limit='example',
13067
+ offset='example'
13194
13068
  * )
13195
13069
  *
13196
13070
  * # Handle response with warnings
@@ -13211,18 +13085,12 @@ let FinaticConnect$1 = class FinaticConnect extends EventEmitter {
13211
13085
  * Get order events for a specific order.
13212
13086
  *
13213
13087
  * This endpoint returns all lifecycle events for the specified order.
13214
- *
13215
- * Convenience method that delegates to brokers wrapper.
13216
- *
13217
- * @param params - Optional parameters object. Only include the fields you want to use.
13218
- * Example: getOrderEvents({ accountId: "123", limit: 10, offset: 0 })
13219
- * @returns FinaticResponse with success, error, and warning fields
13220
13088
  * @methodId get_order_events_api_beta_brokers_data_orders__order_id__events_get
13221
13089
  * @category brokers
13222
13090
  * @example
13223
13091
  * ```typescript-client
13224
13092
  * // Minimal example with required parameters only
13225
- * const result = await finatic.getOrderEvents({ orderId: '00000000-0000-0000-0000-000000000000' });
13093
+ * const result = await finatic.getOrderEvents({ orderId: 'example-id' });
13226
13094
  *
13227
13095
  * // Access the response data
13228
13096
  * if (result.success) {
@@ -13234,7 +13102,7 @@ let FinaticConnect$1 = class FinaticConnect extends EventEmitter {
13234
13102
  * @example
13235
13103
  * ```typescript-client
13236
13104
  * // Full example with optional parameters
13237
- * const result = await finatic.getOrderEvents({ orderId: '00000000-0000-0000-0000-000000000000', connectionId: '00000000-0000-0000-0000-000000000000', limit: 100, offset: 0 });
13105
+ * const result = await finatic.getOrderEvents({ orderId: 'example-id', connectionId: 'example-id', limit: 0, offset: 0 });
13238
13106
  *
13239
13107
  * // Handle response with warnings
13240
13108
  * if (result.success) {
@@ -13249,7 +13117,7 @@ let FinaticConnect$1 = class FinaticConnect extends EventEmitter {
13249
13117
  * @example
13250
13118
  * ```typescript-server
13251
13119
  * // Minimal example with required parameters only
13252
- * const result = await finatic.getOrderEvents({ orderId: '00000000-0000-0000-0000-000000000000' });
13120
+ * const result = await finatic.getOrderEvents({ orderId: 'example-id' });
13253
13121
  *
13254
13122
  * // Access the response data
13255
13123
  * if (result.success) {
@@ -13262,7 +13130,7 @@ let FinaticConnect$1 = class FinaticConnect extends EventEmitter {
13262
13130
  * ```python
13263
13131
  * # Minimal example with required parameters only
13264
13132
  * result = await finatic.get_order_events(
13265
- * order_id='00000000-0000-0000-0000-000000000000'
13133
+ * order_id='example'
13266
13134
  * )
13267
13135
  *
13268
13136
  * # Access the response data
@@ -13275,10 +13143,10 @@ let FinaticConnect$1 = class FinaticConnect extends EventEmitter {
13275
13143
  * ```python
13276
13144
  * # Full example with optional parameters
13277
13145
  * result = await finatic.get_order_events(
13278
- * order_id='00000000-0000-0000-0000-000000000000',
13279
- connection_id='00000000-0000-0000-0000-000000000000',
13280
- limit=100,
13281
- offset=0
13146
+ * order_id='example',
13147
+ connection_id='example',
13148
+ limit='example',
13149
+ offset='example'
13282
13150
  * )
13283
13151
  *
13284
13152
  * # Handle response with warnings
@@ -13299,12 +13167,6 @@ let FinaticConnect$1 = class FinaticConnect extends EventEmitter {
13299
13167
  * Get order groups.
13300
13168
  *
13301
13169
  * This endpoint returns order groups that contain multiple orders.
13302
- *
13303
- * Convenience method that delegates to brokers wrapper.
13304
- *
13305
- * @param params - Optional parameters object. Only include the fields you want to use.
13306
- * Example: getOrderGroups({ accountId: "123", limit: 10, offset: 0 })
13307
- * @returns FinaticResponse with success, error, and warning fields
13308
13170
  * @methodId get_order_groups_api_beta_brokers_data_orders_groups_get
13309
13171
  * @category brokers
13310
13172
  * @example
@@ -13320,7 +13182,7 @@ let FinaticConnect$1 = class FinaticConnect extends EventEmitter {
13320
13182
  * @example
13321
13183
  * ```typescript-client
13322
13184
  * // Full example with optional parameters
13323
- * const result = await finatic.getOrderGroups({ brokerId: 'alpaca', connectionId: '00000000-0000-0000-0000-000000000000', limit: 100 });
13185
+ * const result = await finatic.getOrderGroups({ brokerId: 'example-id', connectionId: 'example-id', limit: 0 });
13324
13186
  *
13325
13187
  * // Handle response with warnings
13326
13188
  * if (result.success) {
@@ -13355,9 +13217,9 @@ let FinaticConnect$1 = class FinaticConnect extends EventEmitter {
13355
13217
  * ```python
13356
13218
  * # Full example with optional parameters
13357
13219
  * result = await finatic.get_order_groups(
13358
- * broker_id='alpaca',
13359
- connection_id='00000000-0000-0000-0000-000000000000',
13360
- limit=100
13220
+ * broker_id='example',
13221
+ connection_id='example',
13222
+ limit='example'
13361
13223
  * )
13362
13224
  *
13363
13225
  * # Handle response with warnings
@@ -13379,12 +13241,6 @@ let FinaticConnect$1 = class FinaticConnect extends EventEmitter {
13379
13241
  *
13380
13242
  * This endpoint returns tax lots for positions, which are used for tax reporting.
13381
13243
  * Each lot tracks when a position was opened/closed and at what prices.
13382
- *
13383
- * Convenience method that delegates to brokers wrapper.
13384
- *
13385
- * @param params - Optional parameters object. Only include the fields you want to use.
13386
- * Example: getPositionLots({ accountId: "123", limit: 10, offset: 0 })
13387
- * @returns FinaticResponse with success, error, and warning fields
13388
13244
  * @methodId get_position_lots_api_beta_brokers_data_positions_lots_get
13389
13245
  * @category brokers
13390
13246
  * @example
@@ -13400,7 +13256,7 @@ let FinaticConnect$1 = class FinaticConnect extends EventEmitter {
13400
13256
  * @example
13401
13257
  * ```typescript-client
13402
13258
  * // Full example with optional parameters
13403
- * const result = await finatic.getPositionLots({ brokerId: 'alpaca', connectionId: '00000000-0000-0000-0000-000000000000', accountId: '123456789' });
13259
+ * const result = await finatic.getPositionLots({ brokerId: 'example-id', connectionId: 'example-id', accountId: 'example-id' });
13404
13260
  *
13405
13261
  * // Handle response with warnings
13406
13262
  * if (result.success) {
@@ -13435,9 +13291,9 @@ let FinaticConnect$1 = class FinaticConnect extends EventEmitter {
13435
13291
  * ```python
13436
13292
  * # Full example with optional parameters
13437
13293
  * result = await finatic.get_position_lots(
13438
- * broker_id='alpaca',
13439
- connection_id='00000000-0000-0000-0000-000000000000',
13440
- account_id='123456789'
13294
+ * broker_id='example',
13295
+ connection_id='example',
13296
+ account_id='example'
13441
13297
  * )
13442
13298
  *
13443
13299
  * # Handle response with warnings
@@ -13458,18 +13314,12 @@ let FinaticConnect$1 = class FinaticConnect extends EventEmitter {
13458
13314
  * Get position lot fills for a specific lot.
13459
13315
  *
13460
13316
  * This endpoint returns all fills associated with a specific position lot.
13461
- *
13462
- * Convenience method that delegates to brokers wrapper.
13463
- *
13464
- * @param params - Optional parameters object. Only include the fields you want to use.
13465
- * Example: getPositionLotFills({ accountId: "123", limit: 10, offset: 0 })
13466
- * @returns FinaticResponse with success, error, and warning fields
13467
13317
  * @methodId get_position_lot_fills_api_beta_brokers_data_positions_lots__lot_id__fills_get
13468
13318
  * @category brokers
13469
13319
  * @example
13470
13320
  * ```typescript-client
13471
13321
  * // Minimal example with required parameters only
13472
- * const result = await finatic.getPositionLotFills({ lotId: '00000000-0000-0000-0000-000000000000' });
13322
+ * const result = await finatic.getPositionLotFills({ lotId: 'example-id' });
13473
13323
  *
13474
13324
  * // Access the response data
13475
13325
  * if (result.success) {
@@ -13481,7 +13331,7 @@ let FinaticConnect$1 = class FinaticConnect extends EventEmitter {
13481
13331
  * @example
13482
13332
  * ```typescript-client
13483
13333
  * // Full example with optional parameters
13484
- * const result = await finatic.getPositionLotFills({ lotId: '00000000-0000-0000-0000-000000000000', connectionId: '00000000-0000-0000-0000-000000000000', limit: 100, offset: 0 });
13334
+ * const result = await finatic.getPositionLotFills({ lotId: 'example-id', connectionId: 'example-id', limit: 0, offset: 0 });
13485
13335
  *
13486
13336
  * // Handle response with warnings
13487
13337
  * if (result.success) {
@@ -13496,7 +13346,7 @@ let FinaticConnect$1 = class FinaticConnect extends EventEmitter {
13496
13346
  * @example
13497
13347
  * ```typescript-server
13498
13348
  * // Minimal example with required parameters only
13499
- * const result = await finatic.getPositionLotFills({ lotId: '00000000-0000-0000-0000-000000000000' });
13349
+ * const result = await finatic.getPositionLotFills({ lotId: 'example-id' });
13500
13350
  *
13501
13351
  * // Access the response data
13502
13352
  * if (result.success) {
@@ -13509,7 +13359,7 @@ let FinaticConnect$1 = class FinaticConnect extends EventEmitter {
13509
13359
  * ```python
13510
13360
  * # Minimal example with required parameters only
13511
13361
  * result = await finatic.get_position_lot_fills(
13512
- * lot_id='00000000-0000-0000-0000-000000000000'
13362
+ * lot_id='example'
13513
13363
  * )
13514
13364
  *
13515
13365
  * # Access the response data
@@ -13522,10 +13372,10 @@ let FinaticConnect$1 = class FinaticConnect extends EventEmitter {
13522
13372
  * ```python
13523
13373
  * # Full example with optional parameters
13524
13374
  * result = await finatic.get_position_lot_fills(
13525
- * lot_id='00000000-0000-0000-0000-000000000000',
13526
- connection_id='00000000-0000-0000-0000-000000000000',
13527
- limit=100,
13528
- offset=0
13375
+ * lot_id='example',
13376
+ connection_id='example',
13377
+ limit='example',
13378
+ offset='example'
13529
13379
  * )
13530
13380
  *
13531
13381
  * # Handle response with warnings
@@ -13543,91 +13393,38 @@ let FinaticConnect$1 = class FinaticConnect extends EventEmitter {
13543
13393
  /**
13544
13394
  * Place Order
13545
13395
  *
13546
- * Create a new order via the specified broker connection.
13396
+ * Place a new order through the specified broker.
13547
13397
  *
13548
- * This endpoint is accessible from the portal and uses session-only authentication.
13549
- * Requires trading permissions for the company.
13550
- *
13551
- * Standard parameters
13552
- * -------------------
13553
- * The following fields constitute the unified Finatic *common order schema* and
13554
- * therefore appear individually as query parameters in the autogenerated
13555
- * OpenAPI documentation:
13556
- *
13557
- * - ``broker``
13558
- * - ``account_number``
13559
- * - ``order_type``
13560
- * - ``asset_type``
13561
- * - ``action``
13562
- * - ``time_in_force``
13563
- * - ``symbol``
13564
- * - ``order_qty``
13565
- *
13566
- * They are surfaced as *query* parameters **only to make the accepted fields
13567
- * obvious in the interactive docs**. In production usage you should send these
13568
- * fields inside the JSON body (see ``order_request``) so that the entire order
13569
- * specification travels in one payload. (Nothing will break if you send both, but there is no need to do so.)
13570
- *
13571
- * Body payload & broker-specific extras
13572
- * -------------------------------------
13573
- *
13574
- * Put the standard parameters plus any broker-specific extensions under the
13575
- * ``order`` key of the body. Refer to the bundled OpenAPI examples below to
13576
- * see complete payloads for common order types (market, limit, spreads, etc.)
13577
- * across supported brokers.
13578
- *
13579
- * For a formal reference of broker-specific extensions inspect the
13580
- * ``BrokerOrderPlaceExtras`` schema.
13581
- *
13582
- * The endpoint resolves the active ``user_broker_connection`` by calling the
13583
- * ``get_user_broker_connection_ids_for_broker`` RPC in Supabase. If no active
13584
- * connection exists it returns a list of *available* brokers so your client
13585
- * can guide the user accordingly.
13586
- *
13587
- * Broker Notes
13588
- * ------------
13589
- * - The responses that you get back from the broker are not always the same.
13590
- * The response models are validated for each broker, but we do not standardize the repsonses.
13591
- *
13592
- * - Tasty Trade: If you want to trade options for a particular stock, first fetch the full
13593
- * option chain via the GET https://api.tastyworks.com/option-chains/{stock_symbol}/nested endpoint.
13594
- * This endpoint returns all available expirations that tastytrade offers for that equity symbol.
13595
- * Each expiration contains a list of strikes, where each strike has a call and put field representing
13596
- * the call symbol and put symbol respectively.
13597
- *
13598
- * We are planning to add a new endpoint to fetch the option chain for a particular stock and
13599
- * handle this logic for you, but for now you need to fetch the option chain manually.
13600
- *
13601
- * Convenience method that delegates to brokers wrapper.
13602
- *
13603
- * @param params - Optional parameters object. Only include the fields you want to use.
13604
- * Example: placeOrder({ accountId: "123", limit: 10, offset: 0 })
13605
- * @returns FinaticResponse with success, error, and warning fields
13398
+ * Creates an order using the broker connection associated with your account.
13399
+ * The order structure includes common fields (symbol, quantity, order type, etc.)
13400
+ * shared across all brokers, plus broker-specific fields that vary by broker.
13401
+ *
13402
+ * Common order fields include: broker, accountNumber, orderType, assetType,
13403
+ * action, timeInForce, symbol, and orderQty. Additional broker-specific fields
13404
+ * can be included in the order object - see the broker-specific tabs in the
13405
+ * parameters section for details.
13606
13406
  * @methodId place_order_api_beta_brokers_orders_post
13607
13407
  * @category brokers
13608
13408
  * @example
13609
13409
  * ```typescript-client
13610
- * // Example with no parameters
13611
- * const result = await finatic.placeOrder();
13410
+ * // This method requires the following required fields:
13411
+ * const result = await finatic.placeOrder({
13412
+ broker: 'robinhood',
13413
+ order: {
13414
+ orderType: 'market',
13415
+ assetType: 'equity',
13416
+ action: 'buy',
13417
+ timeInForce: 'day',
13418
+ symbol: 'AAPL',
13419
+ orderQty: 10
13420
+ }
13421
+ * });
13612
13422
  *
13613
13423
  * // Access the response data
13614
13424
  * if (result.success) {
13615
13425
  * console.log('Data:', result.success.data);
13616
- * }
13617
- * ```
13618
- * @example
13619
- * ```typescript-client
13620
- * // Full example with optional parameters
13621
- * const result = await finatic.placeOrder({ connectionId: '00000000-0000-0000-0000-000000000000' });
13622
- *
13623
- * // Handle response with warnings
13624
- * if (result.success) {
13625
- * console.log('Data:', result.success.data);
13626
- * if (result.warning && result.warning.length > 0) {
13627
- * console.warn('Warnings:', result.warning);
13628
- * }
13629
13426
  * } else if (result.error) {
13630
- * console.error('Error:', result.error.message, result.error.code);
13427
+ * console.error('Error:', result.error.message);
13631
13428
  * }
13632
13429
  * ```
13633
13430
  * @example
@@ -13653,7 +13450,7 @@ let FinaticConnect$1 = class FinaticConnect extends EventEmitter {
13653
13450
  * ```python
13654
13451
  * # Full example with optional parameters
13655
13452
  * result = await finatic.place_order(
13656
- * connection_id='00000000-0000-0000-0000-000000000000'
13453
+ * connection_id='example'
13657
13454
  * )
13658
13455
  *
13659
13456
  * # Handle response with warnings
@@ -13673,23 +13470,14 @@ let FinaticConnect$1 = class FinaticConnect extends EventEmitter {
13673
13470
  *
13674
13471
  * Cancel an existing order.
13675
13472
  *
13676
- * This endpoint is accessible from the portal and uses session-only authentication.
13677
- * Requires trading permissions for the company.
13678
- *
13679
- * The order_id is used to identify the order and automatically resolve the
13680
- * broker connection from the orders table.
13681
- *
13682
- * Convenience method that delegates to brokers wrapper.
13683
- *
13684
- * @param params - Optional parameters object. Only include the fields you want to use.
13685
- * Example: cancelOrder({ accountId: "123", limit: 10, offset: 0 })
13686
- * @returns FinaticResponse with success, error, and warning fields
13473
+ * Cancels an order by its order ID. The broker connection is automatically
13474
+ * resolved from the order record.
13687
13475
  * @methodId cancel_order_api_beta_brokers_orders__order_id__delete
13688
13476
  * @category brokers
13689
13477
  * @example
13690
13478
  * ```typescript-client
13691
13479
  * // Minimal example with required parameters only
13692
- * const result = await finatic.cancelOrder({ orderId: 'order_1234567890abcdef' });
13480
+ * const result = await finatic.cancelOrder({ orderId: 'example-id' });
13693
13481
  *
13694
13482
  * // Access the response data
13695
13483
  * if (result.success) {
@@ -13701,7 +13489,7 @@ let FinaticConnect$1 = class FinaticConnect extends EventEmitter {
13701
13489
  * @example
13702
13490
  * ```typescript-server
13703
13491
  * // Minimal example with required parameters only
13704
- * const result = await finatic.cancelOrder({ orderId: 'order_1234567890abcdef' });
13492
+ * const result = await finatic.cancelOrder({ orderId: 'example-id' });
13705
13493
  *
13706
13494
  * // Access the response data
13707
13495
  * if (result.success) {
@@ -13714,7 +13502,7 @@ let FinaticConnect$1 = class FinaticConnect extends EventEmitter {
13714
13502
  * ```python
13715
13503
  * # Minimal example with required parameters only
13716
13504
  * result = await finatic.cancel_order(
13717
- * order_id='order_1234567890abcdef'
13505
+ * order_id='example'
13718
13506
  * )
13719
13507
  *
13720
13508
  * # Access the response data
@@ -13732,20 +13520,15 @@ let FinaticConnect$1 = class FinaticConnect extends EventEmitter {
13732
13520
  *
13733
13521
  * Modify an existing order.
13734
13522
  *
13735
- * This endpoint is accessible from the portal and uses session-only authentication.
13736
- * Requires trading permissions for the company.
13737
- *
13738
- * Convenience method that delegates to brokers wrapper.
13739
- *
13740
- * @param params - Optional parameters object. Only include the fields you want to use.
13741
- * Example: modifyOrder({ accountId: "123", limit: 10, offset: 0 })
13742
- * @returns FinaticResponse with success, error, and warning fields
13523
+ * Updates an order's parameters (price, quantity, etc.) by order ID.
13524
+ * The order structure follows the same pattern as placing orders, with common
13525
+ * fields shared across brokers and broker-specific fields available per broker.
13743
13526
  * @methodId modify_order_api_beta_brokers_orders__order_id__patch
13744
13527
  * @category brokers
13745
13528
  * @example
13746
13529
  * ```typescript-client
13747
13530
  * // Minimal example with required parameters only
13748
- * const result = await finatic.modifyOrder({ orderId: 'order_1234567890abcdef' });
13531
+ * const result = await finatic.modifyOrder({ orderId: 'example-id' });
13749
13532
  *
13750
13533
  * // Access the response data
13751
13534
  * if (result.success) {
@@ -13755,24 +13538,9 @@ let FinaticConnect$1 = class FinaticConnect extends EventEmitter {
13755
13538
  * }
13756
13539
  * ```
13757
13540
  * @example
13758
- * ```typescript-client
13759
- * // Full example with optional parameters
13760
- * const result = await finatic.modifyOrder({ orderId: 'order_1234567890abcdef', accountNumber: '123456789', connectionId: '00000000-0000-0000-0000-000000000000' });
13761
- *
13762
- * // Handle response with warnings
13763
- * if (result.success) {
13764
- * console.log('Data:', result.success.data);
13765
- * if (result.warning && result.warning.length > 0) {
13766
- * console.warn('Warnings:', result.warning);
13767
- * }
13768
- * } else if (result.error) {
13769
- * console.error('Error:', result.error.message, result.error.code);
13770
- * }
13771
- * ```
13772
- * @example
13773
13541
  * ```typescript-server
13774
13542
  * // Minimal example with required parameters only
13775
- * const result = await finatic.modifyOrder({ orderId: 'order_1234567890abcdef' });
13543
+ * const result = await finatic.modifyOrder({ orderId: 'example-id' });
13776
13544
  *
13777
13545
  * // Access the response data
13778
13546
  * if (result.success) {
@@ -13785,7 +13553,7 @@ let FinaticConnect$1 = class FinaticConnect extends EventEmitter {
13785
13553
  * ```python
13786
13554
  * # Minimal example with required parameters only
13787
13555
  * result = await finatic.modify_order(
13788
- * order_id='order_1234567890abcdef'
13556
+ * order_id='example'
13789
13557
  * )
13790
13558
  *
13791
13559
  * # Access the response data
@@ -13798,9 +13566,9 @@ let FinaticConnect$1 = class FinaticConnect extends EventEmitter {
13798
13566
  * ```python
13799
13567
  * # Full example with optional parameters
13800
13568
  * result = await finatic.modify_order(
13801
- * order_id='order_1234567890abcdef',
13802
- account_number='123456789',
13803
- connection_id='00000000-0000-0000-0000-000000000000'
13569
+ * order_id='example',
13570
+ account_number='example',
13571
+ connection_id='example'
13804
13572
  * )
13805
13573
  *
13806
13574
  * # Handle response with warnings
@@ -13830,7 +13598,7 @@ let FinaticConnect$1 = class FinaticConnect extends EventEmitter {
13830
13598
  * @example
13831
13599
  * ```typescript-server
13832
13600
  * // Get all items with optional filters
13833
- * const result = await finatic.getAllBalances({ brokerId: 'alpaca', connectionId: '00000000-0000-0000-0000-000000000000', accountId: '123456789' });
13601
+ * const result = await finatic.getAllBalances({ brokerId: 'example-id', connectionId: 'example-id', accountId: 'example-id' });
13834
13602
  *
13835
13603
  * // Access the response data
13836
13604
  * if (result.success) {
@@ -13845,7 +13613,7 @@ let FinaticConnect$1 = class FinaticConnect extends EventEmitter {
13845
13613
  * @example
13846
13614
  * ```typescript-client
13847
13615
  * // Get all items with optional filters
13848
- * const result = await finatic.getAllBalances({ brokerId: 'alpaca', connectionId: '00000000-0000-0000-0000-000000000000', accountId: '123456789' });
13616
+ * const result = await finatic.getAllBalances({ brokerId: 'example-id', connectionId: 'example-id', accountId: 'example-id' });
13849
13617
  *
13850
13618
  * // Access the response data
13851
13619
  * if (result.success) {
@@ -13861,9 +13629,9 @@ let FinaticConnect$1 = class FinaticConnect extends EventEmitter {
13861
13629
  * ```python
13862
13630
  * # Get all items with optional filters
13863
13631
  * result = await finatic.get_all_balances(
13864
- * broker_id='alpaca',
13865
- connection_id='00000000-0000-0000-0000-000000000000',
13866
- account_id='123456789'
13632
+ * broker_id='example',
13633
+ connection_id='example',
13634
+ account_id='example'
13867
13635
  * )
13868
13636
  *
13869
13637
  * # Access the response data
@@ -13941,7 +13709,7 @@ let FinaticConnect$1 = class FinaticConnect extends EventEmitter {
13941
13709
  * @example
13942
13710
  * ```typescript-server
13943
13711
  * // Get all items with optional filters
13944
- * const result = await finatic.getAllAccounts({ brokerId: 'alpaca', connectionId: '00000000-0000-0000-0000-000000000000', accountType: 'margin' });
13712
+ * const result = await finatic.getAllAccounts({ brokerId: 'example-id', connectionId: 'example-id', accountType: 'margin' });
13945
13713
  *
13946
13714
  * // Access the response data
13947
13715
  * if (result.success) {
@@ -13956,7 +13724,7 @@ let FinaticConnect$1 = class FinaticConnect extends EventEmitter {
13956
13724
  * @example
13957
13725
  * ```typescript-client
13958
13726
  * // Get all items with optional filters
13959
- * const result = await finatic.getAllAccounts({ brokerId: 'alpaca', connectionId: '00000000-0000-0000-0000-000000000000', accountType: 'margin' });
13727
+ * const result = await finatic.getAllAccounts({ brokerId: 'example-id', connectionId: 'example-id', accountType: 'margin' });
13960
13728
  *
13961
13729
  * // Access the response data
13962
13730
  * if (result.success) {
@@ -13972,8 +13740,8 @@ let FinaticConnect$1 = class FinaticConnect extends EventEmitter {
13972
13740
  * ```python
13973
13741
  * # Get all items with optional filters
13974
13742
  * result = await finatic.get_all_accounts(
13975
- * broker_id='alpaca',
13976
- connection_id='00000000-0000-0000-0000-000000000000',
13743
+ * broker_id='example',
13744
+ connection_id='example',
13977
13745
  account_type='margin'
13978
13746
  * )
13979
13747
  *
@@ -14052,7 +13820,7 @@ let FinaticConnect$1 = class FinaticConnect extends EventEmitter {
14052
13820
  * @example
14053
13821
  * ```typescript-server
14054
13822
  * // Get all items with optional filters
14055
- * const result = await finatic.getAllOrders({ brokerId: 'alpaca', connectionId: '00000000-0000-0000-0000-000000000000', accountId: '123456789' });
13823
+ * const result = await finatic.getAllOrders({ brokerId: 'example-id', connectionId: 'example-id', accountId: 'example-id' });
14056
13824
  *
14057
13825
  * // Access the response data
14058
13826
  * if (result.success) {
@@ -14067,7 +13835,7 @@ let FinaticConnect$1 = class FinaticConnect extends EventEmitter {
14067
13835
  * @example
14068
13836
  * ```typescript-client
14069
13837
  * // Get all items with optional filters
14070
- * const result = await finatic.getAllOrders({ brokerId: 'alpaca', connectionId: '00000000-0000-0000-0000-000000000000', accountId: '123456789' });
13838
+ * const result = await finatic.getAllOrders({ brokerId: 'example-id', connectionId: 'example-id', accountId: 'example-id' });
14071
13839
  *
14072
13840
  * // Access the response data
14073
13841
  * if (result.success) {
@@ -14083,9 +13851,9 @@ let FinaticConnect$1 = class FinaticConnect extends EventEmitter {
14083
13851
  * ```python
14084
13852
  * # Get all items with optional filters
14085
13853
  * result = await finatic.get_all_orders(
14086
- * broker_id='alpaca',
14087
- connection_id='00000000-0000-0000-0000-000000000000',
14088
- account_id='123456789'
13854
+ * broker_id='example',
13855
+ connection_id='example',
13856
+ account_id='example'
14089
13857
  * )
14090
13858
  *
14091
13859
  * # Access the response data
@@ -14163,7 +13931,7 @@ let FinaticConnect$1 = class FinaticConnect extends EventEmitter {
14163
13931
  * @example
14164
13932
  * ```typescript-server
14165
13933
  * // Get all items with optional filters
14166
- * const result = await finatic.getAllPositions({ brokerId: 'alpaca', connectionId: '00000000-0000-0000-0000-000000000000', accountId: '123456789' });
13934
+ * const result = await finatic.getAllPositions({ brokerId: 'example-id', connectionId: 'example-id', accountId: 'example-id' });
14167
13935
  *
14168
13936
  * // Access the response data
14169
13937
  * if (result.success) {
@@ -14178,7 +13946,7 @@ let FinaticConnect$1 = class FinaticConnect extends EventEmitter {
14178
13946
  * @example
14179
13947
  * ```typescript-client
14180
13948
  * // Get all items with optional filters
14181
- * const result = await finatic.getAllPositions({ brokerId: 'alpaca', connectionId: '00000000-0000-0000-0000-000000000000', accountId: '123456789' });
13949
+ * const result = await finatic.getAllPositions({ brokerId: 'example-id', connectionId: 'example-id', accountId: 'example-id' });
14182
13950
  *
14183
13951
  * // Access the response data
14184
13952
  * if (result.success) {
@@ -14194,9 +13962,9 @@ let FinaticConnect$1 = class FinaticConnect extends EventEmitter {
14194
13962
  * ```python
14195
13963
  * # Get all items with optional filters
14196
13964
  * result = await finatic.get_all_positions(
14197
- * broker_id='alpaca',
14198
- connection_id='00000000-0000-0000-0000-000000000000',
14199
- account_id='123456789'
13965
+ * broker_id='example',
13966
+ connection_id='example',
13967
+ account_id='example'
14200
13968
  * )
14201
13969
  *
14202
13970
  * # Access the response data
@@ -14274,7 +14042,7 @@ let FinaticConnect$1 = class FinaticConnect extends EventEmitter {
14274
14042
  * @example
14275
14043
  * ```typescript-server
14276
14044
  * // Get all items with optional filters
14277
- * const result = await finatic.getAllTransactions({ brokerId: 'alpaca', connectionId: '00000000-0000-0000-0000-000000000000', accountId: '123456789' });
14045
+ * const result = await finatic.getAllTransactions({ brokerId: 'example-id', connectionId: 'example-id', accountId: 'example-id' });
14278
14046
  *
14279
14047
  * // Access the response data
14280
14048
  * if (result.success) {
@@ -14289,7 +14057,7 @@ let FinaticConnect$1 = class FinaticConnect extends EventEmitter {
14289
14057
  * @example
14290
14058
  * ```typescript-client
14291
14059
  * // Get all items with optional filters
14292
- * const result = await finatic.getAllTransactions({ brokerId: 'alpaca', connectionId: '00000000-0000-0000-0000-000000000000', accountId: '123456789' });
14060
+ * const result = await finatic.getAllTransactions({ brokerId: 'example-id', connectionId: 'example-id', accountId: 'example-id' });
14293
14061
  *
14294
14062
  * // Access the response data
14295
14063
  * if (result.success) {
@@ -14305,9 +14073,9 @@ let FinaticConnect$1 = class FinaticConnect extends EventEmitter {
14305
14073
  * ```python
14306
14074
  * # Get all items with optional filters
14307
14075
  * result = await finatic.get_all_transactions(
14308
- * broker_id='alpaca',
14309
- connection_id='00000000-0000-0000-0000-000000000000',
14310
- account_id='123456789'
14076
+ * broker_id='example',
14077
+ connection_id='example',
14078
+ account_id='example'
14311
14079
  * )
14312
14080
  *
14313
14081
  * # Access the response data
@@ -14385,7 +14153,7 @@ let FinaticConnect$1 = class FinaticConnect extends EventEmitter {
14385
14153
  * @example
14386
14154
  * ```typescript-server
14387
14155
  * // Get all items with optional filters
14388
- * const result = await finatic.getAllOrderFills({ connectionId: '00000000-0000-0000-0000-000000000000', includeMetadata: false });
14156
+ * const result = await finatic.getAllOrderFills({ connectionId: 'example-id', includeMetadata: true });
14389
14157
  *
14390
14158
  * // Access the response data
14391
14159
  * if (result.success) {
@@ -14400,7 +14168,7 @@ let FinaticConnect$1 = class FinaticConnect extends EventEmitter {
14400
14168
  * @example
14401
14169
  * ```typescript-client
14402
14170
  * // Get all items with optional filters
14403
- * const result = await finatic.getAllOrderFills({ connectionId: '00000000-0000-0000-0000-000000000000', includeMetadata: false });
14171
+ * const result = await finatic.getAllOrderFills({ connectionId: 'example-id', includeMetadata: true });
14404
14172
  *
14405
14173
  * // Access the response data
14406
14174
  * if (result.success) {
@@ -14416,8 +14184,8 @@ let FinaticConnect$1 = class FinaticConnect extends EventEmitter {
14416
14184
  * ```python
14417
14185
  * # Get all items with optional filters
14418
14186
  * result = await finatic.get_all_order_fills(
14419
- * connection_id='00000000-0000-0000-0000-000000000000',
14420
- include_metadata=false
14187
+ * connection_id='example',
14188
+ include_metadata='example'
14421
14189
  * )
14422
14190
  *
14423
14191
  * # Access the response data
@@ -14495,7 +14263,7 @@ let FinaticConnect$1 = class FinaticConnect extends EventEmitter {
14495
14263
  * @example
14496
14264
  * ```typescript-server
14497
14265
  * // Get all items with optional filters
14498
- * const result = await finatic.getAllOrderEvents({ connectionId: '00000000-0000-0000-0000-000000000000', includeMetadata: false });
14266
+ * const result = await finatic.getAllOrderEvents({ connectionId: 'example-id', includeMetadata: true });
14499
14267
  *
14500
14268
  * // Access the response data
14501
14269
  * if (result.success) {
@@ -14510,7 +14278,7 @@ let FinaticConnect$1 = class FinaticConnect extends EventEmitter {
14510
14278
  * @example
14511
14279
  * ```typescript-client
14512
14280
  * // Get all items with optional filters
14513
- * const result = await finatic.getAllOrderEvents({ connectionId: '00000000-0000-0000-0000-000000000000', includeMetadata: false });
14281
+ * const result = await finatic.getAllOrderEvents({ connectionId: 'example-id', includeMetadata: true });
14514
14282
  *
14515
14283
  * // Access the response data
14516
14284
  * if (result.success) {
@@ -14526,8 +14294,8 @@ let FinaticConnect$1 = class FinaticConnect extends EventEmitter {
14526
14294
  * ```python
14527
14295
  * # Get all items with optional filters
14528
14296
  * result = await finatic.get_all_order_events(
14529
- * connection_id='00000000-0000-0000-0000-000000000000',
14530
- include_metadata=false
14297
+ * connection_id='example',
14298
+ include_metadata='example'
14531
14299
  * )
14532
14300
  *
14533
14301
  * # Access the response data
@@ -14605,7 +14373,7 @@ let FinaticConnect$1 = class FinaticConnect extends EventEmitter {
14605
14373
  * @example
14606
14374
  * ```typescript-server
14607
14375
  * // Get all items with optional filters
14608
- * const result = await finatic.getAllOrderGroups({ brokerId: 'alpaca', connectionId: '00000000-0000-0000-0000-000000000000', createdAfter: '2024-01-01T00:00:00Z' });
14376
+ * const result = await finatic.getAllOrderGroups({ brokerId: 'example-id', connectionId: 'example-id', createdAfter: 'example' });
14609
14377
  *
14610
14378
  * // Access the response data
14611
14379
  * if (result.success) {
@@ -14620,7 +14388,7 @@ let FinaticConnect$1 = class FinaticConnect extends EventEmitter {
14620
14388
  * @example
14621
14389
  * ```typescript-client
14622
14390
  * // Get all items with optional filters
14623
- * const result = await finatic.getAllOrderGroups({ brokerId: 'alpaca', connectionId: '00000000-0000-0000-0000-000000000000', createdAfter: '2024-01-01T00:00:00Z' });
14391
+ * const result = await finatic.getAllOrderGroups({ brokerId: 'example-id', connectionId: 'example-id', createdAfter: 'example' });
14624
14392
  *
14625
14393
  * // Access the response data
14626
14394
  * if (result.success) {
@@ -14636,9 +14404,9 @@ let FinaticConnect$1 = class FinaticConnect extends EventEmitter {
14636
14404
  * ```python
14637
14405
  * # Get all items with optional filters
14638
14406
  * result = await finatic.get_all_order_groups(
14639
- * broker_id='alpaca',
14640
- connection_id='00000000-0000-0000-0000-000000000000',
14641
- created_after='2024-01-01T00:00:00Z'
14407
+ * broker_id='example',
14408
+ connection_id='example',
14409
+ created_after='example'
14642
14410
  * )
14643
14411
  *
14644
14412
  * # Access the response data
@@ -14716,7 +14484,7 @@ let FinaticConnect$1 = class FinaticConnect extends EventEmitter {
14716
14484
  * @example
14717
14485
  * ```typescript-server
14718
14486
  * // Get all items with optional filters
14719
- * const result = await finatic.getAllPositionLots({ brokerId: 'alpaca', connectionId: '00000000-0000-0000-0000-000000000000', accountId: '123456789' });
14487
+ * const result = await finatic.getAllPositionLots({ brokerId: 'example-id', connectionId: 'example-id', accountId: 'example-id' });
14720
14488
  *
14721
14489
  * // Access the response data
14722
14490
  * if (result.success) {
@@ -14731,7 +14499,7 @@ let FinaticConnect$1 = class FinaticConnect extends EventEmitter {
14731
14499
  * @example
14732
14500
  * ```typescript-client
14733
14501
  * // Get all items with optional filters
14734
- * const result = await finatic.getAllPositionLots({ brokerId: 'alpaca', connectionId: '00000000-0000-0000-0000-000000000000', accountId: '123456789' });
14502
+ * const result = await finatic.getAllPositionLots({ brokerId: 'example-id', connectionId: 'example-id', accountId: 'example-id' });
14735
14503
  *
14736
14504
  * // Access the response data
14737
14505
  * if (result.success) {
@@ -14747,9 +14515,9 @@ let FinaticConnect$1 = class FinaticConnect extends EventEmitter {
14747
14515
  * ```python
14748
14516
  * # Get all items with optional filters
14749
14517
  * result = await finatic.get_all_position_lots(
14750
- * broker_id='alpaca',
14751
- connection_id='00000000-0000-0000-0000-000000000000',
14752
- account_id='123456789'
14518
+ * broker_id='example',
14519
+ connection_id='example',
14520
+ account_id='example'
14753
14521
  * )
14754
14522
  *
14755
14523
  * # Access the response data
@@ -14827,7 +14595,7 @@ let FinaticConnect$1 = class FinaticConnect extends EventEmitter {
14827
14595
  * @example
14828
14596
  * ```typescript-server
14829
14597
  * // Get all items with optional filters
14830
- * const result = await finatic.getAllPositionLotFills({ connectionId: '00000000-0000-0000-0000-000000000000' });
14598
+ * const result = await finatic.getAllPositionLotFills({ connectionId: 'example-id' });
14831
14599
  *
14832
14600
  * // Access the response data
14833
14601
  * if (result.success) {
@@ -14842,7 +14610,7 @@ let FinaticConnect$1 = class FinaticConnect extends EventEmitter {
14842
14610
  * @example
14843
14611
  * ```typescript-client
14844
14612
  * // Get all items with optional filters
14845
- * const result = await finatic.getAllPositionLotFills({ connectionId: '00000000-0000-0000-0000-000000000000' });
14613
+ * const result = await finatic.getAllPositionLotFills({ connectionId: 'example-id' });
14846
14614
  *
14847
14615
  * // Access the response data
14848
14616
  * if (result.success) {
@@ -14858,7 +14626,7 @@ let FinaticConnect$1 = class FinaticConnect extends EventEmitter {
14858
14626
  * ```python
14859
14627
  * # Get all items with optional filters
14860
14628
  * result = await finatic.get_all_position_lot_fills(
14861
- * connection_id='00000000-0000-0000-0000-000000000000'
14629
+ * connection_id='example'
14862
14630
  * )
14863
14631
  *
14864
14632
  * # Access the response data