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
|
@@ -1,293 +0,0 @@
|
|
|
1
|
-
# AuthenticationApi
|
|
2
|
-
|
|
3
|
-
All URIs are relative to *https://api.snaptrade.com/api/v1*
|
|
4
|
-
|
|
5
|
-
Method | HTTP request | Description
|
|
6
|
-
------------- | ------------- | -------------
|
|
7
|
-
[**deleteSnapTradeUser**](AuthenticationApi.md#deleteSnapTradeUser) | **DELETE** /snapTrade/deleteUser | Delete user from SnapTrade, disabling all brokerage authorizations and permanently deleting all data associated with the user
|
|
8
|
-
[**getUserJWT**](AuthenticationApi.md#getUserJWT) | **GET** /snapTrade/encryptedJWT | Obtains an encrypted JWT tokens that should be decrypted on a user\'s local device
|
|
9
|
-
[**listSnapTradeUsers**](AuthenticationApi.md#listSnapTradeUsers) | **GET** /snapTrade/listUsers | Get a list of all SnapTrade users you\'ve registered on our platform
|
|
10
|
-
[**loginSnapTradeUser**](AuthenticationApi.md#loginSnapTradeUser) | **POST** /snapTrade/login | Generate a redirect URI to securely login a user to the SnapTrade Connection Portal
|
|
11
|
-
[**registerSnapTradeUser**](AuthenticationApi.md#registerSnapTradeUser) | **POST** /snapTrade/registerUser | Register user with SnapTrade in order to create secure brokerage authorizations
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
# **deleteSnapTradeUser**
|
|
15
|
-
|
|
16
|
-
#### **DELETE** /snapTrade/deleteUser
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
### Example
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
```typescript
|
|
23
|
-
import { Snaptrade } from "snaptrade-typescript-sdk"
|
|
24
|
-
|
|
25
|
-
const snaptrade = new Snaptrade({
|
|
26
|
-
// Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
|
|
27
|
-
// basePath: "https://api.snaptrade.com/api/v1",
|
|
28
|
-
consumerKey: "YOUR_CONSUMER_KEY",
|
|
29
|
-
clientId: "YOUR_CLIENT_ID",
|
|
30
|
-
})
|
|
31
|
-
|
|
32
|
-
const deleteSnapTradeUserResponse = await snaptrade.authentication.deleteSnapTradeUser({
|
|
33
|
-
"userId": "John.doe@snaptrade.com",
|
|
34
|
-
})
|
|
35
|
-
|
|
36
|
-
console.log(deleteSnapTradeUserResponse)
|
|
37
|
-
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
### Parameters
|
|
42
|
-
|
|
43
|
-
Name | Type | Description | Notes
|
|
44
|
-
------------- | ------------- | ------------- | -------------
|
|
45
|
-
**userId** | [**string**] | | defaults to undefined
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
### Return type
|
|
49
|
-
|
|
50
|
-
**DeleteUserResponse**
|
|
51
|
-
|
|
52
|
-
### HTTP request headers
|
|
53
|
-
|
|
54
|
-
- **Content-Type**: Not defined
|
|
55
|
-
- **Accept**: application/json
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
### HTTP response details
|
|
59
|
-
| Status code | Description | Response headers |
|
|
60
|
-
|-------------|-------------|------------------|
|
|
61
|
-
**200** | Delete successful | - |
|
|
62
|
-
**400** | Bad Request | - |
|
|
63
|
-
**403** | Forbidden | - |
|
|
64
|
-
**404** | Not Found | - |
|
|
65
|
-
**500** | Unexpected Error | - |
|
|
66
|
-
|
|
67
|
-
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
68
|
-
|
|
69
|
-
# **getUserJWT**
|
|
70
|
-
|
|
71
|
-
#### **GET** /snapTrade/encryptedJWT
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
### Example
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
```typescript
|
|
78
|
-
import { Snaptrade } from "snaptrade-typescript-sdk"
|
|
79
|
-
|
|
80
|
-
const snaptrade = new Snaptrade({
|
|
81
|
-
// Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
|
|
82
|
-
// basePath: "https://api.snaptrade.com/api/v1",
|
|
83
|
-
consumerKey: "YOUR_CONSUMER_KEY",
|
|
84
|
-
clientId: "YOUR_CLIENT_ID",
|
|
85
|
-
})
|
|
86
|
-
|
|
87
|
-
const getUserJWTResponse = await snaptrade.authentication.getUserJWT({
|
|
88
|
-
"userId": "John.doe@snaptrade.com",
|
|
89
|
-
"userSecret": "USERSECRET123",
|
|
90
|
-
})
|
|
91
|
-
|
|
92
|
-
console.log(getUserJWTResponse)
|
|
93
|
-
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
### Parameters
|
|
98
|
-
|
|
99
|
-
Name | Type | Description | Notes
|
|
100
|
-
------------- | ------------- | ------------- | -------------
|
|
101
|
-
**userId** | [**string**] | | defaults to undefined
|
|
102
|
-
**userSecret** | [**string**] | | defaults to undefined
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
### Return type
|
|
106
|
-
|
|
107
|
-
**EncryptedResponse**
|
|
108
|
-
|
|
109
|
-
### HTTP request headers
|
|
110
|
-
|
|
111
|
-
- **Content-Type**: Not defined
|
|
112
|
-
- **Accept**: application/json
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
### HTTP response details
|
|
116
|
-
| Status code | Description | Response headers |
|
|
117
|
-
|-------------|-------------|------------------|
|
|
118
|
-
**200** | Successfully obtained encrypted JWT data. See description on how to object JWT token | - |
|
|
119
|
-
**400** | Bad Request | - |
|
|
120
|
-
**403** | Forbidden | - |
|
|
121
|
-
**404** | Not Found | - |
|
|
122
|
-
**500** | Unexpected Error | - |
|
|
123
|
-
|
|
124
|
-
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
125
|
-
|
|
126
|
-
# **listSnapTradeUsers**
|
|
127
|
-
|
|
128
|
-
#### **GET** /snapTrade/listUsers
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
### Example
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
```typescript
|
|
135
|
-
import { Snaptrade } from "snaptrade-typescript-sdk"
|
|
136
|
-
|
|
137
|
-
const snaptrade = new Snaptrade({
|
|
138
|
-
// Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
|
|
139
|
-
// basePath: "https://api.snaptrade.com/api/v1",
|
|
140
|
-
consumerKey: "YOUR_CONSUMER_KEY",
|
|
141
|
-
clientId: "YOUR_CLIENT_ID",
|
|
142
|
-
})
|
|
143
|
-
|
|
144
|
-
const listSnapTradeUsersResponse = await snaptrade.authentication.listSnapTradeUsers()
|
|
145
|
-
|
|
146
|
-
console.log(listSnapTradeUsersResponse)
|
|
147
|
-
|
|
148
|
-
```
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
### Parameters
|
|
152
|
-
This endpoint does not need any parameter.
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
### Return type
|
|
156
|
-
|
|
157
|
-
**Array<string>**
|
|
158
|
-
|
|
159
|
-
### HTTP request headers
|
|
160
|
-
|
|
161
|
-
- **Content-Type**: Not defined
|
|
162
|
-
- **Accept**: application/json
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
### HTTP response details
|
|
166
|
-
| Status code | Description | Response headers |
|
|
167
|
-
|-------------|-------------|------------------|
|
|
168
|
-
**200** | Successfully generated a list of users | - |
|
|
169
|
-
**400** | Bad Request. Could be caused by various reasons. Error message is provided in response | - |
|
|
170
|
-
**404** | Invalid SnapTrade Client ID provided in query | - |
|
|
171
|
-
**500** | Unexpected error | - |
|
|
172
|
-
|
|
173
|
-
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
174
|
-
|
|
175
|
-
# **loginSnapTradeUser**
|
|
176
|
-
|
|
177
|
-
#### **POST** /snapTrade/login
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
### Example
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
```typescript
|
|
184
|
-
import { Snaptrade } from "snaptrade-typescript-sdk"
|
|
185
|
-
|
|
186
|
-
const snaptrade = new Snaptrade({
|
|
187
|
-
// Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
|
|
188
|
-
// basePath: "https://api.snaptrade.com/api/v1",
|
|
189
|
-
consumerKey: "YOUR_CONSUMER_KEY",
|
|
190
|
-
clientId: "YOUR_CLIENT_ID",
|
|
191
|
-
})
|
|
192
|
-
|
|
193
|
-
const loginSnapTradeUserResponse = await snaptrade.authentication.loginSnapTradeUser({
|
|
194
|
-
"userId": "John.doe@snaptrade.com",
|
|
195
|
-
"userSecret": "USERSECRET123",
|
|
196
|
-
"broker": "ALPACA",
|
|
197
|
-
"immediate_redirect": true,
|
|
198
|
-
"custom_redirect": "https://passiv.com",
|
|
199
|
-
"reconnect": "8b5f262d-4bb9-365d-888a-202bd3b15fa1",
|
|
200
|
-
"connection_type": "read",
|
|
201
|
-
})
|
|
202
|
-
|
|
203
|
-
console.log(loginSnapTradeUserResponse)
|
|
204
|
-
|
|
205
|
-
```
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
### Parameters
|
|
209
|
-
|
|
210
|
-
Name | Type | Description | Notes
|
|
211
|
-
------------- | ------------- | ------------- | -------------
|
|
212
|
-
**snapTradeLoginUserRequestBody** | **SnapTradeLoginUserRequestBody**| |
|
|
213
|
-
**userId** | [**string**] | | defaults to undefined
|
|
214
|
-
**userSecret** | [**string**] | | defaults to undefined
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
### Return type
|
|
218
|
-
|
|
219
|
-
**AuthenticationLoginSnapTradeUser200Response**
|
|
220
|
-
|
|
221
|
-
### HTTP request headers
|
|
222
|
-
|
|
223
|
-
- **Content-Type**: application/json
|
|
224
|
-
- **Accept**: application/json
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
### HTTP response details
|
|
228
|
-
| Status code | Description | Response headers |
|
|
229
|
-
|-------------|-------------|------------------|
|
|
230
|
-
**200** | Login successful. Redirect user to provided URI in response | - |
|
|
231
|
-
**400** | Bad Request | - |
|
|
232
|
-
**403** | Forbidden | - |
|
|
233
|
-
**404** | Not Found | - |
|
|
234
|
-
**500** | Unexpected Error | - |
|
|
235
|
-
|
|
236
|
-
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
237
|
-
|
|
238
|
-
# **registerSnapTradeUser**
|
|
239
|
-
|
|
240
|
-
#### **POST** /snapTrade/registerUser
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
### Example
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
```typescript
|
|
247
|
-
import { Snaptrade } from "snaptrade-typescript-sdk"
|
|
248
|
-
|
|
249
|
-
const snaptrade = new Snaptrade({
|
|
250
|
-
// Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
|
|
251
|
-
// basePath: "https://api.snaptrade.com/api/v1",
|
|
252
|
-
consumerKey: "YOUR_CONSUMER_KEY",
|
|
253
|
-
clientId: "YOUR_CLIENT_ID",
|
|
254
|
-
})
|
|
255
|
-
|
|
256
|
-
const registerSnapTradeUserResponse = await snaptrade.authentication.registerSnapTradeUser({
|
|
257
|
-
"user_id": "snaptrade-user-123",
|
|
258
|
-
"rsa_public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQC7vbqajDw4o6gJy8UtmIbkcpnkO3Kwc4qsEnSZp/TR+fQi62F79RHWmwKOtFmwteURgLbj7D/WGuNLGOfa/2vse3G2eHnHl5CB8ruRX9fBl/KgwCVr2JaEuUm66bBQeP5XeBotdR4cvX38uPYivCDdPjJ1QWPdspTBKcxeFbccDw==",
|
|
259
|
-
})
|
|
260
|
-
|
|
261
|
-
console.log(registerSnapTradeUserResponse)
|
|
262
|
-
|
|
263
|
-
```
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
### Parameters
|
|
267
|
-
|
|
268
|
-
Name | Type | Description | Notes
|
|
269
|
-
------------- | ------------- | ------------- | -------------
|
|
270
|
-
**snapTradeRegisterUserRequestBody** | **SnapTradeRegisterUserRequestBody**| |
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
### Return type
|
|
274
|
-
|
|
275
|
-
**UserIDandSecret**
|
|
276
|
-
|
|
277
|
-
### HTTP request headers
|
|
278
|
-
|
|
279
|
-
- **Content-Type**: application/json
|
|
280
|
-
- **Accept**: application/json
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
### HTTP response details
|
|
284
|
-
| Status code | Description | Response headers |
|
|
285
|
-
|-------------|-------------|------------------|
|
|
286
|
-
**200** | Successfully registered user | - |
|
|
287
|
-
**400** | Bad Request. Could be caused by various reasons. Error message is provided in response | - |
|
|
288
|
-
**404** | Invalid SnapTrade Client ID provided in query | - |
|
|
289
|
-
**500** | Unexpected error | - |
|
|
290
|
-
|
|
291
|
-
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
292
|
-
|
|
293
|
-
|
package/docs/ConnectionsApi.md
DELETED
|
@@ -1,237 +0,0 @@
|
|
|
1
|
-
# ConnectionsApi
|
|
2
|
-
|
|
3
|
-
All URIs are relative to *https://api.snaptrade.com/api/v1*
|
|
4
|
-
|
|
5
|
-
Method | HTTP request | Description
|
|
6
|
-
------------- | ------------- | -------------
|
|
7
|
-
[**detailBrokerageAuthorization**](ConnectionsApi.md#detailBrokerageAuthorization) | **GET** /authorizations/{authorizationId} | Get detail of a specific brokerage authorizations for the user
|
|
8
|
-
[**listBrokerageAuthorizations**](ConnectionsApi.md#listBrokerageAuthorizations) | **GET** /authorizations | List all brokerage authorizations for the user
|
|
9
|
-
[**removeBrokerageAuthorization**](ConnectionsApi.md#removeBrokerageAuthorization) | **DELETE** /authorizations/{authorizationId} | Remove a brokerage authorization.
|
|
10
|
-
[**sessionEvents**](ConnectionsApi.md#sessionEvents) | **GET** /sessionEvents | List all session events for the partner
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
# **detailBrokerageAuthorization**
|
|
14
|
-
|
|
15
|
-
#### **GET** /authorizations/{authorizationId}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
### Example
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
```typescript
|
|
22
|
-
import { Snaptrade } from "snaptrade-typescript-sdk"
|
|
23
|
-
|
|
24
|
-
const snaptrade = new Snaptrade({
|
|
25
|
-
// Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
|
|
26
|
-
// basePath: "https://api.snaptrade.com/api/v1",
|
|
27
|
-
consumerKey: "YOUR_CONSUMER_KEY",
|
|
28
|
-
clientId: "YOUR_CLIENT_ID",
|
|
29
|
-
})
|
|
30
|
-
|
|
31
|
-
const detailBrokerageAuthorizationResponse = await snaptrade.connections.detailBrokerageAuthorization({
|
|
32
|
-
"authorizationId": "2bcd7cc3-e922-4976-bce1-9858296801c3",
|
|
33
|
-
"userId": "John.doe@snaptrade.com",
|
|
34
|
-
"userSecret": "USERSECRET123",
|
|
35
|
-
})
|
|
36
|
-
|
|
37
|
-
console.log(detailBrokerageAuthorizationResponse)
|
|
38
|
-
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
### Parameters
|
|
43
|
-
|
|
44
|
-
Name | Type | Description | Notes
|
|
45
|
-
------------- | ------------- | ------------- | -------------
|
|
46
|
-
**authorizationId** | [**string**] | The ID of a brokerage authorization object. | defaults to undefined
|
|
47
|
-
**userId** | [**string**] | | defaults to undefined
|
|
48
|
-
**userSecret** | [**string**] | | defaults to undefined
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
### Return type
|
|
52
|
-
|
|
53
|
-
**BrokerageAuthorization**
|
|
54
|
-
|
|
55
|
-
### HTTP request headers
|
|
56
|
-
|
|
57
|
-
- **Content-Type**: Not defined
|
|
58
|
-
- **Accept**: application/json
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
### HTTP response details
|
|
62
|
-
| Status code | Description | Response headers |
|
|
63
|
-
|-------------|-------------|------------------|
|
|
64
|
-
**200** | Authorization object for the authenticated user. | - |
|
|
65
|
-
**0** | Unexpected error. | - |
|
|
66
|
-
|
|
67
|
-
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
68
|
-
|
|
69
|
-
# **listBrokerageAuthorizations**
|
|
70
|
-
|
|
71
|
-
#### **GET** /authorizations
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
### Example
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
```typescript
|
|
78
|
-
import { Snaptrade } from "snaptrade-typescript-sdk"
|
|
79
|
-
|
|
80
|
-
const snaptrade = new Snaptrade({
|
|
81
|
-
// Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
|
|
82
|
-
// basePath: "https://api.snaptrade.com/api/v1",
|
|
83
|
-
consumerKey: "YOUR_CONSUMER_KEY",
|
|
84
|
-
clientId: "YOUR_CLIENT_ID",
|
|
85
|
-
})
|
|
86
|
-
|
|
87
|
-
const listBrokerageAuthorizationsResponse = await snaptrade.connections.listBrokerageAuthorizations({
|
|
88
|
-
"userId": "John.doe@snaptrade.com",
|
|
89
|
-
"userSecret": "USERSECRET123",
|
|
90
|
-
})
|
|
91
|
-
|
|
92
|
-
console.log(listBrokerageAuthorizationsResponse)
|
|
93
|
-
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
### Parameters
|
|
98
|
-
|
|
99
|
-
Name | Type | Description | Notes
|
|
100
|
-
------------- | ------------- | ------------- | -------------
|
|
101
|
-
**userId** | [**string**] | | defaults to undefined
|
|
102
|
-
**userSecret** | [**string**] | | defaults to undefined
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
### Return type
|
|
106
|
-
|
|
107
|
-
**Array<BrokerageAuthorization>**
|
|
108
|
-
|
|
109
|
-
### HTTP request headers
|
|
110
|
-
|
|
111
|
-
- **Content-Type**: Not defined
|
|
112
|
-
- **Accept**: application/json
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
### HTTP response details
|
|
116
|
-
| Status code | Description | Response headers |
|
|
117
|
-
|-------------|-------------|------------------|
|
|
118
|
-
**200** | A list of all Authorization objects for the authenticated user. | - |
|
|
119
|
-
**0** | Unexpected error. | - |
|
|
120
|
-
|
|
121
|
-
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
122
|
-
|
|
123
|
-
# **removeBrokerageAuthorization**
|
|
124
|
-
|
|
125
|
-
#### **DELETE** /authorizations/{authorizationId}
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
### Example
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
```typescript
|
|
132
|
-
import { Snaptrade } from "snaptrade-typescript-sdk"
|
|
133
|
-
|
|
134
|
-
const snaptrade = new Snaptrade({
|
|
135
|
-
// Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
|
|
136
|
-
// basePath: "https://api.snaptrade.com/api/v1",
|
|
137
|
-
consumerKey: "YOUR_CONSUMER_KEY",
|
|
138
|
-
clientId: "YOUR_CLIENT_ID",
|
|
139
|
-
})
|
|
140
|
-
|
|
141
|
-
const removeBrokerageAuthorizationResponse = await snaptrade.connections.removeBrokerageAuthorization({
|
|
142
|
-
"authorizationId": "2bcd7cc3-e922-4976-bce1-9858296801c3",
|
|
143
|
-
"userId": "John.doe@snaptrade.com",
|
|
144
|
-
"userSecret": "USERSECRET123",
|
|
145
|
-
})
|
|
146
|
-
|
|
147
|
-
console.log(removeBrokerageAuthorizationResponse)
|
|
148
|
-
|
|
149
|
-
```
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
### Parameters
|
|
153
|
-
|
|
154
|
-
Name | Type | Description | Notes
|
|
155
|
-
------------- | ------------- | ------------- | -------------
|
|
156
|
-
**authorizationId** | [**string**] | The ID of the Authorization to delete. | defaults to undefined
|
|
157
|
-
**userId** | [**string**] | | defaults to undefined
|
|
158
|
-
**userSecret** | [**string**] | | defaults to undefined
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
### Return type
|
|
162
|
-
|
|
163
|
-
void (empty response body)
|
|
164
|
-
|
|
165
|
-
### HTTP request headers
|
|
166
|
-
|
|
167
|
-
- **Content-Type**: Not defined
|
|
168
|
-
- **Accept**: Not defined
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
### HTTP response details
|
|
172
|
-
| Status code | Description | Response headers |
|
|
173
|
-
|-------------|-------------|------------------|
|
|
174
|
-
**204** | Brokerage authorization object has been successfully deleted | - |
|
|
175
|
-
**400** | The specified authorizationId is invalid (not a UUID string). | - |
|
|
176
|
-
**404** | The specified authorizationId was not found. | - |
|
|
177
|
-
**0** | Unexpected error. | - |
|
|
178
|
-
|
|
179
|
-
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
180
|
-
|
|
181
|
-
# **sessionEvents**
|
|
182
|
-
|
|
183
|
-
#### **GET** /sessionEvents
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
### Example
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
```typescript
|
|
190
|
-
import { Snaptrade } from "snaptrade-typescript-sdk"
|
|
191
|
-
|
|
192
|
-
const snaptrade = new Snaptrade({
|
|
193
|
-
// Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
|
|
194
|
-
// basePath: "https://api.snaptrade.com/api/v1",
|
|
195
|
-
consumerKey: "YOUR_CONSUMER_KEY",
|
|
196
|
-
clientId: "YOUR_CLIENT_ID",
|
|
197
|
-
})
|
|
198
|
-
|
|
199
|
-
const sessionEventsResponse = await snaptrade.connections.sessionEvents({
|
|
200
|
-
"partnerClientId": "PASSIVTEST",
|
|
201
|
-
"userId": "917c8734-8470-4a3e-a18f-57c3f2ee6631,65e839a3-9103-4cfb-9b72-2071ef80c5f2",
|
|
202
|
-
"sessionId": "917c8734-8470-4a3e-a18f-57c3f2ee6631,65e839a3-9103-4cfb-9b72-2071ef80c5f2",
|
|
203
|
-
})
|
|
204
|
-
|
|
205
|
-
console.log(sessionEventsResponse)
|
|
206
|
-
|
|
207
|
-
```
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
### Parameters
|
|
211
|
-
|
|
212
|
-
Name | Type | Description | Notes
|
|
213
|
-
------------- | ------------- | ------------- | -------------
|
|
214
|
-
**partnerClientId** | [**string**] | | defaults to undefined
|
|
215
|
-
**userId** | [**string**] | Optional comma seperated list of user IDs used to filter the request on specific users | (optional) defaults to undefined
|
|
216
|
-
**sessionId** | [**string**] | Optional comma seperated list of session IDs used to filter the request on specific users | (optional) defaults to undefined
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
### Return type
|
|
220
|
-
|
|
221
|
-
**Array<ConnectionsSessionEvents200ResponseInner>**
|
|
222
|
-
|
|
223
|
-
### HTTP request headers
|
|
224
|
-
|
|
225
|
-
- **Content-Type**: Not defined
|
|
226
|
-
- **Accept**: application/json
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
### HTTP response details
|
|
230
|
-
| Status code | Description | Response headers |
|
|
231
|
-
|-------------|-------------|------------------|
|
|
232
|
-
**200** | A list of all Session Events for the Partner. | - |
|
|
233
|
-
**0** | Unexpected error. | - |
|
|
234
|
-
|
|
235
|
-
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
236
|
-
|
|
237
|
-
|
package/docs/ErrorLogsApi.md
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
# ErrorLogsApi
|
|
2
|
-
|
|
3
|
-
All URIs are relative to *https://api.snaptrade.com/api/v1*
|
|
4
|
-
|
|
5
|
-
Method | HTTP request | Description
|
|
6
|
-
------------- | ------------- | -------------
|
|
7
|
-
[**listUserErrors**](ErrorLogsApi.md#listUserErrors) | **GET** /snapTrade/listUserErrors | Retrieve error logs on behalf of your SnapTrade users
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
# **listUserErrors**
|
|
11
|
-
|
|
12
|
-
#### **GET** /snapTrade/listUserErrors
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
### Example
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
```typescript
|
|
19
|
-
import { Snaptrade } from "snaptrade-typescript-sdk"
|
|
20
|
-
|
|
21
|
-
const snaptrade = new Snaptrade({
|
|
22
|
-
// Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
|
|
23
|
-
// basePath: "https://api.snaptrade.com/api/v1",
|
|
24
|
-
consumerKey: "YOUR_CONSUMER_KEY",
|
|
25
|
-
clientId: "YOUR_CLIENT_ID",
|
|
26
|
-
})
|
|
27
|
-
|
|
28
|
-
const listUserErrorsResponse = await snaptrade.errorLogs.listUserErrors({
|
|
29
|
-
"userId": "John.doe@snaptrade.com",
|
|
30
|
-
"userSecret": "USERSECRET123",
|
|
31
|
-
})
|
|
32
|
-
|
|
33
|
-
console.log(listUserErrorsResponse)
|
|
34
|
-
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
### Parameters
|
|
39
|
-
|
|
40
|
-
Name | Type | Description | Notes
|
|
41
|
-
------------- | ------------- | ------------- | -------------
|
|
42
|
-
**userId** | [**string**] | | defaults to undefined
|
|
43
|
-
**userSecret** | [**string**] | | defaults to undefined
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
### Return type
|
|
47
|
-
|
|
48
|
-
**Array<UserErrorLog>**
|
|
49
|
-
|
|
50
|
-
### HTTP request headers
|
|
51
|
-
|
|
52
|
-
- **Content-Type**: Not defined
|
|
53
|
-
- **Accept**: application/json
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
### HTTP response details
|
|
57
|
-
| Status code | Description | Response headers |
|
|
58
|
-
|-------------|-------------|------------------|
|
|
59
|
-
**200** | A list of all user errors for a particular user in the last 90 days. | - |
|
|
60
|
-
|
|
61
|
-
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
62
|
-
|
|
63
|
-
|