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