snaptrade-typescript-sdk 8.7.0 → 8.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (167) hide show
  1. package/README.md +1 -2
  2. package/dist/api/portfolio-management-api.d.ts +0 -47
  3. package/dist/api/portfolio-management-api.js +0 -103
  4. package/dist/configuration.js +1 -1
  5. package/package.json +4 -1
  6. package/.konfig/generate-id.txt +0 -1
  7. package/.konfigignore +0 -3
  8. package/api/account-information-api-custom.ts +0 -3
  9. package/api/account-information-api.ts +0 -1062
  10. package/api/api-disclaimer-api-custom.ts +0 -3
  11. package/api/api-disclaimer-api.ts +0 -183
  12. package/api/api-status-api-custom.ts +0 -3
  13. package/api/api-status-api.ts +0 -128
  14. package/api/authentication-api-custom.ts +0 -3
  15. package/api/authentication-api.ts +0 -568
  16. package/api/connections-api-custom.ts +0 -3
  17. package/api/connections-api.ts +0 -544
  18. package/api/error-logs-api-custom.ts +0 -3
  19. package/api/error-logs-api.ts +0 -174
  20. package/api/options-api-custom.ts +0 -3
  21. package/api/options-api.ts +0 -739
  22. package/api/portfolio-management-api-custom.ts +0 -3
  23. package/api/portfolio-management-api.ts +0 -3301
  24. package/api/reference-data-api-custom.ts +0 -3
  25. package/api/reference-data-api.ts +0 -1031
  26. package/api/trading-api-custom.ts +0 -3
  27. package/api/trading-api.ts +0 -1304
  28. package/api/transactions-and-reporting-api-custom.ts +0 -3
  29. package/api/transactions-and-reporting-api.ts +0 -408
  30. package/api.ts +0 -27
  31. package/base.ts +0 -70
  32. package/client-custom.ts +0 -5
  33. package/client.ts +0 -59
  34. package/common.ts +0 -163
  35. package/configuration.ts +0 -131
  36. package/docs/AccountInformationApi.md +0 -469
  37. package/docs/ApiDisclaimerApi.md +0 -64
  38. package/docs/ApiStatusApi.md +0 -58
  39. package/docs/AuthenticationApi.md +0 -293
  40. package/docs/ConnectionsApi.md +0 -238
  41. package/docs/ErrorLogsApi.md +0 -62
  42. package/docs/OptionsApi.md +0 -312
  43. package/docs/PortfolioManagementApi.md +0 -1785
  44. package/docs/ReferenceDataApi.md +0 -568
  45. package/docs/TradingApi.md +0 -596
  46. package/docs/TransactionsAndReportingApi.md +0 -144
  47. package/index.test.ts +0 -177
  48. package/index.ts +0 -18
  49. package/jest.config.ts +0 -11
  50. package/models/account-holdings-account.ts +0 -61
  51. package/models/account-holdings.ts +0 -61
  52. package/models/account-order-record-status.ts +0 -48
  53. package/models/account-order-record.ts +0 -151
  54. package/models/account-simple.ts +0 -52
  55. package/models/account-sync-status.ts +0 -32
  56. package/models/account.ts +0 -91
  57. package/models/action.ts +0 -30
  58. package/models/apidisclaimer-accept-request.ts +0 -29
  59. package/models/authentication-login-snap-trade-user200-response.ts +0 -31
  60. package/models/balance.ts +0 -40
  61. package/models/brokerage-authorization-type-read-only-brokerage.ts +0 -43
  62. package/models/brokerage-authorization-type-read-only.ts +0 -68
  63. package/models/brokerage-authorization-type.ts +0 -39
  64. package/models/brokerage-authorization.ts +0 -82
  65. package/models/brokerage-symbol.ts +0 -61
  66. package/models/brokerage-type.ts +0 -37
  67. package/models/brokerage.ts +0 -136
  68. package/models/calculated-trade.ts +0 -40
  69. package/models/cash-restriction.ts +0 -63
  70. package/models/connections-session-events200-response-inner.ts +0 -25
  71. package/models/currency.ts +0 -43
  72. package/models/delete-user-response.ts +0 -37
  73. package/models/dividend-at-date.ts +0 -43
  74. package/models/encrypted-response-encrypted-message-data.ts +0 -43
  75. package/models/encrypted-response.ts +0 -38
  76. package/models/exchange-rate-pairs.ts +0 -46
  77. package/models/exchange.ts +0 -73
  78. package/models/excluded-asset.ts +0 -34
  79. package/models/index.ts +0 -109
  80. package/models/jwt.ts +0 -31
  81. package/models/login-redirect-uri.ts +0 -35
  82. package/models/manual-trade-and-impact.ts +0 -49
  83. package/models/manual-trade-balance.ts +0 -49
  84. package/models/manual-trade-form.ts +0 -80
  85. package/models/manual-trade-symbol.ts +0 -64
  86. package/models/manual-trade.ts +0 -88
  87. package/models/model-asset-class-details.ts +0 -41
  88. package/models/model-asset-class-target.ts +0 -34
  89. package/models/model-asset-class.ts +0 -37
  90. package/models/model-portfolio-asset-class.ts +0 -40
  91. package/models/model-portfolio-details.ts +0 -50
  92. package/models/model-portfolio-security.ts +0 -40
  93. package/models/model-portfolio.ts +0 -52
  94. package/models/model400-failed-request-response.ts +0 -37
  95. package/models/model401-failed-request-response.ts +0 -37
  96. package/models/model403-failed-request-response.ts +0 -37
  97. package/models/model404-failed-request-response.ts +0 -37
  98. package/models/monthly-dividends.ts +0 -40
  99. package/models/net-contributions.ts +0 -43
  100. package/models/net-dividend.ts +0 -46
  101. package/models/option-chain-inner-chain-per-root-inner-chain-per-strike-price-inner.ts +0 -43
  102. package/models/option-chain-inner-chain-per-root-inner.ts +0 -46
  103. package/models/option-chain-inner.ts +0 -58
  104. package/models/option-leg.ts +0 -53
  105. package/models/option-strategy-legs-inner.ts +0 -47
  106. package/models/option-strategy.ts +0 -61
  107. package/models/options-get-option-strategy-request.ts +0 -51
  108. package/models/options-holdings.ts +0 -67
  109. package/models/options-place-option-strategy-request.ts +0 -57
  110. package/models/options-position.ts +0 -73
  111. package/models/options-symbol.ts +0 -94
  112. package/models/order-type.ts +0 -32
  113. package/models/partner-data.ts +0 -100
  114. package/models/past-value.ts +0 -43
  115. package/models/performance-custom.ts +0 -154
  116. package/models/portfolio-group-info.ts +0 -115
  117. package/models/portfolio-group-position.ts +0 -46
  118. package/models/portfolio-group-settings.ts +0 -58
  119. package/models/portfolio-group.ts +0 -37
  120. package/models/position-symbol.ts +0 -64
  121. package/models/position.ts +0 -64
  122. package/models/redirect-tokenand-pin.ts +0 -37
  123. package/models/security-type.ts +0 -49
  124. package/models/session-event.ts +0 -80
  125. package/models/snap-trade-apidisclaimer-accept-status.ts +0 -37
  126. package/models/snap-trade-holdings-account-account-id.ts +0 -82
  127. package/models/snap-trade-holdings-account.ts +0 -79
  128. package/models/snap-trade-holdings-total-value.ts +0 -37
  129. package/models/snap-trade-login-user-request-body.ts +0 -61
  130. package/models/snap-trade-register-user-request-body.ts +0 -35
  131. package/models/status.ts +0 -43
  132. package/models/strategy-impact-legs-inner.ts +0 -67
  133. package/models/strategy-impact.ts +0 -94
  134. package/models/strategy-order-place-orders-inner-legs-inner.ts +0 -67
  135. package/models/strategy-order-place-orders-inner.ts +0 -286
  136. package/models/strategy-order-place.ts +0 -40
  137. package/models/strategy-order-record.ts +0 -133
  138. package/models/strategy-quotes-greek.ts +0 -55
  139. package/models/strategy-quotes.ts +0 -67
  140. package/models/sub-period-return-rate.ts +0 -43
  141. package/models/symbol-query.ts +0 -29
  142. package/models/symbol.ts +0 -76
  143. package/models/symbols-quotes.ts +0 -64
  144. package/models/target-asset.ts +0 -62
  145. package/models/time-in-force.ts +0 -31
  146. package/models/trade-execution-status.ts +0 -105
  147. package/models/trade-impact.ts +0 -61
  148. package/models/trade.ts +0 -88
  149. package/models/trading-cancel-user-account-order-request.ts +0 -29
  150. package/models/trading-place-ocoorder-request.ts +0 -35
  151. package/models/transactions-status.ts +0 -35
  152. package/models/underlying-symbol.ts +0 -76
  153. package/models/universal-activity.ts +0 -127
  154. package/models/universal-symbol-ticker.ts +0 -82
  155. package/models/universal-symbol.ts +0 -80
  156. package/models/user-error-log.ts +0 -61
  157. package/models/user-idand-secret.ts +0 -37
  158. package/models/user-settings.ts +0 -88
  159. package/models/usexchange.ts +0 -79
  160. package/pagination/page-types.ts +0 -34
  161. package/pagination/page.ts +0 -58
  162. package/pagination/pageable.ts +0 -113
  163. package/pagination/paginate.ts +0 -41
  164. package/requestAfterHook.ts +0 -53
  165. package/requestBeforeHook.ts +0 -15
  166. package/tsconfig.json +0 -22
  167. package/tsconfig.test.json +0 -6
@@ -1,568 +0,0 @@
1
- # ReferenceDataApi
2
-
3
- All URIs are relative to *https://api.snaptrade.com/api/v1*
4
-
5
- Method | HTTP request | Description
6
- ------------- | ------------- | -------------
7
- [**getCurrencyExchangeRatePair**](ReferenceDataApi.md#getCurrencyExchangeRatePair) | **GET** /currencies/rates/{currencyPair} | Return the exchange rate of a currency pair
8
- [**getPartnerInfo**](ReferenceDataApi.md#getPartnerInfo) | **GET** /snapTrade/partners | Get metadata related to Snaptrade partner
9
- [**getSecurityTypes**](ReferenceDataApi.md#getSecurityTypes) | **GET** /securityTypes | List of all security types.
10
- [**getStockExchanges**](ReferenceDataApi.md#getStockExchanges) | **GET** /exchanges | Return list of stock exchanges on Passiv and their suffixes
11
- [**getSymbols**](ReferenceDataApi.md#getSymbols) | **POST** /symbols | Search for symbols
12
- [**getSymbolsByTicker**](ReferenceDataApi.md#getSymbolsByTicker) | **GET** /symbols/{ticker} | Get details of a symbol by the ticker
13
- [**listAllBrokerageAuthorizationType**](ReferenceDataApi.md#listAllBrokerageAuthorizationType) | **GET** /brokerageAuthorizationTypes | List of all brokerage authorization types
14
- [**listAllBrokerages**](ReferenceDataApi.md#listAllBrokerages) | **GET** /brokerages | List of all brokerages.
15
- [**listAllCurrencies**](ReferenceDataApi.md#listAllCurrencies) | **GET** /currencies | List of all supported currencies
16
- [**listAllCurrenciesRates**](ReferenceDataApi.md#listAllCurrenciesRates) | **GET** /currencies/rates | Return the exchange rates of all supported currencies
17
- [**symbolSearchUserAccount**](ReferenceDataApi.md#symbolSearchUserAccount) | **POST** /accounts/{accountId}/symbols | Search for symbols that are supported by a brokerage account using a substring
18
-
19
-
20
- # **getCurrencyExchangeRatePair**
21
-
22
- #### **GET** /currencies/rates/{currencyPair}
23
-
24
-
25
- ### Example
26
-
27
-
28
- ```typescript
29
- import { Snaptrade } from "snaptrade-typescript-sdk";
30
-
31
- const snaptrade = new Snaptrade({
32
- // Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
33
- // basePath: "https://api.snaptrade.com/api/v1",
34
- consumerKey: "YOUR_CONSUMER_KEY",
35
- clientId: "YOUR_CLIENT_ID",
36
- });
37
-
38
- const getCurrencyExchangeRatePairResponse =
39
- await snaptrade.referenceData.getCurrencyExchangeRatePair({
40
- currencyPair: "currencyPair_example",
41
- });
42
-
43
- console.log(getCurrencyExchangeRatePairResponse);
44
- ```
45
-
46
-
47
- ### Parameters
48
-
49
- Name | Type | Description | Notes
50
- ------------- | ------------- | ------------- | -------------
51
- **currencyPair** | [**string**] | A currency pair based on currency code for example, {CAD-USD} | defaults to undefined
52
-
53
-
54
- ### Return type
55
-
56
- **ExchangeRatePairs**
57
-
58
- ### HTTP request headers
59
-
60
- - **Content-Type**: Not defined
61
- - **Accept**: application/json
62
-
63
-
64
- ### HTTP response details
65
- | Status code | Description | Response headers |
66
- |-------------|-------------|------------------|
67
- **200** | A list of all exchange rates pairs for supported currencies | - |
68
-
69
- [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
70
-
71
- # **getPartnerInfo**
72
-
73
- #### **GET** /snapTrade/partners
74
-
75
-
76
- ### Example
77
-
78
-
79
- ```typescript
80
- import { Snaptrade } from "snaptrade-typescript-sdk";
81
-
82
- const snaptrade = new Snaptrade({
83
- // Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
84
- // basePath: "https://api.snaptrade.com/api/v1",
85
- consumerKey: "YOUR_CONSUMER_KEY",
86
- clientId: "YOUR_CLIENT_ID",
87
- });
88
-
89
- const getPartnerInfoResponse = await snaptrade.referenceData.getPartnerInfo();
90
-
91
- console.log(getPartnerInfoResponse);
92
- ```
93
-
94
-
95
- ### Parameters
96
- This endpoint does not need any parameter.
97
-
98
-
99
- ### Return type
100
-
101
- **PartnerData**
102
-
103
- ### HTTP request headers
104
-
105
- - **Content-Type**: Not defined
106
- - **Accept**: application/json
107
-
108
-
109
- ### HTTP response details
110
- | Status code | Description | Response headers |
111
- |-------------|-------------|------------------|
112
- **200** | Successfully obtained encrypted JWT data. See description on how to object JWT token | - |
113
- **400** | Bad Request | - |
114
- **401** | Unauthorized | - |
115
- **404** | Not Found | - |
116
- **500** | Unexpected Error | - |
117
-
118
- [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
119
-
120
- # **getSecurityTypes**
121
-
122
- #### **GET** /securityTypes
123
-
124
-
125
- ### Example
126
-
127
-
128
- ```typescript
129
- import { Snaptrade } from "snaptrade-typescript-sdk";
130
-
131
- const snaptrade = new Snaptrade({
132
- // Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
133
- // basePath: "https://api.snaptrade.com/api/v1",
134
- consumerKey: "YOUR_CONSUMER_KEY",
135
- clientId: "YOUR_CLIENT_ID",
136
- });
137
-
138
- const getSecurityTypesResponse =
139
- await snaptrade.referenceData.getSecurityTypes();
140
-
141
- console.log(getSecurityTypesResponse);
142
- ```
143
-
144
-
145
- ### Parameters
146
- This endpoint does not need any parameter.
147
-
148
-
149
- ### Return type
150
-
151
- **Array<SecurityType>**
152
-
153
- ### HTTP request headers
154
-
155
- - **Content-Type**: Not defined
156
- - **Accept**: application/json
157
-
158
-
159
- ### HTTP response details
160
- | Status code | Description | Response headers |
161
- |-------------|-------------|------------------|
162
- **200** | A list of all defined Security Type objects. | - |
163
- **0** | Unexpected error. | - |
164
-
165
- [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
166
-
167
- # **getStockExchanges**
168
-
169
- #### **GET** /exchanges
170
-
171
-
172
- ### Example
173
-
174
-
175
- ```typescript
176
- import { Snaptrade } from "snaptrade-typescript-sdk";
177
-
178
- const snaptrade = new Snaptrade({
179
- // Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
180
- // basePath: "https://api.snaptrade.com/api/v1",
181
- consumerKey: "YOUR_CONSUMER_KEY",
182
- clientId: "YOUR_CLIENT_ID",
183
- });
184
-
185
- const getStockExchangesResponse =
186
- await snaptrade.referenceData.getStockExchanges();
187
-
188
- console.log(getStockExchangesResponse);
189
- ```
190
-
191
-
192
- ### Parameters
193
- This endpoint does not need any parameter.
194
-
195
-
196
- ### Return type
197
-
198
- **Array<Exchange>**
199
-
200
- ### HTTP request headers
201
-
202
- - **Content-Type**: Not defined
203
- - **Accept**: application/json
204
-
205
-
206
- ### HTTP response details
207
- | Status code | Description | Response headers |
208
- |-------------|-------------|------------------|
209
- **200** | A list of all supported stock exchanges | - |
210
-
211
- [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
212
-
213
- # **getSymbols**
214
-
215
- #### **POST** /symbols
216
-
217
-
218
- ### Example
219
-
220
-
221
- ```typescript
222
- import { Snaptrade } from "snaptrade-typescript-sdk";
223
-
224
- const snaptrade = new Snaptrade({
225
- // Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
226
- // basePath: "https://api.snaptrade.com/api/v1",
227
- consumerKey: "YOUR_CONSUMER_KEY",
228
- clientId: "YOUR_CLIENT_ID",
229
- });
230
-
231
- const getSymbolsResponse = await snaptrade.referenceData.getSymbols({
232
- substring: "apple",
233
- });
234
-
235
- console.log(getSymbolsResponse);
236
- ```
237
-
238
-
239
- ### Parameters
240
-
241
- Name | Type | Description | Notes
242
- ------------- | ------------- | ------------- | -------------
243
- **symbolQuery** | **SymbolQuery**| |
244
-
245
-
246
- ### Return type
247
-
248
- **Array<UniversalSymbol>**
249
-
250
- ### HTTP request headers
251
-
252
- - **Content-Type**: application/json
253
- - **Accept**: application/json
254
-
255
-
256
- ### HTTP response details
257
- | Status code | Description | Response headers |
258
- |-------------|-------------|------------------|
259
- **200** | A list of UniversalSymbol objects which match the specified substring | - |
260
- **0** | Unexpected error. | - |
261
-
262
- [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
263
-
264
- # **getSymbolsByTicker**
265
-
266
- #### **GET** /symbols/{ticker}
267
-
268
-
269
- ### Example
270
-
271
-
272
- ```typescript
273
- import { Snaptrade } from "snaptrade-typescript-sdk";
274
-
275
- const snaptrade = new Snaptrade({
276
- // Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
277
- // basePath: "https://api.snaptrade.com/api/v1",
278
- consumerKey: "YOUR_CONSUMER_KEY",
279
- clientId: "YOUR_CLIENT_ID",
280
- });
281
-
282
- const getSymbolsByTickerResponse =
283
- await snaptrade.referenceData.getSymbolsByTicker({
284
- ticker: "ticker_example",
285
- });
286
-
287
- console.log(getSymbolsByTickerResponse);
288
- ```
289
-
290
-
291
- ### Parameters
292
-
293
- Name | Type | Description | Notes
294
- ------------- | ------------- | ------------- | -------------
295
- **ticker** | [**string**] | The ticker of the UniversalSymbol to get. | defaults to undefined
296
- **symbolId** | [**string**] | OPTIONAL IN PATH Can be used instead of the ticker ; The ID of the UniversalSymbol to get. | (optional) defaults to undefined
297
-
298
-
299
- ### Return type
300
-
301
- **UniversalSymbol**
302
-
303
- ### HTTP request headers
304
-
305
- - **Content-Type**: Not defined
306
- - **Accept**: */*
307
-
308
-
309
- ### HTTP response details
310
- | Status code | Description | Response headers |
311
- |-------------|-------------|------------------|
312
- **200** | Successfully gets a symbol | - |
313
- **404** | No symbol with the specified ticker found. | - |
314
- **0** | Unexpected error | - |
315
-
316
- [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
317
-
318
- # **listAllBrokerageAuthorizationType**
319
-
320
- #### **GET** /brokerageAuthorizationTypes
321
-
322
-
323
- ### Example
324
-
325
-
326
- ```typescript
327
- import { Snaptrade } from "snaptrade-typescript-sdk";
328
-
329
- const snaptrade = new Snaptrade({
330
- // Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
331
- // basePath: "https://api.snaptrade.com/api/v1",
332
- consumerKey: "YOUR_CONSUMER_KEY",
333
- clientId: "YOUR_CLIENT_ID",
334
- });
335
-
336
- const listAllBrokerageAuthorizationTypeResponse =
337
- await snaptrade.referenceData.listAllBrokerageAuthorizationType({
338
- brokerage: "QUESTRADE,ALPACA",
339
- });
340
-
341
- console.log(listAllBrokerageAuthorizationTypeResponse);
342
- ```
343
-
344
-
345
- ### Parameters
346
-
347
- Name | Type | Description | Notes
348
- ------------- | ------------- | ------------- | -------------
349
- **brokerage** | [**string**] | Comma separated value of brokerage slugs | (optional) defaults to undefined
350
-
351
-
352
- ### Return type
353
-
354
- **Array<BrokerageAuthorizationTypeReadOnly>**
355
-
356
- ### HTTP request headers
357
-
358
- - **Content-Type**: Not defined
359
- - **Accept**: application/json
360
-
361
-
362
- ### HTTP response details
363
- | Status code | Description | Response headers |
364
- |-------------|-------------|------------------|
365
- **200** | A list of all defined Brokerage Authorization Type objects. | - |
366
- **0** | Unexpected error. | - |
367
-
368
- [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
369
-
370
- # **listAllBrokerages**
371
-
372
- #### **GET** /brokerages
373
-
374
-
375
- ### Example
376
-
377
-
378
- ```typescript
379
- import { Snaptrade } from "snaptrade-typescript-sdk";
380
-
381
- const snaptrade = new Snaptrade({
382
- // Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
383
- // basePath: "https://api.snaptrade.com/api/v1",
384
- consumerKey: "YOUR_CONSUMER_KEY",
385
- clientId: "YOUR_CLIENT_ID",
386
- });
387
-
388
- const listAllBrokeragesResponse =
389
- await snaptrade.referenceData.listAllBrokerages();
390
-
391
- console.log(listAllBrokeragesResponse);
392
- ```
393
-
394
-
395
- ### Parameters
396
- This endpoint does not need any parameter.
397
-
398
-
399
- ### Return type
400
-
401
- **Array<Brokerage>**
402
-
403
- ### HTTP request headers
404
-
405
- - **Content-Type**: Not defined
406
- - **Accept**: application/json
407
-
408
-
409
- ### HTTP response details
410
- | Status code | Description | Response headers |
411
- |-------------|-------------|------------------|
412
- **200** | A list of all defined Brokerage objects. | - |
413
- **0** | Unexpected error. | - |
414
-
415
- [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
416
-
417
- # **listAllCurrencies**
418
-
419
- #### **GET** /currencies
420
-
421
-
422
- ### Example
423
-
424
-
425
- ```typescript
426
- import { Snaptrade } from "snaptrade-typescript-sdk";
427
-
428
- const snaptrade = new Snaptrade({
429
- // Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
430
- // basePath: "https://api.snaptrade.com/api/v1",
431
- consumerKey: "YOUR_CONSUMER_KEY",
432
- clientId: "YOUR_CLIENT_ID",
433
- });
434
-
435
- const listAllCurrenciesResponse =
436
- await snaptrade.referenceData.listAllCurrencies();
437
-
438
- console.log(listAllCurrenciesResponse);
439
- ```
440
-
441
-
442
- ### Parameters
443
- This endpoint does not need any parameter.
444
-
445
-
446
- ### Return type
447
-
448
- **Array<Currency>**
449
-
450
- ### HTTP request headers
451
-
452
- - **Content-Type**: Not defined
453
- - **Accept**: application/json
454
-
455
-
456
- ### HTTP response details
457
- | Status code | Description | Response headers |
458
- |-------------|-------------|------------------|
459
- **200** | A list of all supported currencies. | - |
460
- **0** | Unexpected error. | - |
461
-
462
- [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
463
-
464
- # **listAllCurrenciesRates**
465
-
466
- #### **GET** /currencies/rates
467
-
468
-
469
- ### Example
470
-
471
-
472
- ```typescript
473
- import { Snaptrade } from "snaptrade-typescript-sdk";
474
-
475
- const snaptrade = new Snaptrade({
476
- // Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
477
- // basePath: "https://api.snaptrade.com/api/v1",
478
- consumerKey: "YOUR_CONSUMER_KEY",
479
- clientId: "YOUR_CLIENT_ID",
480
- });
481
-
482
- const listAllCurrenciesRatesResponse =
483
- await snaptrade.referenceData.listAllCurrenciesRates();
484
-
485
- console.log(listAllCurrenciesRatesResponse);
486
- ```
487
-
488
-
489
- ### Parameters
490
- This endpoint does not need any parameter.
491
-
492
-
493
- ### Return type
494
-
495
- **Array<ExchangeRatePairs>**
496
-
497
- ### HTTP request headers
498
-
499
- - **Content-Type**: Not defined
500
- - **Accept**: application/json
501
-
502
-
503
- ### HTTP response details
504
- | Status code | Description | Response headers |
505
- |-------------|-------------|------------------|
506
- **200** | A list of all exchange rates pairs for supported currencies | - |
507
-
508
- [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
509
-
510
- # **symbolSearchUserAccount**
511
-
512
- #### **POST** /accounts/{accountId}/symbols
513
-
514
-
515
- ### Example
516
-
517
-
518
- ```typescript
519
- import { Snaptrade } from "snaptrade-typescript-sdk";
520
-
521
- const snaptrade = new Snaptrade({
522
- // Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
523
- // basePath: "https://api.snaptrade.com/api/v1",
524
- consumerKey: "YOUR_CONSUMER_KEY",
525
- clientId: "YOUR_CLIENT_ID",
526
- });
527
-
528
- const symbolSearchUserAccountResponse =
529
- await snaptrade.referenceData.symbolSearchUserAccount({
530
- userId: "John.doe@snaptrade.com",
531
- userSecret: "USERSECRET123",
532
- accountId: "accountId_example",
533
- substring: "apple",
534
- });
535
-
536
- console.log(symbolSearchUserAccountResponse);
537
- ```
538
-
539
-
540
- ### Parameters
541
-
542
- Name | Type | Description | Notes
543
- ------------- | ------------- | ------------- | -------------
544
- **symbolQuery** | **SymbolQuery**| |
545
- **userId** | [**string**] | | defaults to undefined
546
- **userSecret** | [**string**] | | defaults to undefined
547
- **accountId** | [**string**] | The ID of the account get positions. | defaults to undefined
548
-
549
-
550
- ### Return type
551
-
552
- **Array<UniversalSymbol>**
553
-
554
- ### HTTP request headers
555
-
556
- - **Content-Type**: application/json
557
- - **Accept**: */*
558
-
559
-
560
- ### HTTP response details
561
- | Status code | Description | Response headers |
562
- |-------------|-------------|------------------|
563
- **200** | Array of universal symbol supported by account based on substring sent it | - |
564
- **0** | Unexpected error | - |
565
-
566
- [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
567
-
568
-