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