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.
- package/README.md +9 -12
- package/dist/api/portfolio-management-api.d.ts +0 -47
- package/dist/api/portfolio-management-api.js +0 -103
- package/dist/configuration.js +1 -1
- package/dist/models/session-event.d.ts +6 -0
- package/dist/models/symbol.d.ts +7 -0
- package/package.json +4 -1
- package/.konfig/generate-id.txt +0 -1
- package/.konfigignore +0 -3
- package/api/account-information-api-custom.ts +0 -3
- package/api/account-information-api.ts +0 -1062
- package/api/api-disclaimer-api-custom.ts +0 -3
- package/api/api-disclaimer-api.ts +0 -183
- package/api/api-status-api-custom.ts +0 -3
- package/api/api-status-api.ts +0 -128
- package/api/authentication-api-custom.ts +0 -3
- package/api/authentication-api.ts +0 -568
- package/api/connections-api-custom.ts +0 -3
- package/api/connections-api.ts +0 -544
- package/api/error-logs-api-custom.ts +0 -3
- package/api/error-logs-api.ts +0 -174
- package/api/options-api-custom.ts +0 -3
- package/api/options-api.ts +0 -739
- package/api/portfolio-management-api-custom.ts +0 -3
- package/api/portfolio-management-api.ts +0 -3301
- package/api/reference-data-api-custom.ts +0 -3
- package/api/reference-data-api.ts +0 -1031
- package/api/trading-api-custom.ts +0 -3
- package/api/trading-api.ts +0 -1304
- package/api/transactions-and-reporting-api-custom.ts +0 -3
- package/api/transactions-and-reporting-api.ts +0 -408
- package/api.ts +0 -27
- package/base.ts +0 -70
- package/client-custom.ts +0 -5
- package/client.ts +0 -59
- package/common.ts +0 -163
- package/configuration.ts +0 -131
- package/docs/AccountInformationApi.md +0 -469
- package/docs/ApiDisclaimerApi.md +0 -65
- package/docs/ApiStatusApi.md +0 -59
- package/docs/AuthenticationApi.md +0 -293
- package/docs/ConnectionsApi.md +0 -237
- package/docs/ErrorLogsApi.md +0 -63
- package/docs/OptionsApi.md +0 -314
- package/docs/PortfolioManagementApi.md +0 -1786
- package/docs/ReferenceDataApi.md +0 -570
- package/docs/TradingApi.md +0 -600
- package/docs/TransactionsAndReportingApi.md +0 -141
- package/index.test.ts +0 -177
- package/index.ts +0 -18
- package/jest.config.ts +0 -11
- package/models/account-holdings-account.ts +0 -61
- package/models/account-holdings.ts +0 -61
- package/models/account-order-record-status.ts +0 -48
- package/models/account-order-record.ts +0 -151
- package/models/account-simple.ts +0 -52
- package/models/account-sync-status.ts +0 -32
- package/models/account.ts +0 -91
- package/models/action.ts +0 -30
- package/models/apidisclaimer-accept-request.ts +0 -29
- package/models/authentication-login-snap-trade-user200-response.ts +0 -31
- package/models/balance.ts +0 -40
- package/models/brokerage-authorization-type-read-only-brokerage.ts +0 -43
- package/models/brokerage-authorization-type-read-only.ts +0 -68
- package/models/brokerage-authorization-type.ts +0 -39
- package/models/brokerage-authorization.ts +0 -82
- package/models/brokerage-symbol.ts +0 -61
- package/models/brokerage-type.ts +0 -37
- package/models/brokerage.ts +0 -136
- package/models/calculated-trade.ts +0 -40
- package/models/cash-restriction.ts +0 -63
- package/models/connections-session-events200-response-inner.ts +0 -25
- package/models/currency.ts +0 -43
- package/models/delete-user-response.ts +0 -37
- package/models/dividend-at-date.ts +0 -43
- package/models/encrypted-response-encrypted-message-data.ts +0 -43
- package/models/encrypted-response.ts +0 -38
- package/models/exchange-rate-pairs.ts +0 -46
- package/models/exchange.ts +0 -73
- package/models/excluded-asset.ts +0 -34
- package/models/index.ts +0 -109
- package/models/jwt.ts +0 -31
- package/models/login-redirect-uri.ts +0 -35
- package/models/manual-trade-and-impact.ts +0 -49
- package/models/manual-trade-balance.ts +0 -49
- package/models/manual-trade-form.ts +0 -80
- package/models/manual-trade-symbol.ts +0 -64
- package/models/manual-trade.ts +0 -88
- package/models/model-asset-class-details.ts +0 -41
- package/models/model-asset-class-target.ts +0 -34
- package/models/model-asset-class.ts +0 -37
- package/models/model-portfolio-asset-class.ts +0 -40
- package/models/model-portfolio-details.ts +0 -50
- package/models/model-portfolio-security.ts +0 -40
- package/models/model-portfolio.ts +0 -52
- package/models/model400-failed-request-response.ts +0 -37
- package/models/model401-failed-request-response.ts +0 -37
- package/models/model403-failed-request-response.ts +0 -37
- package/models/model404-failed-request-response.ts +0 -37
- package/models/monthly-dividends.ts +0 -40
- package/models/net-contributions.ts +0 -43
- package/models/net-dividend.ts +0 -46
- package/models/option-chain-inner-chain-per-root-inner-chain-per-strike-price-inner.ts +0 -43
- package/models/option-chain-inner-chain-per-root-inner.ts +0 -46
- package/models/option-chain-inner.ts +0 -58
- package/models/option-leg.ts +0 -53
- package/models/option-strategy-legs-inner.ts +0 -47
- package/models/option-strategy.ts +0 -61
- package/models/options-get-option-strategy-request.ts +0 -51
- package/models/options-holdings.ts +0 -67
- package/models/options-place-option-strategy-request.ts +0 -57
- package/models/options-position.ts +0 -73
- package/models/options-symbol.ts +0 -94
- package/models/order-type.ts +0 -32
- package/models/partner-data.ts +0 -100
- package/models/past-value.ts +0 -43
- package/models/performance-custom.ts +0 -154
- package/models/portfolio-group-info.ts +0 -115
- package/models/portfolio-group-position.ts +0 -46
- package/models/portfolio-group-settings.ts +0 -58
- package/models/portfolio-group.ts +0 -37
- package/models/position-symbol.ts +0 -64
- package/models/position.ts +0 -64
- package/models/redirect-tokenand-pin.ts +0 -37
- package/models/security-type.ts +0 -49
- package/models/session-event.ts +0 -74
- package/models/snap-trade-apidisclaimer-accept-status.ts +0 -37
- package/models/snap-trade-holdings-account-account-id.ts +0 -82
- package/models/snap-trade-holdings-account.ts +0 -79
- package/models/snap-trade-holdings-total-value.ts +0 -37
- package/models/snap-trade-login-user-request-body.ts +0 -61
- package/models/snap-trade-register-user-request-body.ts +0 -35
- package/models/status.ts +0 -43
- package/models/strategy-impact-legs-inner.ts +0 -67
- package/models/strategy-impact.ts +0 -94
- package/models/strategy-order-place-orders-inner-legs-inner.ts +0 -67
- package/models/strategy-order-place-orders-inner.ts +0 -286
- package/models/strategy-order-place.ts +0 -40
- package/models/strategy-order-record.ts +0 -133
- package/models/strategy-quotes-greek.ts +0 -55
- package/models/strategy-quotes.ts +0 -67
- package/models/sub-period-return-rate.ts +0 -43
- package/models/symbol-query.ts +0 -29
- package/models/symbol.ts +0 -67
- package/models/symbols-quotes.ts +0 -64
- package/models/target-asset.ts +0 -62
- package/models/time-in-force.ts +0 -31
- package/models/trade-execution-status.ts +0 -105
- package/models/trade-impact.ts +0 -61
- package/models/trade.ts +0 -88
- package/models/trading-cancel-user-account-order-request.ts +0 -29
- package/models/trading-place-ocoorder-request.ts +0 -35
- package/models/transactions-status.ts +0 -35
- package/models/underlying-symbol.ts +0 -76
- package/models/universal-activity.ts +0 -127
- package/models/universal-symbol-ticker.ts +0 -82
- package/models/universal-symbol.ts +0 -80
- package/models/user-error-log.ts +0 -61
- package/models/user-idand-secret.ts +0 -37
- package/models/user-settings.ts +0 -88
- package/models/usexchange.ts +0 -79
- package/pagination/page-types.ts +0 -34
- package/pagination/page.ts +0 -58
- package/pagination/pageable.ts +0 -113
- package/pagination/paginate.ts +0 -41
- package/requestAfterHook.ts +0 -53
- package/requestBeforeHook.ts +0 -15
- package/tsconfig.json +0 -22
- package/tsconfig.test.json +0 -6
package/docs/ReferenceDataApi.md
DELETED
|
@@ -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
|
-
|