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,314 +0,0 @@
1
- # OptionsApi
2
-
3
- All URIs are relative to *https://api.snaptrade.com/api/v1*
4
-
5
- Method | HTTP request | Description
6
- ------------- | ------------- | -------------
7
- [**getOptionStrategy**](OptionsApi.md#getOptionStrategy) | **POST** /accounts/{accountId}/optionStrategy | Creates an option strategy object that will be used to place an option strategy order
8
- [**getOptionsChain**](OptionsApi.md#getOptionsChain) | **GET** /accounts/{accountId}/optionsChain | Get the options chain
9
- [**getOptionsStrategyQuote**](OptionsApi.md#getOptionsStrategyQuote) | **GET** /accounts/{accountId}/optionStrategy/{optionStrategyId} | Get latest market data of option strategy
10
- [**listOptionHoldings**](OptionsApi.md#listOptionHoldings) | **GET** /accounts/{accountId}/options | Get the options holdings in the account
11
- [**placeOptionStrategy**](OptionsApi.md#placeOptionStrategy) | **POST** /accounts/{accountId}/optionStrategy/{optionStrategyId}/execute | Place an option strategy order on the brokerage
12
-
13
-
14
- # **getOptionStrategy**
15
-
16
- #### **POST** /accounts/{accountId}/optionStrategy
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 getOptionStrategyResponse = await snaptrade.options.getOptionStrategy({
33
- "userId": "John.doe@snaptrade.com",
34
- "userSecret": "USERSECRET123",
35
- "accountId": "accountId_example",
36
- "underlying_symbol_id": "2bcd7cc3-e922-4976-bce1-9858296801c3",
37
- "legs": [
38
- {
39
- "action": "BUY_TO_OPEN",
40
- "option_symbol_id": "SPY220819P00200000",
41
- "quantity": 1,
42
- }
43
- ],
44
- "strategy_type": "CUSTOM",
45
- })
46
-
47
- console.log(getOptionStrategyResponse)
48
-
49
- ```
50
-
51
-
52
- ### Parameters
53
-
54
- Name | Type | Description | Notes
55
- ------------- | ------------- | ------------- | -------------
56
- **optionsGetOptionStrategyRequest** | **OptionsGetOptionStrategyRequest**| |
57
- **userId** | [**string**] | | defaults to undefined
58
- **userSecret** | [**string**] | | defaults to undefined
59
- **accountId** | [**string**] | The ID of the account get positions. | defaults to undefined
60
-
61
-
62
- ### Return type
63
-
64
- **StrategyQuotes**
65
-
66
- ### HTTP request headers
67
-
68
- - **Content-Type**: application/json
69
- - **Accept**: application/json
70
-
71
-
72
- ### HTTP response details
73
- | Status code | Description | Response headers |
74
- |-------------|-------------|------------------|
75
- **200** | Order Quotes | - |
76
- **500** | Unexpected error | - |
77
-
78
- [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
79
-
80
- # **getOptionsChain**
81
-
82
- #### **GET** /accounts/{accountId}/optionsChain
83
-
84
-
85
- ### Example
86
-
87
-
88
- ```typescript
89
- import { Snaptrade } from "snaptrade-typescript-sdk"
90
-
91
- const snaptrade = new Snaptrade({
92
- // Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
93
- // basePath: "https://api.snaptrade.com/api/v1",
94
- consumerKey: "YOUR_CONSUMER_KEY",
95
- clientId: "YOUR_CLIENT_ID",
96
- })
97
-
98
- const getOptionsChainResponse = await snaptrade.options.getOptionsChain({
99
- "userId": "John.doe@snaptrade.com",
100
- "userSecret": "USERSECRET123",
101
- "accountId": "accountId_example",
102
- "symbol": "symbol_example",
103
- })
104
-
105
- console.log(getOptionsChainResponse)
106
-
107
- ```
108
-
109
-
110
- ### Parameters
111
-
112
- Name | Type | Description | Notes
113
- ------------- | ------------- | ------------- | -------------
114
- **userId** | [**string**] | | defaults to undefined
115
- **userSecret** | [**string**] | | defaults to undefined
116
- **accountId** | [**string**] | The ID of the account get positions. | defaults to undefined
117
- **symbol** | [**string**] | Universal symbol ID if symbol | defaults to undefined
118
-
119
-
120
- ### Return type
121
-
122
- **Array<OptionChainInner>**
123
-
124
- ### HTTP request headers
125
-
126
- - **Content-Type**: Not defined
127
- - **Accept**: application/json
128
-
129
-
130
- ### HTTP response details
131
- | Status code | Description | Response headers |
132
- |-------------|-------------|------------------|
133
- **200** | List of all Options available for the brokerage symbol | - |
134
- **500** | Unexpected error | - |
135
-
136
- [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
137
-
138
- # **getOptionsStrategyQuote**
139
-
140
- #### **GET** /accounts/{accountId}/optionStrategy/{optionStrategyId}
141
-
142
-
143
- ### Example
144
-
145
-
146
- ```typescript
147
- import { Snaptrade } from "snaptrade-typescript-sdk"
148
-
149
- const snaptrade = new Snaptrade({
150
- // Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
151
- // basePath: "https://api.snaptrade.com/api/v1",
152
- consumerKey: "YOUR_CONSUMER_KEY",
153
- clientId: "YOUR_CLIENT_ID",
154
- })
155
-
156
- const getOptionsStrategyQuoteResponse = await snaptrade.options.getOptionsStrategyQuote({
157
- "userId": "John.doe@snaptrade.com",
158
- "userSecret": "USERSECRET123",
159
- "accountId": "accountId_example",
160
- "optionStrategyId": "2bcd7cc3-e922-4976-bce1-9858296801c3",
161
- })
162
-
163
- console.log(getOptionsStrategyQuoteResponse)
164
-
165
- ```
166
-
167
-
168
- ### Parameters
169
-
170
- Name | Type | Description | Notes
171
- ------------- | ------------- | ------------- | -------------
172
- **userId** | [**string**] | | defaults to undefined
173
- **userSecret** | [**string**] | | defaults to undefined
174
- **accountId** | [**string**] | The ID of the account get positions. | defaults to undefined
175
- **optionStrategyId** | [**string**] | Option strategy id obtained from response when creating option strategy object | defaults to undefined
176
-
177
-
178
- ### Return type
179
-
180
- **StrategyQuotes**
181
-
182
- ### HTTP request headers
183
-
184
- - **Content-Type**: Not defined
185
- - **Accept**: application/json
186
-
187
-
188
- ### HTTP response details
189
- | Status code | Description | Response headers |
190
- |-------------|-------------|------------------|
191
- **200** | Order Quotes | - |
192
- **500** | Unexpected error | - |
193
-
194
- [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
195
-
196
- # **listOptionHoldings**
197
-
198
- #### **GET** /accounts/{accountId}/options
199
-
200
-
201
- ### Example
202
-
203
-
204
- ```typescript
205
- import { Snaptrade } from "snaptrade-typescript-sdk"
206
-
207
- const snaptrade = new Snaptrade({
208
- // Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
209
- // basePath: "https://api.snaptrade.com/api/v1",
210
- consumerKey: "YOUR_CONSUMER_KEY",
211
- clientId: "YOUR_CLIENT_ID",
212
- })
213
-
214
- const listOptionHoldingsResponse = await snaptrade.options.listOptionHoldings({
215
- "userId": "John.doe@snaptrade.com",
216
- "userSecret": "USERSECRET123",
217
- "accountId": "accountId_example",
218
- })
219
-
220
- console.log(listOptionHoldingsResponse)
221
-
222
- ```
223
-
224
-
225
- ### Parameters
226
-
227
- Name | Type | Description | Notes
228
- ------------- | ------------- | ------------- | -------------
229
- **userId** | [**string**] | | defaults to undefined
230
- **userSecret** | [**string**] | | defaults to undefined
231
- **accountId** | [**string**] | The ID of the account get positions. | defaults to undefined
232
-
233
-
234
- ### Return type
235
-
236
- **OptionsHoldings**
237
-
238
- ### HTTP request headers
239
-
240
- - **Content-Type**: Not defined
241
- - **Accept**: application/json
242
-
243
-
244
- ### HTTP response details
245
- | Status code | Description | Response headers |
246
- |-------------|-------------|------------------|
247
- **200** | The option holdings in the account | - |
248
- **500** | Unexpected error | - |
249
-
250
- [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
251
-
252
- # **placeOptionStrategy**
253
-
254
- #### **POST** /accounts/{accountId}/optionStrategy/{optionStrategyId}/execute
255
-
256
-
257
- ### Example
258
-
259
-
260
- ```typescript
261
- import { Snaptrade } from "snaptrade-typescript-sdk"
262
-
263
- const snaptrade = new Snaptrade({
264
- // Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
265
- // basePath: "https://api.snaptrade.com/api/v1",
266
- consumerKey: "YOUR_CONSUMER_KEY",
267
- clientId: "YOUR_CLIENT_ID",
268
- })
269
-
270
- const placeOptionStrategyResponse = await snaptrade.options.placeOptionStrategy({
271
- "userId": "John.doe@snaptrade.com",
272
- "userSecret": "USERSECRET123",
273
- "accountId": "2bcd7cc3-e922-4976-bce1-9858296801c3",
274
- "optionStrategyId": "2bcd7cc3-e922-4976-bce1-9858296801c3",
275
- "order_type": "Limit",
276
- "time_in_force": "DAY",
277
- "price": 31.33,
278
- })
279
-
280
- console.log(placeOptionStrategyResponse)
281
-
282
- ```
283
-
284
-
285
- ### Parameters
286
-
287
- Name | Type | Description | Notes
288
- ------------- | ------------- | ------------- | -------------
289
- **optionsPlaceOptionStrategyRequest** | **OptionsPlaceOptionStrategyRequest**| |
290
- **userId** | [**string**] | | defaults to undefined
291
- **userSecret** | [**string**] | | defaults to undefined
292
- **accountId** | [**string**] | The ID of the account get positions. | defaults to undefined
293
- **optionStrategyId** | [**string**] | Option strategy id obtained from response when creating option strategy object | defaults to undefined
294
-
295
-
296
- ### Return type
297
-
298
- **StrategyOrderRecord**
299
-
300
- ### HTTP request headers
301
-
302
- - **Content-Type**: application/json
303
- - **Accept**: application/json
304
-
305
-
306
- ### HTTP response details
307
- | Status code | Description | Response headers |
308
- |-------------|-------------|------------------|
309
- **200** | Status of strategy order placed | - |
310
- **500** | Unexpected error | - |
311
-
312
- [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
313
-
314
-