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