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
@@ -18,7 +18,8 @@ Method | HTTP request | Description
18
18
 
19
19
 
20
20
  # **getCurrencyExchangeRatePair**
21
- > ExchangeRatePairs getCurrencyExchangeRatePair()
21
+
22
+ #### **GET** /currencies/rates/{currencyPair}
22
23
 
23
24
 
24
25
  ### Example
@@ -34,10 +35,11 @@ const snaptrade = new Snaptrade({
34
35
  clientId: "YOUR_CLIENT_ID",
35
36
  })
36
37
 
37
- const response = await snaptrade.referenceData.getCurrencyExchangeRatePair({
38
- 'currencyPair': "currencyPair_example",
39
- })
40
- console.log(response)
38
+ const getCurrencyExchangeRatePairResponse = await snaptrade.referenceData.getCurrencyExchangeRatePair({
39
+ "currencyPair": "currencyPair_example",
40
+ })
41
+
42
+ console.log(getCurrencyExchangeRatePairResponse)
41
43
 
42
44
  ```
43
45
 
@@ -53,10 +55,6 @@ Name | Type | Description | Notes
53
55
 
54
56
  **ExchangeRatePairs**
55
57
 
56
- ### Authorization
57
-
58
- [PartnerClientId](README.md#PartnerClientId), [PartnerSignature](README.md#PartnerSignature), [PartnerTimestamp](README.md#PartnerTimestamp)
59
-
60
58
  ### HTTP request headers
61
59
 
62
60
  - **Content-Type**: Not defined
@@ -71,7 +69,8 @@ Name | Type | Description | Notes
71
69
  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
72
70
 
73
71
  # **getPartnerInfo**
74
- > PartnerData getPartnerInfo()
72
+
73
+ #### **GET** /snapTrade/partners
75
74
 
76
75
 
77
76
  ### Example
@@ -87,8 +86,9 @@ const snaptrade = new Snaptrade({
87
86
  clientId: "YOUR_CLIENT_ID",
88
87
  })
89
88
 
90
- const response = await snaptrade.referenceData.getPartnerInfo()
91
- console.log(response)
89
+ const getPartnerInfoResponse = await snaptrade.referenceData.getPartnerInfo()
90
+
91
+ console.log(getPartnerInfoResponse)
92
92
 
93
93
  ```
94
94
 
@@ -101,10 +101,6 @@ This endpoint does not need any parameter.
101
101
 
102
102
  **PartnerData**
103
103
 
104
- ### Authorization
105
-
106
- [PartnerClientId](README.md#PartnerClientId), [PartnerSignature](README.md#PartnerSignature), [PartnerTimestamp](README.md#PartnerTimestamp)
107
-
108
104
  ### HTTP request headers
109
105
 
110
106
  - **Content-Type**: Not defined
@@ -123,7 +119,8 @@ This endpoint does not need any parameter.
123
119
  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
124
120
 
125
121
  # **getSecurityTypes**
126
- > Array<SecurityType> getSecurityTypes()
122
+
123
+ #### **GET** /securityTypes
127
124
 
128
125
 
129
126
  ### Example
@@ -139,8 +136,9 @@ const snaptrade = new Snaptrade({
139
136
  clientId: "YOUR_CLIENT_ID",
140
137
  })
141
138
 
142
- const response = await snaptrade.referenceData.getSecurityTypes()
143
- console.log(response)
139
+ const getSecurityTypesResponse = await snaptrade.referenceData.getSecurityTypes()
140
+
141
+ console.log(getSecurityTypesResponse)
144
142
 
145
143
  ```
146
144
 
@@ -153,10 +151,6 @@ This endpoint does not need any parameter.
153
151
 
154
152
  **Array<SecurityType>**
155
153
 
156
- ### Authorization
157
-
158
- [PartnerClientId](README.md#PartnerClientId), [PartnerSignature](README.md#PartnerSignature), [PartnerTimestamp](README.md#PartnerTimestamp)
159
-
160
154
  ### HTTP request headers
161
155
 
162
156
  - **Content-Type**: Not defined
@@ -172,7 +166,8 @@ This endpoint does not need any parameter.
172
166
  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
173
167
 
174
168
  # **getStockExchanges**
175
- > Array<Exchange> getStockExchanges()
169
+
170
+ #### **GET** /exchanges
176
171
 
177
172
 
178
173
  ### Example
@@ -188,8 +183,9 @@ const snaptrade = new Snaptrade({
188
183
  clientId: "YOUR_CLIENT_ID",
189
184
  })
190
185
 
191
- const response = await snaptrade.referenceData.getStockExchanges()
192
- console.log(response)
186
+ const getStockExchangesResponse = await snaptrade.referenceData.getStockExchanges()
187
+
188
+ console.log(getStockExchangesResponse)
193
189
 
194
190
  ```
195
191
 
@@ -202,10 +198,6 @@ This endpoint does not need any parameter.
202
198
 
203
199
  **Array<Exchange>**
204
200
 
205
- ### Authorization
206
-
207
- [PartnerClientId](README.md#PartnerClientId), [PartnerSignature](README.md#PartnerSignature), [PartnerTimestamp](README.md#PartnerTimestamp)
208
-
209
201
  ### HTTP request headers
210
202
 
211
203
  - **Content-Type**: Not defined
@@ -220,7 +212,8 @@ This endpoint does not need any parameter.
220
212
  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
221
213
 
222
214
  # **getSymbols**
223
- > Array<UniversalSymbol> getSymbols()
215
+
216
+ #### **POST** /symbols
224
217
 
225
218
 
226
219
  ### Example
@@ -236,12 +229,11 @@ const snaptrade = new Snaptrade({
236
229
  clientId: "YOUR_CLIENT_ID",
237
230
  })
238
231
 
239
- const response = await snaptrade.referenceData.getSymbols({
240
- 'requestBody': {
232
+ const getSymbolsResponse = await snaptrade.referenceData.getSymbols({
241
233
  "substring": "apple",
242
- },
243
- })
244
- console.log(response)
234
+ })
235
+
236
+ console.log(getSymbolsResponse)
245
237
 
246
238
  ```
247
239
 
@@ -257,10 +249,6 @@ Name | Type | Description | Notes
257
249
 
258
250
  **Array<UniversalSymbol>**
259
251
 
260
- ### Authorization
261
-
262
- [PartnerClientId](README.md#PartnerClientId), [PartnerSignature](README.md#PartnerSignature), [PartnerTimestamp](README.md#PartnerTimestamp)
263
-
264
252
  ### HTTP request headers
265
253
 
266
254
  - **Content-Type**: application/json
@@ -276,7 +264,8 @@ Name | Type | Description | Notes
276
264
  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
277
265
 
278
266
  # **getSymbolsByTicker**
279
- > UniversalSymbol getSymbolsByTicker()
267
+
268
+ #### **GET** /symbols/{ticker}
280
269
 
281
270
 
282
271
  ### Example
@@ -292,11 +281,11 @@ const snaptrade = new Snaptrade({
292
281
  clientId: "YOUR_CLIENT_ID",
293
282
  })
294
283
 
295
- const response = await snaptrade.referenceData.getSymbolsByTicker({
296
- 'ticker': "ticker_example",
297
- 'symbolId': "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
298
- })
299
- console.log(response)
284
+ const getSymbolsByTickerResponse = await snaptrade.referenceData.getSymbolsByTicker({
285
+ "ticker": "ticker_example",
286
+ })
287
+
288
+ console.log(getSymbolsByTickerResponse)
300
289
 
301
290
  ```
302
291
 
@@ -313,10 +302,6 @@ Name | Type | Description | Notes
313
302
 
314
303
  **UniversalSymbol**
315
304
 
316
- ### Authorization
317
-
318
- [PartnerClientId](README.md#PartnerClientId), [PartnerSignature](README.md#PartnerSignature), [PartnerTimestamp](README.md#PartnerTimestamp)
319
-
320
305
  ### HTTP request headers
321
306
 
322
307
  - **Content-Type**: Not defined
@@ -333,7 +318,8 @@ Name | Type | Description | Notes
333
318
  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
334
319
 
335
320
  # **listAllBrokerageAuthorizationType**
336
- > Array<BrokerageAuthorizationTypeReadOnly> listAllBrokerageAuthorizationType()
321
+
322
+ #### **GET** /brokerageAuthorizationTypes
337
323
 
338
324
 
339
325
  ### Example
@@ -349,10 +335,11 @@ const snaptrade = new Snaptrade({
349
335
  clientId: "YOUR_CLIENT_ID",
350
336
  })
351
337
 
352
- const response = await snaptrade.referenceData.listAllBrokerageAuthorizationType({
353
- 'brokerage': "QUESTRADE,ALPACA",
354
- })
355
- console.log(response)
338
+ const listAllBrokerageAuthorizationTypeResponse = await snaptrade.referenceData.listAllBrokerageAuthorizationType({
339
+ "brokerage": "QUESTRADE,ALPACA",
340
+ })
341
+
342
+ console.log(listAllBrokerageAuthorizationTypeResponse)
356
343
 
357
344
  ```
358
345
 
@@ -368,10 +355,6 @@ Name | Type | Description | Notes
368
355
 
369
356
  **Array<BrokerageAuthorizationTypeReadOnly>**
370
357
 
371
- ### Authorization
372
-
373
- [PartnerClientId](README.md#PartnerClientId), [PartnerSignature](README.md#PartnerSignature), [PartnerTimestamp](README.md#PartnerTimestamp)
374
-
375
358
  ### HTTP request headers
376
359
 
377
360
  - **Content-Type**: Not defined
@@ -387,7 +370,8 @@ Name | Type | Description | Notes
387
370
  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
388
371
 
389
372
  # **listAllBrokerages**
390
- > Array<Brokerage> listAllBrokerages()
373
+
374
+ #### **GET** /brokerages
391
375
 
392
376
 
393
377
  ### Example
@@ -403,8 +387,9 @@ const snaptrade = new Snaptrade({
403
387
  clientId: "YOUR_CLIENT_ID",
404
388
  })
405
389
 
406
- const response = await snaptrade.referenceData.listAllBrokerages()
407
- console.log(response)
390
+ const listAllBrokeragesResponse = await snaptrade.referenceData.listAllBrokerages()
391
+
392
+ console.log(listAllBrokeragesResponse)
408
393
 
409
394
  ```
410
395
 
@@ -417,10 +402,6 @@ This endpoint does not need any parameter.
417
402
 
418
403
  **Array<Brokerage>**
419
404
 
420
- ### Authorization
421
-
422
- [PartnerClientId](README.md#PartnerClientId), [PartnerSignature](README.md#PartnerSignature), [PartnerTimestamp](README.md#PartnerTimestamp)
423
-
424
405
  ### HTTP request headers
425
406
 
426
407
  - **Content-Type**: Not defined
@@ -436,7 +417,8 @@ This endpoint does not need any parameter.
436
417
  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
437
418
 
438
419
  # **listAllCurrencies**
439
- > Array<Currency> listAllCurrencies()
420
+
421
+ #### **GET** /currencies
440
422
 
441
423
 
442
424
  ### Example
@@ -452,8 +434,9 @@ const snaptrade = new Snaptrade({
452
434
  clientId: "YOUR_CLIENT_ID",
453
435
  })
454
436
 
455
- const response = await snaptrade.referenceData.listAllCurrencies()
456
- console.log(response)
437
+ const listAllCurrenciesResponse = await snaptrade.referenceData.listAllCurrencies()
438
+
439
+ console.log(listAllCurrenciesResponse)
457
440
 
458
441
  ```
459
442
 
@@ -466,10 +449,6 @@ This endpoint does not need any parameter.
466
449
 
467
450
  **Array<Currency>**
468
451
 
469
- ### Authorization
470
-
471
- [PartnerClientId](README.md#PartnerClientId), [PartnerSignature](README.md#PartnerSignature), [PartnerTimestamp](README.md#PartnerTimestamp)
472
-
473
452
  ### HTTP request headers
474
453
 
475
454
  - **Content-Type**: Not defined
@@ -485,7 +464,8 @@ This endpoint does not need any parameter.
485
464
  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
486
465
 
487
466
  # **listAllCurrenciesRates**
488
- > Array<ExchangeRatePairs> listAllCurrenciesRates()
467
+
468
+ #### **GET** /currencies/rates
489
469
 
490
470
 
491
471
  ### Example
@@ -501,8 +481,9 @@ const snaptrade = new Snaptrade({
501
481
  clientId: "YOUR_CLIENT_ID",
502
482
  })
503
483
 
504
- const response = await snaptrade.referenceData.listAllCurrenciesRates()
505
- console.log(response)
484
+ const listAllCurrenciesRatesResponse = await snaptrade.referenceData.listAllCurrenciesRates()
485
+
486
+ console.log(listAllCurrenciesRatesResponse)
506
487
 
507
488
  ```
508
489
 
@@ -515,10 +496,6 @@ This endpoint does not need any parameter.
515
496
 
516
497
  **Array<ExchangeRatePairs>**
517
498
 
518
- ### Authorization
519
-
520
- [PartnerClientId](README.md#PartnerClientId), [PartnerSignature](README.md#PartnerSignature), [PartnerTimestamp](README.md#PartnerTimestamp)
521
-
522
499
  ### HTTP request headers
523
500
 
524
501
  - **Content-Type**: Not defined
@@ -533,7 +510,8 @@ This endpoint does not need any parameter.
533
510
  [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
534
511
 
535
512
  # **symbolSearchUserAccount**
536
- > Array<UniversalSymbol> symbolSearchUserAccount()
513
+
514
+ #### **POST** /accounts/{accountId}/symbols
537
515
 
538
516
 
539
517
  ### Example
@@ -549,15 +527,14 @@ const snaptrade = new Snaptrade({
549
527
  clientId: "YOUR_CLIENT_ID",
550
528
  })
551
529
 
552
- const response = await snaptrade.referenceData.symbolSearchUserAccount({
553
- 'userId': "John.doe@snaptrade.com",
554
- 'userSecret': "USERSECRET123",
555
- 'accountId': "accountId_example",
556
- 'requestBody': {
530
+ const symbolSearchUserAccountResponse = await snaptrade.referenceData.symbolSearchUserAccount({
531
+ "userId": "John.doe@snaptrade.com",
532
+ "userSecret": "USERSECRET123",
533
+ "accountId": "accountId_example",
557
534
  "substring": "apple",
558
- },
559
- })
560
- console.log(response)
535
+ })
536
+
537
+ console.log(symbolSearchUserAccountResponse)
561
538
 
562
539
  ```
563
540
 
@@ -576,10 +553,6 @@ Name | Type | Description | Notes
576
553
 
577
554
  **Array<UniversalSymbol>**
578
555
 
579
- ### Authorization
580
-
581
- [PartnerClientId](README.md#PartnerClientId), [PartnerSignature](README.md#PartnerSignature), [PartnerTimestamp](README.md#PartnerTimestamp)
582
-
583
556
  ### HTTP request headers
584
557
 
585
558
  - **Content-Type**: application/json