snaptrade-typescript-sdk 5.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 (52) 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/configuration.ts +1 -1
  15. package/dist/api/account-information-api.d.ts +112 -112
  16. package/dist/api/api-disclaimer-api.d.ts +10 -16
  17. package/dist/api/api-disclaimer-api.js +1 -1
  18. package/dist/api/authentication-api.d.ts +27 -40
  19. package/dist/api/authentication-api.js +2 -2
  20. package/dist/api/connections-api.d.ts +38 -38
  21. package/dist/api/error-logs-api.d.ts +10 -10
  22. package/dist/api/options-api.d.ts +82 -94
  23. package/dist/api/options-api.js +2 -2
  24. package/dist/api/portfolio-management-api.d.ts +214 -256
  25. package/dist/api/portfolio-management-api.js +7 -7
  26. package/dist/api/reference-data-api.d.ts +37 -50
  27. package/dist/api/reference-data-api.js +2 -2
  28. package/dist/api/trading-api.d.ts +131 -160
  29. package/dist/api/trading-api.js +10 -10
  30. package/dist/api/transactions-and-reporting-api.d.ts +52 -52
  31. package/dist/configuration.js +1 -1
  32. package/dist/models/index.d.ts +1 -0
  33. package/dist/models/index.js +1 -0
  34. package/dist/models/target-asset.d.ts +4 -2
  35. package/dist/models/trading-cancel-user-account-order-request.d.ts +24 -0
  36. package/dist/models/trading-cancel-user-account-order-request.js +15 -0
  37. package/docs/AccountInformationApi.md +72 -88
  38. package/docs/ApiDisclaimerApi.md +8 -12
  39. package/docs/ApiStatusApi.md +6 -7
  40. package/docs/AuthenticationApi.md +34 -48
  41. package/docs/ConnectionsApi.md +26 -32
  42. package/docs/ErrorLogsApi.md +8 -10
  43. package/docs/OptionsApi.md +55 -62
  44. package/docs/PortfolioManagementApi.md +229 -309
  45. package/docs/ReferenceDataApi.md +66 -93
  46. package/docs/TradingApi.md +88 -117
  47. package/docs/TransactionsAndReportingApi.md +26 -28
  48. package/index.test.ts +2 -4
  49. package/models/index.ts +1 -0
  50. package/models/target-asset.ts +2 -2
  51. package/models/trading-cancel-user-account-order-request.ts +29 -0
  52. package/package.json +1 -1
@@ -17,7 +17,8 @@ Method | HTTP request | Description
17
17
 
18
18
 
19
19
  # **cancelUserAccountOrder**
20
- > AccountOrderRecord cancelUserAccountOrder(body)
20
+
21
+ #### **POST** /accounts/{accountId}/orders/cancel
21
22
 
22
23
 
23
24
  ### Example
@@ -33,13 +34,14 @@ const snaptrade = new Snaptrade({
33
34
  clientId: "YOUR_CLIENT_ID",
34
35
  })
35
36
 
36
- const response = await snaptrade.trading.cancelUserAccountOrder({
37
- 'userId': "John.doe@snaptrade.com",
38
- 'userSecret': "USERSECRET123",
39
- 'accountId': "accountId_example",
40
- 'requestBody': "2bcd7cc3-e922-4976-bce1-9858296801c3",
41
- })
42
- console.log(response)
37
+ const cancelUserAccountOrderResponse = await snaptrade.trading.cancelUserAccountOrder({
38
+ "userId": "John.doe@snaptrade.com",
39
+ "userSecret": "USERSECRET123",
40
+ "accountId": "accountId_example",
41
+ "brokerage_order_id": "2bcd7cc3-e922-4976-bce1-9858296801c3",
42
+ })
43
+
44
+ console.log(cancelUserAccountOrderResponse)
43
45
 
44
46
  ```
45
47
 
@@ -48,7 +50,7 @@ console.log(response)
48
50
 
49
51
  Name | Type | Description | Notes
50
52
  ------------- | ------------- | ------------- | -------------
51
- **body** | **string**| |
53
+ **tradingCancelUserAccountOrderRequest** | **TradingCancelUserAccountOrderRequest**| The Order ID to be canceled |
52
54
  **userId** | [**string**] | | defaults to undefined
53
55
  **userSecret** | [**string**] | | defaults to undefined
54
56
  **accountId** | [**string**] | The ID of the account get positions. | defaults to undefined
@@ -58,10 +60,6 @@ Name | Type | Description | Notes
58
60
 
59
61
  **AccountOrderRecord**
60
62
 
61
- ### Authorization
62
-
63
- [PartnerClientId](README.md#PartnerClientId), [PartnerSignature](README.md#PartnerSignature), [PartnerTimestamp](README.md#PartnerTimestamp)
64
-
65
63
  ### HTTP request headers
66
64
 
67
65
  - **Content-Type**: application/json
@@ -78,7 +76,8 @@ Name | Type | Description | Notes
78
76
  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
79
77
 
80
78
  # **getCalculatedTradeImpactById**
81
- > Trade getCalculatedTradeImpactById()
79
+
80
+ #### **GET** /portfolioGroups/{portfolioGroupId}/calculatedtrades/{calculatedTradeId}/modify/{tradeId}
82
81
 
83
82
 
84
83
  ### Example
@@ -94,12 +93,13 @@ const snaptrade = new Snaptrade({
94
93
  clientId: "YOUR_CLIENT_ID",
95
94
  })
96
95
 
97
- const response = await snaptrade.trading.getCalculatedTradeImpactById({
98
- 'portfolioGroupId': "portfolioGroupId_example",
99
- 'calculatedTradeId': "calculatedTradeId_example",
100
- 'tradeId': "tradeId_example",
101
- })
102
- console.log(response)
96
+ const getCalculatedTradeImpactByIdResponse = await snaptrade.trading.getCalculatedTradeImpactById({
97
+ "portfolioGroupId": "portfolioGroupId_example",
98
+ "calculatedTradeId": "calculatedTradeId_example",
99
+ "tradeId": "tradeId_example",
100
+ })
101
+
102
+ console.log(getCalculatedTradeImpactByIdResponse)
103
103
 
104
104
  ```
105
105
 
@@ -117,10 +117,6 @@ Name | Type | Description | Notes
117
117
 
118
118
  **Trade**
119
119
 
120
- ### Authorization
121
-
122
- [PartnerClientId](README.md#PartnerClientId), [PartnerSignature](README.md#PartnerSignature), [PartnerTimestamp](README.md#PartnerTimestamp)
123
-
124
120
  ### HTTP request headers
125
121
 
126
122
  - **Content-Type**: Not defined
@@ -135,7 +131,8 @@ Name | Type | Description | Notes
135
131
  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
136
132
 
137
133
  # **getCalculatedTradesImpact**
138
- > Array<TradeImpact> getCalculatedTradesImpact()
134
+
135
+ #### **GET** /portfolioGroups/{portfolioGroupId}/calculatedtrades/{calculatedTradeId}/impact
139
136
 
140
137
 
141
138
  ### Example
@@ -151,11 +148,12 @@ const snaptrade = new Snaptrade({
151
148
  clientId: "YOUR_CLIENT_ID",
152
149
  })
153
150
 
154
- const response = await snaptrade.trading.getCalculatedTradesImpact({
155
- 'portfolioGroupId': "portfolioGroupId_example",
156
- 'calculatedTradeId': "calculatedTradeId_example",
157
- })
158
- console.log(response)
151
+ const getCalculatedTradesImpactResponse = await snaptrade.trading.getCalculatedTradesImpact({
152
+ "portfolioGroupId": "portfolioGroupId_example",
153
+ "calculatedTradeId": "calculatedTradeId_example",
154
+ })
155
+
156
+ console.log(getCalculatedTradesImpactResponse)
159
157
 
160
158
  ```
161
159
 
@@ -172,10 +170,6 @@ Name | Type | Description | Notes
172
170
 
173
171
  **Array<TradeImpact>**
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
@@ -190,7 +184,8 @@ Name | Type | Description | Notes
190
184
  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
191
185
 
192
186
  # **getOrderImpact**
193
- > ManualTradeAndImpact getOrderImpact(manualTradeForm)
187
+
188
+ #### **POST** /trade/impact
194
189
 
195
190
 
196
191
  ### Example
@@ -206,10 +201,9 @@ const snaptrade = new Snaptrade({
206
201
  clientId: "YOUR_CLIENT_ID",
207
202
  })
208
203
 
209
- const response = await snaptrade.trading.getOrderImpact({
210
- 'userId': "John.doe@snaptrade.com",
211
- 'userSecret': "USERSECRET123",
212
- 'requestBody': {
204
+ const getOrderImpactResponse = await snaptrade.trading.getOrderImpact({
205
+ "userId": "John.doe@snaptrade.com",
206
+ "userSecret": "USERSECRET123",
213
207
  "account_id": "2bcd7cc3-e922-4976-bce1-9858296801c3",
214
208
  "action": "BUY",
215
209
  "order_type": "Limit",
@@ -217,9 +211,9 @@ const response = await snaptrade.trading.getOrderImpact({
217
211
  "stop": 31.33,
218
212
  "time_in_force": "Day",
219
213
  "universal_symbol_id": "2bcd7cc3-e922-4976-bce1-9858296801c3",
220
- },
221
- })
222
- console.log(response)
214
+ })
215
+
216
+ console.log(getOrderImpactResponse)
223
217
 
224
218
  ```
225
219
 
@@ -237,10 +231,6 @@ Name | Type | Description | Notes
237
231
 
238
232
  **ManualTradeAndImpact**
239
233
 
240
- ### Authorization
241
-
242
- [PartnerClientId](README.md#PartnerClientId), [PartnerSignature](README.md#PartnerSignature), [PartnerTimestamp](README.md#PartnerTimestamp)
243
-
244
234
  ### HTTP request headers
245
235
 
246
236
  - **Content-Type**: application/json
@@ -258,7 +248,8 @@ Name | Type | Description | Notes
258
248
  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
259
249
 
260
250
  # **getUserAccountQuotes**
261
- > SymbolsQuotes getUserAccountQuotes()
251
+
252
+ #### **GET** /accounts/{accountId}/quotes
262
253
 
263
254
 
264
255
  ### Example
@@ -274,14 +265,14 @@ const snaptrade = new Snaptrade({
274
265
  clientId: "YOUR_CLIENT_ID",
275
266
  })
276
267
 
277
- const response = await snaptrade.trading.getUserAccountQuotes({
278
- 'userId': "John.doe@snaptrade.com",
279
- 'userSecret': "USERSECRET123",
280
- 'symbols': "symbols_example",
281
- 'accountId': "accountId_example",
282
- 'useTicker': true,
283
- })
284
- console.log(response)
268
+ const getUserAccountQuotesResponse = await snaptrade.trading.getUserAccountQuotes({
269
+ "userId": "John.doe@snaptrade.com",
270
+ "userSecret": "USERSECRET123",
271
+ "symbols": "symbols_example",
272
+ "accountId": "accountId_example",
273
+ })
274
+
275
+ console.log(getUserAccountQuotesResponse)
285
276
 
286
277
  ```
287
278
 
@@ -301,10 +292,6 @@ Name | Type | Description | Notes
301
292
 
302
293
  **SymbolsQuotes**
303
294
 
304
- ### Authorization
305
-
306
- [PartnerClientId](README.md#PartnerClientId), [PartnerSignature](README.md#PartnerSignature), [PartnerTimestamp](README.md#PartnerTimestamp)
307
-
308
295
  ### HTTP request headers
309
296
 
310
297
  - **Content-Type**: Not defined
@@ -320,7 +307,8 @@ Name | Type | Description | Notes
320
307
  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
321
308
 
322
309
  # **modifyCalculatedTradeById**
323
- > Trade modifyCalculatedTradeById()
310
+
311
+ #### **PATCH** /portfolioGroups/{portfolioGroupId}/calculatedtrades/{calculatedTradeId}/modify/{tradeId}
324
312
 
325
313
 
326
314
  ### Example
@@ -336,19 +324,18 @@ const snaptrade = new Snaptrade({
336
324
  clientId: "YOUR_CLIENT_ID",
337
325
  })
338
326
 
339
- const response = await snaptrade.trading.modifyCalculatedTradeById({
340
- 'portfolioGroupId': "portfolioGroupId_example",
341
- 'calculatedTradeId': "calculatedTradeId_example",
342
- 'tradeId': "tradeId_example",
343
- 'requestBody': {
327
+ const modifyCalculatedTradeByIdResponse = await snaptrade.trading.modifyCalculatedTradeById({
328
+ "portfolioGroupId": "portfolioGroupId_example",
329
+ "calculatedTradeId": "calculatedTradeId_example",
330
+ "tradeId": "tradeId_example",
344
331
  "id": "2bcd7cc3-e922-4976-bce1-9858296801c3",
345
332
  "action": "BUY",
346
333
  "units": 6,
347
334
  "price": 24.81,
348
335
  "sequence": 1,
349
- },
350
- })
351
- console.log(response)
336
+ })
337
+
338
+ console.log(modifyCalculatedTradeByIdResponse)
352
339
 
353
340
  ```
354
341
 
@@ -367,10 +354,6 @@ Name | Type | Description | Notes
367
354
 
368
355
  **Trade**
369
356
 
370
- ### Authorization
371
-
372
- [PartnerClientId](README.md#PartnerClientId), [PartnerSignature](README.md#PartnerSignature), [PartnerTimestamp](README.md#PartnerTimestamp)
373
-
374
357
  ### HTTP request headers
375
358
 
376
359
  - **Content-Type**: application/json
@@ -385,7 +368,8 @@ Name | Type | Description | Notes
385
368
  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
386
369
 
387
370
  # **placeCalculatedTrades**
388
- > Array<TradeExecutionStatus> placeCalculatedTrades()
371
+
372
+ #### **POST** /portfolioGroups/{portfolioGroupId}/calculatedtrades/{calculatedTradeId}/placeOrders
389
373
 
390
374
 
391
375
  ### Example
@@ -401,11 +385,12 @@ const snaptrade = new Snaptrade({
401
385
  clientId: "YOUR_CLIENT_ID",
402
386
  })
403
387
 
404
- const response = await snaptrade.trading.placeCalculatedTrades({
405
- 'portfolioGroupId': "portfolioGroupId_example",
406
- 'calculatedTradeId': "calculatedTradeId_example",
407
- })
408
- console.log(response)
388
+ const placeCalculatedTradesResponse = await snaptrade.trading.placeCalculatedTrades({
389
+ "portfolioGroupId": "portfolioGroupId_example",
390
+ "calculatedTradeId": "calculatedTradeId_example",
391
+ })
392
+
393
+ console.log(placeCalculatedTradesResponse)
409
394
 
410
395
  ```
411
396
 
@@ -422,10 +407,6 @@ Name | Type | Description | Notes
422
407
 
423
408
  **Array<TradeExecutionStatus>**
424
409
 
425
- ### Authorization
426
-
427
- [PartnerClientId](README.md#PartnerClientId), [PartnerSignature](README.md#PartnerSignature), [PartnerTimestamp](README.md#PartnerTimestamp)
428
-
429
410
  ### HTTP request headers
430
411
 
431
412
  - **Content-Type**: Not defined
@@ -440,7 +421,8 @@ Name | Type | Description | Notes
440
421
  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
441
422
 
442
423
  # **placeForceOrder**
443
- > AccountOrderRecord placeForceOrder(manualTradeForm)
424
+
425
+ #### **POST** /trade/place
444
426
 
445
427
 
446
428
  ### Example
@@ -456,10 +438,9 @@ const snaptrade = new Snaptrade({
456
438
  clientId: "YOUR_CLIENT_ID",
457
439
  })
458
440
 
459
- const response = await snaptrade.trading.placeForceOrder({
460
- 'userId': "John.doe@snaptrade.com",
461
- 'userSecret': "USERSECRET123",
462
- 'requestBody': {
441
+ const placeForceOrderResponse = await snaptrade.trading.placeForceOrder({
442
+ "userId": "John.doe@snaptrade.com",
443
+ "userSecret": "USERSECRET123",
463
444
  "account_id": "2bcd7cc3-e922-4976-bce1-9858296801c3",
464
445
  "action": "BUY",
465
446
  "order_type": "Limit",
@@ -467,9 +448,9 @@ const response = await snaptrade.trading.placeForceOrder({
467
448
  "stop": 31.33,
468
449
  "time_in_force": "Day",
469
450
  "universal_symbol_id": "2bcd7cc3-e922-4976-bce1-9858296801c3",
470
- },
471
- })
472
- console.log(response)
451
+ })
452
+
453
+ console.log(placeForceOrderResponse)
473
454
 
474
455
  ```
475
456
 
@@ -487,10 +468,6 @@ Name | Type | Description | Notes
487
468
 
488
469
  **AccountOrderRecord**
489
470
 
490
- ### Authorization
491
-
492
- [PartnerClientId](README.md#PartnerClientId), [PartnerSignature](README.md#PartnerSignature), [PartnerTimestamp](README.md#PartnerTimestamp)
493
-
494
471
  ### HTTP request headers
495
472
 
496
473
  - **Content-Type**: application/json
@@ -508,7 +485,8 @@ Name | Type | Description | Notes
508
485
  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
509
486
 
510
487
  # **placeOCOOrder**
511
- > AccountOrderRecord placeOCOOrder(tradingPlaceOCOOrderRequest)
488
+
489
+ #### **POST** /trade/oco
512
490
 
513
491
 
514
492
  ### Example
@@ -524,13 +502,12 @@ const snaptrade = new Snaptrade({
524
502
  clientId: "YOUR_CLIENT_ID",
525
503
  })
526
504
 
527
- const response = await snaptrade.trading.placeOCOOrder({
528
- 'userId': "John.doe@snaptrade.com",
529
- 'userSecret': "USERSECRET123",
530
- 'requestBody': {
531
- },
532
- })
533
- console.log(response)
505
+ const placeOCOOrderResponse = await snaptrade.trading.placeOCOOrder({
506
+ "userId": "John.doe@snaptrade.com",
507
+ "userSecret": "USERSECRET123",
508
+ })
509
+
510
+ console.log(placeOCOOrderResponse)
534
511
 
535
512
  ```
536
513
 
@@ -548,10 +525,6 @@ Name | Type | Description | Notes
548
525
 
549
526
  **AccountOrderRecord**
550
527
 
551
- ### Authorization
552
-
553
- [PartnerClientId](README.md#PartnerClientId), [PartnerSignature](README.md#PartnerSignature), [PartnerTimestamp](README.md#PartnerTimestamp)
554
-
555
528
  ### HTTP request headers
556
529
 
557
530
  - **Content-Type**: application/json
@@ -568,7 +541,8 @@ Name | Type | Description | Notes
568
541
  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
569
542
 
570
543
  # **placeOrder**
571
- > AccountOrderRecord placeOrder()
544
+
545
+ #### **POST** /trade/{tradeId}
572
546
 
573
547
 
574
548
  ### Example
@@ -584,12 +558,13 @@ const snaptrade = new Snaptrade({
584
558
  clientId: "YOUR_CLIENT_ID",
585
559
  })
586
560
 
587
- const response = await snaptrade.trading.placeOrder({
588
- 'tradeId': "tradeId_example",
589
- 'userId': "John.doe@snaptrade.com",
590
- 'userSecret': "USERSECRET123",
591
- })
592
- console.log(response)
561
+ const placeOrderResponse = await snaptrade.trading.placeOrder({
562
+ "tradeId": "tradeId_example",
563
+ "userId": "John.doe@snaptrade.com",
564
+ "userSecret": "USERSECRET123",
565
+ })
566
+
567
+ console.log(placeOrderResponse)
593
568
 
594
569
  ```
595
570
 
@@ -607,10 +582,6 @@ Name | Type | Description | Notes
607
582
 
608
583
  **AccountOrderRecord**
609
584
 
610
- ### Authorization
611
-
612
- [PartnerClientId](README.md#PartnerClientId), [PartnerSignature](README.md#PartnerSignature), [PartnerTimestamp](README.md#PartnerTimestamp)
613
-
614
585
  ### HTTP request headers
615
586
 
616
587
  - **Content-Type**: Not defined
@@ -9,8 +9,10 @@ Method | HTTP request | Description
9
9
 
10
10
 
11
11
  # **getActivities**
12
- > Array<UniversalActivity> getActivities()
13
12
 
13
+ #### **GET** /activities
14
+
15
+ ### Description
14
16
  Returns activities (transactions) for a user. Specifing start and end date is highly recommended for automatic calls for better performance
15
17
 
16
18
  ### Example
@@ -26,14 +28,15 @@ const snaptrade = new Snaptrade({
26
28
  clientId: "YOUR_CLIENT_ID",
27
29
  })
28
30
 
29
- const response = await snaptrade.transactionsAndReporting.getActivities({
30
- 'userId': "John.doe@snaptrade.com",
31
- 'userSecret': "USERSECRET123",
32
- 'startDate': "2022-01-24T00:00:00.000Z",
33
- 'endDate': "2022-01-24T00:00:00.000Z",
34
- 'accounts': "917c8734-8470-4a3e-a18f-57c3f2ee6631,65e839a3-9103-4cfb-9b72-2071ef80c5f2",
35
- })
36
- console.log(response)
31
+ const getActivitiesResponse = await snaptrade.transactionsAndReporting.getActivities({
32
+ "startDate": "2022-01-24",
33
+ "endDate": "2022-01-24",
34
+ "accounts": "917c8734-8470-4a3e-a18f-57c3f2ee6631,65e839a3-9103-4cfb-9b72-2071ef80c5f2",
35
+ "userId": "John.doe@snaptrade.com",
36
+ "userSecret": "USERSECRET123",
37
+ })
38
+
39
+ console.log(getActivitiesResponse)
37
40
 
38
41
  ```
39
42
 
@@ -53,10 +56,6 @@ Name | Type | Description | Notes
53
56
 
54
57
  **Array<UniversalActivity>**
55
58
 
56
- ### Authorization
57
-
58
- [PartnerClientId](README.md#PartnerClientId), [PartnerSignature](README.md#PartnerSignature), [PartnerTimestamp](README.md#PartnerTimestamp)
59
-
60
59
  ### HTTP request headers
61
60
 
62
61
  - **Content-Type**: Not defined
@@ -72,8 +71,10 @@ Name | Type | Description | Notes
72
71
  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
73
72
 
74
73
  # **getReportingCustomRange**
75
- > PerformanceCustom getReportingCustomRange()
76
74
 
75
+ #### **GET** /performance/custom
76
+
77
+ ### Description
77
78
  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
78
79
 
79
80
  ### Example
@@ -89,16 +90,17 @@ const snaptrade = new Snaptrade({
89
90
  clientId: "YOUR_CLIENT_ID",
90
91
  })
91
92
 
92
- const response = await snaptrade.transactionsAndReporting.getReportingCustomRange({
93
- 'startDate': "2022-01-24T00:00:00.000Z",
94
- 'endDate': "2022-01-24T00:00:00.000Z",
95
- 'userId': "John.doe@snaptrade.com",
96
- 'userSecret': "USERSECRET123",
97
- 'accounts': "917c8734-8470-4a3e-a18f-57c3f2ee6631,65e839a3-9103-4cfb-9b72-2071ef80c5f2",
98
- 'detailed': true,
99
- 'frequency': "monthly",
100
- })
101
- console.log(response)
93
+ const getReportingCustomRangeResponse = await snaptrade.transactionsAndReporting.getReportingCustomRange({
94
+ "startDate": "2022-01-24",
95
+ "endDate": "2022-01-24",
96
+ "accounts": "917c8734-8470-4a3e-a18f-57c3f2ee6631,65e839a3-9103-4cfb-9b72-2071ef80c5f2",
97
+ "detailed": true,
98
+ "frequency": "monthly",
99
+ "userId": "John.doe@snaptrade.com",
100
+ "userSecret": "USERSECRET123",
101
+ })
102
+
103
+ console.log(getReportingCustomRangeResponse)
102
104
 
103
105
  ```
104
106
 
@@ -120,10 +122,6 @@ Name | Type | Description | Notes
120
122
 
121
123
  **PerformanceCustom**
122
124
 
123
- ### Authorization
124
-
125
- [PartnerClientId](README.md#PartnerClientId), [PartnerSignature](README.md#PartnerSignature), [PartnerTimestamp](README.md#PartnerTimestamp)
126
-
127
125
  ### HTTP request headers
128
126
 
129
127
  - **Content-Type**: Not defined
package/index.test.ts CHANGED
@@ -37,9 +37,7 @@ it("getting started", async () => {
37
37
  const userId = uuid();
38
38
  const { userSecret } = (
39
39
  await snaptrade.authentication.registerSnapTradeUser({
40
- requestBody: {
41
- userId,
42
- },
40
+ userId,
43
41
  })
44
42
  ).data;
45
43
 
@@ -104,7 +102,7 @@ it.skip("getOptionsChain", async () => {
104
102
  console.log(accounts.data);
105
103
  const accountId = accounts.data[0].id;
106
104
  const symbols = await snaptrade.referenceData.getSymbols({
107
- requestBody: { substring: "apple" },
105
+ substring: "apple",
108
106
  });
109
107
  console.log(symbols);
110
108
  const symbol = symbols.data[0].id;
package/models/index.ts CHANGED
@@ -91,6 +91,7 @@ export * from './time-in-force';
91
91
  export * from './trade';
92
92
  export * from './trade-execution-status';
93
93
  export * from './trade-impact';
94
+ export * from './trading-cancel-user-account-order-request';
94
95
  export * from './trading-place-ocoorder-request';
95
96
  export * from './usexchange';
96
97
  export * from './underlying-symbol';
@@ -54,9 +54,9 @@ export interface TargetAsset {
54
54
  'is_excluded'?: boolean;
55
55
  /**
56
56
  *
57
- * @type {object}
57
+ * @type {{ [key: string]: any; }}
58
58
  * @memberof TargetAsset
59
59
  */
60
- 'meta'?: object | null;
60
+ 'meta'?: { [key: string]: any; } | null;
61
61
  }
62
62
 
@@ -0,0 +1,29 @@
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
+ /**
17
+ *
18
+ * @export
19
+ * @interface TradingCancelUserAccountOrderRequest
20
+ */
21
+ export interface TradingCancelUserAccountOrderRequest {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof TradingCancelUserAccountOrderRequest
26
+ */
27
+ 'brokerage_order_id'?: string;
28
+ }
29
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "snaptrade-typescript-sdk",
3
- "version": "5.0.0",
3
+ "version": "6.0.0",
4
4
  "description": "Client for SnapTrade",
5
5
  "author": "Konfig",
6
6
  "repository": {