snaptrade-typescript-sdk 2.4.0 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (402) hide show
  1. package/.konfig/generate-id.txt +1 -1
  2. package/.konfigignore +3 -1
  3. package/README.md +107 -23
  4. package/api/account-information-api.ts +1075 -0
  5. package/api/api-disclaimer-api.ts +190 -0
  6. package/api/api-status-api.ts +128 -0
  7. package/api/authentication-api.ts +591 -0
  8. package/api/connections-api.ts +425 -0
  9. package/api/error-logs-api.ts +175 -0
  10. package/api/options-api.ts +758 -0
  11. package/api/portfolio-management-api.ts +3402 -0
  12. package/api/reference-data-api.ts +1076 -0
  13. package/api/trading-api.ts +1339 -0
  14. package/api/transactions-and-reporting-api.ts +391 -0
  15. package/api.ts +12 -11530
  16. package/base.ts +1 -2
  17. package/client.ts +55 -0
  18. package/common.ts +16 -54
  19. package/configuration.ts +33 -10
  20. package/dist/api/account-information-api.d.ts +525 -0
  21. package/dist/api/account-information-api.js +1049 -0
  22. package/dist/api/api-disclaimer-api.d.ts +102 -0
  23. package/dist/api/api-disclaimer-api.js +245 -0
  24. package/dist/api/api-status-api.d.ts +70 -0
  25. package/dist/api/api-status-api.js +203 -0
  26. package/dist/api/authentication-api.d.ts +280 -0
  27. package/dist/api/authentication-api.js +659 -0
  28. package/dist/api/connections-api.d.ts +214 -0
  29. package/dist/api/connections-api.js +470 -0
  30. package/dist/api/error-logs-api.d.ts +94 -0
  31. package/dist/api/error-logs-api.js +240 -0
  32. package/dist/api/options-api.d.ts +381 -0
  33. package/dist/api/options-api.js +728 -0
  34. package/dist/api/portfolio-management-api.d.ts +1624 -0
  35. package/dist/api/portfolio-management-api.js +3574 -0
  36. package/dist/api/reference-data-api.d.ts +481 -0
  37. package/dist/api/reference-data-api.js +1244 -0
  38. package/dist/api/trading-api.d.ts +662 -0
  39. package/dist/api/trading-api.js +1276 -0
  40. package/dist/api/transactions-and-reporting-api.d.ts +204 -0
  41. package/dist/api/transactions-and-reporting-api.js +387 -0
  42. package/dist/api.d.ts +12 -7363
  43. package/dist/api.js +24 -9175
  44. package/dist/base.d.ts +1 -1
  45. package/dist/base.js +1 -2
  46. package/dist/client.d.ts +27 -0
  47. package/dist/client.js +34 -0
  48. package/dist/common.d.ts +1 -6
  49. package/dist/common.js +26 -81
  50. package/dist/configuration.d.ts +21 -6
  51. package/dist/configuration.js +13 -8
  52. package/dist/index.d.ts +3 -1
  53. package/dist/index.js +3 -2
  54. package/dist/index.test.js +84 -14
  55. package/dist/jest.config.js +0 -1
  56. package/dist/models/account-holdings.d.ts +47 -0
  57. package/dist/models/account-holdings.js +15 -0
  58. package/dist/models/account-order-record-status.d.ts +39 -0
  59. package/dist/models/account-order-record-status.js +43 -0
  60. package/dist/models/account-order-record.d.ts +126 -0
  61. package/dist/models/account-order-record.js +15 -0
  62. package/dist/models/account-simple.d.ts +37 -0
  63. package/dist/models/account-simple.js +15 -0
  64. package/dist/models/account.d.ts +76 -0
  65. package/dist/models/account.js +15 -0
  66. package/dist/models/action.d.ts +21 -0
  67. package/dist/models/action.js +25 -0
  68. package/dist/models/apidisclaimer-accept-request.d.ts +24 -0
  69. package/dist/models/apidisclaimer-accept-request.js +15 -0
  70. package/dist/models/authentication-login-snap-trade-user200-response.d.ts +18 -0
  71. package/dist/models/authentication-login-snap-trade-user200-response.js +15 -0
  72. package/dist/models/balance.d.ts +32 -0
  73. package/dist/models/balance.js +15 -0
  74. package/dist/models/brokerage-authorization-type-read-only-brokerage.d.ts +37 -0
  75. package/dist/models/brokerage-authorization-type-read-only-brokerage.js +15 -0
  76. package/dist/models/brokerage-authorization-type-read-only.d.ts +56 -0
  77. package/dist/models/brokerage-authorization-type-read-only.js +26 -0
  78. package/dist/models/brokerage-authorization-type.d.ts +30 -0
  79. package/dist/models/brokerage-authorization-type.js +20 -0
  80. package/dist/models/brokerage-authorization.d.ts +76 -0
  81. package/dist/models/brokerage-authorization.js +15 -0
  82. package/dist/models/brokerage-symbol.d.ts +51 -0
  83. package/dist/models/brokerage-symbol.js +15 -0
  84. package/dist/models/brokerage-type.d.ts +31 -0
  85. package/dist/models/brokerage-type.js +15 -0
  86. package/dist/models/brokerage.d.ts +128 -0
  87. package/dist/models/brokerage.js +15 -0
  88. package/dist/models/calculated-trade.d.ts +32 -0
  89. package/dist/models/calculated-trade.js +15 -0
  90. package/dist/models/cash-restriction.d.ts +54 -0
  91. package/dist/models/cash-restriction.js +20 -0
  92. package/dist/models/currency.d.ts +37 -0
  93. package/dist/models/currency.js +15 -0
  94. package/dist/models/delete-user-response.d.ts +31 -0
  95. package/dist/models/delete-user-response.js +15 -0
  96. package/dist/models/dividend-at-date.d.ts +37 -0
  97. package/dist/models/dividend-at-date.js +15 -0
  98. package/dist/models/encrypted-response-encrypted-message-data.d.ts +37 -0
  99. package/dist/models/encrypted-response-encrypted-message-data.js +15 -0
  100. package/dist/models/encrypted-response.d.ts +31 -0
  101. package/dist/models/encrypted-response.js +15 -0
  102. package/dist/models/exchange-rate-pairs.d.ts +38 -0
  103. package/dist/models/exchange-rate-pairs.js +15 -0
  104. package/dist/models/exchange.d.ts +67 -0
  105. package/dist/models/exchange.js +15 -0
  106. package/dist/models/excluded-asset.d.ts +26 -0
  107. package/dist/models/excluded-asset.js +15 -0
  108. package/dist/models/index.d.ts +102 -0
  109. package/dist/models/index.js +118 -0
  110. package/dist/models/jwt.d.ts +25 -0
  111. package/dist/models/jwt.js +15 -0
  112. package/dist/models/login-redirect-uri.d.ts +30 -0
  113. package/dist/models/login-redirect-uri.js +15 -0
  114. package/dist/models/manual-trade-and-impact.d.ts +39 -0
  115. package/dist/models/manual-trade-and-impact.js +15 -0
  116. package/dist/models/manual-trade-balance.d.ts +39 -0
  117. package/dist/models/manual-trade-balance.js +15 -0
  118. package/dist/models/manual-trade-form.d.ts +69 -0
  119. package/dist/models/manual-trade-form.js +15 -0
  120. package/dist/models/manual-trade-symbol.d.ts +56 -0
  121. package/dist/models/manual-trade-symbol.js +15 -0
  122. package/dist/models/manual-trade.d.ts +72 -0
  123. package/dist/models/manual-trade.js +15 -0
  124. package/dist/models/model-asset-class-details.d.ts +32 -0
  125. package/dist/models/model-asset-class-details.js +15 -0
  126. package/dist/models/model-asset-class-target.d.ts +26 -0
  127. package/dist/models/model-asset-class-target.js +15 -0
  128. package/dist/models/model-asset-class.d.ts +31 -0
  129. package/dist/models/model-asset-class.js +15 -0
  130. package/dist/models/model-portfolio-asset-class.d.ts +32 -0
  131. package/dist/models/model-portfolio-asset-class.js +15 -0
  132. package/dist/models/model-portfolio-details.d.ts +39 -0
  133. package/dist/models/model-portfolio-details.js +15 -0
  134. package/dist/models/model-portfolio-security.d.ts +32 -0
  135. package/dist/models/model-portfolio-security.js +15 -0
  136. package/dist/models/model-portfolio.d.ts +43 -0
  137. package/dist/models/model-portfolio.js +21 -0
  138. package/dist/models/model400-failed-request-response.d.ts +31 -0
  139. package/dist/models/model400-failed-request-response.js +15 -0
  140. package/dist/models/model401-failed-request-response.d.ts +31 -0
  141. package/dist/models/model401-failed-request-response.js +15 -0
  142. package/dist/models/model403-failed-request-response.d.ts +31 -0
  143. package/dist/models/model403-failed-request-response.js +15 -0
  144. package/dist/models/model404-failed-request-response.d.ts +31 -0
  145. package/dist/models/model404-failed-request-response.js +15 -0
  146. package/dist/models/monthly-dividends.d.ts +32 -0
  147. package/dist/models/monthly-dividends.js +15 -0
  148. package/dist/models/net-contributions.d.ts +37 -0
  149. package/dist/models/net-contributions.js +15 -0
  150. package/dist/models/net-dividend.d.ts +38 -0
  151. package/dist/models/net-dividend.js +15 -0
  152. package/dist/models/option-chain-inner-chain-per-root-inner-chain-per-strike-price-inner.d.ts +37 -0
  153. package/dist/models/option-chain-inner-chain-per-root-inner-chain-per-strike-price-inner.js +15 -0
  154. package/dist/models/option-chain-inner-chain-per-root-inner.d.ts +38 -0
  155. package/dist/models/option-chain-inner-chain-per-root-inner.js +15 -0
  156. package/dist/models/option-chain-inner.d.ts +50 -0
  157. package/dist/models/option-chain-inner.js +15 -0
  158. package/dist/models/option-leg.d.ts +44 -0
  159. package/dist/models/option-leg.js +22 -0
  160. package/dist/models/option-strategy-legs-inner.d.ts +42 -0
  161. package/dist/models/option-strategy-legs-inner.js +15 -0
  162. package/dist/models/option-strategy.d.ts +51 -0
  163. package/dist/models/option-strategy.js +15 -0
  164. package/dist/models/options-get-option-strategy-request.d.ts +41 -0
  165. package/dist/models/options-get-option-strategy-request.js +19 -0
  166. package/dist/models/options-holdings.d.ts +57 -0
  167. package/dist/models/options-holdings.js +15 -0
  168. package/dist/models/options-place-option-strategy-request.d.ts +48 -0
  169. package/dist/models/options-place-option-strategy-request.js +26 -0
  170. package/dist/models/options-position.d.ts +63 -0
  171. package/dist/models/options-position.js +15 -0
  172. package/dist/models/options-symbol.d.ts +86 -0
  173. package/dist/models/options-symbol.js +15 -0
  174. package/dist/models/order-type.d.ts +23 -0
  175. package/dist/models/order-type.js +27 -0
  176. package/dist/models/partner-data.d.ts +92 -0
  177. package/dist/models/partner-data.js +15 -0
  178. package/dist/models/past-value.d.ts +37 -0
  179. package/dist/models/past-value.js +15 -0
  180. package/dist/models/performance-custom.d.ts +138 -0
  181. package/dist/models/performance-custom.js +15 -0
  182. package/dist/models/portfolio-group-info.d.ts +93 -0
  183. package/dist/models/portfolio-group-info.js +15 -0
  184. package/dist/models/portfolio-group-position.d.ts +38 -0
  185. package/dist/models/portfolio-group-position.js +15 -0
  186. package/dist/models/portfolio-group-settings.d.ts +50 -0
  187. package/dist/models/portfolio-group-settings.js +15 -0
  188. package/dist/models/portfolio-group.d.ts +31 -0
  189. package/dist/models/portfolio-group.js +15 -0
  190. package/dist/models/position-symbol.d.ts +56 -0
  191. package/dist/models/position-symbol.js +15 -0
  192. package/dist/models/position.d.ts +56 -0
  193. package/dist/models/position.js +15 -0
  194. package/dist/models/redirect-tokenand-pin.d.ts +31 -0
  195. package/dist/models/redirect-tokenand-pin.js +15 -0
  196. package/dist/models/security-type.d.ts +43 -0
  197. package/dist/models/security-type.js +15 -0
  198. package/dist/models/snap-trade-apidisclaimer-accept-status.d.ts +31 -0
  199. package/dist/models/snap-trade-apidisclaimer-accept-status.js +15 -0
  200. package/dist/models/snap-trade-holdings-account.d.ts +64 -0
  201. package/dist/models/snap-trade-holdings-account.js +15 -0
  202. package/dist/models/snap-trade-holdings-total-value.d.ts +31 -0
  203. package/dist/models/snap-trade-holdings-total-value.js +15 -0
  204. package/dist/models/snap-trade-login-user-request-body.d.ts +53 -0
  205. package/dist/models/snap-trade-login-user-request-body.js +20 -0
  206. package/dist/models/snap-trade-register-user-request-body.d.ts +30 -0
  207. package/dist/models/snap-trade-register-user-request-body.js +15 -0
  208. package/dist/models/status.d.ts +37 -0
  209. package/dist/models/status.js +15 -0
  210. package/dist/models/strategy-impact-legs-inner.d.ts +61 -0
  211. package/dist/models/strategy-impact-legs-inner.js +15 -0
  212. package/dist/models/strategy-impact.d.ts +86 -0
  213. package/dist/models/strategy-impact.js +15 -0
  214. package/dist/models/strategy-order-place-orders-inner-legs-inner.d.ts +61 -0
  215. package/dist/models/strategy-order-place-orders-inner-legs-inner.js +15 -0
  216. package/dist/models/strategy-order-place-orders-inner.d.ts +278 -0
  217. package/dist/models/strategy-order-place-orders-inner.js +15 -0
  218. package/dist/models/strategy-order-place.d.ts +32 -0
  219. package/dist/models/strategy-order-place.js +15 -0
  220. package/dist/models/strategy-order-record.d.ts +120 -0
  221. package/dist/models/strategy-order-record.js +47 -0
  222. package/dist/models/strategy-quotes-greek.d.ts +49 -0
  223. package/dist/models/strategy-quotes-greek.js +15 -0
  224. package/dist/models/strategy-quotes.d.ts +57 -0
  225. package/dist/models/strategy-quotes.js +15 -0
  226. package/dist/models/sub-period-return-rate.d.ts +37 -0
  227. package/dist/models/sub-period-return-rate.js +15 -0
  228. package/dist/models/symbol-query.d.ts +24 -0
  229. package/dist/models/symbol-query.js +15 -0
  230. package/dist/models/symbol.d.ts +51 -0
  231. package/dist/models/symbol.js +15 -0
  232. package/dist/models/symbols-quotes.d.ts +56 -0
  233. package/dist/models/symbols-quotes.js +15 -0
  234. package/dist/models/target-asset.d.ts +55 -0
  235. package/dist/models/target-asset.js +15 -0
  236. package/dist/models/time-in-force.d.ts +22 -0
  237. package/dist/models/time-in-force.js +26 -0
  238. package/dist/models/trade-execution-status.d.ts +91 -0
  239. package/dist/models/trade-execution-status.js +27 -0
  240. package/dist/models/trade-impact.d.ts +51 -0
  241. package/dist/models/trade-impact.js +15 -0
  242. package/dist/models/trade.d.ts +74 -0
  243. package/dist/models/trade.js +20 -0
  244. package/dist/models/trading-place-ocoorder-request.d.ts +30 -0
  245. package/dist/models/trading-place-ocoorder-request.js +15 -0
  246. package/dist/models/underlying-symbol.d.ts +64 -0
  247. package/dist/models/underlying-symbol.js +15 -0
  248. package/dist/models/universal-activity.d.ts +134 -0
  249. package/dist/models/universal-activity.js +36 -0
  250. package/dist/models/universal-symbol-ticker.d.ts +70 -0
  251. package/dist/models/universal-symbol-ticker.js +15 -0
  252. package/dist/models/universal-symbol.d.ts +69 -0
  253. package/dist/models/universal-symbol.js +15 -0
  254. package/dist/models/user-error-log.d.ts +55 -0
  255. package/dist/models/user-error-log.js +15 -0
  256. package/dist/models/user-idand-secret.d.ts +31 -0
  257. package/dist/models/user-idand-secret.js +15 -0
  258. package/dist/models/user-settings.d.ts +80 -0
  259. package/dist/models/user-settings.js +15 -0
  260. package/dist/models/usexchange.d.ts +73 -0
  261. package/dist/models/usexchange.js +15 -0
  262. package/dist/pagination/page.d.ts +31 -0
  263. package/dist/pagination/page.js +58 -0
  264. package/dist/pagination/pageable.d.ts +53 -0
  265. package/dist/pagination/pageable.js +128 -0
  266. package/dist/pagination/paginate.d.ts +17 -0
  267. package/dist/pagination/paginate.js +78 -0
  268. package/dist/requestAfterHook.d.ts +8 -0
  269. package/dist/requestAfterHook.js +45 -0
  270. package/dist/requestBeforeHook.d.ts +8 -0
  271. package/dist/requestBeforeHook.js +8 -0
  272. package/docs/AccountInformationApi.md +485 -0
  273. package/docs/ApiDisclaimerApi.md +69 -0
  274. package/docs/ApiStatusApi.md +60 -0
  275. package/docs/AuthenticationApi.md +307 -0
  276. package/docs/ConnectionsApi.md +186 -0
  277. package/docs/ErrorLogsApi.md +65 -0
  278. package/docs/OptionsApi.md +321 -0
  279. package/docs/PortfolioManagementApi.md +1866 -0
  280. package/docs/ReferenceDataApi.md +597 -0
  281. package/docs/TradingApi.md +629 -0
  282. package/docs/TransactionsAndReportingApi.md +141 -0
  283. package/index.test.ts +62 -13
  284. package/index.ts +3 -3
  285. package/models/account-holdings.ts +61 -0
  286. package/models/account-order-record-status.ts +48 -0
  287. package/models/account-order-record.ts +142 -0
  288. package/models/account-simple.ts +43 -0
  289. package/models/account.ts +82 -0
  290. package/models/action.ts +30 -0
  291. package/models/apidisclaimer-accept-request.ts +29 -0
  292. package/models/authentication-login-snap-trade-user200-response.ts +31 -0
  293. package/models/balance.ts +40 -0
  294. package/models/brokerage-authorization-type-read-only-brokerage.ts +43 -0
  295. package/models/brokerage-authorization-type-read-only.ts +68 -0
  296. package/models/brokerage-authorization-type.ts +39 -0
  297. package/models/brokerage-authorization.ts +82 -0
  298. package/models/brokerage-symbol.ts +61 -0
  299. package/models/brokerage-type.ts +37 -0
  300. package/models/brokerage.ts +136 -0
  301. package/models/calculated-trade.ts +40 -0
  302. package/models/cash-restriction.ts +63 -0
  303. package/models/currency.ts +43 -0
  304. package/models/delete-user-response.ts +37 -0
  305. package/models/dividend-at-date.ts +43 -0
  306. package/models/encrypted-response-encrypted-message-data.ts +43 -0
  307. package/models/encrypted-response.ts +38 -0
  308. package/models/exchange-rate-pairs.ts +46 -0
  309. package/models/exchange.ts +73 -0
  310. package/models/excluded-asset.ts +34 -0
  311. package/models/index.ts +102 -0
  312. package/models/jwt.ts +31 -0
  313. package/models/login-redirect-uri.ts +35 -0
  314. package/models/manual-trade-and-impact.ts +49 -0
  315. package/models/manual-trade-balance.ts +49 -0
  316. package/models/manual-trade-form.ts +80 -0
  317. package/models/manual-trade-symbol.ts +64 -0
  318. package/models/manual-trade.ts +88 -0
  319. package/models/model-asset-class-details.ts +41 -0
  320. package/models/model-asset-class-target.ts +34 -0
  321. package/models/model-asset-class.ts +37 -0
  322. package/models/model-portfolio-asset-class.ts +40 -0
  323. package/models/model-portfolio-details.ts +50 -0
  324. package/models/model-portfolio-security.ts +40 -0
  325. package/models/model-portfolio.ts +52 -0
  326. package/models/model400-failed-request-response.ts +37 -0
  327. package/models/model401-failed-request-response.ts +37 -0
  328. package/models/model403-failed-request-response.ts +37 -0
  329. package/models/model404-failed-request-response.ts +37 -0
  330. package/models/monthly-dividends.ts +40 -0
  331. package/models/net-contributions.ts +43 -0
  332. package/models/net-dividend.ts +46 -0
  333. package/models/option-chain-inner-chain-per-root-inner-chain-per-strike-price-inner.ts +43 -0
  334. package/models/option-chain-inner-chain-per-root-inner.ts +46 -0
  335. package/models/option-chain-inner.ts +58 -0
  336. package/models/option-leg.ts +53 -0
  337. package/models/option-strategy-legs-inner.ts +47 -0
  338. package/models/option-strategy.ts +61 -0
  339. package/models/options-get-option-strategy-request.ts +51 -0
  340. package/models/options-holdings.ts +67 -0
  341. package/models/options-place-option-strategy-request.ts +57 -0
  342. package/models/options-position.ts +73 -0
  343. package/models/options-symbol.ts +94 -0
  344. package/models/order-type.ts +32 -0
  345. package/models/partner-data.ts +100 -0
  346. package/models/past-value.ts +43 -0
  347. package/models/performance-custom.ts +154 -0
  348. package/models/portfolio-group-info.ts +115 -0
  349. package/models/portfolio-group-position.ts +46 -0
  350. package/models/portfolio-group-settings.ts +58 -0
  351. package/models/portfolio-group.ts +37 -0
  352. package/models/position-symbol.ts +64 -0
  353. package/models/position.ts +64 -0
  354. package/models/redirect-tokenand-pin.ts +37 -0
  355. package/models/security-type.ts +49 -0
  356. package/models/snap-trade-apidisclaimer-accept-status.ts +37 -0
  357. package/models/snap-trade-holdings-account.ts +70 -0
  358. package/models/snap-trade-holdings-total-value.ts +37 -0
  359. package/models/snap-trade-login-user-request-body.ts +61 -0
  360. package/models/snap-trade-register-user-request-body.ts +35 -0
  361. package/models/status.ts +43 -0
  362. package/models/strategy-impact-legs-inner.ts +67 -0
  363. package/models/strategy-impact.ts +94 -0
  364. package/models/strategy-order-place-orders-inner-legs-inner.ts +67 -0
  365. package/models/strategy-order-place-orders-inner.ts +286 -0
  366. package/models/strategy-order-place.ts +40 -0
  367. package/models/strategy-order-record.ts +133 -0
  368. package/models/strategy-quotes-greek.ts +55 -0
  369. package/models/strategy-quotes.ts +67 -0
  370. package/models/sub-period-return-rate.ts +43 -0
  371. package/models/symbol-query.ts +29 -0
  372. package/models/symbol.ts +61 -0
  373. package/models/symbols-quotes.ts +64 -0
  374. package/models/target-asset.ts +62 -0
  375. package/models/time-in-force.ts +31 -0
  376. package/models/trade-execution-status.ts +105 -0
  377. package/models/trade-impact.ts +61 -0
  378. package/models/trade.ts +88 -0
  379. package/models/trading-place-ocoorder-request.ts +35 -0
  380. package/models/underlying-symbol.ts +76 -0
  381. package/models/universal-activity.ts +151 -0
  382. package/models/universal-symbol-ticker.ts +82 -0
  383. package/models/universal-symbol.ts +80 -0
  384. package/models/user-error-log.ts +61 -0
  385. package/models/user-idand-secret.ts +37 -0
  386. package/models/user-settings.ts +88 -0
  387. package/models/usexchange.ts +79 -0
  388. package/package.json +1 -1
  389. package/pagination/page.ts +50 -0
  390. package/pagination/pageable.ts +107 -0
  391. package/pagination/paginate.ts +40 -0
  392. package/requestAfterHook.ts +53 -0
  393. package/requestBeforeHook.ts +14 -0
  394. package/tsconfig.json +0 -1
  395. package/dist/api.js.map +0 -1
  396. package/dist/base.js.map +0 -1
  397. package/dist/common.js.map +0 -1
  398. package/dist/configuration.js.map +0 -1
  399. package/dist/index.js.map +0 -1
  400. package/dist/index.test.js.map +0 -1
  401. package/dist/jest.config.js.map +0 -1
  402. package/git_push.sh +0 -57
@@ -0,0 +1,1276 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * SnapTrade
6
+ * Connect brokerage accounts to your app for live positions and trading
7
+ *
8
+ * The version of the OpenAPI document: 1.0.0
9
+ * Contact: api@snaptrade.com
10
+ *
11
+ * NOTE: This file is auto generated by Konfig (https://konfigthis.com).
12
+ * https://konfigthis.com
13
+ * Do not edit the class manually.
14
+ */
15
+ var __extends = (this && this.__extends) || (function () {
16
+ var extendStatics = function (d, b) {
17
+ extendStatics = Object.setPrototypeOf ||
18
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
19
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
20
+ return extendStatics(d, b);
21
+ };
22
+ return function (d, b) {
23
+ if (typeof b !== "function" && b !== null)
24
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
25
+ extendStatics(d, b);
26
+ function __() { this.constructor = d; }
27
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
28
+ };
29
+ })();
30
+ var __assign = (this && this.__assign) || function () {
31
+ __assign = Object.assign || function(t) {
32
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
33
+ s = arguments[i];
34
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
35
+ t[p] = s[p];
36
+ }
37
+ return t;
38
+ };
39
+ return __assign.apply(this, arguments);
40
+ };
41
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
42
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
43
+ return new (P || (P = Promise))(function (resolve, reject) {
44
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
45
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
46
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
47
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
48
+ });
49
+ };
50
+ var __generator = (this && this.__generator) || function (thisArg, body) {
51
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
52
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
53
+ function verb(n) { return function (v) { return step([n, v]); }; }
54
+ function step(op) {
55
+ if (f) throw new TypeError("Generator is already executing.");
56
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
57
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
58
+ if (y = 0, t) op = [op[0] & 2, t.value];
59
+ switch (op[0]) {
60
+ case 0: case 1: t = op; break;
61
+ case 4: _.label++; return { value: op[1], done: false };
62
+ case 5: _.label++; y = op[1]; op = [0]; continue;
63
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
64
+ default:
65
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
66
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
67
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
68
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
69
+ if (t[2]) _.ops.pop();
70
+ _.trys.pop(); continue;
71
+ }
72
+ op = body.call(thisArg, _);
73
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
74
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
75
+ }
76
+ };
77
+ Object.defineProperty(exports, "__esModule", { value: true });
78
+ exports.TradingApi = exports.TradingApiFactory = exports.TradingApiFp = exports.TradingApiAxiosParamCreator = void 0;
79
+ var axios_1 = require("axios");
80
+ // Some imports not used depending on template conditions
81
+ // @ts-ignore
82
+ var common_1 = require("../common");
83
+ // @ts-ignore
84
+ var base_1 = require("../base");
85
+ var requestBeforeHook_1 = require("../requestBeforeHook");
86
+ /**
87
+ * TradingApi - axios parameter creator
88
+ * @export
89
+ */
90
+ var TradingApiAxiosParamCreator = function (configuration) {
91
+ var _this = this;
92
+ return {
93
+ /**
94
+ *
95
+ * @summary Cancel open order in account
96
+ * @param {string} userId
97
+ * @param {string} userSecret
98
+ * @param {string} accountId The ID of the account get positions.
99
+ * @param {string} body
100
+ * @param {*} [options] Override http request option.
101
+ * @throws {RequiredError}
102
+ */
103
+ cancelUserAccountOrder: function (userId, userSecret, accountId, body, options) {
104
+ if (options === void 0) { options = {}; }
105
+ return __awaiter(_this, void 0, void 0, function () {
106
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
107
+ return __generator(this, function (_a) {
108
+ switch (_a.label) {
109
+ case 0:
110
+ // verify required parameter 'userId' is not null or undefined
111
+ (0, common_1.assertParamExists)('cancelUserAccountOrder', 'userId', userId);
112
+ // verify required parameter 'userSecret' is not null or undefined
113
+ (0, common_1.assertParamExists)('cancelUserAccountOrder', 'userSecret', userSecret);
114
+ // verify required parameter 'accountId' is not null or undefined
115
+ (0, common_1.assertParamExists)('cancelUserAccountOrder', 'accountId', accountId);
116
+ // verify required parameter 'body' is not null or undefined
117
+ (0, common_1.assertParamExists)('cancelUserAccountOrder', 'body', body);
118
+ localVarPath = "/accounts/{accountId}/orders/cancel"
119
+ .replace("{".concat("accountId", "}"), encodeURIComponent(String(accountId)));
120
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
121
+ if (configuration) {
122
+ baseOptions = configuration.baseOptions;
123
+ }
124
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
125
+ localVarHeaderParameter = configuration ? { "User-Agent": configuration.userAgent } : {};
126
+ localVarQueryParameter = {};
127
+ // authentication PartnerClientId required
128
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "clientId", configuration)
129
+ // authentication PartnerSignature required
130
+ ];
131
+ case 1:
132
+ // authentication PartnerClientId required
133
+ _a.sent();
134
+ // authentication PartnerSignature required
135
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Signature", configuration)
136
+ // authentication PartnerTimestamp required
137
+ ];
138
+ case 2:
139
+ // authentication PartnerSignature required
140
+ _a.sent();
141
+ // authentication PartnerTimestamp required
142
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "timestamp", configuration)];
143
+ case 3:
144
+ // authentication PartnerTimestamp required
145
+ _a.sent();
146
+ if (userId !== undefined) {
147
+ localVarQueryParameter['userId'] = userId;
148
+ }
149
+ if (userSecret !== undefined) {
150
+ localVarQueryParameter['userSecret'] = userSecret;
151
+ }
152
+ localVarHeaderParameter['Content-Type'] = 'application/json';
153
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
154
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
155
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(body, localVarRequestOptions, configuration);
156
+ (0, requestBeforeHook_1.requestBeforeHook)({
157
+ queryParameters: localVarQueryParameter,
158
+ requestConfig: localVarRequestOptions,
159
+ path: localVarPath,
160
+ configuration: configuration
161
+ });
162
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
163
+ return [2 /*return*/, {
164
+ url: (0, common_1.toPathString)(localVarUrlObj),
165
+ options: localVarRequestOptions,
166
+ }];
167
+ }
168
+ });
169
+ });
170
+ },
171
+ /**
172
+ *
173
+ * @summary Return details of a specific trade before it\'s placed
174
+ * @param {string} portfolioGroupId The ID of the PortfolioGroup to perform rebalancing calculations
175
+ * @param {string} calculatedTradeId The ID of calculated trade to get account impact
176
+ * @param {string} tradeId The ID of trade object
177
+ * @param {*} [options] Override http request option.
178
+ * @throws {RequiredError}
179
+ */
180
+ getCalculatedTradeImpactById: function (portfolioGroupId, calculatedTradeId, tradeId, options) {
181
+ if (options === void 0) { options = {}; }
182
+ return __awaiter(_this, void 0, void 0, function () {
183
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
184
+ return __generator(this, function (_a) {
185
+ switch (_a.label) {
186
+ case 0:
187
+ // verify required parameter 'portfolioGroupId' is not null or undefined
188
+ (0, common_1.assertParamExists)('getCalculatedTradeImpactById', 'portfolioGroupId', portfolioGroupId);
189
+ // verify required parameter 'calculatedTradeId' is not null or undefined
190
+ (0, common_1.assertParamExists)('getCalculatedTradeImpactById', 'calculatedTradeId', calculatedTradeId);
191
+ // verify required parameter 'tradeId' is not null or undefined
192
+ (0, common_1.assertParamExists)('getCalculatedTradeImpactById', 'tradeId', tradeId);
193
+ localVarPath = "/portfolioGroups/{portfolioGroupId}/calculatedtrades/{calculatedTradeId}/modify/{tradeId}"
194
+ .replace("{".concat("portfolioGroupId", "}"), encodeURIComponent(String(portfolioGroupId)))
195
+ .replace("{".concat("calculatedTradeId", "}"), encodeURIComponent(String(calculatedTradeId)))
196
+ .replace("{".concat("tradeId", "}"), encodeURIComponent(String(tradeId)));
197
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
198
+ if (configuration) {
199
+ baseOptions = configuration.baseOptions;
200
+ }
201
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
202
+ localVarHeaderParameter = configuration ? { "User-Agent": configuration.userAgent } : {};
203
+ localVarQueryParameter = {};
204
+ // authentication PartnerClientId required
205
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "clientId", configuration)
206
+ // authentication PartnerSignature required
207
+ ];
208
+ case 1:
209
+ // authentication PartnerClientId required
210
+ _a.sent();
211
+ // authentication PartnerSignature required
212
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Signature", configuration)
213
+ // authentication PartnerTimestamp required
214
+ ];
215
+ case 2:
216
+ // authentication PartnerSignature required
217
+ _a.sent();
218
+ // authentication PartnerTimestamp required
219
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "timestamp", configuration)];
220
+ case 3:
221
+ // authentication PartnerTimestamp required
222
+ _a.sent();
223
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
224
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
225
+ (0, requestBeforeHook_1.requestBeforeHook)({
226
+ queryParameters: localVarQueryParameter,
227
+ requestConfig: localVarRequestOptions,
228
+ path: localVarPath,
229
+ configuration: configuration
230
+ });
231
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
232
+ return [2 /*return*/, {
233
+ url: (0, common_1.toPathString)(localVarUrlObj),
234
+ options: localVarRequestOptions,
235
+ }];
236
+ }
237
+ });
238
+ });
239
+ },
240
+ /**
241
+ *
242
+ * @summary Return the impact of placing a series of trades on the portfolio
243
+ * @param {string} portfolioGroupId The ID of the PortfolioGroup to perform rebalancing calculations
244
+ * @param {string} calculatedTradeId The ID of calculated trade to get account impact
245
+ * @param {*} [options] Override http request option.
246
+ * @throws {RequiredError}
247
+ */
248
+ getCalculatedTradesImpact: function (portfolioGroupId, calculatedTradeId, options) {
249
+ if (options === void 0) { options = {}; }
250
+ return __awaiter(_this, void 0, void 0, function () {
251
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
252
+ return __generator(this, function (_a) {
253
+ switch (_a.label) {
254
+ case 0:
255
+ // verify required parameter 'portfolioGroupId' is not null or undefined
256
+ (0, common_1.assertParamExists)('getCalculatedTradesImpact', 'portfolioGroupId', portfolioGroupId);
257
+ // verify required parameter 'calculatedTradeId' is not null or undefined
258
+ (0, common_1.assertParamExists)('getCalculatedTradesImpact', 'calculatedTradeId', calculatedTradeId);
259
+ localVarPath = "/portfolioGroups/{portfolioGroupId}/calculatedtrades/{calculatedTradeId}/impact"
260
+ .replace("{".concat("portfolioGroupId", "}"), encodeURIComponent(String(portfolioGroupId)))
261
+ .replace("{".concat("calculatedTradeId", "}"), encodeURIComponent(String(calculatedTradeId)));
262
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
263
+ if (configuration) {
264
+ baseOptions = configuration.baseOptions;
265
+ }
266
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
267
+ localVarHeaderParameter = configuration ? { "User-Agent": configuration.userAgent } : {};
268
+ localVarQueryParameter = {};
269
+ // authentication PartnerClientId required
270
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "clientId", configuration)
271
+ // authentication PartnerSignature required
272
+ ];
273
+ case 1:
274
+ // authentication PartnerClientId required
275
+ _a.sent();
276
+ // authentication PartnerSignature required
277
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Signature", configuration)
278
+ // authentication PartnerTimestamp required
279
+ ];
280
+ case 2:
281
+ // authentication PartnerSignature required
282
+ _a.sent();
283
+ // authentication PartnerTimestamp required
284
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "timestamp", configuration)];
285
+ case 3:
286
+ // authentication PartnerTimestamp required
287
+ _a.sent();
288
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
289
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
290
+ (0, requestBeforeHook_1.requestBeforeHook)({
291
+ queryParameters: localVarQueryParameter,
292
+ requestConfig: localVarRequestOptions,
293
+ path: localVarPath,
294
+ configuration: configuration
295
+ });
296
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
297
+ return [2 /*return*/, {
298
+ url: (0, common_1.toPathString)(localVarUrlObj),
299
+ options: localVarRequestOptions,
300
+ }];
301
+ }
302
+ });
303
+ });
304
+ },
305
+ /**
306
+ *
307
+ * @summary Check impact of trades on account.
308
+ * @param {string} userId
309
+ * @param {string} userSecret
310
+ * @param {ManualTradeForm} manualTradeForm
311
+ * @param {*} [options] Override http request option.
312
+ * @throws {RequiredError}
313
+ */
314
+ getOrderImpact: function (userId, userSecret, manualTradeForm, options) {
315
+ if (options === void 0) { options = {}; }
316
+ return __awaiter(_this, void 0, void 0, function () {
317
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
318
+ return __generator(this, function (_a) {
319
+ switch (_a.label) {
320
+ case 0:
321
+ // verify required parameter 'userId' is not null or undefined
322
+ (0, common_1.assertParamExists)('getOrderImpact', 'userId', userId);
323
+ // verify required parameter 'userSecret' is not null or undefined
324
+ (0, common_1.assertParamExists)('getOrderImpact', 'userSecret', userSecret);
325
+ // verify required parameter 'manualTradeForm' is not null or undefined
326
+ (0, common_1.assertParamExists)('getOrderImpact', 'manualTradeForm', manualTradeForm);
327
+ localVarPath = "/trade/impact";
328
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
329
+ if (configuration) {
330
+ baseOptions = configuration.baseOptions;
331
+ }
332
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
333
+ localVarHeaderParameter = configuration ? { "User-Agent": configuration.userAgent } : {};
334
+ localVarQueryParameter = {};
335
+ // authentication PartnerClientId required
336
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "clientId", configuration)
337
+ // authentication PartnerSignature required
338
+ ];
339
+ case 1:
340
+ // authentication PartnerClientId required
341
+ _a.sent();
342
+ // authentication PartnerSignature required
343
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Signature", configuration)
344
+ // authentication PartnerTimestamp required
345
+ ];
346
+ case 2:
347
+ // authentication PartnerSignature required
348
+ _a.sent();
349
+ // authentication PartnerTimestamp required
350
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "timestamp", configuration)];
351
+ case 3:
352
+ // authentication PartnerTimestamp required
353
+ _a.sent();
354
+ if (userId !== undefined) {
355
+ localVarQueryParameter['userId'] = userId;
356
+ }
357
+ if (userSecret !== undefined) {
358
+ localVarQueryParameter['userSecret'] = userSecret;
359
+ }
360
+ localVarHeaderParameter['Content-Type'] = 'application/json';
361
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
362
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
363
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(manualTradeForm, localVarRequestOptions, configuration);
364
+ (0, requestBeforeHook_1.requestBeforeHook)({
365
+ queryParameters: localVarQueryParameter,
366
+ requestConfig: localVarRequestOptions,
367
+ path: localVarPath,
368
+ configuration: configuration
369
+ });
370
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
371
+ return [2 /*return*/, {
372
+ url: (0, common_1.toPathString)(localVarUrlObj),
373
+ options: localVarRequestOptions,
374
+ }];
375
+ }
376
+ });
377
+ });
378
+ },
379
+ /**
380
+ *
381
+ * @summary Get symbol quotes
382
+ * @param {string} userId
383
+ * @param {string} userSecret
384
+ * @param {string} symbols List of universal_symbol_id or tickers to get quotes for.
385
+ * @param {string} accountId The ID of the account to get quotes.
386
+ * @param {boolean} [useTicker] Should be set to True if providing tickers.
387
+ * @param {*} [options] Override http request option.
388
+ * @throws {RequiredError}
389
+ */
390
+ getUserAccountQuotes: function (userId, userSecret, symbols, accountId, useTicker, options) {
391
+ if (options === void 0) { options = {}; }
392
+ return __awaiter(_this, void 0, void 0, function () {
393
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
394
+ return __generator(this, function (_a) {
395
+ switch (_a.label) {
396
+ case 0:
397
+ // verify required parameter 'userId' is not null or undefined
398
+ (0, common_1.assertParamExists)('getUserAccountQuotes', 'userId', userId);
399
+ // verify required parameter 'userSecret' is not null or undefined
400
+ (0, common_1.assertParamExists)('getUserAccountQuotes', 'userSecret', userSecret);
401
+ // verify required parameter 'symbols' is not null or undefined
402
+ (0, common_1.assertParamExists)('getUserAccountQuotes', 'symbols', symbols);
403
+ // verify required parameter 'accountId' is not null or undefined
404
+ (0, common_1.assertParamExists)('getUserAccountQuotes', 'accountId', accountId);
405
+ localVarPath = "/accounts/{accountId}/quotes"
406
+ .replace("{".concat("accountId", "}"), encodeURIComponent(String(accountId)));
407
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
408
+ if (configuration) {
409
+ baseOptions = configuration.baseOptions;
410
+ }
411
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
412
+ localVarHeaderParameter = configuration ? { "User-Agent": configuration.userAgent } : {};
413
+ localVarQueryParameter = {};
414
+ // authentication PartnerClientId required
415
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "clientId", configuration)
416
+ // authentication PartnerSignature required
417
+ ];
418
+ case 1:
419
+ // authentication PartnerClientId required
420
+ _a.sent();
421
+ // authentication PartnerSignature required
422
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Signature", configuration)
423
+ // authentication PartnerTimestamp required
424
+ ];
425
+ case 2:
426
+ // authentication PartnerSignature required
427
+ _a.sent();
428
+ // authentication PartnerTimestamp required
429
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "timestamp", configuration)];
430
+ case 3:
431
+ // authentication PartnerTimestamp required
432
+ _a.sent();
433
+ if (userId !== undefined) {
434
+ localVarQueryParameter['userId'] = userId;
435
+ }
436
+ if (userSecret !== undefined) {
437
+ localVarQueryParameter['userSecret'] = userSecret;
438
+ }
439
+ if (symbols !== undefined) {
440
+ localVarQueryParameter['symbols'] = symbols;
441
+ }
442
+ if (useTicker !== undefined) {
443
+ localVarQueryParameter['use_ticker'] = useTicker;
444
+ }
445
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
446
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
447
+ (0, requestBeforeHook_1.requestBeforeHook)({
448
+ queryParameters: localVarQueryParameter,
449
+ requestConfig: localVarRequestOptions,
450
+ path: localVarPath,
451
+ configuration: configuration
452
+ });
453
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
454
+ return [2 /*return*/, {
455
+ url: (0, common_1.toPathString)(localVarUrlObj),
456
+ options: localVarRequestOptions,
457
+ }];
458
+ }
459
+ });
460
+ });
461
+ },
462
+ /**
463
+ *
464
+ * @summary Modify units of a trade before it is placed
465
+ * @param {string} portfolioGroupId The ID of the PortfolioGroup to perform rebalancing calculations
466
+ * @param {string} calculatedTradeId The ID of calculated trade to get account impact
467
+ * @param {string} tradeId The ID of trade object
468
+ * @param {Trade} [trade]
469
+ * @param {*} [options] Override http request option.
470
+ * @throws {RequiredError}
471
+ */
472
+ modifyCalculatedTradeById: function (portfolioGroupId, calculatedTradeId, tradeId, trade, options) {
473
+ if (options === void 0) { options = {}; }
474
+ return __awaiter(_this, void 0, void 0, function () {
475
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
476
+ return __generator(this, function (_a) {
477
+ switch (_a.label) {
478
+ case 0:
479
+ // verify required parameter 'portfolioGroupId' is not null or undefined
480
+ (0, common_1.assertParamExists)('modifyCalculatedTradeById', 'portfolioGroupId', portfolioGroupId);
481
+ // verify required parameter 'calculatedTradeId' is not null or undefined
482
+ (0, common_1.assertParamExists)('modifyCalculatedTradeById', 'calculatedTradeId', calculatedTradeId);
483
+ // verify required parameter 'tradeId' is not null or undefined
484
+ (0, common_1.assertParamExists)('modifyCalculatedTradeById', 'tradeId', tradeId);
485
+ localVarPath = "/portfolioGroups/{portfolioGroupId}/calculatedtrades/{calculatedTradeId}/modify/{tradeId}"
486
+ .replace("{".concat("portfolioGroupId", "}"), encodeURIComponent(String(portfolioGroupId)))
487
+ .replace("{".concat("calculatedTradeId", "}"), encodeURIComponent(String(calculatedTradeId)))
488
+ .replace("{".concat("tradeId", "}"), encodeURIComponent(String(tradeId)));
489
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
490
+ if (configuration) {
491
+ baseOptions = configuration.baseOptions;
492
+ }
493
+ localVarRequestOptions = __assign(__assign({ method: 'PATCH' }, baseOptions), options);
494
+ localVarHeaderParameter = configuration ? { "User-Agent": configuration.userAgent } : {};
495
+ localVarQueryParameter = {};
496
+ // authentication PartnerClientId required
497
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "clientId", configuration)
498
+ // authentication PartnerSignature required
499
+ ];
500
+ case 1:
501
+ // authentication PartnerClientId required
502
+ _a.sent();
503
+ // authentication PartnerSignature required
504
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Signature", configuration)
505
+ // authentication PartnerTimestamp required
506
+ ];
507
+ case 2:
508
+ // authentication PartnerSignature required
509
+ _a.sent();
510
+ // authentication PartnerTimestamp required
511
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "timestamp", configuration)];
512
+ case 3:
513
+ // authentication PartnerTimestamp required
514
+ _a.sent();
515
+ localVarHeaderParameter['Content-Type'] = 'application/json';
516
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
517
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
518
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(trade, localVarRequestOptions, configuration);
519
+ (0, requestBeforeHook_1.requestBeforeHook)({
520
+ queryParameters: localVarQueryParameter,
521
+ requestConfig: localVarRequestOptions,
522
+ path: localVarPath,
523
+ configuration: configuration
524
+ });
525
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
526
+ return [2 /*return*/, {
527
+ url: (0, common_1.toPathString)(localVarUrlObj),
528
+ options: localVarRequestOptions,
529
+ }];
530
+ }
531
+ });
532
+ });
533
+ },
534
+ /**
535
+ *
536
+ * @summary Place orders for the CalculatedTrades in series
537
+ * @param {string} portfolioGroupId The ID of the PortfolioGroup to perform rebalancing calculations
538
+ * @param {string} calculatedTradeId The ID of calculated trade to get account impact
539
+ * @param {*} [options] Override http request option.
540
+ * @throws {RequiredError}
541
+ */
542
+ placeCalculatedTrades: function (portfolioGroupId, calculatedTradeId, options) {
543
+ if (options === void 0) { options = {}; }
544
+ return __awaiter(_this, void 0, void 0, function () {
545
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
546
+ return __generator(this, function (_a) {
547
+ switch (_a.label) {
548
+ case 0:
549
+ // verify required parameter 'portfolioGroupId' is not null or undefined
550
+ (0, common_1.assertParamExists)('placeCalculatedTrades', 'portfolioGroupId', portfolioGroupId);
551
+ // verify required parameter 'calculatedTradeId' is not null or undefined
552
+ (0, common_1.assertParamExists)('placeCalculatedTrades', 'calculatedTradeId', calculatedTradeId);
553
+ localVarPath = "/portfolioGroups/{portfolioGroupId}/calculatedtrades/{calculatedTradeId}/placeOrders"
554
+ .replace("{".concat("portfolioGroupId", "}"), encodeURIComponent(String(portfolioGroupId)))
555
+ .replace("{".concat("calculatedTradeId", "}"), encodeURIComponent(String(calculatedTradeId)));
556
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
557
+ if (configuration) {
558
+ baseOptions = configuration.baseOptions;
559
+ }
560
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
561
+ localVarHeaderParameter = configuration ? { "User-Agent": configuration.userAgent } : {};
562
+ localVarQueryParameter = {};
563
+ // authentication PartnerClientId required
564
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "clientId", configuration)
565
+ // authentication PartnerSignature required
566
+ ];
567
+ case 1:
568
+ // authentication PartnerClientId required
569
+ _a.sent();
570
+ // authentication PartnerSignature required
571
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Signature", configuration)
572
+ // authentication PartnerTimestamp required
573
+ ];
574
+ case 2:
575
+ // authentication PartnerSignature required
576
+ _a.sent();
577
+ // authentication PartnerTimestamp required
578
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "timestamp", configuration)];
579
+ case 3:
580
+ // authentication PartnerTimestamp required
581
+ _a.sent();
582
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
583
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
584
+ (0, requestBeforeHook_1.requestBeforeHook)({
585
+ queryParameters: localVarQueryParameter,
586
+ requestConfig: localVarRequestOptions,
587
+ path: localVarPath,
588
+ configuration: configuration
589
+ });
590
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
591
+ return [2 /*return*/, {
592
+ url: (0, common_1.toPathString)(localVarUrlObj),
593
+ options: localVarRequestOptions,
594
+ }];
595
+ }
596
+ });
597
+ });
598
+ },
599
+ /**
600
+ *
601
+ * @summary Place a trade with NO validation.
602
+ * @param {string} userId
603
+ * @param {string} userSecret
604
+ * @param {ManualTradeForm} manualTradeForm
605
+ * @param {*} [options] Override http request option.
606
+ * @throws {RequiredError}
607
+ */
608
+ placeForceOrder: function (userId, userSecret, manualTradeForm, options) {
609
+ if (options === void 0) { options = {}; }
610
+ return __awaiter(_this, void 0, void 0, function () {
611
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
612
+ return __generator(this, function (_a) {
613
+ switch (_a.label) {
614
+ case 0:
615
+ // verify required parameter 'userId' is not null or undefined
616
+ (0, common_1.assertParamExists)('placeForceOrder', 'userId', userId);
617
+ // verify required parameter 'userSecret' is not null or undefined
618
+ (0, common_1.assertParamExists)('placeForceOrder', 'userSecret', userSecret);
619
+ // verify required parameter 'manualTradeForm' is not null or undefined
620
+ (0, common_1.assertParamExists)('placeForceOrder', 'manualTradeForm', manualTradeForm);
621
+ localVarPath = "/trade/place";
622
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
623
+ if (configuration) {
624
+ baseOptions = configuration.baseOptions;
625
+ }
626
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
627
+ localVarHeaderParameter = configuration ? { "User-Agent": configuration.userAgent } : {};
628
+ localVarQueryParameter = {};
629
+ // authentication PartnerClientId required
630
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "clientId", configuration)
631
+ // authentication PartnerSignature required
632
+ ];
633
+ case 1:
634
+ // authentication PartnerClientId required
635
+ _a.sent();
636
+ // authentication PartnerSignature required
637
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Signature", configuration)
638
+ // authentication PartnerTimestamp required
639
+ ];
640
+ case 2:
641
+ // authentication PartnerSignature required
642
+ _a.sent();
643
+ // authentication PartnerTimestamp required
644
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "timestamp", configuration)];
645
+ case 3:
646
+ // authentication PartnerTimestamp required
647
+ _a.sent();
648
+ if (userId !== undefined) {
649
+ localVarQueryParameter['userId'] = userId;
650
+ }
651
+ if (userSecret !== undefined) {
652
+ localVarQueryParameter['userSecret'] = userSecret;
653
+ }
654
+ localVarHeaderParameter['Content-Type'] = 'application/json';
655
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
656
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
657
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(manualTradeForm, localVarRequestOptions, configuration);
658
+ (0, requestBeforeHook_1.requestBeforeHook)({
659
+ queryParameters: localVarQueryParameter,
660
+ requestConfig: localVarRequestOptions,
661
+ path: localVarPath,
662
+ configuration: configuration
663
+ });
664
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
665
+ return [2 /*return*/, {
666
+ url: (0, common_1.toPathString)(localVarUrlObj),
667
+ options: localVarRequestOptions,
668
+ }];
669
+ }
670
+ });
671
+ });
672
+ },
673
+ /**
674
+ *
675
+ * @summary Place a OCO (One Cancels Other) order
676
+ * @param {string} userId
677
+ * @param {string} userSecret
678
+ * @param {TradingPlaceOCOOrderRequest} tradingPlaceOCOOrderRequest
679
+ * @param {*} [options] Override http request option.
680
+ * @throws {RequiredError}
681
+ */
682
+ placeOCOOrder: function (userId, userSecret, tradingPlaceOCOOrderRequest, options) {
683
+ if (options === void 0) { options = {}; }
684
+ return __awaiter(_this, void 0, void 0, function () {
685
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
686
+ return __generator(this, function (_a) {
687
+ switch (_a.label) {
688
+ case 0:
689
+ // verify required parameter 'userId' is not null or undefined
690
+ (0, common_1.assertParamExists)('placeOCOOrder', 'userId', userId);
691
+ // verify required parameter 'userSecret' is not null or undefined
692
+ (0, common_1.assertParamExists)('placeOCOOrder', 'userSecret', userSecret);
693
+ // verify required parameter 'tradingPlaceOCOOrderRequest' is not null or undefined
694
+ (0, common_1.assertParamExists)('placeOCOOrder', 'tradingPlaceOCOOrderRequest', tradingPlaceOCOOrderRequest);
695
+ localVarPath = "/trade/oco";
696
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
697
+ if (configuration) {
698
+ baseOptions = configuration.baseOptions;
699
+ }
700
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
701
+ localVarHeaderParameter = configuration ? { "User-Agent": configuration.userAgent } : {};
702
+ localVarQueryParameter = {};
703
+ // authentication PartnerClientId required
704
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "clientId", configuration)
705
+ // authentication PartnerSignature required
706
+ ];
707
+ case 1:
708
+ // authentication PartnerClientId required
709
+ _a.sent();
710
+ // authentication PartnerSignature required
711
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Signature", configuration)
712
+ // authentication PartnerTimestamp required
713
+ ];
714
+ case 2:
715
+ // authentication PartnerSignature required
716
+ _a.sent();
717
+ // authentication PartnerTimestamp required
718
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "timestamp", configuration)];
719
+ case 3:
720
+ // authentication PartnerTimestamp required
721
+ _a.sent();
722
+ if (userId !== undefined) {
723
+ localVarQueryParameter['userId'] = userId;
724
+ }
725
+ if (userSecret !== undefined) {
726
+ localVarQueryParameter['userSecret'] = userSecret;
727
+ }
728
+ localVarHeaderParameter['Content-Type'] = 'application/json';
729
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
730
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
731
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(tradingPlaceOCOOrderRequest, localVarRequestOptions, configuration);
732
+ (0, requestBeforeHook_1.requestBeforeHook)({
733
+ queryParameters: localVarQueryParameter,
734
+ requestConfig: localVarRequestOptions,
735
+ path: localVarPath,
736
+ configuration: configuration
737
+ });
738
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
739
+ return [2 /*return*/, {
740
+ url: (0, common_1.toPathString)(localVarUrlObj),
741
+ options: localVarRequestOptions,
742
+ }];
743
+ }
744
+ });
745
+ });
746
+ },
747
+ /**
748
+ *
749
+ * @summary Place order
750
+ * @param {string} tradeId The ID of trade object obtained from trade/impact endpoint
751
+ * @param {string} userId
752
+ * @param {string} userSecret
753
+ * @param {*} [options] Override http request option.
754
+ * @throws {RequiredError}
755
+ */
756
+ placeOrder: function (tradeId, userId, userSecret, options) {
757
+ if (options === void 0) { options = {}; }
758
+ return __awaiter(_this, void 0, void 0, function () {
759
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
760
+ return __generator(this, function (_a) {
761
+ switch (_a.label) {
762
+ case 0:
763
+ // verify required parameter 'tradeId' is not null or undefined
764
+ (0, common_1.assertParamExists)('placeOrder', 'tradeId', tradeId);
765
+ // verify required parameter 'userId' is not null or undefined
766
+ (0, common_1.assertParamExists)('placeOrder', 'userId', userId);
767
+ // verify required parameter 'userSecret' is not null or undefined
768
+ (0, common_1.assertParamExists)('placeOrder', 'userSecret', userSecret);
769
+ localVarPath = "/trade/{tradeId}"
770
+ .replace("{".concat("tradeId", "}"), encodeURIComponent(String(tradeId)));
771
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
772
+ if (configuration) {
773
+ baseOptions = configuration.baseOptions;
774
+ }
775
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
776
+ localVarHeaderParameter = configuration ? { "User-Agent": configuration.userAgent } : {};
777
+ localVarQueryParameter = {};
778
+ // authentication PartnerClientId required
779
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "clientId", configuration)
780
+ // authentication PartnerSignature required
781
+ ];
782
+ case 1:
783
+ // authentication PartnerClientId required
784
+ _a.sent();
785
+ // authentication PartnerSignature required
786
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Signature", configuration)
787
+ // authentication PartnerTimestamp required
788
+ ];
789
+ case 2:
790
+ // authentication PartnerSignature required
791
+ _a.sent();
792
+ // authentication PartnerTimestamp required
793
+ return [4 /*yield*/, (0, common_1.setApiKeyToObject)(localVarQueryParameter, "timestamp", configuration)];
794
+ case 3:
795
+ // authentication PartnerTimestamp required
796
+ _a.sent();
797
+ if (userId !== undefined) {
798
+ localVarQueryParameter['userId'] = userId;
799
+ }
800
+ if (userSecret !== undefined) {
801
+ localVarQueryParameter['userSecret'] = userSecret;
802
+ }
803
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
804
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
805
+ (0, requestBeforeHook_1.requestBeforeHook)({
806
+ queryParameters: localVarQueryParameter,
807
+ requestConfig: localVarRequestOptions,
808
+ path: localVarPath,
809
+ configuration: configuration
810
+ });
811
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
812
+ return [2 /*return*/, {
813
+ url: (0, common_1.toPathString)(localVarUrlObj),
814
+ options: localVarRequestOptions,
815
+ }];
816
+ }
817
+ });
818
+ });
819
+ },
820
+ };
821
+ };
822
+ exports.TradingApiAxiosParamCreator = TradingApiAxiosParamCreator;
823
+ /**
824
+ * TradingApi - functional programming interface
825
+ * @export
826
+ */
827
+ var TradingApiFp = function (configuration) {
828
+ var localVarAxiosParamCreator = (0, exports.TradingApiAxiosParamCreator)(configuration);
829
+ return {
830
+ /**
831
+ *
832
+ * @summary Cancel open order in account
833
+ * @param {TradingApiCancelUserAccountOrderRequest} requestParameters Request parameters.
834
+ * @param {*} [options] Override http request option.
835
+ * @throws {RequiredError}
836
+ */
837
+ cancelUserAccountOrder: function (requestParameters, options) {
838
+ return __awaiter(this, void 0, void 0, function () {
839
+ var localVarAxiosArgs;
840
+ return __generator(this, function (_a) {
841
+ switch (_a.label) {
842
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.cancelUserAccountOrder(requestParameters.userId, requestParameters.userSecret, requestParameters.accountId, requestParameters.requestBody, options)];
843
+ case 1:
844
+ localVarAxiosArgs = _a.sent();
845
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
846
+ }
847
+ });
848
+ });
849
+ },
850
+ /**
851
+ *
852
+ * @summary Return details of a specific trade before it\'s placed
853
+ * @param {TradingApiGetCalculatedTradeImpactByIdRequest} requestParameters Request parameters.
854
+ * @param {*} [options] Override http request option.
855
+ * @throws {RequiredError}
856
+ */
857
+ getCalculatedTradeImpactById: function (requestParameters, options) {
858
+ return __awaiter(this, void 0, void 0, function () {
859
+ var localVarAxiosArgs;
860
+ return __generator(this, function (_a) {
861
+ switch (_a.label) {
862
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.getCalculatedTradeImpactById(requestParameters.portfolioGroupId, requestParameters.calculatedTradeId, requestParameters.tradeId, options)];
863
+ case 1:
864
+ localVarAxiosArgs = _a.sent();
865
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
866
+ }
867
+ });
868
+ });
869
+ },
870
+ /**
871
+ *
872
+ * @summary Return the impact of placing a series of trades on the portfolio
873
+ * @param {TradingApiGetCalculatedTradesImpactRequest} requestParameters Request parameters.
874
+ * @param {*} [options] Override http request option.
875
+ * @throws {RequiredError}
876
+ */
877
+ getCalculatedTradesImpact: function (requestParameters, options) {
878
+ return __awaiter(this, void 0, void 0, function () {
879
+ var localVarAxiosArgs;
880
+ return __generator(this, function (_a) {
881
+ switch (_a.label) {
882
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.getCalculatedTradesImpact(requestParameters.portfolioGroupId, requestParameters.calculatedTradeId, options)];
883
+ case 1:
884
+ localVarAxiosArgs = _a.sent();
885
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
886
+ }
887
+ });
888
+ });
889
+ },
890
+ /**
891
+ *
892
+ * @summary Check impact of trades on account.
893
+ * @param {TradingApiGetOrderImpactRequest} requestParameters Request parameters.
894
+ * @param {*} [options] Override http request option.
895
+ * @throws {RequiredError}
896
+ */
897
+ getOrderImpact: function (requestParameters, options) {
898
+ return __awaiter(this, void 0, void 0, function () {
899
+ var localVarAxiosArgs;
900
+ return __generator(this, function (_a) {
901
+ switch (_a.label) {
902
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.getOrderImpact(requestParameters.userId, requestParameters.userSecret, requestParameters.requestBody, options)];
903
+ case 1:
904
+ localVarAxiosArgs = _a.sent();
905
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
906
+ }
907
+ });
908
+ });
909
+ },
910
+ /**
911
+ *
912
+ * @summary Get symbol quotes
913
+ * @param {TradingApiGetUserAccountQuotesRequest} requestParameters Request parameters.
914
+ * @param {*} [options] Override http request option.
915
+ * @throws {RequiredError}
916
+ */
917
+ getUserAccountQuotes: function (requestParameters, options) {
918
+ return __awaiter(this, void 0, void 0, function () {
919
+ var localVarAxiosArgs;
920
+ return __generator(this, function (_a) {
921
+ switch (_a.label) {
922
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.getUserAccountQuotes(requestParameters.userId, requestParameters.userSecret, requestParameters.symbols, requestParameters.accountId, requestParameters.useTicker, options)];
923
+ case 1:
924
+ localVarAxiosArgs = _a.sent();
925
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
926
+ }
927
+ });
928
+ });
929
+ },
930
+ /**
931
+ *
932
+ * @summary Modify units of a trade before it is placed
933
+ * @param {TradingApiModifyCalculatedTradeByIdRequest} requestParameters Request parameters.
934
+ * @param {*} [options] Override http request option.
935
+ * @throws {RequiredError}
936
+ */
937
+ modifyCalculatedTradeById: function (requestParameters, options) {
938
+ return __awaiter(this, void 0, void 0, function () {
939
+ var localVarAxiosArgs;
940
+ return __generator(this, function (_a) {
941
+ switch (_a.label) {
942
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.modifyCalculatedTradeById(requestParameters.portfolioGroupId, requestParameters.calculatedTradeId, requestParameters.tradeId, requestParameters.requestBody, options)];
943
+ case 1:
944
+ localVarAxiosArgs = _a.sent();
945
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
946
+ }
947
+ });
948
+ });
949
+ },
950
+ /**
951
+ *
952
+ * @summary Place orders for the CalculatedTrades in series
953
+ * @param {TradingApiPlaceCalculatedTradesRequest} requestParameters Request parameters.
954
+ * @param {*} [options] Override http request option.
955
+ * @throws {RequiredError}
956
+ */
957
+ placeCalculatedTrades: function (requestParameters, options) {
958
+ return __awaiter(this, void 0, void 0, function () {
959
+ var localVarAxiosArgs;
960
+ return __generator(this, function (_a) {
961
+ switch (_a.label) {
962
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.placeCalculatedTrades(requestParameters.portfolioGroupId, requestParameters.calculatedTradeId, options)];
963
+ case 1:
964
+ localVarAxiosArgs = _a.sent();
965
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
966
+ }
967
+ });
968
+ });
969
+ },
970
+ /**
971
+ *
972
+ * @summary Place a trade with NO validation.
973
+ * @param {TradingApiPlaceForceOrderRequest} requestParameters Request parameters.
974
+ * @param {*} [options] Override http request option.
975
+ * @throws {RequiredError}
976
+ */
977
+ placeForceOrder: function (requestParameters, options) {
978
+ return __awaiter(this, void 0, void 0, function () {
979
+ var localVarAxiosArgs;
980
+ return __generator(this, function (_a) {
981
+ switch (_a.label) {
982
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.placeForceOrder(requestParameters.userId, requestParameters.userSecret, requestParameters.requestBody, options)];
983
+ case 1:
984
+ localVarAxiosArgs = _a.sent();
985
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
986
+ }
987
+ });
988
+ });
989
+ },
990
+ /**
991
+ *
992
+ * @summary Place a OCO (One Cancels Other) order
993
+ * @param {TradingApiPlaceOCOOrderRequest} requestParameters Request parameters.
994
+ * @param {*} [options] Override http request option.
995
+ * @throws {RequiredError}
996
+ */
997
+ placeOCOOrder: function (requestParameters, options) {
998
+ return __awaiter(this, void 0, void 0, function () {
999
+ var localVarAxiosArgs;
1000
+ return __generator(this, function (_a) {
1001
+ switch (_a.label) {
1002
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.placeOCOOrder(requestParameters.userId, requestParameters.userSecret, requestParameters.requestBody, options)];
1003
+ case 1:
1004
+ localVarAxiosArgs = _a.sent();
1005
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
1006
+ }
1007
+ });
1008
+ });
1009
+ },
1010
+ /**
1011
+ *
1012
+ * @summary Place order
1013
+ * @param {TradingApiPlaceOrderRequest} requestParameters Request parameters.
1014
+ * @param {*} [options] Override http request option.
1015
+ * @throws {RequiredError}
1016
+ */
1017
+ placeOrder: function (requestParameters, options) {
1018
+ return __awaiter(this, void 0, void 0, function () {
1019
+ var localVarAxiosArgs;
1020
+ return __generator(this, function (_a) {
1021
+ switch (_a.label) {
1022
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.placeOrder(requestParameters.tradeId, requestParameters.userId, requestParameters.userSecret, options)];
1023
+ case 1:
1024
+ localVarAxiosArgs = _a.sent();
1025
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
1026
+ }
1027
+ });
1028
+ });
1029
+ },
1030
+ };
1031
+ };
1032
+ exports.TradingApiFp = TradingApiFp;
1033
+ /**
1034
+ * TradingApi - factory interface
1035
+ * @export
1036
+ */
1037
+ var TradingApiFactory = function (configuration, basePath, axios) {
1038
+ var localVarFp = (0, exports.TradingApiFp)(configuration);
1039
+ return {
1040
+ /**
1041
+ *
1042
+ * @summary Cancel open order in account
1043
+ * @param {TradingApiCancelUserAccountOrderRequest} requestParameters Request parameters.
1044
+ * @param {*} [options] Override http request option.
1045
+ * @throws {RequiredError}
1046
+ */
1047
+ cancelUserAccountOrder: function (requestParameters, options) {
1048
+ return localVarFp.cancelUserAccountOrder(requestParameters, options).then(function (request) { return request(axios, basePath); });
1049
+ },
1050
+ /**
1051
+ *
1052
+ * @summary Return details of a specific trade before it\'s placed
1053
+ * @param {TradingApiGetCalculatedTradeImpactByIdRequest} requestParameters Request parameters.
1054
+ * @param {*} [options] Override http request option.
1055
+ * @throws {RequiredError}
1056
+ */
1057
+ getCalculatedTradeImpactById: function (requestParameters, options) {
1058
+ return localVarFp.getCalculatedTradeImpactById(requestParameters, options).then(function (request) { return request(axios, basePath); });
1059
+ },
1060
+ /**
1061
+ *
1062
+ * @summary Return the impact of placing a series of trades on the portfolio
1063
+ * @param {TradingApiGetCalculatedTradesImpactRequest} requestParameters Request parameters.
1064
+ * @param {*} [options] Override http request option.
1065
+ * @throws {RequiredError}
1066
+ */
1067
+ getCalculatedTradesImpact: function (requestParameters, options) {
1068
+ return localVarFp.getCalculatedTradesImpact(requestParameters, options).then(function (request) { return request(axios, basePath); });
1069
+ },
1070
+ /**
1071
+ *
1072
+ * @summary Check impact of trades on account.
1073
+ * @param {TradingApiGetOrderImpactRequest} requestParameters Request parameters.
1074
+ * @param {*} [options] Override http request option.
1075
+ * @throws {RequiredError}
1076
+ */
1077
+ getOrderImpact: function (requestParameters, options) {
1078
+ return localVarFp.getOrderImpact(requestParameters, options).then(function (request) { return request(axios, basePath); });
1079
+ },
1080
+ /**
1081
+ *
1082
+ * @summary Get symbol quotes
1083
+ * @param {TradingApiGetUserAccountQuotesRequest} requestParameters Request parameters.
1084
+ * @param {*} [options] Override http request option.
1085
+ * @throws {RequiredError}
1086
+ */
1087
+ getUserAccountQuotes: function (requestParameters, options) {
1088
+ return localVarFp.getUserAccountQuotes(requestParameters, options).then(function (request) { return request(axios, basePath); });
1089
+ },
1090
+ /**
1091
+ *
1092
+ * @summary Modify units of a trade before it is placed
1093
+ * @param {TradingApiModifyCalculatedTradeByIdRequest} requestParameters Request parameters.
1094
+ * @param {*} [options] Override http request option.
1095
+ * @throws {RequiredError}
1096
+ */
1097
+ modifyCalculatedTradeById: function (requestParameters, options) {
1098
+ return localVarFp.modifyCalculatedTradeById(requestParameters, options).then(function (request) { return request(axios, basePath); });
1099
+ },
1100
+ /**
1101
+ *
1102
+ * @summary Place orders for the CalculatedTrades in series
1103
+ * @param {TradingApiPlaceCalculatedTradesRequest} requestParameters Request parameters.
1104
+ * @param {*} [options] Override http request option.
1105
+ * @throws {RequiredError}
1106
+ */
1107
+ placeCalculatedTrades: function (requestParameters, options) {
1108
+ return localVarFp.placeCalculatedTrades(requestParameters, options).then(function (request) { return request(axios, basePath); });
1109
+ },
1110
+ /**
1111
+ *
1112
+ * @summary Place a trade with NO validation.
1113
+ * @param {TradingApiPlaceForceOrderRequest} requestParameters Request parameters.
1114
+ * @param {*} [options] Override http request option.
1115
+ * @throws {RequiredError}
1116
+ */
1117
+ placeForceOrder: function (requestParameters, options) {
1118
+ return localVarFp.placeForceOrder(requestParameters, options).then(function (request) { return request(axios, basePath); });
1119
+ },
1120
+ /**
1121
+ *
1122
+ * @summary Place a OCO (One Cancels Other) order
1123
+ * @param {TradingApiPlaceOCOOrderRequest} requestParameters Request parameters.
1124
+ * @param {*} [options] Override http request option.
1125
+ * @throws {RequiredError}
1126
+ */
1127
+ placeOCOOrder: function (requestParameters, options) {
1128
+ return localVarFp.placeOCOOrder(requestParameters, options).then(function (request) { return request(axios, basePath); });
1129
+ },
1130
+ /**
1131
+ *
1132
+ * @summary Place order
1133
+ * @param {TradingApiPlaceOrderRequest} requestParameters Request parameters.
1134
+ * @param {*} [options] Override http request option.
1135
+ * @throws {RequiredError}
1136
+ */
1137
+ placeOrder: function (requestParameters, options) {
1138
+ return localVarFp.placeOrder(requestParameters, options).then(function (request) { return request(axios, basePath); });
1139
+ },
1140
+ };
1141
+ };
1142
+ exports.TradingApiFactory = TradingApiFactory;
1143
+ /**
1144
+ * TradingApi - object-oriented interface
1145
+ * @export
1146
+ * @class TradingApi
1147
+ * @extends {BaseAPI}
1148
+ */
1149
+ var TradingApi = /** @class */ (function (_super) {
1150
+ __extends(TradingApi, _super);
1151
+ function TradingApi() {
1152
+ return _super !== null && _super.apply(this, arguments) || this;
1153
+ }
1154
+ /**
1155
+ *
1156
+ * @summary Cancel open order in account
1157
+ * @param {TradingApiCancelUserAccountOrderRequest} requestParameters Request parameters.
1158
+ * @param {*} [options] Override http request option.
1159
+ * @throws {RequiredError}
1160
+ * @memberof TradingApi
1161
+ */
1162
+ TradingApi.prototype.cancelUserAccountOrder = function (requestParameters, options) {
1163
+ var _this = this;
1164
+ return (0, exports.TradingApiFp)(this.configuration).cancelUserAccountOrder(requestParameters, options).then(function (request) { return request(_this.axios, _this.basePath); });
1165
+ };
1166
+ /**
1167
+ *
1168
+ * @summary Return details of a specific trade before it\'s placed
1169
+ * @param {TradingApiGetCalculatedTradeImpactByIdRequest} requestParameters Request parameters.
1170
+ * @param {*} [options] Override http request option.
1171
+ * @throws {RequiredError}
1172
+ * @memberof TradingApi
1173
+ */
1174
+ TradingApi.prototype.getCalculatedTradeImpactById = function (requestParameters, options) {
1175
+ var _this = this;
1176
+ return (0, exports.TradingApiFp)(this.configuration).getCalculatedTradeImpactById(requestParameters, options).then(function (request) { return request(_this.axios, _this.basePath); });
1177
+ };
1178
+ /**
1179
+ *
1180
+ * @summary Return the impact of placing a series of trades on the portfolio
1181
+ * @param {TradingApiGetCalculatedTradesImpactRequest} requestParameters Request parameters.
1182
+ * @param {*} [options] Override http request option.
1183
+ * @throws {RequiredError}
1184
+ * @memberof TradingApi
1185
+ */
1186
+ TradingApi.prototype.getCalculatedTradesImpact = function (requestParameters, options) {
1187
+ var _this = this;
1188
+ return (0, exports.TradingApiFp)(this.configuration).getCalculatedTradesImpact(requestParameters, options).then(function (request) { return request(_this.axios, _this.basePath); });
1189
+ };
1190
+ /**
1191
+ *
1192
+ * @summary Check impact of trades on account.
1193
+ * @param {TradingApiGetOrderImpactRequest} requestParameters Request parameters.
1194
+ * @param {*} [options] Override http request option.
1195
+ * @throws {RequiredError}
1196
+ * @memberof TradingApi
1197
+ */
1198
+ TradingApi.prototype.getOrderImpact = function (requestParameters, options) {
1199
+ var _this = this;
1200
+ return (0, exports.TradingApiFp)(this.configuration).getOrderImpact(requestParameters, options).then(function (request) { return request(_this.axios, _this.basePath); });
1201
+ };
1202
+ /**
1203
+ *
1204
+ * @summary Get symbol quotes
1205
+ * @param {TradingApiGetUserAccountQuotesRequest} requestParameters Request parameters.
1206
+ * @param {*} [options] Override http request option.
1207
+ * @throws {RequiredError}
1208
+ * @memberof TradingApi
1209
+ */
1210
+ TradingApi.prototype.getUserAccountQuotes = function (requestParameters, options) {
1211
+ var _this = this;
1212
+ return (0, exports.TradingApiFp)(this.configuration).getUserAccountQuotes(requestParameters, options).then(function (request) { return request(_this.axios, _this.basePath); });
1213
+ };
1214
+ /**
1215
+ *
1216
+ * @summary Modify units of a trade before it is placed
1217
+ * @param {TradingApiModifyCalculatedTradeByIdRequest} requestParameters Request parameters.
1218
+ * @param {*} [options] Override http request option.
1219
+ * @throws {RequiredError}
1220
+ * @memberof TradingApi
1221
+ */
1222
+ TradingApi.prototype.modifyCalculatedTradeById = function (requestParameters, options) {
1223
+ var _this = this;
1224
+ return (0, exports.TradingApiFp)(this.configuration).modifyCalculatedTradeById(requestParameters, options).then(function (request) { return request(_this.axios, _this.basePath); });
1225
+ };
1226
+ /**
1227
+ *
1228
+ * @summary Place orders for the CalculatedTrades in series
1229
+ * @param {TradingApiPlaceCalculatedTradesRequest} requestParameters Request parameters.
1230
+ * @param {*} [options] Override http request option.
1231
+ * @throws {RequiredError}
1232
+ * @memberof TradingApi
1233
+ */
1234
+ TradingApi.prototype.placeCalculatedTrades = function (requestParameters, options) {
1235
+ var _this = this;
1236
+ return (0, exports.TradingApiFp)(this.configuration).placeCalculatedTrades(requestParameters, options).then(function (request) { return request(_this.axios, _this.basePath); });
1237
+ };
1238
+ /**
1239
+ *
1240
+ * @summary Place a trade with NO validation.
1241
+ * @param {TradingApiPlaceForceOrderRequest} requestParameters Request parameters.
1242
+ * @param {*} [options] Override http request option.
1243
+ * @throws {RequiredError}
1244
+ * @memberof TradingApi
1245
+ */
1246
+ TradingApi.prototype.placeForceOrder = function (requestParameters, options) {
1247
+ var _this = this;
1248
+ return (0, exports.TradingApiFp)(this.configuration).placeForceOrder(requestParameters, options).then(function (request) { return request(_this.axios, _this.basePath); });
1249
+ };
1250
+ /**
1251
+ *
1252
+ * @summary Place a OCO (One Cancels Other) order
1253
+ * @param {TradingApiPlaceOCOOrderRequest} requestParameters Request parameters.
1254
+ * @param {*} [options] Override http request option.
1255
+ * @throws {RequiredError}
1256
+ * @memberof TradingApi
1257
+ */
1258
+ TradingApi.prototype.placeOCOOrder = function (requestParameters, options) {
1259
+ var _this = this;
1260
+ return (0, exports.TradingApiFp)(this.configuration).placeOCOOrder(requestParameters, options).then(function (request) { return request(_this.axios, _this.basePath); });
1261
+ };
1262
+ /**
1263
+ *
1264
+ * @summary Place order
1265
+ * @param {TradingApiPlaceOrderRequest} requestParameters Request parameters.
1266
+ * @param {*} [options] Override http request option.
1267
+ * @throws {RequiredError}
1268
+ * @memberof TradingApi
1269
+ */
1270
+ TradingApi.prototype.placeOrder = function (requestParameters, options) {
1271
+ var _this = this;
1272
+ return (0, exports.TradingApiFp)(this.configuration).placeOrder(requestParameters, options).then(function (request) { return request(_this.axios, _this.basePath); });
1273
+ };
1274
+ return TradingApi;
1275
+ }(base_1.BaseAPI));
1276
+ exports.TradingApi = TradingApi;