snaptrade-typescript-sdk 10.0.13 → 10.0.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -2450,71 +2450,6 @@ interface EtfInstrument {
2450
2450
  }
2451
2451
  type EtfInstrumentKindEnum = 'etf';
2452
2452
  //#endregion
2453
- //#region models/future-instrument.d.ts
2454
- /**
2455
- * Future instrument metadata for a V2 position.
2456
- * @export
2457
- * @interface FutureInstrument
2458
- */
2459
- interface FutureInstrument {
2460
- [key: string]: any;
2461
- /**
2462
- * Type of security instrument.
2463
- * @type {string}
2464
- * @memberof FutureInstrument
2465
- */
2466
- 'kind': FutureInstrumentKindEnum;
2467
- /**
2468
- * Unique identifier for the future instrument.
2469
- * @type {string}
2470
- * @memberof FutureInstrument
2471
- */
2472
- 'id': string;
2473
- /**
2474
- * Display symbol for the future contract.
2475
- * @type {string}
2476
- * @memberof FutureInstrument
2477
- */
2478
- 'symbol': string;
2479
- /**
2480
- * Root symbol for the future contract.
2481
- * @type {string}
2482
- * @memberof FutureInstrument
2483
- */
2484
- 'root_symbol': string;
2485
- /**
2486
- * Exchange expiration code for the contract.
2487
- * @type {string}
2488
- * @memberof FutureInstrument
2489
- */
2490
- 'expiration_code': string;
2491
- /**
2492
- * Expiration date of the contract.
2493
- * @type {string}
2494
- * @memberof FutureInstrument
2495
- */
2496
- 'expiration_date'?: string | null;
2497
- /**
2498
- * Multiplier for the future contract.
2499
- * @type {string}
2500
- * @memberof FutureInstrument
2501
- */
2502
- 'multiplier'?: string | null;
2503
- /**
2504
- * ISO-4217 currency code for the contract.
2505
- * @type {string}
2506
- * @memberof FutureInstrument
2507
- */
2508
- 'currency'?: string | null;
2509
- /**
2510
- * Exchange MIC code or exchange code for the contract.
2511
- * @type {string}
2512
- * @memberof FutureInstrument
2513
- */
2514
- 'exchange'?: string | null;
2515
- }
2516
- type FutureInstrumentKindEnum = 'future';
2517
- //#endregion
2518
2453
  //#region models/mutual-fund-instrument.d.ts
2519
2454
  /**
2520
2455
  * Security instrument metadata for mutual fund positions.
@@ -2692,6 +2627,152 @@ interface StockInstrument {
2692
2627
  }
2693
2628
  type StockInstrumentKindEnum = 'stock';
2694
2629
  //#endregion
2630
+ //#region models/underlying-cfd-instrument.d.ts
2631
+ /**
2632
+ * @type UnderlyingCfdInstrument
2633
+ * The underlying instrument referenced by a CFD contract.
2634
+ * @export
2635
+ */
2636
+ type UnderlyingCfdInstrument = {
2637
+ kind: 'adr';
2638
+ } & AdrInstrument | {
2639
+ kind: 'cef';
2640
+ } & CefInstrument | {
2641
+ kind: 'crypto';
2642
+ } & CryptoInstrument | {
2643
+ kind: 'etf';
2644
+ } & EtfInstrument | {
2645
+ kind: 'mutualfund';
2646
+ } & MutualFundInstrument | {
2647
+ kind: 'other';
2648
+ } & OtherInstrument | {
2649
+ kind: 'stock';
2650
+ } & StockInstrument;
2651
+ //#endregion
2652
+ //#region models/cfd-instrument.d.ts
2653
+ /**
2654
+ * Canonical CFD wrapper instrument metadata for a V2 position.
2655
+ * @export
2656
+ * @interface CfdInstrument
2657
+ */
2658
+ interface CfdInstrument {
2659
+ [key: string]: any;
2660
+ /**
2661
+ * Type of security instrument.
2662
+ * @type {string}
2663
+ * @memberof CfdInstrument
2664
+ */
2665
+ 'kind': CfdInstrumentKindEnum;
2666
+ /**
2667
+ * Unique identifier for the canonical CFD instrument wrapper.
2668
+ * @type {string}
2669
+ * @memberof CfdInstrument
2670
+ */
2671
+ 'id': string;
2672
+ /**
2673
+ * Formatted symbol of the instrument underlying the CFD wrapper.
2674
+ * @type {string}
2675
+ * @memberof CfdInstrument
2676
+ */
2677
+ 'symbol': string;
2678
+ /**
2679
+ * Raw symbol of the instrument underlying the CFD wrapper.
2680
+ * @type {string}
2681
+ * @memberof CfdInstrument
2682
+ */
2683
+ 'raw_symbol': string;
2684
+ /**
2685
+ * Human-readable description of the instrument underlying the CFD wrapper.
2686
+ * @type {string}
2687
+ * @memberof CfdInstrument
2688
+ */
2689
+ 'description'?: string | null;
2690
+ /**
2691
+ * ISO-4217 currency code for the instrument underlying the CFD wrapper.
2692
+ * @type {string}
2693
+ * @memberof CfdInstrument
2694
+ */
2695
+ 'currency'?: string | null;
2696
+ /**
2697
+ * Exchange MIC code or exchange code for the instrument underlying the CFD wrapper.
2698
+ * @type {string}
2699
+ * @memberof CfdInstrument
2700
+ */
2701
+ 'exchange'?: string | null;
2702
+ /**
2703
+ *
2704
+ * @type {UnderlyingCfdInstrument}
2705
+ * @memberof CfdInstrument
2706
+ */
2707
+ 'underlying_instrument': UnderlyingCfdInstrument;
2708
+ }
2709
+ type CfdInstrumentKindEnum = 'cfd';
2710
+ //#endregion
2711
+ //#region models/future-instrument.d.ts
2712
+ /**
2713
+ * Future instrument metadata for a V2 position.
2714
+ * @export
2715
+ * @interface FutureInstrument
2716
+ */
2717
+ interface FutureInstrument {
2718
+ [key: string]: any;
2719
+ /**
2720
+ * Type of security instrument.
2721
+ * @type {string}
2722
+ * @memberof FutureInstrument
2723
+ */
2724
+ 'kind': FutureInstrumentKindEnum;
2725
+ /**
2726
+ * Unique identifier for the future instrument.
2727
+ * @type {string}
2728
+ * @memberof FutureInstrument
2729
+ */
2730
+ 'id': string;
2731
+ /**
2732
+ * Display symbol for the future contract.
2733
+ * @type {string}
2734
+ * @memberof FutureInstrument
2735
+ */
2736
+ 'symbol': string;
2737
+ /**
2738
+ * Root symbol for the future contract.
2739
+ * @type {string}
2740
+ * @memberof FutureInstrument
2741
+ */
2742
+ 'root_symbol': string;
2743
+ /**
2744
+ * Exchange expiration code for the contract.
2745
+ * @type {string}
2746
+ * @memberof FutureInstrument
2747
+ */
2748
+ 'expiration_code': string;
2749
+ /**
2750
+ * Expiration date of the contract.
2751
+ * @type {string}
2752
+ * @memberof FutureInstrument
2753
+ */
2754
+ 'expiration_date'?: string | null;
2755
+ /**
2756
+ * Multiplier for the future contract.
2757
+ * @type {string}
2758
+ * @memberof FutureInstrument
2759
+ */
2760
+ 'multiplier'?: string | null;
2761
+ /**
2762
+ * ISO-4217 currency code for the contract.
2763
+ * @type {string}
2764
+ * @memberof FutureInstrument
2765
+ */
2766
+ 'currency'?: string | null;
2767
+ /**
2768
+ * Exchange MIC code or exchange code for the contract.
2769
+ * @type {string}
2770
+ * @memberof FutureInstrument
2771
+ */
2772
+ 'exchange'?: string | null;
2773
+ }
2774
+ type FutureInstrumentKindEnum = 'future';
2775
+ //#endregion
2695
2776
  //#region models/underlying-option-instrument.d.ts
2696
2777
  /**
2697
2778
  * @type UnderlyingOptionInstrument
@@ -2785,6 +2866,8 @@ type Instrument = {
2785
2866
  } & AdrInstrument | {
2786
2867
  kind: 'cef';
2787
2868
  } & CefInstrument | {
2869
+ kind: 'cfd';
2870
+ } & CfdInstrument | {
2788
2871
  kind: 'crypto';
2789
2872
  } & CryptoInstrument | {
2790
2873
  kind: 'etf';
@@ -2821,13 +2904,13 @@ interface AccountPosition {
2821
2904
  */
2822
2905
  'units'?: string | null;
2823
2906
  /**
2824
- * Last known market price for the position.
2907
+ * Last known market price _per share_. The freshness of this price depends on the brokerage. Some brokerages provide real-time prices, while others provide delayed prices. It is recommended that you rely on your own third-party market data provider for most up to date prices.
2825
2908
  * @type {string}
2826
2909
  * @memberof AccountPosition
2827
2910
  */
2828
2911
  'price'?: string | null;
2829
2912
  /**
2830
- * Book price or average purchase price for the position.
2913
+ * Book price or average purchase price for the position. For options, this is per-contract.
2831
2914
  * @type {string}
2832
2915
  * @memberof AccountPosition
2833
2916
  */
@@ -5111,6 +5194,50 @@ interface Model500UnexpectedExceptionResponse {
5111
5194
  'code'?: any;
5112
5195
  }
5113
5196
  //#endregion
5197
+ //#region models/model501-not-implemented-response.d.ts
5198
+ /**
5199
+ * Example for a response where the endpoint is not implemented for the brokerage
5200
+ * @export
5201
+ * @interface Model501NotImplementedResponse
5202
+ */
5203
+ interface Model501NotImplementedResponse {
5204
+ [key: string]: any;
5205
+ /**
5206
+ *
5207
+ * @type {any}
5208
+ * @memberof Model501NotImplementedResponse
5209
+ */
5210
+ 'error'?: any;
5211
+ }
5212
+ //#endregion
5213
+ //#region models/model503-brokerage-request-response.d.ts
5214
+ /**
5215
+ * Example for a response that failed because of an upstream brokerage API failure
5216
+ * @export
5217
+ * @interface Model503BrokerageRequestResponse
5218
+ */
5219
+ interface Model503BrokerageRequestResponse {
5220
+ [key: string]: any;
5221
+ /**
5222
+ *
5223
+ * @type {any}
5224
+ * @memberof Model503BrokerageRequestResponse
5225
+ */
5226
+ 'detail'?: any;
5227
+ /**
5228
+ *
5229
+ * @type {any}
5230
+ * @memberof Model503BrokerageRequestResponse
5231
+ */
5232
+ 'status_code'?: any;
5233
+ /**
5234
+ *
5235
+ * @type {any}
5236
+ * @memberof Model503BrokerageRequestResponse
5237
+ */
5238
+ 'code'?: any;
5239
+ }
5240
+ //#endregion
5114
5241
  //#region models/monthly-dividends.d.ts
5115
5242
  /**
5116
5243
  *
@@ -6871,7 +6998,7 @@ declare const AccountInformationApiAxiosParamCreator: (configuration?: Configura
6871
6998
  */
6872
6999
  getAccountBalanceHistory: (userId: string, userSecret: string, accountId: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
6873
7000
  /**
6874
- * Returns a list of all positions in the specified account. The `results` list can contain multiple instrument types in the same response, including stocks, ADRs, ETFs, mutual funds, closed-end funds, crypto, futures, and option positions. Use the `instrument.kind` discriminator to determine the schema for each position\'s `instrument`. `mutualfund` positions may also include `cash_equivalent`. `stock` positions may include `tax_lots` when tax lot data is enabled for the account. If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
7001
+ * Returns a list of all positions in the specified account. The `results` list can contain multiple instrument types in the same response, including stocks, ADRs, ETFs, mutual funds, closed-end funds, crypto, futures, option positions, and CFD positions. Use the `instrument.kind` discriminator to determine the schema for each position\'s `instrument`. `mutualfund` positions may also include `cash_equivalent`. `stock` positions may include `tax_lots` when tax lot data is enabled for the account. If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
6875
7002
  * @summary List all account positions
6876
7003
  * @param {string} userId
6877
7004
  * @param {string} userSecret
@@ -7020,7 +7147,7 @@ declare const AccountInformationApiFp: (configuration?: Configuration) => {
7020
7147
  */
7021
7148
  getAccountBalanceHistory(requestParameters: AccountInformationApiGetAccountBalanceHistoryRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AccountValueHistoryResponse>>;
7022
7149
  /**
7023
- * Returns a list of all positions in the specified account. The `results` list can contain multiple instrument types in the same response, including stocks, ADRs, ETFs, mutual funds, closed-end funds, crypto, futures, and option positions. Use the `instrument.kind` discriminator to determine the schema for each position\'s `instrument`. `mutualfund` positions may also include `cash_equivalent`. `stock` positions may include `tax_lots` when tax lot data is enabled for the account. If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
7150
+ * Returns a list of all positions in the specified account. The `results` list can contain multiple instrument types in the same response, including stocks, ADRs, ETFs, mutual funds, closed-end funds, crypto, futures, option positions, and CFD positions. Use the `instrument.kind` discriminator to determine the schema for each position\'s `instrument`. `mutualfund` positions may also include `cash_equivalent`. `stock` positions may include `tax_lots` when tax lot data is enabled for the account. If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
7024
7151
  * @summary List all account positions
7025
7152
  * @param {AccountInformationApiGetAllAccountPositionsRequest} requestParameters Request parameters.
7026
7153
  * @param {*} [options] Override http request option.
@@ -7141,7 +7268,7 @@ declare const AccountInformationApiFactory: (configuration?: Configuration, base
7141
7268
  */
7142
7269
  getAccountBalanceHistory(requestParameters: AccountInformationApiGetAccountBalanceHistoryRequest, options?: AxiosRequestConfig): AxiosPromise<AccountValueHistoryResponse>;
7143
7270
  /**
7144
- * Returns a list of all positions in the specified account. The `results` list can contain multiple instrument types in the same response, including stocks, ADRs, ETFs, mutual funds, closed-end funds, crypto, futures, and option positions. Use the `instrument.kind` discriminator to determine the schema for each position\'s `instrument`. `mutualfund` positions may also include `cash_equivalent`. `stock` positions may include `tax_lots` when tax lot data is enabled for the account. If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
7271
+ * Returns a list of all positions in the specified account. The `results` list can contain multiple instrument types in the same response, including stocks, ADRs, ETFs, mutual funds, closed-end funds, crypto, futures, option positions, and CFD positions. Use the `instrument.kind` discriminator to determine the schema for each position\'s `instrument`. `mutualfund` positions may also include `cash_equivalent`. `stock` positions may include `tax_lots` when tax lot data is enabled for the account. If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
7145
7272
  * @summary List all account positions
7146
7273
  * @param {AccountInformationApiGetAllAccountPositionsRequest} requestParameters Request parameters.
7147
7274
  * @param {*} [options] Override http request option.
@@ -7664,7 +7791,7 @@ declare class AccountInformationApiGenerated extends BaseAPI {
7664
7791
  */
7665
7792
  getAccountBalanceHistory(requestParameters: AccountInformationApiGetAccountBalanceHistoryRequest, options?: AxiosRequestConfig): Promise<_$axios.AxiosResponse<AccountValueHistoryResponse, any, {}>>;
7666
7793
  /**
7667
- * Returns a list of all positions in the specified account. The `results` list can contain multiple instrument types in the same response, including stocks, ADRs, ETFs, mutual funds, closed-end funds, crypto, futures, and option positions. Use the `instrument.kind` discriminator to determine the schema for each position\'s `instrument`. `mutualfund` positions may also include `cash_equivalent`. `stock` positions may include `tax_lots` when tax lot data is enabled for the account. If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
7794
+ * Returns a list of all positions in the specified account. The `results` list can contain multiple instrument types in the same response, including stocks, ADRs, ETFs, mutual funds, closed-end funds, crypto, futures, option positions, and CFD positions. Use the `instrument.kind` discriminator to determine the schema for each position\'s `instrument`. `mutualfund` positions may also include `cash_equivalent`. `stock` positions may include `tax_lots` when tax lot data is enabled for the account. If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
7668
7795
  * @summary List all account positions
7669
7796
  * @param {AccountInformationApiGetAllAccountPositionsRequest} requestParameters Request parameters.
7670
7797
  * @param {*} [options] Override http request option.
@@ -10971,4 +11098,4 @@ declare class SnaptradeError extends Error {
10971
11098
  declare function readableStreamToString(stream: ReadableStream): Promise<string>;
10972
11099
  declare function parseIfJson(input: unknown): object | unknown;
10973
11100
  //#endregion
10974
- export { Account, AccountBalance, AccountBalanceTotal, AccountHoldings, AccountHoldingsAccount, AccountInformationApi, AccountInformationApiAxiosParamCreator, AccountInformationApiFactory, AccountInformationApiFp, AccountInformationApiGenerated, AccountInformationApiGetAccountActivitiesRequest, AccountInformationApiGetAccountBalanceHistoryRequest, AccountInformationApiGetAllAccountPositionsRequest, AccountInformationApiGetAllUserHoldingsRequest, AccountInformationApiGetUserAccountBalanceRequest, AccountInformationApiGetUserAccountDetailsRequest, AccountInformationApiGetUserAccountOrderDetailRequest, AccountInformationApiGetUserAccountOrdersRequest, AccountInformationApiGetUserAccountPositionsRequest, AccountInformationApiGetUserAccountRecentOrdersRequest, AccountInformationApiGetUserAccountReturnRatesRequest, AccountInformationApiGetUserHoldingsRequest, AccountInformationApiListUserAccountsRequest, AccountInformationApiUpdateUserAccountRequest, AccountInformationGetUserAccountOrderDetailRequest, AccountOrderRecord, AccountOrderRecordChildBrokerageOrderIds, AccountOrderRecordLeg, AccountOrderRecordLegInstrument, AccountOrderRecordOptionSymbol, AccountOrderRecordQuoteCurrency, AccountOrderRecordQuoteUniversalSymbol, AccountOrderRecordStatus, AccountOrderRecordStatusV2, AccountOrderRecordTrailingStop, AccountOrderRecordUniversalSymbol, AccountOrderRecordV2, AccountOrdersV2Response, AccountPosition, AccountSimple, AccountSyncStatus, AccountUniversalActivity, AccountUniversalActivityCurrency, AccountUniversalActivityCurrencyUniversalSymbol, AccountUniversalActivityOptionSymbol, AccountUniversalActivitySymbol, AccountValueHistoryItem, AccountValueHistoryResponse, ActionStrict, ActionStrictWithOptions, AdrInstrument, AllAccountPositionsResponse, AllAccountPositionsResponseDataFreshness, ApiStatusApi, ApiStatusApiAxiosParamCreator, ApiStatusApiFactory, ApiStatusApiFp, ApiStatusApiGenerated, AuthenticationApi, AuthenticationApiAxiosParamCreator, AuthenticationApiDeleteSnapTradeUserRequest, AuthenticationApiFactory, AuthenticationApiFp, AuthenticationApiGenerated, AuthenticationApiLoginSnapTradeUserRequest, AuthenticationApiRegisterSnapTradeUserRequest, AuthenticationApiResetSnapTradeUserSecretRequest, AuthenticationLoginSnapTradeUser200Response, Balance, BalanceCurrency, Brokerage, BrokerageAuthorization, BrokerageAuthorizationDisabledConfirmation, BrokerageAuthorizationRefreshConfirmation, BrokerageAuthorizationTransactionsSyncConfirmation, BrokerageAuthorizationTypeReadOnly, BrokerageAuthorizationTypeReadOnlyBrokerage, BrokerageInstrument, BrokerageInstrumentsResponse, BrokerageType, CancelOrderResponse, CefInstrument, ChildBrokerageOrderIDs, ComplexOrderLeg, ComplexOrderResponse, Configuration, ConfigurationParameters, ConnectionsApi, ConnectionsApiAxiosParamCreator, ConnectionsApiDeleteConnectionRequest, ConnectionsApiDetailBrokerageAuthorizationRequest, ConnectionsApiDisableBrokerageAuthorizationRequest, ConnectionsApiFactory, ConnectionsApiFp, ConnectionsApiGenerated, ConnectionsApiListBrokerageAuthorizationAccountsRequest, ConnectionsApiListBrokerageAuthorizationsRequest, ConnectionsApiRefreshBrokerageAuthorizationRequest, ConnectionsApiRemoveBrokerageAuthorizationRequest, ConnectionsApiReturnRatesRequest, ConnectionsApiSessionEventsRequest, ConnectionsApiSyncBrokerageAuthorizationTransactionsRequest, ConnectionsSessionEvents200ResponseInner, CryptoInstrument, CryptoOrderForm, CryptoOrderPreview, CryptoOrderPreviewEstimatedFee, CryptoTradingInstrument, CryptocurrencyPair, CryptocurrencyPairQuote, Currency, DeleteConnectionConfirmation, DeleteUserResponse, DividendAtDate, EncryptedResponse, EncryptedResponseEncryptedMessageData, EtfInstrument, Exchange, ExchangeRatePairs, ExperimentalEndpointsApi, ExperimentalEndpointsApiAddSubscriptionRequest, ExperimentalEndpointsApiAxiosParamCreator, ExperimentalEndpointsApiCancelSubscriptionRequest, ExperimentalEndpointsApiFactory, ExperimentalEndpointsApiFp, ExperimentalEndpointsApiGenerated, ExperimentalEndpointsApiGetUserAccountOrderDetailV2Request, ExperimentalEndpointsApiGetUserAccountOrdersV2Request, ExperimentalEndpointsApiGetUserAccountRecentOrdersV2Request, FigiInstrument, FutureInstrument, HoldingsStatus, Instrument, LoginRedirectURI, ManualTrade, ManualTradeAndImpact, ManualTradeBalance, ManualTradeForm, ManualTradeFormBracket, ManualTradeFormComplex, ManualTradeFormNotionalValue, ManualTradeFormWithOptions, ManualTradeImpact, ManualTradePlaceTimeInForceStrict, ManualTradeReplaceForm, ManualTradeSymbol, MlegActionStrict, MlegInstrumentType, MlegLeg, MlegOrderResponse, MlegOrderTypeStrict, MlegPriceEffectStrict, MlegTradeForm, MlegTradingInstrument, Model400FailedRequestResponse, Model401FailedRequestResponse, Model402BrokerageAuthAlreadyDisabledException, Model402BrokerageAuthDisabledResponse, Model403FailedRequestResponse, Model403FeatureNotEnabledResponse, Model404FailedRequestResponse, Model425FailedRequestResponse, Model429TooManyRequestsResponse, Model500UnexpectedExceptionResponse, MonthlyDividends, MutualFundInstrument, NetContributions, NetDividend, NotionalValue, OptionBrokerageSymbol, OptionChainInner, OptionChainInnerChainPerRootInner, OptionChainInnerChainPerRootInnerChainPerStrikePriceInner, OptionImpact, OptionInstrument, OptionLeg, OptionQuote, OptionQuoteGreeks, OptionStrategy, OptionStrategyLegsInner, OptionsApi, OptionsApiAxiosParamCreator, OptionsApiFactory, OptionsApiFp, OptionsApiGenerated, OptionsApiListOptionHoldingsRequest, OptionsPosition, OptionsPositionCurrency, OptionsSymbol, OrderTypeStrict, OrderUpdatedResponse, OrderUpdatedResponseOrder, OtherInstrument, PaginatedUniversalActivity, PaginationDetails, PartnerData, PastValue, PerformanceCustom, Position, PositionCurrency, PositionSymbol, RateOfReturnObject, RateOfReturnResponse, RecentOrdersResponse, ReferenceDataApi, ReferenceDataApiAxiosParamCreator, ReferenceDataApiFactory, ReferenceDataApiFp, ReferenceDataApiGenerated, ReferenceDataApiGetCurrencyExchangeRatePairRequest, ReferenceDataApiGetSymbolsByTickerRequest, ReferenceDataApiGetSymbolsRequest, ReferenceDataApiListAllBrokerageAuthorizationTypeRequest, ReferenceDataApiListAllBrokerageInstrumentsRequest, ReferenceDataApiSymbolSearchUserAccountRequest, SecurityType, SessionEvent, SimpleOrderForm, SnapTradeHoldingsAccount, SnapTradeHoldingsTotalValue, SnapTradeLoginUserRequestBody, SnapTradeRegisterUserRequestBody, Snaptrade, SnaptradeError, Status, StockInstrument, StockInstrumentFigiInstrument, StopLoss, StrategyOrderRecord, StrategyQuotes, StrategyQuotesGreek, SubPeriodReturnRate, Symbol$1 as Symbol, SymbolCurrency, SymbolExchange, SymbolQuery, SymbolsQuotesInner, TakeProfit, TaxLot, TimeInForceStrict, TradeDetectionAddSubscriptionRequest, TradeDetectionCancelSubscriptionRequest, TradeDetectionCancelSubscriptionResponse, TradeDetectionSubscription, TradingApi, TradingApiAxiosParamCreator, TradingApiCancelOrderRequest, TradingApiCancelUserAccountOrderRequest, TradingApiFactory, TradingApiFp, TradingApiGenerated, TradingApiGetCryptocurrencyPairQuoteRequest, TradingApiGetOptionImpactRequest, TradingApiGetOrderImpactRequest, TradingApiGetUserAccountOptionQuotesRequest, TradingApiGetUserAccountQuotesRequest, TradingApiPlaceBracketOrderRequest, TradingApiPlaceComplexOrderRequest, TradingApiPlaceCryptoOrderRequest, TradingApiPlaceForceOrderRequest, TradingApiPlaceMlegOrderRequest, TradingApiPlaceOrderRequest, TradingApiPreviewCryptoOrderRequest, TradingApiReplaceOrderRequest, TradingApiSearchCryptocurrencyPairInstrumentsRequest, TradingInstrument, TradingSearchCryptocurrencyPairInstruments200Response, TradingSession, TrailingStop, TransactionsAndReportingApi, TransactionsAndReportingApiAxiosParamCreator, TransactionsAndReportingApiFactory, TransactionsAndReportingApiFp, TransactionsAndReportingApiGenerated, TransactionsAndReportingApiGetActivitiesRequest, TransactionsAndReportingApiGetReportingCustomRangeRequest, TransactionsStatus, USExchange, UnderlyingOptionInstrument, UnderlyingSymbol, UnderlyingSymbolExchange, UnderlyingSymbolType, UniversalActivity, UniversalSymbol, UserIDandSecret, ValidatedTradeBody, parseIfJson, readableStreamToString };
11101
+ export { Account, AccountBalance, AccountBalanceTotal, AccountHoldings, AccountHoldingsAccount, AccountInformationApi, AccountInformationApiAxiosParamCreator, AccountInformationApiFactory, AccountInformationApiFp, AccountInformationApiGenerated, AccountInformationApiGetAccountActivitiesRequest, AccountInformationApiGetAccountBalanceHistoryRequest, AccountInformationApiGetAllAccountPositionsRequest, AccountInformationApiGetAllUserHoldingsRequest, AccountInformationApiGetUserAccountBalanceRequest, AccountInformationApiGetUserAccountDetailsRequest, AccountInformationApiGetUserAccountOrderDetailRequest, AccountInformationApiGetUserAccountOrdersRequest, AccountInformationApiGetUserAccountPositionsRequest, AccountInformationApiGetUserAccountRecentOrdersRequest, AccountInformationApiGetUserAccountReturnRatesRequest, AccountInformationApiGetUserHoldingsRequest, AccountInformationApiListUserAccountsRequest, AccountInformationApiUpdateUserAccountRequest, AccountInformationGetUserAccountOrderDetailRequest, AccountOrderRecord, AccountOrderRecordChildBrokerageOrderIds, AccountOrderRecordLeg, AccountOrderRecordLegInstrument, AccountOrderRecordOptionSymbol, AccountOrderRecordQuoteCurrency, AccountOrderRecordQuoteUniversalSymbol, AccountOrderRecordStatus, AccountOrderRecordStatusV2, AccountOrderRecordTrailingStop, AccountOrderRecordUniversalSymbol, AccountOrderRecordV2, AccountOrdersV2Response, AccountPosition, AccountSimple, AccountSyncStatus, AccountUniversalActivity, AccountUniversalActivityCurrency, AccountUniversalActivityCurrencyUniversalSymbol, AccountUniversalActivityOptionSymbol, AccountUniversalActivitySymbol, AccountValueHistoryItem, AccountValueHistoryResponse, ActionStrict, ActionStrictWithOptions, AdrInstrument, AllAccountPositionsResponse, AllAccountPositionsResponseDataFreshness, ApiStatusApi, ApiStatusApiAxiosParamCreator, ApiStatusApiFactory, ApiStatusApiFp, ApiStatusApiGenerated, AuthenticationApi, AuthenticationApiAxiosParamCreator, AuthenticationApiDeleteSnapTradeUserRequest, AuthenticationApiFactory, AuthenticationApiFp, AuthenticationApiGenerated, AuthenticationApiLoginSnapTradeUserRequest, AuthenticationApiRegisterSnapTradeUserRequest, AuthenticationApiResetSnapTradeUserSecretRequest, AuthenticationLoginSnapTradeUser200Response, Balance, BalanceCurrency, Brokerage, BrokerageAuthorization, BrokerageAuthorizationDisabledConfirmation, BrokerageAuthorizationRefreshConfirmation, BrokerageAuthorizationTransactionsSyncConfirmation, BrokerageAuthorizationTypeReadOnly, BrokerageAuthorizationTypeReadOnlyBrokerage, BrokerageInstrument, BrokerageInstrumentsResponse, BrokerageType, CancelOrderResponse, CefInstrument, CfdInstrument, ChildBrokerageOrderIDs, ComplexOrderLeg, ComplexOrderResponse, Configuration, ConfigurationParameters, ConnectionsApi, ConnectionsApiAxiosParamCreator, ConnectionsApiDeleteConnectionRequest, ConnectionsApiDetailBrokerageAuthorizationRequest, ConnectionsApiDisableBrokerageAuthorizationRequest, ConnectionsApiFactory, ConnectionsApiFp, ConnectionsApiGenerated, ConnectionsApiListBrokerageAuthorizationAccountsRequest, ConnectionsApiListBrokerageAuthorizationsRequest, ConnectionsApiRefreshBrokerageAuthorizationRequest, ConnectionsApiRemoveBrokerageAuthorizationRequest, ConnectionsApiReturnRatesRequest, ConnectionsApiSessionEventsRequest, ConnectionsApiSyncBrokerageAuthorizationTransactionsRequest, ConnectionsSessionEvents200ResponseInner, CryptoInstrument, CryptoOrderForm, CryptoOrderPreview, CryptoOrderPreviewEstimatedFee, CryptoTradingInstrument, CryptocurrencyPair, CryptocurrencyPairQuote, Currency, DeleteConnectionConfirmation, DeleteUserResponse, DividendAtDate, EncryptedResponse, EncryptedResponseEncryptedMessageData, EtfInstrument, Exchange, ExchangeRatePairs, ExperimentalEndpointsApi, ExperimentalEndpointsApiAddSubscriptionRequest, ExperimentalEndpointsApiAxiosParamCreator, ExperimentalEndpointsApiCancelSubscriptionRequest, ExperimentalEndpointsApiFactory, ExperimentalEndpointsApiFp, ExperimentalEndpointsApiGenerated, ExperimentalEndpointsApiGetUserAccountOrderDetailV2Request, ExperimentalEndpointsApiGetUserAccountOrdersV2Request, ExperimentalEndpointsApiGetUserAccountRecentOrdersV2Request, FigiInstrument, FutureInstrument, HoldingsStatus, Instrument, LoginRedirectURI, ManualTrade, ManualTradeAndImpact, ManualTradeBalance, ManualTradeForm, ManualTradeFormBracket, ManualTradeFormComplex, ManualTradeFormNotionalValue, ManualTradeFormWithOptions, ManualTradeImpact, ManualTradePlaceTimeInForceStrict, ManualTradeReplaceForm, ManualTradeSymbol, MlegActionStrict, MlegInstrumentType, MlegLeg, MlegOrderResponse, MlegOrderTypeStrict, MlegPriceEffectStrict, MlegTradeForm, MlegTradingInstrument, Model400FailedRequestResponse, Model401FailedRequestResponse, Model402BrokerageAuthAlreadyDisabledException, Model402BrokerageAuthDisabledResponse, Model403FailedRequestResponse, Model403FeatureNotEnabledResponse, Model404FailedRequestResponse, Model425FailedRequestResponse, Model429TooManyRequestsResponse, Model500UnexpectedExceptionResponse, Model501NotImplementedResponse, Model503BrokerageRequestResponse, MonthlyDividends, MutualFundInstrument, NetContributions, NetDividend, NotionalValue, OptionBrokerageSymbol, OptionChainInner, OptionChainInnerChainPerRootInner, OptionChainInnerChainPerRootInnerChainPerStrikePriceInner, OptionImpact, OptionInstrument, OptionLeg, OptionQuote, OptionQuoteGreeks, OptionStrategy, OptionStrategyLegsInner, OptionsApi, OptionsApiAxiosParamCreator, OptionsApiFactory, OptionsApiFp, OptionsApiGenerated, OptionsApiListOptionHoldingsRequest, OptionsPosition, OptionsPositionCurrency, OptionsSymbol, OrderTypeStrict, OrderUpdatedResponse, OrderUpdatedResponseOrder, OtherInstrument, PaginatedUniversalActivity, PaginationDetails, PartnerData, PastValue, PerformanceCustom, Position, PositionCurrency, PositionSymbol, RateOfReturnObject, RateOfReturnResponse, RecentOrdersResponse, ReferenceDataApi, ReferenceDataApiAxiosParamCreator, ReferenceDataApiFactory, ReferenceDataApiFp, ReferenceDataApiGenerated, ReferenceDataApiGetCurrencyExchangeRatePairRequest, ReferenceDataApiGetSymbolsByTickerRequest, ReferenceDataApiGetSymbolsRequest, ReferenceDataApiListAllBrokerageAuthorizationTypeRequest, ReferenceDataApiListAllBrokerageInstrumentsRequest, ReferenceDataApiSymbolSearchUserAccountRequest, SecurityType, SessionEvent, SimpleOrderForm, SnapTradeHoldingsAccount, SnapTradeHoldingsTotalValue, SnapTradeLoginUserRequestBody, SnapTradeRegisterUserRequestBody, Snaptrade, SnaptradeError, Status, StockInstrument, StockInstrumentFigiInstrument, StopLoss, StrategyOrderRecord, StrategyQuotes, StrategyQuotesGreek, SubPeriodReturnRate, Symbol$1 as Symbol, SymbolCurrency, SymbolExchange, SymbolQuery, SymbolsQuotesInner, TakeProfit, TaxLot, TimeInForceStrict, TradeDetectionAddSubscriptionRequest, TradeDetectionCancelSubscriptionRequest, TradeDetectionCancelSubscriptionResponse, TradeDetectionSubscription, TradingApi, TradingApiAxiosParamCreator, TradingApiCancelOrderRequest, TradingApiCancelUserAccountOrderRequest, TradingApiFactory, TradingApiFp, TradingApiGenerated, TradingApiGetCryptocurrencyPairQuoteRequest, TradingApiGetOptionImpactRequest, TradingApiGetOrderImpactRequest, TradingApiGetUserAccountOptionQuotesRequest, TradingApiGetUserAccountQuotesRequest, TradingApiPlaceBracketOrderRequest, TradingApiPlaceComplexOrderRequest, TradingApiPlaceCryptoOrderRequest, TradingApiPlaceForceOrderRequest, TradingApiPlaceMlegOrderRequest, TradingApiPlaceOrderRequest, TradingApiPreviewCryptoOrderRequest, TradingApiReplaceOrderRequest, TradingApiSearchCryptocurrencyPairInstrumentsRequest, TradingInstrument, TradingSearchCryptocurrencyPairInstruments200Response, TradingSession, TrailingStop, TransactionsAndReportingApi, TransactionsAndReportingApiAxiosParamCreator, TransactionsAndReportingApiFactory, TransactionsAndReportingApiFp, TransactionsAndReportingApiGenerated, TransactionsAndReportingApiGetActivitiesRequest, TransactionsAndReportingApiGetReportingCustomRangeRequest, TransactionsStatus, USExchange, UnderlyingCfdInstrument, UnderlyingOptionInstrument, UnderlyingSymbol, UnderlyingSymbolExchange, UnderlyingSymbolType, UniversalActivity, UniversalSymbol, UserIDandSecret, ValidatedTradeBody, parseIfJson, readableStreamToString };
package/dist/index.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import { n as __require } from "./chunk-e9Ob2GDo.mjs";
2
2
  import globalAxios, { AxiosError } from "axios";
3
3
  //#region base.ts
4
- const BASE_PATH = "https://api.snaptrade.com/api/v1".replace(/\/+$/, "");
4
+ const BASE_PATH = "https://api.snaptrade.com".replace(/\/+$/, "");
5
5
  /**
6
6
  *
7
7
  * @export
@@ -71,11 +71,11 @@ async function requestAfterHook(request) {
71
71
  if (configuration?.consumerKey === void 0) throw Error("Consumer key is required");
72
72
  const consumerKey = encodeURI(configuration.consumerKey);
73
73
  const requestData = axiosArgs.options.data === void 0 || axiosArgs.options.data === "{}" ? null : JSON.parse(axiosArgs.options.data);
74
- const path = axiosArgs.url.indexOf("?") === -1 ? `${axiosArgs.url}` : `${axiosArgs.url.split("?")[0]}`;
74
+ const requestPath = axiosArgs.url.indexOf("?") === -1 ? `${axiosArgs.url}` : `${axiosArgs.url.split("?")[0]}`;
75
75
  const signature = await computeHmacSha256(JSONstringifyOrder({
76
76
  content: requestData,
77
- path: `/api/v1${path}`,
78
- query: url.replace(basePath, "").replace(path, "").replace("?", "")
77
+ path: requestPath,
78
+ query: url.replace(basePath, "").replace(requestPath, "").replace("?", "")
79
79
  }), consumerKey);
80
80
  if (axiosArgs.options.headers) axiosArgs.options.headers["Signature"] = signature;
81
81
  }
@@ -407,7 +407,7 @@ const AccountInformationApiAxiosParamCreator = function(configuration) {
407
407
  };
408
408
  },
409
409
  /**
410
- * Returns a list of all positions in the specified account. The `results` list can contain multiple instrument types in the same response, including stocks, ADRs, ETFs, mutual funds, closed-end funds, crypto, futures, and option positions. Use the `instrument.kind` discriminator to determine the schema for each position\'s `instrument`. `mutualfund` positions may also include `cash_equivalent`. `stock` positions may include `tax_lots` when tax lot data is enabled for the account. If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
410
+ * Returns a list of all positions in the specified account. The `results` list can contain multiple instrument types in the same response, including stocks, ADRs, ETFs, mutual funds, closed-end funds, crypto, futures, option positions, and CFD positions. Use the `instrument.kind` discriminator to determine the schema for each position\'s `instrument`. `mutualfund` positions may also include `cash_equivalent`. `stock` positions may include `tax_lots` when tax lot data is enabled for the account. If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
411
411
  * @summary List all account positions
412
412
  * @param {string} userId
413
413
  * @param {string} userSecret
@@ -1218,7 +1218,7 @@ const AccountInformationApiFp = function(configuration) {
1218
1218
  return createRequestFunction(await localVarAxiosParamCreator.getAccountBalanceHistory(requestParameters.userId, requestParameters.userSecret, requestParameters.accountId, options), globalAxios, BASE_PATH, configuration);
1219
1219
  },
1220
1220
  /**
1221
- * Returns a list of all positions in the specified account. The `results` list can contain multiple instrument types in the same response, including stocks, ADRs, ETFs, mutual funds, closed-end funds, crypto, futures, and option positions. Use the `instrument.kind` discriminator to determine the schema for each position\'s `instrument`. `mutualfund` positions may also include `cash_equivalent`. `stock` positions may include `tax_lots` when tax lot data is enabled for the account. If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
1221
+ * Returns a list of all positions in the specified account. The `results` list can contain multiple instrument types in the same response, including stocks, ADRs, ETFs, mutual funds, closed-end funds, crypto, futures, option positions, and CFD positions. Use the `instrument.kind` discriminator to determine the schema for each position\'s `instrument`. `mutualfund` positions may also include `cash_equivalent`. `stock` positions may include `tax_lots` when tax lot data is enabled for the account. If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
1222
1222
  * @summary List all account positions
1223
1223
  * @param {AccountInformationApiGetAllAccountPositionsRequest} requestParameters Request parameters.
1224
1224
  * @param {*} [options] Override http request option.
@@ -1371,7 +1371,7 @@ const AccountInformationApiFactory = function(configuration, basePath, axios) {
1371
1371
  return localVarFp.getAccountBalanceHistory(requestParameters, options).then((request) => request(axios, basePath));
1372
1372
  },
1373
1373
  /**
1374
- * Returns a list of all positions in the specified account. The `results` list can contain multiple instrument types in the same response, including stocks, ADRs, ETFs, mutual funds, closed-end funds, crypto, futures, and option positions. Use the `instrument.kind` discriminator to determine the schema for each position\'s `instrument`. `mutualfund` positions may also include `cash_equivalent`. `stock` positions may include `tax_lots` when tax lot data is enabled for the account. If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
1374
+ * Returns a list of all positions in the specified account. The `results` list can contain multiple instrument types in the same response, including stocks, ADRs, ETFs, mutual funds, closed-end funds, crypto, futures, option positions, and CFD positions. Use the `instrument.kind` discriminator to determine the schema for each position\'s `instrument`. `mutualfund` positions may also include `cash_equivalent`. `stock` positions may include `tax_lots` when tax lot data is enabled for the account. If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
1375
1375
  * @summary List all account positions
1376
1376
  * @param {AccountInformationApiGetAllAccountPositionsRequest} requestParameters Request parameters.
1377
1377
  * @param {*} [options] Override http request option.
@@ -1525,7 +1525,7 @@ var AccountInformationApiGenerated = class extends BaseAPI {
1525
1525
  return AccountInformationApiFp(this.configuration).getAccountBalanceHistory(requestParameters, options).then((request) => request(this.axios, this.basePath));
1526
1526
  }
1527
1527
  /**
1528
- * Returns a list of all positions in the specified account. The `results` list can contain multiple instrument types in the same response, including stocks, ADRs, ETFs, mutual funds, closed-end funds, crypto, futures, and option positions. Use the `instrument.kind` discriminator to determine the schema for each position\'s `instrument`. `mutualfund` positions may also include `cash_equivalent`. `stock` positions may include `tax_lots` when tax lot data is enabled for the account. If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
1528
+ * Returns a list of all positions in the specified account. The `results` list can contain multiple instrument types in the same response, including stocks, ADRs, ETFs, mutual funds, closed-end funds, crypto, futures, option positions, and CFD positions. Use the `instrument.kind` discriminator to determine the schema for each position\'s `instrument`. `mutualfund` positions may also include `cash_equivalent`. `stock` positions may include `tax_lots` when tax lot data is enabled for the account. If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
1529
1529
  * @summary List all account positions
1530
1530
  * @param {AccountInformationApiGetAllAccountPositionsRequest} requestParameters Request parameters.
1531
1531
  * @param {*} [options] Override http request option.
@@ -7100,7 +7100,7 @@ var Configuration = class {
7100
7100
  this.accessToken = param.accessToken;
7101
7101
  this.basePath = param.basePath;
7102
7102
  this.baseOptions = param.baseOptions ?? {};
7103
- this.userAgent = param.userAgent === void 0 ? "Konfig/10.0.13/typescript" : param.userAgent;
7103
+ this.userAgent = param.userAgent === void 0 ? "Konfig/10.0.15/typescript" : param.userAgent;
7104
7104
  this.formDataCtor = param.formDataCtor;
7105
7105
  }
7106
7106
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "snaptrade-typescript-sdk",
3
- "version": "10.0.13",
3
+ "version": "10.0.15",
4
4
  "description": "Client for SnapTrade",
5
5
  "author": "Konfig",
6
6
  "engines": {
@@ -22,14 +22,9 @@
22
22
  "sideEffects": false,
23
23
  "main": "./dist/index.cjs",
24
24
  "module": "./dist/index.mjs",
25
- "browser": "./dist/browser.js",
26
25
  "types": "./dist/index.d.ts",
27
26
  "exports": {
28
27
  ".": {
29
- "browser": {
30
- "types": "./dist/index.d.mts",
31
- "default": "./dist/browser.js"
32
- },
33
28
  "require": {
34
29
  "types": "./dist/index.d.cts",
35
30
  "default": "./dist/index.cjs"