snaptrade-typescript-sdk 8.7.0 → 8.9.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 (179) hide show
  1. package/README.md +1 -3
  2. package/dist/api/portfolio-management-api.d.ts +0 -47
  3. package/dist/api/portfolio-management-api.js +0 -103
  4. package/dist/api.d.ts +0 -1
  5. package/dist/api.js +0 -1
  6. package/dist/client.d.ts +1 -2
  7. package/dist/client.js +0 -1
  8. package/dist/configuration.js +1 -1
  9. package/dist/models/index.d.ts +0 -1
  10. package/dist/models/index.js +0 -1
  11. package/package.json +4 -1
  12. package/.konfig/generate-id.txt +0 -1
  13. package/.konfigignore +0 -3
  14. package/api/account-information-api-custom.ts +0 -3
  15. package/api/account-information-api.ts +0 -1062
  16. package/api/api-disclaimer-api-custom.ts +0 -3
  17. package/api/api-disclaimer-api.ts +0 -183
  18. package/api/api-status-api-custom.ts +0 -3
  19. package/api/api-status-api.ts +0 -128
  20. package/api/authentication-api-custom.ts +0 -3
  21. package/api/authentication-api.ts +0 -568
  22. package/api/connections-api-custom.ts +0 -3
  23. package/api/connections-api.ts +0 -544
  24. package/api/error-logs-api-custom.ts +0 -3
  25. package/api/error-logs-api.ts +0 -174
  26. package/api/options-api-custom.ts +0 -3
  27. package/api/options-api.ts +0 -739
  28. package/api/portfolio-management-api-custom.ts +0 -3
  29. package/api/portfolio-management-api.ts +0 -3301
  30. package/api/reference-data-api-custom.ts +0 -3
  31. package/api/reference-data-api.ts +0 -1031
  32. package/api/trading-api-custom.ts +0 -3
  33. package/api/trading-api.ts +0 -1304
  34. package/api/transactions-and-reporting-api-custom.ts +0 -3
  35. package/api/transactions-and-reporting-api.ts +0 -408
  36. package/api.ts +0 -27
  37. package/base.ts +0 -70
  38. package/client-custom.ts +0 -5
  39. package/client.ts +0 -59
  40. package/common.ts +0 -163
  41. package/configuration.ts +0 -131
  42. package/dist/api/api-disclaimer-api-custom.d.ts +0 -3
  43. package/dist/api/api-disclaimer-api-custom.js +0 -27
  44. package/dist/api/api-disclaimer-api.d.ts +0 -97
  45. package/dist/api/api-disclaimer-api.js +0 -247
  46. package/dist/models/apidisclaimer-accept-request.d.ts +0 -24
  47. package/dist/models/apidisclaimer-accept-request.js +0 -15
  48. package/docs/AccountInformationApi.md +0 -469
  49. package/docs/ApiDisclaimerApi.md +0 -64
  50. package/docs/ApiStatusApi.md +0 -58
  51. package/docs/AuthenticationApi.md +0 -293
  52. package/docs/ConnectionsApi.md +0 -238
  53. package/docs/ErrorLogsApi.md +0 -62
  54. package/docs/OptionsApi.md +0 -312
  55. package/docs/PortfolioManagementApi.md +0 -1785
  56. package/docs/ReferenceDataApi.md +0 -568
  57. package/docs/TradingApi.md +0 -596
  58. package/docs/TransactionsAndReportingApi.md +0 -144
  59. package/index.test.ts +0 -177
  60. package/index.ts +0 -18
  61. package/jest.config.ts +0 -11
  62. package/models/account-holdings-account.ts +0 -61
  63. package/models/account-holdings.ts +0 -61
  64. package/models/account-order-record-status.ts +0 -48
  65. package/models/account-order-record.ts +0 -151
  66. package/models/account-simple.ts +0 -52
  67. package/models/account-sync-status.ts +0 -32
  68. package/models/account.ts +0 -91
  69. package/models/action.ts +0 -30
  70. package/models/apidisclaimer-accept-request.ts +0 -29
  71. package/models/authentication-login-snap-trade-user200-response.ts +0 -31
  72. package/models/balance.ts +0 -40
  73. package/models/brokerage-authorization-type-read-only-brokerage.ts +0 -43
  74. package/models/brokerage-authorization-type-read-only.ts +0 -68
  75. package/models/brokerage-authorization-type.ts +0 -39
  76. package/models/brokerage-authorization.ts +0 -82
  77. package/models/brokerage-symbol.ts +0 -61
  78. package/models/brokerage-type.ts +0 -37
  79. package/models/brokerage.ts +0 -136
  80. package/models/calculated-trade.ts +0 -40
  81. package/models/cash-restriction.ts +0 -63
  82. package/models/connections-session-events200-response-inner.ts +0 -25
  83. package/models/currency.ts +0 -43
  84. package/models/delete-user-response.ts +0 -37
  85. package/models/dividend-at-date.ts +0 -43
  86. package/models/encrypted-response-encrypted-message-data.ts +0 -43
  87. package/models/encrypted-response.ts +0 -38
  88. package/models/exchange-rate-pairs.ts +0 -46
  89. package/models/exchange.ts +0 -73
  90. package/models/excluded-asset.ts +0 -34
  91. package/models/index.ts +0 -109
  92. package/models/jwt.ts +0 -31
  93. package/models/login-redirect-uri.ts +0 -35
  94. package/models/manual-trade-and-impact.ts +0 -49
  95. package/models/manual-trade-balance.ts +0 -49
  96. package/models/manual-trade-form.ts +0 -80
  97. package/models/manual-trade-symbol.ts +0 -64
  98. package/models/manual-trade.ts +0 -88
  99. package/models/model-asset-class-details.ts +0 -41
  100. package/models/model-asset-class-target.ts +0 -34
  101. package/models/model-asset-class.ts +0 -37
  102. package/models/model-portfolio-asset-class.ts +0 -40
  103. package/models/model-portfolio-details.ts +0 -50
  104. package/models/model-portfolio-security.ts +0 -40
  105. package/models/model-portfolio.ts +0 -52
  106. package/models/model400-failed-request-response.ts +0 -37
  107. package/models/model401-failed-request-response.ts +0 -37
  108. package/models/model403-failed-request-response.ts +0 -37
  109. package/models/model404-failed-request-response.ts +0 -37
  110. package/models/monthly-dividends.ts +0 -40
  111. package/models/net-contributions.ts +0 -43
  112. package/models/net-dividend.ts +0 -46
  113. package/models/option-chain-inner-chain-per-root-inner-chain-per-strike-price-inner.ts +0 -43
  114. package/models/option-chain-inner-chain-per-root-inner.ts +0 -46
  115. package/models/option-chain-inner.ts +0 -58
  116. package/models/option-leg.ts +0 -53
  117. package/models/option-strategy-legs-inner.ts +0 -47
  118. package/models/option-strategy.ts +0 -61
  119. package/models/options-get-option-strategy-request.ts +0 -51
  120. package/models/options-holdings.ts +0 -67
  121. package/models/options-place-option-strategy-request.ts +0 -57
  122. package/models/options-position.ts +0 -73
  123. package/models/options-symbol.ts +0 -94
  124. package/models/order-type.ts +0 -32
  125. package/models/partner-data.ts +0 -100
  126. package/models/past-value.ts +0 -43
  127. package/models/performance-custom.ts +0 -154
  128. package/models/portfolio-group-info.ts +0 -115
  129. package/models/portfolio-group-position.ts +0 -46
  130. package/models/portfolio-group-settings.ts +0 -58
  131. package/models/portfolio-group.ts +0 -37
  132. package/models/position-symbol.ts +0 -64
  133. package/models/position.ts +0 -64
  134. package/models/redirect-tokenand-pin.ts +0 -37
  135. package/models/security-type.ts +0 -49
  136. package/models/session-event.ts +0 -80
  137. package/models/snap-trade-apidisclaimer-accept-status.ts +0 -37
  138. package/models/snap-trade-holdings-account-account-id.ts +0 -82
  139. package/models/snap-trade-holdings-account.ts +0 -79
  140. package/models/snap-trade-holdings-total-value.ts +0 -37
  141. package/models/snap-trade-login-user-request-body.ts +0 -61
  142. package/models/snap-trade-register-user-request-body.ts +0 -35
  143. package/models/status.ts +0 -43
  144. package/models/strategy-impact-legs-inner.ts +0 -67
  145. package/models/strategy-impact.ts +0 -94
  146. package/models/strategy-order-place-orders-inner-legs-inner.ts +0 -67
  147. package/models/strategy-order-place-orders-inner.ts +0 -286
  148. package/models/strategy-order-place.ts +0 -40
  149. package/models/strategy-order-record.ts +0 -133
  150. package/models/strategy-quotes-greek.ts +0 -55
  151. package/models/strategy-quotes.ts +0 -67
  152. package/models/sub-period-return-rate.ts +0 -43
  153. package/models/symbol-query.ts +0 -29
  154. package/models/symbol.ts +0 -76
  155. package/models/symbols-quotes.ts +0 -64
  156. package/models/target-asset.ts +0 -62
  157. package/models/time-in-force.ts +0 -31
  158. package/models/trade-execution-status.ts +0 -105
  159. package/models/trade-impact.ts +0 -61
  160. package/models/trade.ts +0 -88
  161. package/models/trading-cancel-user-account-order-request.ts +0 -29
  162. package/models/trading-place-ocoorder-request.ts +0 -35
  163. package/models/transactions-status.ts +0 -35
  164. package/models/underlying-symbol.ts +0 -76
  165. package/models/universal-activity.ts +0 -127
  166. package/models/universal-symbol-ticker.ts +0 -82
  167. package/models/universal-symbol.ts +0 -80
  168. package/models/user-error-log.ts +0 -61
  169. package/models/user-idand-secret.ts +0 -37
  170. package/models/user-settings.ts +0 -88
  171. package/models/usexchange.ts +0 -79
  172. package/pagination/page-types.ts +0 -34
  173. package/pagination/page.ts +0 -58
  174. package/pagination/pageable.ts +0 -113
  175. package/pagination/paginate.ts +0 -41
  176. package/requestAfterHook.ts +0 -53
  177. package/requestBeforeHook.ts +0 -15
  178. package/tsconfig.json +0 -22
  179. package/tsconfig.test.json +0 -6
@@ -1,24 +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
- *
14
- * @export
15
- * @interface APIDisclaimerAcceptRequest
16
- */
17
- export interface APIDisclaimerAcceptRequest {
18
- /**
19
- * A boolean that indicates whether this user has accepted the disclaimer or not.
20
- * @type {boolean}
21
- * @memberof APIDisclaimerAcceptRequest
22
- */
23
- 'accepted'?: boolean;
24
- }
@@ -1,15 +0,0 @@
1
- "use strict";
2
- /* tslint:disable */
3
- /* eslint-disable */
4
- /**
5
- * SnapTrade
6
- * Connect brokerage accounts to your app for live positions and trading
7
- *
8
- * The version of the OpenAPI document: 1.0.0
9
- * Contact: api@snaptrade.com
10
- *
11
- * NOTE: This file is auto generated by Konfig (https://konfigthis.com).
12
- * https://konfigthis.com
13
- * Do not edit the class manually.
14
- */
15
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,469 +0,0 @@
1
- # AccountInformationApi
2
-
3
- All URIs are relative to *https://api.snaptrade.com/api/v1*
4
-
5
- Method | HTTP request | Description
6
- ------------- | ------------- | -------------
7
- [**getAllUserHoldings**](AccountInformationApi.md#getAllUserHoldings) | **GET** /holdings | List all accounts for the user, plus balances and positions for each account.
8
- [**getUserAccountBalance**](AccountInformationApi.md#getUserAccountBalance) | **GET** /accounts/{accountId}/balances | Get all cash balances of an investment account
9
- [**getUserAccountDetails**](AccountInformationApi.md#getUserAccountDetails) | **GET** /accounts/{accountId} | Return details of a specific investment account
10
- [**getUserAccountOrders**](AccountInformationApi.md#getUserAccountOrders) | **GET** /accounts/{accountId}/orders | Get all history of orders placed in account
11
- [**getUserAccountPositions**](AccountInformationApi.md#getUserAccountPositions) | **GET** /accounts/{accountId}/positions | Get all positions of an investment account
12
- [**getUserHoldings**](AccountInformationApi.md#getUserHoldings) | **GET** /accounts/{accountId}/holdings | List balances, positions and orders for the specified account.
13
- [**listUserAccounts**](AccountInformationApi.md#listUserAccounts) | **GET** /accounts | List all investment accounts for the user
14
- [**updateUserAccount**](AccountInformationApi.md#updateUserAccount) | **PUT** /accounts/{accountId} | Update details of an investment account
15
-
16
-
17
- # **getAllUserHoldings**
18
-
19
- #### **GET** /holdings
20
-
21
-
22
- ### Example
23
-
24
-
25
- ```typescript
26
- import { Snaptrade } from "snaptrade-typescript-sdk";
27
-
28
- const snaptrade = new Snaptrade({
29
- // Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
30
- // basePath: "https://api.snaptrade.com/api/v1",
31
- consumerKey: "YOUR_CONSUMER_KEY",
32
- clientId: "YOUR_CLIENT_ID",
33
- });
34
-
35
- const getAllUserHoldingsResponse =
36
- await snaptrade.accountInformation.getAllUserHoldings({
37
- userId: "John.doe@snaptrade.com",
38
- userSecret: "USERSECRET123",
39
- brokerageAuthorizations: "917c8734-8470-4a3e-a18f-57c3f2ee6631",
40
- });
41
-
42
- console.log(getAllUserHoldingsResponse);
43
- ```
44
-
45
-
46
- ### Parameters
47
-
48
- Name | Type | Description | Notes
49
- ------------- | ------------- | ------------- | -------------
50
- **userId** | [**string**] | | defaults to undefined
51
- **userSecret** | [**string**] | | defaults to undefined
52
- **brokerageAuthorizations** | [**string**] | Optional. Comma seperated list of authorization IDs (only use if filtering is needed on one or more authorizations). | (optional) defaults to undefined
53
-
54
-
55
- ### Return type
56
-
57
- **Array<AccountHoldings>**
58
-
59
- ### HTTP request headers
60
-
61
- - **Content-Type**: Not defined
62
- - **Accept**: application/json
63
-
64
-
65
- ### HTTP response details
66
- | Status code | Description | Response headers |
67
- |-------------|-------------|------------------|
68
- **200** | Returns list of accounts and holdings | - |
69
- **400** | Bad Request | - |
70
- **403** | Forbidden | - |
71
- **500** | Unexpected Error | - |
72
-
73
- [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
74
-
75
- # **getUserAccountBalance**
76
-
77
- #### **GET** /accounts/{accountId}/balances
78
-
79
-
80
- ### Example
81
-
82
-
83
- ```typescript
84
- import { Snaptrade } from "snaptrade-typescript-sdk";
85
-
86
- const snaptrade = new Snaptrade({
87
- // Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
88
- // basePath: "https://api.snaptrade.com/api/v1",
89
- consumerKey: "YOUR_CONSUMER_KEY",
90
- clientId: "YOUR_CLIENT_ID",
91
- });
92
-
93
- const getUserAccountBalanceResponse =
94
- await snaptrade.accountInformation.getUserAccountBalance({
95
- userId: "John.doe@snaptrade.com",
96
- userSecret: "USERSECRET123",
97
- accountId: "accountId_example",
98
- });
99
-
100
- console.log(getUserAccountBalanceResponse);
101
- ```
102
-
103
-
104
- ### Parameters
105
-
106
- Name | Type | Description | Notes
107
- ------------- | ------------- | ------------- | -------------
108
- **userId** | [**string**] | | defaults to undefined
109
- **userSecret** | [**string**] | | defaults to undefined
110
- **accountId** | [**string**] | The ID of the account get positions. | defaults to undefined
111
-
112
-
113
- ### Return type
114
-
115
- **Array<Balance>**
116
-
117
- ### HTTP request headers
118
-
119
- - **Content-Type**: Not defined
120
- - **Accept**: */*
121
-
122
-
123
- ### HTTP response details
124
- | Status code | Description | Response headers |
125
- |-------------|-------------|------------------|
126
- **200** | List of all balances in investment account | - |
127
- **0** | Unexpected error | - |
128
-
129
- [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
130
-
131
- # **getUserAccountDetails**
132
-
133
- #### **GET** /accounts/{accountId}
134
-
135
-
136
- ### Example
137
-
138
-
139
- ```typescript
140
- import { Snaptrade } from "snaptrade-typescript-sdk";
141
-
142
- const snaptrade = new Snaptrade({
143
- // Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
144
- // basePath: "https://api.snaptrade.com/api/v1",
145
- consumerKey: "YOUR_CONSUMER_KEY",
146
- clientId: "YOUR_CLIENT_ID",
147
- });
148
-
149
- const getUserAccountDetailsResponse =
150
- await snaptrade.accountInformation.getUserAccountDetails({
151
- userId: "John.doe@snaptrade.com",
152
- userSecret: "USERSECRET123",
153
- accountId: "accountId_example",
154
- });
155
-
156
- console.log(getUserAccountDetailsResponse);
157
- ```
158
-
159
-
160
- ### Parameters
161
-
162
- Name | Type | Description | Notes
163
- ------------- | ------------- | ------------- | -------------
164
- **userId** | [**string**] | | defaults to undefined
165
- **userSecret** | [**string**] | | defaults to undefined
166
- **accountId** | [**string**] | The ID of the account to get detail of. | defaults to undefined
167
-
168
-
169
- ### Return type
170
-
171
- **Array<Account>**
172
-
173
- ### HTTP request headers
174
-
175
- - **Content-Type**: Not defined
176
- - **Accept**: application/json
177
-
178
-
179
- ### HTTP response details
180
- | Status code | Description | Response headers |
181
- |-------------|-------------|------------------|
182
- **200** | Details of a specific investment account | - |
183
- **0** | Unexpected error | - |
184
-
185
- [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
186
-
187
- # **getUserAccountOrders**
188
-
189
- #### **GET** /accounts/{accountId}/orders
190
-
191
-
192
- ### Example
193
-
194
-
195
- ```typescript
196
- import { Snaptrade } from "snaptrade-typescript-sdk";
197
-
198
- const snaptrade = new Snaptrade({
199
- // Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
200
- // basePath: "https://api.snaptrade.com/api/v1",
201
- consumerKey: "YOUR_CONSUMER_KEY",
202
- clientId: "YOUR_CLIENT_ID",
203
- });
204
-
205
- const getUserAccountOrdersResponse =
206
- await snaptrade.accountInformation.getUserAccountOrders({
207
- userId: "John.doe@snaptrade.com",
208
- userSecret: "USERSECRET123",
209
- state: "all",
210
- accountId: "accountId_example",
211
- });
212
-
213
- console.log(getUserAccountOrdersResponse);
214
- ```
215
-
216
-
217
- ### Parameters
218
-
219
- Name | Type | Description | Notes
220
- ------------- | ------------- | ------------- | -------------
221
- **userId** | [**string**] | | defaults to undefined
222
- **userSecret** | [**string**] | | defaults to undefined
223
- **accountId** | [**string**] | The ID of the account get positions. | defaults to undefined
224
- **state** | 'all', 'open', 'executed' | defaults value is set to \"all\" | (optional) defaults to undefined
225
-
226
-
227
- ### Return type
228
-
229
- **Array<AccountOrderRecord>**
230
-
231
- ### HTTP request headers
232
-
233
- - **Content-Type**: Not defined
234
- - **Accept**: application/json
235
-
236
-
237
- ### HTTP response details
238
- | Status code | Description | Response headers |
239
- |-------------|-------------|------------------|
240
- **200** | List all orders in account | - |
241
- **500** | Unexpected error | - |
242
-
243
- [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
244
-
245
- # **getUserAccountPositions**
246
-
247
- #### **GET** /accounts/{accountId}/positions
248
-
249
-
250
- ### Example
251
-
252
-
253
- ```typescript
254
- import { Snaptrade } from "snaptrade-typescript-sdk";
255
-
256
- const snaptrade = new Snaptrade({
257
- // Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
258
- // basePath: "https://api.snaptrade.com/api/v1",
259
- consumerKey: "YOUR_CONSUMER_KEY",
260
- clientId: "YOUR_CLIENT_ID",
261
- });
262
-
263
- const getUserAccountPositionsResponse =
264
- await snaptrade.accountInformation.getUserAccountPositions({
265
- userId: "John.doe@snaptrade.com",
266
- userSecret: "USERSECRET123",
267
- accountId: "accountId_example",
268
- });
269
-
270
- console.log(getUserAccountPositionsResponse);
271
- ```
272
-
273
-
274
- ### Parameters
275
-
276
- Name | Type | Description | Notes
277
- ------------- | ------------- | ------------- | -------------
278
- **userId** | [**string**] | | defaults to undefined
279
- **userSecret** | [**string**] | | defaults to undefined
280
- **accountId** | [**string**] | The ID of the account get positions. | defaults to undefined
281
-
282
-
283
- ### Return type
284
-
285
- **Array<Position>**
286
-
287
- ### HTTP request headers
288
-
289
- - **Content-Type**: Not defined
290
- - **Accept**: */*
291
-
292
-
293
- ### HTTP response details
294
- | Status code | Description | Response headers |
295
- |-------------|-------------|------------------|
296
- **200** | List all positions in investment account | - |
297
- **0** | Unexpected error | - |
298
-
299
- [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
300
-
301
- # **getUserHoldings**
302
-
303
- #### **GET** /accounts/{accountId}/holdings
304
-
305
-
306
- ### Example
307
-
308
-
309
- ```typescript
310
- import { Snaptrade } from "snaptrade-typescript-sdk";
311
-
312
- const snaptrade = new Snaptrade({
313
- // Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
314
- // basePath: "https://api.snaptrade.com/api/v1",
315
- consumerKey: "YOUR_CONSUMER_KEY",
316
- clientId: "YOUR_CLIENT_ID",
317
- });
318
-
319
- const getUserHoldingsResponse =
320
- await snaptrade.accountInformation.getUserHoldings({
321
- accountId: "917c8734-8470-4a3e-a18f-57c3f2ee6631",
322
- userId: "John.doe@snaptrade.com",
323
- userSecret: "USERSECRET123",
324
- });
325
-
326
- console.log(getUserHoldingsResponse);
327
- ```
328
-
329
-
330
- ### Parameters
331
-
332
- Name | Type | Description | Notes
333
- ------------- | ------------- | ------------- | -------------
334
- **accountId** | [**string**] | The ID of the account to fetch holdings for. | defaults to undefined
335
- **userId** | [**string**] | | defaults to undefined
336
- **userSecret** | [**string**] | | defaults to undefined
337
-
338
-
339
- ### Return type
340
-
341
- **AccountHoldingsAccount**
342
-
343
- ### HTTP request headers
344
-
345
- - **Content-Type**: Not defined
346
- - **Accept**: application/json
347
-
348
-
349
- ### HTTP response details
350
- | Status code | Description | Response headers |
351
- |-------------|-------------|------------------|
352
- **200** | Returns holdings for the account | - |
353
- **400** | Bad Request | - |
354
- **403** | Forbidden | - |
355
- **500** | Unexpected Error | - |
356
-
357
- [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
358
-
359
- # **listUserAccounts**
360
-
361
- #### **GET** /accounts
362
-
363
-
364
- ### Example
365
-
366
-
367
- ```typescript
368
- import { Snaptrade } from "snaptrade-typescript-sdk";
369
-
370
- const snaptrade = new Snaptrade({
371
- // Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
372
- // basePath: "https://api.snaptrade.com/api/v1",
373
- consumerKey: "YOUR_CONSUMER_KEY",
374
- clientId: "YOUR_CLIENT_ID",
375
- });
376
-
377
- const listUserAccountsResponse =
378
- await snaptrade.accountInformation.listUserAccounts({
379
- userId: "John.doe@snaptrade.com",
380
- userSecret: "USERSECRET123",
381
- });
382
-
383
- console.log(listUserAccountsResponse);
384
- ```
385
-
386
-
387
- ### Parameters
388
-
389
- Name | Type | Description | Notes
390
- ------------- | ------------- | ------------- | -------------
391
- **userId** | [**string**] | | defaults to undefined
392
- **userSecret** | [**string**] | | defaults to undefined
393
-
394
-
395
- ### Return type
396
-
397
- **Array<Account>**
398
-
399
- ### HTTP request headers
400
-
401
- - **Content-Type**: Not defined
402
- - **Accept**: application/json
403
-
404
-
405
- ### HTTP response details
406
- | Status code | Description | Response headers |
407
- |-------------|-------------|------------------|
408
- **200** | A list of all Account objects for the authenticated user. | - |
409
- **0** | Unexpected error. | - |
410
-
411
- [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
412
-
413
- # **updateUserAccount**
414
-
415
- #### **PUT** /accounts/{accountId}
416
-
417
-
418
- ### Example
419
-
420
-
421
- ```typescript
422
- import { Snaptrade } from "snaptrade-typescript-sdk";
423
-
424
- const snaptrade = new Snaptrade({
425
- // Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
426
- // basePath: "https://api.snaptrade.com/api/v1",
427
- consumerKey: "YOUR_CONSUMER_KEY",
428
- clientId: "YOUR_CLIENT_ID",
429
- });
430
-
431
- const updateUserAccountResponse =
432
- await snaptrade.accountInformation.updateUserAccount({
433
- userId: "John.doe@snaptrade.com",
434
- userSecret: "USERSECRET123",
435
- accountId: "accountId_example",
436
- });
437
-
438
- console.log(updateUserAccountResponse);
439
- ```
440
-
441
-
442
- ### Parameters
443
-
444
- Name | Type | Description | Notes
445
- ------------- | ------------- | ------------- | -------------
446
- **userId** | [**string**] | | defaults to undefined
447
- **userSecret** | [**string**] | | defaults to undefined
448
- **accountId** | [**string**] | The ID of the account to update. | defaults to undefined
449
-
450
-
451
- ### Return type
452
-
453
- **Array<Account>**
454
-
455
- ### HTTP request headers
456
-
457
- - **Content-Type**: Not defined
458
- - **Accept**: application/json
459
-
460
-
461
- ### HTTP response details
462
- | Status code | Description | Response headers |
463
- |-------------|-------------|------------------|
464
- **200** | Successfully updated details of an investment account | - |
465
- **0** | Unexpected error | - |
466
-
467
- [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
468
-
469
-
@@ -1,64 +0,0 @@
1
- # ApiDisclaimerApi
2
-
3
- All URIs are relative to *https://api.snaptrade.com/api/v1*
4
-
5
- Method | HTTP request | Description
6
- ------------- | ------------- | -------------
7
- [**accept**](ApiDisclaimerApi.md#accept) | **POST** /snapTrade/acceptDisclaimer | Accept or Reject SnapTrade disclaimer agreement
8
-
9
-
10
- # **accept**
11
-
12
- #### **POST** /snapTrade/acceptDisclaimer
13
-
14
-
15
- ### Example
16
-
17
-
18
- ```typescript
19
- import { Snaptrade } from "snaptrade-typescript-sdk";
20
-
21
- const snaptrade = new Snaptrade({
22
- // Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
23
- // basePath: "https://api.snaptrade.com/api/v1",
24
- consumerKey: "YOUR_CONSUMER_KEY",
25
- clientId: "YOUR_CLIENT_ID",
26
- });
27
-
28
- const acceptResponse = await snaptrade.apiDisclaimer.accept({
29
- userId: "John.doe@snaptrade.com",
30
- userSecret: "USERSECRET123",
31
- });
32
-
33
- console.log(acceptResponse);
34
- ```
35
-
36
-
37
- ### Parameters
38
-
39
- Name | Type | Description | Notes
40
- ------------- | ------------- | ------------- | -------------
41
- **aPIDisclaimerAcceptRequest** | **APIDisclaimerAcceptRequest**| |
42
- **userId** | [**string**] | | defaults to undefined
43
- **userSecret** | [**string**] | | defaults to undefined
44
-
45
-
46
- ### Return type
47
-
48
- **SnapTradeAPIDisclaimerAcceptStatus**
49
-
50
- ### HTTP request headers
51
-
52
- - **Content-Type**: application/json
53
- - **Accept**: application/json
54
-
55
-
56
- ### HTTP response details
57
- | Status code | Description | Response headers |
58
- |-------------|-------------|------------------|
59
- **200** | Returns timestamp for when user accepted SnapTrade disclaimer | - |
60
- **500** | Unexpected Error. Please contact support | - |
61
-
62
- [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
63
-
64
-
@@ -1,58 +0,0 @@
1
- # ApiStatusApi
2
-
3
- All URIs are relative to *https://api.snaptrade.com/api/v1*
4
-
5
- Method | HTTP request | Description
6
- ------------- | ------------- | -------------
7
- [**check**](ApiStatusApi.md#check) | **GET** / | Get API Status
8
-
9
-
10
- # **check**
11
-
12
- #### **GET** /
13
-
14
- ### Description
15
- Check whether the API is operational and verify timestamps.
16
-
17
- ### Example
18
-
19
-
20
- ```typescript
21
- import { Snaptrade } from "snaptrade-typescript-sdk";
22
-
23
- const snaptrade = new Snaptrade({
24
- // Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
25
- // basePath: "https://api.snaptrade.com/api/v1",
26
- consumerKey: "YOUR_CONSUMER_KEY",
27
- clientId: "YOUR_CLIENT_ID",
28
- });
29
-
30
- const checkResponse = await snaptrade.apiStatus.check();
31
-
32
- console.log(checkResponse);
33
- ```
34
-
35
-
36
- ### Parameters
37
- This endpoint does not need any parameter.
38
-
39
-
40
- ### Return type
41
-
42
- **Status**
43
-
44
- ### HTTP request headers
45
-
46
- - **Content-Type**: Not defined
47
- - **Accept**: application/json
48
-
49
-
50
- ### HTTP response details
51
- | Status code | Description | Response headers |
52
- |-------------|-------------|------------------|
53
- **200** | API is alive and kicking in some fashion | - |
54
- **0** | Unexpected error. | - |
55
-
56
- [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
57
-
58
-