snaptrade-typescript-sdk 9.0.200 → 10.0.2

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 (425) hide show
  1. package/README.md +291 -4
  2. package/dist/chunk-e9Ob2GDo.mjs +26 -0
  3. package/dist/index.cjs +7214 -0
  4. package/dist/index.d.cts +1 -0
  5. package/dist/index.d.mts +10806 -0
  6. package/dist/index.d.ts +1 -5
  7. package/dist/index.mjs +7142 -0
  8. package/package.json +33 -18
  9. package/dist/api/account-information-api-generated.d.ts +0 -950
  10. package/dist/api/account-information-api-generated.js +0 -1372
  11. package/dist/api/account-information-api.d.ts +0 -4
  12. package/dist/api/account-information-api.js +0 -22
  13. package/dist/api/api-status-api-generated.d.ts +0 -59
  14. package/dist/api/api-status-api-generated.js +0 -133
  15. package/dist/api/api-status-api.d.ts +0 -4
  16. package/dist/api/api-status-api.js +0 -22
  17. package/dist/api/authentication-api-generated.d.ts +0 -241
  18. package/dist/api/authentication-api-generated.js +0 -482
  19. package/dist/api/authentication-api.d.ts +0 -4
  20. package/dist/api/authentication-api.js +0 -22
  21. package/dist/api/connections-api-generated.d.ts +0 -576
  22. package/dist/api/connections-api-generated.js +0 -868
  23. package/dist/api/connections-api.d.ts +0 -4
  24. package/dist/api/connections-api.js +0 -22
  25. package/dist/api/options-api-generated.d.ts +0 -90
  26. package/dist/api/options-api-generated.js +0 -158
  27. package/dist/api/options-api.d.ts +0 -4
  28. package/dist/api/options-api.js +0 -22
  29. package/dist/api/reference-data-api-generated.d.ts +0 -497
  30. package/dist/api/reference-data-api-generated.js +0 -973
  31. package/dist/api/reference-data-api.d.ts +0 -4
  32. package/dist/api/reference-data-api.js +0 -22
  33. package/dist/api/trading-api-generated.d.ts +0 -1058
  34. package/dist/api/trading-api-generated.js +0 -1688
  35. package/dist/api/trading-api.d.ts +0 -4
  36. package/dist/api/trading-api.js +0 -22
  37. package/dist/api/transactions-and-reporting-api-generated.d.ts +0 -215
  38. package/dist/api/transactions-and-reporting-api-generated.js +0 -299
  39. package/dist/api/transactions-and-reporting-api.d.ts +0 -4
  40. package/dist/api/transactions-and-reporting-api.js +0 -22
  41. package/dist/api.d.ts +0 -8
  42. package/dist/api.js +0 -36
  43. package/dist/base.d.ts +0 -44
  44. package/dist/base.js +0 -60
  45. package/dist/browser.js +0 -2
  46. package/dist/browser.js.LICENSE.txt +0 -1
  47. package/dist/client-custom.d.ts +0 -4
  48. package/dist/client-custom.js +0 -7
  49. package/dist/client.d.ts +0 -14
  50. package/dist/client.js +0 -31
  51. package/dist/common.d.ts +0 -61
  52. package/dist/common.js +0 -220
  53. package/dist/configuration.d.ts +0 -98
  54. package/dist/configuration.js +0 -53
  55. package/dist/error.d.ts +0 -46
  56. package/dist/error.js +0 -105
  57. package/dist/index.js +0 -33
  58. package/dist/jest.config.d.ts +0 -3
  59. package/dist/jest.config.js +0 -13
  60. package/dist/mock.test.d.ts +0 -1
  61. package/dist/mock.test.js +0 -29
  62. package/dist/models/account-balance-total.d.ts +0 -19
  63. package/dist/models/account-balance-total.js +0 -2
  64. package/dist/models/account-balance.d.ts +0 -14
  65. package/dist/models/account-balance.js +0 -2
  66. package/dist/models/account-holdings-account.d.ts +0 -51
  67. package/dist/models/account-holdings-account.js +0 -2
  68. package/dist/models/account-holdings.d.ts +0 -37
  69. package/dist/models/account-holdings.js +0 -2
  70. package/dist/models/account-information-get-user-account-order-detail-request.d.ts +0 -13
  71. package/dist/models/account-information-get-user-account-order-detail-request.js +0 -2
  72. package/dist/models/account-order-record-child-brokerage-order-ids.d.ts +0 -19
  73. package/dist/models/account-order-record-child-brokerage-order-ids.js +0 -2
  74. package/dist/models/account-order-record-leg-instrument.d.ts +0 -38
  75. package/dist/models/account-order-record-leg-instrument.js +0 -2
  76. package/dist/models/account-order-record-leg.d.ts +0 -58
  77. package/dist/models/account-order-record-leg.js +0 -2
  78. package/dist/models/account-order-record-option-symbol.d.ts +0 -52
  79. package/dist/models/account-order-record-option-symbol.js +0 -2
  80. package/dist/models/account-order-record-quote-currency.d.ts +0 -25
  81. package/dist/models/account-order-record-quote-currency.js +0 -2
  82. package/dist/models/account-order-record-quote-universal-symbol.d.ts +0 -73
  83. package/dist/models/account-order-record-quote-universal-symbol.js +0 -2
  84. package/dist/models/account-order-record-status-v2.d.ts +0 -6
  85. package/dist/models/account-order-record-status-v2.js +0 -2
  86. package/dist/models/account-order-record-status.d.ts +0 -6
  87. package/dist/models/account-order-record-status.js +0 -2
  88. package/dist/models/account-order-record-trailing-stop.d.ts +0 -21
  89. package/dist/models/account-order-record-trailing-stop.js +0 -2
  90. package/dist/models/account-order-record-universal-symbol.d.ts +0 -73
  91. package/dist/models/account-order-record-universal-symbol.js +0 -2
  92. package/dist/models/account-order-record-v2.d.ts +0 -97
  93. package/dist/models/account-order-record-v2.js +0 -2
  94. package/dist/models/account-order-record.d.ts +0 -168
  95. package/dist/models/account-order-record.js +0 -2
  96. package/dist/models/account-orders-v2-response.d.ts +0 -15
  97. package/dist/models/account-orders-v2-response.js +0 -2
  98. package/dist/models/account-position.d.ts +0 -52
  99. package/dist/models/account-position.js +0 -2
  100. package/dist/models/account-simple.d.ts +0 -39
  101. package/dist/models/account-simple.js +0 -2
  102. package/dist/models/account-sync-status.d.ts +0 -21
  103. package/dist/models/account-sync-status.js +0 -2
  104. package/dist/models/account-universal-activity-currency.d.ts +0 -25
  105. package/dist/models/account-universal-activity-currency.js +0 -2
  106. package/dist/models/account-universal-activity-option-symbol.d.ts +0 -52
  107. package/dist/models/account-universal-activity-option-symbol.js +0 -2
  108. package/dist/models/account-universal-activity-symbol.d.ts +0 -65
  109. package/dist/models/account-universal-activity-symbol.js +0 -2
  110. package/dist/models/account-universal-activity.d.ts +0 -107
  111. package/dist/models/account-universal-activity.js +0 -2
  112. package/dist/models/account-value-history-item.d.ts +0 -20
  113. package/dist/models/account-value-history-item.js +0 -2
  114. package/dist/models/account-value-history-response.d.ts +0 -21
  115. package/dist/models/account-value-history-response.js +0 -2
  116. package/dist/models/account.d.ts +0 -126
  117. package/dist/models/account.js +0 -2
  118. package/dist/models/action-strict-with-options.d.ts +0 -6
  119. package/dist/models/action-strict-with-options.js +0 -2
  120. package/dist/models/action-strict.d.ts +0 -6
  121. package/dist/models/action-strict.js +0 -2
  122. package/dist/models/adr-instrument.d.ts +0 -59
  123. package/dist/models/adr-instrument.js +0 -2
  124. package/dist/models/all-account-positions-response.d.ts +0 -15
  125. package/dist/models/all-account-positions-response.js +0 -2
  126. package/dist/models/authentication-login-snap-trade-user200-response.d.ts +0 -7
  127. package/dist/models/authentication-login-snap-trade-user200-response.js +0 -2
  128. package/dist/models/balance-currency.d.ts +0 -25
  129. package/dist/models/balance-currency.js +0 -2
  130. package/dist/models/balance.d.ts +0 -27
  131. package/dist/models/balance.js +0 -2
  132. package/dist/models/brokerage-authorization-disabled-confirmation.d.ts +0 -14
  133. package/dist/models/brokerage-authorization-disabled-confirmation.js +0 -2
  134. package/dist/models/brokerage-authorization-refresh-confirmation.d.ts +0 -14
  135. package/dist/models/brokerage-authorization-refresh-confirmation.js +0 -2
  136. package/dist/models/brokerage-authorization-transactions-sync-confirmation.d.ts +0 -14
  137. package/dist/models/brokerage-authorization-transactions-sync-confirmation.js +0 -2
  138. package/dist/models/brokerage-authorization-type-read-only-brokerage.d.ts +0 -26
  139. package/dist/models/brokerage-authorization-type-read-only-brokerage.js +0 -2
  140. package/dist/models/brokerage-authorization-type-read-only.d.ts +0 -36
  141. package/dist/models/brokerage-authorization-type-read-only.js +0 -2
  142. package/dist/models/brokerage-authorization.d.ts +0 -73
  143. package/dist/models/brokerage-authorization.js +0 -2
  144. package/dist/models/brokerage-instrument.d.ts +0 -38
  145. package/dist/models/brokerage-instrument.js +0 -2
  146. package/dist/models/brokerage-instruments-response.d.ts +0 -15
  147. package/dist/models/brokerage-instruments-response.js +0 -2
  148. package/dist/models/brokerage-type.d.ts +0 -20
  149. package/dist/models/brokerage-type.js +0 -2
  150. package/dist/models/brokerage.d.ts +0 -122
  151. package/dist/models/brokerage.js +0 -2
  152. package/dist/models/cancel-order-response.d.ts +0 -22
  153. package/dist/models/cancel-order-response.js +0 -2
  154. package/dist/models/cef-instrument.d.ts +0 -59
  155. package/dist/models/cef-instrument.js +0 -2
  156. package/dist/models/child-brokerage-order-ids.d.ts +0 -20
  157. package/dist/models/child-brokerage-order-ids.js +0 -2
  158. package/dist/models/complex-order-leg.d.ts +0 -62
  159. package/dist/models/complex-order-leg.js +0 -2
  160. package/dist/models/complex-order-response.d.ts +0 -22
  161. package/dist/models/complex-order-response.js +0 -2
  162. package/dist/models/connections-session-events200-response-inner.d.ts +0 -6
  163. package/dist/models/connections-session-events200-response-inner.js +0 -2
  164. package/dist/models/crypto-instrument.d.ts +0 -59
  165. package/dist/models/crypto-instrument.js +0 -2
  166. package/dist/models/crypto-order-form.d.ts +0 -66
  167. package/dist/models/crypto-order-form.js +0 -2
  168. package/dist/models/crypto-order-preview-estimated-fee.d.ts +0 -20
  169. package/dist/models/crypto-order-preview-estimated-fee.js +0 -2
  170. package/dist/models/crypto-order-preview.d.ts +0 -15
  171. package/dist/models/crypto-order-preview.js +0 -2
  172. package/dist/models/crypto-trading-instrument.d.ts +0 -22
  173. package/dist/models/crypto-trading-instrument.js +0 -2
  174. package/dist/models/cryptocurrency-pair-quote.d.ts +0 -32
  175. package/dist/models/cryptocurrency-pair-quote.js +0 -2
  176. package/dist/models/cryptocurrency-pair.d.ts +0 -32
  177. package/dist/models/cryptocurrency-pair.js +0 -2
  178. package/dist/models/currency.d.ts +0 -26
  179. package/dist/models/currency.js +0 -2
  180. package/dist/models/delete-connection-confirmation.d.ts +0 -20
  181. package/dist/models/delete-connection-confirmation.js +0 -2
  182. package/dist/models/delete-user-response.d.ts +0 -26
  183. package/dist/models/delete-user-response.js +0 -2
  184. package/dist/models/dividend-at-date.d.ts +0 -26
  185. package/dist/models/dividend-at-date.js +0 -2
  186. package/dist/models/encrypted-response-encrypted-message-data.d.ts +0 -26
  187. package/dist/models/encrypted-response-encrypted-message-data.js +0 -2
  188. package/dist/models/encrypted-response.d.ts +0 -20
  189. package/dist/models/encrypted-response.js +0 -2
  190. package/dist/models/etf-instrument.d.ts +0 -59
  191. package/dist/models/etf-instrument.js +0 -2
  192. package/dist/models/exchange-rate-pairs.d.ts +0 -27
  193. package/dist/models/exchange-rate-pairs.js +0 -2
  194. package/dist/models/exchange.d.ts +0 -56
  195. package/dist/models/exchange.js +0 -2
  196. package/dist/models/figi-instrument.d.ts +0 -20
  197. package/dist/models/figi-instrument.js +0 -2
  198. package/dist/models/future-instrument.d.ts +0 -64
  199. package/dist/models/future-instrument.js +0 -2
  200. package/dist/models/holdings-status.d.ts +0 -19
  201. package/dist/models/holdings-status.js +0 -2
  202. package/dist/models/index.d.ts +0 -173
  203. package/dist/models/index.js +0 -189
  204. package/dist/models/instrument.d.ts +0 -33
  205. package/dist/models/instrument.js +0 -2
  206. package/dist/models/login-redirect-uri.d.ts +0 -19
  207. package/dist/models/login-redirect-uri.js +0 -2
  208. package/dist/models/manual-trade-and-impact.d.ts +0 -29
  209. package/dist/models/manual-trade-and-impact.js +0 -2
  210. package/dist/models/manual-trade-balance.d.ts +0 -28
  211. package/dist/models/manual-trade-balance.js +0 -2
  212. package/dist/models/manual-trade-form-bracket.d.ts +0 -67
  213. package/dist/models/manual-trade-form-bracket.js +0 -2
  214. package/dist/models/manual-trade-form-complex.d.ts +0 -28
  215. package/dist/models/manual-trade-form-complex.js +0 -2
  216. package/dist/models/manual-trade-form-notional-value.d.ts +0 -6
  217. package/dist/models/manual-trade-form-notional-value.js +0 -2
  218. package/dist/models/manual-trade-form-with-options.d.ts +0 -78
  219. package/dist/models/manual-trade-form-with-options.js +0 -2
  220. package/dist/models/manual-trade-form.d.ts +0 -65
  221. package/dist/models/manual-trade-form.js +0 -2
  222. package/dist/models/manual-trade-impact.d.ts +0 -38
  223. package/dist/models/manual-trade-impact.js +0 -2
  224. package/dist/models/manual-trade-replace-form.d.ts +0 -58
  225. package/dist/models/manual-trade-replace-form.js +0 -2
  226. package/dist/models/manual-trade-symbol.d.ts +0 -49
  227. package/dist/models/manual-trade-symbol.js +0 -2
  228. package/dist/models/manual-trade.d.ts +0 -60
  229. package/dist/models/manual-trade.js +0 -2
  230. package/dist/models/mleg-action-strict.d.ts +0 -6
  231. package/dist/models/mleg-action-strict.js +0 -2
  232. package/dist/models/mleg-instrument-type.d.ts +0 -6
  233. package/dist/models/mleg-instrument-type.js +0 -2
  234. package/dist/models/mleg-leg.d.ts +0 -28
  235. package/dist/models/mleg-leg.js +0 -2
  236. package/dist/models/mleg-order-response.d.ts +0 -21
  237. package/dist/models/mleg-order-response.js +0 -2
  238. package/dist/models/mleg-order-type-strict.d.ts +0 -6
  239. package/dist/models/mleg-order-type-strict.js +0 -2
  240. package/dist/models/mleg-price-effect-strict.d.ts +0 -6
  241. package/dist/models/mleg-price-effect-strict.js +0 -2
  242. package/dist/models/mleg-trade-form.d.ts +0 -47
  243. package/dist/models/mleg-trade-form.js +0 -2
  244. package/dist/models/mleg-trading-instrument.d.ts +0 -21
  245. package/dist/models/mleg-trading-instrument.js +0 -2
  246. package/dist/models/model400-failed-request-response.d.ts +0 -20
  247. package/dist/models/model400-failed-request-response.js +0 -2
  248. package/dist/models/model401-failed-request-response.d.ts +0 -20
  249. package/dist/models/model401-failed-request-response.js +0 -2
  250. package/dist/models/model402-brokerage-auth-already-disabled-exception.d.ts +0 -20
  251. package/dist/models/model402-brokerage-auth-already-disabled-exception.js +0 -2
  252. package/dist/models/model402-brokerage-auth-disabled-response.d.ts +0 -20
  253. package/dist/models/model402-brokerage-auth-disabled-response.js +0 -2
  254. package/dist/models/model403-failed-request-response.d.ts +0 -20
  255. package/dist/models/model403-failed-request-response.js +0 -2
  256. package/dist/models/model403-feature-not-enabled-response.d.ts +0 -20
  257. package/dist/models/model403-feature-not-enabled-response.js +0 -2
  258. package/dist/models/model404-failed-request-response.d.ts +0 -20
  259. package/dist/models/model404-failed-request-response.js +0 -2
  260. package/dist/models/model425-failed-request-response.d.ts +0 -20
  261. package/dist/models/model425-failed-request-response.js +0 -2
  262. package/dist/models/model500-unexpected-exception-response.d.ts +0 -26
  263. package/dist/models/model500-unexpected-exception-response.js +0 -2
  264. package/dist/models/monthly-dividends.d.ts +0 -21
  265. package/dist/models/monthly-dividends.js +0 -2
  266. package/dist/models/mutual-fund-instrument.d.ts +0 -59
  267. package/dist/models/mutual-fund-instrument.js +0 -2
  268. package/dist/models/net-contributions.d.ts +0 -26
  269. package/dist/models/net-contributions.js +0 -2
  270. package/dist/models/net-dividend.d.ts +0 -27
  271. package/dist/models/net-dividend.js +0 -2
  272. package/dist/models/notional-value.d.ts +0 -6
  273. package/dist/models/notional-value.js +0 -2
  274. package/dist/models/option-brokerage-symbol.d.ts +0 -29
  275. package/dist/models/option-brokerage-symbol.js +0 -2
  276. package/dist/models/option-chain-inner-chain-per-root-inner-chain-per-strike-price-inner.d.ts +0 -26
  277. package/dist/models/option-chain-inner-chain-per-root-inner-chain-per-strike-price-inner.js +0 -2
  278. package/dist/models/option-chain-inner-chain-per-root-inner.d.ts +0 -27
  279. package/dist/models/option-chain-inner-chain-per-root-inner.js +0 -2
  280. package/dist/models/option-chain-inner.d.ts +0 -39
  281. package/dist/models/option-chain-inner.js +0 -2
  282. package/dist/models/option-impact.d.ts +0 -28
  283. package/dist/models/option-impact.js +0 -2
  284. package/dist/models/option-instrument.d.ts +0 -60
  285. package/dist/models/option-instrument.js +0 -2
  286. package/dist/models/option-leg.d.ts +0 -28
  287. package/dist/models/option-leg.js +0 -2
  288. package/dist/models/option-quote-greeks.d.ts +0 -32
  289. package/dist/models/option-quote-greeks.js +0 -2
  290. package/dist/models/option-quote.d.ts +0 -39
  291. package/dist/models/option-quote.js +0 -2
  292. package/dist/models/option-strategy-legs-inner.d.ts +0 -31
  293. package/dist/models/option-strategy-legs-inner.js +0 -2
  294. package/dist/models/option-strategy.d.ts +0 -40
  295. package/dist/models/option-strategy.js +0 -2
  296. package/dist/models/options-position-currency.d.ts +0 -25
  297. package/dist/models/options-position-currency.js +0 -2
  298. package/dist/models/options-position.d.ts +0 -41
  299. package/dist/models/options-position.js +0 -2
  300. package/dist/models/options-symbol.d.ts +0 -53
  301. package/dist/models/options-symbol.js +0 -2
  302. package/dist/models/order-type-strict.d.ts +0 -6
  303. package/dist/models/order-type-strict.js +0 -2
  304. package/dist/models/order-updated-response-order.d.ts +0 -167
  305. package/dist/models/order-updated-response-order.js +0 -2
  306. package/dist/models/order-updated-response.d.ts +0 -21
  307. package/dist/models/order-updated-response.js +0 -2
  308. package/dist/models/other-instrument.d.ts +0 -59
  309. package/dist/models/other-instrument.js +0 -2
  310. package/dist/models/paginated-universal-activity.d.ts +0 -22
  311. package/dist/models/paginated-universal-activity.js +0 -2
  312. package/dist/models/pagination-details.d.ts +0 -26
  313. package/dist/models/pagination-details.js +0 -2
  314. package/dist/models/partner-data.d.ts +0 -82
  315. package/dist/models/partner-data.js +0 -2
  316. package/dist/models/past-value.d.ts +0 -26
  317. package/dist/models/past-value.js +0 -2
  318. package/dist/models/performance-custom.d.ts +0 -127
  319. package/dist/models/performance-custom.js +0 -2
  320. package/dist/models/position-currency.d.ts +0 -25
  321. package/dist/models/position-currency.js +0 -2
  322. package/dist/models/position-symbol.d.ts +0 -50
  323. package/dist/models/position-symbol.js +0 -2
  324. package/dist/models/position.d.ts +0 -66
  325. package/dist/models/position.js +0 -2
  326. package/dist/models/rate-of-return-object.d.ts +0 -28
  327. package/dist/models/rate-of-return-object.js +0 -2
  328. package/dist/models/rate-of-return-response.d.ts +0 -15
  329. package/dist/models/rate-of-return-response.js +0 -2
  330. package/dist/models/recent-orders-response.d.ts +0 -15
  331. package/dist/models/recent-orders-response.js +0 -2
  332. package/dist/models/security-type.d.ts +0 -33
  333. package/dist/models/security-type.js +0 -2
  334. package/dist/models/session-event.d.ts +0 -52
  335. package/dist/models/session-event.js +0 -2
  336. package/dist/models/simple-order-form.d.ts +0 -67
  337. package/dist/models/simple-order-form.js +0 -2
  338. package/dist/models/snap-trade-holdings-account.d.ts +0 -60
  339. package/dist/models/snap-trade-holdings-account.js +0 -2
  340. package/dist/models/snap-trade-holdings-total-value.d.ts +0 -20
  341. package/dist/models/snap-trade-holdings-total-value.js +0 -2
  342. package/dist/models/snap-trade-login-user-request-body.d.ts +0 -58
  343. package/dist/models/snap-trade-login-user-request-body.js +0 -2
  344. package/dist/models/snap-trade-register-user-request-body.d.ts +0 -13
  345. package/dist/models/snap-trade-register-user-request-body.js +0 -2
  346. package/dist/models/status.d.ts +0 -26
  347. package/dist/models/status.js +0 -2
  348. package/dist/models/stock-instrument-figi-instrument.d.ts +0 -19
  349. package/dist/models/stock-instrument-figi-instrument.js +0 -2
  350. package/dist/models/stock-instrument.d.ts +0 -59
  351. package/dist/models/stock-instrument.js +0 -2
  352. package/dist/models/stop-loss.d.ts +0 -20
  353. package/dist/models/stop-loss.js +0 -2
  354. package/dist/models/strategy-order-record.d.ts +0 -77
  355. package/dist/models/strategy-order-record.js +0 -2
  356. package/dist/models/strategy-quotes-greek.d.ts +0 -38
  357. package/dist/models/strategy-quotes-greek.js +0 -2
  358. package/dist/models/strategy-quotes.d.ts +0 -46
  359. package/dist/models/strategy-quotes.js +0 -2
  360. package/dist/models/sub-period-return-rate.d.ts +0 -26
  361. package/dist/models/sub-period-return-rate.js +0 -2
  362. package/dist/models/symbol-currency.d.ts +0 -25
  363. package/dist/models/symbol-currency.js +0 -2
  364. package/dist/models/symbol-exchange.d.ts +0 -55
  365. package/dist/models/symbol-exchange.js +0 -2
  366. package/dist/models/symbol-query.d.ts +0 -13
  367. package/dist/models/symbol-query.js +0 -2
  368. package/dist/models/symbol.d.ts +0 -66
  369. package/dist/models/symbol.js +0 -2
  370. package/dist/models/symbols-quotes-inner.d.ts +0 -44
  371. package/dist/models/symbols-quotes-inner.js +0 -2
  372. package/dist/models/take-profit.d.ts +0 -14
  373. package/dist/models/take-profit.js +0 -2
  374. package/dist/models/tax-lot.d.ts +0 -50
  375. package/dist/models/tax-lot.js +0 -2
  376. package/dist/models/time-in-force-strict.d.ts +0 -6
  377. package/dist/models/time-in-force-strict.js +0 -2
  378. package/dist/models/trade-detection-cancel-subscription-response.d.ts +0 -14
  379. package/dist/models/trade-detection-cancel-subscription-response.js +0 -2
  380. package/dist/models/trade-detection-subscription.d.ts +0 -26
  381. package/dist/models/trade-detection-subscription.js +0 -2
  382. package/dist/models/trading-instrument.d.ts +0 -22
  383. package/dist/models/trading-instrument.js +0 -2
  384. package/dist/models/trading-search-cryptocurrency-pair-instruments200-response.d.ts +0 -15
  385. package/dist/models/trading-search-cryptocurrency-pair-instruments200-response.js +0 -2
  386. package/dist/models/trading-session.d.ts +0 -6
  387. package/dist/models/trading-session.js +0 -2
  388. package/dist/models/trailing-stop.d.ts +0 -22
  389. package/dist/models/trailing-stop.js +0 -2
  390. package/dist/models/transactions-status.d.ts +0 -25
  391. package/dist/models/transactions-status.js +0 -2
  392. package/dist/models/underlying-option-instrument.d.ts +0 -27
  393. package/dist/models/underlying-option-instrument.js +0 -2
  394. package/dist/models/underlying-symbol-exchange.d.ts +0 -61
  395. package/dist/models/underlying-symbol-exchange.js +0 -2
  396. package/dist/models/underlying-symbol-type.d.ts +0 -32
  397. package/dist/models/underlying-symbol-type.js +0 -2
  398. package/dist/models/underlying-symbol.d.ts +0 -74
  399. package/dist/models/underlying-symbol.js +0 -2
  400. package/dist/models/universal-activity.d.ts +0 -114
  401. package/dist/models/universal-activity.js +0 -2
  402. package/dist/models/universal-symbol.d.ts +0 -74
  403. package/dist/models/universal-symbol.js +0 -2
  404. package/dist/models/user-idand-secret.d.ts +0 -19
  405. package/dist/models/user-idand-secret.js +0 -2
  406. package/dist/models/usexchange.d.ts +0 -62
  407. package/dist/models/usexchange.js +0 -2
  408. package/dist/models/validated-trade-body.d.ts +0 -13
  409. package/dist/models/validated-trade-body.js +0 -2
  410. package/dist/operationParameterMap.d.ts +0 -8
  411. package/dist/operationParameterMap.js +0 -966
  412. package/dist/pagination/page-types.d.ts +0 -16
  413. package/dist/pagination/page-types.js +0 -12
  414. package/dist/pagination/page.d.ts +0 -25
  415. package/dist/pagination/page.js +0 -32
  416. package/dist/pagination/pageable.d.ts +0 -47
  417. package/dist/pagination/pageable.js +0 -70
  418. package/dist/pagination/paginate.d.ts +0 -6
  419. package/dist/pagination/paginate.js +0 -39
  420. package/dist/requestAfterHook.d.ts +0 -8
  421. package/dist/requestAfterHook.js +0 -82
  422. package/dist/requestBeforeHook.d.ts +0 -10
  423. package/dist/requestBeforeHook.js +0 -8
  424. package/dist/requestBeforeUrlHook.d.ts +0 -7
  425. package/dist/requestBeforeUrlHook.js +0 -5
@@ -1,868 +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.ConnectionsApiGenerated = exports.ConnectionsApiFactory = exports.ConnectionsApiFp = exports.ConnectionsApiAxiosParamCreator = 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
- * ConnectionsApi - axios parameter creator
34
- * @export
35
- */
36
- const ConnectionsApiAxiosParamCreator = function (configuration) {
37
- return {
38
- /**
39
- * Deletes the SnapTrade connection specified by the ID. This will also remove the accounts and holdings data associated with the connection from SnapTrade. This action is irreversible. This endpoint is asynchronous, a 200 response indicates that a task has been queued to delete the connection. Listen for the [`CONNECTION_DELETED` webhook](https://docs.snaptrade.com/docs/webhooks#webhooks-connection_deleted) webhook to know when the deletion has been completed and the data has been removed.
40
- * @summary Delete connection
41
- * @param {string} connectionId
42
- * @param {string} userId
43
- * @param {string} userSecret
44
- * @param {*} [options] Override http request option.
45
- * @throws {RequiredError}
46
- */
47
- deleteConnection: (connectionId, userId, userSecret, options = {}) => __awaiter(this, void 0, void 0, function* () {
48
- // verify required parameter 'connectionId' is not null or undefined
49
- (0, common_1.assertParamExists)('deleteConnection', 'connectionId', connectionId);
50
- // verify required parameter 'userId' is not null or undefined
51
- (0, common_1.assertParamExists)('deleteConnection', 'userId', userId);
52
- // verify required parameter 'userSecret' is not null or undefined
53
- (0, common_1.assertParamExists)('deleteConnection', 'userSecret', userSecret);
54
- const localVarPath = `/connection/{connectionId}`
55
- .replace(`{${"connectionId"}}`, encodeURIComponent(String(connectionId !== undefined ? connectionId : `-connectionId-`)));
56
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
57
- const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
58
- let baseOptions;
59
- if (configuration) {
60
- baseOptions = configuration.baseOptions;
61
- }
62
- const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
63
- const localVarHeaderParameter = configuration && !(0, common_1.isBrowser)() ? { "User-Agent": configuration.userAgent } : {};
64
- const localVarQueryParameter = {};
65
- // authentication PartnerClientId required
66
- yield (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, key: "clientId", keyParamName: "clientId", configuration });
67
- // authentication PartnerSignature required
68
- yield (0, common_1.setApiKeyToObject)({ object: localVarHeaderParameter, key: "Signature", keyParamName: "signature", configuration });
69
- // authentication PartnerTimestamp required
70
- yield (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, key: "timestamp", keyParamName: "timestamp", configuration });
71
- if (userId !== undefined) {
72
- localVarQueryParameter['userId'] = userId;
73
- }
74
- if (userSecret !== undefined) {
75
- localVarQueryParameter['userSecret'] = userSecret;
76
- }
77
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
78
- localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
79
- (0, requestBeforeHook_1.requestBeforeHook)({
80
- queryParameters: localVarQueryParameter,
81
- requestConfig: localVarRequestOptions,
82
- path: localVarPath,
83
- configuration,
84
- pathTemplate: '/connection/{connectionId}',
85
- httpMethod: 'DELETE'
86
- });
87
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
88
- return {
89
- url: (0, common_1.toPathString)(localVarUrlObj),
90
- options: localVarRequestOptions,
91
- };
92
- }),
93
- /**
94
- * Returns a single connection for the specified ID.
95
- * @summary Get connection detail
96
- * @param {string} authorizationId
97
- * @param {string} userId
98
- * @param {string} userSecret
99
- * @param {*} [options] Override http request option.
100
- * @throws {RequiredError}
101
- */
102
- detailBrokerageAuthorization: (authorizationId, userId, userSecret, options = {}) => __awaiter(this, void 0, void 0, function* () {
103
- // verify required parameter 'authorizationId' is not null or undefined
104
- (0, common_1.assertParamExists)('detailBrokerageAuthorization', 'authorizationId', authorizationId);
105
- // verify required parameter 'userId' is not null or undefined
106
- (0, common_1.assertParamExists)('detailBrokerageAuthorization', 'userId', userId);
107
- // verify required parameter 'userSecret' is not null or undefined
108
- (0, common_1.assertParamExists)('detailBrokerageAuthorization', 'userSecret', userSecret);
109
- const localVarPath = `/authorizations/{authorizationId}`
110
- .replace(`{${"authorizationId"}}`, encodeURIComponent(String(authorizationId !== undefined ? authorizationId : `-authorizationId-`)));
111
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
112
- const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
113
- let baseOptions;
114
- if (configuration) {
115
- baseOptions = configuration.baseOptions;
116
- }
117
- const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
118
- const localVarHeaderParameter = configuration && !(0, common_1.isBrowser)() ? { "User-Agent": configuration.userAgent } : {};
119
- const localVarQueryParameter = {};
120
- // authentication PartnerClientId required
121
- yield (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, key: "clientId", keyParamName: "clientId", configuration });
122
- // authentication PartnerSignature required
123
- yield (0, common_1.setApiKeyToObject)({ object: localVarHeaderParameter, key: "Signature", keyParamName: "signature", configuration });
124
- // authentication PartnerTimestamp required
125
- yield (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, key: "timestamp", keyParamName: "timestamp", configuration });
126
- if (userId !== undefined) {
127
- localVarQueryParameter['userId'] = userId;
128
- }
129
- if (userSecret !== undefined) {
130
- localVarQueryParameter['userSecret'] = userSecret;
131
- }
132
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
133
- localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
134
- (0, requestBeforeHook_1.requestBeforeHook)({
135
- queryParameters: localVarQueryParameter,
136
- requestConfig: localVarRequestOptions,
137
- path: localVarPath,
138
- configuration,
139
- pathTemplate: '/authorizations/{authorizationId}',
140
- httpMethod: 'GET'
141
- });
142
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
143
- return {
144
- url: (0, common_1.toPathString)(localVarUrlObj),
145
- options: localVarRequestOptions,
146
- };
147
- }),
148
- /**
149
- * Manually force the specified connection to become disabled. This should only be used for testing a reconnect flow, and never used on production connections. Will trigger a disconnect as if it happened naturally, and send a [`CONNECTION_BROKEN` webhook](/docs/webhooks#webhooks-connection_broken) for the connection. This endpoint is available on test keys. If you would like it enabled on production keys as well, please contact support as it is disabled by default.
150
- * @summary Force disable connection
151
- * @param {string} authorizationId
152
- * @param {string} userId
153
- * @param {string} userSecret
154
- * @param {*} [options] Override http request option.
155
- * @throws {RequiredError}
156
- */
157
- disableBrokerageAuthorization: (authorizationId, userId, userSecret, options = {}) => __awaiter(this, void 0, void 0, function* () {
158
- // verify required parameter 'authorizationId' is not null or undefined
159
- (0, common_1.assertParamExists)('disableBrokerageAuthorization', 'authorizationId', authorizationId);
160
- // verify required parameter 'userId' is not null or undefined
161
- (0, common_1.assertParamExists)('disableBrokerageAuthorization', 'userId', userId);
162
- // verify required parameter 'userSecret' is not null or undefined
163
- (0, common_1.assertParamExists)('disableBrokerageAuthorization', 'userSecret', userSecret);
164
- const localVarPath = `/authorizations/{authorizationId}/disable`
165
- .replace(`{${"authorizationId"}}`, encodeURIComponent(String(authorizationId !== undefined ? authorizationId : `-authorizationId-`)));
166
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
167
- const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
168
- let baseOptions;
169
- if (configuration) {
170
- baseOptions = configuration.baseOptions;
171
- }
172
- const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
173
- const localVarHeaderParameter = configuration && !(0, common_1.isBrowser)() ? { "User-Agent": configuration.userAgent } : {};
174
- const localVarQueryParameter = {};
175
- // authentication PartnerClientId required
176
- yield (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, key: "clientId", keyParamName: "clientId", configuration });
177
- // authentication PartnerSignature required
178
- yield (0, common_1.setApiKeyToObject)({ object: localVarHeaderParameter, key: "Signature", keyParamName: "signature", configuration });
179
- // authentication PartnerTimestamp required
180
- yield (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, key: "timestamp", keyParamName: "timestamp", configuration });
181
- if (userId !== undefined) {
182
- localVarQueryParameter['userId'] = userId;
183
- }
184
- if (userSecret !== undefined) {
185
- localVarQueryParameter['userSecret'] = userSecret;
186
- }
187
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
188
- localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
189
- (0, requestBeforeHook_1.requestBeforeHook)({
190
- queryParameters: localVarQueryParameter,
191
- requestConfig: localVarRequestOptions,
192
- path: localVarPath,
193
- configuration,
194
- pathTemplate: '/authorizations/{authorizationId}/disable',
195
- httpMethod: 'POST'
196
- });
197
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
198
- return {
199
- url: (0, common_1.toPathString)(localVarUrlObj),
200
- options: localVarRequestOptions,
201
- };
202
- }),
203
- /**
204
- * Returns all brokerage accounts that belong to the specified connection for the authenticated user. On Pay as you Go / Real-time, this endpoint refreshes each account\'s opening date, funding date, and total value live from the brokerage on each call. On Pay as you Go / Daily, this endpoint returns Daily data. Daily data is cached and refreshed once a day. Exact refresh timing may vary by brokerage. To force a refresh, use the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization). Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see whether your plan includes real-time data.
205
- * @summary List accounts for a connection
206
- * @param {string} authorizationId
207
- * @param {string} userId
208
- * @param {string} userSecret
209
- * @param {*} [options] Override http request option.
210
- * @throws {RequiredError}
211
- */
212
- listBrokerageAuthorizationAccounts: (authorizationId, userId, userSecret, options = {}) => __awaiter(this, void 0, void 0, function* () {
213
- // verify required parameter 'authorizationId' is not null or undefined
214
- (0, common_1.assertParamExists)('listBrokerageAuthorizationAccounts', 'authorizationId', authorizationId);
215
- // verify required parameter 'userId' is not null or undefined
216
- (0, common_1.assertParamExists)('listBrokerageAuthorizationAccounts', 'userId', userId);
217
- // verify required parameter 'userSecret' is not null or undefined
218
- (0, common_1.assertParamExists)('listBrokerageAuthorizationAccounts', 'userSecret', userSecret);
219
- const localVarPath = `/authorizations/{authorizationId}/accounts`
220
- .replace(`{${"authorizationId"}}`, encodeURIComponent(String(authorizationId !== undefined ? authorizationId : `-authorizationId-`)));
221
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
222
- const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
223
- let baseOptions;
224
- if (configuration) {
225
- baseOptions = configuration.baseOptions;
226
- }
227
- const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
228
- const localVarHeaderParameter = configuration && !(0, common_1.isBrowser)() ? { "User-Agent": configuration.userAgent } : {};
229
- const localVarQueryParameter = {};
230
- // authentication PartnerClientId required
231
- yield (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, key: "clientId", keyParamName: "clientId", configuration });
232
- // authentication PartnerSignature required
233
- yield (0, common_1.setApiKeyToObject)({ object: localVarHeaderParameter, key: "Signature", keyParamName: "signature", configuration });
234
- // authentication PartnerTimestamp required
235
- yield (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, key: "timestamp", keyParamName: "timestamp", configuration });
236
- if (userId !== undefined) {
237
- localVarQueryParameter['userId'] = userId;
238
- }
239
- if (userSecret !== undefined) {
240
- localVarQueryParameter['userSecret'] = userSecret;
241
- }
242
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
243
- localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
244
- (0, requestBeforeHook_1.requestBeforeHook)({
245
- queryParameters: localVarQueryParameter,
246
- requestConfig: localVarRequestOptions,
247
- path: localVarPath,
248
- configuration,
249
- pathTemplate: '/authorizations/{authorizationId}/accounts',
250
- httpMethod: 'GET'
251
- });
252
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
253
- return {
254
- url: (0, common_1.toPathString)(localVarUrlObj),
255
- options: localVarRequestOptions,
256
- };
257
- }),
258
- /**
259
- * Returns a list of all connections for the specified user. Note that `Connection` and `Brokerage Authorization` are interchangeable, but the term `Connection` is preferred and used in the doc for consistency. A connection is usually tied to a single login at a brokerage. A single connection can contain multiple brokerage accounts. SnapTrade performs de-duping on connections for a given user. If the user has an existing connection with the brokerage, when connecting the brokerage with the same credentials, SnapTrade will return the existing connection instead of creating a new one.
260
- * @summary List all connections
261
- * @param {string} userId
262
- * @param {string} userSecret
263
- * @param {*} [options] Override http request option.
264
- * @throws {RequiredError}
265
- */
266
- listBrokerageAuthorizations: (userId, userSecret, options = {}) => __awaiter(this, void 0, void 0, function* () {
267
- // verify required parameter 'userId' is not null or undefined
268
- (0, common_1.assertParamExists)('listBrokerageAuthorizations', 'userId', userId);
269
- // verify required parameter 'userSecret' is not null or undefined
270
- (0, common_1.assertParamExists)('listBrokerageAuthorizations', 'userSecret', userSecret);
271
- const localVarPath = `/authorizations`;
272
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
273
- const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
274
- let baseOptions;
275
- if (configuration) {
276
- baseOptions = configuration.baseOptions;
277
- }
278
- const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
279
- const localVarHeaderParameter = configuration && !(0, common_1.isBrowser)() ? { "User-Agent": configuration.userAgent } : {};
280
- const localVarQueryParameter = {};
281
- // authentication PartnerClientId required
282
- yield (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, key: "clientId", keyParamName: "clientId", configuration });
283
- // authentication PartnerSignature required
284
- yield (0, common_1.setApiKeyToObject)({ object: localVarHeaderParameter, key: "Signature", keyParamName: "signature", configuration });
285
- // authentication PartnerTimestamp required
286
- yield (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, key: "timestamp", keyParamName: "timestamp", configuration });
287
- if (userId !== undefined) {
288
- localVarQueryParameter['userId'] = userId;
289
- }
290
- if (userSecret !== undefined) {
291
- localVarQueryParameter['userSecret'] = userSecret;
292
- }
293
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
294
- localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
295
- (0, requestBeforeHook_1.requestBeforeHook)({
296
- queryParameters: localVarQueryParameter,
297
- requestConfig: localVarRequestOptions,
298
- path: localVarPath,
299
- configuration,
300
- pathTemplate: '/authorizations',
301
- httpMethod: 'GET'
302
- });
303
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
304
- return {
305
- url: (0, common_1.toPathString)(localVarUrlObj),
306
- options: localVarRequestOptions,
307
- };
308
- }),
309
- /**
310
- * Trigger a holdings update for all accounts under this connection. Updates will be queued asynchronously. [`ACCOUNT_HOLDINGS_UPDATED` webhook](/docs/webhooks#webhooks-account_holdings_updated) will be sent once the sync completes for each account under the connection. This endpoint will also trigger a transaction sync for the past day if one has not yet occurred. **Because of the cost of refreshing a connection, each call to this endpoint incurs an additional charge. You can find the exact cost for your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing)** **Please note this endpoint is disabled for Pay as you Go / Real-time plans. Pay as you Go / Real-time plans do not benefit from this feature since data is refreshed when calls are made**
311
- * @summary Refresh holdings for a connection
312
- * @param {string} authorizationId
313
- * @param {string} userId
314
- * @param {string} userSecret
315
- * @param {*} [options] Override http request option.
316
- * @throws {RequiredError}
317
- */
318
- refreshBrokerageAuthorization: (authorizationId, userId, userSecret, options = {}) => __awaiter(this, void 0, void 0, function* () {
319
- // verify required parameter 'authorizationId' is not null or undefined
320
- (0, common_1.assertParamExists)('refreshBrokerageAuthorization', 'authorizationId', authorizationId);
321
- // verify required parameter 'userId' is not null or undefined
322
- (0, common_1.assertParamExists)('refreshBrokerageAuthorization', 'userId', userId);
323
- // verify required parameter 'userSecret' is not null or undefined
324
- (0, common_1.assertParamExists)('refreshBrokerageAuthorization', 'userSecret', userSecret);
325
- const localVarPath = `/authorizations/{authorizationId}/refresh`
326
- .replace(`{${"authorizationId"}}`, encodeURIComponent(String(authorizationId !== undefined ? authorizationId : `-authorizationId-`)));
327
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
328
- const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
329
- let baseOptions;
330
- if (configuration) {
331
- baseOptions = configuration.baseOptions;
332
- }
333
- const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
334
- const localVarHeaderParameter = configuration && !(0, common_1.isBrowser)() ? { "User-Agent": configuration.userAgent } : {};
335
- const localVarQueryParameter = {};
336
- // authentication PartnerClientId required
337
- yield (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, key: "clientId", keyParamName: "clientId", configuration });
338
- // authentication PartnerSignature required
339
- yield (0, common_1.setApiKeyToObject)({ object: localVarHeaderParameter, key: "Signature", keyParamName: "signature", configuration });
340
- // authentication PartnerTimestamp required
341
- yield (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, key: "timestamp", keyParamName: "timestamp", configuration });
342
- if (userId !== undefined) {
343
- localVarQueryParameter['userId'] = userId;
344
- }
345
- if (userSecret !== undefined) {
346
- localVarQueryParameter['userSecret'] = userSecret;
347
- }
348
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
349
- localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
350
- (0, requestBeforeHook_1.requestBeforeHook)({
351
- queryParameters: localVarQueryParameter,
352
- requestConfig: localVarRequestOptions,
353
- path: localVarPath,
354
- configuration,
355
- pathTemplate: '/authorizations/{authorizationId}/refresh',
356
- httpMethod: 'POST'
357
- });
358
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
359
- return {
360
- url: (0, common_1.toPathString)(localVarUrlObj),
361
- options: localVarRequestOptions,
362
- };
363
- }),
364
- /**
365
- * Deletes the SnapTrade connection specified by the ID. This will also remove the accounts and holdings data associated with the connection from SnapTrade. This action is irreversible. This endpoint is synchronous, a 204 response indicates that the data has been successfully deleted.
366
- * @summary Delete connection
367
- * @param {string} authorizationId
368
- * @param {string} userId
369
- * @param {string} userSecret
370
- * @param {*} [options] Override http request option.
371
- * @throws {RequiredError}
372
- */
373
- removeBrokerageAuthorization: (authorizationId, userId, userSecret, options = {}) => __awaiter(this, void 0, void 0, function* () {
374
- // verify required parameter 'authorizationId' is not null or undefined
375
- (0, common_1.assertParamExists)('removeBrokerageAuthorization', 'authorizationId', authorizationId);
376
- // verify required parameter 'userId' is not null or undefined
377
- (0, common_1.assertParamExists)('removeBrokerageAuthorization', 'userId', userId);
378
- // verify required parameter 'userSecret' is not null or undefined
379
- (0, common_1.assertParamExists)('removeBrokerageAuthorization', 'userSecret', userSecret);
380
- const localVarPath = `/authorizations/{authorizationId}`
381
- .replace(`{${"authorizationId"}}`, encodeURIComponent(String(authorizationId !== undefined ? authorizationId : `-authorizationId-`)));
382
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
383
- const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
384
- let baseOptions;
385
- if (configuration) {
386
- baseOptions = configuration.baseOptions;
387
- }
388
- const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
389
- const localVarHeaderParameter = configuration && !(0, common_1.isBrowser)() ? { "User-Agent": configuration.userAgent } : {};
390
- const localVarQueryParameter = {};
391
- // authentication PartnerClientId required
392
- yield (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, key: "clientId", keyParamName: "clientId", configuration });
393
- // authentication PartnerSignature required
394
- yield (0, common_1.setApiKeyToObject)({ object: localVarHeaderParameter, key: "Signature", keyParamName: "signature", configuration });
395
- // authentication PartnerTimestamp required
396
- yield (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, key: "timestamp", keyParamName: "timestamp", configuration });
397
- if (userId !== undefined) {
398
- localVarQueryParameter['userId'] = userId;
399
- }
400
- if (userSecret !== undefined) {
401
- localVarQueryParameter['userSecret'] = userSecret;
402
- }
403
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
404
- localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
405
- (0, requestBeforeHook_1.requestBeforeHook)({
406
- queryParameters: localVarQueryParameter,
407
- requestConfig: localVarRequestOptions,
408
- path: localVarPath,
409
- configuration,
410
- pathTemplate: '/authorizations/{authorizationId}',
411
- httpMethod: 'DELETE'
412
- });
413
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
414
- return {
415
- url: (0, common_1.toPathString)(localVarUrlObj),
416
- options: localVarRequestOptions,
417
- };
418
- }),
419
- /**
420
- * Returns a list of rate of return percents for a given connection.
421
- * @summary List connection rate of returns
422
- * @param {string} userId
423
- * @param {string} userSecret
424
- * @param {string} authorizationId
425
- * @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.
426
- * @param {*} [options] Override http request option.
427
- * @throws {RequiredError}
428
- */
429
- returnRates: (userId, userSecret, authorizationId, timeframes, options = {}) => __awaiter(this, void 0, void 0, function* () {
430
- // verify required parameter 'userId' is not null or undefined
431
- (0, common_1.assertParamExists)('returnRates', 'userId', userId);
432
- // verify required parameter 'userSecret' is not null or undefined
433
- (0, common_1.assertParamExists)('returnRates', 'userSecret', userSecret);
434
- // verify required parameter 'authorizationId' is not null or undefined
435
- (0, common_1.assertParamExists)('returnRates', 'authorizationId', authorizationId);
436
- const localVarPath = `/authorizations/{authorizationId}/returnRates`
437
- .replace(`{${"authorizationId"}}`, encodeURIComponent(String(authorizationId !== undefined ? authorizationId : `-authorizationId-`)));
438
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
439
- const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
440
- let baseOptions;
441
- if (configuration) {
442
- baseOptions = configuration.baseOptions;
443
- }
444
- const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
445
- const localVarHeaderParameter = configuration && !(0, common_1.isBrowser)() ? { "User-Agent": configuration.userAgent } : {};
446
- const localVarQueryParameter = {};
447
- // authentication PartnerClientId required
448
- yield (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, key: "clientId", keyParamName: "clientId", configuration });
449
- // authentication PartnerSignature required
450
- yield (0, common_1.setApiKeyToObject)({ object: localVarHeaderParameter, key: "Signature", keyParamName: "signature", configuration });
451
- // authentication PartnerTimestamp required
452
- yield (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, key: "timestamp", keyParamName: "timestamp", configuration });
453
- if (userId !== undefined) {
454
- localVarQueryParameter['userId'] = userId;
455
- }
456
- if (userSecret !== undefined) {
457
- localVarQueryParameter['userSecret'] = userSecret;
458
- }
459
- if (timeframes !== undefined) {
460
- localVarQueryParameter['timeframes'] = timeframes;
461
- }
462
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
463
- localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
464
- (0, requestBeforeHook_1.requestBeforeHook)({
465
- queryParameters: localVarQueryParameter,
466
- requestConfig: localVarRequestOptions,
467
- path: localVarPath,
468
- configuration,
469
- pathTemplate: '/authorizations/{authorizationId}/returnRates',
470
- httpMethod: 'GET'
471
- });
472
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
473
- return {
474
- url: (0, common_1.toPathString)(localVarUrlObj),
475
- options: localVarRequestOptions,
476
- };
477
- }),
478
- /**
479
- * Returns a list of session events associated with a user.
480
- * @summary Get all session events for a user
481
- * @param {string} partnerClientId
482
- * @param {string} [userId] Optional comma separated list of user IDs used to filter the request on specific users
483
- * @param {string} [sessionId] Optional comma separated list of session IDs used to filter the request on specific users
484
- * @param {*} [options] Override http request option.
485
- * @throws {RequiredError}
486
- */
487
- sessionEvents: (partnerClientId, userId, sessionId, options = {}) => __awaiter(this, void 0, void 0, function* () {
488
- // verify required parameter 'partnerClientId' is not null or undefined
489
- (0, common_1.assertParamExists)('sessionEvents', 'partnerClientId', partnerClientId);
490
- const localVarPath = `/sessionEvents`;
491
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
492
- const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
493
- let baseOptions;
494
- if (configuration) {
495
- baseOptions = configuration.baseOptions;
496
- }
497
- const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
498
- const localVarHeaderParameter = configuration && !(0, common_1.isBrowser)() ? { "User-Agent": configuration.userAgent } : {};
499
- const localVarQueryParameter = {};
500
- // authentication PartnerClientId required
501
- yield (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, key: "clientId", keyParamName: "clientId", configuration });
502
- // authentication PartnerSignature required
503
- yield (0, common_1.setApiKeyToObject)({ object: localVarHeaderParameter, key: "Signature", keyParamName: "signature", configuration });
504
- // authentication PartnerTimestamp required
505
- yield (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, key: "timestamp", keyParamName: "timestamp", configuration });
506
- if (partnerClientId !== undefined) {
507
- localVarQueryParameter['PartnerClientId'] = partnerClientId;
508
- }
509
- if (userId !== undefined) {
510
- localVarQueryParameter['userId'] = userId;
511
- }
512
- if (sessionId !== undefined) {
513
- localVarQueryParameter['sessionId'] = sessionId;
514
- }
515
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
516
- localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
517
- (0, requestBeforeHook_1.requestBeforeHook)({
518
- queryParameters: localVarQueryParameter,
519
- requestConfig: localVarRequestOptions,
520
- path: localVarPath,
521
- configuration,
522
- pathTemplate: '/sessionEvents',
523
- httpMethod: 'GET'
524
- });
525
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
526
- return {
527
- url: (0, common_1.toPathString)(localVarUrlObj),
528
- options: localVarRequestOptions,
529
- };
530
- }),
531
- };
532
- };
533
- exports.ConnectionsApiAxiosParamCreator = ConnectionsApiAxiosParamCreator;
534
- /**
535
- * ConnectionsApi - functional programming interface
536
- * @export
537
- */
538
- const ConnectionsApiFp = function (configuration) {
539
- const localVarAxiosParamCreator = (0, exports.ConnectionsApiAxiosParamCreator)(configuration);
540
- return {
541
- /**
542
- * Deletes the SnapTrade connection specified by the ID. This will also remove the accounts and holdings data associated with the connection from SnapTrade. This action is irreversible. This endpoint is asynchronous, a 200 response indicates that a task has been queued to delete the connection. Listen for the [`CONNECTION_DELETED` webhook](https://docs.snaptrade.com/docs/webhooks#webhooks-connection_deleted) webhook to know when the deletion has been completed and the data has been removed.
543
- * @summary Delete connection
544
- * @param {ConnectionsApiDeleteConnectionRequest} requestParameters Request parameters.
545
- * @param {*} [options] Override http request option.
546
- * @throws {RequiredError}
547
- */
548
- deleteConnection(requestParameters, options) {
549
- return __awaiter(this, void 0, void 0, function* () {
550
- const localVarAxiosArgs = yield localVarAxiosParamCreator.deleteConnection(requestParameters.connectionId, requestParameters.userId, requestParameters.userSecret, options);
551
- return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
552
- });
553
- },
554
- /**
555
- * Returns a single connection for the specified ID.
556
- * @summary Get connection detail
557
- * @param {ConnectionsApiDetailBrokerageAuthorizationRequest} requestParameters Request parameters.
558
- * @param {*} [options] Override http request option.
559
- * @throws {RequiredError}
560
- */
561
- detailBrokerageAuthorization(requestParameters, options) {
562
- return __awaiter(this, void 0, void 0, function* () {
563
- const localVarAxiosArgs = yield localVarAxiosParamCreator.detailBrokerageAuthorization(requestParameters.authorizationId, requestParameters.userId, requestParameters.userSecret, options);
564
- return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
565
- });
566
- },
567
- /**
568
- * Manually force the specified connection to become disabled. This should only be used for testing a reconnect flow, and never used on production connections. Will trigger a disconnect as if it happened naturally, and send a [`CONNECTION_BROKEN` webhook](/docs/webhooks#webhooks-connection_broken) for the connection. This endpoint is available on test keys. If you would like it enabled on production keys as well, please contact support as it is disabled by default.
569
- * @summary Force disable connection
570
- * @param {ConnectionsApiDisableBrokerageAuthorizationRequest} requestParameters Request parameters.
571
- * @param {*} [options] Override http request option.
572
- * @throws {RequiredError}
573
- */
574
- disableBrokerageAuthorization(requestParameters, options) {
575
- return __awaiter(this, void 0, void 0, function* () {
576
- const localVarAxiosArgs = yield localVarAxiosParamCreator.disableBrokerageAuthorization(requestParameters.authorizationId, requestParameters.userId, requestParameters.userSecret, options);
577
- return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
578
- });
579
- },
580
- /**
581
- * Returns all brokerage accounts that belong to the specified connection for the authenticated user. On Pay as you Go / Real-time, this endpoint refreshes each account\'s opening date, funding date, and total value live from the brokerage on each call. On Pay as you Go / Daily, this endpoint returns Daily data. Daily data is cached and refreshed once a day. Exact refresh timing may vary by brokerage. To force a refresh, use the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization). Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see whether your plan includes real-time data.
582
- * @summary List accounts for a connection
583
- * @param {ConnectionsApiListBrokerageAuthorizationAccountsRequest} requestParameters Request parameters.
584
- * @param {*} [options] Override http request option.
585
- * @throws {RequiredError}
586
- */
587
- listBrokerageAuthorizationAccounts(requestParameters, options) {
588
- return __awaiter(this, void 0, void 0, function* () {
589
- const localVarAxiosArgs = yield localVarAxiosParamCreator.listBrokerageAuthorizationAccounts(requestParameters.authorizationId, requestParameters.userId, requestParameters.userSecret, options);
590
- return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
591
- });
592
- },
593
- /**
594
- * Returns a list of all connections for the specified user. Note that `Connection` and `Brokerage Authorization` are interchangeable, but the term `Connection` is preferred and used in the doc for consistency. A connection is usually tied to a single login at a brokerage. A single connection can contain multiple brokerage accounts. SnapTrade performs de-duping on connections for a given user. If the user has an existing connection with the brokerage, when connecting the brokerage with the same credentials, SnapTrade will return the existing connection instead of creating a new one.
595
- * @summary List all connections
596
- * @param {ConnectionsApiListBrokerageAuthorizationsRequest} requestParameters Request parameters.
597
- * @param {*} [options] Override http request option.
598
- * @throws {RequiredError}
599
- */
600
- listBrokerageAuthorizations(requestParameters, options) {
601
- return __awaiter(this, void 0, void 0, function* () {
602
- const localVarAxiosArgs = yield localVarAxiosParamCreator.listBrokerageAuthorizations(requestParameters.userId, requestParameters.userSecret, options);
603
- return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
604
- });
605
- },
606
- /**
607
- * Trigger a holdings update for all accounts under this connection. Updates will be queued asynchronously. [`ACCOUNT_HOLDINGS_UPDATED` webhook](/docs/webhooks#webhooks-account_holdings_updated) will be sent once the sync completes for each account under the connection. This endpoint will also trigger a transaction sync for the past day if one has not yet occurred. **Because of the cost of refreshing a connection, each call to this endpoint incurs an additional charge. You can find the exact cost for your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing)** **Please note this endpoint is disabled for Pay as you Go / Real-time plans. Pay as you Go / Real-time plans do not benefit from this feature since data is refreshed when calls are made**
608
- * @summary Refresh holdings for a connection
609
- * @param {ConnectionsApiRefreshBrokerageAuthorizationRequest} requestParameters Request parameters.
610
- * @param {*} [options] Override http request option.
611
- * @throws {RequiredError}
612
- */
613
- refreshBrokerageAuthorization(requestParameters, options) {
614
- return __awaiter(this, void 0, void 0, function* () {
615
- const localVarAxiosArgs = yield localVarAxiosParamCreator.refreshBrokerageAuthorization(requestParameters.authorizationId, requestParameters.userId, requestParameters.userSecret, options);
616
- return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
617
- });
618
- },
619
- /**
620
- * Deletes the SnapTrade connection specified by the ID. This will also remove the accounts and holdings data associated with the connection from SnapTrade. This action is irreversible. This endpoint is synchronous, a 204 response indicates that the data has been successfully deleted.
621
- * @summary Delete connection
622
- * @param {ConnectionsApiRemoveBrokerageAuthorizationRequest} requestParameters Request parameters.
623
- * @param {*} [options] Override http request option.
624
- * @throws {RequiredError}
625
- */
626
- removeBrokerageAuthorization(requestParameters, options) {
627
- return __awaiter(this, void 0, void 0, function* () {
628
- const localVarAxiosArgs = yield localVarAxiosParamCreator.removeBrokerageAuthorization(requestParameters.authorizationId, requestParameters.userId, requestParameters.userSecret, options);
629
- return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
630
- });
631
- },
632
- /**
633
- * Returns a list of rate of return percents for a given connection.
634
- * @summary List connection rate of returns
635
- * @param {ConnectionsApiReturnRatesRequest} requestParameters Request parameters.
636
- * @param {*} [options] Override http request option.
637
- * @throws {RequiredError}
638
- */
639
- returnRates(requestParameters, options) {
640
- return __awaiter(this, void 0, void 0, function* () {
641
- const localVarAxiosArgs = yield localVarAxiosParamCreator.returnRates(requestParameters.userId, requestParameters.userSecret, requestParameters.authorizationId, requestParameters.timeframes, options);
642
- return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
643
- });
644
- },
645
- /**
646
- * Returns a list of session events associated with a user.
647
- * @summary Get all session events for a user
648
- * @param {ConnectionsApiSessionEventsRequest} requestParameters Request parameters.
649
- * @param {*} [options] Override http request option.
650
- * @throws {RequiredError}
651
- */
652
- sessionEvents(requestParameters, options) {
653
- return __awaiter(this, void 0, void 0, function* () {
654
- const localVarAxiosArgs = yield localVarAxiosParamCreator.sessionEvents(requestParameters.partnerClientId, requestParameters.userId, requestParameters.sessionId, options);
655
- return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
656
- });
657
- },
658
- };
659
- };
660
- exports.ConnectionsApiFp = ConnectionsApiFp;
661
- /**
662
- * ConnectionsApi - factory interface
663
- * @export
664
- */
665
- const ConnectionsApiFactory = function (configuration, basePath, axios) {
666
- const localVarFp = (0, exports.ConnectionsApiFp)(configuration);
667
- return {
668
- /**
669
- * Deletes the SnapTrade connection specified by the ID. This will also remove the accounts and holdings data associated with the connection from SnapTrade. This action is irreversible. This endpoint is asynchronous, a 200 response indicates that a task has been queued to delete the connection. Listen for the [`CONNECTION_DELETED` webhook](https://docs.snaptrade.com/docs/webhooks#webhooks-connection_deleted) webhook to know when the deletion has been completed and the data has been removed.
670
- * @summary Delete connection
671
- * @param {ConnectionsApiDeleteConnectionRequest} requestParameters Request parameters.
672
- * @param {*} [options] Override http request option.
673
- * @throws {RequiredError}
674
- */
675
- deleteConnection(requestParameters, options) {
676
- return localVarFp.deleteConnection(requestParameters, options).then((request) => request(axios, basePath));
677
- },
678
- /**
679
- * Returns a single connection for the specified ID.
680
- * @summary Get connection detail
681
- * @param {ConnectionsApiDetailBrokerageAuthorizationRequest} requestParameters Request parameters.
682
- * @param {*} [options] Override http request option.
683
- * @throws {RequiredError}
684
- */
685
- detailBrokerageAuthorization(requestParameters, options) {
686
- return localVarFp.detailBrokerageAuthorization(requestParameters, options).then((request) => request(axios, basePath));
687
- },
688
- /**
689
- * Manually force the specified connection to become disabled. This should only be used for testing a reconnect flow, and never used on production connections. Will trigger a disconnect as if it happened naturally, and send a [`CONNECTION_BROKEN` webhook](/docs/webhooks#webhooks-connection_broken) for the connection. This endpoint is available on test keys. If you would like it enabled on production keys as well, please contact support as it is disabled by default.
690
- * @summary Force disable connection
691
- * @param {ConnectionsApiDisableBrokerageAuthorizationRequest} requestParameters Request parameters.
692
- * @param {*} [options] Override http request option.
693
- * @throws {RequiredError}
694
- */
695
- disableBrokerageAuthorization(requestParameters, options) {
696
- return localVarFp.disableBrokerageAuthorization(requestParameters, options).then((request) => request(axios, basePath));
697
- },
698
- /**
699
- * Returns all brokerage accounts that belong to the specified connection for the authenticated user. On Pay as you Go / Real-time, this endpoint refreshes each account\'s opening date, funding date, and total value live from the brokerage on each call. On Pay as you Go / Daily, this endpoint returns Daily data. Daily data is cached and refreshed once a day. Exact refresh timing may vary by brokerage. To force a refresh, use the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization). Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see whether your plan includes real-time data.
700
- * @summary List accounts for a connection
701
- * @param {ConnectionsApiListBrokerageAuthorizationAccountsRequest} requestParameters Request parameters.
702
- * @param {*} [options] Override http request option.
703
- * @throws {RequiredError}
704
- */
705
- listBrokerageAuthorizationAccounts(requestParameters, options) {
706
- return localVarFp.listBrokerageAuthorizationAccounts(requestParameters, options).then((request) => request(axios, basePath));
707
- },
708
- /**
709
- * Returns a list of all connections for the specified user. Note that `Connection` and `Brokerage Authorization` are interchangeable, but the term `Connection` is preferred and used in the doc for consistency. A connection is usually tied to a single login at a brokerage. A single connection can contain multiple brokerage accounts. SnapTrade performs de-duping on connections for a given user. If the user has an existing connection with the brokerage, when connecting the brokerage with the same credentials, SnapTrade will return the existing connection instead of creating a new one.
710
- * @summary List all connections
711
- * @param {ConnectionsApiListBrokerageAuthorizationsRequest} requestParameters Request parameters.
712
- * @param {*} [options] Override http request option.
713
- * @throws {RequiredError}
714
- */
715
- listBrokerageAuthorizations(requestParameters, options) {
716
- return localVarFp.listBrokerageAuthorizations(requestParameters, options).then((request) => request(axios, basePath));
717
- },
718
- /**
719
- * Trigger a holdings update for all accounts under this connection. Updates will be queued asynchronously. [`ACCOUNT_HOLDINGS_UPDATED` webhook](/docs/webhooks#webhooks-account_holdings_updated) will be sent once the sync completes for each account under the connection. This endpoint will also trigger a transaction sync for the past day if one has not yet occurred. **Because of the cost of refreshing a connection, each call to this endpoint incurs an additional charge. You can find the exact cost for your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing)** **Please note this endpoint is disabled for Pay as you Go / Real-time plans. Pay as you Go / Real-time plans do not benefit from this feature since data is refreshed when calls are made**
720
- * @summary Refresh holdings for a connection
721
- * @param {ConnectionsApiRefreshBrokerageAuthorizationRequest} requestParameters Request parameters.
722
- * @param {*} [options] Override http request option.
723
- * @throws {RequiredError}
724
- */
725
- refreshBrokerageAuthorization(requestParameters, options) {
726
- return localVarFp.refreshBrokerageAuthorization(requestParameters, options).then((request) => request(axios, basePath));
727
- },
728
- /**
729
- * Deletes the SnapTrade connection specified by the ID. This will also remove the accounts and holdings data associated with the connection from SnapTrade. This action is irreversible. This endpoint is synchronous, a 204 response indicates that the data has been successfully deleted.
730
- * @summary Delete connection
731
- * @param {ConnectionsApiRemoveBrokerageAuthorizationRequest} requestParameters Request parameters.
732
- * @param {*} [options] Override http request option.
733
- * @throws {RequiredError}
734
- */
735
- removeBrokerageAuthorization(requestParameters, options) {
736
- return localVarFp.removeBrokerageAuthorization(requestParameters, options).then((request) => request(axios, basePath));
737
- },
738
- /**
739
- * Returns a list of rate of return percents for a given connection.
740
- * @summary List connection rate of returns
741
- * @param {ConnectionsApiReturnRatesRequest} requestParameters Request parameters.
742
- * @param {*} [options] Override http request option.
743
- * @throws {RequiredError}
744
- */
745
- returnRates(requestParameters, options) {
746
- return localVarFp.returnRates(requestParameters, options).then((request) => request(axios, basePath));
747
- },
748
- /**
749
- * Returns a list of session events associated with a user.
750
- * @summary Get all session events for a user
751
- * @param {ConnectionsApiSessionEventsRequest} requestParameters Request parameters.
752
- * @param {*} [options] Override http request option.
753
- * @throws {RequiredError}
754
- */
755
- sessionEvents(requestParameters, options) {
756
- return localVarFp.sessionEvents(requestParameters, options).then((request) => request(axios, basePath));
757
- },
758
- };
759
- };
760
- exports.ConnectionsApiFactory = ConnectionsApiFactory;
761
- /**
762
- * ConnectionsApiGenerated - object-oriented interface
763
- * @export
764
- * @class ConnectionsApiGenerated
765
- * @extends {BaseAPI}
766
- */
767
- class ConnectionsApiGenerated extends base_1.BaseAPI {
768
- /**
769
- * Deletes the SnapTrade connection specified by the ID. This will also remove the accounts and holdings data associated with the connection from SnapTrade. This action is irreversible. This endpoint is asynchronous, a 200 response indicates that a task has been queued to delete the connection. Listen for the [`CONNECTION_DELETED` webhook](https://docs.snaptrade.com/docs/webhooks#webhooks-connection_deleted) webhook to know when the deletion has been completed and the data has been removed.
770
- * @summary Delete connection
771
- * @param {ConnectionsApiDeleteConnectionRequest} requestParameters Request parameters.
772
- * @param {*} [options] Override http request option.
773
- * @throws {RequiredError}
774
- * @memberof ConnectionsApiGenerated
775
- */
776
- deleteConnection(requestParameters, options) {
777
- return (0, exports.ConnectionsApiFp)(this.configuration).deleteConnection(requestParameters, options).then((request) => request(this.axios, this.basePath));
778
- }
779
- /**
780
- * Returns a single connection for the specified ID.
781
- * @summary Get connection detail
782
- * @param {ConnectionsApiDetailBrokerageAuthorizationRequest} requestParameters Request parameters.
783
- * @param {*} [options] Override http request option.
784
- * @throws {RequiredError}
785
- * @memberof ConnectionsApiGenerated
786
- */
787
- detailBrokerageAuthorization(requestParameters, options) {
788
- return (0, exports.ConnectionsApiFp)(this.configuration).detailBrokerageAuthorization(requestParameters, options).then((request) => request(this.axios, this.basePath));
789
- }
790
- /**
791
- * Manually force the specified connection to become disabled. This should only be used for testing a reconnect flow, and never used on production connections. Will trigger a disconnect as if it happened naturally, and send a [`CONNECTION_BROKEN` webhook](/docs/webhooks#webhooks-connection_broken) for the connection. This endpoint is available on test keys. If you would like it enabled on production keys as well, please contact support as it is disabled by default.
792
- * @summary Force disable connection
793
- * @param {ConnectionsApiDisableBrokerageAuthorizationRequest} requestParameters Request parameters.
794
- * @param {*} [options] Override http request option.
795
- * @throws {RequiredError}
796
- * @memberof ConnectionsApiGenerated
797
- */
798
- disableBrokerageAuthorization(requestParameters, options) {
799
- return (0, exports.ConnectionsApiFp)(this.configuration).disableBrokerageAuthorization(requestParameters, options).then((request) => request(this.axios, this.basePath));
800
- }
801
- /**
802
- * Returns all brokerage accounts that belong to the specified connection for the authenticated user. On Pay as you Go / Real-time, this endpoint refreshes each account\'s opening date, funding date, and total value live from the brokerage on each call. On Pay as you Go / Daily, this endpoint returns Daily data. Daily data is cached and refreshed once a day. Exact refresh timing may vary by brokerage. To force a refresh, use the [manual refresh endpoint](/reference/Connections/Connections_refreshBrokerageAuthorization). Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see whether your plan includes real-time data.
803
- * @summary List accounts for a connection
804
- * @param {ConnectionsApiListBrokerageAuthorizationAccountsRequest} requestParameters Request parameters.
805
- * @param {*} [options] Override http request option.
806
- * @throws {RequiredError}
807
- * @memberof ConnectionsApiGenerated
808
- */
809
- listBrokerageAuthorizationAccounts(requestParameters, options) {
810
- return (0, exports.ConnectionsApiFp)(this.configuration).listBrokerageAuthorizationAccounts(requestParameters, options).then((request) => request(this.axios, this.basePath));
811
- }
812
- /**
813
- * Returns a list of all connections for the specified user. Note that `Connection` and `Brokerage Authorization` are interchangeable, but the term `Connection` is preferred and used in the doc for consistency. A connection is usually tied to a single login at a brokerage. A single connection can contain multiple brokerage accounts. SnapTrade performs de-duping on connections for a given user. If the user has an existing connection with the brokerage, when connecting the brokerage with the same credentials, SnapTrade will return the existing connection instead of creating a new one.
814
- * @summary List all connections
815
- * @param {ConnectionsApiListBrokerageAuthorizationsRequest} requestParameters Request parameters.
816
- * @param {*} [options] Override http request option.
817
- * @throws {RequiredError}
818
- * @memberof ConnectionsApiGenerated
819
- */
820
- listBrokerageAuthorizations(requestParameters, options) {
821
- return (0, exports.ConnectionsApiFp)(this.configuration).listBrokerageAuthorizations(requestParameters, options).then((request) => request(this.axios, this.basePath));
822
- }
823
- /**
824
- * Trigger a holdings update for all accounts under this connection. Updates will be queued asynchronously. [`ACCOUNT_HOLDINGS_UPDATED` webhook](/docs/webhooks#webhooks-account_holdings_updated) will be sent once the sync completes for each account under the connection. This endpoint will also trigger a transaction sync for the past day if one has not yet occurred. **Because of the cost of refreshing a connection, each call to this endpoint incurs an additional charge. You can find the exact cost for your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing)** **Please note this endpoint is disabled for Pay as you Go / Real-time plans. Pay as you Go / Real-time plans do not benefit from this feature since data is refreshed when calls are made**
825
- * @summary Refresh holdings for a connection
826
- * @param {ConnectionsApiRefreshBrokerageAuthorizationRequest} requestParameters Request parameters.
827
- * @param {*} [options] Override http request option.
828
- * @throws {RequiredError}
829
- * @memberof ConnectionsApiGenerated
830
- */
831
- refreshBrokerageAuthorization(requestParameters, options) {
832
- return (0, exports.ConnectionsApiFp)(this.configuration).refreshBrokerageAuthorization(requestParameters, options).then((request) => request(this.axios, this.basePath));
833
- }
834
- /**
835
- * Deletes the SnapTrade connection specified by the ID. This will also remove the accounts and holdings data associated with the connection from SnapTrade. This action is irreversible. This endpoint is synchronous, a 204 response indicates that the data has been successfully deleted.
836
- * @summary Delete connection
837
- * @param {ConnectionsApiRemoveBrokerageAuthorizationRequest} requestParameters Request parameters.
838
- * @param {*} [options] Override http request option.
839
- * @throws {RequiredError}
840
- * @memberof ConnectionsApiGenerated
841
- */
842
- removeBrokerageAuthorization(requestParameters, options) {
843
- return (0, exports.ConnectionsApiFp)(this.configuration).removeBrokerageAuthorization(requestParameters, options).then((request) => request(this.axios, this.basePath));
844
- }
845
- /**
846
- * Returns a list of rate of return percents for a given connection.
847
- * @summary List connection rate of returns
848
- * @param {ConnectionsApiReturnRatesRequest} requestParameters Request parameters.
849
- * @param {*} [options] Override http request option.
850
- * @throws {RequiredError}
851
- * @memberof ConnectionsApiGenerated
852
- */
853
- returnRates(requestParameters, options) {
854
- return (0, exports.ConnectionsApiFp)(this.configuration).returnRates(requestParameters, options).then((request) => request(this.axios, this.basePath));
855
- }
856
- /**
857
- * Returns a list of session events associated with a user.
858
- * @summary Get all session events for a user
859
- * @param {ConnectionsApiSessionEventsRequest} requestParameters Request parameters.
860
- * @param {*} [options] Override http request option.
861
- * @throws {RequiredError}
862
- * @memberof ConnectionsApiGenerated
863
- */
864
- sessionEvents(requestParameters, options) {
865
- return (0, exports.ConnectionsApiFp)(this.configuration).sessionEvents(requestParameters, options).then((request) => request(this.axios, this.basePath));
866
- }
867
- }
868
- exports.ConnectionsApiGenerated = ConnectionsApiGenerated;