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