kalshi-typescript 2.1.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 (626) hide show
  1. package/.openapi-generator/FILES +210 -0
  2. package/.openapi-generator/VERSION +1 -0
  3. package/.openapi-generator-ignore +25 -0
  4. package/README.md +212 -0
  5. package/api/api-keys-api.ts +354 -0
  6. package/api/communications-api.ts +863 -0
  7. package/api/events-api.ts +330 -0
  8. package/api/exchange-api.ts +315 -0
  9. package/api/markets-api.ts +554 -0
  10. package/api/milestones-api.ts +216 -0
  11. package/api/multivariate-collections-api.ts +293 -0
  12. package/api/portfolio-api.ts +1646 -0
  13. package/api/series-api.ts +208 -0
  14. package/api/structured-targets-api.ts +216 -0
  15. package/api.ts +27 -0
  16. package/base.ts +62 -0
  17. package/common.ts +98 -0
  18. package/configuration.ts +94 -0
  19. package/dist/api/api-keys-api.d.ts +163 -0
  20. package/dist/api/api-keys-api.js +333 -0
  21. package/dist/api/communications-api.d.ts +388 -0
  22. package/dist/api/communications-api.js +803 -0
  23. package/dist/api/events-api.d.ts +157 -0
  24. package/dist/api/events-api.js +312 -0
  25. package/dist/api/exchange-api.d.ts +150 -0
  26. package/dist/api/exchange-api.js +301 -0
  27. package/dist/api/markets-api.d.ts +263 -0
  28. package/dist/api/markets-api.js +515 -0
  29. package/dist/api/milestones-api.d.ts +104 -0
  30. package/dist/api/milestones-api.js +209 -0
  31. package/dist/api/multivariate-collections-api.d.ts +138 -0
  32. package/dist/api/multivariate-collections-api.js +278 -0
  33. package/dist/api/portfolio-api.d.ts +742 -0
  34. package/dist/api/portfolio-api.js +1498 -0
  35. package/dist/api/series-api.d.ts +100 -0
  36. package/dist/api/series-api.js +202 -0
  37. package/dist/api/structured-targets-api.d.ts +104 -0
  38. package/dist/api/structured-targets-api.js +209 -0
  39. package/dist/api.d.ts +21 -0
  40. package/dist/api.js +39 -0
  41. package/dist/base.d.ts +42 -0
  42. package/dist/base.js +46 -0
  43. package/dist/common.d.ts +29 -0
  44. package/dist/common.js +109 -0
  45. package/dist/configuration.d.ts +75 -0
  46. package/dist/configuration.js +40 -0
  47. package/dist/esm/api/api-keys-api.d.ts +163 -0
  48. package/dist/esm/api/api-keys-api.js +326 -0
  49. package/dist/esm/api/communications-api.d.ts +388 -0
  50. package/dist/esm/api/communications-api.js +796 -0
  51. package/dist/esm/api/events-api.d.ts +157 -0
  52. package/dist/esm/api/events-api.js +305 -0
  53. package/dist/esm/api/exchange-api.d.ts +150 -0
  54. package/dist/esm/api/exchange-api.js +294 -0
  55. package/dist/esm/api/markets-api.d.ts +263 -0
  56. package/dist/esm/api/markets-api.js +508 -0
  57. package/dist/esm/api/milestones-api.d.ts +104 -0
  58. package/dist/esm/api/milestones-api.js +202 -0
  59. package/dist/esm/api/multivariate-collections-api.d.ts +138 -0
  60. package/dist/esm/api/multivariate-collections-api.js +271 -0
  61. package/dist/esm/api/portfolio-api.d.ts +742 -0
  62. package/dist/esm/api/portfolio-api.js +1491 -0
  63. package/dist/esm/api/series-api.d.ts +100 -0
  64. package/dist/esm/api/series-api.js +195 -0
  65. package/dist/esm/api/structured-targets-api.d.ts +104 -0
  66. package/dist/esm/api/structured-targets-api.js +202 -0
  67. package/dist/esm/api.d.ts +21 -0
  68. package/dist/esm/api.js +23 -0
  69. package/dist/esm/base.d.ts +42 -0
  70. package/dist/esm/base.js +41 -0
  71. package/dist/esm/common.d.ts +29 -0
  72. package/dist/esm/common.js +97 -0
  73. package/dist/esm/configuration.d.ts +75 -0
  74. package/dist/esm/configuration.js +36 -0
  75. package/dist/esm/index.d.ts +14 -0
  76. package/dist/esm/index.js +16 -0
  77. package/dist/esm/models/accept-quote-request.d.ts +14 -0
  78. package/dist/esm/models/accept-quote-request.js +14 -0
  79. package/dist/esm/models/amend-order-request.d.ts +16 -0
  80. package/dist/esm/models/amend-order-request.js +14 -0
  81. package/dist/esm/models/amend-order-response.d.ts +15 -0
  82. package/dist/esm/models/amend-order-response.js +14 -0
  83. package/dist/esm/models/announcement.d.ts +28 -0
  84. package/dist/esm/models/announcement.js +22 -0
  85. package/dist/esm/models/api-key.d.ts +25 -0
  86. package/dist/esm/models/api-key.js +14 -0
  87. package/dist/esm/models/batch-cancel-orders-request.d.ts +14 -0
  88. package/dist/esm/models/batch-cancel-orders-request.js +14 -0
  89. package/dist/esm/models/batch-cancel-orders-response-responses-inner.d.ts +17 -0
  90. package/dist/esm/models/batch-cancel-orders-response-responses-inner.js +14 -0
  91. package/dist/esm/models/batch-cancel-orders-response.d.ts +15 -0
  92. package/dist/esm/models/batch-cancel-orders-response.js +14 -0
  93. package/dist/esm/models/batch-create-orders-request.d.ts +15 -0
  94. package/dist/esm/models/batch-create-orders-request.js +14 -0
  95. package/dist/esm/models/batch-create-orders-response-responses-inner.d.ts +17 -0
  96. package/dist/esm/models/batch-create-orders-response-responses-inner.js +14 -0
  97. package/dist/esm/models/batch-create-orders-response.d.ts +15 -0
  98. package/dist/esm/models/batch-create-orders-response.js +14 -0
  99. package/dist/esm/models/cancel-order-response.d.ts +16 -0
  100. package/dist/esm/models/cancel-order-response.js +14 -0
  101. package/dist/esm/models/candlestick.d.ts +20 -0
  102. package/dist/esm/models/candlestick.js +14 -0
  103. package/dist/esm/models/create-api-key-request.d.ts +21 -0
  104. package/dist/esm/models/create-api-key-request.js +14 -0
  105. package/dist/esm/models/create-api-key-response.d.ts +17 -0
  106. package/dist/esm/models/create-api-key-response.js +14 -0
  107. package/dist/esm/models/create-order-group-request.d.ts +14 -0
  108. package/dist/esm/models/create-order-group-request.js +14 -0
  109. package/dist/esm/models/create-order-group-response.d.ts +15 -0
  110. package/dist/esm/models/create-order-group-response.js +14 -0
  111. package/dist/esm/models/create-order-request.d.ts +39 -0
  112. package/dist/esm/models/create-order-request.js +25 -0
  113. package/dist/esm/models/create-order-response.d.ts +15 -0
  114. package/dist/esm/models/create-order-response.js +14 -0
  115. package/dist/esm/models/create-quote-request.d.ts +16 -0
  116. package/dist/esm/models/create-quote-request.js +14 -0
  117. package/dist/esm/models/create-quote-response.d.ts +15 -0
  118. package/dist/esm/models/create-quote-response.js +14 -0
  119. package/dist/esm/models/create-rfqrequest.d.ts +22 -0
  120. package/dist/esm/models/create-rfqrequest.js +17 -0
  121. package/dist/esm/models/create-rfqresponse.d.ts +15 -0
  122. package/dist/esm/models/create-rfqresponse.js +14 -0
  123. package/dist/esm/models/daily-schedule.d.ts +15 -0
  124. package/dist/esm/models/daily-schedule.js +14 -0
  125. package/dist/esm/models/decrease-order-request.d.ts +14 -0
  126. package/dist/esm/models/decrease-order-request.js +14 -0
  127. package/dist/esm/models/decrease-order-response.d.ts +15 -0
  128. package/dist/esm/models/decrease-order-response.js +14 -0
  129. package/dist/esm/models/error-response-error.d.ts +25 -0
  130. package/dist/esm/models/error-response-error.js +14 -0
  131. package/dist/esm/models/error-response.d.ts +15 -0
  132. package/dist/esm/models/error-response.js +14 -0
  133. package/dist/esm/models/event.d.ts +26 -0
  134. package/dist/esm/models/event.js +18 -0
  135. package/dist/esm/models/exchange-status.d.ts +15 -0
  136. package/dist/esm/models/exchange-status.js +14 -0
  137. package/dist/esm/models/fill.d.ts +32 -0
  138. package/dist/esm/models/fill.js +21 -0
  139. package/dist/esm/models/generate-api-key-request.d.ts +17 -0
  140. package/dist/esm/models/generate-api-key-request.js +14 -0
  141. package/dist/esm/models/generate-api-key-response.d.ts +21 -0
  142. package/dist/esm/models/generate-api-key-response.js +14 -0
  143. package/dist/esm/models/get-api-keys-response.d.ts +18 -0
  144. package/dist/esm/models/get-api-keys-response.js +14 -0
  145. package/dist/esm/models/get-balance-response.d.ts +17 -0
  146. package/dist/esm/models/get-balance-response.js +14 -0
  147. package/dist/esm/models/get-communications-idresponse.d.ts +17 -0
  148. package/dist/esm/models/get-communications-idresponse.js +14 -0
  149. package/dist/esm/models/get-event-metadata-response.d.ts +14 -0
  150. package/dist/esm/models/get-event-metadata-response.js +14 -0
  151. package/dist/esm/models/get-event-response.d.ts +17 -0
  152. package/dist/esm/models/get-event-response.js +14 -0
  153. package/dist/esm/models/get-events-response.d.ts +16 -0
  154. package/dist/esm/models/get-events-response.js +14 -0
  155. package/dist/esm/models/get-exchange-announcements-response.d.ts +15 -0
  156. package/dist/esm/models/get-exchange-announcements-response.js +14 -0
  157. package/dist/esm/models/get-exchange-schedule-response-schedule.d.ts +21 -0
  158. package/dist/esm/models/get-exchange-schedule-response-schedule.js +14 -0
  159. package/dist/esm/models/get-exchange-schedule-response.d.ts +15 -0
  160. package/dist/esm/models/get-exchange-schedule-response.js +14 -0
  161. package/dist/esm/models/get-fills-response.d.ts +16 -0
  162. package/dist/esm/models/get-fills-response.js +14 -0
  163. package/dist/esm/models/get-market-candlesticks-response.d.ts +15 -0
  164. package/dist/esm/models/get-market-candlesticks-response.js +14 -0
  165. package/dist/esm/models/get-market-orderbook-response-orderbook.d.ts +16 -0
  166. package/dist/esm/models/get-market-orderbook-response-orderbook.js +14 -0
  167. package/dist/esm/models/get-market-orderbook-response.d.ts +15 -0
  168. package/dist/esm/models/get-market-orderbook-response.js +14 -0
  169. package/dist/esm/models/get-market-response.d.ts +15 -0
  170. package/dist/esm/models/get-market-response.js +14 -0
  171. package/dist/esm/models/get-markets-response.d.ts +16 -0
  172. package/dist/esm/models/get-markets-response.js +14 -0
  173. package/dist/esm/models/get-milestone-response.d.ts +15 -0
  174. package/dist/esm/models/get-milestone-response.js +14 -0
  175. package/dist/esm/models/get-milestones-response.d.ts +15 -0
  176. package/dist/esm/models/get-milestones-response.js +14 -0
  177. package/dist/esm/models/get-multivariate-event-collection-response.d.ts +15 -0
  178. package/dist/esm/models/get-multivariate-event-collection-response.js +14 -0
  179. package/dist/esm/models/get-multivariate-event-collections-response.d.ts +15 -0
  180. package/dist/esm/models/get-multivariate-event-collections-response.js +14 -0
  181. package/dist/esm/models/get-order-groups-response.d.ts +16 -0
  182. package/dist/esm/models/get-order-groups-response.js +14 -0
  183. package/dist/esm/models/get-order-queue-position-response.d.ts +14 -0
  184. package/dist/esm/models/get-order-queue-position-response.js +14 -0
  185. package/dist/esm/models/get-order-response.d.ts +15 -0
  186. package/dist/esm/models/get-order-response.js +14 -0
  187. package/dist/esm/models/get-orders-response.d.ts +16 -0
  188. package/dist/esm/models/get-orders-response.js +14 -0
  189. package/dist/esm/models/get-positions-response.d.ts +16 -0
  190. package/dist/esm/models/get-positions-response.js +14 -0
  191. package/dist/esm/models/get-queue-positions-request.d.ts +14 -0
  192. package/dist/esm/models/get-queue-positions-request.js +14 -0
  193. package/dist/esm/models/get-queue-positions-response.d.ts +16 -0
  194. package/dist/esm/models/get-queue-positions-response.js +14 -0
  195. package/dist/esm/models/get-quote-response.d.ts +15 -0
  196. package/dist/esm/models/get-quote-response.js +14 -0
  197. package/dist/esm/models/get-quotes-response.d.ts +15 -0
  198. package/dist/esm/models/get-quotes-response.js +14 -0
  199. package/dist/esm/models/get-rfqresponse.d.ts +15 -0
  200. package/dist/esm/models/get-rfqresponse.js +14 -0
  201. package/dist/esm/models/get-rfqs-response.d.ts +15 -0
  202. package/dist/esm/models/get-rfqs-response.js +14 -0
  203. package/dist/esm/models/get-series-by-ticker-response.d.ts +15 -0
  204. package/dist/esm/models/get-series-by-ticker-response.js +14 -0
  205. package/dist/esm/models/get-series-response.d.ts +15 -0
  206. package/dist/esm/models/get-series-response.js +14 -0
  207. package/dist/esm/models/get-settlements-response.d.ts +16 -0
  208. package/dist/esm/models/get-settlements-response.js +14 -0
  209. package/dist/esm/models/get-structured-target-response.d.ts +15 -0
  210. package/dist/esm/models/get-structured-target-response.js +14 -0
  211. package/dist/esm/models/get-structured-targets-response.d.ts +15 -0
  212. package/dist/esm/models/get-structured-targets-response.js +14 -0
  213. package/dist/esm/models/get-total-resting-order-value-response.d.ts +14 -0
  214. package/dist/esm/models/get-total-resting-order-value-response.js +14 -0
  215. package/dist/esm/models/get-trades-response.d.ts +16 -0
  216. package/dist/esm/models/get-trades-response.js +14 -0
  217. package/dist/esm/models/get-user-data-timestamp-response.d.ts +14 -0
  218. package/dist/esm/models/get-user-data-timestamp-response.js +14 -0
  219. package/dist/esm/models/index.d.ts +88 -0
  220. package/dist/esm/models/index.js +88 -0
  221. package/dist/esm/models/lookup-bundle-request-bundle-inner.d.ts +15 -0
  222. package/dist/esm/models/lookup-bundle-request-bundle-inner.js +14 -0
  223. package/dist/esm/models/lookup-bundle-request.d.ts +15 -0
  224. package/dist/esm/models/lookup-bundle-request.js +14 -0
  225. package/dist/esm/models/lookup-bundle-response.d.ts +15 -0
  226. package/dist/esm/models/lookup-bundle-response.js +14 -0
  227. package/dist/esm/models/market.d.ts +49 -0
  228. package/dist/esm/models/market.js +25 -0
  229. package/dist/esm/models/milestone.d.ts +16 -0
  230. package/dist/esm/models/milestone.js +14 -0
  231. package/dist/esm/models/multivariate-event-collection-events-inner.d.ts +17 -0
  232. package/dist/esm/models/multivariate-event-collection-events-inner.js +14 -0
  233. package/dist/esm/models/multivariate-event-collection.d.ts +18 -0
  234. package/dist/esm/models/multivariate-event-collection.js +14 -0
  235. package/dist/esm/models/order-group.d.ts +17 -0
  236. package/dist/esm/models/order-group.js +14 -0
  237. package/dist/esm/models/order.d.ts +49 -0
  238. package/dist/esm/models/order.js +31 -0
  239. package/dist/esm/models/orderbook-level.d.ts +15 -0
  240. package/dist/esm/models/orderbook-level.js +14 -0
  241. package/dist/esm/models/position.d.ts +26 -0
  242. package/dist/esm/models/position.js +17 -0
  243. package/dist/esm/models/quote.d.ts +27 -0
  244. package/dist/esm/models/quote.js +17 -0
  245. package/dist/esm/models/rfq.d.ts +26 -0
  246. package/dist/esm/models/rfq.js +17 -0
  247. package/dist/esm/models/series.d.ts +20 -0
  248. package/dist/esm/models/series.js +14 -0
  249. package/dist/esm/models/settlement.d.ts +24 -0
  250. package/dist/esm/models/settlement.js +17 -0
  251. package/dist/esm/models/structured-target.d.ts +16 -0
  252. package/dist/esm/models/structured-target.js +14 -0
  253. package/dist/esm/models/trade.d.ts +24 -0
  254. package/dist/esm/models/trade.js +17 -0
  255. package/dist/index.d.ts +14 -0
  256. package/dist/index.js +32 -0
  257. package/dist/models/accept-quote-request.d.ts +14 -0
  258. package/dist/models/accept-quote-request.js +15 -0
  259. package/dist/models/amend-order-request.d.ts +16 -0
  260. package/dist/models/amend-order-request.js +15 -0
  261. package/dist/models/amend-order-response.d.ts +15 -0
  262. package/dist/models/amend-order-response.js +15 -0
  263. package/dist/models/announcement.d.ts +28 -0
  264. package/dist/models/announcement.js +25 -0
  265. package/dist/models/api-key.d.ts +25 -0
  266. package/dist/models/api-key.js +15 -0
  267. package/dist/models/batch-cancel-orders-request.d.ts +14 -0
  268. package/dist/models/batch-cancel-orders-request.js +15 -0
  269. package/dist/models/batch-cancel-orders-response-responses-inner.d.ts +17 -0
  270. package/dist/models/batch-cancel-orders-response-responses-inner.js +15 -0
  271. package/dist/models/batch-cancel-orders-response.d.ts +15 -0
  272. package/dist/models/batch-cancel-orders-response.js +15 -0
  273. package/dist/models/batch-create-orders-request.d.ts +15 -0
  274. package/dist/models/batch-create-orders-request.js +15 -0
  275. package/dist/models/batch-create-orders-response-responses-inner.d.ts +17 -0
  276. package/dist/models/batch-create-orders-response-responses-inner.js +15 -0
  277. package/dist/models/batch-create-orders-response.d.ts +15 -0
  278. package/dist/models/batch-create-orders-response.js +15 -0
  279. package/dist/models/cancel-order-response.d.ts +16 -0
  280. package/dist/models/cancel-order-response.js +15 -0
  281. package/dist/models/candlestick.d.ts +20 -0
  282. package/dist/models/candlestick.js +15 -0
  283. package/dist/models/create-api-key-request.d.ts +21 -0
  284. package/dist/models/create-api-key-request.js +15 -0
  285. package/dist/models/create-api-key-response.d.ts +17 -0
  286. package/dist/models/create-api-key-response.js +15 -0
  287. package/dist/models/create-order-group-request.d.ts +14 -0
  288. package/dist/models/create-order-group-request.js +15 -0
  289. package/dist/models/create-order-group-response.d.ts +15 -0
  290. package/dist/models/create-order-group-response.js +15 -0
  291. package/dist/models/create-order-request.d.ts +39 -0
  292. package/dist/models/create-order-request.js +28 -0
  293. package/dist/models/create-order-response.d.ts +15 -0
  294. package/dist/models/create-order-response.js +15 -0
  295. package/dist/models/create-quote-request.d.ts +16 -0
  296. package/dist/models/create-quote-request.js +15 -0
  297. package/dist/models/create-quote-response.d.ts +15 -0
  298. package/dist/models/create-quote-response.js +15 -0
  299. package/dist/models/create-rfqrequest.d.ts +22 -0
  300. package/dist/models/create-rfqrequest.js +20 -0
  301. package/dist/models/create-rfqresponse.d.ts +15 -0
  302. package/dist/models/create-rfqresponse.js +15 -0
  303. package/dist/models/daily-schedule.d.ts +15 -0
  304. package/dist/models/daily-schedule.js +15 -0
  305. package/dist/models/decrease-order-request.d.ts +14 -0
  306. package/dist/models/decrease-order-request.js +15 -0
  307. package/dist/models/decrease-order-response.d.ts +15 -0
  308. package/dist/models/decrease-order-response.js +15 -0
  309. package/dist/models/error-response-error.d.ts +25 -0
  310. package/dist/models/error-response-error.js +15 -0
  311. package/dist/models/error-response.d.ts +15 -0
  312. package/dist/models/error-response.js +15 -0
  313. package/dist/models/event.d.ts +26 -0
  314. package/dist/models/event.js +21 -0
  315. package/dist/models/exchange-status.d.ts +15 -0
  316. package/dist/models/exchange-status.js +15 -0
  317. package/dist/models/fill.d.ts +32 -0
  318. package/dist/models/fill.js +24 -0
  319. package/dist/models/generate-api-key-request.d.ts +17 -0
  320. package/dist/models/generate-api-key-request.js +15 -0
  321. package/dist/models/generate-api-key-response.d.ts +21 -0
  322. package/dist/models/generate-api-key-response.js +15 -0
  323. package/dist/models/get-api-keys-response.d.ts +18 -0
  324. package/dist/models/get-api-keys-response.js +15 -0
  325. package/dist/models/get-balance-response.d.ts +17 -0
  326. package/dist/models/get-balance-response.js +15 -0
  327. package/dist/models/get-communications-idresponse.d.ts +17 -0
  328. package/dist/models/get-communications-idresponse.js +15 -0
  329. package/dist/models/get-event-metadata-response.d.ts +14 -0
  330. package/dist/models/get-event-metadata-response.js +15 -0
  331. package/dist/models/get-event-response.d.ts +17 -0
  332. package/dist/models/get-event-response.js +15 -0
  333. package/dist/models/get-events-response.d.ts +16 -0
  334. package/dist/models/get-events-response.js +15 -0
  335. package/dist/models/get-exchange-announcements-response.d.ts +15 -0
  336. package/dist/models/get-exchange-announcements-response.js +15 -0
  337. package/dist/models/get-exchange-schedule-response-schedule.d.ts +21 -0
  338. package/dist/models/get-exchange-schedule-response-schedule.js +15 -0
  339. package/dist/models/get-exchange-schedule-response.d.ts +15 -0
  340. package/dist/models/get-exchange-schedule-response.js +15 -0
  341. package/dist/models/get-fills-response.d.ts +16 -0
  342. package/dist/models/get-fills-response.js +15 -0
  343. package/dist/models/get-market-candlesticks-response.d.ts +15 -0
  344. package/dist/models/get-market-candlesticks-response.js +15 -0
  345. package/dist/models/get-market-orderbook-response-orderbook.d.ts +16 -0
  346. package/dist/models/get-market-orderbook-response-orderbook.js +15 -0
  347. package/dist/models/get-market-orderbook-response.d.ts +15 -0
  348. package/dist/models/get-market-orderbook-response.js +15 -0
  349. package/dist/models/get-market-response.d.ts +15 -0
  350. package/dist/models/get-market-response.js +15 -0
  351. package/dist/models/get-markets-response.d.ts +16 -0
  352. package/dist/models/get-markets-response.js +15 -0
  353. package/dist/models/get-milestone-response.d.ts +15 -0
  354. package/dist/models/get-milestone-response.js +15 -0
  355. package/dist/models/get-milestones-response.d.ts +15 -0
  356. package/dist/models/get-milestones-response.js +15 -0
  357. package/dist/models/get-multivariate-event-collection-response.d.ts +15 -0
  358. package/dist/models/get-multivariate-event-collection-response.js +15 -0
  359. package/dist/models/get-multivariate-event-collections-response.d.ts +15 -0
  360. package/dist/models/get-multivariate-event-collections-response.js +15 -0
  361. package/dist/models/get-order-groups-response.d.ts +16 -0
  362. package/dist/models/get-order-groups-response.js +15 -0
  363. package/dist/models/get-order-queue-position-response.d.ts +14 -0
  364. package/dist/models/get-order-queue-position-response.js +15 -0
  365. package/dist/models/get-order-response.d.ts +15 -0
  366. package/dist/models/get-order-response.js +15 -0
  367. package/dist/models/get-orders-response.d.ts +16 -0
  368. package/dist/models/get-orders-response.js +15 -0
  369. package/dist/models/get-positions-response.d.ts +16 -0
  370. package/dist/models/get-positions-response.js +15 -0
  371. package/dist/models/get-queue-positions-request.d.ts +14 -0
  372. package/dist/models/get-queue-positions-request.js +15 -0
  373. package/dist/models/get-queue-positions-response.d.ts +16 -0
  374. package/dist/models/get-queue-positions-response.js +15 -0
  375. package/dist/models/get-quote-response.d.ts +15 -0
  376. package/dist/models/get-quote-response.js +15 -0
  377. package/dist/models/get-quotes-response.d.ts +15 -0
  378. package/dist/models/get-quotes-response.js +15 -0
  379. package/dist/models/get-rfqresponse.d.ts +15 -0
  380. package/dist/models/get-rfqresponse.js +15 -0
  381. package/dist/models/get-rfqs-response.d.ts +15 -0
  382. package/dist/models/get-rfqs-response.js +15 -0
  383. package/dist/models/get-series-by-ticker-response.d.ts +15 -0
  384. package/dist/models/get-series-by-ticker-response.js +15 -0
  385. package/dist/models/get-series-response.d.ts +15 -0
  386. package/dist/models/get-series-response.js +15 -0
  387. package/dist/models/get-settlements-response.d.ts +16 -0
  388. package/dist/models/get-settlements-response.js +15 -0
  389. package/dist/models/get-structured-target-response.d.ts +15 -0
  390. package/dist/models/get-structured-target-response.js +15 -0
  391. package/dist/models/get-structured-targets-response.d.ts +15 -0
  392. package/dist/models/get-structured-targets-response.js +15 -0
  393. package/dist/models/get-total-resting-order-value-response.d.ts +14 -0
  394. package/dist/models/get-total-resting-order-value-response.js +15 -0
  395. package/dist/models/get-trades-response.d.ts +16 -0
  396. package/dist/models/get-trades-response.js +15 -0
  397. package/dist/models/get-user-data-timestamp-response.d.ts +14 -0
  398. package/dist/models/get-user-data-timestamp-response.js +15 -0
  399. package/dist/models/index.d.ts +88 -0
  400. package/dist/models/index.js +104 -0
  401. package/dist/models/lookup-bundle-request-bundle-inner.d.ts +15 -0
  402. package/dist/models/lookup-bundle-request-bundle-inner.js +15 -0
  403. package/dist/models/lookup-bundle-request.d.ts +15 -0
  404. package/dist/models/lookup-bundle-request.js +15 -0
  405. package/dist/models/lookup-bundle-response.d.ts +15 -0
  406. package/dist/models/lookup-bundle-response.js +15 -0
  407. package/dist/models/market.d.ts +49 -0
  408. package/dist/models/market.js +28 -0
  409. package/dist/models/milestone.d.ts +16 -0
  410. package/dist/models/milestone.js +15 -0
  411. package/dist/models/multivariate-event-collection-events-inner.d.ts +17 -0
  412. package/dist/models/multivariate-event-collection-events-inner.js +15 -0
  413. package/dist/models/multivariate-event-collection.d.ts +18 -0
  414. package/dist/models/multivariate-event-collection.js +15 -0
  415. package/dist/models/order-group.d.ts +17 -0
  416. package/dist/models/order-group.js +15 -0
  417. package/dist/models/order.d.ts +49 -0
  418. package/dist/models/order.js +34 -0
  419. package/dist/models/orderbook-level.d.ts +15 -0
  420. package/dist/models/orderbook-level.js +15 -0
  421. package/dist/models/position.d.ts +26 -0
  422. package/dist/models/position.js +20 -0
  423. package/dist/models/quote.d.ts +27 -0
  424. package/dist/models/quote.js +20 -0
  425. package/dist/models/rfq.d.ts +26 -0
  426. package/dist/models/rfq.js +20 -0
  427. package/dist/models/series.d.ts +20 -0
  428. package/dist/models/series.js +15 -0
  429. package/dist/models/settlement.d.ts +24 -0
  430. package/dist/models/settlement.js +20 -0
  431. package/dist/models/structured-target.d.ts +16 -0
  432. package/dist/models/structured-target.js +15 -0
  433. package/dist/models/trade.d.ts +24 -0
  434. package/dist/models/trade.js +20 -0
  435. package/docs/AcceptQuoteRequest.md +20 -0
  436. package/docs/AmendOrderRequest.md +24 -0
  437. package/docs/AmendOrderResponse.md +20 -0
  438. package/docs/Announcement.md +26 -0
  439. package/docs/ApiKey.md +24 -0
  440. package/docs/ApiKeysApi.md +223 -0
  441. package/docs/BatchCancelOrdersRequest.md +20 -0
  442. package/docs/BatchCancelOrdersResponse.md +20 -0
  443. package/docs/BatchCancelOrdersResponseResponsesInner.md +24 -0
  444. package/docs/BatchCreateOrdersRequest.md +20 -0
  445. package/docs/BatchCreateOrdersResponse.md +20 -0
  446. package/docs/BatchCreateOrdersResponseResponsesInner.md +22 -0
  447. package/docs/CancelOrderResponse.md +22 -0
  448. package/docs/Candlestick.md +32 -0
  449. package/docs/CommunicationsApi.md +595 -0
  450. package/docs/CreateApiKeyRequest.md +22 -0
  451. package/docs/CreateApiKeyResponse.md +20 -0
  452. package/docs/CreateOrderGroupRequest.md +20 -0
  453. package/docs/CreateOrderGroupResponse.md +20 -0
  454. package/docs/CreateOrderRequest.md +40 -0
  455. package/docs/CreateOrderResponse.md +20 -0
  456. package/docs/CreateQuoteRequest.md +24 -0
  457. package/docs/CreateQuoteResponse.md +20 -0
  458. package/docs/CreateRFQRequest.md +26 -0
  459. package/docs/CreateRFQResponse.md +20 -0
  460. package/docs/DailySchedule.md +22 -0
  461. package/docs/DecreaseOrderRequest.md +20 -0
  462. package/docs/DecreaseOrderResponse.md +20 -0
  463. package/docs/ErrorResponse.md +20 -0
  464. package/docs/ErrorResponseError.md +24 -0
  465. package/docs/Event.md +30 -0
  466. package/docs/EventsApi.md +190 -0
  467. package/docs/ExchangeApi.md +192 -0
  468. package/docs/ExchangeStatus.md +22 -0
  469. package/docs/Fill.md +36 -0
  470. package/docs/GenerateApiKeyRequest.md +20 -0
  471. package/docs/GenerateApiKeyResponse.md +22 -0
  472. package/docs/GetApiKeysResponse.md +20 -0
  473. package/docs/GetBalanceResponse.md +20 -0
  474. package/docs/GetCommunicationsIDResponse.md +20 -0
  475. package/docs/GetEventMetadataResponse.md +20 -0
  476. package/docs/GetEventResponse.md +22 -0
  477. package/docs/GetEventsResponse.md +22 -0
  478. package/docs/GetExchangeAnnouncementsResponse.md +20 -0
  479. package/docs/GetExchangeScheduleResponse.md +20 -0
  480. package/docs/GetExchangeScheduleResponseSchedule.md +32 -0
  481. package/docs/GetFillsResponse.md +22 -0
  482. package/docs/GetMarketCandlesticksResponse.md +20 -0
  483. package/docs/GetMarketOrderbookResponse.md +20 -0
  484. package/docs/GetMarketOrderbookResponseOrderbook.md +22 -0
  485. package/docs/GetMarketResponse.md +20 -0
  486. package/docs/GetMarketsResponse.md +22 -0
  487. package/docs/GetMilestoneResponse.md +20 -0
  488. package/docs/GetMilestonesResponse.md +20 -0
  489. package/docs/GetMultivariateEventCollectionResponse.md +20 -0
  490. package/docs/GetMultivariateEventCollectionsResponse.md +20 -0
  491. package/docs/GetOrderGroupsResponse.md +22 -0
  492. package/docs/GetOrderQueuePositionResponse.md +20 -0
  493. package/docs/GetOrderResponse.md +20 -0
  494. package/docs/GetOrdersResponse.md +22 -0
  495. package/docs/GetPositionsResponse.md +22 -0
  496. package/docs/GetQueuePositionsRequest.md +20 -0
  497. package/docs/GetQueuePositionsResponse.md +20 -0
  498. package/docs/GetQuoteResponse.md +20 -0
  499. package/docs/GetQuotesResponse.md +20 -0
  500. package/docs/GetRFQResponse.md +20 -0
  501. package/docs/GetRFQsResponse.md +20 -0
  502. package/docs/GetSeriesByTickerResponse.md +20 -0
  503. package/docs/GetSeriesResponse.md +20 -0
  504. package/docs/GetSettlementsResponse.md +22 -0
  505. package/docs/GetStructuredTargetResponse.md +20 -0
  506. package/docs/GetStructuredTargetsResponse.md +20 -0
  507. package/docs/GetTotalRestingOrderValueResponse.md +20 -0
  508. package/docs/GetTradesResponse.md +22 -0
  509. package/docs/GetUserDataTimestampResponse.md +20 -0
  510. package/docs/LookupBundleRequest.md +20 -0
  511. package/docs/LookupBundleRequestBundleInner.md +22 -0
  512. package/docs/LookupBundleResponse.md +22 -0
  513. package/docs/Market.md +56 -0
  514. package/docs/MarketsApi.md +330 -0
  515. package/docs/Milestone.md +24 -0
  516. package/docs/MilestonesApi.md +119 -0
  517. package/docs/MultivariateCollectionsApi.md +176 -0
  518. package/docs/MultivariateEventCollection.md +26 -0
  519. package/docs/MultivariateEventCollectionEventsInner.md +26 -0
  520. package/docs/Order.md +46 -0
  521. package/docs/OrderGroup.md +26 -0
  522. package/docs/OrderbookLevel.md +22 -0
  523. package/docs/PortfolioApi.md +1109 -0
  524. package/docs/Position.md +34 -0
  525. package/docs/Quote.md +36 -0
  526. package/docs/RFQ.md +34 -0
  527. package/docs/Series.md +26 -0
  528. package/docs/SeriesApi.md +116 -0
  529. package/docs/Settlement.md +30 -0
  530. package/docs/StructuredTarget.md +24 -0
  531. package/docs/StructuredTargetsApi.md +119 -0
  532. package/docs/Trade.md +30 -0
  533. package/git_push.sh +57 -0
  534. package/index.ts +18 -0
  535. package/models/accept-quote-request.ts +20 -0
  536. package/models/amend-order-request.ts +22 -0
  537. package/models/amend-order-response.ts +23 -0
  538. package/models/announcement.ts +38 -0
  539. package/models/api-key.ts +31 -0
  540. package/models/batch-cancel-orders-request.ts +20 -0
  541. package/models/batch-cancel-orders-response-responses-inner.ts +25 -0
  542. package/models/batch-cancel-orders-response.ts +23 -0
  543. package/models/batch-create-orders-request.ts +23 -0
  544. package/models/batch-create-orders-response-responses-inner.ts +27 -0
  545. package/models/batch-create-orders-response.ts +23 -0
  546. package/models/cancel-order-response.ts +24 -0
  547. package/models/candlestick.ts +26 -0
  548. package/models/create-api-key-request.ts +27 -0
  549. package/models/create-api-key-response.ts +23 -0
  550. package/models/create-order-group-request.ts +20 -0
  551. package/models/create-order-group-response.ts +23 -0
  552. package/models/create-order-request.ts +50 -0
  553. package/models/create-order-response.ts +23 -0
  554. package/models/create-quote-request.ts +22 -0
  555. package/models/create-quote-response.ts +23 -0
  556. package/models/create-rfqrequest.ts +31 -0
  557. package/models/create-rfqresponse.ts +23 -0
  558. package/models/daily-schedule.ts +21 -0
  559. package/models/decrease-order-request.ts +20 -0
  560. package/models/decrease-order-response.ts +23 -0
  561. package/models/error-response-error.ts +31 -0
  562. package/models/error-response.ts +23 -0
  563. package/models/event.ts +37 -0
  564. package/models/exchange-status.ts +21 -0
  565. package/models/fill.ts +42 -0
  566. package/models/generate-api-key-request.ts +23 -0
  567. package/models/generate-api-key-response.ts +27 -0
  568. package/models/get-api-keys-response.ts +26 -0
  569. package/models/get-balance-response.ts +23 -0
  570. package/models/get-communications-idresponse.ts +23 -0
  571. package/models/get-event-metadata-response.ts +20 -0
  572. package/models/get-event-response.ts +27 -0
  573. package/models/get-events-response.ts +24 -0
  574. package/models/get-exchange-announcements-response.ts +23 -0
  575. package/models/get-exchange-schedule-response-schedule.ts +29 -0
  576. package/models/get-exchange-schedule-response.ts +23 -0
  577. package/models/get-fills-response.ts +24 -0
  578. package/models/get-market-candlesticks-response.ts +23 -0
  579. package/models/get-market-orderbook-response-orderbook.ts +24 -0
  580. package/models/get-market-orderbook-response.ts +23 -0
  581. package/models/get-market-response.ts +23 -0
  582. package/models/get-markets-response.ts +24 -0
  583. package/models/get-milestone-response.ts +23 -0
  584. package/models/get-milestones-response.ts +23 -0
  585. package/models/get-multivariate-event-collection-response.ts +23 -0
  586. package/models/get-multivariate-event-collections-response.ts +23 -0
  587. package/models/get-order-groups-response.ts +24 -0
  588. package/models/get-order-queue-position-response.ts +20 -0
  589. package/models/get-order-response.ts +23 -0
  590. package/models/get-orders-response.ts +24 -0
  591. package/models/get-positions-response.ts +24 -0
  592. package/models/get-queue-positions-request.ts +20 -0
  593. package/models/get-queue-positions-response.ts +20 -0
  594. package/models/get-quote-response.ts +23 -0
  595. package/models/get-quotes-response.ts +23 -0
  596. package/models/get-rfqresponse.ts +23 -0
  597. package/models/get-rfqs-response.ts +23 -0
  598. package/models/get-series-by-ticker-response.ts +23 -0
  599. package/models/get-series-response.ts +23 -0
  600. package/models/get-settlements-response.ts +24 -0
  601. package/models/get-structured-target-response.ts +23 -0
  602. package/models/get-structured-targets-response.ts +23 -0
  603. package/models/get-total-resting-order-value-response.ts +20 -0
  604. package/models/get-trades-response.ts +24 -0
  605. package/models/get-user-data-timestamp-response.ts +20 -0
  606. package/models/index.ts +88 -0
  607. package/models/lookup-bundle-request-bundle-inner.ts +21 -0
  608. package/models/lookup-bundle-request.ts +23 -0
  609. package/models/lookup-bundle-response.ts +21 -0
  610. package/models/market.ts +59 -0
  611. package/models/milestone.ts +22 -0
  612. package/models/multivariate-event-collection-events-inner.ts +23 -0
  613. package/models/multivariate-event-collection.ts +26 -0
  614. package/models/order-group.ts +23 -0
  615. package/models/order.ts +61 -0
  616. package/models/orderbook-level.ts +21 -0
  617. package/models/position.ts +35 -0
  618. package/models/quote.ts +36 -0
  619. package/models/rfq.ts +35 -0
  620. package/models/series.ts +26 -0
  621. package/models/settlement.ts +33 -0
  622. package/models/structured-target.ts +22 -0
  623. package/models/trade.ts +33 -0
  624. package/package.json +33 -0
  625. package/tsconfig.esm.json +7 -0
  626. package/tsconfig.json +18 -0
@@ -0,0 +1,1491 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Kalshi Trading API
5
+ * Complete API for the Kalshi trading platform including all handlers for SDK generation
6
+ *
7
+ * The version of the OpenAPI document: 2.0.0
8
+ * Contact: support@kalshi.com
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
15
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
16
+ return new (P || (P = Promise))(function (resolve, reject) {
17
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
18
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
19
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
20
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
21
+ });
22
+ };
23
+ import globalAxios from 'axios';
24
+ // URLSearchParams not necessarily used
25
+ // @ts-ignore
26
+ import { URL } from 'url';
27
+ // Some imports not used depending on template conditions
28
+ // @ts-ignore
29
+ import { DUMMY_BASE_URL, assertParamExists, setBearerAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
30
+ // @ts-ignore
31
+ import { BASE_PATH, BaseAPI, operationServerMap } from '../base';
32
+ /**
33
+ * PortfolioApi - axios parameter creator
34
+ */
35
+ export const PortfolioApiAxiosParamCreator = function (configuration) {
36
+ return {
37
+ /**
38
+ * Amend an existing order
39
+ * @summary Amend Order
40
+ * @param {string} orderId Order ID
41
+ * @param {AmendOrderRequest} amendOrderRequest
42
+ * @param {*} [options] Override http request option.
43
+ * @throws {RequiredError}
44
+ */
45
+ amendOrder: (orderId_1, amendOrderRequest_1, ...args_1) => __awaiter(this, [orderId_1, amendOrderRequest_1, ...args_1], void 0, function* (orderId, amendOrderRequest, options = {}) {
46
+ // verify required parameter 'orderId' is not null or undefined
47
+ assertParamExists('amendOrder', 'orderId', orderId);
48
+ // verify required parameter 'amendOrderRequest' is not null or undefined
49
+ assertParamExists('amendOrder', 'amendOrderRequest', amendOrderRequest);
50
+ const localVarPath = `/portfolio/orders/{order_id}/amend`
51
+ .replace(`{${"order_id"}}`, encodeURIComponent(String(orderId)));
52
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
53
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
54
+ let baseOptions;
55
+ if (configuration) {
56
+ baseOptions = configuration.baseOptions;
57
+ }
58
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
59
+ const localVarHeaderParameter = {};
60
+ const localVarQueryParameter = {};
61
+ // authentication bearerAuth required
62
+ // http bearer authentication required
63
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
64
+ localVarHeaderParameter['Content-Type'] = 'application/json';
65
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
66
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
67
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
68
+ localVarRequestOptions.data = serializeDataIfNeeded(amendOrderRequest, localVarRequestOptions, configuration);
69
+ return {
70
+ url: toPathString(localVarUrlObj),
71
+ options: localVarRequestOptions,
72
+ };
73
+ }),
74
+ /**
75
+ * Cancel multiple orders in a single request
76
+ * @summary Batch Cancel Orders
77
+ * @param {BatchCancelOrdersRequest} batchCancelOrdersRequest
78
+ * @param {*} [options] Override http request option.
79
+ * @throws {RequiredError}
80
+ */
81
+ batchCancelOrders: (batchCancelOrdersRequest_1, ...args_1) => __awaiter(this, [batchCancelOrdersRequest_1, ...args_1], void 0, function* (batchCancelOrdersRequest, options = {}) {
82
+ // verify required parameter 'batchCancelOrdersRequest' is not null or undefined
83
+ assertParamExists('batchCancelOrders', 'batchCancelOrdersRequest', batchCancelOrdersRequest);
84
+ const localVarPath = `/portfolio/orders/batched`;
85
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
86
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
87
+ let baseOptions;
88
+ if (configuration) {
89
+ baseOptions = configuration.baseOptions;
90
+ }
91
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
92
+ const localVarHeaderParameter = {};
93
+ const localVarQueryParameter = {};
94
+ // authentication bearerAuth required
95
+ // http bearer authentication required
96
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
97
+ localVarHeaderParameter['Content-Type'] = 'application/json';
98
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
99
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
100
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
101
+ localVarRequestOptions.data = serializeDataIfNeeded(batchCancelOrdersRequest, localVarRequestOptions, configuration);
102
+ return {
103
+ url: toPathString(localVarUrlObj),
104
+ options: localVarRequestOptions,
105
+ };
106
+ }),
107
+ /**
108
+ * Create multiple orders in a single request
109
+ * @summary Batch Create Orders
110
+ * @param {BatchCreateOrdersRequest} batchCreateOrdersRequest
111
+ * @param {*} [options] Override http request option.
112
+ * @throws {RequiredError}
113
+ */
114
+ batchCreateOrders: (batchCreateOrdersRequest_1, ...args_1) => __awaiter(this, [batchCreateOrdersRequest_1, ...args_1], void 0, function* (batchCreateOrdersRequest, options = {}) {
115
+ // verify required parameter 'batchCreateOrdersRequest' is not null or undefined
116
+ assertParamExists('batchCreateOrders', 'batchCreateOrdersRequest', batchCreateOrdersRequest);
117
+ const localVarPath = `/portfolio/orders/batched`;
118
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
119
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
120
+ let baseOptions;
121
+ if (configuration) {
122
+ baseOptions = configuration.baseOptions;
123
+ }
124
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
125
+ const localVarHeaderParameter = {};
126
+ const localVarQueryParameter = {};
127
+ // authentication bearerAuth required
128
+ // http bearer authentication required
129
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
130
+ localVarHeaderParameter['Content-Type'] = 'application/json';
131
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
132
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
133
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
134
+ localVarRequestOptions.data = serializeDataIfNeeded(batchCreateOrdersRequest, localVarRequestOptions, configuration);
135
+ return {
136
+ url: toPathString(localVarUrlObj),
137
+ options: localVarRequestOptions,
138
+ };
139
+ }),
140
+ /**
141
+ * Cancel an order
142
+ * @summary Cancel Order
143
+ * @param {string} orderId Order ID
144
+ * @param {*} [options] Override http request option.
145
+ * @throws {RequiredError}
146
+ */
147
+ cancelOrder: (orderId_1, ...args_1) => __awaiter(this, [orderId_1, ...args_1], void 0, function* (orderId, options = {}) {
148
+ // verify required parameter 'orderId' is not null or undefined
149
+ assertParamExists('cancelOrder', 'orderId', orderId);
150
+ const localVarPath = `/portfolio/orders/{order_id}`
151
+ .replace(`{${"order_id"}}`, encodeURIComponent(String(orderId)));
152
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
153
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
154
+ let baseOptions;
155
+ if (configuration) {
156
+ baseOptions = configuration.baseOptions;
157
+ }
158
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
159
+ const localVarHeaderParameter = {};
160
+ const localVarQueryParameter = {};
161
+ // authentication bearerAuth required
162
+ // http bearer authentication required
163
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
164
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
165
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
166
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
167
+ return {
168
+ url: toPathString(localVarUrlObj),
169
+ options: localVarRequestOptions,
170
+ };
171
+ }),
172
+ /**
173
+ * Create a new order
174
+ * @summary Create Order
175
+ * @param {CreateOrderRequest} createOrderRequest
176
+ * @param {*} [options] Override http request option.
177
+ * @throws {RequiredError}
178
+ */
179
+ createOrder: (createOrderRequest_1, ...args_1) => __awaiter(this, [createOrderRequest_1, ...args_1], void 0, function* (createOrderRequest, options = {}) {
180
+ // verify required parameter 'createOrderRequest' is not null or undefined
181
+ assertParamExists('createOrder', 'createOrderRequest', createOrderRequest);
182
+ const localVarPath = `/portfolio/orders`;
183
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
184
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
185
+ let baseOptions;
186
+ if (configuration) {
187
+ baseOptions = configuration.baseOptions;
188
+ }
189
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
190
+ const localVarHeaderParameter = {};
191
+ const localVarQueryParameter = {};
192
+ // authentication bearerAuth required
193
+ // http bearer authentication required
194
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
195
+ localVarHeaderParameter['Content-Type'] = 'application/json';
196
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
197
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
198
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
199
+ localVarRequestOptions.data = serializeDataIfNeeded(createOrderRequest, localVarRequestOptions, configuration);
200
+ return {
201
+ url: toPathString(localVarUrlObj),
202
+ options: localVarRequestOptions,
203
+ };
204
+ }),
205
+ /**
206
+ * Create a new order group
207
+ * @summary Create Order Group
208
+ * @param {CreateOrderGroupRequest} createOrderGroupRequest
209
+ * @param {*} [options] Override http request option.
210
+ * @throws {RequiredError}
211
+ */
212
+ createOrderGroup: (createOrderGroupRequest_1, ...args_1) => __awaiter(this, [createOrderGroupRequest_1, ...args_1], void 0, function* (createOrderGroupRequest, options = {}) {
213
+ // verify required parameter 'createOrderGroupRequest' is not null or undefined
214
+ assertParamExists('createOrderGroup', 'createOrderGroupRequest', createOrderGroupRequest);
215
+ const localVarPath = `/portfolio/order_groups/create`;
216
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
217
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
218
+ let baseOptions;
219
+ if (configuration) {
220
+ baseOptions = configuration.baseOptions;
221
+ }
222
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
223
+ const localVarHeaderParameter = {};
224
+ const localVarQueryParameter = {};
225
+ // authentication bearerAuth required
226
+ // http bearer authentication required
227
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
228
+ localVarHeaderParameter['Content-Type'] = 'application/json';
229
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
230
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
231
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
232
+ localVarRequestOptions.data = serializeDataIfNeeded(createOrderGroupRequest, localVarRequestOptions, configuration);
233
+ return {
234
+ url: toPathString(localVarUrlObj),
235
+ options: localVarRequestOptions,
236
+ };
237
+ }),
238
+ /**
239
+ * Decrease the size of an existing order
240
+ * @summary Decrease Order
241
+ * @param {string} orderId Order ID
242
+ * @param {DecreaseOrderRequest} decreaseOrderRequest
243
+ * @param {*} [options] Override http request option.
244
+ * @throws {RequiredError}
245
+ */
246
+ decreaseOrder: (orderId_1, decreaseOrderRequest_1, ...args_1) => __awaiter(this, [orderId_1, decreaseOrderRequest_1, ...args_1], void 0, function* (orderId, decreaseOrderRequest, options = {}) {
247
+ // verify required parameter 'orderId' is not null or undefined
248
+ assertParamExists('decreaseOrder', 'orderId', orderId);
249
+ // verify required parameter 'decreaseOrderRequest' is not null or undefined
250
+ assertParamExists('decreaseOrder', 'decreaseOrderRequest', decreaseOrderRequest);
251
+ const localVarPath = `/portfolio/orders/{order_id}/decrease`
252
+ .replace(`{${"order_id"}}`, encodeURIComponent(String(orderId)));
253
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
254
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
255
+ let baseOptions;
256
+ if (configuration) {
257
+ baseOptions = configuration.baseOptions;
258
+ }
259
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
260
+ const localVarHeaderParameter = {};
261
+ const localVarQueryParameter = {};
262
+ // authentication bearerAuth required
263
+ // http bearer authentication required
264
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
265
+ localVarHeaderParameter['Content-Type'] = 'application/json';
266
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
267
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
268
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
269
+ localVarRequestOptions.data = serializeDataIfNeeded(decreaseOrderRequest, localVarRequestOptions, configuration);
270
+ return {
271
+ url: toPathString(localVarUrlObj),
272
+ options: localVarRequestOptions,
273
+ };
274
+ }),
275
+ /**
276
+ * Delete an order group
277
+ * @summary Delete Order Group
278
+ * @param {string} orderGroupId Order group ID
279
+ * @param {*} [options] Override http request option.
280
+ * @throws {RequiredError}
281
+ */
282
+ deleteOrderGroup: (orderGroupId_1, ...args_1) => __awaiter(this, [orderGroupId_1, ...args_1], void 0, function* (orderGroupId, options = {}) {
283
+ // verify required parameter 'orderGroupId' is not null or undefined
284
+ assertParamExists('deleteOrderGroup', 'orderGroupId', orderGroupId);
285
+ const localVarPath = `/portfolio/order_groups/{order_group_id}`
286
+ .replace(`{${"order_group_id"}}`, encodeURIComponent(String(orderGroupId)));
287
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
288
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
289
+ let baseOptions;
290
+ if (configuration) {
291
+ baseOptions = configuration.baseOptions;
292
+ }
293
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
294
+ const localVarHeaderParameter = {};
295
+ const localVarQueryParameter = {};
296
+ // authentication bearerAuth required
297
+ // http bearer authentication required
298
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
299
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
300
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
301
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
302
+ return {
303
+ url: toPathString(localVarUrlObj),
304
+ options: localVarRequestOptions,
305
+ };
306
+ }),
307
+ /**
308
+ * Get the user\'s current balance
309
+ * @summary Get Balance
310
+ * @param {*} [options] Override http request option.
311
+ * @throws {RequiredError}
312
+ */
313
+ getBalance: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
314
+ const localVarPath = `/portfolio/balance`;
315
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
316
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
317
+ let baseOptions;
318
+ if (configuration) {
319
+ baseOptions = configuration.baseOptions;
320
+ }
321
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
322
+ const localVarHeaderParameter = {};
323
+ const localVarQueryParameter = {};
324
+ // authentication bearerAuth required
325
+ // http bearer authentication required
326
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
327
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
328
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
329
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
330
+ return {
331
+ url: toPathString(localVarUrlObj),
332
+ options: localVarRequestOptions,
333
+ };
334
+ }),
335
+ /**
336
+ * Get fills for the logged-in user. A fill represents a partial or complete execution of an order. When an order matches with another order in the orderbook, a fill is created for each side of the trade.
337
+ * @summary Get Fills
338
+ * @param {string} [ticker] Filter by market ticker
339
+ * @param {string} [orderId] Filter by order ID
340
+ * @param {number} [minTs] Filter items after this Unix timestamp
341
+ * @param {number} [maxTs] Filter items before this Unix timestamp
342
+ * @param {number} [limit] Number of results per page. Defaults to 100. Maximum value is 200.
343
+ * @param {string} [cursor] Pagination cursor. Use the cursor value returned from the previous response to get the next page of results. Leave empty for the first page.
344
+ * @param {*} [options] Override http request option.
345
+ * @throws {RequiredError}
346
+ */
347
+ getFills: (ticker_1, orderId_1, minTs_1, maxTs_1, limit_1, cursor_1, ...args_1) => __awaiter(this, [ticker_1, orderId_1, minTs_1, maxTs_1, limit_1, cursor_1, ...args_1], void 0, function* (ticker, orderId, minTs, maxTs, limit, cursor, options = {}) {
348
+ const localVarPath = `/portfolio/fills`;
349
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
350
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
351
+ let baseOptions;
352
+ if (configuration) {
353
+ baseOptions = configuration.baseOptions;
354
+ }
355
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
356
+ const localVarHeaderParameter = {};
357
+ const localVarQueryParameter = {};
358
+ // authentication bearerAuth required
359
+ // http bearer authentication required
360
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
361
+ if (ticker !== undefined) {
362
+ localVarQueryParameter['ticker'] = ticker;
363
+ }
364
+ if (orderId !== undefined) {
365
+ localVarQueryParameter['order_id'] = orderId;
366
+ }
367
+ if (minTs !== undefined) {
368
+ localVarQueryParameter['min_ts'] = minTs;
369
+ }
370
+ if (maxTs !== undefined) {
371
+ localVarQueryParameter['max_ts'] = maxTs;
372
+ }
373
+ if (limit !== undefined) {
374
+ localVarQueryParameter['limit'] = limit;
375
+ }
376
+ if (cursor !== undefined) {
377
+ localVarQueryParameter['cursor'] = cursor;
378
+ }
379
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
380
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
381
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
382
+ return {
383
+ url: toPathString(localVarUrlObj),
384
+ options: localVarRequestOptions,
385
+ };
386
+ }),
387
+ /**
388
+ * Get a single order by ID
389
+ * @summary Get Order
390
+ * @param {string} orderId Order ID
391
+ * @param {*} [options] Override http request option.
392
+ * @throws {RequiredError}
393
+ */
394
+ getOrder: (orderId_1, ...args_1) => __awaiter(this, [orderId_1, ...args_1], void 0, function* (orderId, options = {}) {
395
+ // verify required parameter 'orderId' is not null or undefined
396
+ assertParamExists('getOrder', 'orderId', orderId);
397
+ const localVarPath = `/portfolio/orders/{order_id}`
398
+ .replace(`{${"order_id"}}`, encodeURIComponent(String(orderId)));
399
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
400
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
401
+ let baseOptions;
402
+ if (configuration) {
403
+ baseOptions = configuration.baseOptions;
404
+ }
405
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
406
+ const localVarHeaderParameter = {};
407
+ const localVarQueryParameter = {};
408
+ // authentication bearerAuth required
409
+ // http bearer authentication required
410
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
411
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
412
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
413
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
414
+ return {
415
+ url: toPathString(localVarUrlObj),
416
+ options: localVarRequestOptions,
417
+ };
418
+ }),
419
+ /**
420
+ * Get order groups for the logged-in user
421
+ * @summary Get Order Groups
422
+ * @param {string} [status] Filter by status. Possible values depend on the endpoint.
423
+ * @param {number} [limit] Number of results per page. Defaults to 100. Maximum value is 200.
424
+ * @param {string} [cursor] Pagination cursor. Use the cursor value returned from the previous response to get the next page of results. Leave empty for the first page.
425
+ * @param {*} [options] Override http request option.
426
+ * @throws {RequiredError}
427
+ */
428
+ getOrderGroups: (status_1, limit_1, cursor_1, ...args_1) => __awaiter(this, [status_1, limit_1, cursor_1, ...args_1], void 0, function* (status, limit, cursor, options = {}) {
429
+ const localVarPath = `/portfolio/order_groups`;
430
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
431
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
432
+ let baseOptions;
433
+ if (configuration) {
434
+ baseOptions = configuration.baseOptions;
435
+ }
436
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
437
+ const localVarHeaderParameter = {};
438
+ const localVarQueryParameter = {};
439
+ // authentication bearerAuth required
440
+ // http bearer authentication required
441
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
442
+ if (status !== undefined) {
443
+ localVarQueryParameter['status'] = status;
444
+ }
445
+ if (limit !== undefined) {
446
+ localVarQueryParameter['limit'] = limit;
447
+ }
448
+ if (cursor !== undefined) {
449
+ localVarQueryParameter['cursor'] = cursor;
450
+ }
451
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
452
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
453
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
454
+ return {
455
+ url: toPathString(localVarUrlObj),
456
+ options: localVarRequestOptions,
457
+ };
458
+ }),
459
+ /**
460
+ * Get the queue position for an order
461
+ * @summary Get Order Queue Position
462
+ * @param {string} orderId Order ID
463
+ * @param {*} [options] Override http request option.
464
+ * @throws {RequiredError}
465
+ */
466
+ getOrderQueuePosition: (orderId_1, ...args_1) => __awaiter(this, [orderId_1, ...args_1], void 0, function* (orderId, options = {}) {
467
+ // verify required parameter 'orderId' is not null or undefined
468
+ assertParamExists('getOrderQueuePosition', 'orderId', orderId);
469
+ const localVarPath = `/portfolio/orders/{order_id}/queue_position`
470
+ .replace(`{${"order_id"}}`, encodeURIComponent(String(orderId)));
471
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
472
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
473
+ let baseOptions;
474
+ if (configuration) {
475
+ baseOptions = configuration.baseOptions;
476
+ }
477
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
478
+ const localVarHeaderParameter = {};
479
+ const localVarQueryParameter = {};
480
+ // authentication bearerAuth required
481
+ // http bearer authentication required
482
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
483
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
484
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
485
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
486
+ return {
487
+ url: toPathString(localVarUrlObj),
488
+ options: localVarRequestOptions,
489
+ };
490
+ }),
491
+ /**
492
+ * Get orders for the logged-in user
493
+ * @summary Get Orders
494
+ * @param {string} [ticker] Filter by market ticker
495
+ * @param {string} [eventTicker] Filter by event ticker
496
+ * @param {number} [minTs] Filter items after this Unix timestamp
497
+ * @param {number} [maxTs] Filter items before this Unix timestamp
498
+ * @param {string} [status] Filter by status. Possible values depend on the endpoint.
499
+ * @param {number} [limit] Number of results per page. Defaults to 100. Maximum value is 200.
500
+ * @param {string} [cursor] Pagination cursor. Use the cursor value returned from the previous response to get the next page of results. Leave empty for the first page.
501
+ * @param {*} [options] Override http request option.
502
+ * @throws {RequiredError}
503
+ */
504
+ getOrders: (ticker_1, eventTicker_1, minTs_1, maxTs_1, status_1, limit_1, cursor_1, ...args_1) => __awaiter(this, [ticker_1, eventTicker_1, minTs_1, maxTs_1, status_1, limit_1, cursor_1, ...args_1], void 0, function* (ticker, eventTicker, minTs, maxTs, status, limit, cursor, options = {}) {
505
+ const localVarPath = `/portfolio/orders`;
506
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
507
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
508
+ let baseOptions;
509
+ if (configuration) {
510
+ baseOptions = configuration.baseOptions;
511
+ }
512
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
513
+ const localVarHeaderParameter = {};
514
+ const localVarQueryParameter = {};
515
+ // authentication bearerAuth required
516
+ // http bearer authentication required
517
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
518
+ if (ticker !== undefined) {
519
+ localVarQueryParameter['ticker'] = ticker;
520
+ }
521
+ if (eventTicker !== undefined) {
522
+ localVarQueryParameter['event_ticker'] = eventTicker;
523
+ }
524
+ if (minTs !== undefined) {
525
+ localVarQueryParameter['min_ts'] = minTs;
526
+ }
527
+ if (maxTs !== undefined) {
528
+ localVarQueryParameter['max_ts'] = maxTs;
529
+ }
530
+ if (status !== undefined) {
531
+ localVarQueryParameter['status'] = status;
532
+ }
533
+ if (limit !== undefined) {
534
+ localVarQueryParameter['limit'] = limit;
535
+ }
536
+ if (cursor !== undefined) {
537
+ localVarQueryParameter['cursor'] = cursor;
538
+ }
539
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
540
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
541
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
542
+ return {
543
+ url: toPathString(localVarUrlObj),
544
+ options: localVarRequestOptions,
545
+ };
546
+ }),
547
+ /**
548
+ * Get positions for the logged-in user
549
+ * @summary Get Positions
550
+ * @param {string} [ticker] Filter by market ticker
551
+ * @param {string} [eventTicker] Filter by event ticker
552
+ * @param {number} [countDown] Filter positions by minimum count down value
553
+ * @param {number} [countUp] Filter positions by minimum count up value
554
+ * @param {number} [limit] Number of results per page. Defaults to 100. Maximum value is 200.
555
+ * @param {string} [cursor] Pagination cursor. Use the cursor value returned from the previous response to get the next page of results. Leave empty for the first page.
556
+ * @param {*} [options] Override http request option.
557
+ * @throws {RequiredError}
558
+ */
559
+ getPositions: (ticker_1, eventTicker_1, countDown_1, countUp_1, limit_1, cursor_1, ...args_1) => __awaiter(this, [ticker_1, eventTicker_1, countDown_1, countUp_1, limit_1, cursor_1, ...args_1], void 0, function* (ticker, eventTicker, countDown, countUp, limit, cursor, options = {}) {
560
+ const localVarPath = `/portfolio/positions`;
561
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
562
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
563
+ let baseOptions;
564
+ if (configuration) {
565
+ baseOptions = configuration.baseOptions;
566
+ }
567
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
568
+ const localVarHeaderParameter = {};
569
+ const localVarQueryParameter = {};
570
+ // authentication bearerAuth required
571
+ // http bearer authentication required
572
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
573
+ if (ticker !== undefined) {
574
+ localVarQueryParameter['ticker'] = ticker;
575
+ }
576
+ if (eventTicker !== undefined) {
577
+ localVarQueryParameter['event_ticker'] = eventTicker;
578
+ }
579
+ if (countDown !== undefined) {
580
+ localVarQueryParameter['count_down'] = countDown;
581
+ }
582
+ if (countUp !== undefined) {
583
+ localVarQueryParameter['count_up'] = countUp;
584
+ }
585
+ if (limit !== undefined) {
586
+ localVarQueryParameter['limit'] = limit;
587
+ }
588
+ if (cursor !== undefined) {
589
+ localVarQueryParameter['cursor'] = cursor;
590
+ }
591
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
592
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
593
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
594
+ return {
595
+ url: toPathString(localVarUrlObj),
596
+ options: localVarRequestOptions,
597
+ };
598
+ }),
599
+ /**
600
+ * Get queue positions for multiple orders
601
+ * @summary Get Queue Positions
602
+ * @param {GetQueuePositionsRequest} getQueuePositionsRequest
603
+ * @param {*} [options] Override http request option.
604
+ * @throws {RequiredError}
605
+ */
606
+ getQueuePositions: (getQueuePositionsRequest_1, ...args_1) => __awaiter(this, [getQueuePositionsRequest_1, ...args_1], void 0, function* (getQueuePositionsRequest, options = {}) {
607
+ // verify required parameter 'getQueuePositionsRequest' is not null or undefined
608
+ assertParamExists('getQueuePositions', 'getQueuePositionsRequest', getQueuePositionsRequest);
609
+ const localVarPath = `/portfolio/orders/queue_positions`;
610
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
611
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
612
+ let baseOptions;
613
+ if (configuration) {
614
+ baseOptions = configuration.baseOptions;
615
+ }
616
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
617
+ const localVarHeaderParameter = {};
618
+ const localVarQueryParameter = {};
619
+ // authentication bearerAuth required
620
+ // http bearer authentication required
621
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
622
+ localVarHeaderParameter['Content-Type'] = 'application/json';
623
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
624
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
625
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
626
+ localVarRequestOptions.data = serializeDataIfNeeded(getQueuePositionsRequest, localVarRequestOptions, configuration);
627
+ return {
628
+ url: toPathString(localVarUrlObj),
629
+ options: localVarRequestOptions,
630
+ };
631
+ }),
632
+ /**
633
+ * Get settlements for the logged-in user
634
+ * @summary Get Settlements
635
+ * @param {number} [limit] Number of results per page. Defaults to 100. Maximum value is 200.
636
+ * @param {string} [cursor] Pagination cursor. Use the cursor value returned from the previous response to get the next page of results. Leave empty for the first page.
637
+ * @param {*} [options] Override http request option.
638
+ * @throws {RequiredError}
639
+ */
640
+ getSettlements: (limit_1, cursor_1, ...args_1) => __awaiter(this, [limit_1, cursor_1, ...args_1], void 0, function* (limit, cursor, options = {}) {
641
+ const localVarPath = `/portfolio/settlements`;
642
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
643
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
644
+ let baseOptions;
645
+ if (configuration) {
646
+ baseOptions = configuration.baseOptions;
647
+ }
648
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
649
+ const localVarHeaderParameter = {};
650
+ const localVarQueryParameter = {};
651
+ // authentication bearerAuth required
652
+ // http bearer authentication required
653
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
654
+ if (limit !== undefined) {
655
+ localVarQueryParameter['limit'] = limit;
656
+ }
657
+ if (cursor !== undefined) {
658
+ localVarQueryParameter['cursor'] = cursor;
659
+ }
660
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
661
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
662
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
663
+ return {
664
+ url: toPathString(localVarUrlObj),
665
+ options: localVarRequestOptions,
666
+ };
667
+ }),
668
+ /**
669
+ * Get the total value of all resting orders
670
+ * @summary Get Total Resting Order Value
671
+ * @param {*} [options] Override http request option.
672
+ * @throws {RequiredError}
673
+ */
674
+ getTotalRestingOrderValue: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
675
+ const localVarPath = `/portfolio/summary/total_resting_order_value`;
676
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
677
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
678
+ let baseOptions;
679
+ if (configuration) {
680
+ baseOptions = configuration.baseOptions;
681
+ }
682
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
683
+ const localVarHeaderParameter = {};
684
+ const localVarQueryParameter = {};
685
+ // authentication bearerAuth required
686
+ // http bearer authentication required
687
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
688
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
689
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
690
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
691
+ return {
692
+ url: toPathString(localVarUrlObj),
693
+ options: localVarRequestOptions,
694
+ };
695
+ }),
696
+ /**
697
+ * Reset an order group
698
+ * @summary Reset Order Group
699
+ * @param {string} orderGroupId Order group ID
700
+ * @param {*} [options] Override http request option.
701
+ * @throws {RequiredError}
702
+ */
703
+ resetOrderGroup: (orderGroupId_1, ...args_1) => __awaiter(this, [orderGroupId_1, ...args_1], void 0, function* (orderGroupId, options = {}) {
704
+ // verify required parameter 'orderGroupId' is not null or undefined
705
+ assertParamExists('resetOrderGroup', 'orderGroupId', orderGroupId);
706
+ const localVarPath = `/portfolio/order_groups/{order_group_id}/reset`
707
+ .replace(`{${"order_group_id"}}`, encodeURIComponent(String(orderGroupId)));
708
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
709
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
710
+ let baseOptions;
711
+ if (configuration) {
712
+ baseOptions = configuration.baseOptions;
713
+ }
714
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
715
+ const localVarHeaderParameter = {};
716
+ const localVarQueryParameter = {};
717
+ // authentication bearerAuth required
718
+ // http bearer authentication required
719
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
720
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
721
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
722
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
723
+ return {
724
+ url: toPathString(localVarUrlObj),
725
+ options: localVarRequestOptions,
726
+ };
727
+ }),
728
+ };
729
+ };
730
+ /**
731
+ * PortfolioApi - functional programming interface
732
+ */
733
+ export const PortfolioApiFp = function (configuration) {
734
+ const localVarAxiosParamCreator = PortfolioApiAxiosParamCreator(configuration);
735
+ return {
736
+ /**
737
+ * Amend an existing order
738
+ * @summary Amend Order
739
+ * @param {string} orderId Order ID
740
+ * @param {AmendOrderRequest} amendOrderRequest
741
+ * @param {*} [options] Override http request option.
742
+ * @throws {RequiredError}
743
+ */
744
+ amendOrder(orderId, amendOrderRequest, options) {
745
+ return __awaiter(this, void 0, void 0, function* () {
746
+ var _a, _b, _c;
747
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.amendOrder(orderId, amendOrderRequest, options);
748
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
749
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['PortfolioApi.amendOrder']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
750
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
751
+ });
752
+ },
753
+ /**
754
+ * Cancel multiple orders in a single request
755
+ * @summary Batch Cancel Orders
756
+ * @param {BatchCancelOrdersRequest} batchCancelOrdersRequest
757
+ * @param {*} [options] Override http request option.
758
+ * @throws {RequiredError}
759
+ */
760
+ batchCancelOrders(batchCancelOrdersRequest, options) {
761
+ return __awaiter(this, void 0, void 0, function* () {
762
+ var _a, _b, _c;
763
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.batchCancelOrders(batchCancelOrdersRequest, options);
764
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
765
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['PortfolioApi.batchCancelOrders']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
766
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
767
+ });
768
+ },
769
+ /**
770
+ * Create multiple orders in a single request
771
+ * @summary Batch Create Orders
772
+ * @param {BatchCreateOrdersRequest} batchCreateOrdersRequest
773
+ * @param {*} [options] Override http request option.
774
+ * @throws {RequiredError}
775
+ */
776
+ batchCreateOrders(batchCreateOrdersRequest, options) {
777
+ return __awaiter(this, void 0, void 0, function* () {
778
+ var _a, _b, _c;
779
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.batchCreateOrders(batchCreateOrdersRequest, options);
780
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
781
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['PortfolioApi.batchCreateOrders']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
782
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
783
+ });
784
+ },
785
+ /**
786
+ * Cancel an order
787
+ * @summary Cancel Order
788
+ * @param {string} orderId Order ID
789
+ * @param {*} [options] Override http request option.
790
+ * @throws {RequiredError}
791
+ */
792
+ cancelOrder(orderId, options) {
793
+ return __awaiter(this, void 0, void 0, function* () {
794
+ var _a, _b, _c;
795
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.cancelOrder(orderId, options);
796
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
797
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['PortfolioApi.cancelOrder']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
798
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
799
+ });
800
+ },
801
+ /**
802
+ * Create a new order
803
+ * @summary Create Order
804
+ * @param {CreateOrderRequest} createOrderRequest
805
+ * @param {*} [options] Override http request option.
806
+ * @throws {RequiredError}
807
+ */
808
+ createOrder(createOrderRequest, options) {
809
+ return __awaiter(this, void 0, void 0, function* () {
810
+ var _a, _b, _c;
811
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.createOrder(createOrderRequest, options);
812
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
813
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['PortfolioApi.createOrder']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
814
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
815
+ });
816
+ },
817
+ /**
818
+ * Create a new order group
819
+ * @summary Create Order Group
820
+ * @param {CreateOrderGroupRequest} createOrderGroupRequest
821
+ * @param {*} [options] Override http request option.
822
+ * @throws {RequiredError}
823
+ */
824
+ createOrderGroup(createOrderGroupRequest, options) {
825
+ return __awaiter(this, void 0, void 0, function* () {
826
+ var _a, _b, _c;
827
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.createOrderGroup(createOrderGroupRequest, options);
828
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
829
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['PortfolioApi.createOrderGroup']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
830
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
831
+ });
832
+ },
833
+ /**
834
+ * Decrease the size of an existing order
835
+ * @summary Decrease Order
836
+ * @param {string} orderId Order ID
837
+ * @param {DecreaseOrderRequest} decreaseOrderRequest
838
+ * @param {*} [options] Override http request option.
839
+ * @throws {RequiredError}
840
+ */
841
+ decreaseOrder(orderId, decreaseOrderRequest, options) {
842
+ return __awaiter(this, void 0, void 0, function* () {
843
+ var _a, _b, _c;
844
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.decreaseOrder(orderId, decreaseOrderRequest, options);
845
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
846
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['PortfolioApi.decreaseOrder']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
847
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
848
+ });
849
+ },
850
+ /**
851
+ * Delete an order group
852
+ * @summary Delete Order Group
853
+ * @param {string} orderGroupId Order group ID
854
+ * @param {*} [options] Override http request option.
855
+ * @throws {RequiredError}
856
+ */
857
+ deleteOrderGroup(orderGroupId, options) {
858
+ return __awaiter(this, void 0, void 0, function* () {
859
+ var _a, _b, _c;
860
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.deleteOrderGroup(orderGroupId, options);
861
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
862
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['PortfolioApi.deleteOrderGroup']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
863
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
864
+ });
865
+ },
866
+ /**
867
+ * Get the user\'s current balance
868
+ * @summary Get Balance
869
+ * @param {*} [options] Override http request option.
870
+ * @throws {RequiredError}
871
+ */
872
+ getBalance(options) {
873
+ return __awaiter(this, void 0, void 0, function* () {
874
+ var _a, _b, _c;
875
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getBalance(options);
876
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
877
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['PortfolioApi.getBalance']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
878
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
879
+ });
880
+ },
881
+ /**
882
+ * Get fills for the logged-in user. A fill represents a partial or complete execution of an order. When an order matches with another order in the orderbook, a fill is created for each side of the trade.
883
+ * @summary Get Fills
884
+ * @param {string} [ticker] Filter by market ticker
885
+ * @param {string} [orderId] Filter by order ID
886
+ * @param {number} [minTs] Filter items after this Unix timestamp
887
+ * @param {number} [maxTs] Filter items before this Unix timestamp
888
+ * @param {number} [limit] Number of results per page. Defaults to 100. Maximum value is 200.
889
+ * @param {string} [cursor] Pagination cursor. Use the cursor value returned from the previous response to get the next page of results. Leave empty for the first page.
890
+ * @param {*} [options] Override http request option.
891
+ * @throws {RequiredError}
892
+ */
893
+ getFills(ticker, orderId, minTs, maxTs, limit, cursor, options) {
894
+ return __awaiter(this, void 0, void 0, function* () {
895
+ var _a, _b, _c;
896
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getFills(ticker, orderId, minTs, maxTs, limit, cursor, options);
897
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
898
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['PortfolioApi.getFills']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
899
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
900
+ });
901
+ },
902
+ /**
903
+ * Get a single order by ID
904
+ * @summary Get Order
905
+ * @param {string} orderId Order ID
906
+ * @param {*} [options] Override http request option.
907
+ * @throws {RequiredError}
908
+ */
909
+ getOrder(orderId, options) {
910
+ return __awaiter(this, void 0, void 0, function* () {
911
+ var _a, _b, _c;
912
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getOrder(orderId, options);
913
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
914
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['PortfolioApi.getOrder']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
915
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
916
+ });
917
+ },
918
+ /**
919
+ * Get order groups for the logged-in user
920
+ * @summary Get Order Groups
921
+ * @param {string} [status] Filter by status. Possible values depend on the endpoint.
922
+ * @param {number} [limit] Number of results per page. Defaults to 100. Maximum value is 200.
923
+ * @param {string} [cursor] Pagination cursor. Use the cursor value returned from the previous response to get the next page of results. Leave empty for the first page.
924
+ * @param {*} [options] Override http request option.
925
+ * @throws {RequiredError}
926
+ */
927
+ getOrderGroups(status, limit, cursor, options) {
928
+ return __awaiter(this, void 0, void 0, function* () {
929
+ var _a, _b, _c;
930
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getOrderGroups(status, limit, cursor, options);
931
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
932
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['PortfolioApi.getOrderGroups']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
933
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
934
+ });
935
+ },
936
+ /**
937
+ * Get the queue position for an order
938
+ * @summary Get Order Queue Position
939
+ * @param {string} orderId Order ID
940
+ * @param {*} [options] Override http request option.
941
+ * @throws {RequiredError}
942
+ */
943
+ getOrderQueuePosition(orderId, options) {
944
+ return __awaiter(this, void 0, void 0, function* () {
945
+ var _a, _b, _c;
946
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getOrderQueuePosition(orderId, options);
947
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
948
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['PortfolioApi.getOrderQueuePosition']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
949
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
950
+ });
951
+ },
952
+ /**
953
+ * Get orders for the logged-in user
954
+ * @summary Get Orders
955
+ * @param {string} [ticker] Filter by market ticker
956
+ * @param {string} [eventTicker] Filter by event ticker
957
+ * @param {number} [minTs] Filter items after this Unix timestamp
958
+ * @param {number} [maxTs] Filter items before this Unix timestamp
959
+ * @param {string} [status] Filter by status. Possible values depend on the endpoint.
960
+ * @param {number} [limit] Number of results per page. Defaults to 100. Maximum value is 200.
961
+ * @param {string} [cursor] Pagination cursor. Use the cursor value returned from the previous response to get the next page of results. Leave empty for the first page.
962
+ * @param {*} [options] Override http request option.
963
+ * @throws {RequiredError}
964
+ */
965
+ getOrders(ticker, eventTicker, minTs, maxTs, status, limit, cursor, options) {
966
+ return __awaiter(this, void 0, void 0, function* () {
967
+ var _a, _b, _c;
968
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getOrders(ticker, eventTicker, minTs, maxTs, status, limit, cursor, options);
969
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
970
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['PortfolioApi.getOrders']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
971
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
972
+ });
973
+ },
974
+ /**
975
+ * Get positions for the logged-in user
976
+ * @summary Get Positions
977
+ * @param {string} [ticker] Filter by market ticker
978
+ * @param {string} [eventTicker] Filter by event ticker
979
+ * @param {number} [countDown] Filter positions by minimum count down value
980
+ * @param {number} [countUp] Filter positions by minimum count up value
981
+ * @param {number} [limit] Number of results per page. Defaults to 100. Maximum value is 200.
982
+ * @param {string} [cursor] Pagination cursor. Use the cursor value returned from the previous response to get the next page of results. Leave empty for the first page.
983
+ * @param {*} [options] Override http request option.
984
+ * @throws {RequiredError}
985
+ */
986
+ getPositions(ticker, eventTicker, countDown, countUp, limit, cursor, options) {
987
+ return __awaiter(this, void 0, void 0, function* () {
988
+ var _a, _b, _c;
989
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getPositions(ticker, eventTicker, countDown, countUp, limit, cursor, options);
990
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
991
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['PortfolioApi.getPositions']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
992
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
993
+ });
994
+ },
995
+ /**
996
+ * Get queue positions for multiple orders
997
+ * @summary Get Queue Positions
998
+ * @param {GetQueuePositionsRequest} getQueuePositionsRequest
999
+ * @param {*} [options] Override http request option.
1000
+ * @throws {RequiredError}
1001
+ */
1002
+ getQueuePositions(getQueuePositionsRequest, options) {
1003
+ return __awaiter(this, void 0, void 0, function* () {
1004
+ var _a, _b, _c;
1005
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getQueuePositions(getQueuePositionsRequest, options);
1006
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1007
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['PortfolioApi.getQueuePositions']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1008
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1009
+ });
1010
+ },
1011
+ /**
1012
+ * Get settlements for the logged-in user
1013
+ * @summary Get Settlements
1014
+ * @param {number} [limit] Number of results per page. Defaults to 100. Maximum value is 200.
1015
+ * @param {string} [cursor] Pagination cursor. Use the cursor value returned from the previous response to get the next page of results. Leave empty for the first page.
1016
+ * @param {*} [options] Override http request option.
1017
+ * @throws {RequiredError}
1018
+ */
1019
+ getSettlements(limit, cursor, options) {
1020
+ return __awaiter(this, void 0, void 0, function* () {
1021
+ var _a, _b, _c;
1022
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getSettlements(limit, cursor, options);
1023
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1024
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['PortfolioApi.getSettlements']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1025
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1026
+ });
1027
+ },
1028
+ /**
1029
+ * Get the total value of all resting orders
1030
+ * @summary Get Total Resting Order Value
1031
+ * @param {*} [options] Override http request option.
1032
+ * @throws {RequiredError}
1033
+ */
1034
+ getTotalRestingOrderValue(options) {
1035
+ return __awaiter(this, void 0, void 0, function* () {
1036
+ var _a, _b, _c;
1037
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getTotalRestingOrderValue(options);
1038
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1039
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['PortfolioApi.getTotalRestingOrderValue']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1040
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1041
+ });
1042
+ },
1043
+ /**
1044
+ * Reset an order group
1045
+ * @summary Reset Order Group
1046
+ * @param {string} orderGroupId Order group ID
1047
+ * @param {*} [options] Override http request option.
1048
+ * @throws {RequiredError}
1049
+ */
1050
+ resetOrderGroup(orderGroupId, options) {
1051
+ return __awaiter(this, void 0, void 0, function* () {
1052
+ var _a, _b, _c;
1053
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.resetOrderGroup(orderGroupId, options);
1054
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
1055
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['PortfolioApi.resetOrderGroup']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
1056
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1057
+ });
1058
+ },
1059
+ };
1060
+ };
1061
+ /**
1062
+ * PortfolioApi - factory interface
1063
+ */
1064
+ export const PortfolioApiFactory = function (configuration, basePath, axios) {
1065
+ const localVarFp = PortfolioApiFp(configuration);
1066
+ return {
1067
+ /**
1068
+ * Amend an existing order
1069
+ * @summary Amend Order
1070
+ * @param {string} orderId Order ID
1071
+ * @param {AmendOrderRequest} amendOrderRequest
1072
+ * @param {*} [options] Override http request option.
1073
+ * @throws {RequiredError}
1074
+ */
1075
+ amendOrder(orderId, amendOrderRequest, options) {
1076
+ return localVarFp.amendOrder(orderId, amendOrderRequest, options).then((request) => request(axios, basePath));
1077
+ },
1078
+ /**
1079
+ * Cancel multiple orders in a single request
1080
+ * @summary Batch Cancel Orders
1081
+ * @param {BatchCancelOrdersRequest} batchCancelOrdersRequest
1082
+ * @param {*} [options] Override http request option.
1083
+ * @throws {RequiredError}
1084
+ */
1085
+ batchCancelOrders(batchCancelOrdersRequest, options) {
1086
+ return localVarFp.batchCancelOrders(batchCancelOrdersRequest, options).then((request) => request(axios, basePath));
1087
+ },
1088
+ /**
1089
+ * Create multiple orders in a single request
1090
+ * @summary Batch Create Orders
1091
+ * @param {BatchCreateOrdersRequest} batchCreateOrdersRequest
1092
+ * @param {*} [options] Override http request option.
1093
+ * @throws {RequiredError}
1094
+ */
1095
+ batchCreateOrders(batchCreateOrdersRequest, options) {
1096
+ return localVarFp.batchCreateOrders(batchCreateOrdersRequest, options).then((request) => request(axios, basePath));
1097
+ },
1098
+ /**
1099
+ * Cancel an order
1100
+ * @summary Cancel Order
1101
+ * @param {string} orderId Order ID
1102
+ * @param {*} [options] Override http request option.
1103
+ * @throws {RequiredError}
1104
+ */
1105
+ cancelOrder(orderId, options) {
1106
+ return localVarFp.cancelOrder(orderId, options).then((request) => request(axios, basePath));
1107
+ },
1108
+ /**
1109
+ * Create a new order
1110
+ * @summary Create Order
1111
+ * @param {CreateOrderRequest} createOrderRequest
1112
+ * @param {*} [options] Override http request option.
1113
+ * @throws {RequiredError}
1114
+ */
1115
+ createOrder(createOrderRequest, options) {
1116
+ return localVarFp.createOrder(createOrderRequest, options).then((request) => request(axios, basePath));
1117
+ },
1118
+ /**
1119
+ * Create a new order group
1120
+ * @summary Create Order Group
1121
+ * @param {CreateOrderGroupRequest} createOrderGroupRequest
1122
+ * @param {*} [options] Override http request option.
1123
+ * @throws {RequiredError}
1124
+ */
1125
+ createOrderGroup(createOrderGroupRequest, options) {
1126
+ return localVarFp.createOrderGroup(createOrderGroupRequest, options).then((request) => request(axios, basePath));
1127
+ },
1128
+ /**
1129
+ * Decrease the size of an existing order
1130
+ * @summary Decrease Order
1131
+ * @param {string} orderId Order ID
1132
+ * @param {DecreaseOrderRequest} decreaseOrderRequest
1133
+ * @param {*} [options] Override http request option.
1134
+ * @throws {RequiredError}
1135
+ */
1136
+ decreaseOrder(orderId, decreaseOrderRequest, options) {
1137
+ return localVarFp.decreaseOrder(orderId, decreaseOrderRequest, options).then((request) => request(axios, basePath));
1138
+ },
1139
+ /**
1140
+ * Delete an order group
1141
+ * @summary Delete Order Group
1142
+ * @param {string} orderGroupId Order group ID
1143
+ * @param {*} [options] Override http request option.
1144
+ * @throws {RequiredError}
1145
+ */
1146
+ deleteOrderGroup(orderGroupId, options) {
1147
+ return localVarFp.deleteOrderGroup(orderGroupId, options).then((request) => request(axios, basePath));
1148
+ },
1149
+ /**
1150
+ * Get the user\'s current balance
1151
+ * @summary Get Balance
1152
+ * @param {*} [options] Override http request option.
1153
+ * @throws {RequiredError}
1154
+ */
1155
+ getBalance(options) {
1156
+ return localVarFp.getBalance(options).then((request) => request(axios, basePath));
1157
+ },
1158
+ /**
1159
+ * Get fills for the logged-in user. A fill represents a partial or complete execution of an order. When an order matches with another order in the orderbook, a fill is created for each side of the trade.
1160
+ * @summary Get Fills
1161
+ * @param {string} [ticker] Filter by market ticker
1162
+ * @param {string} [orderId] Filter by order ID
1163
+ * @param {number} [minTs] Filter items after this Unix timestamp
1164
+ * @param {number} [maxTs] Filter items before this Unix timestamp
1165
+ * @param {number} [limit] Number of results per page. Defaults to 100. Maximum value is 200.
1166
+ * @param {string} [cursor] Pagination cursor. Use the cursor value returned from the previous response to get the next page of results. Leave empty for the first page.
1167
+ * @param {*} [options] Override http request option.
1168
+ * @throws {RequiredError}
1169
+ */
1170
+ getFills(ticker, orderId, minTs, maxTs, limit, cursor, options) {
1171
+ return localVarFp.getFills(ticker, orderId, minTs, maxTs, limit, cursor, options).then((request) => request(axios, basePath));
1172
+ },
1173
+ /**
1174
+ * Get a single order by ID
1175
+ * @summary Get Order
1176
+ * @param {string} orderId Order ID
1177
+ * @param {*} [options] Override http request option.
1178
+ * @throws {RequiredError}
1179
+ */
1180
+ getOrder(orderId, options) {
1181
+ return localVarFp.getOrder(orderId, options).then((request) => request(axios, basePath));
1182
+ },
1183
+ /**
1184
+ * Get order groups for the logged-in user
1185
+ * @summary Get Order Groups
1186
+ * @param {string} [status] Filter by status. Possible values depend on the endpoint.
1187
+ * @param {number} [limit] Number of results per page. Defaults to 100. Maximum value is 200.
1188
+ * @param {string} [cursor] Pagination cursor. Use the cursor value returned from the previous response to get the next page of results. Leave empty for the first page.
1189
+ * @param {*} [options] Override http request option.
1190
+ * @throws {RequiredError}
1191
+ */
1192
+ getOrderGroups(status, limit, cursor, options) {
1193
+ return localVarFp.getOrderGroups(status, limit, cursor, options).then((request) => request(axios, basePath));
1194
+ },
1195
+ /**
1196
+ * Get the queue position for an order
1197
+ * @summary Get Order Queue Position
1198
+ * @param {string} orderId Order ID
1199
+ * @param {*} [options] Override http request option.
1200
+ * @throws {RequiredError}
1201
+ */
1202
+ getOrderQueuePosition(orderId, options) {
1203
+ return localVarFp.getOrderQueuePosition(orderId, options).then((request) => request(axios, basePath));
1204
+ },
1205
+ /**
1206
+ * Get orders for the logged-in user
1207
+ * @summary Get Orders
1208
+ * @param {string} [ticker] Filter by market ticker
1209
+ * @param {string} [eventTicker] Filter by event ticker
1210
+ * @param {number} [minTs] Filter items after this Unix timestamp
1211
+ * @param {number} [maxTs] Filter items before this Unix timestamp
1212
+ * @param {string} [status] Filter by status. Possible values depend on the endpoint.
1213
+ * @param {number} [limit] Number of results per page. Defaults to 100. Maximum value is 200.
1214
+ * @param {string} [cursor] Pagination cursor. Use the cursor value returned from the previous response to get the next page of results. Leave empty for the first page.
1215
+ * @param {*} [options] Override http request option.
1216
+ * @throws {RequiredError}
1217
+ */
1218
+ getOrders(ticker, eventTicker, minTs, maxTs, status, limit, cursor, options) {
1219
+ return localVarFp.getOrders(ticker, eventTicker, minTs, maxTs, status, limit, cursor, options).then((request) => request(axios, basePath));
1220
+ },
1221
+ /**
1222
+ * Get positions for the logged-in user
1223
+ * @summary Get Positions
1224
+ * @param {string} [ticker] Filter by market ticker
1225
+ * @param {string} [eventTicker] Filter by event ticker
1226
+ * @param {number} [countDown] Filter positions by minimum count down value
1227
+ * @param {number} [countUp] Filter positions by minimum count up value
1228
+ * @param {number} [limit] Number of results per page. Defaults to 100. Maximum value is 200.
1229
+ * @param {string} [cursor] Pagination cursor. Use the cursor value returned from the previous response to get the next page of results. Leave empty for the first page.
1230
+ * @param {*} [options] Override http request option.
1231
+ * @throws {RequiredError}
1232
+ */
1233
+ getPositions(ticker, eventTicker, countDown, countUp, limit, cursor, options) {
1234
+ return localVarFp.getPositions(ticker, eventTicker, countDown, countUp, limit, cursor, options).then((request) => request(axios, basePath));
1235
+ },
1236
+ /**
1237
+ * Get queue positions for multiple orders
1238
+ * @summary Get Queue Positions
1239
+ * @param {GetQueuePositionsRequest} getQueuePositionsRequest
1240
+ * @param {*} [options] Override http request option.
1241
+ * @throws {RequiredError}
1242
+ */
1243
+ getQueuePositions(getQueuePositionsRequest, options) {
1244
+ return localVarFp.getQueuePositions(getQueuePositionsRequest, options).then((request) => request(axios, basePath));
1245
+ },
1246
+ /**
1247
+ * Get settlements for the logged-in user
1248
+ * @summary Get Settlements
1249
+ * @param {number} [limit] Number of results per page. Defaults to 100. Maximum value is 200.
1250
+ * @param {string} [cursor] Pagination cursor. Use the cursor value returned from the previous response to get the next page of results. Leave empty for the first page.
1251
+ * @param {*} [options] Override http request option.
1252
+ * @throws {RequiredError}
1253
+ */
1254
+ getSettlements(limit, cursor, options) {
1255
+ return localVarFp.getSettlements(limit, cursor, options).then((request) => request(axios, basePath));
1256
+ },
1257
+ /**
1258
+ * Get the total value of all resting orders
1259
+ * @summary Get Total Resting Order Value
1260
+ * @param {*} [options] Override http request option.
1261
+ * @throws {RequiredError}
1262
+ */
1263
+ getTotalRestingOrderValue(options) {
1264
+ return localVarFp.getTotalRestingOrderValue(options).then((request) => request(axios, basePath));
1265
+ },
1266
+ /**
1267
+ * Reset an order group
1268
+ * @summary Reset Order Group
1269
+ * @param {string} orderGroupId Order group ID
1270
+ * @param {*} [options] Override http request option.
1271
+ * @throws {RequiredError}
1272
+ */
1273
+ resetOrderGroup(orderGroupId, options) {
1274
+ return localVarFp.resetOrderGroup(orderGroupId, options).then((request) => request(axios, basePath));
1275
+ },
1276
+ };
1277
+ };
1278
+ /**
1279
+ * PortfolioApi - object-oriented interface
1280
+ */
1281
+ export class PortfolioApi extends BaseAPI {
1282
+ /**
1283
+ * Amend an existing order
1284
+ * @summary Amend Order
1285
+ * @param {string} orderId Order ID
1286
+ * @param {AmendOrderRequest} amendOrderRequest
1287
+ * @param {*} [options] Override http request option.
1288
+ * @throws {RequiredError}
1289
+ */
1290
+ amendOrder(orderId, amendOrderRequest, options) {
1291
+ return PortfolioApiFp(this.configuration).amendOrder(orderId, amendOrderRequest, options).then((request) => request(this.axios, this.basePath));
1292
+ }
1293
+ /**
1294
+ * Cancel multiple orders in a single request
1295
+ * @summary Batch Cancel Orders
1296
+ * @param {BatchCancelOrdersRequest} batchCancelOrdersRequest
1297
+ * @param {*} [options] Override http request option.
1298
+ * @throws {RequiredError}
1299
+ */
1300
+ batchCancelOrders(batchCancelOrdersRequest, options) {
1301
+ return PortfolioApiFp(this.configuration).batchCancelOrders(batchCancelOrdersRequest, options).then((request) => request(this.axios, this.basePath));
1302
+ }
1303
+ /**
1304
+ * Create multiple orders in a single request
1305
+ * @summary Batch Create Orders
1306
+ * @param {BatchCreateOrdersRequest} batchCreateOrdersRequest
1307
+ * @param {*} [options] Override http request option.
1308
+ * @throws {RequiredError}
1309
+ */
1310
+ batchCreateOrders(batchCreateOrdersRequest, options) {
1311
+ return PortfolioApiFp(this.configuration).batchCreateOrders(batchCreateOrdersRequest, options).then((request) => request(this.axios, this.basePath));
1312
+ }
1313
+ /**
1314
+ * Cancel an order
1315
+ * @summary Cancel Order
1316
+ * @param {string} orderId Order ID
1317
+ * @param {*} [options] Override http request option.
1318
+ * @throws {RequiredError}
1319
+ */
1320
+ cancelOrder(orderId, options) {
1321
+ return PortfolioApiFp(this.configuration).cancelOrder(orderId, options).then((request) => request(this.axios, this.basePath));
1322
+ }
1323
+ /**
1324
+ * Create a new order
1325
+ * @summary Create Order
1326
+ * @param {CreateOrderRequest} createOrderRequest
1327
+ * @param {*} [options] Override http request option.
1328
+ * @throws {RequiredError}
1329
+ */
1330
+ createOrder(createOrderRequest, options) {
1331
+ return PortfolioApiFp(this.configuration).createOrder(createOrderRequest, options).then((request) => request(this.axios, this.basePath));
1332
+ }
1333
+ /**
1334
+ * Create a new order group
1335
+ * @summary Create Order Group
1336
+ * @param {CreateOrderGroupRequest} createOrderGroupRequest
1337
+ * @param {*} [options] Override http request option.
1338
+ * @throws {RequiredError}
1339
+ */
1340
+ createOrderGroup(createOrderGroupRequest, options) {
1341
+ return PortfolioApiFp(this.configuration).createOrderGroup(createOrderGroupRequest, options).then((request) => request(this.axios, this.basePath));
1342
+ }
1343
+ /**
1344
+ * Decrease the size of an existing order
1345
+ * @summary Decrease Order
1346
+ * @param {string} orderId Order ID
1347
+ * @param {DecreaseOrderRequest} decreaseOrderRequest
1348
+ * @param {*} [options] Override http request option.
1349
+ * @throws {RequiredError}
1350
+ */
1351
+ decreaseOrder(orderId, decreaseOrderRequest, options) {
1352
+ return PortfolioApiFp(this.configuration).decreaseOrder(orderId, decreaseOrderRequest, options).then((request) => request(this.axios, this.basePath));
1353
+ }
1354
+ /**
1355
+ * Delete an order group
1356
+ * @summary Delete Order Group
1357
+ * @param {string} orderGroupId Order group ID
1358
+ * @param {*} [options] Override http request option.
1359
+ * @throws {RequiredError}
1360
+ */
1361
+ deleteOrderGroup(orderGroupId, options) {
1362
+ return PortfolioApiFp(this.configuration).deleteOrderGroup(orderGroupId, options).then((request) => request(this.axios, this.basePath));
1363
+ }
1364
+ /**
1365
+ * Get the user\'s current balance
1366
+ * @summary Get Balance
1367
+ * @param {*} [options] Override http request option.
1368
+ * @throws {RequiredError}
1369
+ */
1370
+ getBalance(options) {
1371
+ return PortfolioApiFp(this.configuration).getBalance(options).then((request) => request(this.axios, this.basePath));
1372
+ }
1373
+ /**
1374
+ * Get fills for the logged-in user. A fill represents a partial or complete execution of an order. When an order matches with another order in the orderbook, a fill is created for each side of the trade.
1375
+ * @summary Get Fills
1376
+ * @param {string} [ticker] Filter by market ticker
1377
+ * @param {string} [orderId] Filter by order ID
1378
+ * @param {number} [minTs] Filter items after this Unix timestamp
1379
+ * @param {number} [maxTs] Filter items before this Unix timestamp
1380
+ * @param {number} [limit] Number of results per page. Defaults to 100. Maximum value is 200.
1381
+ * @param {string} [cursor] Pagination cursor. Use the cursor value returned from the previous response to get the next page of results. Leave empty for the first page.
1382
+ * @param {*} [options] Override http request option.
1383
+ * @throws {RequiredError}
1384
+ */
1385
+ getFills(ticker, orderId, minTs, maxTs, limit, cursor, options) {
1386
+ return PortfolioApiFp(this.configuration).getFills(ticker, orderId, minTs, maxTs, limit, cursor, options).then((request) => request(this.axios, this.basePath));
1387
+ }
1388
+ /**
1389
+ * Get a single order by ID
1390
+ * @summary Get Order
1391
+ * @param {string} orderId Order ID
1392
+ * @param {*} [options] Override http request option.
1393
+ * @throws {RequiredError}
1394
+ */
1395
+ getOrder(orderId, options) {
1396
+ return PortfolioApiFp(this.configuration).getOrder(orderId, options).then((request) => request(this.axios, this.basePath));
1397
+ }
1398
+ /**
1399
+ * Get order groups for the logged-in user
1400
+ * @summary Get Order Groups
1401
+ * @param {string} [status] Filter by status. Possible values depend on the endpoint.
1402
+ * @param {number} [limit] Number of results per page. Defaults to 100. Maximum value is 200.
1403
+ * @param {string} [cursor] Pagination cursor. Use the cursor value returned from the previous response to get the next page of results. Leave empty for the first page.
1404
+ * @param {*} [options] Override http request option.
1405
+ * @throws {RequiredError}
1406
+ */
1407
+ getOrderGroups(status, limit, cursor, options) {
1408
+ return PortfolioApiFp(this.configuration).getOrderGroups(status, limit, cursor, options).then((request) => request(this.axios, this.basePath));
1409
+ }
1410
+ /**
1411
+ * Get the queue position for an order
1412
+ * @summary Get Order Queue Position
1413
+ * @param {string} orderId Order ID
1414
+ * @param {*} [options] Override http request option.
1415
+ * @throws {RequiredError}
1416
+ */
1417
+ getOrderQueuePosition(orderId, options) {
1418
+ return PortfolioApiFp(this.configuration).getOrderQueuePosition(orderId, options).then((request) => request(this.axios, this.basePath));
1419
+ }
1420
+ /**
1421
+ * Get orders for the logged-in user
1422
+ * @summary Get Orders
1423
+ * @param {string} [ticker] Filter by market ticker
1424
+ * @param {string} [eventTicker] Filter by event ticker
1425
+ * @param {number} [minTs] Filter items after this Unix timestamp
1426
+ * @param {number} [maxTs] Filter items before this Unix timestamp
1427
+ * @param {string} [status] Filter by status. Possible values depend on the endpoint.
1428
+ * @param {number} [limit] Number of results per page. Defaults to 100. Maximum value is 200.
1429
+ * @param {string} [cursor] Pagination cursor. Use the cursor value returned from the previous response to get the next page of results. Leave empty for the first page.
1430
+ * @param {*} [options] Override http request option.
1431
+ * @throws {RequiredError}
1432
+ */
1433
+ getOrders(ticker, eventTicker, minTs, maxTs, status, limit, cursor, options) {
1434
+ return PortfolioApiFp(this.configuration).getOrders(ticker, eventTicker, minTs, maxTs, status, limit, cursor, options).then((request) => request(this.axios, this.basePath));
1435
+ }
1436
+ /**
1437
+ * Get positions for the logged-in user
1438
+ * @summary Get Positions
1439
+ * @param {string} [ticker] Filter by market ticker
1440
+ * @param {string} [eventTicker] Filter by event ticker
1441
+ * @param {number} [countDown] Filter positions by minimum count down value
1442
+ * @param {number} [countUp] Filter positions by minimum count up value
1443
+ * @param {number} [limit] Number of results per page. Defaults to 100. Maximum value is 200.
1444
+ * @param {string} [cursor] Pagination cursor. Use the cursor value returned from the previous response to get the next page of results. Leave empty for the first page.
1445
+ * @param {*} [options] Override http request option.
1446
+ * @throws {RequiredError}
1447
+ */
1448
+ getPositions(ticker, eventTicker, countDown, countUp, limit, cursor, options) {
1449
+ return PortfolioApiFp(this.configuration).getPositions(ticker, eventTicker, countDown, countUp, limit, cursor, options).then((request) => request(this.axios, this.basePath));
1450
+ }
1451
+ /**
1452
+ * Get queue positions for multiple orders
1453
+ * @summary Get Queue Positions
1454
+ * @param {GetQueuePositionsRequest} getQueuePositionsRequest
1455
+ * @param {*} [options] Override http request option.
1456
+ * @throws {RequiredError}
1457
+ */
1458
+ getQueuePositions(getQueuePositionsRequest, options) {
1459
+ return PortfolioApiFp(this.configuration).getQueuePositions(getQueuePositionsRequest, options).then((request) => request(this.axios, this.basePath));
1460
+ }
1461
+ /**
1462
+ * Get settlements for the logged-in user
1463
+ * @summary Get Settlements
1464
+ * @param {number} [limit] Number of results per page. Defaults to 100. Maximum value is 200.
1465
+ * @param {string} [cursor] Pagination cursor. Use the cursor value returned from the previous response to get the next page of results. Leave empty for the first page.
1466
+ * @param {*} [options] Override http request option.
1467
+ * @throws {RequiredError}
1468
+ */
1469
+ getSettlements(limit, cursor, options) {
1470
+ return PortfolioApiFp(this.configuration).getSettlements(limit, cursor, options).then((request) => request(this.axios, this.basePath));
1471
+ }
1472
+ /**
1473
+ * Get the total value of all resting orders
1474
+ * @summary Get Total Resting Order Value
1475
+ * @param {*} [options] Override http request option.
1476
+ * @throws {RequiredError}
1477
+ */
1478
+ getTotalRestingOrderValue(options) {
1479
+ return PortfolioApiFp(this.configuration).getTotalRestingOrderValue(options).then((request) => request(this.axios, this.basePath));
1480
+ }
1481
+ /**
1482
+ * Reset an order group
1483
+ * @summary Reset Order Group
1484
+ * @param {string} orderGroupId Order group ID
1485
+ * @param {*} [options] Override http request option.
1486
+ * @throws {RequiredError}
1487
+ */
1488
+ resetOrderGroup(orderGroupId, options) {
1489
+ return PortfolioApiFp(this.configuration).resetOrderGroup(orderGroupId, options).then((request) => request(this.axios, this.basePath));
1490
+ }
1491
+ }