snaptrade-typescript-sdk 8.7.0 → 8.8.0

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.
Files changed (167) hide show
  1. package/README.md +1 -2
  2. package/dist/api/portfolio-management-api.d.ts +0 -47
  3. package/dist/api/portfolio-management-api.js +0 -103
  4. package/dist/configuration.js +1 -1
  5. package/package.json +4 -1
  6. package/.konfig/generate-id.txt +0 -1
  7. package/.konfigignore +0 -3
  8. package/api/account-information-api-custom.ts +0 -3
  9. package/api/account-information-api.ts +0 -1062
  10. package/api/api-disclaimer-api-custom.ts +0 -3
  11. package/api/api-disclaimer-api.ts +0 -183
  12. package/api/api-status-api-custom.ts +0 -3
  13. package/api/api-status-api.ts +0 -128
  14. package/api/authentication-api-custom.ts +0 -3
  15. package/api/authentication-api.ts +0 -568
  16. package/api/connections-api-custom.ts +0 -3
  17. package/api/connections-api.ts +0 -544
  18. package/api/error-logs-api-custom.ts +0 -3
  19. package/api/error-logs-api.ts +0 -174
  20. package/api/options-api-custom.ts +0 -3
  21. package/api/options-api.ts +0 -739
  22. package/api/portfolio-management-api-custom.ts +0 -3
  23. package/api/portfolio-management-api.ts +0 -3301
  24. package/api/reference-data-api-custom.ts +0 -3
  25. package/api/reference-data-api.ts +0 -1031
  26. package/api/trading-api-custom.ts +0 -3
  27. package/api/trading-api.ts +0 -1304
  28. package/api/transactions-and-reporting-api-custom.ts +0 -3
  29. package/api/transactions-and-reporting-api.ts +0 -408
  30. package/api.ts +0 -27
  31. package/base.ts +0 -70
  32. package/client-custom.ts +0 -5
  33. package/client.ts +0 -59
  34. package/common.ts +0 -163
  35. package/configuration.ts +0 -131
  36. package/docs/AccountInformationApi.md +0 -469
  37. package/docs/ApiDisclaimerApi.md +0 -64
  38. package/docs/ApiStatusApi.md +0 -58
  39. package/docs/AuthenticationApi.md +0 -293
  40. package/docs/ConnectionsApi.md +0 -238
  41. package/docs/ErrorLogsApi.md +0 -62
  42. package/docs/OptionsApi.md +0 -312
  43. package/docs/PortfolioManagementApi.md +0 -1785
  44. package/docs/ReferenceDataApi.md +0 -568
  45. package/docs/TradingApi.md +0 -596
  46. package/docs/TransactionsAndReportingApi.md +0 -144
  47. package/index.test.ts +0 -177
  48. package/index.ts +0 -18
  49. package/jest.config.ts +0 -11
  50. package/models/account-holdings-account.ts +0 -61
  51. package/models/account-holdings.ts +0 -61
  52. package/models/account-order-record-status.ts +0 -48
  53. package/models/account-order-record.ts +0 -151
  54. package/models/account-simple.ts +0 -52
  55. package/models/account-sync-status.ts +0 -32
  56. package/models/account.ts +0 -91
  57. package/models/action.ts +0 -30
  58. package/models/apidisclaimer-accept-request.ts +0 -29
  59. package/models/authentication-login-snap-trade-user200-response.ts +0 -31
  60. package/models/balance.ts +0 -40
  61. package/models/brokerage-authorization-type-read-only-brokerage.ts +0 -43
  62. package/models/brokerage-authorization-type-read-only.ts +0 -68
  63. package/models/brokerage-authorization-type.ts +0 -39
  64. package/models/brokerage-authorization.ts +0 -82
  65. package/models/brokerage-symbol.ts +0 -61
  66. package/models/brokerage-type.ts +0 -37
  67. package/models/brokerage.ts +0 -136
  68. package/models/calculated-trade.ts +0 -40
  69. package/models/cash-restriction.ts +0 -63
  70. package/models/connections-session-events200-response-inner.ts +0 -25
  71. package/models/currency.ts +0 -43
  72. package/models/delete-user-response.ts +0 -37
  73. package/models/dividend-at-date.ts +0 -43
  74. package/models/encrypted-response-encrypted-message-data.ts +0 -43
  75. package/models/encrypted-response.ts +0 -38
  76. package/models/exchange-rate-pairs.ts +0 -46
  77. package/models/exchange.ts +0 -73
  78. package/models/excluded-asset.ts +0 -34
  79. package/models/index.ts +0 -109
  80. package/models/jwt.ts +0 -31
  81. package/models/login-redirect-uri.ts +0 -35
  82. package/models/manual-trade-and-impact.ts +0 -49
  83. package/models/manual-trade-balance.ts +0 -49
  84. package/models/manual-trade-form.ts +0 -80
  85. package/models/manual-trade-symbol.ts +0 -64
  86. package/models/manual-trade.ts +0 -88
  87. package/models/model-asset-class-details.ts +0 -41
  88. package/models/model-asset-class-target.ts +0 -34
  89. package/models/model-asset-class.ts +0 -37
  90. package/models/model-portfolio-asset-class.ts +0 -40
  91. package/models/model-portfolio-details.ts +0 -50
  92. package/models/model-portfolio-security.ts +0 -40
  93. package/models/model-portfolio.ts +0 -52
  94. package/models/model400-failed-request-response.ts +0 -37
  95. package/models/model401-failed-request-response.ts +0 -37
  96. package/models/model403-failed-request-response.ts +0 -37
  97. package/models/model404-failed-request-response.ts +0 -37
  98. package/models/monthly-dividends.ts +0 -40
  99. package/models/net-contributions.ts +0 -43
  100. package/models/net-dividend.ts +0 -46
  101. package/models/option-chain-inner-chain-per-root-inner-chain-per-strike-price-inner.ts +0 -43
  102. package/models/option-chain-inner-chain-per-root-inner.ts +0 -46
  103. package/models/option-chain-inner.ts +0 -58
  104. package/models/option-leg.ts +0 -53
  105. package/models/option-strategy-legs-inner.ts +0 -47
  106. package/models/option-strategy.ts +0 -61
  107. package/models/options-get-option-strategy-request.ts +0 -51
  108. package/models/options-holdings.ts +0 -67
  109. package/models/options-place-option-strategy-request.ts +0 -57
  110. package/models/options-position.ts +0 -73
  111. package/models/options-symbol.ts +0 -94
  112. package/models/order-type.ts +0 -32
  113. package/models/partner-data.ts +0 -100
  114. package/models/past-value.ts +0 -43
  115. package/models/performance-custom.ts +0 -154
  116. package/models/portfolio-group-info.ts +0 -115
  117. package/models/portfolio-group-position.ts +0 -46
  118. package/models/portfolio-group-settings.ts +0 -58
  119. package/models/portfolio-group.ts +0 -37
  120. package/models/position-symbol.ts +0 -64
  121. package/models/position.ts +0 -64
  122. package/models/redirect-tokenand-pin.ts +0 -37
  123. package/models/security-type.ts +0 -49
  124. package/models/session-event.ts +0 -80
  125. package/models/snap-trade-apidisclaimer-accept-status.ts +0 -37
  126. package/models/snap-trade-holdings-account-account-id.ts +0 -82
  127. package/models/snap-trade-holdings-account.ts +0 -79
  128. package/models/snap-trade-holdings-total-value.ts +0 -37
  129. package/models/snap-trade-login-user-request-body.ts +0 -61
  130. package/models/snap-trade-register-user-request-body.ts +0 -35
  131. package/models/status.ts +0 -43
  132. package/models/strategy-impact-legs-inner.ts +0 -67
  133. package/models/strategy-impact.ts +0 -94
  134. package/models/strategy-order-place-orders-inner-legs-inner.ts +0 -67
  135. package/models/strategy-order-place-orders-inner.ts +0 -286
  136. package/models/strategy-order-place.ts +0 -40
  137. package/models/strategy-order-record.ts +0 -133
  138. package/models/strategy-quotes-greek.ts +0 -55
  139. package/models/strategy-quotes.ts +0 -67
  140. package/models/sub-period-return-rate.ts +0 -43
  141. package/models/symbol-query.ts +0 -29
  142. package/models/symbol.ts +0 -76
  143. package/models/symbols-quotes.ts +0 -64
  144. package/models/target-asset.ts +0 -62
  145. package/models/time-in-force.ts +0 -31
  146. package/models/trade-execution-status.ts +0 -105
  147. package/models/trade-impact.ts +0 -61
  148. package/models/trade.ts +0 -88
  149. package/models/trading-cancel-user-account-order-request.ts +0 -29
  150. package/models/trading-place-ocoorder-request.ts +0 -35
  151. package/models/transactions-status.ts +0 -35
  152. package/models/underlying-symbol.ts +0 -76
  153. package/models/universal-activity.ts +0 -127
  154. package/models/universal-symbol-ticker.ts +0 -82
  155. package/models/universal-symbol.ts +0 -80
  156. package/models/user-error-log.ts +0 -61
  157. package/models/user-idand-secret.ts +0 -37
  158. package/models/user-settings.ts +0 -88
  159. package/models/usexchange.ts +0 -79
  160. package/pagination/page-types.ts +0 -34
  161. package/pagination/page.ts +0 -58
  162. package/pagination/pageable.ts +0 -113
  163. package/pagination/paginate.ts +0 -41
  164. package/requestAfterHook.ts +0 -53
  165. package/requestBeforeHook.ts +0 -15
  166. package/tsconfig.json +0 -22
  167. package/tsconfig.test.json +0 -6
@@ -1,3 +0,0 @@
1
- import { BaseAPI } from "../base";
2
-
3
- export class TransactionsAndReportingApiCustom extends BaseAPI {}
@@ -1,408 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * SnapTrade
5
- * Connect brokerage accounts to your app for live positions and trading
6
- *
7
- * The version of the OpenAPI document: 1.0.0
8
- * Contact: api@snaptrade.com
9
- *
10
- * NOTE: This file is auto generated by Konfig (https://konfigthis.com).
11
- * https://konfigthis.com
12
- * Do not edit the class manually.
13
- */
14
-
15
- import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
16
- import { Configuration } from '../configuration';
17
- // Some imports not used depending on template conditions
18
- // @ts-ignore
19
- import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
20
- // @ts-ignore
21
- import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
22
- // @ts-ignore
23
- import { PerformanceCustom } from '../models';
24
- // @ts-ignore
25
- import { UniversalActivity } from '../models';
26
- import { paginate } from "../pagination/paginate";
27
- import { requestBeforeHook } from '../requestBeforeHook';
28
- import { TransactionsAndReportingApiCustom } from "./transactions-and-reporting-api-custom";
29
- /**
30
- * TransactionsAndReportingApi - axios parameter creator
31
- * @export
32
- */
33
- export const TransactionsAndReportingApiAxiosParamCreator = function (configuration?: Configuration) {
34
- return {
35
- /**
36
- * Returns activities (transactions) for a user. Specifing start and end date is highly recommended for automatic calls for better performance
37
- * @summary Get transaction history for a user
38
- * @param {string} userId
39
- * @param {string} userSecret
40
- * @param {string | Date} [startDate]
41
- * @param {string | Date} [endDate]
42
- * @param {string} [accounts] Optional comma seperated list of account IDs used to filter the request on specific accounts
43
- * @param {string} [brokerageAuthorizations] Optional comma seperated list of brokerage authorization IDs used to filter the request on only accounts that belong to those authorizations
44
- * @param {*} [options] Override http request option.
45
- * @throws {RequiredError}
46
- */
47
- getActivities: async (userId: string, userSecret: string, startDate?: string | Date, endDate?: string | Date, accounts?: string, brokerageAuthorizations?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
48
- // verify required parameter 'userId' is not null or undefined
49
- assertParamExists('getActivities', 'userId', userId)
50
- // verify required parameter 'userSecret' is not null or undefined
51
- assertParamExists('getActivities', 'userSecret', userSecret)
52
- const localVarPath = `/activities`;
53
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
54
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
55
- let baseOptions;
56
- if (configuration) {
57
- baseOptions = configuration.baseOptions;
58
- }
59
-
60
- const localVarRequestOptions: AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
61
- const localVarHeaderParameter = configuration ? { "User-Agent": configuration.userAgent } : {} as any;
62
- const localVarQueryParameter = {} as any;
63
-
64
- // authentication PartnerClientId required
65
- await setApiKeyToObject({object: localVarQueryParameter, keyParamName: "clientId", configuration})
66
- // authentication PartnerSignature required
67
- await setApiKeyToObject({ object: localVarHeaderParameter, keyParamName: "Signature", configuration })
68
- // authentication PartnerTimestamp required
69
- await setApiKeyToObject({object: localVarQueryParameter, keyParamName: "timestamp", configuration})
70
- if (startDate !== undefined) {
71
- localVarQueryParameter['startDate'] = (startDate as any instanceof Date) ?
72
- (startDate as any).toISOString().substr(0,10) :
73
- startDate;
74
- }
75
-
76
- if (endDate !== undefined) {
77
- localVarQueryParameter['endDate'] = (endDate as any instanceof Date) ?
78
- (endDate as any).toISOString().substr(0,10) :
79
- endDate;
80
- }
81
-
82
- if (accounts !== undefined) {
83
- localVarQueryParameter['accounts'] = accounts;
84
- }
85
-
86
- if (brokerageAuthorizations !== undefined) {
87
- localVarQueryParameter['brokerageAuthorizations'] = brokerageAuthorizations;
88
- }
89
-
90
- if (userId !== undefined) {
91
- localVarQueryParameter['userId'] = userId;
92
- }
93
-
94
- if (userSecret !== undefined) {
95
- localVarQueryParameter['userSecret'] = userSecret;
96
- }
97
-
98
-
99
-
100
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
101
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
102
- requestBeforeHook({
103
- queryParameters: localVarQueryParameter,
104
- requestConfig: localVarRequestOptions,
105
- path: localVarPath,
106
- configuration
107
- });
108
-
109
- setSearchParams(localVarUrlObj, localVarQueryParameter);
110
- return {
111
- url: toPathString(localVarUrlObj),
112
- options: localVarRequestOptions,
113
- };
114
- },
115
- /**
116
- * Returns performance information (contributions, dividends, rate of return, etc) for a specific timeframe. Total Equity Timeframe and Rate of Returns are experimental and should not be trusted to be 100% accurate
117
- * @summary Get performance information for a specific timeframe
118
- * @param {string | Date} startDate
119
- * @param {string | Date} endDate
120
- * @param {string} userId
121
- * @param {string} userSecret
122
- * @param {string} [accounts] Optional comma seperated list of account IDs used to filter the request on specific accounts
123
- * @param {boolean} [detailed] Optional, increases frequency of data points for the total value and contribution charts if set to true
124
- * @param {string} [frequency] Optional frequency for the rate of return chart (defaults to monthly). Possible values are daily, weekly, monthly, quarterly, yearly.
125
- * @param {*} [options] Override http request option.
126
- * @throws {RequiredError}
127
- */
128
- getReportingCustomRange: async (startDate: string | Date, endDate: string | Date, userId: string, userSecret: string, accounts?: string, detailed?: boolean, frequency?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
129
- // verify required parameter 'startDate' is not null or undefined
130
- assertParamExists('getReportingCustomRange', 'startDate', startDate)
131
- // verify required parameter 'endDate' is not null or undefined
132
- assertParamExists('getReportingCustomRange', 'endDate', endDate)
133
- // verify required parameter 'userId' is not null or undefined
134
- assertParamExists('getReportingCustomRange', 'userId', userId)
135
- // verify required parameter 'userSecret' is not null or undefined
136
- assertParamExists('getReportingCustomRange', 'userSecret', userSecret)
137
- const localVarPath = `/performance/custom`;
138
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
139
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
140
- let baseOptions;
141
- if (configuration) {
142
- baseOptions = configuration.baseOptions;
143
- }
144
-
145
- const localVarRequestOptions: AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
146
- const localVarHeaderParameter = configuration ? { "User-Agent": configuration.userAgent } : {} as any;
147
- const localVarQueryParameter = {} as any;
148
-
149
- // authentication PartnerClientId required
150
- await setApiKeyToObject({object: localVarQueryParameter, keyParamName: "clientId", configuration})
151
- // authentication PartnerSignature required
152
- await setApiKeyToObject({ object: localVarHeaderParameter, keyParamName: "Signature", configuration })
153
- // authentication PartnerTimestamp required
154
- await setApiKeyToObject({object: localVarQueryParameter, keyParamName: "timestamp", configuration})
155
- if (startDate !== undefined) {
156
- localVarQueryParameter['startDate'] = (startDate as any instanceof Date) ?
157
- (startDate as any).toISOString().substr(0,10) :
158
- startDate;
159
- }
160
-
161
- if (endDate !== undefined) {
162
- localVarQueryParameter['endDate'] = (endDate as any instanceof Date) ?
163
- (endDate as any).toISOString().substr(0,10) :
164
- endDate;
165
- }
166
-
167
- if (accounts !== undefined) {
168
- localVarQueryParameter['accounts'] = accounts;
169
- }
170
-
171
- if (detailed !== undefined) {
172
- localVarQueryParameter['detailed'] = detailed;
173
- }
174
-
175
- if (frequency !== undefined) {
176
- localVarQueryParameter['frequency'] = frequency;
177
- }
178
-
179
- if (userId !== undefined) {
180
- localVarQueryParameter['userId'] = userId;
181
- }
182
-
183
- if (userSecret !== undefined) {
184
- localVarQueryParameter['userSecret'] = userSecret;
185
- }
186
-
187
-
188
-
189
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
190
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
191
- requestBeforeHook({
192
- queryParameters: localVarQueryParameter,
193
- requestConfig: localVarRequestOptions,
194
- path: localVarPath,
195
- configuration
196
- });
197
-
198
- setSearchParams(localVarUrlObj, localVarQueryParameter);
199
- return {
200
- url: toPathString(localVarUrlObj),
201
- options: localVarRequestOptions,
202
- };
203
- },
204
- }
205
- };
206
-
207
- /**
208
- * TransactionsAndReportingApi - functional programming interface
209
- * @export
210
- */
211
- export const TransactionsAndReportingApiFp = function(configuration?: Configuration) {
212
- const localVarAxiosParamCreator = TransactionsAndReportingApiAxiosParamCreator(configuration)
213
- return {
214
- /**
215
- * Returns activities (transactions) for a user. Specifing start and end date is highly recommended for automatic calls for better performance
216
- * @summary Get transaction history for a user
217
- * @param {TransactionsAndReportingApiGetActivitiesRequest} requestParameters Request parameters.
218
- * @param {*} [options] Override http request option.
219
- * @throws {RequiredError}
220
- */
221
- async getActivities(requestParameters: TransactionsAndReportingApiGetActivitiesRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<UniversalActivity>>> {
222
- const localVarAxiosArgs = await localVarAxiosParamCreator.getActivities(requestParameters.userId, requestParameters.userSecret, requestParameters.startDate, requestParameters.endDate, requestParameters.accounts, requestParameters.brokerageAuthorizations, options);
223
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
224
- },
225
- /**
226
- * Returns performance information (contributions, dividends, rate of return, etc) for a specific timeframe. Total Equity Timeframe and Rate of Returns are experimental and should not be trusted to be 100% accurate
227
- * @summary Get performance information for a specific timeframe
228
- * @param {TransactionsAndReportingApiGetReportingCustomRangeRequest} requestParameters Request parameters.
229
- * @param {*} [options] Override http request option.
230
- * @throws {RequiredError}
231
- */
232
- async getReportingCustomRange(requestParameters: TransactionsAndReportingApiGetReportingCustomRangeRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<PerformanceCustom>> {
233
- const localVarAxiosArgs = await localVarAxiosParamCreator.getReportingCustomRange(requestParameters.startDate, requestParameters.endDate, requestParameters.userId, requestParameters.userSecret, requestParameters.accounts, requestParameters.detailed, requestParameters.frequency, options);
234
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
235
- },
236
- }
237
- };
238
-
239
- /**
240
- * TransactionsAndReportingApi - factory interface
241
- * @export
242
- */
243
- export const TransactionsAndReportingApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
244
- const localVarFp = TransactionsAndReportingApiFp(configuration)
245
- return {
246
- /**
247
- * Returns activities (transactions) for a user. Specifing start and end date is highly recommended for automatic calls for better performance
248
- * @summary Get transaction history for a user
249
- * @param {TransactionsAndReportingApiGetActivitiesRequest} requestParameters Request parameters.
250
- * @param {*} [options] Override http request option.
251
- * @throws {RequiredError}
252
- */
253
- getActivities(requestParameters: TransactionsAndReportingApiGetActivitiesRequest, options?: AxiosRequestConfig): AxiosPromise<Array<UniversalActivity>> {
254
- return localVarFp.getActivities(requestParameters, options).then((request) => request(axios, basePath));
255
- },
256
- /**
257
- * Returns performance information (contributions, dividends, rate of return, etc) for a specific timeframe. Total Equity Timeframe and Rate of Returns are experimental and should not be trusted to be 100% accurate
258
- * @summary Get performance information for a specific timeframe
259
- * @param {TransactionsAndReportingApiGetReportingCustomRangeRequest} requestParameters Request parameters.
260
- * @param {*} [options] Override http request option.
261
- * @throws {RequiredError}
262
- */
263
- getReportingCustomRange(requestParameters: TransactionsAndReportingApiGetReportingCustomRangeRequest, options?: AxiosRequestConfig): AxiosPromise<PerformanceCustom> {
264
- return localVarFp.getReportingCustomRange(requestParameters, options).then((request) => request(axios, basePath));
265
- },
266
- };
267
- };
268
-
269
- /**
270
- * Request parameters for getActivities operation in TransactionsAndReportingApi.
271
- * @export
272
- * @interface TransactionsAndReportingApiGetActivitiesRequest
273
- */
274
- export type TransactionsAndReportingApiGetActivitiesRequest = {
275
-
276
- /**
277
- *
278
- * @type {string}
279
- * @memberof TransactionsAndReportingApiGetActivities
280
- */
281
- readonly userId: string
282
-
283
- /**
284
- *
285
- * @type {string}
286
- * @memberof TransactionsAndReportingApiGetActivities
287
- */
288
- readonly userSecret: string
289
-
290
- /**
291
- *
292
- * @type {string | Date}
293
- * @memberof TransactionsAndReportingApiGetActivities
294
- */
295
- readonly startDate?: string | Date
296
-
297
- /**
298
- *
299
- * @type {string | Date}
300
- * @memberof TransactionsAndReportingApiGetActivities
301
- */
302
- readonly endDate?: string | Date
303
-
304
- /**
305
- * Optional comma seperated list of account IDs used to filter the request on specific accounts
306
- * @type {string}
307
- * @memberof TransactionsAndReportingApiGetActivities
308
- */
309
- readonly accounts?: string
310
-
311
- /**
312
- * Optional comma seperated list of brokerage authorization IDs used to filter the request on only accounts that belong to those authorizations
313
- * @type {string}
314
- * @memberof TransactionsAndReportingApiGetActivities
315
- */
316
- readonly brokerageAuthorizations?: string
317
-
318
- }
319
-
320
- /**
321
- * Request parameters for getReportingCustomRange operation in TransactionsAndReportingApi.
322
- * @export
323
- * @interface TransactionsAndReportingApiGetReportingCustomRangeRequest
324
- */
325
- export type TransactionsAndReportingApiGetReportingCustomRangeRequest = {
326
-
327
- /**
328
- *
329
- * @type {string | Date}
330
- * @memberof TransactionsAndReportingApiGetReportingCustomRange
331
- */
332
- readonly startDate: string | Date
333
-
334
- /**
335
- *
336
- * @type {string | Date}
337
- * @memberof TransactionsAndReportingApiGetReportingCustomRange
338
- */
339
- readonly endDate: string | Date
340
-
341
- /**
342
- *
343
- * @type {string}
344
- * @memberof TransactionsAndReportingApiGetReportingCustomRange
345
- */
346
- readonly userId: string
347
-
348
- /**
349
- *
350
- * @type {string}
351
- * @memberof TransactionsAndReportingApiGetReportingCustomRange
352
- */
353
- readonly userSecret: string
354
-
355
- /**
356
- * Optional comma seperated list of account IDs used to filter the request on specific accounts
357
- * @type {string}
358
- * @memberof TransactionsAndReportingApiGetReportingCustomRange
359
- */
360
- readonly accounts?: string
361
-
362
- /**
363
- * Optional, increases frequency of data points for the total value and contribution charts if set to true
364
- * @type {boolean}
365
- * @memberof TransactionsAndReportingApiGetReportingCustomRange
366
- */
367
- readonly detailed?: boolean
368
-
369
- /**
370
- * Optional frequency for the rate of return chart (defaults to monthly). Possible values are daily, weekly, monthly, quarterly, yearly.
371
- * @type {string}
372
- * @memberof TransactionsAndReportingApiGetReportingCustomRange
373
- */
374
- readonly frequency?: string
375
-
376
- }
377
-
378
- /**
379
- * TransactionsAndReportingApi - object-oriented interface
380
- * @export
381
- * @class TransactionsAndReportingApi
382
- * @extends {BaseAPI}
383
- */
384
- export class TransactionsAndReportingApi extends TransactionsAndReportingApiCustom {
385
- /**
386
- * Returns activities (transactions) for a user. Specifing start and end date is highly recommended for automatic calls for better performance
387
- * @summary Get transaction history for a user
388
- * @param {TransactionsAndReportingApiGetActivitiesRequest} requestParameters Request parameters.
389
- * @param {*} [options] Override http request option.
390
- * @throws {RequiredError}
391
- * @memberof TransactionsAndReportingApi
392
- */
393
- public getActivities(requestParameters: TransactionsAndReportingApiGetActivitiesRequest, options?: AxiosRequestConfig) {
394
- return TransactionsAndReportingApiFp(this.configuration).getActivities(requestParameters, options).then((request) => request(this.axios, this.basePath));
395
- }
396
-
397
- /**
398
- * Returns performance information (contributions, dividends, rate of return, etc) for a specific timeframe. Total Equity Timeframe and Rate of Returns are experimental and should not be trusted to be 100% accurate
399
- * @summary Get performance information for a specific timeframe
400
- * @param {TransactionsAndReportingApiGetReportingCustomRangeRequest} requestParameters Request parameters.
401
- * @param {*} [options] Override http request option.
402
- * @throws {RequiredError}
403
- * @memberof TransactionsAndReportingApi
404
- */
405
- public getReportingCustomRange(requestParameters: TransactionsAndReportingApiGetReportingCustomRangeRequest, options?: AxiosRequestConfig) {
406
- return TransactionsAndReportingApiFp(this.configuration).getReportingCustomRange(requestParameters, options).then((request) => request(this.axios, this.basePath));
407
- }
408
- }
package/api.ts DELETED
@@ -1,27 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * SnapTrade
5
- * Connect brokerage accounts to your app for live positions and trading
6
- *
7
- * The version of the OpenAPI document: 1.0.0
8
- * Contact: api@snaptrade.com
9
- *
10
- * NOTE: This file is auto generated by Konfig (https://konfigthis.com).
11
- * https://konfigthis.com
12
- * Do not edit the class manually.
13
- */
14
-
15
-
16
- export * from './api/account-information-api';
17
- export * from './api/api-disclaimer-api';
18
- export * from './api/api-status-api';
19
- export * from './api/authentication-api';
20
- export * from './api/connections-api';
21
- export * from './api/error-logs-api';
22
- export * from './api/options-api';
23
- export * from './api/portfolio-management-api';
24
- export * from './api/reference-data-api';
25
- export * from './api/trading-api';
26
- export * from './api/transactions-and-reporting-api';
27
-
package/base.ts DELETED
@@ -1,70 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * SnapTrade
5
- * Connect brokerage accounts to your app for live positions and trading
6
- *
7
- * The version of the OpenAPI document: 1.0.0
8
- * Contact: api@snaptrade.com
9
- *
10
- * NOTE: This file is auto generated by Konfig (https://konfigthis.com).
11
- * https://konfigthis.com
12
- * Do not edit the class manually.
13
- */
14
-
15
- import { Configuration } from "./configuration";
16
- // Some imports not used depending on template conditions
17
- // @ts-ignore
18
- import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
19
-
20
- export const BASE_PATH = "https://api.snaptrade.com/api/v1".replace(/\/+$/, "");
21
-
22
- /**
23
- *
24
- * @export
25
- */
26
- export const COLLECTION_FORMATS = {
27
- csv: ",",
28
- ssv: " ",
29
- tsv: "\t",
30
- pipes: "|",
31
- };
32
-
33
- /**
34
- *
35
- * @export
36
- * @interface RequestArgs
37
- */
38
- export interface RequestArgs {
39
- url: string;
40
- options: AxiosRequestConfig;
41
- }
42
-
43
- /**
44
- *
45
- * @export
46
- * @class BaseAPI
47
- */
48
- export class BaseAPI {
49
- protected configuration: Configuration | undefined;
50
-
51
- constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) {
52
- if (configuration) {
53
- this.configuration = configuration;
54
- this.basePath = configuration.basePath || this.basePath;
55
- }
56
- }
57
- };
58
-
59
- /**
60
- *
61
- * @export
62
- * @class RequiredError
63
- * @extends {Error}
64
- */
65
- export class RequiredError extends Error {
66
- name: "RequiredError" = "RequiredError";
67
- constructor(public field: string, msg?: string) {
68
- super(msg);
69
- }
70
- }
package/client-custom.ts DELETED
@@ -1,5 +0,0 @@
1
- import { ConfigurationParameters } from "./configuration";
2
-
3
- export class SnaptradeCustom {
4
- constructor(configurationParameters: ConfigurationParameters) {}
5
- }
package/client.ts DELETED
@@ -1,59 +0,0 @@
1
- /**
2
- * SnapTrade
3
- * Connect brokerage accounts to your app for live positions and trading
4
- *
5
- * The version of the OpenAPI document: 1.0.0
6
- * Contact: api@snaptrade.com
7
- *
8
- * NOTE: This file is auto generated by Konfig (https://konfigthis.com).
9
- * https://konfigthis.com
10
- * Do not edit the class manually.
11
- */
12
-
13
- import { AxiosRequestConfig } from "axios";
14
- import {
15
- AccountInformationApi,
16
- ApiDisclaimerApi,
17
- ApiStatusApi,
18
- AuthenticationApi,
19
- ConnectionsApi,
20
- ErrorLogsApi,
21
- OptionsApi,
22
- PortfolioManagementApi,
23
- ReferenceDataApi,
24
- TradingApi,
25
- TransactionsAndReportingApi,
26
- } from "./api";
27
- import { Configuration, ConfigurationParameters } from "./configuration";
28
- import { SnaptradeCustom } from "./client-custom";
29
-
30
- export class Snaptrade extends SnaptradeCustom {
31
- readonly accountInformation: AccountInformationApi;
32
- readonly apiDisclaimer: ApiDisclaimerApi;
33
- readonly apiStatus: ApiStatusApi;
34
- readonly authentication: AuthenticationApi;
35
- readonly connections: ConnectionsApi;
36
- readonly errorLogs: ErrorLogsApi;
37
- readonly options: OptionsApi;
38
- readonly portfolioManagement: PortfolioManagementApi;
39
- readonly referenceData: ReferenceDataApi;
40
- readonly trading: TradingApi;
41
- readonly transactionsAndReporting: TransactionsAndReportingApi;
42
-
43
- constructor(configurationParameters: ConfigurationParameters) {
44
- super(configurationParameters);
45
- const configuration = new Configuration(configurationParameters);
46
- this.accountInformation = new AccountInformationApi(configuration);
47
- this.apiDisclaimer = new ApiDisclaimerApi(configuration);
48
- this.apiStatus = new ApiStatusApi(configuration);
49
- this.authentication = new AuthenticationApi(configuration);
50
- this.connections = new ConnectionsApi(configuration);
51
- this.errorLogs = new ErrorLogsApi(configuration);
52
- this.options = new OptionsApi(configuration);
53
- this.portfolioManagement = new PortfolioManagementApi(configuration);
54
- this.referenceData = new ReferenceDataApi(configuration);
55
- this.trading = new TradingApi(configuration);
56
- this.transactionsAndReporting = new TransactionsAndReportingApi(configuration);
57
- }
58
-
59
- }