snaptrade-typescript-sdk 4.0.0 → 6.0.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 (68) hide show
  1. package/.konfig/generate-id.txt +1 -1
  2. package/README.md +2 -2
  3. package/api/account-information-api.ts +136 -120
  4. package/api/api-disclaimer-api.ts +14 -19
  5. package/api/authentication-api.ts +37 -43
  6. package/api/connections-api.ts +46 -40
  7. package/api/error-logs-api.ts +12 -10
  8. package/api/options-api.ts +104 -108
  9. package/api/portfolio-management-api.ts +259 -253
  10. package/api/reference-data-api.ts +49 -53
  11. package/api/trading-api.ts +172 -185
  12. package/api/transactions-and-reporting-api.ts +64 -60
  13. package/client.ts +2 -0
  14. package/common.ts +2 -2
  15. package/configuration.ts +1 -1
  16. package/dist/api/account-information-api.d.ts +112 -112
  17. package/dist/api/api-disclaimer-api.d.ts +10 -16
  18. package/dist/api/api-disclaimer-api.js +1 -1
  19. package/dist/api/authentication-api.d.ts +27 -40
  20. package/dist/api/authentication-api.js +2 -2
  21. package/dist/api/connections-api.d.ts +38 -38
  22. package/dist/api/error-logs-api.d.ts +10 -10
  23. package/dist/api/options-api.d.ts +82 -94
  24. package/dist/api/options-api.js +2 -2
  25. package/dist/api/portfolio-management-api.d.ts +214 -256
  26. package/dist/api/portfolio-management-api.js +7 -7
  27. package/dist/api/reference-data-api.d.ts +37 -50
  28. package/dist/api/reference-data-api.js +2 -2
  29. package/dist/api/trading-api.d.ts +131 -160
  30. package/dist/api/trading-api.js +10 -10
  31. package/dist/api/transactions-and-reporting-api.d.ts +52 -52
  32. package/dist/common.js +2 -2
  33. package/dist/configuration.js +1 -1
  34. package/dist/models/index.d.ts +1 -0
  35. package/dist/models/index.js +1 -0
  36. package/dist/models/target-asset.d.ts +4 -2
  37. package/dist/models/trading-cancel-user-account-order-request.d.ts +24 -0
  38. package/dist/models/trading-cancel-user-account-order-request.js +15 -0
  39. package/dist/pagination/page-types.d.ts +27 -0
  40. package/dist/pagination/page-types.js +13 -0
  41. package/dist/pagination/page.d.ts +6 -1
  42. package/dist/pagination/page.js +3 -0
  43. package/dist/pagination/pageable.d.ts +8 -3
  44. package/dist/pagination/pageable.js +5 -6
  45. package/dist/pagination/paginate.d.ts +2 -2
  46. package/docs/AccountInformationApi.md +72 -88
  47. package/docs/ApiDisclaimerApi.md +8 -12
  48. package/docs/ApiStatusApi.md +6 -7
  49. package/docs/AuthenticationApi.md +41 -55
  50. package/docs/ConnectionsApi.md +26 -32
  51. package/docs/ErrorLogsApi.md +8 -10
  52. package/docs/OptionsApi.md +60 -67
  53. package/docs/PortfolioManagementApi.md +246 -326
  54. package/docs/ReferenceDataApi.md +68 -95
  55. package/docs/TradingApi.md +107 -136
  56. package/docs/TransactionsAndReportingApi.md +26 -28
  57. package/index.test.ts +2 -4
  58. package/models/index.ts +1 -0
  59. package/models/target-asset.ts +2 -2
  60. package/models/trading-cancel-user-account-order-request.ts +29 -0
  61. package/package.json +1 -1
  62. package/pagination/page-types.ts +34 -0
  63. package/pagination/page.ts +9 -1
  64. package/pagination/pageable.ts +16 -10
  65. package/pagination/paginate.ts +3 -2
  66. package/tsconfig.json +1 -0
  67. package/dist/index.test.d.ts +0 -1
  68. package/dist/index.test.js +0 -175
@@ -15,7 +15,8 @@ Method | HTTP request | Description
15
15
 
16
16
 
17
17
  # **getAllUserHoldings**
18
- > Array<AccountHoldings> getAllUserHoldings()
18
+
19
+ #### **GET** /holdings
19
20
 
20
21
 
21
22
  ### Example
@@ -31,12 +32,13 @@ const snaptrade = new Snaptrade({
31
32
  clientId: "YOUR_CLIENT_ID",
32
33
  })
33
34
 
34
- const response = await snaptrade.accountInformation.getAllUserHoldings({
35
- 'userId': "John.doe@snaptrade.com",
36
- 'userSecret': "USERSECRET123",
37
- 'brokerageAuthorizations': "917c8734-8470-4a3e-a18f-57c3f2ee6631",
38
- })
39
- console.log(response)
35
+ const getAllUserHoldingsResponse = await snaptrade.accountInformation.getAllUserHoldings({
36
+ "userId": "John.doe@snaptrade.com",
37
+ "userSecret": "USERSECRET123",
38
+ "brokerageAuthorizations": "917c8734-8470-4a3e-a18f-57c3f2ee6631",
39
+ })
40
+
41
+ console.log(getAllUserHoldingsResponse)
40
42
 
41
43
  ```
42
44
 
@@ -54,10 +56,6 @@ Name | Type | Description | Notes
54
56
 
55
57
  **Array<AccountHoldings>**
56
58
 
57
- ### Authorization
58
-
59
- [PartnerClientId](README.md#PartnerClientId), [PartnerSignature](README.md#PartnerSignature), [PartnerTimestamp](README.md#PartnerTimestamp)
60
-
61
59
  ### HTTP request headers
62
60
 
63
61
  - **Content-Type**: Not defined
@@ -75,7 +73,8 @@ Name | Type | Description | Notes
75
73
  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
76
74
 
77
75
  # **getUserAccountBalance**
78
- > Array<Balance> getUserAccountBalance()
76
+
77
+ #### **GET** /accounts/{accountId}/balances
79
78
 
80
79
 
81
80
  ### Example
@@ -91,12 +90,13 @@ const snaptrade = new Snaptrade({
91
90
  clientId: "YOUR_CLIENT_ID",
92
91
  })
93
92
 
94
- const response = await snaptrade.accountInformation.getUserAccountBalance({
95
- 'userId': "John.doe@snaptrade.com",
96
- 'userSecret': "USERSECRET123",
97
- 'accountId': "accountId_example",
98
- })
99
- console.log(response)
93
+ const getUserAccountBalanceResponse = await snaptrade.accountInformation.getUserAccountBalance({
94
+ "userId": "John.doe@snaptrade.com",
95
+ "userSecret": "USERSECRET123",
96
+ "accountId": "accountId_example",
97
+ })
98
+
99
+ console.log(getUserAccountBalanceResponse)
100
100
 
101
101
  ```
102
102
 
@@ -114,10 +114,6 @@ Name | Type | Description | Notes
114
114
 
115
115
  **Array<Balance>**
116
116
 
117
- ### Authorization
118
-
119
- [PartnerClientId](README.md#PartnerClientId), [PartnerSignature](README.md#PartnerSignature), [PartnerTimestamp](README.md#PartnerTimestamp)
120
-
121
117
  ### HTTP request headers
122
118
 
123
119
  - **Content-Type**: Not defined
@@ -133,7 +129,8 @@ Name | Type | Description | Notes
133
129
  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
134
130
 
135
131
  # **getUserAccountDetails**
136
- > Array<Account> getUserAccountDetails()
132
+
133
+ #### **GET** /accounts/{accountId}
137
134
 
138
135
 
139
136
  ### Example
@@ -149,12 +146,13 @@ const snaptrade = new Snaptrade({
149
146
  clientId: "YOUR_CLIENT_ID",
150
147
  })
151
148
 
152
- const response = await snaptrade.accountInformation.getUserAccountDetails({
153
- 'userId': "John.doe@snaptrade.com",
154
- 'userSecret': "USERSECRET123",
155
- 'accountId': "accountId_example",
156
- })
157
- console.log(response)
149
+ const getUserAccountDetailsResponse = await snaptrade.accountInformation.getUserAccountDetails({
150
+ "userId": "John.doe@snaptrade.com",
151
+ "userSecret": "USERSECRET123",
152
+ "accountId": "accountId_example",
153
+ })
154
+
155
+ console.log(getUserAccountDetailsResponse)
158
156
 
159
157
  ```
160
158
 
@@ -172,10 +170,6 @@ Name | Type | Description | Notes
172
170
 
173
171
  **Array<Account>**
174
172
 
175
- ### Authorization
176
-
177
- [PartnerClientId](README.md#PartnerClientId), [PartnerSignature](README.md#PartnerSignature), [PartnerTimestamp](README.md#PartnerTimestamp)
178
-
179
173
  ### HTTP request headers
180
174
 
181
175
  - **Content-Type**: Not defined
@@ -191,7 +185,8 @@ Name | Type | Description | Notes
191
185
  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
192
186
 
193
187
  # **getUserAccountOrders**
194
- > Array<AccountOrderRecord> getUserAccountOrders()
188
+
189
+ #### **GET** /accounts/{accountId}/orders
195
190
 
196
191
 
197
192
  ### Example
@@ -207,13 +202,14 @@ const snaptrade = new Snaptrade({
207
202
  clientId: "YOUR_CLIENT_ID",
208
203
  })
209
204
 
210
- const response = await snaptrade.accountInformation.getUserAccountOrders({
211
- 'userId': "John.doe@snaptrade.com",
212
- 'userSecret': "USERSECRET123",
213
- 'accountId': "accountId_example",
214
- 'state': "all",
215
- })
216
- console.log(response)
205
+ const getUserAccountOrdersResponse = await snaptrade.accountInformation.getUserAccountOrders({
206
+ "userId": "John.doe@snaptrade.com",
207
+ "userSecret": "USERSECRET123",
208
+ "state": "all",
209
+ "accountId": "accountId_example",
210
+ })
211
+
212
+ console.log(getUserAccountOrdersResponse)
217
213
 
218
214
  ```
219
215
 
@@ -232,10 +228,6 @@ Name | Type | Description | Notes
232
228
 
233
229
  **Array<AccountOrderRecord>**
234
230
 
235
- ### Authorization
236
-
237
- [PartnerClientId](README.md#PartnerClientId), [PartnerSignature](README.md#PartnerSignature), [PartnerTimestamp](README.md#PartnerTimestamp)
238
-
239
231
  ### HTTP request headers
240
232
 
241
233
  - **Content-Type**: Not defined
@@ -251,7 +243,8 @@ Name | Type | Description | Notes
251
243
  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
252
244
 
253
245
  # **getUserAccountPositions**
254
- > Array<Position> getUserAccountPositions()
246
+
247
+ #### **GET** /accounts/{accountId}/positions
255
248
 
256
249
 
257
250
  ### Example
@@ -267,12 +260,13 @@ const snaptrade = new Snaptrade({
267
260
  clientId: "YOUR_CLIENT_ID",
268
261
  })
269
262
 
270
- const response = await snaptrade.accountInformation.getUserAccountPositions({
271
- 'userId': "John.doe@snaptrade.com",
272
- 'userSecret': "USERSECRET123",
273
- 'accountId': "accountId_example",
274
- })
275
- console.log(response)
263
+ const getUserAccountPositionsResponse = await snaptrade.accountInformation.getUserAccountPositions({
264
+ "userId": "John.doe@snaptrade.com",
265
+ "userSecret": "USERSECRET123",
266
+ "accountId": "accountId_example",
267
+ })
268
+
269
+ console.log(getUserAccountPositionsResponse)
276
270
 
277
271
  ```
278
272
 
@@ -290,10 +284,6 @@ Name | Type | Description | Notes
290
284
 
291
285
  **Array<Position>**
292
286
 
293
- ### Authorization
294
-
295
- [PartnerClientId](README.md#PartnerClientId), [PartnerSignature](README.md#PartnerSignature), [PartnerTimestamp](README.md#PartnerTimestamp)
296
-
297
287
  ### HTTP request headers
298
288
 
299
289
  - **Content-Type**: Not defined
@@ -309,7 +299,8 @@ Name | Type | Description | Notes
309
299
  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
310
300
 
311
301
  # **getUserHoldings**
312
- > AccountHoldings getUserHoldings()
302
+
303
+ #### **GET** /accounts/{accountId}/holdings
313
304
 
314
305
 
315
306
  ### Example
@@ -325,12 +316,13 @@ const snaptrade = new Snaptrade({
325
316
  clientId: "YOUR_CLIENT_ID",
326
317
  })
327
318
 
328
- const response = await snaptrade.accountInformation.getUserHoldings({
329
- 'accountId': "917c8734-8470-4a3e-a18f-57c3f2ee6631",
330
- 'userId': "John.doe@snaptrade.com",
331
- 'userSecret': "USERSECRET123",
332
- })
333
- console.log(response)
319
+ const getUserHoldingsResponse = await snaptrade.accountInformation.getUserHoldings({
320
+ "accountId": "917c8734-8470-4a3e-a18f-57c3f2ee6631",
321
+ "userId": "John.doe@snaptrade.com",
322
+ "userSecret": "USERSECRET123",
323
+ })
324
+
325
+ console.log(getUserHoldingsResponse)
334
326
 
335
327
  ```
336
328
 
@@ -348,10 +340,6 @@ Name | Type | Description | Notes
348
340
 
349
341
  **AccountHoldings**
350
342
 
351
- ### Authorization
352
-
353
- [PartnerClientId](README.md#PartnerClientId), [PartnerSignature](README.md#PartnerSignature), [PartnerTimestamp](README.md#PartnerTimestamp)
354
-
355
343
  ### HTTP request headers
356
344
 
357
345
  - **Content-Type**: Not defined
@@ -369,7 +357,8 @@ Name | Type | Description | Notes
369
357
  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
370
358
 
371
359
  # **listUserAccounts**
372
- > Array<Account> listUserAccounts()
360
+
361
+ #### **GET** /accounts
373
362
 
374
363
 
375
364
  ### Example
@@ -385,11 +374,12 @@ const snaptrade = new Snaptrade({
385
374
  clientId: "YOUR_CLIENT_ID",
386
375
  })
387
376
 
388
- const response = await snaptrade.accountInformation.listUserAccounts({
389
- 'userId': "John.doe@snaptrade.com",
390
- 'userSecret': "USERSECRET123",
391
- })
392
- console.log(response)
377
+ const listUserAccountsResponse = await snaptrade.accountInformation.listUserAccounts({
378
+ "userId": "John.doe@snaptrade.com",
379
+ "userSecret": "USERSECRET123",
380
+ })
381
+
382
+ console.log(listUserAccountsResponse)
393
383
 
394
384
  ```
395
385
 
@@ -406,10 +396,6 @@ Name | Type | Description | Notes
406
396
 
407
397
  **Array<Account>**
408
398
 
409
- ### Authorization
410
-
411
- [PartnerClientId](README.md#PartnerClientId), [PartnerSignature](README.md#PartnerSignature), [PartnerTimestamp](README.md#PartnerTimestamp)
412
-
413
399
  ### HTTP request headers
414
400
 
415
401
  - **Content-Type**: Not defined
@@ -425,7 +411,8 @@ Name | Type | Description | Notes
425
411
  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
426
412
 
427
413
  # **updateUserAccount**
428
- > Array<Account> updateUserAccount()
414
+
415
+ #### **PUT** /accounts/{accountId}
429
416
 
430
417
 
431
418
  ### Example
@@ -441,12 +428,13 @@ const snaptrade = new Snaptrade({
441
428
  clientId: "YOUR_CLIENT_ID",
442
429
  })
443
430
 
444
- const response = await snaptrade.accountInformation.updateUserAccount({
445
- 'userId': "John.doe@snaptrade.com",
446
- 'userSecret': "USERSECRET123",
447
- 'accountId': "accountId_example",
448
- })
449
- console.log(response)
431
+ const updateUserAccountResponse = await snaptrade.accountInformation.updateUserAccount({
432
+ "userId": "John.doe@snaptrade.com",
433
+ "userSecret": "USERSECRET123",
434
+ "accountId": "accountId_example",
435
+ })
436
+
437
+ console.log(updateUserAccountResponse)
450
438
 
451
439
  ```
452
440
 
@@ -464,10 +452,6 @@ Name | Type | Description | Notes
464
452
 
465
453
  **Array<Account>**
466
454
 
467
- ### Authorization
468
-
469
- [PartnerClientId](README.md#PartnerClientId), [PartnerSignature](README.md#PartnerSignature), [PartnerTimestamp](README.md#PartnerTimestamp)
470
-
471
455
  ### HTTP request headers
472
456
 
473
457
  - **Content-Type**: Not defined
@@ -8,7 +8,8 @@ Method | HTTP request | Description
8
8
 
9
9
 
10
10
  # **accept**
11
- > SnapTradeAPIDisclaimerAcceptStatus accept(aPIDisclaimerAcceptRequest)
11
+
12
+ #### **POST** /snapTrade/acceptDisclaimer
12
13
 
13
14
 
14
15
  ### Example
@@ -24,13 +25,12 @@ const snaptrade = new Snaptrade({
24
25
  clientId: "YOUR_CLIENT_ID",
25
26
  })
26
27
 
27
- const response = await snaptrade.apiDisclaimer.accept({
28
- 'userId': "John.doe@snaptrade.com",
29
- 'userSecret': "USERSECRET123",
30
- 'requestBody': {
31
- },
32
- })
33
- console.log(response)
28
+ const acceptResponse = await snaptrade.apiDisclaimer.accept({
29
+ "userId": "John.doe@snaptrade.com",
30
+ "userSecret": "USERSECRET123",
31
+ })
32
+
33
+ console.log(acceptResponse)
34
34
 
35
35
  ```
36
36
 
@@ -48,10 +48,6 @@ Name | Type | Description | Notes
48
48
 
49
49
  **SnapTradeAPIDisclaimerAcceptStatus**
50
50
 
51
- ### Authorization
52
-
53
- [PartnerClientId](README.md#PartnerClientId), [PartnerSignature](README.md#PartnerSignature), [PartnerTimestamp](README.md#PartnerTimestamp)
54
-
55
51
  ### HTTP request headers
56
52
 
57
53
  - **Content-Type**: application/json
@@ -8,8 +8,10 @@ Method | HTTP request | Description
8
8
 
9
9
 
10
10
  # **check**
11
- > Status check()
12
11
 
12
+ #### **GET** /
13
+
14
+ ### Description
13
15
  Check whether the API is operational and verify timestamps.
14
16
 
15
17
  ### Example
@@ -25,8 +27,9 @@ const snaptrade = new Snaptrade({
25
27
  clientId: "YOUR_CLIENT_ID",
26
28
  })
27
29
 
28
- const response = await snaptrade.apiStatus.check()
29
- console.log(response)
30
+ const checkResponse = await snaptrade.apiStatus.check()
31
+
32
+ console.log(checkResponse)
30
33
 
31
34
  ```
32
35
 
@@ -39,10 +42,6 @@ This endpoint does not need any parameter.
39
42
 
40
43
  **Status**
41
44
 
42
- ### Authorization
43
-
44
- No authorization required
45
-
46
45
  ### HTTP request headers
47
46
 
48
47
  - **Content-Type**: Not defined
@@ -12,7 +12,8 @@ Method | HTTP request | Description
12
12
 
13
13
 
14
14
  # **deleteSnapTradeUser**
15
- > DeleteUserResponse deleteSnapTradeUser()
15
+
16
+ #### **DELETE** /snapTrade/deleteUser
16
17
 
17
18
 
18
19
  ### Example
@@ -28,10 +29,11 @@ const snaptrade = new Snaptrade({
28
29
  clientId: "YOUR_CLIENT_ID",
29
30
  })
30
31
 
31
- const response = await snaptrade.authentication.deleteSnapTradeUser({
32
- 'userId': "John.doe@snaptrade.com",
33
- })
34
- console.log(response)
32
+ const deleteSnapTradeUserResponse = await snaptrade.authentication.deleteSnapTradeUser({
33
+ "userId": "John.doe@snaptrade.com",
34
+ })
35
+
36
+ console.log(deleteSnapTradeUserResponse)
35
37
 
36
38
  ```
37
39
 
@@ -47,10 +49,6 @@ Name | Type | Description | Notes
47
49
 
48
50
  **DeleteUserResponse**
49
51
 
50
- ### Authorization
51
-
52
- [PartnerClientId](README.md#PartnerClientId), [PartnerSignature](README.md#PartnerSignature), [PartnerTimestamp](README.md#PartnerTimestamp)
53
-
54
52
  ### HTTP request headers
55
53
 
56
54
  - **Content-Type**: Not defined
@@ -69,7 +67,8 @@ Name | Type | Description | Notes
69
67
  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
70
68
 
71
69
  # **getUserJWT**
72
- > EncryptedResponse getUserJWT()
70
+
71
+ #### **GET** /snapTrade/encryptedJWT
73
72
 
74
73
 
75
74
  ### Example
@@ -85,11 +84,12 @@ const snaptrade = new Snaptrade({
85
84
  clientId: "YOUR_CLIENT_ID",
86
85
  })
87
86
 
88
- const response = await snaptrade.authentication.getUserJWT({
89
- 'userId': "John.doe@snaptrade.com",
90
- 'userSecret': "USERSECRET123",
91
- })
92
- console.log(response)
87
+ const getUserJWTResponse = await snaptrade.authentication.getUserJWT({
88
+ "userId": "John.doe@snaptrade.com",
89
+ "userSecret": "USERSECRET123",
90
+ })
91
+
92
+ console.log(getUserJWTResponse)
93
93
 
94
94
  ```
95
95
 
@@ -106,10 +106,6 @@ Name | Type | Description | Notes
106
106
 
107
107
  **EncryptedResponse**
108
108
 
109
- ### Authorization
110
-
111
- [PartnerClientId](README.md#PartnerClientId), [PartnerSignature](README.md#PartnerSignature), [PartnerTimestamp](README.md#PartnerTimestamp)
112
-
113
109
  ### HTTP request headers
114
110
 
115
111
  - **Content-Type**: Not defined
@@ -128,7 +124,8 @@ Name | Type | Description | Notes
128
124
  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
129
125
 
130
126
  # **listSnapTradeUsers**
131
- > Array<string> listSnapTradeUsers()
127
+
128
+ #### **GET** /snapTrade/listUsers
132
129
 
133
130
 
134
131
  ### Example
@@ -144,8 +141,9 @@ const snaptrade = new Snaptrade({
144
141
  clientId: "YOUR_CLIENT_ID",
145
142
  })
146
143
 
147
- const response = await snaptrade.authentication.listSnapTradeUsers()
148
- console.log(response)
144
+ const listSnapTradeUsersResponse = await snaptrade.authentication.listSnapTradeUsers()
145
+
146
+ console.log(listSnapTradeUsersResponse)
149
147
 
150
148
  ```
151
149
 
@@ -158,10 +156,6 @@ This endpoint does not need any parameter.
158
156
 
159
157
  **Array<string>**
160
158
 
161
- ### Authorization
162
-
163
- [PartnerClientId](README.md#PartnerClientId), [PartnerSignature](README.md#PartnerSignature), [PartnerTimestamp](README.md#PartnerTimestamp)
164
-
165
159
  ### HTTP request headers
166
160
 
167
161
  - **Content-Type**: Not defined
@@ -179,7 +173,8 @@ This endpoint does not need any parameter.
179
173
  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
180
174
 
181
175
  # **loginSnapTradeUser**
182
- > AuthenticationLoginSnapTradeUser200Response loginSnapTradeUser()
176
+
177
+ #### **POST** /snapTrade/login
183
178
 
184
179
 
185
180
  ### Example
@@ -195,18 +190,17 @@ const snaptrade = new Snaptrade({
195
190
  clientId: "YOUR_CLIENT_ID",
196
191
  })
197
192
 
198
- const response = await snaptrade.authentication.loginSnapTradeUser({
199
- 'userId': "John.doe@snaptrade.com",
200
- 'userSecret': "USERSECRET123",
201
- 'requestBody': {
202
- 'broker': "ALPACA",
203
- 'immediate_redirect': true,
204
- 'custom_redirect': "https://passiv.com",
205
- 'reconnect': "8b5f262d-4bb9-365d-888a-202bd3b15fa1",
206
- 'connection_type': "read",
207
- },
208
- })
209
- console.log(response)
193
+ const loginSnapTradeUserResponse = await snaptrade.authentication.loginSnapTradeUser({
194
+ "userId": "John.doe@snaptrade.com",
195
+ "userSecret": "USERSECRET123",
196
+ "broker": "ALPACA",
197
+ "immediate_redirect": true,
198
+ "custom_redirect": "https://passiv.com",
199
+ "reconnect": "8b5f262d-4bb9-365d-888a-202bd3b15fa1",
200
+ "connection_type": "read",
201
+ })
202
+
203
+ console.log(loginSnapTradeUserResponse)
210
204
 
211
205
  ```
212
206
 
@@ -224,10 +218,6 @@ Name | Type | Description | Notes
224
218
 
225
219
  **AuthenticationLoginSnapTradeUser200Response**
226
220
 
227
- ### Authorization
228
-
229
- [PartnerClientId](README.md#PartnerClientId), [PartnerSignature](README.md#PartnerSignature), [PartnerTimestamp](README.md#PartnerTimestamp)
230
-
231
221
  ### HTTP request headers
232
222
 
233
223
  - **Content-Type**: application/json
@@ -246,7 +236,8 @@ Name | Type | Description | Notes
246
236
  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
247
237
 
248
238
  # **registerSnapTradeUser**
249
- > UserIDandSecret registerSnapTradeUser(snapTradeRegisterUserRequestBody)
239
+
240
+ #### **POST** /snapTrade/registerUser
250
241
 
251
242
 
252
243
  ### Example
@@ -262,13 +253,12 @@ const snaptrade = new Snaptrade({
262
253
  clientId: "YOUR_CLIENT_ID",
263
254
  })
264
255
 
265
- const response = await snaptrade.authentication.registerSnapTradeUser({
266
- 'requestBody': {
267
- 'user_id': "snaptrade-user-123",
268
- 'rsa_public_key': "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQC7vbqajDw4o6gJy8UtmIbkcpnkO3Kwc4qsEnSZp/TR+fQi62F79RHWmwKOtFmwteURgLbj7D/WGuNLGOfa/2vse3G2eHnHl5CB8ruRX9fBl/KgwCVr2JaEuUm66bBQeP5XeBotdR4cvX38uPYivCDdPjJ1QWPdspTBKcxeFbccDw==",
269
- },
270
- })
271
- console.log(response)
256
+ const registerSnapTradeUserResponse = await snaptrade.authentication.registerSnapTradeUser({
257
+ "user_id": "snaptrade-user-123",
258
+ "rsa_public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQC7vbqajDw4o6gJy8UtmIbkcpnkO3Kwc4qsEnSZp/TR+fQi62F79RHWmwKOtFmwteURgLbj7D/WGuNLGOfa/2vse3G2eHnHl5CB8ruRX9fBl/KgwCVr2JaEuUm66bBQeP5XeBotdR4cvX38uPYivCDdPjJ1QWPdspTBKcxeFbccDw==",
259
+ })
260
+
261
+ console.log(registerSnapTradeUserResponse)
272
262
 
273
263
  ```
274
264
 
@@ -284,10 +274,6 @@ Name | Type | Description | Notes
284
274
 
285
275
  **UserIDandSecret**
286
276
 
287
- ### Authorization
288
-
289
- [PartnerClientId](README.md#PartnerClientId), [PartnerSignature](README.md#PartnerSignature), [PartnerTimestamp](README.md#PartnerTimestamp)
290
-
291
277
  ### HTTP request headers
292
278
 
293
279
  - **Content-Type**: application/json