snaptrade-typescript-sdk 3.0.0 → 5.0.0

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