snaptrade-typescript-sdk 9.0.199 → 10.0.1

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 (427) hide show
  1. package/README.md +42 -2
  2. package/dist/chunk-e9Ob2GDo.mjs +26 -0
  3. package/dist/index.cjs +6594 -0
  4. package/dist/index.cjs.map +1 -0
  5. package/dist/index.d.cts +1 -0
  6. package/dist/index.d.mts +10422 -0
  7. package/dist/index.d.ts +1 -5
  8. package/dist/index.mjs +6527 -0
  9. package/dist/index.mjs.map +1 -0
  10. package/package.json +27 -13
  11. package/dist/api/account-information-api-generated.d.ts +0 -950
  12. package/dist/api/account-information-api-generated.js +0 -1372
  13. package/dist/api/account-information-api.d.ts +0 -4
  14. package/dist/api/account-information-api.js +0 -22
  15. package/dist/api/api-status-api-generated.d.ts +0 -59
  16. package/dist/api/api-status-api-generated.js +0 -133
  17. package/dist/api/api-status-api.d.ts +0 -4
  18. package/dist/api/api-status-api.js +0 -22
  19. package/dist/api/authentication-api-generated.d.ts +0 -241
  20. package/dist/api/authentication-api-generated.js +0 -482
  21. package/dist/api/authentication-api.d.ts +0 -4
  22. package/dist/api/authentication-api.js +0 -22
  23. package/dist/api/connections-api-generated.d.ts +0 -576
  24. package/dist/api/connections-api-generated.js +0 -868
  25. package/dist/api/connections-api.d.ts +0 -4
  26. package/dist/api/connections-api.js +0 -22
  27. package/dist/api/options-api-generated.d.ts +0 -90
  28. package/dist/api/options-api-generated.js +0 -158
  29. package/dist/api/options-api.d.ts +0 -4
  30. package/dist/api/options-api.js +0 -22
  31. package/dist/api/reference-data-api-generated.d.ts +0 -497
  32. package/dist/api/reference-data-api-generated.js +0 -973
  33. package/dist/api/reference-data-api.d.ts +0 -4
  34. package/dist/api/reference-data-api.js +0 -22
  35. package/dist/api/trading-api-generated.d.ts +0 -1054
  36. package/dist/api/trading-api-generated.js +0 -1684
  37. package/dist/api/trading-api.d.ts +0 -4
  38. package/dist/api/trading-api.js +0 -22
  39. package/dist/api/transactions-and-reporting-api-generated.d.ts +0 -215
  40. package/dist/api/transactions-and-reporting-api-generated.js +0 -299
  41. package/dist/api/transactions-and-reporting-api.d.ts +0 -4
  42. package/dist/api/transactions-and-reporting-api.js +0 -22
  43. package/dist/api.d.ts +0 -8
  44. package/dist/api.js +0 -36
  45. package/dist/base.d.ts +0 -44
  46. package/dist/base.js +0 -60
  47. package/dist/browser.js +0 -2
  48. package/dist/browser.js.LICENSE.txt +0 -1
  49. package/dist/client-custom.d.ts +0 -4
  50. package/dist/client-custom.js +0 -7
  51. package/dist/client.d.ts +0 -14
  52. package/dist/client.js +0 -31
  53. package/dist/common.d.ts +0 -61
  54. package/dist/common.js +0 -220
  55. package/dist/configuration.d.ts +0 -98
  56. package/dist/configuration.js +0 -53
  57. package/dist/error.d.ts +0 -46
  58. package/dist/error.js +0 -105
  59. package/dist/index.js +0 -33
  60. package/dist/jest.config.d.ts +0 -3
  61. package/dist/jest.config.js +0 -13
  62. package/dist/mock.test.d.ts +0 -1
  63. package/dist/mock.test.js +0 -29
  64. package/dist/models/account-balance-total.d.ts +0 -19
  65. package/dist/models/account-balance-total.js +0 -2
  66. package/dist/models/account-balance.d.ts +0 -14
  67. package/dist/models/account-balance.js +0 -2
  68. package/dist/models/account-holdings-account.d.ts +0 -51
  69. package/dist/models/account-holdings-account.js +0 -2
  70. package/dist/models/account-holdings.d.ts +0 -37
  71. package/dist/models/account-holdings.js +0 -2
  72. package/dist/models/account-information-get-user-account-order-detail-request.d.ts +0 -13
  73. package/dist/models/account-information-get-user-account-order-detail-request.js +0 -2
  74. package/dist/models/account-order-record-child-brokerage-order-ids.d.ts +0 -19
  75. package/dist/models/account-order-record-child-brokerage-order-ids.js +0 -2
  76. package/dist/models/account-order-record-leg-instrument.d.ts +0 -38
  77. package/dist/models/account-order-record-leg-instrument.js +0 -2
  78. package/dist/models/account-order-record-leg.d.ts +0 -58
  79. package/dist/models/account-order-record-leg.js +0 -2
  80. package/dist/models/account-order-record-option-symbol.d.ts +0 -52
  81. package/dist/models/account-order-record-option-symbol.js +0 -2
  82. package/dist/models/account-order-record-quote-currency.d.ts +0 -25
  83. package/dist/models/account-order-record-quote-currency.js +0 -2
  84. package/dist/models/account-order-record-quote-universal-symbol.d.ts +0 -73
  85. package/dist/models/account-order-record-quote-universal-symbol.js +0 -2
  86. package/dist/models/account-order-record-status-v2.d.ts +0 -6
  87. package/dist/models/account-order-record-status-v2.js +0 -2
  88. package/dist/models/account-order-record-status.d.ts +0 -6
  89. package/dist/models/account-order-record-status.js +0 -2
  90. package/dist/models/account-order-record-trailing-stop.d.ts +0 -21
  91. package/dist/models/account-order-record-trailing-stop.js +0 -2
  92. package/dist/models/account-order-record-universal-symbol.d.ts +0 -73
  93. package/dist/models/account-order-record-universal-symbol.js +0 -2
  94. package/dist/models/account-order-record-v2.d.ts +0 -97
  95. package/dist/models/account-order-record-v2.js +0 -2
  96. package/dist/models/account-order-record.d.ts +0 -168
  97. package/dist/models/account-order-record.js +0 -2
  98. package/dist/models/account-orders-v2-response.d.ts +0 -15
  99. package/dist/models/account-orders-v2-response.js +0 -2
  100. package/dist/models/account-position.d.ts +0 -52
  101. package/dist/models/account-position.js +0 -2
  102. package/dist/models/account-simple.d.ts +0 -39
  103. package/dist/models/account-simple.js +0 -2
  104. package/dist/models/account-sync-status.d.ts +0 -21
  105. package/dist/models/account-sync-status.js +0 -2
  106. package/dist/models/account-universal-activity-currency.d.ts +0 -25
  107. package/dist/models/account-universal-activity-currency.js +0 -2
  108. package/dist/models/account-universal-activity-option-symbol.d.ts +0 -52
  109. package/dist/models/account-universal-activity-option-symbol.js +0 -2
  110. package/dist/models/account-universal-activity-symbol.d.ts +0 -65
  111. package/dist/models/account-universal-activity-symbol.js +0 -2
  112. package/dist/models/account-universal-activity.d.ts +0 -107
  113. package/dist/models/account-universal-activity.js +0 -2
  114. package/dist/models/account-value-history-item.d.ts +0 -20
  115. package/dist/models/account-value-history-item.js +0 -2
  116. package/dist/models/account-value-history-response.d.ts +0 -21
  117. package/dist/models/account-value-history-response.js +0 -2
  118. package/dist/models/account.d.ts +0 -126
  119. package/dist/models/account.js +0 -2
  120. package/dist/models/action-strict-with-options.d.ts +0 -6
  121. package/dist/models/action-strict-with-options.js +0 -2
  122. package/dist/models/action-strict.d.ts +0 -6
  123. package/dist/models/action-strict.js +0 -2
  124. package/dist/models/adr-instrument.d.ts +0 -59
  125. package/dist/models/adr-instrument.js +0 -2
  126. package/dist/models/all-account-positions-response.d.ts +0 -15
  127. package/dist/models/all-account-positions-response.js +0 -2
  128. package/dist/models/authentication-login-snap-trade-user200-response.d.ts +0 -7
  129. package/dist/models/authentication-login-snap-trade-user200-response.js +0 -2
  130. package/dist/models/balance-currency.d.ts +0 -25
  131. package/dist/models/balance-currency.js +0 -2
  132. package/dist/models/balance.d.ts +0 -27
  133. package/dist/models/balance.js +0 -2
  134. package/dist/models/brokerage-authorization-disabled-confirmation.d.ts +0 -14
  135. package/dist/models/brokerage-authorization-disabled-confirmation.js +0 -2
  136. package/dist/models/brokerage-authorization-refresh-confirmation.d.ts +0 -14
  137. package/dist/models/brokerage-authorization-refresh-confirmation.js +0 -2
  138. package/dist/models/brokerage-authorization-transactions-sync-confirmation.d.ts +0 -14
  139. package/dist/models/brokerage-authorization-transactions-sync-confirmation.js +0 -2
  140. package/dist/models/brokerage-authorization-type-read-only-brokerage.d.ts +0 -26
  141. package/dist/models/brokerage-authorization-type-read-only-brokerage.js +0 -2
  142. package/dist/models/brokerage-authorization-type-read-only.d.ts +0 -36
  143. package/dist/models/brokerage-authorization-type-read-only.js +0 -2
  144. package/dist/models/brokerage-authorization.d.ts +0 -73
  145. package/dist/models/brokerage-authorization.js +0 -2
  146. package/dist/models/brokerage-instrument.d.ts +0 -38
  147. package/dist/models/brokerage-instrument.js +0 -2
  148. package/dist/models/brokerage-instruments-response.d.ts +0 -15
  149. package/dist/models/brokerage-instruments-response.js +0 -2
  150. package/dist/models/brokerage-type.d.ts +0 -20
  151. package/dist/models/brokerage-type.js +0 -2
  152. package/dist/models/brokerage.d.ts +0 -122
  153. package/dist/models/brokerage.js +0 -2
  154. package/dist/models/cancel-order-response.d.ts +0 -22
  155. package/dist/models/cancel-order-response.js +0 -2
  156. package/dist/models/cef-instrument.d.ts +0 -59
  157. package/dist/models/cef-instrument.js +0 -2
  158. package/dist/models/child-brokerage-order-ids.d.ts +0 -20
  159. package/dist/models/child-brokerage-order-ids.js +0 -2
  160. package/dist/models/complex-order-leg.d.ts +0 -62
  161. package/dist/models/complex-order-leg.js +0 -2
  162. package/dist/models/complex-order-response.d.ts +0 -22
  163. package/dist/models/complex-order-response.js +0 -2
  164. package/dist/models/connections-session-events200-response-inner.d.ts +0 -6
  165. package/dist/models/connections-session-events200-response-inner.js +0 -2
  166. package/dist/models/crypto-instrument.d.ts +0 -59
  167. package/dist/models/crypto-instrument.js +0 -2
  168. package/dist/models/crypto-order-form.d.ts +0 -66
  169. package/dist/models/crypto-order-form.js +0 -2
  170. package/dist/models/crypto-order-preview-estimated-fee.d.ts +0 -20
  171. package/dist/models/crypto-order-preview-estimated-fee.js +0 -2
  172. package/dist/models/crypto-order-preview.d.ts +0 -15
  173. package/dist/models/crypto-order-preview.js +0 -2
  174. package/dist/models/crypto-trading-instrument.d.ts +0 -22
  175. package/dist/models/crypto-trading-instrument.js +0 -2
  176. package/dist/models/cryptocurrency-pair-quote.d.ts +0 -32
  177. package/dist/models/cryptocurrency-pair-quote.js +0 -2
  178. package/dist/models/cryptocurrency-pair.d.ts +0 -32
  179. package/dist/models/cryptocurrency-pair.js +0 -2
  180. package/dist/models/currency.d.ts +0 -26
  181. package/dist/models/currency.js +0 -2
  182. package/dist/models/delete-connection-confirmation.d.ts +0 -20
  183. package/dist/models/delete-connection-confirmation.js +0 -2
  184. package/dist/models/delete-user-response.d.ts +0 -26
  185. package/dist/models/delete-user-response.js +0 -2
  186. package/dist/models/dividend-at-date.d.ts +0 -26
  187. package/dist/models/dividend-at-date.js +0 -2
  188. package/dist/models/encrypted-response-encrypted-message-data.d.ts +0 -26
  189. package/dist/models/encrypted-response-encrypted-message-data.js +0 -2
  190. package/dist/models/encrypted-response.d.ts +0 -20
  191. package/dist/models/encrypted-response.js +0 -2
  192. package/dist/models/etf-instrument.d.ts +0 -59
  193. package/dist/models/etf-instrument.js +0 -2
  194. package/dist/models/exchange-rate-pairs.d.ts +0 -27
  195. package/dist/models/exchange-rate-pairs.js +0 -2
  196. package/dist/models/exchange.d.ts +0 -56
  197. package/dist/models/exchange.js +0 -2
  198. package/dist/models/figi-instrument.d.ts +0 -20
  199. package/dist/models/figi-instrument.js +0 -2
  200. package/dist/models/future-instrument.d.ts +0 -64
  201. package/dist/models/future-instrument.js +0 -2
  202. package/dist/models/holdings-status.d.ts +0 -19
  203. package/dist/models/holdings-status.js +0 -2
  204. package/dist/models/index.d.ts +0 -173
  205. package/dist/models/index.js +0 -189
  206. package/dist/models/instrument.d.ts +0 -33
  207. package/dist/models/instrument.js +0 -2
  208. package/dist/models/login-redirect-uri.d.ts +0 -19
  209. package/dist/models/login-redirect-uri.js +0 -2
  210. package/dist/models/manual-trade-and-impact.d.ts +0 -29
  211. package/dist/models/manual-trade-and-impact.js +0 -2
  212. package/dist/models/manual-trade-balance.d.ts +0 -28
  213. package/dist/models/manual-trade-balance.js +0 -2
  214. package/dist/models/manual-trade-form-bracket.d.ts +0 -67
  215. package/dist/models/manual-trade-form-bracket.js +0 -2
  216. package/dist/models/manual-trade-form-complex.d.ts +0 -28
  217. package/dist/models/manual-trade-form-complex.js +0 -2
  218. package/dist/models/manual-trade-form-notional-value.d.ts +0 -6
  219. package/dist/models/manual-trade-form-notional-value.js +0 -2
  220. package/dist/models/manual-trade-form-with-options.d.ts +0 -78
  221. package/dist/models/manual-trade-form-with-options.js +0 -2
  222. package/dist/models/manual-trade-form.d.ts +0 -65
  223. package/dist/models/manual-trade-form.js +0 -2
  224. package/dist/models/manual-trade-impact.d.ts +0 -38
  225. package/dist/models/manual-trade-impact.js +0 -2
  226. package/dist/models/manual-trade-replace-form.d.ts +0 -58
  227. package/dist/models/manual-trade-replace-form.js +0 -2
  228. package/dist/models/manual-trade-symbol.d.ts +0 -49
  229. package/dist/models/manual-trade-symbol.js +0 -2
  230. package/dist/models/manual-trade.d.ts +0 -60
  231. package/dist/models/manual-trade.js +0 -2
  232. package/dist/models/mleg-action-strict.d.ts +0 -6
  233. package/dist/models/mleg-action-strict.js +0 -2
  234. package/dist/models/mleg-instrument-type.d.ts +0 -6
  235. package/dist/models/mleg-instrument-type.js +0 -2
  236. package/dist/models/mleg-leg.d.ts +0 -28
  237. package/dist/models/mleg-leg.js +0 -2
  238. package/dist/models/mleg-order-response.d.ts +0 -21
  239. package/dist/models/mleg-order-response.js +0 -2
  240. package/dist/models/mleg-order-type-strict.d.ts +0 -6
  241. package/dist/models/mleg-order-type-strict.js +0 -2
  242. package/dist/models/mleg-price-effect-strict.d.ts +0 -6
  243. package/dist/models/mleg-price-effect-strict.js +0 -2
  244. package/dist/models/mleg-trade-form.d.ts +0 -47
  245. package/dist/models/mleg-trade-form.js +0 -2
  246. package/dist/models/mleg-trading-instrument.d.ts +0 -21
  247. package/dist/models/mleg-trading-instrument.js +0 -2
  248. package/dist/models/model400-failed-request-response.d.ts +0 -20
  249. package/dist/models/model400-failed-request-response.js +0 -2
  250. package/dist/models/model401-failed-request-response.d.ts +0 -20
  251. package/dist/models/model401-failed-request-response.js +0 -2
  252. package/dist/models/model402-brokerage-auth-already-disabled-exception.d.ts +0 -20
  253. package/dist/models/model402-brokerage-auth-already-disabled-exception.js +0 -2
  254. package/dist/models/model402-brokerage-auth-disabled-response.d.ts +0 -20
  255. package/dist/models/model402-brokerage-auth-disabled-response.js +0 -2
  256. package/dist/models/model403-failed-request-response.d.ts +0 -20
  257. package/dist/models/model403-failed-request-response.js +0 -2
  258. package/dist/models/model403-feature-not-enabled-response.d.ts +0 -20
  259. package/dist/models/model403-feature-not-enabled-response.js +0 -2
  260. package/dist/models/model404-failed-request-response.d.ts +0 -20
  261. package/dist/models/model404-failed-request-response.js +0 -2
  262. package/dist/models/model425-failed-request-response.d.ts +0 -20
  263. package/dist/models/model425-failed-request-response.js +0 -2
  264. package/dist/models/model500-unexpected-exception-response.d.ts +0 -26
  265. package/dist/models/model500-unexpected-exception-response.js +0 -2
  266. package/dist/models/monthly-dividends.d.ts +0 -21
  267. package/dist/models/monthly-dividends.js +0 -2
  268. package/dist/models/mutual-fund-instrument.d.ts +0 -59
  269. package/dist/models/mutual-fund-instrument.js +0 -2
  270. package/dist/models/net-contributions.d.ts +0 -26
  271. package/dist/models/net-contributions.js +0 -2
  272. package/dist/models/net-dividend.d.ts +0 -27
  273. package/dist/models/net-dividend.js +0 -2
  274. package/dist/models/notional-value.d.ts +0 -6
  275. package/dist/models/notional-value.js +0 -2
  276. package/dist/models/option-brokerage-symbol.d.ts +0 -29
  277. package/dist/models/option-brokerage-symbol.js +0 -2
  278. package/dist/models/option-chain-inner-chain-per-root-inner-chain-per-strike-price-inner.d.ts +0 -26
  279. package/dist/models/option-chain-inner-chain-per-root-inner-chain-per-strike-price-inner.js +0 -2
  280. package/dist/models/option-chain-inner-chain-per-root-inner.d.ts +0 -27
  281. package/dist/models/option-chain-inner-chain-per-root-inner.js +0 -2
  282. package/dist/models/option-chain-inner.d.ts +0 -39
  283. package/dist/models/option-chain-inner.js +0 -2
  284. package/dist/models/option-impact.d.ts +0 -28
  285. package/dist/models/option-impact.js +0 -2
  286. package/dist/models/option-instrument.d.ts +0 -60
  287. package/dist/models/option-instrument.js +0 -2
  288. package/dist/models/option-leg.d.ts +0 -28
  289. package/dist/models/option-leg.js +0 -2
  290. package/dist/models/option-quote-greeks.d.ts +0 -32
  291. package/dist/models/option-quote-greeks.js +0 -2
  292. package/dist/models/option-quote.d.ts +0 -39
  293. package/dist/models/option-quote.js +0 -2
  294. package/dist/models/option-strategy-legs-inner.d.ts +0 -31
  295. package/dist/models/option-strategy-legs-inner.js +0 -2
  296. package/dist/models/option-strategy.d.ts +0 -40
  297. package/dist/models/option-strategy.js +0 -2
  298. package/dist/models/options-position-currency.d.ts +0 -25
  299. package/dist/models/options-position-currency.js +0 -2
  300. package/dist/models/options-position.d.ts +0 -41
  301. package/dist/models/options-position.js +0 -2
  302. package/dist/models/options-symbol.d.ts +0 -53
  303. package/dist/models/options-symbol.js +0 -2
  304. package/dist/models/order-type-strict.d.ts +0 -6
  305. package/dist/models/order-type-strict.js +0 -2
  306. package/dist/models/order-updated-response-order.d.ts +0 -167
  307. package/dist/models/order-updated-response-order.js +0 -2
  308. package/dist/models/order-updated-response.d.ts +0 -21
  309. package/dist/models/order-updated-response.js +0 -2
  310. package/dist/models/other-instrument.d.ts +0 -59
  311. package/dist/models/other-instrument.js +0 -2
  312. package/dist/models/paginated-universal-activity.d.ts +0 -22
  313. package/dist/models/paginated-universal-activity.js +0 -2
  314. package/dist/models/pagination-details.d.ts +0 -26
  315. package/dist/models/pagination-details.js +0 -2
  316. package/dist/models/partner-data.d.ts +0 -82
  317. package/dist/models/partner-data.js +0 -2
  318. package/dist/models/past-value.d.ts +0 -26
  319. package/dist/models/past-value.js +0 -2
  320. package/dist/models/performance-custom.d.ts +0 -127
  321. package/dist/models/performance-custom.js +0 -2
  322. package/dist/models/position-currency.d.ts +0 -25
  323. package/dist/models/position-currency.js +0 -2
  324. package/dist/models/position-symbol.d.ts +0 -50
  325. package/dist/models/position-symbol.js +0 -2
  326. package/dist/models/position.d.ts +0 -66
  327. package/dist/models/position.js +0 -2
  328. package/dist/models/rate-of-return-object.d.ts +0 -28
  329. package/dist/models/rate-of-return-object.js +0 -2
  330. package/dist/models/rate-of-return-response.d.ts +0 -15
  331. package/dist/models/rate-of-return-response.js +0 -2
  332. package/dist/models/recent-orders-response.d.ts +0 -15
  333. package/dist/models/recent-orders-response.js +0 -2
  334. package/dist/models/security-type.d.ts +0 -33
  335. package/dist/models/security-type.js +0 -2
  336. package/dist/models/session-event.d.ts +0 -52
  337. package/dist/models/session-event.js +0 -2
  338. package/dist/models/simple-order-form.d.ts +0 -67
  339. package/dist/models/simple-order-form.js +0 -2
  340. package/dist/models/snap-trade-holdings-account.d.ts +0 -60
  341. package/dist/models/snap-trade-holdings-account.js +0 -2
  342. package/dist/models/snap-trade-holdings-total-value.d.ts +0 -20
  343. package/dist/models/snap-trade-holdings-total-value.js +0 -2
  344. package/dist/models/snap-trade-login-user-request-body.d.ts +0 -58
  345. package/dist/models/snap-trade-login-user-request-body.js +0 -2
  346. package/dist/models/snap-trade-register-user-request-body.d.ts +0 -13
  347. package/dist/models/snap-trade-register-user-request-body.js +0 -2
  348. package/dist/models/status.d.ts +0 -26
  349. package/dist/models/status.js +0 -2
  350. package/dist/models/stock-instrument-figi-instrument.d.ts +0 -19
  351. package/dist/models/stock-instrument-figi-instrument.js +0 -2
  352. package/dist/models/stock-instrument.d.ts +0 -59
  353. package/dist/models/stock-instrument.js +0 -2
  354. package/dist/models/stop-loss.d.ts +0 -20
  355. package/dist/models/stop-loss.js +0 -2
  356. package/dist/models/strategy-order-record.d.ts +0 -77
  357. package/dist/models/strategy-order-record.js +0 -2
  358. package/dist/models/strategy-quotes-greek.d.ts +0 -38
  359. package/dist/models/strategy-quotes-greek.js +0 -2
  360. package/dist/models/strategy-quotes.d.ts +0 -46
  361. package/dist/models/strategy-quotes.js +0 -2
  362. package/dist/models/sub-period-return-rate.d.ts +0 -26
  363. package/dist/models/sub-period-return-rate.js +0 -2
  364. package/dist/models/symbol-currency.d.ts +0 -25
  365. package/dist/models/symbol-currency.js +0 -2
  366. package/dist/models/symbol-exchange.d.ts +0 -55
  367. package/dist/models/symbol-exchange.js +0 -2
  368. package/dist/models/symbol-query.d.ts +0 -13
  369. package/dist/models/symbol-query.js +0 -2
  370. package/dist/models/symbol.d.ts +0 -66
  371. package/dist/models/symbol.js +0 -2
  372. package/dist/models/symbols-quotes-inner.d.ts +0 -44
  373. package/dist/models/symbols-quotes-inner.js +0 -2
  374. package/dist/models/take-profit.d.ts +0 -14
  375. package/dist/models/take-profit.js +0 -2
  376. package/dist/models/tax-lot.d.ts +0 -50
  377. package/dist/models/tax-lot.js +0 -2
  378. package/dist/models/time-in-force-strict.d.ts +0 -6
  379. package/dist/models/time-in-force-strict.js +0 -2
  380. package/dist/models/trade-detection-cancel-subscription-response.d.ts +0 -14
  381. package/dist/models/trade-detection-cancel-subscription-response.js +0 -2
  382. package/dist/models/trade-detection-subscription.d.ts +0 -26
  383. package/dist/models/trade-detection-subscription.js +0 -2
  384. package/dist/models/trading-instrument.d.ts +0 -22
  385. package/dist/models/trading-instrument.js +0 -2
  386. package/dist/models/trading-search-cryptocurrency-pair-instruments200-response.d.ts +0 -15
  387. package/dist/models/trading-search-cryptocurrency-pair-instruments200-response.js +0 -2
  388. package/dist/models/trading-session.d.ts +0 -6
  389. package/dist/models/trading-session.js +0 -2
  390. package/dist/models/trailing-stop.d.ts +0 -22
  391. package/dist/models/trailing-stop.js +0 -2
  392. package/dist/models/transactions-status.d.ts +0 -25
  393. package/dist/models/transactions-status.js +0 -2
  394. package/dist/models/underlying-option-instrument.d.ts +0 -27
  395. package/dist/models/underlying-option-instrument.js +0 -2
  396. package/dist/models/underlying-symbol-exchange.d.ts +0 -61
  397. package/dist/models/underlying-symbol-exchange.js +0 -2
  398. package/dist/models/underlying-symbol-type.d.ts +0 -32
  399. package/dist/models/underlying-symbol-type.js +0 -2
  400. package/dist/models/underlying-symbol.d.ts +0 -74
  401. package/dist/models/underlying-symbol.js +0 -2
  402. package/dist/models/universal-activity.d.ts +0 -114
  403. package/dist/models/universal-activity.js +0 -2
  404. package/dist/models/universal-symbol.d.ts +0 -74
  405. package/dist/models/universal-symbol.js +0 -2
  406. package/dist/models/user-idand-secret.d.ts +0 -19
  407. package/dist/models/user-idand-secret.js +0 -2
  408. package/dist/models/usexchange.d.ts +0 -62
  409. package/dist/models/usexchange.js +0 -2
  410. package/dist/models/validated-trade-body.d.ts +0 -13
  411. package/dist/models/validated-trade-body.js +0 -2
  412. package/dist/operationParameterMap.d.ts +0 -8
  413. package/dist/operationParameterMap.js +0 -966
  414. package/dist/pagination/page-types.d.ts +0 -16
  415. package/dist/pagination/page-types.js +0 -12
  416. package/dist/pagination/page.d.ts +0 -25
  417. package/dist/pagination/page.js +0 -32
  418. package/dist/pagination/pageable.d.ts +0 -47
  419. package/dist/pagination/pageable.js +0 -70
  420. package/dist/pagination/paginate.d.ts +0 -6
  421. package/dist/pagination/paginate.js +0 -39
  422. package/dist/requestAfterHook.d.ts +0 -8
  423. package/dist/requestAfterHook.js +0 -82
  424. package/dist/requestBeforeHook.d.ts +0 -10
  425. package/dist/requestBeforeHook.js +0 -8
  426. package/dist/requestBeforeUrlHook.d.ts +0 -7
  427. package/dist/requestBeforeUrlHook.js +0 -5
@@ -1,1372 +0,0 @@
1
- "use strict";
2
- /* tslint:disable */
3
- /* eslint-disable */
4
- /*
5
- SnapTrade
6
-
7
- Connect brokerage accounts to your app for live positions and trading
8
-
9
- The version of the OpenAPI document: 1.0.0
10
- Contact: api@snaptrade.com
11
-
12
- NOTE: This file is auto generated by Konfig (https://konfigthis.com).
13
- */
14
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
15
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
16
- return new (P || (P = Promise))(function (resolve, reject) {
17
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
18
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
19
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
20
- step((generator = generator.apply(thisArg, _arguments || [])).next());
21
- });
22
- };
23
- Object.defineProperty(exports, "__esModule", { value: true });
24
- exports.AccountInformationApiGenerated = exports.AccountInformationApiFactory = exports.AccountInformationApiFp = exports.AccountInformationApiAxiosParamCreator = void 0;
25
- const axios_1 = require("axios");
26
- // Some imports not used depending on template conditions
27
- // @ts-ignore
28
- const common_1 = require("../common");
29
- // @ts-ignore
30
- const base_1 = require("../base");
31
- const requestBeforeHook_1 = require("../requestBeforeHook");
32
- /**
33
- * AccountInformationApi - axios parameter creator
34
- * @export
35
- */
36
- const AccountInformationApiAxiosParamCreator = function (configuration) {
37
- return {
38
- /**
39
- * Returns all historical transactions for the specified account. This endpoint is paginated with a default page size of 1000. The endpoint will return a maximum of 1000 transactions per request. See the query parameters for pagination options. Transaction are returned in reverse chronological order, using the `trade_date` field. This endpoint returns Daily data. Daily data is cached and refreshed once a day. Exact refresh timing may vary by brokerage. If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
40
- * @summary List account activities
41
- * @param {string} accountId
42
- * @param {string} userId
43
- * @param {string} userSecret
44
- * @param {string | Date} [startDate] The start date (inclusive) of the transaction history to retrieve. If not provided, the default is the first transaction known to SnapTrade based on `trade_date`.
45
- * @param {string | Date} [endDate] The end date (inclusive) of the transaction history to retrieve. If not provided, the default is the last transaction known to SnapTrade based on `trade_date`.
46
- * @param {number} [offset] An integer that specifies the starting point of the paginated results. Default is 0.
47
- * @param {number} [limit] An integer that specifies the maximum number of transactions to return. Default of 1000.
48
- * @param {string} [type] Optional comma separated list of transaction types to filter by. SnapTrade does a best effort to categorize brokerage transaction types into a common set of values. Here are some of the most popular values: - `BUY` - Asset bought. - `SELL` - Asset sold. - `DIVIDEND` - Dividend payout. - `CONTRIBUTION` - Cash contribution. - `WITHDRAWAL` - Cash withdrawal. - `REI` - Dividend reinvestment. - `STOCK_DIVIDEND` - A type of dividend where a company distributes shares instead of cash - `INTEREST` - Interest deposited into the account. - `FEE` - Fee withdrawn from the account. - `TAX` - A tax related fee. - `OPTIONEXPIRATION` - Option expiration event. - `OPTIONASSIGNMENT` - Option assignment event. - `OPTIONEXERCISE` - Option exercise event. - `TRANSFER` - Transfer of assets from one account to another. - `SPLIT` - A stock share split.
49
- * @param {*} [options] Override http request option.
50
- * @throws {RequiredError}
51
- */
52
- getAccountActivities: (accountId, userId, userSecret, startDate, endDate, offset, limit, type, options = {}) => __awaiter(this, void 0, void 0, function* () {
53
- // verify required parameter 'accountId' is not null or undefined
54
- (0, common_1.assertParamExists)('getAccountActivities', 'accountId', accountId);
55
- // verify required parameter 'userId' is not null or undefined
56
- (0, common_1.assertParamExists)('getAccountActivities', 'userId', userId);
57
- // verify required parameter 'userSecret' is not null or undefined
58
- (0, common_1.assertParamExists)('getAccountActivities', 'userSecret', userSecret);
59
- const localVarPath = `/accounts/{accountId}/activities`
60
- .replace(`{${"accountId"}}`, encodeURIComponent(String(accountId !== undefined ? accountId : `-accountId-`)));
61
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
62
- const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
63
- let baseOptions;
64
- if (configuration) {
65
- baseOptions = configuration.baseOptions;
66
- }
67
- const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
68
- const localVarHeaderParameter = configuration && !(0, common_1.isBrowser)() ? { "User-Agent": configuration.userAgent } : {};
69
- const localVarQueryParameter = {};
70
- // authentication PartnerClientId required
71
- yield (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, key: "clientId", keyParamName: "clientId", configuration });
72
- // authentication PartnerSignature required
73
- yield (0, common_1.setApiKeyToObject)({ object: localVarHeaderParameter, key: "Signature", keyParamName: "signature", configuration });
74
- // authentication PartnerTimestamp required
75
- yield (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, key: "timestamp", keyParamName: "timestamp", configuration });
76
- if (startDate !== undefined) {
77
- localVarQueryParameter['startDate'] = (startDate instanceof Date) ?
78
- startDate.toISOString().substr(0, 10) :
79
- startDate;
80
- }
81
- if (endDate !== undefined) {
82
- localVarQueryParameter['endDate'] = (endDate instanceof Date) ?
83
- endDate.toISOString().substr(0, 10) :
84
- endDate;
85
- }
86
- if (offset !== undefined) {
87
- localVarQueryParameter['offset'] = offset;
88
- }
89
- if (limit !== undefined) {
90
- localVarQueryParameter['limit'] = limit;
91
- }
92
- if (type !== undefined) {
93
- localVarQueryParameter['type'] = type;
94
- }
95
- if (userId !== undefined) {
96
- localVarQueryParameter['userId'] = userId;
97
- }
98
- if (userSecret !== undefined) {
99
- localVarQueryParameter['userSecret'] = userSecret;
100
- }
101
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
102
- localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
103
- (0, requestBeforeHook_1.requestBeforeHook)({
104
- queryParameters: localVarQueryParameter,
105
- requestConfig: localVarRequestOptions,
106
- path: localVarPath,
107
- configuration,
108
- pathTemplate: '/accounts/{accountId}/activities',
109
- httpMethod: 'GET'
110
- });
111
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
112
- return {
113
- url: (0, common_1.toPathString)(localVarUrlObj),
114
- options: localVarRequestOptions,
115
- };
116
- }),
117
- /**
118
- * An experimental endpoint that returns estimated historical total account value for the specified account. Total account value is the sum of the market value of all positions and cash in the account at a given time. This endpoint is experimental, disabled by default, and has a maximum lookback of 1 year.
119
- * @summary List historical account total value
120
- * @param {string} userId
121
- * @param {string} userSecret
122
- * @param {string} accountId
123
- * @param {*} [options] Override http request option.
124
- * @throws {RequiredError}
125
- */
126
- getAccountBalanceHistory: (userId, userSecret, accountId, options = {}) => __awaiter(this, void 0, void 0, function* () {
127
- // verify required parameter 'userId' is not null or undefined
128
- (0, common_1.assertParamExists)('getAccountBalanceHistory', 'userId', userId);
129
- // verify required parameter 'userSecret' is not null or undefined
130
- (0, common_1.assertParamExists)('getAccountBalanceHistory', 'userSecret', userSecret);
131
- // verify required parameter 'accountId' is not null or undefined
132
- (0, common_1.assertParamExists)('getAccountBalanceHistory', 'accountId', accountId);
133
- const localVarPath = `/accounts/{accountId}/balanceHistory`
134
- .replace(`{${"accountId"}}`, encodeURIComponent(String(accountId !== undefined ? accountId : `-accountId-`)));
135
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
136
- const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
137
- let baseOptions;
138
- if (configuration) {
139
- baseOptions = configuration.baseOptions;
140
- }
141
- const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
142
- const localVarHeaderParameter = configuration && !(0, common_1.isBrowser)() ? { "User-Agent": configuration.userAgent } : {};
143
- const localVarQueryParameter = {};
144
- // authentication PartnerClientId required
145
- yield (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, key: "clientId", keyParamName: "clientId", configuration });
146
- // authentication PartnerSignature required
147
- yield (0, common_1.setApiKeyToObject)({ object: localVarHeaderParameter, key: "Signature", keyParamName: "signature", configuration });
148
- // authentication PartnerTimestamp required
149
- yield (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, key: "timestamp", keyParamName: "timestamp", configuration });
150
- if (userId !== undefined) {
151
- localVarQueryParameter['userId'] = userId;
152
- }
153
- if (userSecret !== undefined) {
154
- localVarQueryParameter['userSecret'] = userSecret;
155
- }
156
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
157
- localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
158
- (0, requestBeforeHook_1.requestBeforeHook)({
159
- queryParameters: localVarQueryParameter,
160
- requestConfig: localVarRequestOptions,
161
- path: localVarPath,
162
- configuration,
163
- pathTemplate: '/accounts/{accountId}/balanceHistory',
164
- httpMethod: 'GET'
165
- });
166
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
167
- return {
168
- url: (0, common_1.toPathString)(localVarUrlObj),
169
- options: localVarRequestOptions,
170
- };
171
- }),
172
- /**
173
- * Returns a list of all positions in the specified account. The `results` list can contain multiple instrument types in the same response, including stocks, ADRs, ETFs, mutual funds, closed-end funds, crypto, futures, and option positions. Use the `instrument.kind` discriminator to determine the schema for each position\'s `instrument`. `mutualfund` positions may also include `cash_equivalent`. `stock` positions may include `tax_lots` when tax lot data is enabled for the account. If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
174
- * @summary List all account positions
175
- * @param {string} userId
176
- * @param {string} userSecret
177
- * @param {string} accountId
178
- * @param {*} [options] Override http request option.
179
- * @throws {RequiredError}
180
- */
181
- getAllAccountPositions: (userId, userSecret, accountId, options = {}) => __awaiter(this, void 0, void 0, function* () {
182
- // verify required parameter 'userId' is not null or undefined
183
- (0, common_1.assertParamExists)('getAllAccountPositions', 'userId', userId);
184
- // verify required parameter 'userSecret' is not null or undefined
185
- (0, common_1.assertParamExists)('getAllAccountPositions', 'userSecret', userSecret);
186
- // verify required parameter 'accountId' is not null or undefined
187
- (0, common_1.assertParamExists)('getAllAccountPositions', 'accountId', accountId);
188
- const localVarPath = `/accounts/{accountId}/positions/all`
189
- .replace(`{${"accountId"}}`, encodeURIComponent(String(accountId !== undefined ? accountId : `-accountId-`)));
190
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
191
- const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
192
- let baseOptions;
193
- if (configuration) {
194
- baseOptions = configuration.baseOptions;
195
- }
196
- const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
197
- const localVarHeaderParameter = configuration && !(0, common_1.isBrowser)() ? { "User-Agent": configuration.userAgent } : {};
198
- const localVarQueryParameter = {};
199
- // authentication PartnerClientId required
200
- yield (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, key: "clientId", keyParamName: "clientId", configuration });
201
- // authentication PartnerSignature required
202
- yield (0, common_1.setApiKeyToObject)({ object: localVarHeaderParameter, key: "Signature", keyParamName: "signature", configuration });
203
- // authentication PartnerTimestamp required
204
- yield (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, key: "timestamp", keyParamName: "timestamp", configuration });
205
- if (userId !== undefined) {
206
- localVarQueryParameter['userId'] = userId;
207
- }
208
- if (userSecret !== undefined) {
209
- localVarQueryParameter['userSecret'] = userSecret;
210
- }
211
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
212
- localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
213
- (0, requestBeforeHook_1.requestBeforeHook)({
214
- queryParameters: localVarQueryParameter,
215
- requestConfig: localVarRequestOptions,
216
- path: localVarPath,
217
- configuration,
218
- pathTemplate: '/accounts/{accountId}/positions/all',
219
- httpMethod: 'GET'
220
- });
221
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
222
- return {
223
- url: (0, common_1.toPathString)(localVarUrlObj),
224
- options: localVarRequestOptions,
225
- };
226
- }),
227
- /**
228
- * **Deprecated, please use the account-specific holdings endpoint instead.** List all accounts for the user, plus balances, positions, and orders for each account. **Note:** This endpoint will return HTTP 410 Gone for all customers that sign up after April 25, 2026.
229
- * @summary List all accounts for the user, plus balances, positions, and orders for each account.
230
- * @param {string} userId
231
- * @param {string} userSecret
232
- * @param {string} [brokerageAuthorizations] Optional. Comma separated list of authorization IDs (only use if filtering is needed on one or more authorizations).
233
- * @param {*} [options] Override http request option.
234
- * @deprecated
235
- * @throws {RequiredError}
236
- */
237
- getAllUserHoldings: (userId, userSecret, brokerageAuthorizations, options = {}) => __awaiter(this, void 0, void 0, function* () {
238
- // verify required parameter 'userId' is not null or undefined
239
- (0, common_1.assertParamExists)('getAllUserHoldings', 'userId', userId);
240
- // verify required parameter 'userSecret' is not null or undefined
241
- (0, common_1.assertParamExists)('getAllUserHoldings', 'userSecret', userSecret);
242
- const localVarPath = `/holdings`;
243
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
244
- const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
245
- let baseOptions;
246
- if (configuration) {
247
- baseOptions = configuration.baseOptions;
248
- }
249
- const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
250
- const localVarHeaderParameter = configuration && !(0, common_1.isBrowser)() ? { "User-Agent": configuration.userAgent } : {};
251
- const localVarQueryParameter = {};
252
- // authentication PartnerClientId required
253
- yield (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, key: "clientId", keyParamName: "clientId", configuration });
254
- // authentication PartnerSignature required
255
- yield (0, common_1.setApiKeyToObject)({ object: localVarHeaderParameter, key: "Signature", keyParamName: "signature", configuration });
256
- // authentication PartnerTimestamp required
257
- yield (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, key: "timestamp", keyParamName: "timestamp", configuration });
258
- if (userId !== undefined) {
259
- localVarQueryParameter['userId'] = userId;
260
- }
261
- if (userSecret !== undefined) {
262
- localVarQueryParameter['userSecret'] = userSecret;
263
- }
264
- if (brokerageAuthorizations !== undefined) {
265
- localVarQueryParameter['brokerage_authorizations'] = brokerageAuthorizations;
266
- }
267
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
268
- localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
269
- (0, requestBeforeHook_1.requestBeforeHook)({
270
- queryParameters: localVarQueryParameter,
271
- requestConfig: localVarRequestOptions,
272
- path: localVarPath,
273
- configuration,
274
- pathTemplate: '/holdings',
275
- httpMethod: 'GET'
276
- });
277
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
278
- return {
279
- url: (0, common_1.toPathString)(localVarUrlObj),
280
- options: localVarRequestOptions,
281
- };
282
- }),
283
- /**
284
- * Returns a list of balances for the account. Each element of the list has a distinct currency. Some brokerages like Questrade [allows holding multiple currencies in the same account](https://www.questrade.com/learning/questrade-basics/balances-and-reports/understanding-your-account-balances). Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do, this endpoint returns real-time data. - If you don\'t, Daily data is cached and refreshed once a day. Exact refresh timing may vary by brokerage. If you need real-time, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint. If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
285
- * @summary List account balances
286
- * @param {string} userId
287
- * @param {string} userSecret
288
- * @param {string} accountId
289
- * @param {*} [options] Override http request option.
290
- * @throws {RequiredError}
291
- */
292
- getUserAccountBalance: (userId, userSecret, accountId, options = {}) => __awaiter(this, void 0, void 0, function* () {
293
- // verify required parameter 'userId' is not null or undefined
294
- (0, common_1.assertParamExists)('getUserAccountBalance', 'userId', userId);
295
- // verify required parameter 'userSecret' is not null or undefined
296
- (0, common_1.assertParamExists)('getUserAccountBalance', 'userSecret', userSecret);
297
- // verify required parameter 'accountId' is not null or undefined
298
- (0, common_1.assertParamExists)('getUserAccountBalance', 'accountId', accountId);
299
- const localVarPath = `/accounts/{accountId}/balances`
300
- .replace(`{${"accountId"}}`, encodeURIComponent(String(accountId !== undefined ? accountId : `-accountId-`)));
301
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
302
- const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
303
- let baseOptions;
304
- if (configuration) {
305
- baseOptions = configuration.baseOptions;
306
- }
307
- const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
308
- const localVarHeaderParameter = configuration && !(0, common_1.isBrowser)() ? { "User-Agent": configuration.userAgent } : {};
309
- const localVarQueryParameter = {};
310
- // authentication PartnerClientId required
311
- yield (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, key: "clientId", keyParamName: "clientId", configuration });
312
- // authentication PartnerSignature required
313
- yield (0, common_1.setApiKeyToObject)({ object: localVarHeaderParameter, key: "Signature", keyParamName: "signature", configuration });
314
- // authentication PartnerTimestamp required
315
- yield (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, key: "timestamp", keyParamName: "timestamp", configuration });
316
- if (userId !== undefined) {
317
- localVarQueryParameter['userId'] = userId;
318
- }
319
- if (userSecret !== undefined) {
320
- localVarQueryParameter['userSecret'] = userSecret;
321
- }
322
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
323
- localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
324
- (0, requestBeforeHook_1.requestBeforeHook)({
325
- queryParameters: localVarQueryParameter,
326
- requestConfig: localVarRequestOptions,
327
- path: localVarPath,
328
- configuration,
329
- pathTemplate: '/accounts/{accountId}/balances',
330
- httpMethod: 'GET'
331
- });
332
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
333
- return {
334
- url: (0, common_1.toPathString)(localVarUrlObj),
335
- options: localVarRequestOptions,
336
- };
337
- }),
338
- /**
339
- * Returns account detail known to SnapTrade for the specified account. Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do, this endpoint returns real-time data. - If you don\'t, Daily data is cached and refreshed once a day. Exact refresh timing may vary by brokerage. If you need real-time, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint. If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
340
- * @summary Get account detail
341
- * @param {string} userId
342
- * @param {string} userSecret
343
- * @param {string} accountId
344
- * @param {*} [options] Override http request option.
345
- * @throws {RequiredError}
346
- */
347
- getUserAccountDetails: (userId, userSecret, accountId, options = {}) => __awaiter(this, void 0, void 0, function* () {
348
- // verify required parameter 'userId' is not null or undefined
349
- (0, common_1.assertParamExists)('getUserAccountDetails', 'userId', userId);
350
- // verify required parameter 'userSecret' is not null or undefined
351
- (0, common_1.assertParamExists)('getUserAccountDetails', 'userSecret', userSecret);
352
- // verify required parameter 'accountId' is not null or undefined
353
- (0, common_1.assertParamExists)('getUserAccountDetails', 'accountId', accountId);
354
- const localVarPath = `/accounts/{accountId}`
355
- .replace(`{${"accountId"}}`, encodeURIComponent(String(accountId !== undefined ? accountId : `-accountId-`)));
356
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
357
- const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
358
- let baseOptions;
359
- if (configuration) {
360
- baseOptions = configuration.baseOptions;
361
- }
362
- const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
363
- const localVarHeaderParameter = configuration && !(0, common_1.isBrowser)() ? { "User-Agent": configuration.userAgent } : {};
364
- const localVarQueryParameter = {};
365
- // authentication PartnerClientId required
366
- yield (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, key: "clientId", keyParamName: "clientId", configuration });
367
- // authentication PartnerSignature required
368
- yield (0, common_1.setApiKeyToObject)({ object: localVarHeaderParameter, key: "Signature", keyParamName: "signature", configuration });
369
- // authentication PartnerTimestamp required
370
- yield (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, key: "timestamp", keyParamName: "timestamp", configuration });
371
- if (userId !== undefined) {
372
- localVarQueryParameter['userId'] = userId;
373
- }
374
- if (userSecret !== undefined) {
375
- localVarQueryParameter['userSecret'] = userSecret;
376
- }
377
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
378
- localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
379
- (0, requestBeforeHook_1.requestBeforeHook)({
380
- queryParameters: localVarQueryParameter,
381
- requestConfig: localVarRequestOptions,
382
- path: localVarPath,
383
- configuration,
384
- pathTemplate: '/accounts/{accountId}',
385
- httpMethod: 'GET'
386
- });
387
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
388
- return {
389
- url: (0, common_1.toPathString)(localVarUrlObj),
390
- options: localVarRequestOptions,
391
- };
392
- }),
393
- /**
394
- * Returns the detail of a single order using the external order ID provided in the request body. This endpoint only works for single-leg orders at this time. Support for multi-leg orders will be added in the future. This endpoint is always realtime and does not rely on cached data. This endpoint only returns orders placed through SnapTrade. In other words, orders placed outside of the SnapTrade network are not returned by this endpoint.
395
- * @summary Get account order detail
396
- * @param {string} accountId
397
- * @param {string} userId
398
- * @param {string} userSecret
399
- * @param {AccountInformationGetUserAccountOrderDetailRequest} accountInformationGetUserAccountOrderDetailRequest
400
- * @param {*} [options] Override http request option.
401
- * @throws {RequiredError}
402
- */
403
- getUserAccountOrderDetail: (accountId, userId, userSecret, accountInformationGetUserAccountOrderDetailRequest, options = {}) => __awaiter(this, void 0, void 0, function* () {
404
- // verify required parameter 'accountId' is not null or undefined
405
- (0, common_1.assertParamExists)('getUserAccountOrderDetail', 'accountId', accountId);
406
- // verify required parameter 'userId' is not null or undefined
407
- (0, common_1.assertParamExists)('getUserAccountOrderDetail', 'userId', userId);
408
- // verify required parameter 'userSecret' is not null or undefined
409
- (0, common_1.assertParamExists)('getUserAccountOrderDetail', 'userSecret', userSecret);
410
- // verify required parameter 'accountInformationGetUserAccountOrderDetailRequest' is not null or undefined
411
- (0, common_1.assertParamExists)('getUserAccountOrderDetail', 'accountInformationGetUserAccountOrderDetailRequest', accountInformationGetUserAccountOrderDetailRequest);
412
- const localVarPath = `/accounts/{accountId}/orders/details`
413
- .replace(`{${"accountId"}}`, encodeURIComponent(String(accountId !== undefined ? accountId : `-accountId-`)));
414
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
415
- const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
416
- let baseOptions;
417
- if (configuration) {
418
- baseOptions = configuration.baseOptions;
419
- }
420
- const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
421
- const localVarHeaderParameter = configuration && !(0, common_1.isBrowser)() ? { "User-Agent": configuration.userAgent } : {};
422
- const localVarQueryParameter = {};
423
- // authentication PartnerClientId required
424
- yield (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, key: "clientId", keyParamName: "clientId", configuration });
425
- // authentication PartnerSignature required
426
- yield (0, common_1.setApiKeyToObject)({ object: localVarHeaderParameter, key: "Signature", keyParamName: "signature", configuration });
427
- // authentication PartnerTimestamp required
428
- yield (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, key: "timestamp", keyParamName: "timestamp", configuration });
429
- if (userId !== undefined) {
430
- localVarQueryParameter['userId'] = userId;
431
- }
432
- if (userSecret !== undefined) {
433
- localVarQueryParameter['userSecret'] = userSecret;
434
- }
435
- localVarHeaderParameter['Content-Type'] = 'application/json';
436
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
437
- localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
438
- (0, requestBeforeHook_1.requestBeforeHook)({
439
- requestBody: accountInformationGetUserAccountOrderDetailRequest,
440
- queryParameters: localVarQueryParameter,
441
- requestConfig: localVarRequestOptions,
442
- path: localVarPath,
443
- configuration,
444
- pathTemplate: '/accounts/{accountId}/orders/details',
445
- httpMethod: 'POST'
446
- });
447
- localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(accountInformationGetUserAccountOrderDetailRequest, localVarRequestOptions, configuration);
448
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
449
- return {
450
- url: (0, common_1.toPathString)(localVarUrlObj),
451
- options: localVarRequestOptions,
452
- };
453
- }),
454
- /**
455
- * Returns a list of recent orders in the specified account. Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do, this endpoint returns real-time data. - If you don\'t, Daily data is cached and refreshed once a day. Exact refresh timing may vary by brokerage. If you need real-time, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint. If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
456
- * @summary List account orders
457
- * @param {string} userId
458
- * @param {string} userSecret
459
- * @param {string} accountId
460
- * @param {'all' | 'open' | 'executed'} [state] defaults value is set to \"all\"
461
- * @param {number} [days] Number of days in the past to fetch the most recent orders. Defaults to the last 30 days if no value is passed in. Values greater than 90 will be capped at 90.
462
- * @param {*} [options] Override http request option.
463
- * @throws {RequiredError}
464
- */
465
- getUserAccountOrders: (userId, userSecret, accountId, state, days, options = {}) => __awaiter(this, void 0, void 0, function* () {
466
- // verify required parameter 'userId' is not null or undefined
467
- (0, common_1.assertParamExists)('getUserAccountOrders', 'userId', userId);
468
- // verify required parameter 'userSecret' is not null or undefined
469
- (0, common_1.assertParamExists)('getUserAccountOrders', 'userSecret', userSecret);
470
- // verify required parameter 'accountId' is not null or undefined
471
- (0, common_1.assertParamExists)('getUserAccountOrders', 'accountId', accountId);
472
- const localVarPath = `/accounts/{accountId}/orders`
473
- .replace(`{${"accountId"}}`, encodeURIComponent(String(accountId !== undefined ? accountId : `-accountId-`)));
474
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
475
- const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
476
- let baseOptions;
477
- if (configuration) {
478
- baseOptions = configuration.baseOptions;
479
- }
480
- const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
481
- const localVarHeaderParameter = configuration && !(0, common_1.isBrowser)() ? { "User-Agent": configuration.userAgent } : {};
482
- const localVarQueryParameter = {};
483
- // authentication PartnerClientId required
484
- yield (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, key: "clientId", keyParamName: "clientId", configuration });
485
- // authentication PartnerSignature required
486
- yield (0, common_1.setApiKeyToObject)({ object: localVarHeaderParameter, key: "Signature", keyParamName: "signature", configuration });
487
- // authentication PartnerTimestamp required
488
- yield (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, key: "timestamp", keyParamName: "timestamp", configuration });
489
- if (userId !== undefined) {
490
- localVarQueryParameter['userId'] = userId;
491
- }
492
- if (userSecret !== undefined) {
493
- localVarQueryParameter['userSecret'] = userSecret;
494
- }
495
- if (state !== undefined) {
496
- localVarQueryParameter['state'] = state;
497
- }
498
- if (days !== undefined) {
499
- localVarQueryParameter['days'] = days;
500
- }
501
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
502
- localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
503
- (0, requestBeforeHook_1.requestBeforeHook)({
504
- queryParameters: localVarQueryParameter,
505
- requestConfig: localVarRequestOptions,
506
- path: localVarPath,
507
- configuration,
508
- pathTemplate: '/accounts/{accountId}/orders',
509
- httpMethod: 'GET'
510
- });
511
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
512
- return {
513
- url: (0, common_1.toPathString)(localVarUrlObj),
514
- options: localVarRequestOptions,
515
- };
516
- }),
517
- /**
518
- * Returns a list of stock/ETF/crypto/mutual fund positions in the specified account. For option positions, please use the [options endpoint](/reference/Options/Options_listOptionHoldings). Consider using the newer [unified positions endpoint](/reference/Account%20Information/AccountInformation_getAllAccountPositions). This will allow you to get both equity and option positions in a single call, as well as additional asset classes such as futures. Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do, this endpoint returns real-time data. - If you don\'t, Daily data is cached and refreshed once a day. Exact refresh timing may vary by brokerage. If you need real-time, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint. If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
519
- * @summary List account positions
520
- * @param {string} userId
521
- * @param {string} userSecret
522
- * @param {string} accountId
523
- * @param {*} [options] Override http request option.
524
- * @throws {RequiredError}
525
- */
526
- getUserAccountPositions: (userId, userSecret, accountId, options = {}) => __awaiter(this, void 0, void 0, function* () {
527
- // verify required parameter 'userId' is not null or undefined
528
- (0, common_1.assertParamExists)('getUserAccountPositions', 'userId', userId);
529
- // verify required parameter 'userSecret' is not null or undefined
530
- (0, common_1.assertParamExists)('getUserAccountPositions', 'userSecret', userSecret);
531
- // verify required parameter 'accountId' is not null or undefined
532
- (0, common_1.assertParamExists)('getUserAccountPositions', 'accountId', accountId);
533
- const localVarPath = `/accounts/{accountId}/positions`
534
- .replace(`{${"accountId"}}`, encodeURIComponent(String(accountId !== undefined ? accountId : `-accountId-`)));
535
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
536
- const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
537
- let baseOptions;
538
- if (configuration) {
539
- baseOptions = configuration.baseOptions;
540
- }
541
- const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
542
- const localVarHeaderParameter = configuration && !(0, common_1.isBrowser)() ? { "User-Agent": configuration.userAgent } : {};
543
- const localVarQueryParameter = {};
544
- // authentication PartnerClientId required
545
- yield (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, key: "clientId", keyParamName: "clientId", configuration });
546
- // authentication PartnerSignature required
547
- yield (0, common_1.setApiKeyToObject)({ object: localVarHeaderParameter, key: "Signature", keyParamName: "signature", configuration });
548
- // authentication PartnerTimestamp required
549
- yield (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, key: "timestamp", keyParamName: "timestamp", configuration });
550
- if (userId !== undefined) {
551
- localVarQueryParameter['userId'] = userId;
552
- }
553
- if (userSecret !== undefined) {
554
- localVarQueryParameter['userSecret'] = userSecret;
555
- }
556
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
557
- localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
558
- (0, requestBeforeHook_1.requestBeforeHook)({
559
- queryParameters: localVarQueryParameter,
560
- requestConfig: localVarRequestOptions,
561
- path: localVarPath,
562
- configuration,
563
- pathTemplate: '/accounts/{accountId}/positions',
564
- httpMethod: 'GET'
565
- });
566
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
567
- return {
568
- url: (0, common_1.toPathString)(localVarUrlObj),
569
- options: localVarRequestOptions,
570
- };
571
- }),
572
- /**
573
- * A lightweight endpoint that returns the latest page of orders placed in the last 24 hours in the specified account. For most brokerages, the default page size is 100 meaning the endpoint will return a max of 100 orders. This endpoint is realtime and can be used to quickly check if account state has recently changed due to an execution, or check status of recently placed orders Differs from /orders in that it is always realtime, and only checks the last 24 hours By default only returns executed orders, but that can be changed by setting *only_executed* to false
574
- * @summary List account recent orders (last 24 hours only)
575
- * @param {string} userId
576
- * @param {string} userSecret
577
- * @param {string} accountId
578
- * @param {boolean} [onlyExecuted] Defaults to true. Indicates if request should fetch only executed orders. Set to false to retrieve non executed orders as well
579
- * @param {*} [options] Override http request option.
580
- * @throws {RequiredError}
581
- */
582
- getUserAccountRecentOrders: (userId, userSecret, accountId, onlyExecuted, options = {}) => __awaiter(this, void 0, void 0, function* () {
583
- // verify required parameter 'userId' is not null or undefined
584
- (0, common_1.assertParamExists)('getUserAccountRecentOrders', 'userId', userId);
585
- // verify required parameter 'userSecret' is not null or undefined
586
- (0, common_1.assertParamExists)('getUserAccountRecentOrders', 'userSecret', userSecret);
587
- // verify required parameter 'accountId' is not null or undefined
588
- (0, common_1.assertParamExists)('getUserAccountRecentOrders', 'accountId', accountId);
589
- const localVarPath = `/accounts/{accountId}/recentOrders`
590
- .replace(`{${"accountId"}}`, encodeURIComponent(String(accountId !== undefined ? accountId : `-accountId-`)));
591
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
592
- const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
593
- let baseOptions;
594
- if (configuration) {
595
- baseOptions = configuration.baseOptions;
596
- }
597
- const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
598
- const localVarHeaderParameter = configuration && !(0, common_1.isBrowser)() ? { "User-Agent": configuration.userAgent } : {};
599
- const localVarQueryParameter = {};
600
- // authentication PartnerClientId required
601
- yield (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, key: "clientId", keyParamName: "clientId", configuration });
602
- // authentication PartnerSignature required
603
- yield (0, common_1.setApiKeyToObject)({ object: localVarHeaderParameter, key: "Signature", keyParamName: "signature", configuration });
604
- // authentication PartnerTimestamp required
605
- yield (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, key: "timestamp", keyParamName: "timestamp", configuration });
606
- if (userId !== undefined) {
607
- localVarQueryParameter['userId'] = userId;
608
- }
609
- if (userSecret !== undefined) {
610
- localVarQueryParameter['userSecret'] = userSecret;
611
- }
612
- if (onlyExecuted !== undefined) {
613
- localVarQueryParameter['only_executed'] = onlyExecuted;
614
- }
615
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
616
- localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
617
- (0, requestBeforeHook_1.requestBeforeHook)({
618
- queryParameters: localVarQueryParameter,
619
- requestConfig: localVarRequestOptions,
620
- path: localVarPath,
621
- configuration,
622
- pathTemplate: '/accounts/{accountId}/recentOrders',
623
- httpMethod: 'GET'
624
- });
625
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
626
- return {
627
- url: (0, common_1.toPathString)(localVarUrlObj),
628
- options: localVarRequestOptions,
629
- };
630
- }),
631
- /**
632
- * Returns a list of rate of return percents for a given account.
633
- * @summary List account rate of returns
634
- * @param {string} userId
635
- * @param {string} userSecret
636
- * @param {string} accountId
637
- * @param {string} [timeframes] Optional comma separated list of rate-of-return timeframes to return. Supported values are `ALL`, `1Y`, `YTD`, `1M`, `1W`, and `1D`. If omitted, SnapTrade returns all six supported timeframes.
638
- * @param {*} [options] Override http request option.
639
- * @throws {RequiredError}
640
- */
641
- getUserAccountReturnRates: (userId, userSecret, accountId, timeframes, options = {}) => __awaiter(this, void 0, void 0, function* () {
642
- // verify required parameter 'userId' is not null or undefined
643
- (0, common_1.assertParamExists)('getUserAccountReturnRates', 'userId', userId);
644
- // verify required parameter 'userSecret' is not null or undefined
645
- (0, common_1.assertParamExists)('getUserAccountReturnRates', 'userSecret', userSecret);
646
- // verify required parameter 'accountId' is not null or undefined
647
- (0, common_1.assertParamExists)('getUserAccountReturnRates', 'accountId', accountId);
648
- const localVarPath = `/accounts/{accountId}/returnRates`
649
- .replace(`{${"accountId"}}`, encodeURIComponent(String(accountId !== undefined ? accountId : `-accountId-`)));
650
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
651
- const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
652
- let baseOptions;
653
- if (configuration) {
654
- baseOptions = configuration.baseOptions;
655
- }
656
- const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
657
- const localVarHeaderParameter = configuration && !(0, common_1.isBrowser)() ? { "User-Agent": configuration.userAgent } : {};
658
- const localVarQueryParameter = {};
659
- // authentication PartnerClientId required
660
- yield (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, key: "clientId", keyParamName: "clientId", configuration });
661
- // authentication PartnerSignature required
662
- yield (0, common_1.setApiKeyToObject)({ object: localVarHeaderParameter, key: "Signature", keyParamName: "signature", configuration });
663
- // authentication PartnerTimestamp required
664
- yield (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, key: "timestamp", keyParamName: "timestamp", configuration });
665
- if (userId !== undefined) {
666
- localVarQueryParameter['userId'] = userId;
667
- }
668
- if (userSecret !== undefined) {
669
- localVarQueryParameter['userSecret'] = userSecret;
670
- }
671
- if (timeframes !== undefined) {
672
- localVarQueryParameter['timeframes'] = timeframes;
673
- }
674
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
675
- localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
676
- (0, requestBeforeHook_1.requestBeforeHook)({
677
- queryParameters: localVarQueryParameter,
678
- requestConfig: localVarRequestOptions,
679
- path: localVarPath,
680
- configuration,
681
- pathTemplate: '/accounts/{accountId}/returnRates',
682
- httpMethod: 'GET'
683
- });
684
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
685
- return {
686
- url: (0, common_1.toPathString)(localVarUrlObj),
687
- options: localVarRequestOptions,
688
- };
689
- }),
690
- /**
691
- * **Deprecated.** Use the finer-grained account data endpoints instead: [balances](/reference/Account%20Information/AccountInformation_getUserAccountBalance), [positions](/reference/Account%20Information/AccountInformation_getAllAccountPositions), and [orders](/reference/Account%20Information/AccountInformation_getUserAccountOrders). Returns a list of balances, positions, and recent orders for the specified account. Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do, this endpoint returns real-time data. - If you don\'t, Daily data is cached and refreshed once a day. Exact refresh timing may vary by brokerage. If you need real-time, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint. If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
692
- * @summary List account holdings
693
- * @param {string} accountId
694
- * @param {string} userId
695
- * @param {string} userSecret
696
- * @param {*} [options] Override http request option.
697
- * @deprecated
698
- * @throws {RequiredError}
699
- */
700
- getUserHoldings: (accountId, userId, userSecret, options = {}) => __awaiter(this, void 0, void 0, function* () {
701
- // verify required parameter 'accountId' is not null or undefined
702
- (0, common_1.assertParamExists)('getUserHoldings', 'accountId', accountId);
703
- // verify required parameter 'userId' is not null or undefined
704
- (0, common_1.assertParamExists)('getUserHoldings', 'userId', userId);
705
- // verify required parameter 'userSecret' is not null or undefined
706
- (0, common_1.assertParamExists)('getUserHoldings', 'userSecret', userSecret);
707
- const localVarPath = `/accounts/{accountId}/holdings`
708
- .replace(`{${"accountId"}}`, encodeURIComponent(String(accountId !== undefined ? accountId : `-accountId-`)));
709
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
710
- const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
711
- let baseOptions;
712
- if (configuration) {
713
- baseOptions = configuration.baseOptions;
714
- }
715
- const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
716
- const localVarHeaderParameter = configuration && !(0, common_1.isBrowser)() ? { "User-Agent": configuration.userAgent } : {};
717
- const localVarQueryParameter = {};
718
- // authentication PartnerClientId required
719
- yield (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, key: "clientId", keyParamName: "clientId", configuration });
720
- // authentication PartnerSignature required
721
- yield (0, common_1.setApiKeyToObject)({ object: localVarHeaderParameter, key: "Signature", keyParamName: "signature", configuration });
722
- // authentication PartnerTimestamp required
723
- yield (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, key: "timestamp", keyParamName: "timestamp", configuration });
724
- if (userId !== undefined) {
725
- localVarQueryParameter['userId'] = userId;
726
- }
727
- if (userSecret !== undefined) {
728
- localVarQueryParameter['userSecret'] = userSecret;
729
- }
730
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
731
- localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
732
- (0, requestBeforeHook_1.requestBeforeHook)({
733
- queryParameters: localVarQueryParameter,
734
- requestConfig: localVarRequestOptions,
735
- path: localVarPath,
736
- configuration,
737
- pathTemplate: '/accounts/{accountId}/holdings',
738
- httpMethod: 'GET'
739
- });
740
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
741
- return {
742
- url: (0, common_1.toPathString)(localVarUrlObj),
743
- options: localVarRequestOptions,
744
- };
745
- }),
746
- /**
747
- * **Deprecated, please use the [list accounts for a connection endpoint](/reference/Connections/Connections_listBrokerageAuthorizationAccounts) instead.** Returns all brokerage accounts across all connections known to SnapTrade for the authenticated user. This endpoint returns Daily data regardless of the customer\'s plan. Daily data is cached and refreshed once a day. Exact refresh timing may vary by brokerage. To get real-time data on Pay as you Go / Real-time, use the connection-scoped endpoint linked above. Customers on Pay as you Go / Daily can force a refresh with the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization).
748
- * @summary List accounts
749
- * @param {string} userId
750
- * @param {string} userSecret
751
- * @param {*} [options] Override http request option.
752
- * @deprecated
753
- * @throws {RequiredError}
754
- */
755
- listUserAccounts: (userId, userSecret, options = {}) => __awaiter(this, void 0, void 0, function* () {
756
- // verify required parameter 'userId' is not null or undefined
757
- (0, common_1.assertParamExists)('listUserAccounts', 'userId', userId);
758
- // verify required parameter 'userSecret' is not null or undefined
759
- (0, common_1.assertParamExists)('listUserAccounts', 'userSecret', userSecret);
760
- const localVarPath = `/accounts`;
761
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
762
- const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
763
- let baseOptions;
764
- if (configuration) {
765
- baseOptions = configuration.baseOptions;
766
- }
767
- const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
768
- const localVarHeaderParameter = configuration && !(0, common_1.isBrowser)() ? { "User-Agent": configuration.userAgent } : {};
769
- const localVarQueryParameter = {};
770
- // authentication PartnerClientId required
771
- yield (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, key: "clientId", keyParamName: "clientId", configuration });
772
- // authentication PartnerSignature required
773
- yield (0, common_1.setApiKeyToObject)({ object: localVarHeaderParameter, key: "Signature", keyParamName: "signature", configuration });
774
- // authentication PartnerTimestamp required
775
- yield (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, key: "timestamp", keyParamName: "timestamp", configuration });
776
- if (userId !== undefined) {
777
- localVarQueryParameter['userId'] = userId;
778
- }
779
- if (userSecret !== undefined) {
780
- localVarQueryParameter['userSecret'] = userSecret;
781
- }
782
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
783
- localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
784
- (0, requestBeforeHook_1.requestBeforeHook)({
785
- queryParameters: localVarQueryParameter,
786
- requestConfig: localVarRequestOptions,
787
- path: localVarPath,
788
- configuration,
789
- pathTemplate: '/accounts',
790
- httpMethod: 'GET'
791
- });
792
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
793
- return {
794
- url: (0, common_1.toPathString)(localVarUrlObj),
795
- options: localVarRequestOptions,
796
- };
797
- }),
798
- /**
799
- * Updates various properties of a specified account.
800
- * @summary Update details of an investment account
801
- * @param {string} userId
802
- * @param {string} userSecret
803
- * @param {string} accountId The ID of the account to update.
804
- * @param {*} [options] Override http request option.
805
- * @throws {RequiredError}
806
- */
807
- updateUserAccount: (userId, userSecret, accountId, options = {}) => __awaiter(this, void 0, void 0, function* () {
808
- // verify required parameter 'userId' is not null or undefined
809
- (0, common_1.assertParamExists)('updateUserAccount', 'userId', userId);
810
- // verify required parameter 'userSecret' is not null or undefined
811
- (0, common_1.assertParamExists)('updateUserAccount', 'userSecret', userSecret);
812
- // verify required parameter 'accountId' is not null or undefined
813
- (0, common_1.assertParamExists)('updateUserAccount', 'accountId', accountId);
814
- const localVarPath = `/accounts/{accountId}`
815
- .replace(`{${"accountId"}}`, encodeURIComponent(String(accountId !== undefined ? accountId : `-accountId-`)));
816
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
817
- const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
818
- let baseOptions;
819
- if (configuration) {
820
- baseOptions = configuration.baseOptions;
821
- }
822
- const localVarRequestOptions = Object.assign(Object.assign({ method: 'PUT' }, baseOptions), options);
823
- const localVarHeaderParameter = configuration && !(0, common_1.isBrowser)() ? { "User-Agent": configuration.userAgent } : {};
824
- const localVarQueryParameter = {};
825
- // authentication PartnerClientId required
826
- yield (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, key: "clientId", keyParamName: "clientId", configuration });
827
- // authentication PartnerSignature required
828
- yield (0, common_1.setApiKeyToObject)({ object: localVarHeaderParameter, key: "Signature", keyParamName: "signature", configuration });
829
- // authentication PartnerTimestamp required
830
- yield (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, key: "timestamp", keyParamName: "timestamp", configuration });
831
- if (userId !== undefined) {
832
- localVarQueryParameter['userId'] = userId;
833
- }
834
- if (userSecret !== undefined) {
835
- localVarQueryParameter['userSecret'] = userSecret;
836
- }
837
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
838
- localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
839
- (0, requestBeforeHook_1.requestBeforeHook)({
840
- queryParameters: localVarQueryParameter,
841
- requestConfig: localVarRequestOptions,
842
- path: localVarPath,
843
- configuration,
844
- pathTemplate: '/accounts/{accountId}',
845
- httpMethod: 'PUT'
846
- });
847
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
848
- return {
849
- url: (0, common_1.toPathString)(localVarUrlObj),
850
- options: localVarRequestOptions,
851
- };
852
- }),
853
- };
854
- };
855
- exports.AccountInformationApiAxiosParamCreator = AccountInformationApiAxiosParamCreator;
856
- /**
857
- * AccountInformationApi - functional programming interface
858
- * @export
859
- */
860
- const AccountInformationApiFp = function (configuration) {
861
- const localVarAxiosParamCreator = (0, exports.AccountInformationApiAxiosParamCreator)(configuration);
862
- return {
863
- /**
864
- * Returns all historical transactions for the specified account. This endpoint is paginated with a default page size of 1000. The endpoint will return a maximum of 1000 transactions per request. See the query parameters for pagination options. Transaction are returned in reverse chronological order, using the `trade_date` field. This endpoint returns Daily data. Daily data is cached and refreshed once a day. Exact refresh timing may vary by brokerage. If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
865
- * @summary List account activities
866
- * @param {AccountInformationApiGetAccountActivitiesRequest} requestParameters Request parameters.
867
- * @param {*} [options] Override http request option.
868
- * @throws {RequiredError}
869
- */
870
- getAccountActivities(requestParameters, options) {
871
- return __awaiter(this, void 0, void 0, function* () {
872
- const localVarAxiosArgs = yield localVarAxiosParamCreator.getAccountActivities(requestParameters.accountId, requestParameters.userId, requestParameters.userSecret, requestParameters.startDate, requestParameters.endDate, requestParameters.offset, requestParameters.limit, requestParameters.type, options);
873
- return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
874
- });
875
- },
876
- /**
877
- * An experimental endpoint that returns estimated historical total account value for the specified account. Total account value is the sum of the market value of all positions and cash in the account at a given time. This endpoint is experimental, disabled by default, and has a maximum lookback of 1 year.
878
- * @summary List historical account total value
879
- * @param {AccountInformationApiGetAccountBalanceHistoryRequest} requestParameters Request parameters.
880
- * @param {*} [options] Override http request option.
881
- * @throws {RequiredError}
882
- */
883
- getAccountBalanceHistory(requestParameters, options) {
884
- return __awaiter(this, void 0, void 0, function* () {
885
- const localVarAxiosArgs = yield localVarAxiosParamCreator.getAccountBalanceHistory(requestParameters.userId, requestParameters.userSecret, requestParameters.accountId, options);
886
- return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
887
- });
888
- },
889
- /**
890
- * Returns a list of all positions in the specified account. The `results` list can contain multiple instrument types in the same response, including stocks, ADRs, ETFs, mutual funds, closed-end funds, crypto, futures, and option positions. Use the `instrument.kind` discriminator to determine the schema for each position\'s `instrument`. `mutualfund` positions may also include `cash_equivalent`. `stock` positions may include `tax_lots` when tax lot data is enabled for the account. If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
891
- * @summary List all account positions
892
- * @param {AccountInformationApiGetAllAccountPositionsRequest} requestParameters Request parameters.
893
- * @param {*} [options] Override http request option.
894
- * @throws {RequiredError}
895
- */
896
- getAllAccountPositions(requestParameters, options) {
897
- return __awaiter(this, void 0, void 0, function* () {
898
- const localVarAxiosArgs = yield localVarAxiosParamCreator.getAllAccountPositions(requestParameters.userId, requestParameters.userSecret, requestParameters.accountId, options);
899
- return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
900
- });
901
- },
902
- /**
903
- * **Deprecated, please use the account-specific holdings endpoint instead.** List all accounts for the user, plus balances, positions, and orders for each account. **Note:** This endpoint will return HTTP 410 Gone for all customers that sign up after April 25, 2026.
904
- * @summary List all accounts for the user, plus balances, positions, and orders for each account.
905
- * @param {AccountInformationApiGetAllUserHoldingsRequest} requestParameters Request parameters.
906
- * @param {*} [options] Override http request option.
907
- * @deprecated
908
- * @throws {RequiredError}
909
- */
910
- getAllUserHoldings(requestParameters, options) {
911
- return __awaiter(this, void 0, void 0, function* () {
912
- const localVarAxiosArgs = yield localVarAxiosParamCreator.getAllUserHoldings(requestParameters.userId, requestParameters.userSecret, requestParameters.brokerageAuthorizations, options);
913
- return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
914
- });
915
- },
916
- /**
917
- * Returns a list of balances for the account. Each element of the list has a distinct currency. Some brokerages like Questrade [allows holding multiple currencies in the same account](https://www.questrade.com/learning/questrade-basics/balances-and-reports/understanding-your-account-balances). Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do, this endpoint returns real-time data. - If you don\'t, Daily data is cached and refreshed once a day. Exact refresh timing may vary by brokerage. If you need real-time, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint. If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
918
- * @summary List account balances
919
- * @param {AccountInformationApiGetUserAccountBalanceRequest} requestParameters Request parameters.
920
- * @param {*} [options] Override http request option.
921
- * @throws {RequiredError}
922
- */
923
- getUserAccountBalance(requestParameters, options) {
924
- return __awaiter(this, void 0, void 0, function* () {
925
- const localVarAxiosArgs = yield localVarAxiosParamCreator.getUserAccountBalance(requestParameters.userId, requestParameters.userSecret, requestParameters.accountId, options);
926
- return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
927
- });
928
- },
929
- /**
930
- * Returns account detail known to SnapTrade for the specified account. Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do, this endpoint returns real-time data. - If you don\'t, Daily data is cached and refreshed once a day. Exact refresh timing may vary by brokerage. If you need real-time, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint. If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
931
- * @summary Get account detail
932
- * @param {AccountInformationApiGetUserAccountDetailsRequest} requestParameters Request parameters.
933
- * @param {*} [options] Override http request option.
934
- * @throws {RequiredError}
935
- */
936
- getUserAccountDetails(requestParameters, options) {
937
- return __awaiter(this, void 0, void 0, function* () {
938
- const localVarAxiosArgs = yield localVarAxiosParamCreator.getUserAccountDetails(requestParameters.userId, requestParameters.userSecret, requestParameters.accountId, options);
939
- return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
940
- });
941
- },
942
- /**
943
- * Returns the detail of a single order using the external order ID provided in the request body. This endpoint only works for single-leg orders at this time. Support for multi-leg orders will be added in the future. This endpoint is always realtime and does not rely on cached data. This endpoint only returns orders placed through SnapTrade. In other words, orders placed outside of the SnapTrade network are not returned by this endpoint.
944
- * @summary Get account order detail
945
- * @param {AccountInformationApiGetUserAccountOrderDetailRequest} requestParameters Request parameters.
946
- * @param {*} [options] Override http request option.
947
- * @throws {RequiredError}
948
- */
949
- getUserAccountOrderDetail(requestParameters, options) {
950
- return __awaiter(this, void 0, void 0, function* () {
951
- const accountInformationGetUserAccountOrderDetailRequest = {
952
- brokerage_order_id: requestParameters.brokerage_order_id
953
- };
954
- const localVarAxiosArgs = yield localVarAxiosParamCreator.getUserAccountOrderDetail(requestParameters.accountId, requestParameters.userId, requestParameters.userSecret, accountInformationGetUserAccountOrderDetailRequest, options);
955
- return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
956
- });
957
- },
958
- /**
959
- * Returns a list of recent orders in the specified account. Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do, this endpoint returns real-time data. - If you don\'t, Daily data is cached and refreshed once a day. Exact refresh timing may vary by brokerage. If you need real-time, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint. If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
960
- * @summary List account orders
961
- * @param {AccountInformationApiGetUserAccountOrdersRequest} requestParameters Request parameters.
962
- * @param {*} [options] Override http request option.
963
- * @throws {RequiredError}
964
- */
965
- getUserAccountOrders(requestParameters, options) {
966
- return __awaiter(this, void 0, void 0, function* () {
967
- const localVarAxiosArgs = yield localVarAxiosParamCreator.getUserAccountOrders(requestParameters.userId, requestParameters.userSecret, requestParameters.accountId, requestParameters.state, requestParameters.days, options);
968
- return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
969
- });
970
- },
971
- /**
972
- * Returns a list of stock/ETF/crypto/mutual fund positions in the specified account. For option positions, please use the [options endpoint](/reference/Options/Options_listOptionHoldings). Consider using the newer [unified positions endpoint](/reference/Account%20Information/AccountInformation_getAllAccountPositions). This will allow you to get both equity and option positions in a single call, as well as additional asset classes such as futures. Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do, this endpoint returns real-time data. - If you don\'t, Daily data is cached and refreshed once a day. Exact refresh timing may vary by brokerage. If you need real-time, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint. If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
973
- * @summary List account positions
974
- * @param {AccountInformationApiGetUserAccountPositionsRequest} requestParameters Request parameters.
975
- * @param {*} [options] Override http request option.
976
- * @throws {RequiredError}
977
- */
978
- getUserAccountPositions(requestParameters, options) {
979
- return __awaiter(this, void 0, void 0, function* () {
980
- const localVarAxiosArgs = yield localVarAxiosParamCreator.getUserAccountPositions(requestParameters.userId, requestParameters.userSecret, requestParameters.accountId, options);
981
- return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
982
- });
983
- },
984
- /**
985
- * A lightweight endpoint that returns the latest page of orders placed in the last 24 hours in the specified account. For most brokerages, the default page size is 100 meaning the endpoint will return a max of 100 orders. This endpoint is realtime and can be used to quickly check if account state has recently changed due to an execution, or check status of recently placed orders Differs from /orders in that it is always realtime, and only checks the last 24 hours By default only returns executed orders, but that can be changed by setting *only_executed* to false
986
- * @summary List account recent orders (last 24 hours only)
987
- * @param {AccountInformationApiGetUserAccountRecentOrdersRequest} requestParameters Request parameters.
988
- * @param {*} [options] Override http request option.
989
- * @throws {RequiredError}
990
- */
991
- getUserAccountRecentOrders(requestParameters, options) {
992
- return __awaiter(this, void 0, void 0, function* () {
993
- const localVarAxiosArgs = yield localVarAxiosParamCreator.getUserAccountRecentOrders(requestParameters.userId, requestParameters.userSecret, requestParameters.accountId, requestParameters.onlyExecuted, options);
994
- return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
995
- });
996
- },
997
- /**
998
- * Returns a list of rate of return percents for a given account.
999
- * @summary List account rate of returns
1000
- * @param {AccountInformationApiGetUserAccountReturnRatesRequest} requestParameters Request parameters.
1001
- * @param {*} [options] Override http request option.
1002
- * @throws {RequiredError}
1003
- */
1004
- getUserAccountReturnRates(requestParameters, options) {
1005
- return __awaiter(this, void 0, void 0, function* () {
1006
- const localVarAxiosArgs = yield localVarAxiosParamCreator.getUserAccountReturnRates(requestParameters.userId, requestParameters.userSecret, requestParameters.accountId, requestParameters.timeframes, options);
1007
- return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
1008
- });
1009
- },
1010
- /**
1011
- * **Deprecated.** Use the finer-grained account data endpoints instead: [balances](/reference/Account%20Information/AccountInformation_getUserAccountBalance), [positions](/reference/Account%20Information/AccountInformation_getAllAccountPositions), and [orders](/reference/Account%20Information/AccountInformation_getUserAccountOrders). Returns a list of balances, positions, and recent orders for the specified account. Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do, this endpoint returns real-time data. - If you don\'t, Daily data is cached and refreshed once a day. Exact refresh timing may vary by brokerage. If you need real-time, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint. If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
1012
- * @summary List account holdings
1013
- * @param {AccountInformationApiGetUserHoldingsRequest} requestParameters Request parameters.
1014
- * @param {*} [options] Override http request option.
1015
- * @deprecated
1016
- * @throws {RequiredError}
1017
- */
1018
- getUserHoldings(requestParameters, options) {
1019
- return __awaiter(this, void 0, void 0, function* () {
1020
- const localVarAxiosArgs = yield localVarAxiosParamCreator.getUserHoldings(requestParameters.accountId, requestParameters.userId, requestParameters.userSecret, options);
1021
- return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
1022
- });
1023
- },
1024
- /**
1025
- * **Deprecated, please use the [list accounts for a connection endpoint](/reference/Connections/Connections_listBrokerageAuthorizationAccounts) instead.** Returns all brokerage accounts across all connections known to SnapTrade for the authenticated user. This endpoint returns Daily data regardless of the customer\'s plan. Daily data is cached and refreshed once a day. Exact refresh timing may vary by brokerage. To get real-time data on Pay as you Go / Real-time, use the connection-scoped endpoint linked above. Customers on Pay as you Go / Daily can force a refresh with the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization).
1026
- * @summary List accounts
1027
- * @param {AccountInformationApiListUserAccountsRequest} requestParameters Request parameters.
1028
- * @param {*} [options] Override http request option.
1029
- * @deprecated
1030
- * @throws {RequiredError}
1031
- */
1032
- listUserAccounts(requestParameters, options) {
1033
- return __awaiter(this, void 0, void 0, function* () {
1034
- const localVarAxiosArgs = yield localVarAxiosParamCreator.listUserAccounts(requestParameters.userId, requestParameters.userSecret, options);
1035
- return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
1036
- });
1037
- },
1038
- /**
1039
- * Updates various properties of a specified account.
1040
- * @summary Update details of an investment account
1041
- * @param {AccountInformationApiUpdateUserAccountRequest} requestParameters Request parameters.
1042
- * @param {*} [options] Override http request option.
1043
- * @throws {RequiredError}
1044
- */
1045
- updateUserAccount(requestParameters, options) {
1046
- return __awaiter(this, void 0, void 0, function* () {
1047
- const localVarAxiosArgs = yield localVarAxiosParamCreator.updateUserAccount(requestParameters.userId, requestParameters.userSecret, requestParameters.accountId, options);
1048
- return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
1049
- });
1050
- },
1051
- };
1052
- };
1053
- exports.AccountInformationApiFp = AccountInformationApiFp;
1054
- /**
1055
- * AccountInformationApi - factory interface
1056
- * @export
1057
- */
1058
- const AccountInformationApiFactory = function (configuration, basePath, axios) {
1059
- const localVarFp = (0, exports.AccountInformationApiFp)(configuration);
1060
- return {
1061
- /**
1062
- * Returns all historical transactions for the specified account. This endpoint is paginated with a default page size of 1000. The endpoint will return a maximum of 1000 transactions per request. See the query parameters for pagination options. Transaction are returned in reverse chronological order, using the `trade_date` field. This endpoint returns Daily data. Daily data is cached and refreshed once a day. Exact refresh timing may vary by brokerage. If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
1063
- * @summary List account activities
1064
- * @param {AccountInformationApiGetAccountActivitiesRequest} requestParameters Request parameters.
1065
- * @param {*} [options] Override http request option.
1066
- * @throws {RequiredError}
1067
- */
1068
- getAccountActivities(requestParameters, options) {
1069
- return localVarFp.getAccountActivities(requestParameters, options).then((request) => request(axios, basePath));
1070
- },
1071
- /**
1072
- * An experimental endpoint that returns estimated historical total account value for the specified account. Total account value is the sum of the market value of all positions and cash in the account at a given time. This endpoint is experimental, disabled by default, and has a maximum lookback of 1 year.
1073
- * @summary List historical account total value
1074
- * @param {AccountInformationApiGetAccountBalanceHistoryRequest} requestParameters Request parameters.
1075
- * @param {*} [options] Override http request option.
1076
- * @throws {RequiredError}
1077
- */
1078
- getAccountBalanceHistory(requestParameters, options) {
1079
- return localVarFp.getAccountBalanceHistory(requestParameters, options).then((request) => request(axios, basePath));
1080
- },
1081
- /**
1082
- * Returns a list of all positions in the specified account. The `results` list can contain multiple instrument types in the same response, including stocks, ADRs, ETFs, mutual funds, closed-end funds, crypto, futures, and option positions. Use the `instrument.kind` discriminator to determine the schema for each position\'s `instrument`. `mutualfund` positions may also include `cash_equivalent`. `stock` positions may include `tax_lots` when tax lot data is enabled for the account. If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
1083
- * @summary List all account positions
1084
- * @param {AccountInformationApiGetAllAccountPositionsRequest} requestParameters Request parameters.
1085
- * @param {*} [options] Override http request option.
1086
- * @throws {RequiredError}
1087
- */
1088
- getAllAccountPositions(requestParameters, options) {
1089
- return localVarFp.getAllAccountPositions(requestParameters, options).then((request) => request(axios, basePath));
1090
- },
1091
- /**
1092
- * **Deprecated, please use the account-specific holdings endpoint instead.** List all accounts for the user, plus balances, positions, and orders for each account. **Note:** This endpoint will return HTTP 410 Gone for all customers that sign up after April 25, 2026.
1093
- * @summary List all accounts for the user, plus balances, positions, and orders for each account.
1094
- * @param {AccountInformationApiGetAllUserHoldingsRequest} requestParameters Request parameters.
1095
- * @param {*} [options] Override http request option.
1096
- * @deprecated
1097
- * @throws {RequiredError}
1098
- */
1099
- getAllUserHoldings(requestParameters, options) {
1100
- return localVarFp.getAllUserHoldings(requestParameters, options).then((request) => request(axios, basePath));
1101
- },
1102
- /**
1103
- * Returns a list of balances for the account. Each element of the list has a distinct currency. Some brokerages like Questrade [allows holding multiple currencies in the same account](https://www.questrade.com/learning/questrade-basics/balances-and-reports/understanding-your-account-balances). Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do, this endpoint returns real-time data. - If you don\'t, Daily data is cached and refreshed once a day. Exact refresh timing may vary by brokerage. If you need real-time, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint. If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
1104
- * @summary List account balances
1105
- * @param {AccountInformationApiGetUserAccountBalanceRequest} requestParameters Request parameters.
1106
- * @param {*} [options] Override http request option.
1107
- * @throws {RequiredError}
1108
- */
1109
- getUserAccountBalance(requestParameters, options) {
1110
- return localVarFp.getUserAccountBalance(requestParameters, options).then((request) => request(axios, basePath));
1111
- },
1112
- /**
1113
- * Returns account detail known to SnapTrade for the specified account. Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do, this endpoint returns real-time data. - If you don\'t, Daily data is cached and refreshed once a day. Exact refresh timing may vary by brokerage. If you need real-time, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint. If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
1114
- * @summary Get account detail
1115
- * @param {AccountInformationApiGetUserAccountDetailsRequest} requestParameters Request parameters.
1116
- * @param {*} [options] Override http request option.
1117
- * @throws {RequiredError}
1118
- */
1119
- getUserAccountDetails(requestParameters, options) {
1120
- return localVarFp.getUserAccountDetails(requestParameters, options).then((request) => request(axios, basePath));
1121
- },
1122
- /**
1123
- * Returns the detail of a single order using the external order ID provided in the request body. This endpoint only works for single-leg orders at this time. Support for multi-leg orders will be added in the future. This endpoint is always realtime and does not rely on cached data. This endpoint only returns orders placed through SnapTrade. In other words, orders placed outside of the SnapTrade network are not returned by this endpoint.
1124
- * @summary Get account order detail
1125
- * @param {AccountInformationApiGetUserAccountOrderDetailRequest} requestParameters Request parameters.
1126
- * @param {*} [options] Override http request option.
1127
- * @throws {RequiredError}
1128
- */
1129
- getUserAccountOrderDetail(requestParameters, options) {
1130
- return localVarFp.getUserAccountOrderDetail(requestParameters, options).then((request) => request(axios, basePath));
1131
- },
1132
- /**
1133
- * Returns a list of recent orders in the specified account. Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do, this endpoint returns real-time data. - If you don\'t, Daily data is cached and refreshed once a day. Exact refresh timing may vary by brokerage. If you need real-time, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint. If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
1134
- * @summary List account orders
1135
- * @param {AccountInformationApiGetUserAccountOrdersRequest} requestParameters Request parameters.
1136
- * @param {*} [options] Override http request option.
1137
- * @throws {RequiredError}
1138
- */
1139
- getUserAccountOrders(requestParameters, options) {
1140
- return localVarFp.getUserAccountOrders(requestParameters, options).then((request) => request(axios, basePath));
1141
- },
1142
- /**
1143
- * Returns a list of stock/ETF/crypto/mutual fund positions in the specified account. For option positions, please use the [options endpoint](/reference/Options/Options_listOptionHoldings). Consider using the newer [unified positions endpoint](/reference/Account%20Information/AccountInformation_getAllAccountPositions). This will allow you to get both equity and option positions in a single call, as well as additional asset classes such as futures. Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do, this endpoint returns real-time data. - If you don\'t, Daily data is cached and refreshed once a day. Exact refresh timing may vary by brokerage. If you need real-time, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint. If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
1144
- * @summary List account positions
1145
- * @param {AccountInformationApiGetUserAccountPositionsRequest} requestParameters Request parameters.
1146
- * @param {*} [options] Override http request option.
1147
- * @throws {RequiredError}
1148
- */
1149
- getUserAccountPositions(requestParameters, options) {
1150
- return localVarFp.getUserAccountPositions(requestParameters, options).then((request) => request(axios, basePath));
1151
- },
1152
- /**
1153
- * A lightweight endpoint that returns the latest page of orders placed in the last 24 hours in the specified account. For most brokerages, the default page size is 100 meaning the endpoint will return a max of 100 orders. This endpoint is realtime and can be used to quickly check if account state has recently changed due to an execution, or check status of recently placed orders Differs from /orders in that it is always realtime, and only checks the last 24 hours By default only returns executed orders, but that can be changed by setting *only_executed* to false
1154
- * @summary List account recent orders (last 24 hours only)
1155
- * @param {AccountInformationApiGetUserAccountRecentOrdersRequest} requestParameters Request parameters.
1156
- * @param {*} [options] Override http request option.
1157
- * @throws {RequiredError}
1158
- */
1159
- getUserAccountRecentOrders(requestParameters, options) {
1160
- return localVarFp.getUserAccountRecentOrders(requestParameters, options).then((request) => request(axios, basePath));
1161
- },
1162
- /**
1163
- * Returns a list of rate of return percents for a given account.
1164
- * @summary List account rate of returns
1165
- * @param {AccountInformationApiGetUserAccountReturnRatesRequest} requestParameters Request parameters.
1166
- * @param {*} [options] Override http request option.
1167
- * @throws {RequiredError}
1168
- */
1169
- getUserAccountReturnRates(requestParameters, options) {
1170
- return localVarFp.getUserAccountReturnRates(requestParameters, options).then((request) => request(axios, basePath));
1171
- },
1172
- /**
1173
- * **Deprecated.** Use the finer-grained account data endpoints instead: [balances](/reference/Account%20Information/AccountInformation_getUserAccountBalance), [positions](/reference/Account%20Information/AccountInformation_getAllAccountPositions), and [orders](/reference/Account%20Information/AccountInformation_getUserAccountOrders). Returns a list of balances, positions, and recent orders for the specified account. Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do, this endpoint returns real-time data. - If you don\'t, Daily data is cached and refreshed once a day. Exact refresh timing may vary by brokerage. If you need real-time, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint. If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
1174
- * @summary List account holdings
1175
- * @param {AccountInformationApiGetUserHoldingsRequest} requestParameters Request parameters.
1176
- * @param {*} [options] Override http request option.
1177
- * @deprecated
1178
- * @throws {RequiredError}
1179
- */
1180
- getUserHoldings(requestParameters, options) {
1181
- return localVarFp.getUserHoldings(requestParameters, options).then((request) => request(axios, basePath));
1182
- },
1183
- /**
1184
- * **Deprecated, please use the [list accounts for a connection endpoint](/reference/Connections/Connections_listBrokerageAuthorizationAccounts) instead.** Returns all brokerage accounts across all connections known to SnapTrade for the authenticated user. This endpoint returns Daily data regardless of the customer\'s plan. Daily data is cached and refreshed once a day. Exact refresh timing may vary by brokerage. To get real-time data on Pay as you Go / Real-time, use the connection-scoped endpoint linked above. Customers on Pay as you Go / Daily can force a refresh with the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization).
1185
- * @summary List accounts
1186
- * @param {AccountInformationApiListUserAccountsRequest} requestParameters Request parameters.
1187
- * @param {*} [options] Override http request option.
1188
- * @deprecated
1189
- * @throws {RequiredError}
1190
- */
1191
- listUserAccounts(requestParameters, options) {
1192
- return localVarFp.listUserAccounts(requestParameters, options).then((request) => request(axios, basePath));
1193
- },
1194
- /**
1195
- * Updates various properties of a specified account.
1196
- * @summary Update details of an investment account
1197
- * @param {AccountInformationApiUpdateUserAccountRequest} requestParameters Request parameters.
1198
- * @param {*} [options] Override http request option.
1199
- * @throws {RequiredError}
1200
- */
1201
- updateUserAccount(requestParameters, options) {
1202
- return localVarFp.updateUserAccount(requestParameters, options).then((request) => request(axios, basePath));
1203
- },
1204
- };
1205
- };
1206
- exports.AccountInformationApiFactory = AccountInformationApiFactory;
1207
- /**
1208
- * AccountInformationApiGenerated - object-oriented interface
1209
- * @export
1210
- * @class AccountInformationApiGenerated
1211
- * @extends {BaseAPI}
1212
- */
1213
- class AccountInformationApiGenerated extends base_1.BaseAPI {
1214
- /**
1215
- * Returns all historical transactions for the specified account. This endpoint is paginated with a default page size of 1000. The endpoint will return a maximum of 1000 transactions per request. See the query parameters for pagination options. Transaction are returned in reverse chronological order, using the `trade_date` field. This endpoint returns Daily data. Daily data is cached and refreshed once a day. Exact refresh timing may vary by brokerage. If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
1216
- * @summary List account activities
1217
- * @param {AccountInformationApiGetAccountActivitiesRequest} requestParameters Request parameters.
1218
- * @param {*} [options] Override http request option.
1219
- * @throws {RequiredError}
1220
- * @memberof AccountInformationApiGenerated
1221
- */
1222
- getAccountActivities(requestParameters, options) {
1223
- return (0, exports.AccountInformationApiFp)(this.configuration).getAccountActivities(requestParameters, options).then((request) => request(this.axios, this.basePath));
1224
- }
1225
- /**
1226
- * An experimental endpoint that returns estimated historical total account value for the specified account. Total account value is the sum of the market value of all positions and cash in the account at a given time. This endpoint is experimental, disabled by default, and has a maximum lookback of 1 year.
1227
- * @summary List historical account total value
1228
- * @param {AccountInformationApiGetAccountBalanceHistoryRequest} requestParameters Request parameters.
1229
- * @param {*} [options] Override http request option.
1230
- * @throws {RequiredError}
1231
- * @memberof AccountInformationApiGenerated
1232
- */
1233
- getAccountBalanceHistory(requestParameters, options) {
1234
- return (0, exports.AccountInformationApiFp)(this.configuration).getAccountBalanceHistory(requestParameters, options).then((request) => request(this.axios, this.basePath));
1235
- }
1236
- /**
1237
- * Returns a list of all positions in the specified account. The `results` list can contain multiple instrument types in the same response, including stocks, ADRs, ETFs, mutual funds, closed-end funds, crypto, futures, and option positions. Use the `instrument.kind` discriminator to determine the schema for each position\'s `instrument`. `mutualfund` positions may also include `cash_equivalent`. `stock` positions may include `tax_lots` when tax lot data is enabled for the account. If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
1238
- * @summary List all account positions
1239
- * @param {AccountInformationApiGetAllAccountPositionsRequest} requestParameters Request parameters.
1240
- * @param {*} [options] Override http request option.
1241
- * @throws {RequiredError}
1242
- * @memberof AccountInformationApiGenerated
1243
- */
1244
- getAllAccountPositions(requestParameters, options) {
1245
- return (0, exports.AccountInformationApiFp)(this.configuration).getAllAccountPositions(requestParameters, options).then((request) => request(this.axios, this.basePath));
1246
- }
1247
- /**
1248
- * **Deprecated, please use the account-specific holdings endpoint instead.** List all accounts for the user, plus balances, positions, and orders for each account. **Note:** This endpoint will return HTTP 410 Gone for all customers that sign up after April 25, 2026.
1249
- * @summary List all accounts for the user, plus balances, positions, and orders for each account.
1250
- * @param {AccountInformationApiGetAllUserHoldingsRequest} requestParameters Request parameters.
1251
- * @param {*} [options] Override http request option.
1252
- * @deprecated
1253
- * @throws {RequiredError}
1254
- * @memberof AccountInformationApiGenerated
1255
- */
1256
- getAllUserHoldings(requestParameters, options) {
1257
- return (0, exports.AccountInformationApiFp)(this.configuration).getAllUserHoldings(requestParameters, options).then((request) => request(this.axios, this.basePath));
1258
- }
1259
- /**
1260
- * Returns a list of balances for the account. Each element of the list has a distinct currency. Some brokerages like Questrade [allows holding multiple currencies in the same account](https://www.questrade.com/learning/questrade-basics/balances-and-reports/understanding-your-account-balances). Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do, this endpoint returns real-time data. - If you don\'t, Daily data is cached and refreshed once a day. Exact refresh timing may vary by brokerage. If you need real-time, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint. If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
1261
- * @summary List account balances
1262
- * @param {AccountInformationApiGetUserAccountBalanceRequest} requestParameters Request parameters.
1263
- * @param {*} [options] Override http request option.
1264
- * @throws {RequiredError}
1265
- * @memberof AccountInformationApiGenerated
1266
- */
1267
- getUserAccountBalance(requestParameters, options) {
1268
- return (0, exports.AccountInformationApiFp)(this.configuration).getUserAccountBalance(requestParameters, options).then((request) => request(this.axios, this.basePath));
1269
- }
1270
- /**
1271
- * Returns account detail known to SnapTrade for the specified account. Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do, this endpoint returns real-time data. - If you don\'t, Daily data is cached and refreshed once a day. Exact refresh timing may vary by brokerage. If you need real-time, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint. If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
1272
- * @summary Get account detail
1273
- * @param {AccountInformationApiGetUserAccountDetailsRequest} requestParameters Request parameters.
1274
- * @param {*} [options] Override http request option.
1275
- * @throws {RequiredError}
1276
- * @memberof AccountInformationApiGenerated
1277
- */
1278
- getUserAccountDetails(requestParameters, options) {
1279
- return (0, exports.AccountInformationApiFp)(this.configuration).getUserAccountDetails(requestParameters, options).then((request) => request(this.axios, this.basePath));
1280
- }
1281
- /**
1282
- * Returns the detail of a single order using the external order ID provided in the request body. This endpoint only works for single-leg orders at this time. Support for multi-leg orders will be added in the future. This endpoint is always realtime and does not rely on cached data. This endpoint only returns orders placed through SnapTrade. In other words, orders placed outside of the SnapTrade network are not returned by this endpoint.
1283
- * @summary Get account order detail
1284
- * @param {AccountInformationApiGetUserAccountOrderDetailRequest} requestParameters Request parameters.
1285
- * @param {*} [options] Override http request option.
1286
- * @throws {RequiredError}
1287
- * @memberof AccountInformationApiGenerated
1288
- */
1289
- getUserAccountOrderDetail(requestParameters, options) {
1290
- return (0, exports.AccountInformationApiFp)(this.configuration).getUserAccountOrderDetail(requestParameters, options).then((request) => request(this.axios, this.basePath));
1291
- }
1292
- /**
1293
- * Returns a list of recent orders in the specified account. Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do, this endpoint returns real-time data. - If you don\'t, Daily data is cached and refreshed once a day. Exact refresh timing may vary by brokerage. If you need real-time, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint. If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
1294
- * @summary List account orders
1295
- * @param {AccountInformationApiGetUserAccountOrdersRequest} requestParameters Request parameters.
1296
- * @param {*} [options] Override http request option.
1297
- * @throws {RequiredError}
1298
- * @memberof AccountInformationApiGenerated
1299
- */
1300
- getUserAccountOrders(requestParameters, options) {
1301
- return (0, exports.AccountInformationApiFp)(this.configuration).getUserAccountOrders(requestParameters, options).then((request) => request(this.axios, this.basePath));
1302
- }
1303
- /**
1304
- * Returns a list of stock/ETF/crypto/mutual fund positions in the specified account. For option positions, please use the [options endpoint](/reference/Options/Options_listOptionHoldings). Consider using the newer [unified positions endpoint](/reference/Account%20Information/AccountInformation_getAllAccountPositions). This will allow you to get both equity and option positions in a single call, as well as additional asset classes such as futures. Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do, this endpoint returns real-time data. - If you don\'t, Daily data is cached and refreshed once a day. Exact refresh timing may vary by brokerage. If you need real-time, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint. If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
1305
- * @summary List account positions
1306
- * @param {AccountInformationApiGetUserAccountPositionsRequest} requestParameters Request parameters.
1307
- * @param {*} [options] Override http request option.
1308
- * @throws {RequiredError}
1309
- * @memberof AccountInformationApiGenerated
1310
- */
1311
- getUserAccountPositions(requestParameters, options) {
1312
- return (0, exports.AccountInformationApiFp)(this.configuration).getUserAccountPositions(requestParameters, options).then((request) => request(this.axios, this.basePath));
1313
- }
1314
- /**
1315
- * A lightweight endpoint that returns the latest page of orders placed in the last 24 hours in the specified account. For most brokerages, the default page size is 100 meaning the endpoint will return a max of 100 orders. This endpoint is realtime and can be used to quickly check if account state has recently changed due to an execution, or check status of recently placed orders Differs from /orders in that it is always realtime, and only checks the last 24 hours By default only returns executed orders, but that can be changed by setting *only_executed* to false
1316
- * @summary List account recent orders (last 24 hours only)
1317
- * @param {AccountInformationApiGetUserAccountRecentOrdersRequest} requestParameters Request parameters.
1318
- * @param {*} [options] Override http request option.
1319
- * @throws {RequiredError}
1320
- * @memberof AccountInformationApiGenerated
1321
- */
1322
- getUserAccountRecentOrders(requestParameters, options) {
1323
- return (0, exports.AccountInformationApiFp)(this.configuration).getUserAccountRecentOrders(requestParameters, options).then((request) => request(this.axios, this.basePath));
1324
- }
1325
- /**
1326
- * Returns a list of rate of return percents for a given account.
1327
- * @summary List account rate of returns
1328
- * @param {AccountInformationApiGetUserAccountReturnRatesRequest} requestParameters Request parameters.
1329
- * @param {*} [options] Override http request option.
1330
- * @throws {RequiredError}
1331
- * @memberof AccountInformationApiGenerated
1332
- */
1333
- getUserAccountReturnRates(requestParameters, options) {
1334
- return (0, exports.AccountInformationApiFp)(this.configuration).getUserAccountReturnRates(requestParameters, options).then((request) => request(this.axios, this.basePath));
1335
- }
1336
- /**
1337
- * **Deprecated.** Use the finer-grained account data endpoints instead: [balances](/reference/Account%20Information/AccountInformation_getUserAccountBalance), [positions](/reference/Account%20Information/AccountInformation_getAllAccountPositions), and [orders](/reference/Account%20Information/AccountInformation_getUserAccountOrders). Returns a list of balances, positions, and recent orders for the specified account. Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do, this endpoint returns real-time data. - If you don\'t, Daily data is cached and refreshed once a day. Exact refresh timing may vary by brokerage. If you need real-time, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint. If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
1338
- * @summary List account holdings
1339
- * @param {AccountInformationApiGetUserHoldingsRequest} requestParameters Request parameters.
1340
- * @param {*} [options] Override http request option.
1341
- * @deprecated
1342
- * @throws {RequiredError}
1343
- * @memberof AccountInformationApiGenerated
1344
- */
1345
- getUserHoldings(requestParameters, options) {
1346
- return (0, exports.AccountInformationApiFp)(this.configuration).getUserHoldings(requestParameters, options).then((request) => request(this.axios, this.basePath));
1347
- }
1348
- /**
1349
- * **Deprecated, please use the [list accounts for a connection endpoint](/reference/Connections/Connections_listBrokerageAuthorizationAccounts) instead.** Returns all brokerage accounts across all connections known to SnapTrade for the authenticated user. This endpoint returns Daily data regardless of the customer\'s plan. Daily data is cached and refreshed once a day. Exact refresh timing may vary by brokerage. To get real-time data on Pay as you Go / Real-time, use the connection-scoped endpoint linked above. Customers on Pay as you Go / Daily can force a refresh with the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization).
1350
- * @summary List accounts
1351
- * @param {AccountInformationApiListUserAccountsRequest} requestParameters Request parameters.
1352
- * @param {*} [options] Override http request option.
1353
- * @deprecated
1354
- * @throws {RequiredError}
1355
- * @memberof AccountInformationApiGenerated
1356
- */
1357
- listUserAccounts(requestParameters, options) {
1358
- return (0, exports.AccountInformationApiFp)(this.configuration).listUserAccounts(requestParameters, options).then((request) => request(this.axios, this.basePath));
1359
- }
1360
- /**
1361
- * Updates various properties of a specified account.
1362
- * @summary Update details of an investment account
1363
- * @param {AccountInformationApiUpdateUserAccountRequest} requestParameters Request parameters.
1364
- * @param {*} [options] Override http request option.
1365
- * @throws {RequiredError}
1366
- * @memberof AccountInformationApiGenerated
1367
- */
1368
- updateUserAccount(requestParameters, options) {
1369
- return (0, exports.AccountInformationApiFp)(this.configuration).updateUserAccount(requestParameters, options).then((request) => request(this.axios, this.basePath));
1370
- }
1371
- }
1372
- exports.AccountInformationApiGenerated = AccountInformationApiGenerated;