snaptrade-typescript-sdk 8.7.0 → 8.9.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 (179) hide show
  1. package/README.md +1 -3
  2. package/dist/api/portfolio-management-api.d.ts +0 -47
  3. package/dist/api/portfolio-management-api.js +0 -103
  4. package/dist/api.d.ts +0 -1
  5. package/dist/api.js +0 -1
  6. package/dist/client.d.ts +1 -2
  7. package/dist/client.js +0 -1
  8. package/dist/configuration.js +1 -1
  9. package/dist/models/index.d.ts +0 -1
  10. package/dist/models/index.js +0 -1
  11. package/package.json +4 -1
  12. package/.konfig/generate-id.txt +0 -1
  13. package/.konfigignore +0 -3
  14. package/api/account-information-api-custom.ts +0 -3
  15. package/api/account-information-api.ts +0 -1062
  16. package/api/api-disclaimer-api-custom.ts +0 -3
  17. package/api/api-disclaimer-api.ts +0 -183
  18. package/api/api-status-api-custom.ts +0 -3
  19. package/api/api-status-api.ts +0 -128
  20. package/api/authentication-api-custom.ts +0 -3
  21. package/api/authentication-api.ts +0 -568
  22. package/api/connections-api-custom.ts +0 -3
  23. package/api/connections-api.ts +0 -544
  24. package/api/error-logs-api-custom.ts +0 -3
  25. package/api/error-logs-api.ts +0 -174
  26. package/api/options-api-custom.ts +0 -3
  27. package/api/options-api.ts +0 -739
  28. package/api/portfolio-management-api-custom.ts +0 -3
  29. package/api/portfolio-management-api.ts +0 -3301
  30. package/api/reference-data-api-custom.ts +0 -3
  31. package/api/reference-data-api.ts +0 -1031
  32. package/api/trading-api-custom.ts +0 -3
  33. package/api/trading-api.ts +0 -1304
  34. package/api/transactions-and-reporting-api-custom.ts +0 -3
  35. package/api/transactions-and-reporting-api.ts +0 -408
  36. package/api.ts +0 -27
  37. package/base.ts +0 -70
  38. package/client-custom.ts +0 -5
  39. package/client.ts +0 -59
  40. package/common.ts +0 -163
  41. package/configuration.ts +0 -131
  42. package/dist/api/api-disclaimer-api-custom.d.ts +0 -3
  43. package/dist/api/api-disclaimer-api-custom.js +0 -27
  44. package/dist/api/api-disclaimer-api.d.ts +0 -97
  45. package/dist/api/api-disclaimer-api.js +0 -247
  46. package/dist/models/apidisclaimer-accept-request.d.ts +0 -24
  47. package/dist/models/apidisclaimer-accept-request.js +0 -15
  48. package/docs/AccountInformationApi.md +0 -469
  49. package/docs/ApiDisclaimerApi.md +0 -64
  50. package/docs/ApiStatusApi.md +0 -58
  51. package/docs/AuthenticationApi.md +0 -293
  52. package/docs/ConnectionsApi.md +0 -238
  53. package/docs/ErrorLogsApi.md +0 -62
  54. package/docs/OptionsApi.md +0 -312
  55. package/docs/PortfolioManagementApi.md +0 -1785
  56. package/docs/ReferenceDataApi.md +0 -568
  57. package/docs/TradingApi.md +0 -596
  58. package/docs/TransactionsAndReportingApi.md +0 -144
  59. package/index.test.ts +0 -177
  60. package/index.ts +0 -18
  61. package/jest.config.ts +0 -11
  62. package/models/account-holdings-account.ts +0 -61
  63. package/models/account-holdings.ts +0 -61
  64. package/models/account-order-record-status.ts +0 -48
  65. package/models/account-order-record.ts +0 -151
  66. package/models/account-simple.ts +0 -52
  67. package/models/account-sync-status.ts +0 -32
  68. package/models/account.ts +0 -91
  69. package/models/action.ts +0 -30
  70. package/models/apidisclaimer-accept-request.ts +0 -29
  71. package/models/authentication-login-snap-trade-user200-response.ts +0 -31
  72. package/models/balance.ts +0 -40
  73. package/models/brokerage-authorization-type-read-only-brokerage.ts +0 -43
  74. package/models/brokerage-authorization-type-read-only.ts +0 -68
  75. package/models/brokerage-authorization-type.ts +0 -39
  76. package/models/brokerage-authorization.ts +0 -82
  77. package/models/brokerage-symbol.ts +0 -61
  78. package/models/brokerage-type.ts +0 -37
  79. package/models/brokerage.ts +0 -136
  80. package/models/calculated-trade.ts +0 -40
  81. package/models/cash-restriction.ts +0 -63
  82. package/models/connections-session-events200-response-inner.ts +0 -25
  83. package/models/currency.ts +0 -43
  84. package/models/delete-user-response.ts +0 -37
  85. package/models/dividend-at-date.ts +0 -43
  86. package/models/encrypted-response-encrypted-message-data.ts +0 -43
  87. package/models/encrypted-response.ts +0 -38
  88. package/models/exchange-rate-pairs.ts +0 -46
  89. package/models/exchange.ts +0 -73
  90. package/models/excluded-asset.ts +0 -34
  91. package/models/index.ts +0 -109
  92. package/models/jwt.ts +0 -31
  93. package/models/login-redirect-uri.ts +0 -35
  94. package/models/manual-trade-and-impact.ts +0 -49
  95. package/models/manual-trade-balance.ts +0 -49
  96. package/models/manual-trade-form.ts +0 -80
  97. package/models/manual-trade-symbol.ts +0 -64
  98. package/models/manual-trade.ts +0 -88
  99. package/models/model-asset-class-details.ts +0 -41
  100. package/models/model-asset-class-target.ts +0 -34
  101. package/models/model-asset-class.ts +0 -37
  102. package/models/model-portfolio-asset-class.ts +0 -40
  103. package/models/model-portfolio-details.ts +0 -50
  104. package/models/model-portfolio-security.ts +0 -40
  105. package/models/model-portfolio.ts +0 -52
  106. package/models/model400-failed-request-response.ts +0 -37
  107. package/models/model401-failed-request-response.ts +0 -37
  108. package/models/model403-failed-request-response.ts +0 -37
  109. package/models/model404-failed-request-response.ts +0 -37
  110. package/models/monthly-dividends.ts +0 -40
  111. package/models/net-contributions.ts +0 -43
  112. package/models/net-dividend.ts +0 -46
  113. package/models/option-chain-inner-chain-per-root-inner-chain-per-strike-price-inner.ts +0 -43
  114. package/models/option-chain-inner-chain-per-root-inner.ts +0 -46
  115. package/models/option-chain-inner.ts +0 -58
  116. package/models/option-leg.ts +0 -53
  117. package/models/option-strategy-legs-inner.ts +0 -47
  118. package/models/option-strategy.ts +0 -61
  119. package/models/options-get-option-strategy-request.ts +0 -51
  120. package/models/options-holdings.ts +0 -67
  121. package/models/options-place-option-strategy-request.ts +0 -57
  122. package/models/options-position.ts +0 -73
  123. package/models/options-symbol.ts +0 -94
  124. package/models/order-type.ts +0 -32
  125. package/models/partner-data.ts +0 -100
  126. package/models/past-value.ts +0 -43
  127. package/models/performance-custom.ts +0 -154
  128. package/models/portfolio-group-info.ts +0 -115
  129. package/models/portfolio-group-position.ts +0 -46
  130. package/models/portfolio-group-settings.ts +0 -58
  131. package/models/portfolio-group.ts +0 -37
  132. package/models/position-symbol.ts +0 -64
  133. package/models/position.ts +0 -64
  134. package/models/redirect-tokenand-pin.ts +0 -37
  135. package/models/security-type.ts +0 -49
  136. package/models/session-event.ts +0 -80
  137. package/models/snap-trade-apidisclaimer-accept-status.ts +0 -37
  138. package/models/snap-trade-holdings-account-account-id.ts +0 -82
  139. package/models/snap-trade-holdings-account.ts +0 -79
  140. package/models/snap-trade-holdings-total-value.ts +0 -37
  141. package/models/snap-trade-login-user-request-body.ts +0 -61
  142. package/models/snap-trade-register-user-request-body.ts +0 -35
  143. package/models/status.ts +0 -43
  144. package/models/strategy-impact-legs-inner.ts +0 -67
  145. package/models/strategy-impact.ts +0 -94
  146. package/models/strategy-order-place-orders-inner-legs-inner.ts +0 -67
  147. package/models/strategy-order-place-orders-inner.ts +0 -286
  148. package/models/strategy-order-place.ts +0 -40
  149. package/models/strategy-order-record.ts +0 -133
  150. package/models/strategy-quotes-greek.ts +0 -55
  151. package/models/strategy-quotes.ts +0 -67
  152. package/models/sub-period-return-rate.ts +0 -43
  153. package/models/symbol-query.ts +0 -29
  154. package/models/symbol.ts +0 -76
  155. package/models/symbols-quotes.ts +0 -64
  156. package/models/target-asset.ts +0 -62
  157. package/models/time-in-force.ts +0 -31
  158. package/models/trade-execution-status.ts +0 -105
  159. package/models/trade-impact.ts +0 -61
  160. package/models/trade.ts +0 -88
  161. package/models/trading-cancel-user-account-order-request.ts +0 -29
  162. package/models/trading-place-ocoorder-request.ts +0 -35
  163. package/models/transactions-status.ts +0 -35
  164. package/models/underlying-symbol.ts +0 -76
  165. package/models/universal-activity.ts +0 -127
  166. package/models/universal-symbol-ticker.ts +0 -82
  167. package/models/universal-symbol.ts +0 -80
  168. package/models/user-error-log.ts +0 -61
  169. package/models/user-idand-secret.ts +0 -37
  170. package/models/user-settings.ts +0 -88
  171. package/models/usexchange.ts +0 -79
  172. package/pagination/page-types.ts +0 -34
  173. package/pagination/page.ts +0 -58
  174. package/pagination/pageable.ts +0 -113
  175. package/pagination/paginate.ts +0 -41
  176. package/requestAfterHook.ts +0 -53
  177. package/requestBeforeHook.ts +0 -15
  178. package/tsconfig.json +0 -22
  179. package/tsconfig.test.json +0 -6
@@ -1,1785 +0,0 @@
1
- # PortfolioManagementApi
2
-
3
- All URIs are relative to *https://api.snaptrade.com/api/v1*
4
-
5
- Method | HTTP request | Description
6
- ------------- | ------------- | -------------
7
- [**addPortfolioExcludedAsset**](PortfolioManagementApi.md#addPortfolioExcludedAsset) | **POST** /portfolioGroups/{portfolioGroupId}/excludedassets | Adds an asset to exclude to a portfolio group
8
- [**create**](PortfolioManagementApi.md#create) | **POST** /portfolioGroups | Create new portfolio group
9
- [**createAssetClass**](PortfolioManagementApi.md#createAssetClass) | **POST** /modelAssetClass | Create a new model asset class
10
- [**createModelPortfolio**](PortfolioManagementApi.md#createModelPortfolio) | **POST** /modelPortfolio | Creates a new model portfolio
11
- [**deleteAssetClass**](PortfolioManagementApi.md#deleteAssetClass) | **DELETE** /modelAssetClass/{modelAssetClassId} | Deletes a model asset class
12
- [**deleteExcludedAsset**](PortfolioManagementApi.md#deleteExcludedAsset) | **DELETE** /portfolioGroups/{portfolioGroupId}/excludedassets/{symbolId} | Unexclude an asset from a portfolio group
13
- [**deleteModelPortfolioById**](PortfolioManagementApi.md#deleteModelPortfolioById) | **DELETE** /modelPortfolio/{modelPortfolioId} | Deletes a model portfolio
14
- [**deletePortfoli**](PortfolioManagementApi.md#deletePortfoli) | **DELETE** /portfolioGroups/{portfolioGroupId} | Remove a target portfolio.
15
- [**deletePortfolioTargetById**](PortfolioManagementApi.md#deletePortfolioTargetById) | **DELETE** /portfolioGroups/{portfolioGroupId}/targets/{targetAssetId} | Remove a TargetAsset.
16
- [**detailAssetClass**](PortfolioManagementApi.md#detailAssetClass) | **GET** /modelAssetClass/{modelAssetClassId} | Get details of a model asset class
17
- [**getCalculatedTradeById**](PortfolioManagementApi.md#getCalculatedTradeById) | **GET** /portfolioGroups/{portfolioGroupId}/calculatedtrades/{calculatedTradeId}/{TradeId} | Return an individual trade
18
- [**getModelDetailsById**](PortfolioManagementApi.md#getModelDetailsById) | **GET** /modelPortfolio/{modelPortfolioId} | Get details of a model portfolio
19
- [**getPortfolioBalances**](PortfolioManagementApi.md#getPortfolioBalances) | **GET** /portfolioGroups/{portfolioGroupId}/balances | Get sum of cash balances in portfolio group
20
- [**getPortfolioDetailsById**](PortfolioManagementApi.md#getPortfolioDetailsById) | **GET** /portfolioGroups/{portfolioGroupId} | Get details of a target portfolio
21
- [**getPortfolioInfo**](PortfolioManagementApi.md#getPortfolioInfo) | **GET** /portfolioGroups/{portfolioGroupId}/info | Return a whole bunch of relevant information relating to a portfolio group.
22
- [**getPortfolioPositions**](PortfolioManagementApi.md#getPortfolioPositions) | **GET** /portfolioGroups/{portfolioGroupId}/positions | Get total of each postions owned in portfolio group
23
- [**getPortfolioSettings**](PortfolioManagementApi.md#getPortfolioSettings) | **GET** /portfolioGroups/{portfolioGroupId}/settings | Get portfolio group settings
24
- [**getPortfolioTargetById**](PortfolioManagementApi.md#getPortfolioTargetById) | **GET** /portfolioGroups/{portfolioGroupId}/targets/{targetAssetId} | Get a specific target from a portfolio group
25
- [**getPortfolioTargets**](PortfolioManagementApi.md#getPortfolioTargets) | **GET** /portfolioGroups/{portfolioGroupId}/targets | Get all target assets under the specified PortfolioGroup.
26
- [**getPortoflioExcludedAssets**](PortfolioManagementApi.md#getPortoflioExcludedAssets) | **GET** /portfolioGroups/{portfolioGroupId}/excludedassets | Get an array of excluded assets associated with a portfolio group\\
27
- [**importModelPortfolio**](PortfolioManagementApi.md#importModelPortfolio) | **POST** /portfolioGroups/{portfolioGroupId}/import | Import target allocation based on portfolio group
28
- [**list**](PortfolioManagementApi.md#list) | **GET** /portfolioGroups | List all portfolio groups
29
- [**listAssetClasses**](PortfolioManagementApi.md#listAssetClasses) | **GET** /modelAssetClass | List of model asset class
30
- [**listCalculatedTrades**](PortfolioManagementApi.md#listCalculatedTrades) | **GET** /portfolioGroups/{portfolioGroupId}/calculatedtrades | List of trades to make to rebalance portfolio group
31
- [**listModelPortfolio**](PortfolioManagementApi.md#listModelPortfolio) | **GET** /modelPortfolio | List of model portfolio
32
- [**listPortfolioAccounts**](PortfolioManagementApi.md#listPortfolioAccounts) | **GET** /portfolioGroups/{portfolioGroupId}/accounts | Get all accounts associated with a portfolio group
33
- [**modifyModelPortfolioById**](PortfolioManagementApi.md#modifyModelPortfolioById) | **POST** /modelPortfolio/{modelPortfolioId} | Updates model portfolio object
34
- [**savePortfolio**](PortfolioManagementApi.md#savePortfolio) | **PATCH** /portfolioGroups/{portfolioGroupId} | Update an existing target portfolio.
35
- [**searchPortfolioSymbols**](PortfolioManagementApi.md#searchPortfolioSymbols) | **POST** /portfolioGroups/{portfolioGroupId}/symbols | Search for symbols limited to brokerages under the specified portfolio group
36
- [**setPortfolioTargets**](PortfolioManagementApi.md#setPortfolioTargets) | **POST** /portfolioGroups/{portfolioGroupId}/targets | Set a new list of target assets under the specified PortfolioGroup. All existing target assets under this portfolio group will be replaced with the new list.
37
- [**updateAssetClass**](PortfolioManagementApi.md#updateAssetClass) | **POST** /modelAssetClass/{modelAssetClassId} | Updates model asset class objects
38
- [**updatePortfolioSettings**](PortfolioManagementApi.md#updatePortfolioSettings) | **PATCH** /portfolioGroups/{portfolioGroupId}/settings | Updates portfolio group settings
39
- [**updatePortfolioTargetById**](PortfolioManagementApi.md#updatePortfolioTargetById) | **PATCH** /portfolioGroups/{portfolioGroupId}/targets/{targetAssetId} | Update a TargetAsset under the specified PortfolioGroup.
40
-
41
-
42
- # **addPortfolioExcludedAsset**
43
-
44
- #### **POST** /portfolioGroups/{portfolioGroupId}/excludedassets
45
-
46
-
47
- ### Example
48
-
49
-
50
- ```typescript
51
- import { Snaptrade } from "snaptrade-typescript-sdk";
52
-
53
- const snaptrade = new Snaptrade({
54
- // Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
55
- // basePath: "https://api.snaptrade.com/api/v1",
56
- consumerKey: "YOUR_CONSUMER_KEY",
57
- clientId: "YOUR_CLIENT_ID",
58
- });
59
-
60
- const addPortfolioExcludedAssetResponse =
61
- await snaptrade.portfolioManagement.addPortfolioExcludedAsset({
62
- portfolioGroupId: "portfolioGroupId_example",
63
- id: "2bcd7cc3-e922-4976-bce1-9858296801c3",
64
- symbol: "VAB.TO",
65
- raw_symbol: "VAB",
66
- description: "VANGUARD CDN AGGREGATE BOND INDEX ETF",
67
- });
68
-
69
- console.log(addPortfolioExcludedAssetResponse);
70
- ```
71
-
72
-
73
- ### Parameters
74
-
75
- Name | Type | Description | Notes
76
- ------------- | ------------- | ------------- | -------------
77
- **universalSymbol** | **UniversalSymbol**| |
78
- **portfolioGroupId** | [**string**] | The ID of the PortfolioGroup under which to exclude an asset. | defaults to undefined
79
-
80
-
81
- ### Return type
82
-
83
- **ExcludedAsset**
84
-
85
- ### HTTP request headers
86
-
87
- - **Content-Type**: application/json
88
- - **Accept**: application/json
89
-
90
-
91
- ### HTTP response details
92
- | Status code | Description | Response headers |
93
- |-------------|-------------|------------------|
94
- **200** | An asset is excluded from calculations in portfolio group. | - |
95
-
96
- [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
97
-
98
- # **create**
99
-
100
- #### **POST** /portfolioGroups
101
-
102
-
103
- ### Example
104
-
105
-
106
- ```typescript
107
- import { Snaptrade } from "snaptrade-typescript-sdk";
108
-
109
- const snaptrade = new Snaptrade({
110
- // Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
111
- // basePath: "https://api.snaptrade.com/api/v1",
112
- consumerKey: "YOUR_CONSUMER_KEY",
113
- clientId: "YOUR_CLIENT_ID",
114
- });
115
-
116
- const createResponse = await snaptrade.portfolioManagement.create({
117
- userId: "John.doe@snaptrade.com",
118
- userSecret: "USERSECRET123",
119
- id: "2bcd7cc3-e922-4976-bce1-9858296801c3",
120
- name: "Combined Retirement Portfolio",
121
- });
122
-
123
- console.log(createResponse);
124
- ```
125
-
126
-
127
- ### Parameters
128
-
129
- Name | Type | Description | Notes
130
- ------------- | ------------- | ------------- | -------------
131
- **requestBody** | **{ [key: string]: any; }**| |
132
- **userId** | [**string**] | | defaults to undefined
133
- **userSecret** | [**string**] | | defaults to undefined
134
-
135
-
136
- ### Return type
137
-
138
- **Array<PortfolioGroup>**
139
-
140
- ### HTTP request headers
141
-
142
- - **Content-Type**: application/json
143
- - **Accept**: application/json
144
-
145
-
146
- ### HTTP response details
147
- | Status code | Description | Response headers |
148
- |-------------|-------------|------------------|
149
- **200** | A new PortfolioGroup is created. | - |
150
- **400** | The input data is missing or invalid. | - |
151
- **0** | Unexpected error. | - |
152
-
153
- [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
154
-
155
- # **createAssetClass**
156
-
157
- #### **POST** /modelAssetClass
158
-
159
-
160
- ### Example
161
-
162
-
163
- ```typescript
164
- import { Snaptrade } from "snaptrade-typescript-sdk";
165
-
166
- const snaptrade = new Snaptrade({
167
- // Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
168
- // basePath: "https://api.snaptrade.com/api/v1",
169
- consumerKey: "YOUR_CONSUMER_KEY",
170
- clientId: "YOUR_CLIENT_ID",
171
- });
172
-
173
- const createAssetClassResponse =
174
- await snaptrade.portfolioManagement.createAssetClass();
175
-
176
- console.log(createAssetClassResponse);
177
- ```
178
-
179
-
180
- ### Parameters
181
- This endpoint does not need any parameter.
182
-
183
-
184
- ### Return type
185
-
186
- **ModelAssetClassDetails**
187
-
188
- ### HTTP request headers
189
-
190
- - **Content-Type**: Not defined
191
- - **Accept**: application/json
192
-
193
-
194
- ### HTTP response details
195
- | Status code | Description | Response headers |
196
- |-------------|-------------|------------------|
197
- **200** | A new asset class is created. | - |
198
-
199
- [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
200
-
201
- # **createModelPortfolio**
202
-
203
- #### **POST** /modelPortfolio
204
-
205
-
206
- ### Example
207
-
208
-
209
- ```typescript
210
- import { Snaptrade } from "snaptrade-typescript-sdk";
211
-
212
- const snaptrade = new Snaptrade({
213
- // Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
214
- // basePath: "https://api.snaptrade.com/api/v1",
215
- consumerKey: "YOUR_CONSUMER_KEY",
216
- clientId: "YOUR_CLIENT_ID",
217
- });
218
-
219
- const createModelPortfolioResponse =
220
- await snaptrade.portfolioManagement.createModelPortfolio();
221
-
222
- console.log(createModelPortfolioResponse);
223
- ```
224
-
225
-
226
- ### Parameters
227
- This endpoint does not need any parameter.
228
-
229
-
230
- ### Return type
231
-
232
- **ModelPortfolioDetails**
233
-
234
- ### HTTP request headers
235
-
236
- - **Content-Type**: Not defined
237
- - **Accept**: application/json
238
-
239
-
240
- ### HTTP response details
241
- | Status code | Description | Response headers |
242
- |-------------|-------------|------------------|
243
- **200** | A new model portfolio is created. | - |
244
-
245
- [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
246
-
247
- # **deleteAssetClass**
248
-
249
- #### **DELETE** /modelAssetClass/{modelAssetClassId}
250
-
251
-
252
- ### Example
253
-
254
-
255
- ```typescript
256
- import { Snaptrade } from "snaptrade-typescript-sdk";
257
-
258
- const snaptrade = new Snaptrade({
259
- // Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
260
- // basePath: "https://api.snaptrade.com/api/v1",
261
- consumerKey: "YOUR_CONSUMER_KEY",
262
- clientId: "YOUR_CLIENT_ID",
263
- });
264
-
265
- const deleteAssetClassResponse =
266
- await snaptrade.portfolioManagement.deleteAssetClass({
267
- modelAssetClassId: "2bcd7cc3-e922-4976-bce1-9858296801c3",
268
- });
269
-
270
- console.log(deleteAssetClassResponse);
271
- ```
272
-
273
-
274
- ### Parameters
275
-
276
- Name | Type | Description | Notes
277
- ------------- | ------------- | ------------- | -------------
278
- **modelAssetClassId** | [**string**] | The ID of the model asset class to delete. | defaults to undefined
279
-
280
-
281
- ### Return type
282
-
283
- void (empty response body)
284
-
285
- ### HTTP request headers
286
-
287
- - **Content-Type**: Not defined
288
- - **Accept**: Not defined
289
-
290
-
291
- ### HTTP response details
292
- | Status code | Description | Response headers |
293
- |-------------|-------------|------------------|
294
- **204** | No content | - |
295
-
296
- [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
297
-
298
- # **deleteExcludedAsset**
299
-
300
- #### **DELETE** /portfolioGroups/{portfolioGroupId}/excludedassets/{symbolId}
301
-
302
-
303
- ### Example
304
-
305
-
306
- ```typescript
307
- import { Snaptrade } from "snaptrade-typescript-sdk";
308
-
309
- const snaptrade = new Snaptrade({
310
- // Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
311
- // basePath: "https://api.snaptrade.com/api/v1",
312
- consumerKey: "YOUR_CONSUMER_KEY",
313
- clientId: "YOUR_CLIENT_ID",
314
- });
315
-
316
- const deleteExcludedAssetResponse =
317
- await snaptrade.portfolioManagement.deleteExcludedAsset({
318
- portfolioGroupId: "portfolioGroupId_example",
319
- symbolId: "symbolId_example",
320
- });
321
-
322
- console.log(deleteExcludedAssetResponse);
323
- ```
324
-
325
-
326
- ### Parameters
327
-
328
- Name | Type | Description | Notes
329
- ------------- | ------------- | ------------- | -------------
330
- **portfolioGroupId** | [**string**] | The ID of the PortfolioGroup under which to unexclude an asset. | defaults to undefined
331
- **symbolId** | [**string**] | The ID of the excluded asset Symbol to delete. | defaults to undefined
332
-
333
-
334
- ### Return type
335
-
336
- void (empty response body)
337
-
338
- ### HTTP request headers
339
-
340
- - **Content-Type**: Not defined
341
- - **Accept**: Not defined
342
-
343
-
344
- ### HTTP response details
345
- | Status code | Description | Response headers |
346
- |-------------|-------------|------------------|
347
- **200** | Excluded asset deleted | - |
348
-
349
- [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
350
-
351
- # **deleteModelPortfolioById**
352
-
353
- #### **DELETE** /modelPortfolio/{modelPortfolioId}
354
-
355
-
356
- ### Example
357
-
358
-
359
- ```typescript
360
- import { Snaptrade } from "snaptrade-typescript-sdk";
361
-
362
- const snaptrade = new Snaptrade({
363
- // Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
364
- // basePath: "https://api.snaptrade.com/api/v1",
365
- consumerKey: "YOUR_CONSUMER_KEY",
366
- clientId: "YOUR_CLIENT_ID",
367
- });
368
-
369
- const deleteModelPortfolioByIdResponse =
370
- await snaptrade.portfolioManagement.deleteModelPortfolioById({
371
- modelPortfolioId: "2bcd7cc3-e922-4976-bce1-9858296801c3",
372
- });
373
-
374
- console.log(deleteModelPortfolioByIdResponse);
375
- ```
376
-
377
-
378
- ### Parameters
379
-
380
- Name | Type | Description | Notes
381
- ------------- | ------------- | ------------- | -------------
382
- **modelPortfolioId** | [**string**] | The ID of the model portfolio to delete. | defaults to undefined
383
-
384
-
385
- ### Return type
386
-
387
- void (empty response body)
388
-
389
- ### HTTP request headers
390
-
391
- - **Content-Type**: Not defined
392
- - **Accept**: Not defined
393
-
394
-
395
- ### HTTP response details
396
- | Status code | Description | Response headers |
397
- |-------------|-------------|------------------|
398
- **204** | No content | - |
399
-
400
- [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
401
-
402
- # **deletePortfoli**
403
-
404
- #### **DELETE** /portfolioGroups/{portfolioGroupId}
405
-
406
-
407
- ### Example
408
-
409
-
410
- ```typescript
411
- import { Snaptrade } from "snaptrade-typescript-sdk";
412
-
413
- const snaptrade = new Snaptrade({
414
- // Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
415
- // basePath: "https://api.snaptrade.com/api/v1",
416
- consumerKey: "YOUR_CONSUMER_KEY",
417
- clientId: "YOUR_CLIENT_ID",
418
- });
419
-
420
- const deletePortfoliResponse =
421
- await snaptrade.portfolioManagement.deletePortfoli({
422
- portfolioGroupId: "portfolioGroupId_example",
423
- });
424
-
425
- console.log(deletePortfoliResponse);
426
- ```
427
-
428
-
429
- ### Parameters
430
-
431
- Name | Type | Description | Notes
432
- ------------- | ------------- | ------------- | -------------
433
- **portfolioGroupId** | [**string**] | The ID of the PortfolioGroup to delete. | defaults to undefined
434
-
435
-
436
- ### Return type
437
-
438
- **PortfolioGroup**
439
-
440
- ### HTTP request headers
441
-
442
- - **Content-Type**: Not defined
443
- - **Accept**: application/json
444
-
445
-
446
- ### HTTP response details
447
- | Status code | Description | Response headers |
448
- |-------------|-------------|------------------|
449
- **200** | The PortfolioGroup object which was deleted. | - |
450
- **400** | The specified portfolioGroupId is invalid (not a UUID string). | - |
451
- **404** | The specified portfolioGroupId was not found. | - |
452
- **0** | Unexpected error. | - |
453
-
454
- [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
455
-
456
- # **deletePortfolioTargetById**
457
-
458
- #### **DELETE** /portfolioGroups/{portfolioGroupId}/targets/{targetAssetId}
459
-
460
-
461
- ### Example
462
-
463
-
464
- ```typescript
465
- import { Snaptrade } from "snaptrade-typescript-sdk";
466
-
467
- const snaptrade = new Snaptrade({
468
- // Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
469
- // basePath: "https://api.snaptrade.com/api/v1",
470
- consumerKey: "YOUR_CONSUMER_KEY",
471
- clientId: "YOUR_CLIENT_ID",
472
- });
473
-
474
- const deletePortfolioTargetByIdResponse =
475
- await snaptrade.portfolioManagement.deletePortfolioTargetById({
476
- portfolioGroupId: "portfolioGroupId_example",
477
- targetAssetId: "targetAssetId_example",
478
- });
479
-
480
- console.log(deletePortfolioTargetByIdResponse);
481
- ```
482
-
483
-
484
- ### Parameters
485
-
486
- Name | Type | Description | Notes
487
- ------------- | ------------- | ------------- | -------------
488
- **portfolioGroupId** | [**string**] | The ID of the PortfolioGroup under which to remove the target asset. | defaults to undefined
489
- **targetAssetId** | [**string**] | The ID of the TargetAsset to delete. | defaults to undefined
490
-
491
-
492
- ### Return type
493
-
494
- **TargetAsset**
495
-
496
- ### HTTP request headers
497
-
498
- - **Content-Type**: Not defined
499
- - **Accept**: application/json
500
-
501
-
502
- ### HTTP response details
503
- | Status code | Description | Response headers |
504
- |-------------|-------------|------------------|
505
- **200** | The TargetAsset object which was deleted. | - |
506
- **400** | The specified portfolioGroupId or targetAssetId is invalid (not a UUID string) or the input data is invalid. | - |
507
- **404** | The specified portfolioGroupId or targetAssetId was not found. | - |
508
- **0** | Unexpected error. | - |
509
-
510
- [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
511
-
512
- # **detailAssetClass**
513
-
514
- #### **GET** /modelAssetClass/{modelAssetClassId}
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 detailAssetClassResponse =
531
- await snaptrade.portfolioManagement.detailAssetClass({
532
- modelAssetClassId: "2bcd7cc3-e922-4976-bce1-9858296801c3",
533
- });
534
-
535
- console.log(detailAssetClassResponse);
536
- ```
537
-
538
-
539
- ### Parameters
540
-
541
- Name | Type | Description | Notes
542
- ------------- | ------------- | ------------- | -------------
543
- **modelAssetClassId** | [**string**] | The ID of the model asset class to get. | defaults to undefined
544
-
545
-
546
- ### Return type
547
-
548
- **ModelAssetClassDetails**
549
-
550
- ### HTTP request headers
551
-
552
- - **Content-Type**: Not defined
553
- - **Accept**: application/json
554
-
555
-
556
- ### HTTP response details
557
- | Status code | Description | Response headers |
558
- |-------------|-------------|------------------|
559
- **200** | Details of a particular model asset class | - |
560
-
561
- [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
562
-
563
- # **getCalculatedTradeById**
564
-
565
- #### **GET** /portfolioGroups/{portfolioGroupId}/calculatedtrades/{calculatedTradeId}/{TradeId}
566
-
567
-
568
- ### Example
569
-
570
-
571
- ```typescript
572
- import { Snaptrade } from "snaptrade-typescript-sdk";
573
-
574
- const snaptrade = new Snaptrade({
575
- // Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
576
- // basePath: "https://api.snaptrade.com/api/v1",
577
- consumerKey: "YOUR_CONSUMER_KEY",
578
- clientId: "YOUR_CLIENT_ID",
579
- });
580
-
581
- const getCalculatedTradeByIdResponse =
582
- await snaptrade.portfolioManagement.getCalculatedTradeById({
583
- portfolioGroupId: "portfolioGroupId_example",
584
- calculatedTradeId: "calculatedTradeId_example",
585
- tradeId: "tradeId_example",
586
- });
587
-
588
- console.log(getCalculatedTradeByIdResponse);
589
- ```
590
-
591
-
592
- ### Parameters
593
-
594
- Name | Type | Description | Notes
595
- ------------- | ------------- | ------------- | -------------
596
- **portfolioGroupId** | [**string**] | The ID of the PortfolioGroup to perform rebalancing calculations | defaults to undefined
597
- **calculatedTradeId** | [**string**] | The ID of calculated trade to get account impact | defaults to undefined
598
- **tradeId** | [**string**] | The ID of trade object | defaults to undefined
599
-
600
-
601
- ### Return type
602
-
603
- **Array<Trade>**
604
-
605
- ### HTTP request headers
606
-
607
- - **Content-Type**: Not defined
608
- - **Accept**: application/json
609
-
610
-
611
- ### HTTP response details
612
- | Status code | Description | Response headers |
613
- |-------------|-------------|------------------|
614
- **200** | Trade objects | - |
615
-
616
- [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
617
-
618
- # **getModelDetailsById**
619
-
620
- #### **GET** /modelPortfolio/{modelPortfolioId}
621
-
622
-
623
- ### Example
624
-
625
-
626
- ```typescript
627
- import { Snaptrade } from "snaptrade-typescript-sdk";
628
-
629
- const snaptrade = new Snaptrade({
630
- // Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
631
- // basePath: "https://api.snaptrade.com/api/v1",
632
- consumerKey: "YOUR_CONSUMER_KEY",
633
- clientId: "YOUR_CLIENT_ID",
634
- });
635
-
636
- const getModelDetailsByIdResponse =
637
- await snaptrade.portfolioManagement.getModelDetailsById({
638
- modelPortfolioId: "2bcd7cc3-e922-4976-bce1-9858296801c3",
639
- });
640
-
641
- console.log(getModelDetailsByIdResponse);
642
- ```
643
-
644
-
645
- ### Parameters
646
-
647
- Name | Type | Description | Notes
648
- ------------- | ------------- | ------------- | -------------
649
- **modelPortfolioId** | [**string**] | The ID of the model portfolio to get. | defaults to undefined
650
-
651
-
652
- ### Return type
653
-
654
- **ModelPortfolioDetails**
655
-
656
- ### HTTP request headers
657
-
658
- - **Content-Type**: Not defined
659
- - **Accept**: application/json
660
-
661
-
662
- ### HTTP response details
663
- | Status code | Description | Response headers |
664
- |-------------|-------------|------------------|
665
- **200** | Details of a particular model portfolio. | - |
666
-
667
- [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
668
-
669
- # **getPortfolioBalances**
670
-
671
- #### **GET** /portfolioGroups/{portfolioGroupId}/balances
672
-
673
-
674
- ### Example
675
-
676
-
677
- ```typescript
678
- import { Snaptrade } from "snaptrade-typescript-sdk";
679
-
680
- const snaptrade = new Snaptrade({
681
- // Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
682
- // basePath: "https://api.snaptrade.com/api/v1",
683
- consumerKey: "YOUR_CONSUMER_KEY",
684
- clientId: "YOUR_CLIENT_ID",
685
- });
686
-
687
- const getPortfolioBalancesResponse =
688
- await snaptrade.portfolioManagement.getPortfolioBalances({
689
- portfolioGroupId: "portfolioGroupId_example",
690
- });
691
-
692
- console.log(getPortfolioBalancesResponse);
693
- ```
694
-
695
-
696
- ### Parameters
697
-
698
- Name | Type | Description | Notes
699
- ------------- | ------------- | ------------- | -------------
700
- **portfolioGroupId** | [**string**] | The ID of the PortfolioGroup under which to create the target asset. | defaults to undefined
701
-
702
-
703
- ### Return type
704
-
705
- **Array<Balance>**
706
-
707
- ### HTTP request headers
708
-
709
- - **Content-Type**: Not defined
710
- - **Accept**: application/json
711
-
712
-
713
- ### HTTP response details
714
- | Status code | Description | Response headers |
715
- |-------------|-------------|------------------|
716
- **200** | Sum of cash balances across accounts in portfolio group by currency | - |
717
- **400** | The specified portfolioGroupId is invalid (not a UUID string) or the input data is invalid. | - |
718
- **404** | The specified portfolioGroupId was not found. | - |
719
- **0** | Unexpected error. | - |
720
-
721
- [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
722
-
723
- # **getPortfolioDetailsById**
724
-
725
- #### **GET** /portfolioGroups/{portfolioGroupId}
726
-
727
-
728
- ### Example
729
-
730
-
731
- ```typescript
732
- import { Snaptrade } from "snaptrade-typescript-sdk";
733
-
734
- const snaptrade = new Snaptrade({
735
- // Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
736
- // basePath: "https://api.snaptrade.com/api/v1",
737
- consumerKey: "YOUR_CONSUMER_KEY",
738
- clientId: "YOUR_CLIENT_ID",
739
- });
740
-
741
- const getPortfolioDetailsByIdResponse =
742
- await snaptrade.portfolioManagement.getPortfolioDetailsById({
743
- portfolioGroupId: "portfolioGroupId_example",
744
- });
745
-
746
- console.log(getPortfolioDetailsByIdResponse);
747
- ```
748
-
749
-
750
- ### Parameters
751
-
752
- Name | Type | Description | Notes
753
- ------------- | ------------- | ------------- | -------------
754
- **portfolioGroupId** | [**string**] | The ID of the PortfolioGroup to get. | defaults to undefined
755
-
756
-
757
- ### Return type
758
-
759
- **PortfolioGroup**
760
-
761
- ### HTTP request headers
762
-
763
- - **Content-Type**: Not defined
764
- - **Accept**: */*
765
-
766
-
767
- ### HTTP response details
768
- | Status code | Description | Response headers |
769
- |-------------|-------------|------------------|
770
- **200** | Successfully gets a target portfolio | - |
771
- **0** | Unexpected error | - |
772
-
773
- [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
774
-
775
- # **getPortfolioInfo**
776
-
777
- #### **GET** /portfolioGroups/{portfolioGroupId}/info
778
-
779
-
780
- ### Example
781
-
782
-
783
- ```typescript
784
- import { Snaptrade } from "snaptrade-typescript-sdk";
785
-
786
- const snaptrade = new Snaptrade({
787
- // Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
788
- // basePath: "https://api.snaptrade.com/api/v1",
789
- consumerKey: "YOUR_CONSUMER_KEY",
790
- clientId: "YOUR_CLIENT_ID",
791
- });
792
-
793
- const getPortfolioInfoResponse =
794
- await snaptrade.portfolioManagement.getPortfolioInfo({
795
- portfolioGroupId: "portfolioGroupId_example",
796
- });
797
-
798
- console.log(getPortfolioInfoResponse);
799
- ```
800
-
801
-
802
- ### Parameters
803
-
804
- Name | Type | Description | Notes
805
- ------------- | ------------- | ------------- | -------------
806
- **portfolioGroupId** | [**string**] | The ID of the PortfolioGroup under which to create the target asset. | defaults to undefined
807
-
808
-
809
- ### Return type
810
-
811
- **PortfolioGroupInfo**
812
-
813
- ### HTTP request headers
814
-
815
- - **Content-Type**: Not defined
816
- - **Accept**: application/json
817
-
818
-
819
- ### HTTP response details
820
- | Status code | Description | Response headers |
821
- |-------------|-------------|------------------|
822
- **200** | Portfolio group target allocation has been updated | - |
823
- **0** | Unexpected error. | - |
824
-
825
- [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
826
-
827
- # **getPortfolioPositions**
828
-
829
- #### **GET** /portfolioGroups/{portfolioGroupId}/positions
830
-
831
-
832
- ### Example
833
-
834
-
835
- ```typescript
836
- import { Snaptrade } from "snaptrade-typescript-sdk";
837
-
838
- const snaptrade = new Snaptrade({
839
- // Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
840
- // basePath: "https://api.snaptrade.com/api/v1",
841
- consumerKey: "YOUR_CONSUMER_KEY",
842
- clientId: "YOUR_CLIENT_ID",
843
- });
844
-
845
- const getPortfolioPositionsResponse =
846
- await snaptrade.portfolioManagement.getPortfolioPositions({
847
- portfolioGroupId: "portfolioGroupId_example",
848
- });
849
-
850
- console.log(getPortfolioPositionsResponse);
851
- ```
852
-
853
-
854
- ### Parameters
855
-
856
- Name | Type | Description | Notes
857
- ------------- | ------------- | ------------- | -------------
858
- **portfolioGroupId** | [**string**] | The ID of the PortfolioGroup under which to create the target asset. | defaults to undefined
859
-
860
-
861
- ### Return type
862
-
863
- **Array<PortfolioGroupPosition>**
864
-
865
- ### HTTP request headers
866
-
867
- - **Content-Type**: Not defined
868
- - **Accept**: application/json
869
-
870
-
871
- ### HTTP response details
872
- | Status code | Description | Response headers |
873
- |-------------|-------------|------------------|
874
- **200** | Totals of each postions owned in portfolio group | - |
875
- **400** | The specified portfolioGroupId is invalid (not a UUID string) or the input data is invalid. | - |
876
- **404** | The specified portfolioGroupId was not found. | - |
877
- **0** | Unexpected error. | - |
878
-
879
- [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
880
-
881
- # **getPortfolioSettings**
882
-
883
- #### **GET** /portfolioGroups/{portfolioGroupId}/settings
884
-
885
-
886
- ### Example
887
-
888
-
889
- ```typescript
890
- import { Snaptrade } from "snaptrade-typescript-sdk";
891
-
892
- const snaptrade = new Snaptrade({
893
- // Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
894
- // basePath: "https://api.snaptrade.com/api/v1",
895
- consumerKey: "YOUR_CONSUMER_KEY",
896
- clientId: "YOUR_CLIENT_ID",
897
- });
898
-
899
- const getPortfolioSettingsResponse =
900
- await snaptrade.portfolioManagement.getPortfolioSettings({
901
- portfolioGroupId: "portfolioGroupId_example",
902
- });
903
-
904
- console.log(getPortfolioSettingsResponse);
905
- ```
906
-
907
-
908
- ### Parameters
909
-
910
- Name | Type | Description | Notes
911
- ------------- | ------------- | ------------- | -------------
912
- **portfolioGroupId** | [**string**] | The ID of the PortfolioGroup under which to get the settings. | defaults to undefined
913
-
914
-
915
- ### Return type
916
-
917
- **PortfolioGroupSettings**
918
-
919
- ### HTTP request headers
920
-
921
- - **Content-Type**: Not defined
922
- - **Accept**: application/json
923
-
924
-
925
- ### HTTP response details
926
- | Status code | Description | Response headers |
927
- |-------------|-------------|------------------|
928
- **200** | Settings of portfolio group | - |
929
- **0** | Unexpected error | - |
930
-
931
- [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
932
-
933
- # **getPortfolioTargetById**
934
-
935
- #### **GET** /portfolioGroups/{portfolioGroupId}/targets/{targetAssetId}
936
-
937
-
938
- ### Example
939
-
940
-
941
- ```typescript
942
- import { Snaptrade } from "snaptrade-typescript-sdk";
943
-
944
- const snaptrade = new Snaptrade({
945
- // Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
946
- // basePath: "https://api.snaptrade.com/api/v1",
947
- consumerKey: "YOUR_CONSUMER_KEY",
948
- clientId: "YOUR_CLIENT_ID",
949
- });
950
-
951
- const getPortfolioTargetByIdResponse =
952
- await snaptrade.portfolioManagement.getPortfolioTargetById({
953
- portfolioGroupId: "portfolioGroupId_example",
954
- targetAssetId: "targetAssetId_example",
955
- });
956
-
957
- console.log(getPortfolioTargetByIdResponse);
958
- ```
959
-
960
-
961
- ### Parameters
962
-
963
- Name | Type | Description | Notes
964
- ------------- | ------------- | ------------- | -------------
965
- **portfolioGroupId** | [**string**] | The ID of the PortfolioGroup under which to get the target asset. | defaults to undefined
966
- **targetAssetId** | [**string**] | The ID of the TargetAsset to get. | defaults to undefined
967
-
968
-
969
- ### Return type
970
-
971
- **TargetAsset**
972
-
973
- ### HTTP request headers
974
-
975
- - **Content-Type**: Not defined
976
- - **Accept**: */*
977
-
978
-
979
- ### HTTP response details
980
- | Status code | Description | Response headers |
981
- |-------------|-------------|------------------|
982
- **200** | Successfully get target asset. | - |
983
- **0** | Unexpected errors | - |
984
-
985
- [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
986
-
987
- # **getPortfolioTargets**
988
-
989
- #### **GET** /portfolioGroups/{portfolioGroupId}/targets
990
-
991
-
992
- ### Example
993
-
994
-
995
- ```typescript
996
- import { Snaptrade } from "snaptrade-typescript-sdk";
997
-
998
- const snaptrade = new Snaptrade({
999
- // Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
1000
- // basePath: "https://api.snaptrade.com/api/v1",
1001
- consumerKey: "YOUR_CONSUMER_KEY",
1002
- clientId: "YOUR_CLIENT_ID",
1003
- });
1004
-
1005
- const getPortfolioTargetsResponse =
1006
- await snaptrade.portfolioManagement.getPortfolioTargets({
1007
- portfolioGroupId: "portfolioGroupId_example",
1008
- });
1009
-
1010
- console.log(getPortfolioTargetsResponse);
1011
- ```
1012
-
1013
-
1014
- ### Parameters
1015
-
1016
- Name | Type | Description | Notes
1017
- ------------- | ------------- | ------------- | -------------
1018
- **portfolioGroupId** | [**string**] | The ID of the PortfolioGroup under which to create the target asset. | defaults to undefined
1019
-
1020
-
1021
- ### Return type
1022
-
1023
- **Array<TargetAsset>**
1024
-
1025
- ### HTTP request headers
1026
-
1027
- - **Content-Type**: Not defined
1028
- - **Accept**: application/json
1029
-
1030
-
1031
- ### HTTP response details
1032
- | Status code | Description | Response headers |
1033
- |-------------|-------------|------------------|
1034
- **200** | All target assets owned by the specified PortfolioGroup. | - |
1035
- **400** | The specified portfolioGroupId is invalid (not a UUID string) or the input data is invalid. | - |
1036
- **404** | The specified portfolioGroupId was not found. | - |
1037
- **0** | Unexpected error. | - |
1038
-
1039
- [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
1040
-
1041
- # **getPortoflioExcludedAssets**
1042
-
1043
- #### **GET** /portfolioGroups/{portfolioGroupId}/excludedassets
1044
-
1045
-
1046
- ### Example
1047
-
1048
-
1049
- ```typescript
1050
- import { Snaptrade } from "snaptrade-typescript-sdk";
1051
-
1052
- const snaptrade = new Snaptrade({
1053
- // Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
1054
- // basePath: "https://api.snaptrade.com/api/v1",
1055
- consumerKey: "YOUR_CONSUMER_KEY",
1056
- clientId: "YOUR_CLIENT_ID",
1057
- });
1058
-
1059
- const getPortoflioExcludedAssetsResponse =
1060
- await snaptrade.portfolioManagement.getPortoflioExcludedAssets({
1061
- portfolioGroupId: "portfolioGroupId_example",
1062
- });
1063
-
1064
- console.log(getPortoflioExcludedAssetsResponse);
1065
- ```
1066
-
1067
-
1068
- ### Parameters
1069
-
1070
- Name | Type | Description | Notes
1071
- ------------- | ------------- | ------------- | -------------
1072
- **portfolioGroupId** | [**string**] | The ID of the PortfolioGroup under which the excluded assets are linked. | defaults to undefined
1073
-
1074
-
1075
- ### Return type
1076
-
1077
- **Array<ExcludedAsset>**
1078
-
1079
- ### HTTP request headers
1080
-
1081
- - **Content-Type**: Not defined
1082
- - **Accept**: application/json
1083
-
1084
-
1085
- ### HTTP response details
1086
- | Status code | Description | Response headers |
1087
- |-------------|-------------|------------------|
1088
- **200** | Array of excluded assets linked to portfolio group | - |
1089
- **0** | Unexpected error | - |
1090
-
1091
- [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
1092
-
1093
- # **importModelPortfolio**
1094
-
1095
- #### **POST** /portfolioGroups/{portfolioGroupId}/import
1096
-
1097
-
1098
- ### Example
1099
-
1100
-
1101
- ```typescript
1102
- import { Snaptrade } from "snaptrade-typescript-sdk";
1103
-
1104
- const snaptrade = new Snaptrade({
1105
- // Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
1106
- // basePath: "https://api.snaptrade.com/api/v1",
1107
- consumerKey: "YOUR_CONSUMER_KEY",
1108
- clientId: "YOUR_CLIENT_ID",
1109
- });
1110
-
1111
- const importModelPortfolioResponse =
1112
- await snaptrade.portfolioManagement.importModelPortfolio({
1113
- portfolioGroupId: "portfolioGroupId_example",
1114
- });
1115
-
1116
- console.log(importModelPortfolioResponse);
1117
- ```
1118
-
1119
-
1120
- ### Parameters
1121
-
1122
- Name | Type | Description | Notes
1123
- ------------- | ------------- | ------------- | -------------
1124
- **portfolioGroupId** | [**string**] | The ID of the PortfolioGroup under which to create the target asset. | defaults to undefined
1125
-
1126
-
1127
- ### Return type
1128
-
1129
- **Array<TargetAsset>**
1130
-
1131
- ### HTTP request headers
1132
-
1133
- - **Content-Type**: Not defined
1134
- - **Accept**: application/json
1135
-
1136
-
1137
- ### HTTP response details
1138
- | Status code | Description | Response headers |
1139
- |-------------|-------------|------------------|
1140
- **200** | Portfolio group target allocation has been updated | - |
1141
- **0** | Unexpected error. | - |
1142
-
1143
- [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
1144
-
1145
- # **list**
1146
-
1147
- #### **GET** /portfolioGroups
1148
-
1149
-
1150
- ### Example
1151
-
1152
-
1153
- ```typescript
1154
- import { Snaptrade } from "snaptrade-typescript-sdk";
1155
-
1156
- const snaptrade = new Snaptrade({
1157
- // Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
1158
- // basePath: "https://api.snaptrade.com/api/v1",
1159
- consumerKey: "YOUR_CONSUMER_KEY",
1160
- clientId: "YOUR_CLIENT_ID",
1161
- });
1162
-
1163
- const listResponse = await snaptrade.portfolioManagement.list({
1164
- userId: "John.doe@snaptrade.com",
1165
- userSecret: "USERSECRET123",
1166
- });
1167
-
1168
- console.log(listResponse);
1169
- ```
1170
-
1171
-
1172
- ### Parameters
1173
-
1174
- Name | Type | Description | Notes
1175
- ------------- | ------------- | ------------- | -------------
1176
- **userId** | [**string**] | | defaults to undefined
1177
- **userSecret** | [**string**] | | defaults to undefined
1178
-
1179
-
1180
- ### Return type
1181
-
1182
- **Array<PortfolioGroup>**
1183
-
1184
- ### HTTP request headers
1185
-
1186
- - **Content-Type**: Not defined
1187
- - **Accept**: application/json
1188
-
1189
-
1190
- ### HTTP response details
1191
- | Status code | Description | Response headers |
1192
- |-------------|-------------|------------------|
1193
- **200** | A list of all PortfolioGroup objects for the authenticated user. | - |
1194
- **0** | Unexpected error. | - |
1195
-
1196
- [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
1197
-
1198
- # **listAssetClasses**
1199
-
1200
- #### **GET** /modelAssetClass
1201
-
1202
-
1203
- ### Example
1204
-
1205
-
1206
- ```typescript
1207
- import { Snaptrade } from "snaptrade-typescript-sdk";
1208
-
1209
- const snaptrade = new Snaptrade({
1210
- // Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
1211
- // basePath: "https://api.snaptrade.com/api/v1",
1212
- consumerKey: "YOUR_CONSUMER_KEY",
1213
- clientId: "YOUR_CLIENT_ID",
1214
- });
1215
-
1216
- const listAssetClassesResponse =
1217
- await snaptrade.portfolioManagement.listAssetClasses();
1218
-
1219
- console.log(listAssetClassesResponse);
1220
- ```
1221
-
1222
-
1223
- ### Parameters
1224
- This endpoint does not need any parameter.
1225
-
1226
-
1227
- ### Return type
1228
-
1229
- **Array<ModelAssetClassDetails>**
1230
-
1231
- ### HTTP request headers
1232
-
1233
- - **Content-Type**: Not defined
1234
- - **Accept**: application/json
1235
-
1236
-
1237
- ### HTTP response details
1238
- | Status code | Description | Response headers |
1239
- |-------------|-------------|------------------|
1240
- **200** | A list of all model asset class objects for the authenticated user. | - |
1241
-
1242
- [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
1243
-
1244
- # **listCalculatedTrades**
1245
-
1246
- #### **GET** /portfolioGroups/{portfolioGroupId}/calculatedtrades
1247
-
1248
-
1249
- ### Example
1250
-
1251
-
1252
- ```typescript
1253
- import { Snaptrade } from "snaptrade-typescript-sdk";
1254
-
1255
- const snaptrade = new Snaptrade({
1256
- // Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
1257
- // basePath: "https://api.snaptrade.com/api/v1",
1258
- consumerKey: "YOUR_CONSUMER_KEY",
1259
- clientId: "YOUR_CLIENT_ID",
1260
- });
1261
-
1262
- const listCalculatedTradesResponse =
1263
- await snaptrade.portfolioManagement.listCalculatedTrades({
1264
- portfolioGroupId: "portfolioGroupId_example",
1265
- });
1266
-
1267
- console.log(listCalculatedTradesResponse);
1268
- ```
1269
-
1270
-
1271
- ### Parameters
1272
-
1273
- Name | Type | Description | Notes
1274
- ------------- | ------------- | ------------- | -------------
1275
- **portfolioGroupId** | [**string**] | The ID of the PortfolioGroup to perform rebalancing calculations | defaults to undefined
1276
-
1277
-
1278
- ### Return type
1279
-
1280
- **CalculatedTrade**
1281
-
1282
- ### HTTP request headers
1283
-
1284
- - **Content-Type**: Not defined
1285
- - **Accept**: application/json
1286
-
1287
-
1288
- ### HTTP response details
1289
- | Status code | Description | Response headers |
1290
- |-------------|-------------|------------------|
1291
- **200** | Calculated trades to make | - |
1292
-
1293
- [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
1294
-
1295
- # **listModelPortfolio**
1296
-
1297
- #### **GET** /modelPortfolio
1298
-
1299
-
1300
- ### Example
1301
-
1302
-
1303
- ```typescript
1304
- import { Snaptrade } from "snaptrade-typescript-sdk";
1305
-
1306
- const snaptrade = new Snaptrade({
1307
- // Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
1308
- // basePath: "https://api.snaptrade.com/api/v1",
1309
- consumerKey: "YOUR_CONSUMER_KEY",
1310
- clientId: "YOUR_CLIENT_ID",
1311
- });
1312
-
1313
- const listModelPortfolioResponse =
1314
- await snaptrade.portfolioManagement.listModelPortfolio();
1315
-
1316
- console.log(listModelPortfolioResponse);
1317
- ```
1318
-
1319
-
1320
- ### Parameters
1321
- This endpoint does not need any parameter.
1322
-
1323
-
1324
- ### Return type
1325
-
1326
- **Array<ModelPortfolioDetails>**
1327
-
1328
- ### HTTP request headers
1329
-
1330
- - **Content-Type**: Not defined
1331
- - **Accept**: application/json
1332
-
1333
-
1334
- ### HTTP response details
1335
- | Status code | Description | Response headers |
1336
- |-------------|-------------|------------------|
1337
- **200** | A list of all model portfolio objects for the authenticated user. | - |
1338
-
1339
- [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
1340
-
1341
- # **listPortfolioAccounts**
1342
-
1343
- #### **GET** /portfolioGroups/{portfolioGroupId}/accounts
1344
-
1345
-
1346
- ### Example
1347
-
1348
-
1349
- ```typescript
1350
- import { Snaptrade } from "snaptrade-typescript-sdk";
1351
-
1352
- const snaptrade = new Snaptrade({
1353
- // Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
1354
- // basePath: "https://api.snaptrade.com/api/v1",
1355
- consumerKey: "YOUR_CONSUMER_KEY",
1356
- clientId: "YOUR_CLIENT_ID",
1357
- });
1358
-
1359
- const listPortfolioAccountsResponse =
1360
- await snaptrade.portfolioManagement.listPortfolioAccounts({
1361
- portfolioGroupId: "portfolioGroupId_example",
1362
- });
1363
-
1364
- console.log(listPortfolioAccountsResponse);
1365
- ```
1366
-
1367
-
1368
- ### Parameters
1369
-
1370
- Name | Type | Description | Notes
1371
- ------------- | ------------- | ------------- | -------------
1372
- **portfolioGroupId** | [**string**] | The ID of the PortfolioGroup under which the accounts are linked. | defaults to undefined
1373
-
1374
-
1375
- ### Return type
1376
-
1377
- **Array<Account>**
1378
-
1379
- ### HTTP request headers
1380
-
1381
- - **Content-Type**: Not defined
1382
- - **Accept**: application/json
1383
-
1384
-
1385
- ### HTTP response details
1386
- | Status code | Description | Response headers |
1387
- |-------------|-------------|------------------|
1388
- **200** | Accounts linked to portfolio group | - |
1389
- **0** | Unexpected error | - |
1390
-
1391
- [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
1392
-
1393
- # **modifyModelPortfolioById**
1394
-
1395
- #### **POST** /modelPortfolio/{modelPortfolioId}
1396
-
1397
-
1398
- ### Example
1399
-
1400
-
1401
- ```typescript
1402
- import { Snaptrade } from "snaptrade-typescript-sdk";
1403
-
1404
- const snaptrade = new Snaptrade({
1405
- // Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
1406
- // basePath: "https://api.snaptrade.com/api/v1",
1407
- consumerKey: "YOUR_CONSUMER_KEY",
1408
- clientId: "YOUR_CLIENT_ID",
1409
- });
1410
-
1411
- const modifyModelPortfolioByIdResponse =
1412
- await snaptrade.portfolioManagement.modifyModelPortfolioById({
1413
- modelPortfolioId: "2bcd7cc3-e922-4976-bce1-9858296801c3",
1414
- });
1415
-
1416
- console.log(modifyModelPortfolioByIdResponse);
1417
- ```
1418
-
1419
-
1420
- ### Parameters
1421
-
1422
- Name | Type | Description | Notes
1423
- ------------- | ------------- | ------------- | -------------
1424
- **modelPortfolioDetails** | **ModelPortfolioDetails**| Use this endpoint change model asset class name and to add or remove a model portfolio security/model portfolio asset class. &lt;br /&gt;&lt;br /&gt; * The model portfolio name and model portfolio model type is required. &lt;br /&gt; * The model portfolio model type must be either 0 or 1. [0 -&gt; Securities based, 1 -&gt; Asset Class based] &lt;br /&gt;&lt;br /&gt; * If the model portfolio type is 0, the model portfolio asset class must be an empty array. &lt;br /&gt; * If the model portfolio type is 1, the model portfolio security must be an empty array. &lt;br /&gt;&lt;br /&gt; * When updating the model portfolio security, the percent is required. Only the symbol id is required for the symbol object &lt;br /&gt; * When updating the model portfolio asset classes, the percent is required. Only the model asset class id is required for the model asset class object &lt;br /&gt;&lt;br /&gt; * To remove all model portfolio securities or model portfolio asset class, set then to an empty array |
1425
- **modelPortfolioId** | [**string**] | The ID of the model portfolio to update. | defaults to undefined
1426
-
1427
-
1428
- ### Return type
1429
-
1430
- void (empty response body)
1431
-
1432
- ### HTTP request headers
1433
-
1434
- - **Content-Type**: application/json
1435
- - **Accept**: Not defined
1436
-
1437
-
1438
- ### HTTP response details
1439
- | Status code | Description | Response headers |
1440
- |-------------|-------------|------------------|
1441
- **200** | Updates model portfolio object with data from request body. | - |
1442
-
1443
- [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
1444
-
1445
- # **savePortfolio**
1446
-
1447
- #### **PATCH** /portfolioGroups/{portfolioGroupId}
1448
-
1449
-
1450
- ### Example
1451
-
1452
-
1453
- ```typescript
1454
- import { Snaptrade } from "snaptrade-typescript-sdk";
1455
-
1456
- const snaptrade = new Snaptrade({
1457
- // Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
1458
- // basePath: "https://api.snaptrade.com/api/v1",
1459
- consumerKey: "YOUR_CONSUMER_KEY",
1460
- clientId: "YOUR_CLIENT_ID",
1461
- });
1462
-
1463
- const savePortfolioResponse = await snaptrade.portfolioManagement.savePortfolio(
1464
- {
1465
- portfolioGroupId: "portfolioGroupId_example",
1466
- id: "2bcd7cc3-e922-4976-bce1-9858296801c3",
1467
- name: "Combined Retirement Portfolio",
1468
- }
1469
- );
1470
-
1471
- console.log(savePortfolioResponse);
1472
- ```
1473
-
1474
-
1475
- ### Parameters
1476
-
1477
- Name | Type | Description | Notes
1478
- ------------- | ------------- | ------------- | -------------
1479
- **requestBody** | **{ [key: string]: any; }**| |
1480
- **portfolioGroupId** | [**string**] | The ID of the PortfolioGroup to update. | defaults to undefined
1481
-
1482
-
1483
- ### Return type
1484
-
1485
- **PortfolioGroup**
1486
-
1487
- ### HTTP request headers
1488
-
1489
- - **Content-Type**: application/json
1490
- - **Accept**: application/json
1491
-
1492
-
1493
- ### HTTP response details
1494
- | Status code | Description | Response headers |
1495
- |-------------|-------------|------------------|
1496
- **200** | The PortfolioGroup object which was updated. | - |
1497
- **400** | The specified portfolioGroupId is invalid (not a UUID string) or the input data is invalid. | - |
1498
- **404** | The specified portfolioGroupId was not found. | - |
1499
- **0** | Unexpected error. | - |
1500
-
1501
- [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
1502
-
1503
- # **searchPortfolioSymbols**
1504
-
1505
- #### **POST** /portfolioGroups/{portfolioGroupId}/symbols
1506
-
1507
-
1508
- ### Example
1509
-
1510
-
1511
- ```typescript
1512
- import { Snaptrade } from "snaptrade-typescript-sdk";
1513
-
1514
- const snaptrade = new Snaptrade({
1515
- // Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
1516
- // basePath: "https://api.snaptrade.com/api/v1",
1517
- consumerKey: "YOUR_CONSUMER_KEY",
1518
- clientId: "YOUR_CLIENT_ID",
1519
- });
1520
-
1521
- const searchPortfolioSymbolsResponse =
1522
- await snaptrade.portfolioManagement.searchPortfolioSymbols({
1523
- portfolioGroupId: "portfolioGroupId_example",
1524
- substring: "apple",
1525
- });
1526
-
1527
- console.log(searchPortfolioSymbolsResponse);
1528
- ```
1529
-
1530
-
1531
- ### Parameters
1532
-
1533
- Name | Type | Description | Notes
1534
- ------------- | ------------- | ------------- | -------------
1535
- **symbolQuery** | **SymbolQuery**| |
1536
- **portfolioGroupId** | [**string**] | The ID of the PortfolioGroup to search under | defaults to undefined
1537
-
1538
-
1539
- ### Return type
1540
-
1541
- **Array<UniversalSymbol>**
1542
-
1543
- ### HTTP request headers
1544
-
1545
- - **Content-Type**: application/json
1546
- - **Accept**: application/json
1547
-
1548
-
1549
- ### HTTP response details
1550
- | Status code | Description | Response headers |
1551
- |-------------|-------------|------------------|
1552
- **200** | A list of UniversalSymbol objects which match the specified substring | - |
1553
- **0** | Unexpected error. | - |
1554
-
1555
- [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
1556
-
1557
- # **setPortfolioTargets**
1558
-
1559
- #### **POST** /portfolioGroups/{portfolioGroupId}/targets
1560
-
1561
-
1562
- ### Example
1563
-
1564
-
1565
- ```typescript
1566
- import { Snaptrade } from "snaptrade-typescript-sdk";
1567
-
1568
- const snaptrade = new Snaptrade({
1569
- // Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
1570
- // basePath: "https://api.snaptrade.com/api/v1",
1571
- consumerKey: "YOUR_CONSUMER_KEY",
1572
- clientId: "YOUR_CLIENT_ID",
1573
- });
1574
-
1575
- const setPortfolioTargetsResponse =
1576
- await snaptrade.portfolioManagement.setPortfolioTargets({
1577
- portfolioGroupId: "portfolioGroupId_example",
1578
- requestBody: [
1579
- {
1580
- id: "2bcd7cc3-e922-4976-bce1-9858296801c3",
1581
- percent: 90,
1582
- is_supported: true,
1583
- is_excluded: true,
1584
- },
1585
- ],
1586
- });
1587
-
1588
- console.log(setPortfolioTargetsResponse);
1589
- ```
1590
-
1591
-
1592
- ### Parameters
1593
-
1594
- Name | Type | Description | Notes
1595
- ------------- | ------------- | ------------- | -------------
1596
- **targetAsset** | **Array<TargetAsset>**| |
1597
- **portfolioGroupId** | [**string**] | The ID of the PortfolioGroup under which to create the target asset. | defaults to undefined
1598
-
1599
-
1600
- ### Return type
1601
-
1602
- **Array<TargetAsset>**
1603
-
1604
- ### HTTP request headers
1605
-
1606
- - **Content-Type**: application/json
1607
- - **Accept**: application/json
1608
-
1609
-
1610
- ### HTTP response details
1611
- | Status code | Description | Response headers |
1612
- |-------------|-------------|------------------|
1613
- **200** | A new target asset or set of target assets is created. | - |
1614
- **400** | The specified portfolioGroupId is invalid (not a UUID string) or the input data is invalid. | - |
1615
- **404** | The specified portfolioGroupId was not found. | - |
1616
- **0** | Unexpected error. | - |
1617
-
1618
- [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
1619
-
1620
- # **updateAssetClass**
1621
-
1622
- #### **POST** /modelAssetClass/{modelAssetClassId}
1623
-
1624
-
1625
- ### Example
1626
-
1627
-
1628
- ```typescript
1629
- import { Snaptrade } from "snaptrade-typescript-sdk";
1630
-
1631
- const snaptrade = new Snaptrade({
1632
- // Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
1633
- // basePath: "https://api.snaptrade.com/api/v1",
1634
- consumerKey: "YOUR_CONSUMER_KEY",
1635
- clientId: "YOUR_CLIENT_ID",
1636
- });
1637
-
1638
- const updateAssetClassResponse =
1639
- await snaptrade.portfolioManagement.updateAssetClass({
1640
- modelAssetClassId: "2bcd7cc3-e922-4976-bce1-9858296801c3",
1641
- });
1642
-
1643
- console.log(updateAssetClassResponse);
1644
- ```
1645
-
1646
-
1647
- ### Parameters
1648
-
1649
- Name | Type | Description | Notes
1650
- ------------- | ------------- | ------------- | -------------
1651
- **modelAssetClassDetails** | **ModelAssetClassDetails**| Use this endpoint change model asset class name and to add or remove a model asset class target. &lt;br /&gt;&lt;br /&gt; * Only the model asset class name is required for the model asset class object. &lt;br /&gt; * Only the symbol id is required for the symbol object in the model asset class target object. &lt;br /&gt; * To remove all model asset class targets, set the model asset class target as an empty array |
1652
- **modelAssetClassId** | [**string**] | The ID of the model asset class to update. | defaults to undefined
1653
-
1654
-
1655
- ### Return type
1656
-
1657
- void (empty response body)
1658
-
1659
- ### HTTP request headers
1660
-
1661
- - **Content-Type**: application/json
1662
- - **Accept**: Not defined
1663
-
1664
-
1665
- ### HTTP response details
1666
- | Status code | Description | Response headers |
1667
- |-------------|-------------|------------------|
1668
- **200** | Updates model asset class with data from request body. | - |
1669
-
1670
- [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
1671
-
1672
- # **updatePortfolioSettings**
1673
-
1674
- #### **PATCH** /portfolioGroups/{portfolioGroupId}/settings
1675
-
1676
-
1677
- ### Example
1678
-
1679
-
1680
- ```typescript
1681
- import { Snaptrade } from "snaptrade-typescript-sdk";
1682
-
1683
- const snaptrade = new Snaptrade({
1684
- // Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
1685
- // basePath: "https://api.snaptrade.com/api/v1",
1686
- consumerKey: "YOUR_CONSUMER_KEY",
1687
- clientId: "YOUR_CLIENT_ID",
1688
- });
1689
-
1690
- const updatePortfolioSettingsResponse =
1691
- await snaptrade.portfolioManagement.updatePortfolioSettings({
1692
- portfolioGroupId: "portfolioGroupId_example",
1693
- });
1694
-
1695
- console.log(updatePortfolioSettingsResponse);
1696
- ```
1697
-
1698
-
1699
- ### Parameters
1700
-
1701
- Name | Type | Description | Notes
1702
- ------------- | ------------- | ------------- | -------------
1703
- **portfolioGroupId** | [**string**] | The ID of the PortfolioGroup under which to patch the settings. | defaults to undefined
1704
-
1705
-
1706
- ### Return type
1707
-
1708
- **PortfolioGroupSettings**
1709
-
1710
- ### HTTP request headers
1711
-
1712
- - **Content-Type**: Not defined
1713
- - **Accept**: */*
1714
-
1715
-
1716
- ### HTTP response details
1717
- | Status code | Description | Response headers |
1718
- |-------------|-------------|------------------|
1719
- **200** | Settings of portfolio group | - |
1720
- **0** | Unexpected error | - |
1721
-
1722
- [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
1723
-
1724
- # **updatePortfolioTargetById**
1725
-
1726
- #### **PATCH** /portfolioGroups/{portfolioGroupId}/targets/{targetAssetId}
1727
-
1728
-
1729
- ### Example
1730
-
1731
-
1732
- ```typescript
1733
- import { Snaptrade } from "snaptrade-typescript-sdk";
1734
-
1735
- const snaptrade = new Snaptrade({
1736
- // Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
1737
- // basePath: "https://api.snaptrade.com/api/v1",
1738
- consumerKey: "YOUR_CONSUMER_KEY",
1739
- clientId: "YOUR_CLIENT_ID",
1740
- });
1741
-
1742
- const updatePortfolioTargetByIdResponse =
1743
- await snaptrade.portfolioManagement.updatePortfolioTargetById({
1744
- portfolioGroupId: "portfolioGroupId_example",
1745
- targetAssetId: "targetAssetId_example",
1746
- id: "2bcd7cc3-e922-4976-bce1-9858296801c3",
1747
- percent: 90,
1748
- is_supported: true,
1749
- is_excluded: true,
1750
- });
1751
-
1752
- console.log(updatePortfolioTargetByIdResponse);
1753
- ```
1754
-
1755
-
1756
- ### Parameters
1757
-
1758
- Name | Type | Description | Notes
1759
- ------------- | ------------- | ------------- | -------------
1760
- **targetAsset** | **TargetAsset**| |
1761
- **portfolioGroupId** | [**string**] | The ID of the PortfolioGroup under which to patch the target asset. | defaults to undefined
1762
- **targetAssetId** | [**string**] | The ID of the TargetAsset to patch. | defaults to undefined
1763
-
1764
-
1765
- ### Return type
1766
-
1767
- **TargetAsset**
1768
-
1769
- ### HTTP request headers
1770
-
1771
- - **Content-Type**: application/json
1772
- - **Accept**: application/json
1773
-
1774
-
1775
- ### HTTP response details
1776
- | Status code | Description | Response headers |
1777
- |-------------|-------------|------------------|
1778
- **200** | The target asset is updated. | - |
1779
- **400** | The specified portfolioGroupId or targetAssetId is invalid (not a UUID string) or the input data is invalid. | - |
1780
- **404** | The specified portfolioGroupId or targetAssetId was not found. | - |
1781
- **0** | Unexpected error. | - |
1782
-
1783
- [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
1784
-
1785
-