snaptrade-typescript-sdk 8.28.2 → 8.29.1

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 (265) hide show
  1. package/README.md +1661 -57
  2. package/dist/api/account-information-api-generated.d.ts +6 -16
  3. package/dist/api/account-information-api-generated.js +13 -13
  4. package/dist/api/api-status-api-generated.d.ts +0 -10
  5. package/dist/api/api-status-api-generated.js +10 -10
  6. package/dist/api/authentication-api-generated.d.ts +0 -10
  7. package/dist/api/authentication-api-generated.js +10 -10
  8. package/dist/api/connections-api-generated.d.ts +0 -10
  9. package/dist/api/connections-api-generated.js +10 -10
  10. package/dist/api/error-logs-api-generated.d.ts +0 -10
  11. package/dist/api/error-logs-api-generated.js +10 -10
  12. package/dist/api/options-api-generated.d.ts +10 -20
  13. package/dist/api/options-api-generated.js +15 -15
  14. package/dist/api/reference-data-api-generated.d.ts +2 -12
  15. package/dist/api/reference-data-api-generated.js +11 -11
  16. package/dist/api/trading-api-generated.d.ts +2 -12
  17. package/dist/api/trading-api-generated.js +11 -11
  18. package/dist/api/transactions-and-reporting-api-generated.d.ts +0 -10
  19. package/dist/api/transactions-and-reporting-api-generated.js +10 -10
  20. package/dist/api.d.ts +0 -10
  21. package/dist/api.js +10 -10
  22. package/dist/base.d.ts +0 -10
  23. package/dist/base.js +10 -10
  24. package/dist/browser.js +1 -1
  25. package/dist/client.d.ts +0 -10
  26. package/dist/client.js +10 -10
  27. package/dist/common.d.ts +0 -10
  28. package/dist/common.js +10 -10
  29. package/dist/configuration.d.ts +5 -10
  30. package/dist/configuration.js +11 -11
  31. package/dist/error.d.ts +0 -10
  32. package/dist/error.js +10 -10
  33. package/dist/index.d.ts +0 -10
  34. package/dist/index.js +10 -10
  35. package/dist/models/account-holdings-account.d.ts +0 -10
  36. package/dist/models/account-holdings-account.js +10 -12
  37. package/dist/models/account-holdings.d.ts +0 -10
  38. package/dist/models/account-holdings.js +10 -12
  39. package/dist/models/account-order-record-status.d.ts +0 -10
  40. package/dist/models/account-order-record-status.js +10 -12
  41. package/dist/models/account-order-record.d.ts +0 -10
  42. package/dist/models/account-order-record.js +10 -12
  43. package/dist/models/account-simple.d.ts +0 -10
  44. package/dist/models/account-simple.js +10 -12
  45. package/dist/models/account-sync-status.d.ts +0 -10
  46. package/dist/models/account-sync-status.js +10 -12
  47. package/dist/models/account.d.ts +0 -10
  48. package/dist/models/account.js +10 -12
  49. package/dist/models/action.d.ts +0 -10
  50. package/dist/models/action.js +10 -12
  51. package/dist/models/authentication-login-snap-trade-user200-response.d.ts +0 -10
  52. package/dist/models/authentication-login-snap-trade-user200-response.js +10 -12
  53. package/dist/models/balance.d.ts +0 -10
  54. package/dist/models/balance.js +10 -12
  55. package/dist/models/brokerage-authorization-type-read-only-brokerage.d.ts +0 -10
  56. package/dist/models/brokerage-authorization-type-read-only-brokerage.js +10 -12
  57. package/dist/models/brokerage-authorization-type-read-only.d.ts +0 -10
  58. package/dist/models/brokerage-authorization-type-read-only.js +10 -12
  59. package/dist/models/brokerage-authorization-type.d.ts +0 -10
  60. package/dist/models/brokerage-authorization-type.js +10 -12
  61. package/dist/models/brokerage-authorization.d.ts +0 -10
  62. package/dist/models/brokerage-authorization.js +10 -12
  63. package/dist/models/brokerage-symbol-option-symbol.d.ts +0 -10
  64. package/dist/models/brokerage-symbol-option-symbol.js +10 -12
  65. package/dist/models/brokerage-symbol-symbol.d.ts +6 -16
  66. package/dist/models/brokerage-symbol-symbol.js +10 -12
  67. package/dist/models/brokerage-symbol.d.ts +0 -10
  68. package/dist/models/brokerage-symbol.js +10 -12
  69. package/dist/models/brokerage-type.d.ts +0 -10
  70. package/dist/models/brokerage-type.js +10 -12
  71. package/dist/models/brokerage.d.ts +0 -10
  72. package/dist/models/brokerage.js +10 -12
  73. package/dist/models/calculated-trade.d.ts +0 -10
  74. package/dist/models/calculated-trade.js +10 -12
  75. package/dist/models/cash-restriction.d.ts +0 -10
  76. package/dist/models/cash-restriction.js +10 -12
  77. package/dist/models/connections-session-events200-response-inner.d.ts +0 -10
  78. package/dist/models/connections-session-events200-response-inner.js +10 -12
  79. package/dist/models/currency.d.ts +0 -10
  80. package/dist/models/currency.js +10 -12
  81. package/dist/models/delete-user-response.d.ts +0 -10
  82. package/dist/models/delete-user-response.js +10 -12
  83. package/dist/models/dividend-at-date.d.ts +0 -10
  84. package/dist/models/dividend-at-date.js +10 -12
  85. package/dist/models/encrypted-response-encrypted-message-data.d.ts +0 -10
  86. package/dist/models/encrypted-response-encrypted-message-data.js +10 -12
  87. package/dist/models/encrypted-response.d.ts +0 -10
  88. package/dist/models/encrypted-response.js +10 -12
  89. package/dist/models/exchange-rate-pairs.d.ts +0 -10
  90. package/dist/models/exchange-rate-pairs.js +10 -12
  91. package/dist/models/exchange.d.ts +0 -10
  92. package/dist/models/exchange.js +10 -12
  93. package/dist/models/excluded-asset.d.ts +0 -10
  94. package/dist/models/excluded-asset.js +10 -12
  95. package/dist/models/jwt.d.ts +0 -10
  96. package/dist/models/jwt.js +10 -12
  97. package/dist/models/login-redirect-uri.d.ts +0 -10
  98. package/dist/models/login-redirect-uri.js +10 -12
  99. package/dist/models/manual-trade-and-impact.d.ts +0 -10
  100. package/dist/models/manual-trade-and-impact.js +10 -12
  101. package/dist/models/manual-trade-balance.d.ts +0 -10
  102. package/dist/models/manual-trade-balance.js +10 -12
  103. package/dist/models/manual-trade-form.d.ts +0 -10
  104. package/dist/models/manual-trade-form.js +10 -12
  105. package/dist/models/manual-trade-symbol.d.ts +0 -10
  106. package/dist/models/manual-trade-symbol.js +10 -12
  107. package/dist/models/manual-trade.d.ts +0 -10
  108. package/dist/models/manual-trade.js +10 -12
  109. package/dist/models/model-asset-class-details.d.ts +0 -10
  110. package/dist/models/model-asset-class-details.js +10 -12
  111. package/dist/models/model-asset-class-target.d.ts +0 -10
  112. package/dist/models/model-asset-class-target.js +10 -12
  113. package/dist/models/model-asset-class.d.ts +0 -10
  114. package/dist/models/model-asset-class.js +10 -12
  115. package/dist/models/model-portfolio-asset-class.d.ts +0 -10
  116. package/dist/models/model-portfolio-asset-class.js +10 -12
  117. package/dist/models/model-portfolio-details.d.ts +0 -10
  118. package/dist/models/model-portfolio-details.js +10 -12
  119. package/dist/models/model-portfolio-security.d.ts +0 -10
  120. package/dist/models/model-portfolio-security.js +10 -12
  121. package/dist/models/model-portfolio.d.ts +0 -10
  122. package/dist/models/model-portfolio.js +10 -12
  123. package/dist/models/model400-failed-request-response.d.ts +0 -10
  124. package/dist/models/model400-failed-request-response.js +10 -12
  125. package/dist/models/model401-failed-request-response.d.ts +0 -10
  126. package/dist/models/model401-failed-request-response.js +10 -12
  127. package/dist/models/model403-failed-request-response.d.ts +0 -10
  128. package/dist/models/model403-failed-request-response.js +10 -12
  129. package/dist/models/model404-failed-request-response.d.ts +0 -10
  130. package/dist/models/model404-failed-request-response.js +10 -12
  131. package/dist/models/monthly-dividends.d.ts +0 -10
  132. package/dist/models/monthly-dividends.js +10 -12
  133. package/dist/models/net-contributions.d.ts +0 -10
  134. package/dist/models/net-contributions.js +10 -12
  135. package/dist/models/net-dividend.d.ts +0 -10
  136. package/dist/models/net-dividend.js +10 -12
  137. package/dist/models/option-chain-inner-chain-per-root-inner-chain-per-strike-price-inner.d.ts +0 -10
  138. package/dist/models/option-chain-inner-chain-per-root-inner-chain-per-strike-price-inner.js +10 -12
  139. package/dist/models/option-chain-inner-chain-per-root-inner.d.ts +0 -10
  140. package/dist/models/option-chain-inner-chain-per-root-inner.js +10 -12
  141. package/dist/models/option-chain-inner.d.ts +0 -10
  142. package/dist/models/option-chain-inner.js +10 -12
  143. package/dist/models/option-leg.d.ts +0 -10
  144. package/dist/models/option-leg.js +10 -12
  145. package/dist/models/option-strategy-legs-inner.d.ts +0 -10
  146. package/dist/models/option-strategy-legs-inner.js +10 -12
  147. package/dist/models/option-strategy.d.ts +0 -10
  148. package/dist/models/option-strategy.js +10 -12
  149. package/dist/models/options-get-option-strategy-request.d.ts +0 -10
  150. package/dist/models/options-get-option-strategy-request.js +10 -12
  151. package/dist/models/options-holdings.d.ts +0 -10
  152. package/dist/models/options-holdings.js +10 -12
  153. package/dist/models/options-place-option-strategy-request.d.ts +0 -10
  154. package/dist/models/options-place-option-strategy-request.js +10 -12
  155. package/dist/models/options-position-currency.d.ts +0 -10
  156. package/dist/models/options-position-currency.js +10 -12
  157. package/dist/models/options-position.d.ts +0 -22
  158. package/dist/models/options-position.js +10 -12
  159. package/dist/models/options-symbol.d.ts +0 -10
  160. package/dist/models/options-symbol.js +10 -12
  161. package/dist/models/order-type.d.ts +0 -10
  162. package/dist/models/order-type.js +10 -12
  163. package/dist/models/partner-data.d.ts +0 -10
  164. package/dist/models/partner-data.js +10 -12
  165. package/dist/models/past-value.d.ts +0 -10
  166. package/dist/models/past-value.js +10 -12
  167. package/dist/models/performance-custom.d.ts +0 -10
  168. package/dist/models/performance-custom.js +10 -12
  169. package/dist/models/portfolio-group-info.d.ts +0 -10
  170. package/dist/models/portfolio-group-info.js +10 -12
  171. package/dist/models/portfolio-group-position.d.ts +0 -10
  172. package/dist/models/portfolio-group-position.js +10 -12
  173. package/dist/models/portfolio-group-settings.d.ts +0 -10
  174. package/dist/models/portfolio-group-settings.js +10 -12
  175. package/dist/models/portfolio-group.d.ts +0 -10
  176. package/dist/models/portfolio-group.js +10 -12
  177. package/dist/models/position-symbol.d.ts +0 -10
  178. package/dist/models/position-symbol.js +10 -12
  179. package/dist/models/position.d.ts +0 -10
  180. package/dist/models/position.js +10 -12
  181. package/dist/models/redirect-tokenand-pin.d.ts +0 -10
  182. package/dist/models/redirect-tokenand-pin.js +10 -12
  183. package/dist/models/security-type.d.ts +0 -10
  184. package/dist/models/security-type.js +10 -12
  185. package/dist/models/session-event.d.ts +0 -10
  186. package/dist/models/session-event.js +10 -12
  187. package/dist/models/snap-trade-apidisclaimer-accept-status.d.ts +0 -10
  188. package/dist/models/snap-trade-apidisclaimer-accept-status.js +10 -12
  189. package/dist/models/snap-trade-holdings-account-account-id.d.ts +0 -10
  190. package/dist/models/snap-trade-holdings-account-account-id.js +10 -12
  191. package/dist/models/snap-trade-holdings-account.d.ts +0 -10
  192. package/dist/models/snap-trade-holdings-account.js +10 -12
  193. package/dist/models/snap-trade-holdings-total-value.d.ts +0 -10
  194. package/dist/models/snap-trade-holdings-total-value.js +10 -12
  195. package/dist/models/snap-trade-login-user-request-body.d.ts +0 -10
  196. package/dist/models/snap-trade-login-user-request-body.js +10 -12
  197. package/dist/models/snap-trade-register-user-request-body.d.ts +0 -10
  198. package/dist/models/snap-trade-register-user-request-body.js +10 -12
  199. package/dist/models/status.d.ts +0 -10
  200. package/dist/models/status.js +10 -12
  201. package/dist/models/strategy-impact-legs-inner.d.ts +0 -10
  202. package/dist/models/strategy-impact-legs-inner.js +10 -12
  203. package/dist/models/strategy-impact.d.ts +0 -10
  204. package/dist/models/strategy-impact.js +10 -12
  205. package/dist/models/strategy-order-place-orders-inner-legs-inner.d.ts +0 -10
  206. package/dist/models/strategy-order-place-orders-inner-legs-inner.js +10 -12
  207. package/dist/models/strategy-order-place-orders-inner.d.ts +0 -10
  208. package/dist/models/strategy-order-place-orders-inner.js +10 -12
  209. package/dist/models/strategy-order-place.d.ts +0 -10
  210. package/dist/models/strategy-order-place.js +10 -12
  211. package/dist/models/strategy-order-record.d.ts +0 -10
  212. package/dist/models/strategy-order-record.js +10 -12
  213. package/dist/models/strategy-quotes-greek.d.ts +0 -10
  214. package/dist/models/strategy-quotes-greek.js +10 -12
  215. package/dist/models/strategy-quotes.d.ts +0 -10
  216. package/dist/models/strategy-quotes.js +10 -12
  217. package/dist/models/sub-period-return-rate.d.ts +0 -10
  218. package/dist/models/sub-period-return-rate.js +10 -12
  219. package/dist/models/symbol-query.d.ts +0 -10
  220. package/dist/models/symbol-query.js +10 -12
  221. package/dist/models/symbol.d.ts +0 -10
  222. package/dist/models/symbol.js +10 -12
  223. package/dist/models/symbols-quotes-inner.d.ts +0 -10
  224. package/dist/models/symbols-quotes-inner.js +10 -12
  225. package/dist/models/target-asset.d.ts +0 -10
  226. package/dist/models/target-asset.js +10 -12
  227. package/dist/models/time-in-force.d.ts +0 -10
  228. package/dist/models/time-in-force.js +10 -12
  229. package/dist/models/trade-execution-status.d.ts +0 -10
  230. package/dist/models/trade-execution-status.js +10 -12
  231. package/dist/models/trade-impact.d.ts +0 -10
  232. package/dist/models/trade-impact.js +10 -12
  233. package/dist/models/trade.d.ts +0 -10
  234. package/dist/models/trade.js +10 -12
  235. package/dist/models/trading-cancel-user-account-order-request.d.ts +0 -10
  236. package/dist/models/trading-cancel-user-account-order-request.js +10 -12
  237. package/dist/models/trading-place-ocoorder-request.d.ts +0 -10
  238. package/dist/models/trading-place-ocoorder-request.js +10 -12
  239. package/dist/models/transactions-status.d.ts +0 -10
  240. package/dist/models/transactions-status.js +10 -12
  241. package/dist/models/underlying-symbol.d.ts +0 -10
  242. package/dist/models/underlying-symbol.js +10 -12
  243. package/dist/models/universal-activity.d.ts +1 -11
  244. package/dist/models/universal-activity.js +10 -12
  245. package/dist/models/universal-symbol-ticker.d.ts +0 -10
  246. package/dist/models/universal-symbol-ticker.js +10 -12
  247. package/dist/models/universal-symbol.d.ts +6 -16
  248. package/dist/models/universal-symbol.js +10 -12
  249. package/dist/models/user-error-log.d.ts +0 -10
  250. package/dist/models/user-error-log.js +10 -12
  251. package/dist/models/user-idand-secret.d.ts +0 -10
  252. package/dist/models/user-idand-secret.js +10 -12
  253. package/dist/models/user-settings.d.ts +0 -10
  254. package/dist/models/user-settings.js +10 -12
  255. package/dist/models/usexchange.d.ts +0 -10
  256. package/dist/models/usexchange.js +10 -12
  257. package/dist/pagination/page-types.d.ts +0 -10
  258. package/dist/pagination/page-types.js +10 -10
  259. package/dist/pagination/page.d.ts +0 -10
  260. package/dist/pagination/page.js +10 -10
  261. package/dist/pagination/pageable.d.ts +0 -10
  262. package/dist/pagination/pageable.js +10 -10
  263. package/dist/pagination/paginate.d.ts +0 -10
  264. package/dist/pagination/paginate.js +10 -10
  265. package/package.json +4 -1
package/README.md CHANGED
@@ -1,9 +1,71 @@
1
- # snaptrade-typescript-sdk
1
+ <div align="center">
2
2
 
3
- [![npm](https://img.shields.io/badge/npm-v8.28.2-blue)](https://www.npmjs.com/package/snaptrade-typescript-sdk/v/8.28.2)
4
- [![More Info](https://img.shields.io/badge/More%20Info-Click%20Here-orange)](https://snaptrade.com/)
3
+ [![Visit SnapTrade](./header.png)](https://snaptrade.com)
4
+
5
+ # [SnapTrade](https://snaptrade.com)
5
6
 
6
7
  Connect brokerage accounts to your app for live positions and trading
8
+
9
+ [![npm](https://img.shields.io/badge/npm-v8.29.1-blue)](https://www.npmjs.com/package/snaptrade-typescript-sdk/v/8.29.1)
10
+ [![More Info](https://img.shields.io/badge/More%20Info-Click%20Here-orange)](https://snaptrade.com/)
11
+
12
+ </div>
13
+
14
+ ## Table of Contents
15
+
16
+ <!-- toc -->
17
+
18
+ - [Installing](#installing)
19
+ * [npm](#npm)
20
+ * [yarn](#yarn)
21
+ - [Getting Started](#getting-started)
22
+ - [Reference](#reference)
23
+ * [`snaptrade.accountInformation.getAllUserHoldings`](#snaptradeaccountinformationgetalluserholdings)
24
+ * [`snaptrade.accountInformation.getUserAccountBalance`](#snaptradeaccountinformationgetuseraccountbalance)
25
+ * [`snaptrade.accountInformation.getUserAccountDetails`](#snaptradeaccountinformationgetuseraccountdetails)
26
+ * [`snaptrade.accountInformation.getUserAccountOrders`](#snaptradeaccountinformationgetuseraccountorders)
27
+ * [`snaptrade.accountInformation.getUserAccountPositions`](#snaptradeaccountinformationgetuseraccountpositions)
28
+ * [`snaptrade.accountInformation.getUserHoldings`](#snaptradeaccountinformationgetuserholdings)
29
+ * [`snaptrade.accountInformation.listUserAccounts`](#snaptradeaccountinformationlistuseraccounts)
30
+ * [`snaptrade.accountInformation.updateUserAccount`](#snaptradeaccountinformationupdateuseraccount)
31
+ * [`snaptrade.apiStatus.check`](#snaptradeapistatuscheck)
32
+ * [`snaptrade.authentication.deleteSnapTradeUser`](#snaptradeauthenticationdeletesnaptradeuser)
33
+ * [`snaptrade.authentication.getUserJWT`](#snaptradeauthenticationgetuserjwt)
34
+ * [`snaptrade.authentication.listSnapTradeUsers`](#snaptradeauthenticationlistsnaptradeusers)
35
+ * [`snaptrade.authentication.loginSnapTradeUser`](#snaptradeauthenticationloginsnaptradeuser)
36
+ * [`snaptrade.authentication.registerSnapTradeUser`](#snaptradeauthenticationregistersnaptradeuser)
37
+ * [`snaptrade.connections.detailBrokerageAuthorization`](#snaptradeconnectionsdetailbrokerageauthorization)
38
+ * [`snaptrade.connections.listBrokerageAuthorizations`](#snaptradeconnectionslistbrokerageauthorizations)
39
+ * [`snaptrade.connections.removeBrokerageAuthorization`](#snaptradeconnectionsremovebrokerageauthorization)
40
+ * [`snaptrade.connections.sessionEvents`](#snaptradeconnectionssessionevents)
41
+ * [`snaptrade.errorLogs.listUserErrors`](#snaptradeerrorlogslistusererrors)
42
+ * [`snaptrade.options.getOptionStrategy`](#snaptradeoptionsgetoptionstrategy)
43
+ * [`snaptrade.options.getOptionsChain`](#snaptradeoptionsgetoptionschain)
44
+ * [`snaptrade.options.getOptionsStrategyQuote`](#snaptradeoptionsgetoptionsstrategyquote)
45
+ * [`snaptrade.options.listOptionHoldings`](#snaptradeoptionslistoptionholdings)
46
+ * [`snaptrade.options.placeOptionStrategy`](#snaptradeoptionsplaceoptionstrategy)
47
+ * [`snaptrade.referenceData.getCurrencyExchangeRatePair`](#snaptradereferencedatagetcurrencyexchangeratepair)
48
+ * [`snaptrade.referenceData.getPartnerInfo`](#snaptradereferencedatagetpartnerinfo)
49
+ * [`snaptrade.referenceData.getSecurityTypes`](#snaptradereferencedatagetsecuritytypes)
50
+ * [`snaptrade.referenceData.getStockExchanges`](#snaptradereferencedatagetstockexchanges)
51
+ * [`snaptrade.referenceData.getSymbols`](#snaptradereferencedatagetsymbols)
52
+ * [`snaptrade.referenceData.getSymbolsByTicker`](#snaptradereferencedatagetsymbolsbyticker)
53
+ * [`snaptrade.referenceData.listAllBrokerageAuthorizationType`](#snaptradereferencedatalistallbrokerageauthorizationtype)
54
+ * [`snaptrade.referenceData.listAllBrokerages`](#snaptradereferencedatalistallbrokerages)
55
+ * [`snaptrade.referenceData.listAllCurrencies`](#snaptradereferencedatalistallcurrencies)
56
+ * [`snaptrade.referenceData.listAllCurrenciesRates`](#snaptradereferencedatalistallcurrenciesrates)
57
+ * [`snaptrade.referenceData.symbolSearchUserAccount`](#snaptradereferencedatasymbolsearchuseraccount)
58
+ * [`snaptrade.trading.cancelUserAccountOrder`](#snaptradetradingcanceluseraccountorder)
59
+ * [`snaptrade.trading.getOrderImpact`](#snaptradetradinggetorderimpact)
60
+ * [`snaptrade.trading.getUserAccountQuotes`](#snaptradetradinggetuseraccountquotes)
61
+ * [`snaptrade.trading.placeForceOrder`](#snaptradetradingplaceforceorder)
62
+ * [`snaptrade.trading.placeOCOOrder`](#snaptradetradingplaceocoorder)
63
+ * [`snaptrade.trading.placeOrder`](#snaptradetradingplaceorder)
64
+ * [`snaptrade.transactionsAndReporting.getActivities`](#snaptradetransactionsandreportinggetactivities)
65
+ * [`snaptrade.transactionsAndReporting.getReportingCustomRange`](#snaptradetransactionsandreportinggetreportingcustomrange)
66
+
67
+ <!-- tocstop -->
68
+
7
69
  ## Installing
8
70
 
9
71
  ### npm
@@ -16,11 +78,6 @@ npm install snaptrade-typescript-sdk --save
16
78
  yarn add snaptrade-typescript-sdk
17
79
  ```
18
80
 
19
- **Important note: this library can be used in both the client-side or server-side, but using it
20
- in client-side browser code is not recommended as you would expose security credentials.**
21
-
22
-
23
-
24
81
  ## Getting Started
25
82
 
26
83
  ```typescript
@@ -98,55 +155,1602 @@ function getUserId() {
98
155
  main();
99
156
  ```
100
157
 
101
- ## Documentation for API Endpoints
102
-
103
- All URIs are relative to *https://api.snaptrade.com/api/v1*
104
-
105
- Tag | Method | HTTP request | Description
106
- ------------ | ------------- | ------------- | -------------
107
- *Account Information* | [**getAllUserHoldings**](docs/AccountInformationApi.md#getAllUserHoldings) | **GET** /holdings | List all accounts for the user, plus balances, positions, and orders for each account.
108
- *Account Information* | [**getUserAccountBalance**](docs/AccountInformationApi.md#getUserAccountBalance) | **GET** /accounts/{accountId}/balances | List account balances
109
- *Account Information* | [**getUserAccountDetails**](docs/AccountInformationApi.md#getUserAccountDetails) | **GET** /accounts/{accountId} | Return details of a specific investment account
110
- *Account Information* | [**getUserAccountOrders**](docs/AccountInformationApi.md#getUserAccountOrders) | **GET** /accounts/{accountId}/orders | Get history of orders placed in account
111
- *Account Information* | [**getUserAccountPositions**](docs/AccountInformationApi.md#getUserAccountPositions) | **GET** /accounts/{accountId}/positions | List account positions
112
- *Account Information* | [**getUserHoldings**](docs/AccountInformationApi.md#getUserHoldings) | **GET** /accounts/{accountId}/holdings | List balances, positions and orders for the specified account.
113
- *Account Information* | [**listUserAccounts**](docs/AccountInformationApi.md#listUserAccounts) | **GET** /accounts | List accounts
114
- *Account Information* | [**updateUserAccount**](docs/AccountInformationApi.md#updateUserAccount) | **PUT** /accounts/{accountId} | Update details of an investment account
115
- *API Status* | [**check**](docs/ApiStatusApi.md#check) | **GET** / | Get API Status
116
- *Authentication* | [**deleteSnapTradeUser**](docs/AuthenticationApi.md#deleteSnapTradeUser) | **DELETE** /snapTrade/deleteUser | Delete SnapTrade user
117
- *Authentication* | [**getUserJWT**](docs/AuthenticationApi.md#getUserJWT) | **GET** /snapTrade/encryptedJWT | Generate encrypted JWT token
118
- *Authentication* | [**listSnapTradeUsers**](docs/AuthenticationApi.md#listSnapTradeUsers) | **GET** /snapTrade/listUsers | List SnapTrade users
119
- *Authentication* | [**loginSnapTradeUser**](docs/AuthenticationApi.md#loginSnapTradeUser) | **POST** /snapTrade/login | Login user &amp; generate connection link
120
- *Authentication* | [**registerSnapTradeUser**](docs/AuthenticationApi.md#registerSnapTradeUser) | **POST** /snapTrade/registerUser | Create SnapTrade user
121
- *Connections* | [**detailBrokerageAuthorization**](docs/ConnectionsApi.md#detailBrokerageAuthorization) | **GET** /authorizations/{authorizationId} | Get brokerage authorization details
122
- *Connections* | [**listBrokerageAuthorizations**](docs/ConnectionsApi.md#listBrokerageAuthorizations) | **GET** /authorizations | List all brokerage authorizations for the user
123
- *Connections* | [**removeBrokerageAuthorization**](docs/ConnectionsApi.md#removeBrokerageAuthorization) | **DELETE** /authorizations/{authorizationId} | Delete brokerage authorization
124
- *Connections* | [**sessionEvents**](docs/ConnectionsApi.md#sessionEvents) | **GET** /sessionEvents | List all session events for the partner
125
- *Error Logs* | [**listUserErrors**](docs/ErrorLogsApi.md#listUserErrors) | **GET** /snapTrade/listUserErrors | Retrieve error logs on behalf of your SnapTrade users
126
- *Options* | [**getOptionStrategy**](docs/OptionsApi.md#getOptionStrategy) | **POST** /accounts/{accountId}/optionStrategy | Creates an option strategy object that will be used to place an option strategy order
127
- *Options* | [**getOptionsChain**](docs/OptionsApi.md#getOptionsChain) | **GET** /accounts/{accountId}/optionsChain | Get the options chain
128
- *Options* | [**getOptionsStrategyQuote**](docs/OptionsApi.md#getOptionsStrategyQuote) | **GET** /accounts/{accountId}/optionStrategy/{optionStrategyId} | Get latest market data of option strategy
129
- *Options* | [**listOptionHoldings**](docs/OptionsApi.md#listOptionHoldings) | **GET** /accounts/{accountId}/options | Get the options holdings in the account
130
- *Options* | [**placeOptionStrategy**](docs/OptionsApi.md#placeOptionStrategy) | **POST** /accounts/{accountId}/optionStrategy/{optionStrategyId}/execute | Place an option strategy order on the brokerage
131
- *Reference Data* | [**getCurrencyExchangeRatePair**](docs/ReferenceDataApi.md#getCurrencyExchangeRatePair) | **GET** /currencies/rates/{currencyPair} | Return the exchange rate of a currency pair
132
- *Reference Data* | [**getPartnerInfo**](docs/ReferenceDataApi.md#getPartnerInfo) | **GET** /snapTrade/partners | Get metadata related to Snaptrade partner
133
- *Reference Data* | [**getSecurityTypes**](docs/ReferenceDataApi.md#getSecurityTypes) | **GET** /securityTypes | List of all security types.
134
- *Reference Data* | [**getStockExchanges**](docs/ReferenceDataApi.md#getStockExchanges) | **GET** /exchanges | List exchanges
135
- *Reference Data* | [**getSymbols**](docs/ReferenceDataApi.md#getSymbols) | **POST** /symbols | Search for symbols
136
- *Reference Data* | [**getSymbolsByTicker**](docs/ReferenceDataApi.md#getSymbolsByTicker) | **GET** /symbols/{ticker} | Get details of a symbol by the ticker
137
- *Reference Data* | [**listAllBrokerageAuthorizationType**](docs/ReferenceDataApi.md#listAllBrokerageAuthorizationType) | **GET** /brokerageAuthorizationTypes | List of all brokerage authorization types
138
- *Reference Data* | [**listAllBrokerages**](docs/ReferenceDataApi.md#listAllBrokerages) | **GET** /brokerages | List brokerages
139
- *Reference Data* | [**listAllCurrencies**](docs/ReferenceDataApi.md#listAllCurrencies) | **GET** /currencies | List currencies
140
- *Reference Data* | [**listAllCurrenciesRates**](docs/ReferenceDataApi.md#listAllCurrenciesRates) | **GET** /currencies/rates | List currency exchange rates
141
- *Reference Data* | [**symbolSearchUserAccount**](docs/ReferenceDataApi.md#symbolSearchUserAccount) | **POST** /accounts/{accountId}/symbols | Search for symbols available in an account
142
- *Trading* | [**cancelUserAccountOrder**](docs/TradingApi.md#cancelUserAccountOrder) | **POST** /accounts/{accountId}/orders/cancel | Cancel open order in account
143
- *Trading* | [**getOrderImpact**](docs/TradingApi.md#getOrderImpact) | **POST** /trade/impact | Check impact of trades on account.
144
- *Trading* | [**getUserAccountQuotes**](docs/TradingApi.md#getUserAccountQuotes) | **GET** /accounts/{accountId}/quotes | Get symbol quotes
145
- *Trading* | [**placeForceOrder**](docs/TradingApi.md#placeForceOrder) | **POST** /trade/place | Place a trade with NO validation.
146
- *Trading* | [**placeOCOOrder**](docs/TradingApi.md#placeOCOOrder) | **POST** /trade/oco | Place a OCO (One Cancels Other) order
147
- *Trading* | [**placeOrder**](docs/TradingApi.md#placeOrder) | **POST** /trade/{tradeId} | Place order
148
- *Transactions And Reporting* | [**getActivities**](docs/TransactionsAndReportingApi.md#getActivities) | **GET** /activities | Get transaction history for a user
149
- *Transactions And Reporting* | [**getReportingCustomRange**](docs/TransactionsAndReportingApi.md#getReportingCustomRange) | **GET** /performance/custom | Get performance information for a specific timeframe
158
+ ## Reference
159
+
160
+
161
+ ### `snaptrade.accountInformation.getAllUserHoldings`
162
+
163
+ List all accounts for the user, plus balances, positions, and orders for each account.
164
+
165
+ #### 🛠️ Usage
166
+
167
+ ```typescript
168
+ const getAllUserHoldingsResponse =
169
+ await snaptrade.accountInformation.getAllUserHoldings({
170
+ userId: "John.doe@snaptrade.com",
171
+ userSecret: "USERSECRET123",
172
+ brokerageAuthorizations: "917c8734-8470-4a3e-a18f-57c3f2ee6631",
173
+ });
174
+ ```
175
+
176
+ #### ⚙️ Parameters
177
+
178
+ ##### userId: `string`
179
+
180
+ ##### userSecret: `string`
181
+
182
+ ##### brokerageAuthorizations: `string`
183
+
184
+ Optional. Comma seperated list of authorization IDs (only use if filtering is needed on one or more authorizations).
185
+
186
+ #### 🔄 Return
187
+
188
+ [AccountHoldings](./models/account-holdings.ts)
189
+
190
+ #### 🌐 Endpoint
191
+
192
+ `/holdings` `GET`
193
+
194
+ [🔙 **Back to Table of Contents**](#table-of-contents)
195
+
196
+ ---
197
+
198
+
199
+ ### `snaptrade.accountInformation.getUserAccountBalance`
200
+
201
+ List account balances
202
+
203
+ #### 🛠️ Usage
204
+
205
+ ```typescript
206
+ const getUserAccountBalanceResponse =
207
+ await snaptrade.accountInformation.getUserAccountBalance({
208
+ userId: "John.doe@snaptrade.com",
209
+ userSecret: "USERSECRET123",
210
+ accountId: "accountId_example",
211
+ });
212
+ ```
213
+
214
+ #### ⚙️ Parameters
215
+
216
+ ##### userId: `string`
217
+
218
+ ##### userSecret: `string`
219
+
220
+ ##### accountId: `string`
221
+
222
+ The ID of the account to get balances.
223
+
224
+ #### 🔄 Return
225
+
226
+ [Balance](./models/balance.ts)
227
+
228
+ #### 🌐 Endpoint
229
+
230
+ `/accounts/{accountId}/balances` `GET`
231
+
232
+ [🔙 **Back to Table of Contents**](#table-of-contents)
233
+
234
+ ---
235
+
236
+
237
+ ### `snaptrade.accountInformation.getUserAccountDetails`
238
+
239
+ Return details of a specific investment account
240
+
241
+ #### 🛠️ Usage
242
+
243
+ ```typescript
244
+ const getUserAccountDetailsResponse =
245
+ await snaptrade.accountInformation.getUserAccountDetails({
246
+ userId: "John.doe@snaptrade.com",
247
+ userSecret: "USERSECRET123",
248
+ accountId: "accountId_example",
249
+ });
250
+ ```
251
+
252
+ #### ⚙️ Parameters
253
+
254
+ ##### userId: `string`
255
+
256
+ ##### userSecret: `string`
257
+
258
+ ##### accountId: `string`
259
+
260
+ The ID of the account to get detail of.
261
+
262
+ #### 🔄 Return
263
+
264
+ [Account](./models/account.ts)
265
+
266
+ #### 🌐 Endpoint
267
+
268
+ `/accounts/{accountId}` `GET`
269
+
270
+ [🔙 **Back to Table of Contents**](#table-of-contents)
271
+
272
+ ---
273
+
274
+
275
+ ### `snaptrade.accountInformation.getUserAccountOrders`
276
+
277
+ Get history of orders placed in account
278
+
279
+ #### 🛠️ Usage
280
+
281
+ ```typescript
282
+ const getUserAccountOrdersResponse =
283
+ await snaptrade.accountInformation.getUserAccountOrders({
284
+ userId: "John.doe@snaptrade.com",
285
+ userSecret: "USERSECRET123",
286
+ state: "all",
287
+ accountId: "accountId_example",
288
+ });
289
+ ```
290
+
291
+ #### ⚙️ Parameters
292
+
293
+ ##### userId: `string`
294
+
295
+ ##### userSecret: `string`
296
+
297
+ ##### accountId: `string`
298
+
299
+ The ID of the account to get orders.
300
+
301
+ ##### state: `'all' | 'open' | 'executed'`
302
+
303
+ defaults value is set to \"all\"
304
+
305
+ #### 🔄 Return
306
+
307
+ [AccountOrderRecord](./models/account-order-record.ts)
308
+
309
+ #### 🌐 Endpoint
310
+
311
+ `/accounts/{accountId}/orders` `GET`
312
+
313
+ [🔙 **Back to Table of Contents**](#table-of-contents)
314
+
315
+ ---
316
+
317
+
318
+ ### `snaptrade.accountInformation.getUserAccountPositions`
319
+
320
+ List account positions
321
+
322
+ #### 🛠️ Usage
323
+
324
+ ```typescript
325
+ const getUserAccountPositionsResponse =
326
+ await snaptrade.accountInformation.getUserAccountPositions({
327
+ userId: "John.doe@snaptrade.com",
328
+ userSecret: "USERSECRET123",
329
+ accountId: "accountId_example",
330
+ });
331
+ ```
332
+
333
+ #### ⚙️ Parameters
334
+
335
+ ##### userId: `string`
336
+
337
+ ##### userSecret: `string`
338
+
339
+ ##### accountId: `string`
340
+
341
+ The ID of the account to get positions.
342
+
343
+ #### 🔄 Return
344
+
345
+ [Position](./models/position.ts)
346
+
347
+ #### 🌐 Endpoint
348
+
349
+ `/accounts/{accountId}/positions` `GET`
350
+
351
+ [🔙 **Back to Table of Contents**](#table-of-contents)
352
+
353
+ ---
354
+
355
+
356
+ ### `snaptrade.accountInformation.getUserHoldings`
357
+
358
+ List balances, positions and orders for the specified account.
359
+
360
+ #### 🛠️ Usage
361
+
362
+ ```typescript
363
+ const getUserHoldingsResponse =
364
+ await snaptrade.accountInformation.getUserHoldings({
365
+ accountId: "917c8734-8470-4a3e-a18f-57c3f2ee6631",
366
+ userId: "John.doe@snaptrade.com",
367
+ userSecret: "USERSECRET123",
368
+ });
369
+ ```
370
+
371
+ #### ⚙️ Parameters
372
+
373
+ ##### accountId: `string`
374
+
375
+ The ID of the account to fetch holdings for.
376
+
377
+ ##### userId: `string`
378
+
379
+ ##### userSecret: `string`
380
+
381
+ #### 🔄 Return
382
+
383
+ [AccountHoldingsAccount](./models/account-holdings-account.ts)
384
+
385
+ #### 🌐 Endpoint
386
+
387
+ `/accounts/{accountId}/holdings` `GET`
388
+
389
+ [🔙 **Back to Table of Contents**](#table-of-contents)
390
+
391
+ ---
392
+
393
+
394
+ ### `snaptrade.accountInformation.listUserAccounts`
395
+
396
+ List accounts
397
+
398
+ #### 🛠️ Usage
399
+
400
+ ```typescript
401
+ const listUserAccountsResponse =
402
+ await snaptrade.accountInformation.listUserAccounts({
403
+ userId: "John.doe@snaptrade.com",
404
+ userSecret: "USERSECRET123",
405
+ });
406
+ ```
407
+
408
+ #### ⚙️ Parameters
409
+
410
+ ##### userId: `string`
411
+
412
+ ##### userSecret: `string`
413
+
414
+ #### 🔄 Return
415
+
416
+ [Account](./models/account.ts)
417
+
418
+ #### 🌐 Endpoint
419
+
420
+ `/accounts` `GET`
421
+
422
+ [🔙 **Back to Table of Contents**](#table-of-contents)
423
+
424
+ ---
425
+
426
+
427
+ ### `snaptrade.accountInformation.updateUserAccount`
428
+
429
+ Update details of an investment account
430
+
431
+ #### 🛠️ Usage
432
+
433
+ ```typescript
434
+ const updateUserAccountResponse =
435
+ await snaptrade.accountInformation.updateUserAccount({
436
+ userId: "John.doe@snaptrade.com",
437
+ userSecret: "USERSECRET123",
438
+ accountId: "accountId_example",
439
+ });
440
+ ```
441
+
442
+ #### ⚙️ Parameters
443
+
444
+ ##### userId: `string`
445
+
446
+ ##### userSecret: `string`
447
+
448
+ ##### accountId: `string`
449
+
450
+ The ID of the account to update.
451
+
452
+ #### 🔄 Return
453
+
454
+ [Account](./models/account.ts)
455
+
456
+ #### 🌐 Endpoint
457
+
458
+ `/accounts/{accountId}` `PUT`
459
+
460
+ [🔙 **Back to Table of Contents**](#table-of-contents)
461
+
462
+ ---
463
+
464
+
465
+ ### `snaptrade.apiStatus.check`
466
+
467
+ Check whether the API is operational and verify timestamps.
468
+
469
+ #### 🛠️ Usage
470
+
471
+ ```typescript
472
+ const checkResponse = await snaptrade.apiStatus.check();
473
+ ```
474
+
475
+ #### 🔄 Return
476
+
477
+ [Status](./models/status.ts)
478
+
479
+ #### 🌐 Endpoint
480
+
481
+ `/` `GET`
482
+
483
+ [🔙 **Back to Table of Contents**](#table-of-contents)
484
+
485
+ ---
486
+
487
+
488
+ ### `snaptrade.authentication.deleteSnapTradeUser`
489
+
490
+ Delete SnapTrade user
491
+
492
+ #### 🛠️ Usage
493
+
494
+ ```typescript
495
+ const deleteSnapTradeUserResponse =
496
+ await snaptrade.authentication.deleteSnapTradeUser({
497
+ userId: "John.doe@snaptrade.com",
498
+ });
499
+ ```
500
+
501
+ #### ⚙️ Parameters
502
+
503
+ ##### userId: `string`
504
+
505
+ #### 🔄 Return
506
+
507
+ [DeleteUserResponse](./models/delete-user-response.ts)
508
+
509
+ #### 🌐 Endpoint
510
+
511
+ `/snapTrade/deleteUser` `DELETE`
512
+
513
+ [🔙 **Back to Table of Contents**](#table-of-contents)
514
+
515
+ ---
516
+
517
+
518
+ ### `snaptrade.authentication.getUserJWT`
519
+
520
+ Generate encrypted JWT token
521
+
522
+ #### 🛠️ Usage
523
+
524
+ ```typescript
525
+ const getUserJWTResponse = await snaptrade.authentication.getUserJWT({
526
+ userId: "John.doe@snaptrade.com",
527
+ userSecret: "USERSECRET123",
528
+ });
529
+ ```
530
+
531
+ #### ⚙️ Parameters
532
+
533
+ ##### userId: `string`
534
+
535
+ ##### userSecret: `string`
536
+
537
+ #### 🌐 Endpoint
538
+
539
+ `/snapTrade/encryptedJWT` `GET`
540
+
541
+ [🔙 **Back to Table of Contents**](#table-of-contents)
542
+
543
+ ---
544
+
545
+
546
+ ### `snaptrade.authentication.listSnapTradeUsers`
547
+
548
+ List SnapTrade users
549
+
550
+ #### 🛠️ Usage
551
+
552
+ ```typescript
553
+ const listSnapTradeUsersResponse =
554
+ await snaptrade.authentication.listSnapTradeUsers();
555
+ ```
556
+
557
+ #### 🌐 Endpoint
558
+
559
+ `/snapTrade/listUsers` `GET`
560
+
561
+ [🔙 **Back to Table of Contents**](#table-of-contents)
562
+
563
+ ---
564
+
565
+
566
+ ### `snaptrade.authentication.loginSnapTradeUser`
567
+
568
+ Login user &amp; generate connection link
569
+
570
+ #### 🛠️ Usage
571
+
572
+ ```typescript
573
+ const loginSnapTradeUserResponse =
574
+ await snaptrade.authentication.loginSnapTradeUser({
575
+ userId: "John.doe@snaptrade.com",
576
+ userSecret: "USERSECRET123",
577
+ broker: "ALPACA",
578
+ immediateRedirect: true,
579
+ customRedirect: "https://snaptrade.com",
580
+ reconnect: "8b5f262d-4bb9-365d-888a-202bd3b15fa1",
581
+ connectionType: "read",
582
+ });
583
+ ```
584
+
585
+ #### ⚙️ Parameters
586
+
587
+ ##### userId: `string`
588
+
589
+ ##### userSecret: `string`
590
+
591
+ ##### broker: `string`
592
+
593
+ ##### immediateRedirect: `boolean`
594
+
595
+ ##### customRedirect: `string`
596
+
597
+ ##### reconnect: `string`
598
+
599
+ ##### connectionType: `string`
600
+
601
+ #### 🌐 Endpoint
602
+
603
+ `/snapTrade/login` `POST`
604
+
605
+ [🔙 **Back to Table of Contents**](#table-of-contents)
606
+
607
+ ---
608
+
609
+
610
+ ### `snaptrade.authentication.registerSnapTradeUser`
611
+
612
+ Create SnapTrade user
613
+
614
+ #### 🛠️ Usage
615
+
616
+ ```typescript
617
+ const registerSnapTradeUserResponse =
618
+ await snaptrade.authentication.registerSnapTradeUser({
619
+ userId: "snaptrade-user-123",
620
+ rsaPublicKey:
621
+ "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQC7vbqajDw4o6gJy8UtmIbkcpnkO3Kwc4qsEnSZp/TR+fQi62F79RHWmwKOtFmwteURgLbj7D/WGuNLGOfa/2vse3G2eHnHl5CB8ruRX9fBl/KgwCVr2JaEuUm66bBQeP5XeBotdR4cvX38uPYivCDdPjJ1QWPdspTBKcxeFbccDw==",
622
+ });
623
+ ```
624
+
625
+ #### ⚙️ Parameters
626
+
627
+ ##### userId: `string`
628
+
629
+ SnapTrade User ID. Provided by SnapTrade Partner. Can be any string, as long as it\\\'s unique to a user
630
+
631
+ ##### rsaPublicKey: `string`
632
+
633
+ Open SSH RSA public key
634
+
635
+ #### 🔄 Return
636
+
637
+ [UserIDandSecret](./models/user-idand-secret.ts)
638
+
639
+ #### 🌐 Endpoint
640
+
641
+ `/snapTrade/registerUser` `POST`
642
+
643
+ [🔙 **Back to Table of Contents**](#table-of-contents)
644
+
645
+ ---
646
+
647
+
648
+ ### `snaptrade.connections.detailBrokerageAuthorization`
649
+
650
+ Get brokerage authorization details
651
+
652
+ #### 🛠️ Usage
653
+
654
+ ```typescript
655
+ const detailBrokerageAuthorizationResponse =
656
+ await snaptrade.connections.detailBrokerageAuthorization({
657
+ authorizationId: "2bcd7cc3-e922-4976-bce1-9858296801c3",
658
+ userId: "John.doe@snaptrade.com",
659
+ userSecret: "USERSECRET123",
660
+ });
661
+ ```
662
+
663
+ #### ⚙️ Parameters
664
+
665
+ ##### authorizationId: `string`
666
+
667
+ The ID of a brokerage authorization object.
668
+
669
+ ##### userId: `string`
670
+
671
+ ##### userSecret: `string`
672
+
673
+ #### 🔄 Return
674
+
675
+ [BrokerageAuthorization](./models/brokerage-authorization.ts)
676
+
677
+ #### 🌐 Endpoint
678
+
679
+ `/authorizations/{authorizationId}` `GET`
680
+
681
+ [🔙 **Back to Table of Contents**](#table-of-contents)
682
+
683
+ ---
684
+
685
+
686
+ ### `snaptrade.connections.listBrokerageAuthorizations`
687
+
688
+ List all brokerage authorizations for the user
689
+
690
+ #### 🛠️ Usage
691
+
692
+ ```typescript
693
+ const listBrokerageAuthorizationsResponse =
694
+ await snaptrade.connections.listBrokerageAuthorizations({
695
+ userId: "John.doe@snaptrade.com",
696
+ userSecret: "USERSECRET123",
697
+ });
698
+ ```
699
+
700
+ #### ⚙️ Parameters
701
+
702
+ ##### userId: `string`
703
+
704
+ ##### userSecret: `string`
705
+
706
+ #### 🔄 Return
707
+
708
+ [BrokerageAuthorization](./models/brokerage-authorization.ts)
709
+
710
+ #### 🌐 Endpoint
711
+
712
+ `/authorizations` `GET`
713
+
714
+ [🔙 **Back to Table of Contents**](#table-of-contents)
715
+
716
+ ---
717
+
718
+
719
+ ### `snaptrade.connections.removeBrokerageAuthorization`
720
+
721
+ Delete brokerage authorization
722
+
723
+ #### 🛠️ Usage
724
+
725
+ ```typescript
726
+ const removeBrokerageAuthorizationResponse =
727
+ await snaptrade.connections.removeBrokerageAuthorization({
728
+ authorizationId: "2bcd7cc3-e922-4976-bce1-9858296801c3",
729
+ userId: "John.doe@snaptrade.com",
730
+ userSecret: "USERSECRET123",
731
+ });
732
+ ```
733
+
734
+ #### ⚙️ Parameters
735
+
736
+ ##### authorizationId: `string`
737
+
738
+ The ID of the Authorization to delete.
739
+
740
+ ##### userId: `string`
741
+
742
+ ##### userSecret: `string`
743
+
744
+ #### 🌐 Endpoint
745
+
746
+ `/authorizations/{authorizationId}` `DELETE`
747
+
748
+ [🔙 **Back to Table of Contents**](#table-of-contents)
749
+
750
+ ---
751
+
752
+
753
+ ### `snaptrade.connections.sessionEvents`
754
+
755
+ List all session events for the partner
756
+
757
+ #### 🛠️ Usage
758
+
759
+ ```typescript
760
+ const sessionEventsResponse = await snaptrade.connections.sessionEvents({
761
+ partnerClientId: "SNAPTRADETEST",
762
+ userId:
763
+ "917c8734-8470-4a3e-a18f-57c3f2ee6631,65e839a3-9103-4cfb-9b72-2071ef80c5f2",
764
+ sessionId:
765
+ "917c8734-8470-4a3e-a18f-57c3f2ee6631,65e839a3-9103-4cfb-9b72-2071ef80c5f2",
766
+ });
767
+ ```
768
+
769
+ #### ⚙️ Parameters
770
+
771
+ ##### partnerClientId: `string`
772
+
773
+ ##### userId: `string`
774
+
775
+ Optional comma seperated list of user IDs used to filter the request on specific users
776
+
777
+ ##### sessionId: `string`
778
+
779
+ Optional comma seperated list of session IDs used to filter the request on specific users
780
+
781
+ #### 🌐 Endpoint
782
+
783
+ `/sessionEvents` `GET`
784
+
785
+ [🔙 **Back to Table of Contents**](#table-of-contents)
786
+
787
+ ---
788
+
789
+
790
+ ### `snaptrade.errorLogs.listUserErrors`
791
+
792
+ Retrieve error logs on behalf of your SnapTrade users
793
+
794
+ #### 🛠️ Usage
795
+
796
+ ```typescript
797
+ const listUserErrorsResponse = await snaptrade.errorLogs.listUserErrors({
798
+ userId: "John.doe@snaptrade.com",
799
+ userSecret: "USERSECRET123",
800
+ });
801
+ ```
802
+
803
+ #### ⚙️ Parameters
804
+
805
+ ##### userId: `string`
806
+
807
+ ##### userSecret: `string`
808
+
809
+ #### 🔄 Return
810
+
811
+ [UserErrorLog](./models/user-error-log.ts)
812
+
813
+ #### 🌐 Endpoint
814
+
815
+ `/snapTrade/listUserErrors` `GET`
816
+
817
+ [🔙 **Back to Table of Contents**](#table-of-contents)
818
+
819
+ ---
820
+
821
+
822
+ ### `snaptrade.options.getOptionStrategy`
823
+
824
+ Creates an option strategy object that will be used to place an option strategy order
825
+
826
+ #### 🛠️ Usage
827
+
828
+ ```typescript
829
+ const getOptionStrategyResponse = await snaptrade.options.getOptionStrategy({
830
+ userId: "John.doe@snaptrade.com",
831
+ userSecret: "USERSECRET123",
832
+ accountId: "accountId_example",
833
+ underlying_symbol_id: "2bcd7cc3-e922-4976-bce1-9858296801c3",
834
+ legs: [
835
+ {
836
+ action: "BUY_TO_OPEN",
837
+ option_symbol_id: "SPY220819P00200000",
838
+ quantity: 1,
839
+ },
840
+ ],
841
+ strategy_type: "CUSTOM",
842
+ });
843
+ ```
844
+
845
+ #### ⚙️ Parameters
846
+
847
+ ##### underlying_symbol_id: `string`
848
+
849
+ ##### legs: `OptionLeg`
850
+ [`OptionLeg`](./models/option-leg.ts)[]
851
+
852
+ ##### strategy_type: `string`
853
+
854
+ ##### userId: `string`
855
+
856
+ ##### userSecret: `string`
857
+
858
+ ##### accountId: `string`
859
+
860
+ The ID of the account to create the option strategy object in.
861
+
862
+ #### 🔄 Return
863
+
864
+ [StrategyQuotes](./models/strategy-quotes.ts)
865
+
866
+ #### 🌐 Endpoint
867
+
868
+ `/accounts/{accountId}/optionStrategy` `POST`
869
+
870
+ [🔙 **Back to Table of Contents**](#table-of-contents)
871
+
872
+ ---
873
+
874
+
875
+ ### `snaptrade.options.getOptionsChain`
876
+
877
+ Get the options chain
878
+
879
+ #### 🛠️ Usage
880
+
881
+ ```typescript
882
+ const getOptionsChainResponse = await snaptrade.options.getOptionsChain({
883
+ userId: "John.doe@snaptrade.com",
884
+ userSecret: "USERSECRET123",
885
+ accountId: "accountId_example",
886
+ symbol: "symbol_example",
887
+ });
888
+ ```
889
+
890
+ #### ⚙️ Parameters
891
+
892
+ ##### userId: `string`
893
+
894
+ ##### userSecret: `string`
895
+
896
+ ##### accountId: `string`
897
+
898
+ The ID of the account to get the options chain from.
899
+
900
+ ##### symbol: `string`
901
+
902
+ Universal symbol ID if symbol
903
+
904
+ #### 🌐 Endpoint
905
+
906
+ `/accounts/{accountId}/optionsChain` `GET`
907
+
908
+ [🔙 **Back to Table of Contents**](#table-of-contents)
909
+
910
+ ---
911
+
912
+
913
+ ### `snaptrade.options.getOptionsStrategyQuote`
914
+
915
+ Get latest market data of option strategy
916
+
917
+ #### 🛠️ Usage
918
+
919
+ ```typescript
920
+ const getOptionsStrategyQuoteResponse =
921
+ await snaptrade.options.getOptionsStrategyQuote({
922
+ userId: "John.doe@snaptrade.com",
923
+ userSecret: "USERSECRET123",
924
+ accountId: "accountId_example",
925
+ optionStrategyId: "2bcd7cc3-e922-4976-bce1-9858296801c3",
926
+ });
927
+ ```
928
+
929
+ #### ⚙️ Parameters
930
+
931
+ ##### userId: `string`
932
+
933
+ ##### userSecret: `string`
934
+
935
+ ##### accountId: `string`
936
+
937
+ The ID of the account the strategy will be placed in.
938
+
939
+ ##### optionStrategyId: `string`
940
+
941
+ Option strategy id obtained from response when creating option strategy object
942
+
943
+ #### 🔄 Return
944
+
945
+ [StrategyQuotes](./models/strategy-quotes.ts)
946
+
947
+ #### 🌐 Endpoint
948
+
949
+ `/accounts/{accountId}/optionStrategy/{optionStrategyId}` `GET`
950
+
951
+ [🔙 **Back to Table of Contents**](#table-of-contents)
952
+
953
+ ---
954
+
955
+
956
+ ### `snaptrade.options.listOptionHoldings`
957
+
958
+ Get the options holdings in the account
959
+
960
+ #### 🛠️ Usage
961
+
962
+ ```typescript
963
+ const listOptionHoldingsResponse = await snaptrade.options.listOptionHoldings({
964
+ userId: "John.doe@snaptrade.com",
965
+ userSecret: "USERSECRET123",
966
+ accountId: "accountId_example",
967
+ });
968
+ ```
969
+
970
+ #### ⚙️ Parameters
971
+
972
+ ##### userId: `string`
973
+
974
+ ##### userSecret: `string`
975
+
976
+ ##### accountId: `string`
977
+
978
+ The ID of the account to fetch options holdings for.
979
+
980
+ #### 🔄 Return
981
+
982
+ [OptionsPosition](./models/options-position.ts)
983
+
984
+ #### 🌐 Endpoint
985
+
986
+ `/accounts/{accountId}/options` `GET`
987
+
988
+ [🔙 **Back to Table of Contents**](#table-of-contents)
989
+
990
+ ---
991
+
992
+
993
+ ### `snaptrade.options.placeOptionStrategy`
994
+
995
+ Place an option strategy order on the brokerage
996
+
997
+ #### 🛠️ Usage
998
+
999
+ ```typescript
1000
+ const placeOptionStrategyResponse = await snaptrade.options.placeOptionStrategy(
1001
+ {
1002
+ userId: "John.doe@snaptrade.com",
1003
+ userSecret: "USERSECRET123",
1004
+ accountId: "2bcd7cc3-e922-4976-bce1-9858296801c3",
1005
+ optionStrategyId: "2bcd7cc3-e922-4976-bce1-9858296801c3",
1006
+ order_type: "Limit",
1007
+ time_in_force: "DAY",
1008
+ price: 31.33,
1009
+ }
1010
+ );
1011
+ ```
1012
+
1013
+ #### ⚙️ Parameters
1014
+
1015
+ ##### order_type: `string`
1016
+
1017
+ ##### time_in_force: `string`
1018
+
1019
+ ##### price: `number`
1020
+
1021
+ Trade Price if limit or stop limit order
1022
+
1023
+ ##### userId: `string`
1024
+
1025
+ ##### userSecret: `string`
1026
+
1027
+ ##### accountId: `string`
1028
+
1029
+ The ID of the account to execute the strategy in.
1030
+
1031
+ ##### optionStrategyId: `string`
1032
+
1033
+ Option strategy id obtained from response when creating option strategy object
1034
+
1035
+ #### 🔄 Return
1036
+
1037
+ [StrategyOrderRecord](./models/strategy-order-record.ts)
1038
+
1039
+ #### 🌐 Endpoint
1040
+
1041
+ `/accounts/{accountId}/optionStrategy/{optionStrategyId}/execute` `POST`
1042
+
1043
+ [🔙 **Back to Table of Contents**](#table-of-contents)
1044
+
1045
+ ---
1046
+
1047
+
1048
+ ### `snaptrade.referenceData.getCurrencyExchangeRatePair`
1049
+
1050
+ Return the exchange rate of a currency pair
1051
+
1052
+ #### 🛠️ Usage
1053
+
1054
+ ```typescript
1055
+ const getCurrencyExchangeRatePairResponse =
1056
+ await snaptrade.referenceData.getCurrencyExchangeRatePair({
1057
+ currencyPair: "currencyPair_example",
1058
+ });
1059
+ ```
1060
+
1061
+ #### ⚙️ Parameters
1062
+
1063
+ ##### currencyPair: `string`
1064
+
1065
+ A currency pair based on currency code for example, {CAD-USD}
1066
+
1067
+ #### 🔄 Return
1068
+
1069
+ [ExchangeRatePairs](./models/exchange-rate-pairs.ts)
1070
+
1071
+ #### 🌐 Endpoint
1072
+
1073
+ `/currencies/rates/{currencyPair}` `GET`
1074
+
1075
+ [🔙 **Back to Table of Contents**](#table-of-contents)
1076
+
1077
+ ---
1078
+
1079
+
1080
+ ### `snaptrade.referenceData.getPartnerInfo`
1081
+
1082
+ Get metadata related to Snaptrade partner
1083
+
1084
+ #### 🛠️ Usage
1085
+
1086
+ ```typescript
1087
+ const getPartnerInfoResponse = await snaptrade.referenceData.getPartnerInfo();
1088
+ ```
1089
+
1090
+ #### 🔄 Return
1091
+
1092
+ [PartnerData](./models/partner-data.ts)
1093
+
1094
+ #### 🌐 Endpoint
1095
+
1096
+ `/snapTrade/partners` `GET`
1097
+
1098
+ [🔙 **Back to Table of Contents**](#table-of-contents)
1099
+
1100
+ ---
1101
+
1102
+
1103
+ ### `snaptrade.referenceData.getSecurityTypes`
1104
+
1105
+ List of all security types.
1106
+
1107
+ #### 🛠️ Usage
1108
+
1109
+ ```typescript
1110
+ const getSecurityTypesResponse =
1111
+ await snaptrade.referenceData.getSecurityTypes();
1112
+ ```
1113
+
1114
+ #### 🔄 Return
1115
+
1116
+ [SecurityType](./models/security-type.ts)
1117
+
1118
+ #### 🌐 Endpoint
1119
+
1120
+ `/securityTypes` `GET`
1121
+
1122
+ [🔙 **Back to Table of Contents**](#table-of-contents)
1123
+
1124
+ ---
1125
+
1126
+
1127
+ ### `snaptrade.referenceData.getStockExchanges`
1128
+
1129
+ List exchanges
1130
+
1131
+ #### 🛠️ Usage
1132
+
1133
+ ```typescript
1134
+ const getStockExchangesResponse =
1135
+ await snaptrade.referenceData.getStockExchanges();
1136
+ ```
1137
+
1138
+ #### 🔄 Return
1139
+
1140
+ [Exchange](./models/exchange.ts)
1141
+
1142
+ #### 🌐 Endpoint
1143
+
1144
+ `/exchanges` `GET`
1145
+
1146
+ [🔙 **Back to Table of Contents**](#table-of-contents)
1147
+
1148
+ ---
1149
+
1150
+
1151
+ ### `snaptrade.referenceData.getSymbols`
1152
+
1153
+ Search for symbols
1154
+
1155
+ #### 🛠️ Usage
1156
+
1157
+ ```typescript
1158
+ const getSymbolsResponse = await snaptrade.referenceData.getSymbols({
1159
+ substring: "apple",
1160
+ });
1161
+ ```
1162
+
1163
+ #### ⚙️ Parameters
1164
+
1165
+ ##### substring: `string`
1166
+
1167
+ #### 🔄 Return
1168
+
1169
+ [UniversalSymbol](./models/universal-symbol.ts)
1170
+
1171
+ #### 🌐 Endpoint
1172
+
1173
+ `/symbols` `POST`
1174
+
1175
+ [🔙 **Back to Table of Contents**](#table-of-contents)
1176
+
1177
+ ---
1178
+
1179
+
1180
+ ### `snaptrade.referenceData.getSymbolsByTicker`
1181
+
1182
+ Get details of a symbol by the ticker
1183
+
1184
+ #### 🛠️ Usage
1185
+
1186
+ ```typescript
1187
+ const getSymbolsByTickerResponse =
1188
+ await snaptrade.referenceData.getSymbolsByTicker({
1189
+ ticker: "ticker_example",
1190
+ });
1191
+ ```
1192
+
1193
+ #### ⚙️ Parameters
1194
+
1195
+ ##### ticker: `string`
1196
+
1197
+ The ticker of the UniversalSymbol to get.
1198
+
1199
+ ##### symbolId: `string`
1200
+
1201
+ OPTIONAL IN PATH Can be used instead of the ticker ; The ID of the UniversalSymbol to get.
1202
+
1203
+ #### 🔄 Return
1204
+
1205
+ [UniversalSymbol](./models/universal-symbol.ts)
1206
+
1207
+ #### 🌐 Endpoint
1208
+
1209
+ `/symbols/{ticker}` `GET`
1210
+
1211
+ [🔙 **Back to Table of Contents**](#table-of-contents)
1212
+
1213
+ ---
1214
+
1215
+
1216
+ ### `snaptrade.referenceData.listAllBrokerageAuthorizationType`
1217
+
1218
+ List of all brokerage authorization types
1219
+
1220
+ #### 🛠️ Usage
1221
+
1222
+ ```typescript
1223
+ const listAllBrokerageAuthorizationTypeResponse =
1224
+ await snaptrade.referenceData.listAllBrokerageAuthorizationType({
1225
+ brokerage: "QUESTRADE,ALPACA",
1226
+ });
1227
+ ```
1228
+
1229
+ #### ⚙️ Parameters
1230
+
1231
+ ##### brokerage: `string`
1232
+
1233
+ Comma separated value of brokerage slugs
1234
+
1235
+ #### 🔄 Return
1236
+
1237
+ [BrokerageAuthorizationTypeReadOnly](./models/brokerage-authorization-type-read-only.ts)
1238
+
1239
+ #### 🌐 Endpoint
1240
+
1241
+ `/brokerageAuthorizationTypes` `GET`
1242
+
1243
+ [🔙 **Back to Table of Contents**](#table-of-contents)
1244
+
1245
+ ---
1246
+
1247
+
1248
+ ### `snaptrade.referenceData.listAllBrokerages`
1249
+
1250
+ List brokerages
1251
+
1252
+ #### 🛠️ Usage
1253
+
1254
+ ```typescript
1255
+ const listAllBrokeragesResponse =
1256
+ await snaptrade.referenceData.listAllBrokerages();
1257
+ ```
1258
+
1259
+ #### 🔄 Return
1260
+
1261
+ [Brokerage](./models/brokerage.ts)
1262
+
1263
+ #### 🌐 Endpoint
1264
+
1265
+ `/brokerages` `GET`
1266
+
1267
+ [🔙 **Back to Table of Contents**](#table-of-contents)
1268
+
1269
+ ---
1270
+
1271
+
1272
+ ### `snaptrade.referenceData.listAllCurrencies`
1273
+
1274
+ List currencies
1275
+
1276
+ #### 🛠️ Usage
1277
+
1278
+ ```typescript
1279
+ const listAllCurrenciesResponse =
1280
+ await snaptrade.referenceData.listAllCurrencies();
1281
+ ```
1282
+
1283
+ #### 🔄 Return
1284
+
1285
+ [Currency](./models/currency.ts)
1286
+
1287
+ #### 🌐 Endpoint
1288
+
1289
+ `/currencies` `GET`
1290
+
1291
+ [🔙 **Back to Table of Contents**](#table-of-contents)
1292
+
1293
+ ---
1294
+
1295
+
1296
+ ### `snaptrade.referenceData.listAllCurrenciesRates`
1297
+
1298
+ List currency exchange rates
1299
+
1300
+ #### 🛠️ Usage
1301
+
1302
+ ```typescript
1303
+ const listAllCurrenciesRatesResponse =
1304
+ await snaptrade.referenceData.listAllCurrenciesRates();
1305
+ ```
1306
+
1307
+ #### 🔄 Return
1308
+
1309
+ [ExchangeRatePairs](./models/exchange-rate-pairs.ts)
1310
+
1311
+ #### 🌐 Endpoint
1312
+
1313
+ `/currencies/rates` `GET`
1314
+
1315
+ [🔙 **Back to Table of Contents**](#table-of-contents)
1316
+
1317
+ ---
1318
+
1319
+
1320
+ ### `snaptrade.referenceData.symbolSearchUserAccount`
1321
+
1322
+ Search for symbols available in an account
1323
+
1324
+ #### 🛠️ Usage
1325
+
1326
+ ```typescript
1327
+ const symbolSearchUserAccountResponse =
1328
+ await snaptrade.referenceData.symbolSearchUserAccount({
1329
+ userId: "John.doe@snaptrade.com",
1330
+ userSecret: "USERSECRET123",
1331
+ accountId: "accountId_example",
1332
+ substring: "apple",
1333
+ });
1334
+ ```
1335
+
1336
+ #### ⚙️ Parameters
1337
+
1338
+ ##### userId: `string`
1339
+
1340
+ ##### userSecret: `string`
1341
+
1342
+ ##### accountId: `string`
1343
+
1344
+ The ID of the account to search for symbols within.
1345
+
1346
+ ##### substring: `string`
1347
+
1348
+ #### 🔄 Return
1349
+
1350
+ [UniversalSymbol](./models/universal-symbol.ts)
1351
+
1352
+ #### 🌐 Endpoint
1353
+
1354
+ `/accounts/{accountId}/symbols` `POST`
1355
+
1356
+ [🔙 **Back to Table of Contents**](#table-of-contents)
1357
+
1358
+ ---
1359
+
1360
+
1361
+ ### `snaptrade.trading.cancelUserAccountOrder`
1362
+
1363
+ Cancel open order in account
1364
+
1365
+ #### 🛠️ Usage
1366
+
1367
+ ```typescript
1368
+ const cancelUserAccountOrderResponse =
1369
+ await snaptrade.trading.cancelUserAccountOrder({
1370
+ userId: "John.doe@snaptrade.com",
1371
+ userSecret: "USERSECRET123",
1372
+ accountId: "accountId_example",
1373
+ brokerage_order_id: "2bcd7cc3-e922-4976-bce1-9858296801c3",
1374
+ });
1375
+ ```
1376
+
1377
+ #### ⚙️ Parameters
1378
+
1379
+ ##### userId: `string`
1380
+
1381
+ ##### userSecret: `string`
1382
+
1383
+ ##### accountId: `string`
1384
+
1385
+ The ID of the account to cancel the order in.
1386
+
1387
+ ##### brokerage_order_id: `string`
1388
+
1389
+ #### 🔄 Return
1390
+
1391
+ [AccountOrderRecord](./models/account-order-record.ts)
1392
+
1393
+ #### 🌐 Endpoint
1394
+
1395
+ `/accounts/{accountId}/orders/cancel` `POST`
1396
+
1397
+ [🔙 **Back to Table of Contents**](#table-of-contents)
1398
+
1399
+ ---
1400
+
1401
+
1402
+ ### `snaptrade.trading.getOrderImpact`
1403
+
1404
+ Check impact of trades on account.
1405
+
1406
+ #### 🛠️ Usage
1407
+
1408
+ ```typescript
1409
+ const getOrderImpactResponse = await snaptrade.trading.getOrderImpact({
1410
+ userId: "John.doe@snaptrade.com",
1411
+ userSecret: "USERSECRET123",
1412
+ account_id: "2bcd7cc3-e922-4976-bce1-9858296801c3",
1413
+ action: "BUY",
1414
+ order_type: "Limit",
1415
+ price: 31.33,
1416
+ stop: 31.33,
1417
+ time_in_force: "Day",
1418
+ universal_symbol_id: "2bcd7cc3-e922-4976-bce1-9858296801c3",
1419
+ });
1420
+ ```
1421
+
1422
+ #### ⚙️ Parameters
1423
+
1424
+ ##### userId: `string`
1425
+
1426
+ ##### userSecret: `string`
1427
+
1428
+ ##### account_id: `string`
1429
+
1430
+ ##### action:
1431
+
1432
+ ##### order_type:
1433
+
1434
+ ##### price: `number`
1435
+
1436
+ Trade Price if limit or stop limit order
1437
+
1438
+ ##### stop: `number`
1439
+
1440
+ Stop Price. If stop loss or stop limit order, the price to trigger the stop
1441
+
1442
+ ##### time_in_force:
1443
+
1444
+ ##### units: `number`
1445
+
1446
+ Trade Units
1447
+
1448
+ ##### universal_symbol_id: `string`
1449
+
1450
+ #### 🔄 Return
1451
+
1452
+ [ManualTradeAndImpact](./models/manual-trade-and-impact.ts)
1453
+
1454
+ #### 🌐 Endpoint
1455
+
1456
+ `/trade/impact` `POST`
1457
+
1458
+ [🔙 **Back to Table of Contents**](#table-of-contents)
1459
+
1460
+ ---
1461
+
1462
+
1463
+ ### `snaptrade.trading.getUserAccountQuotes`
1464
+
1465
+ Get symbol quotes
1466
+
1467
+ #### 🛠️ Usage
1468
+
1469
+ ```typescript
1470
+ const getUserAccountQuotesResponse =
1471
+ await snaptrade.trading.getUserAccountQuotes({
1472
+ userId: "John.doe@snaptrade.com",
1473
+ userSecret: "USERSECRET123",
1474
+ symbols: "symbols_example",
1475
+ accountId: "accountId_example",
1476
+ });
1477
+ ```
1478
+
1479
+ #### ⚙️ Parameters
1480
+
1481
+ ##### userId: `string`
1482
+
1483
+ ##### userSecret: `string`
1484
+
1485
+ ##### symbols: `string`
1486
+
1487
+ List of universal_symbol_id or tickers to get quotes for.
1488
+
1489
+ ##### accountId: `string`
1490
+
1491
+ The ID of the account to get quotes.
1492
+
1493
+ ##### useTicker: `boolean`
1494
+
1495
+ Should be set to True if providing tickers.
1496
+
1497
+ #### 🌐 Endpoint
1498
+
1499
+ `/accounts/{accountId}/quotes` `GET`
1500
+
1501
+ [🔙 **Back to Table of Contents**](#table-of-contents)
1502
+
1503
+ ---
1504
+
1505
+
1506
+ ### `snaptrade.trading.placeForceOrder`
1507
+
1508
+ Place a trade with NO validation.
1509
+
1510
+ #### 🛠️ Usage
1511
+
1512
+ ```typescript
1513
+ const placeForceOrderResponse = await snaptrade.trading.placeForceOrder({
1514
+ userId: "John.doe@snaptrade.com",
1515
+ userSecret: "USERSECRET123",
1516
+ account_id: "2bcd7cc3-e922-4976-bce1-9858296801c3",
1517
+ action: "BUY",
1518
+ order_type: "Limit",
1519
+ price: 31.33,
1520
+ stop: 31.33,
1521
+ time_in_force: "Day",
1522
+ universal_symbol_id: "2bcd7cc3-e922-4976-bce1-9858296801c3",
1523
+ });
1524
+ ```
1525
+
1526
+ #### ⚙️ Parameters
1527
+
1528
+ ##### userId: `string`
1529
+
1530
+ ##### userSecret: `string`
1531
+
1532
+ ##### account_id: `string`
1533
+
1534
+ ##### action:
1535
+
1536
+ ##### order_type:
1537
+
1538
+ ##### price: `number`
1539
+
1540
+ Trade Price if limit or stop limit order
1541
+
1542
+ ##### stop: `number`
1543
+
1544
+ Stop Price. If stop loss or stop limit order, the price to trigger the stop
1545
+
1546
+ ##### time_in_force:
1547
+
1548
+ ##### units: `number`
1549
+
1550
+ Trade Units
1551
+
1552
+ ##### universal_symbol_id: `string`
1553
+
1554
+ #### 🔄 Return
1555
+
1556
+ [AccountOrderRecord](./models/account-order-record.ts)
1557
+
1558
+ #### 🌐 Endpoint
1559
+
1560
+ `/trade/place` `POST`
1561
+
1562
+ [🔙 **Back to Table of Contents**](#table-of-contents)
1563
+
1564
+ ---
1565
+
1566
+
1567
+ ### `snaptrade.trading.placeOCOOrder`
1568
+
1569
+ Place a OCO (One Cancels Other) order
1570
+
1571
+ #### 🛠️ Usage
1572
+
1573
+ ```typescript
1574
+ const placeOCOOrderResponse = await snaptrade.trading.placeOCOOrder({
1575
+ userId: "John.doe@snaptrade.com",
1576
+ userSecret: "USERSECRET123",
1577
+ });
1578
+ ```
1579
+
1580
+ #### ⚙️ Parameters
1581
+
1582
+ ##### userId: `string`
1583
+
1584
+ ##### userSecret: `string`
1585
+
1586
+ ##### first_trade_id:
1587
+
1588
+ The ID of first trade object obtained from trade/impact endpoint
1589
+
1590
+ ##### second_trade_id:
1591
+
1592
+ The ID of second trade object obtained from trade/impact endpoint
1593
+
1594
+ #### 🔄 Return
1595
+
1596
+ [AccountOrderRecord](./models/account-order-record.ts)
1597
+
1598
+ #### 🌐 Endpoint
1599
+
1600
+ `/trade/oco` `POST`
1601
+
1602
+ [🔙 **Back to Table of Contents**](#table-of-contents)
1603
+
1604
+ ---
1605
+
1606
+
1607
+ ### `snaptrade.trading.placeOrder`
1608
+
1609
+ Place order
1610
+
1611
+ #### 🛠️ Usage
1612
+
1613
+ ```typescript
1614
+ const placeOrderResponse = await snaptrade.trading.placeOrder({
1615
+ tradeId: "tradeId_example",
1616
+ userId: "John.doe@snaptrade.com",
1617
+ userSecret: "USERSECRET123",
1618
+ });
1619
+ ```
1620
+
1621
+ #### ⚙️ Parameters
1622
+
1623
+ ##### tradeId: `string`
1624
+
1625
+ The ID of trade object obtained from trade/impact endpoint
1626
+
1627
+ ##### userId: `string`
1628
+
1629
+ ##### userSecret: `string`
1630
+
1631
+ #### 🔄 Return
1632
+
1633
+ [AccountOrderRecord](./models/account-order-record.ts)
1634
+
1635
+ #### 🌐 Endpoint
1636
+
1637
+ `/trade/{tradeId}` `POST`
1638
+
1639
+ [🔙 **Back to Table of Contents**](#table-of-contents)
1640
+
1641
+ ---
1642
+
1643
+
1644
+ ### `snaptrade.transactionsAndReporting.getActivities`
1645
+
1646
+ Returns activities (transactions) for a user. Specifing start and end date is highly recommended for automatic calls for better performance
1647
+
1648
+ #### 🛠️ Usage
1649
+
1650
+ ```typescript
1651
+ const getActivitiesResponse =
1652
+ await snaptrade.transactionsAndReporting.getActivities({
1653
+ startDate: "2022-01-24",
1654
+ endDate: "2022-01-24",
1655
+ accounts:
1656
+ "917c8734-8470-4a3e-a18f-57c3f2ee6631,65e839a3-9103-4cfb-9b72-2071ef80c5f2",
1657
+ brokerageAuthorizations:
1658
+ "917c8734-8470-4a3e-a18f-57c3f2ee6631,65e839a3-9103-4cfb-9b72-2071ef80c5f2",
1659
+ type: "DIVIDEND",
1660
+ userId: "John.doe@snaptrade.com",
1661
+ userSecret: "USERSECRET123",
1662
+ });
1663
+ ```
1664
+
1665
+ #### ⚙️ Parameters
1666
+
1667
+ ##### userId: `string`
1668
+
1669
+ ##### userSecret: `string`
1670
+
1671
+ ##### startDate: `string | Date`
1672
+
1673
+ ##### endDate: `string | Date`
1674
+
1675
+ ##### accounts: `string`
1676
+
1677
+ Optional comma seperated list of account IDs used to filter the request on specific accounts
1678
+
1679
+ ##### brokerageAuthorizations: `string`
1680
+
1681
+ Optional comma seperated list of brokerage authorization IDs used to filter the request on only accounts that belong to those authorizations
1682
+
1683
+ ##### type: `string`
1684
+
1685
+ Optional comma seperated list of types to filter activities by. This is not an exhaustive list, if we fail to match to these types, we will return the raw description from the brokerage. Potential values include - DIVIDEND - BUY - SELL - CONTRIBUTION - WITHDRAWAL - EXTERNAL_ASSET_TRANSFER_IN - EXTERNAL_ASSET_TRANSFER_OUT - INTERNAL_CASH_TRANSFER_IN - INTERNAL_CASH_TRANSFER_OUT - INTERNAL_ASSET_TRANSFER_IN - INTERNAL_ASSET_TRANSFER_OUT - INTEREST - REBATE - GOV_GRANT - TAX - FEE - REI - FXT
1686
+
1687
+ #### 🔄 Return
1688
+
1689
+ [UniversalActivity](./models/universal-activity.ts)
1690
+
1691
+ #### 🌐 Endpoint
1692
+
1693
+ `/activities` `GET`
1694
+
1695
+ [🔙 **Back to Table of Contents**](#table-of-contents)
1696
+
1697
+ ---
1698
+
1699
+
1700
+ ### `snaptrade.transactionsAndReporting.getReportingCustomRange`
1701
+
1702
+ Returns performance information (contributions, dividends, rate of return, etc) for a specific timeframe. Total Equity Timeframe and Rate of Returns are experimental and should not be trusted to be 100% accurate
1703
+
1704
+ #### 🛠️ Usage
1705
+
1706
+ ```typescript
1707
+ const getReportingCustomRangeResponse =
1708
+ await snaptrade.transactionsAndReporting.getReportingCustomRange({
1709
+ startDate: "2022-01-24",
1710
+ endDate: "2022-01-24",
1711
+ accounts:
1712
+ "917c8734-8470-4a3e-a18f-57c3f2ee6631,65e839a3-9103-4cfb-9b72-2071ef80c5f2",
1713
+ detailed: true,
1714
+ frequency: "monthly",
1715
+ userId: "John.doe@snaptrade.com",
1716
+ userSecret: "USERSECRET123",
1717
+ });
1718
+ ```
1719
+
1720
+ #### ⚙️ Parameters
1721
+
1722
+ ##### startDate: `string | Date`
1723
+
1724
+ ##### endDate: `string | Date`
1725
+
1726
+ ##### userId: `string`
1727
+
1728
+ ##### userSecret: `string`
1729
+
1730
+ ##### accounts: `string`
1731
+
1732
+ Optional comma seperated list of account IDs used to filter the request on specific accounts
1733
+
1734
+ ##### detailed: `boolean`
1735
+
1736
+ Optional, increases frequency of data points for the total value and contribution charts if set to true
1737
+
1738
+ ##### frequency: `string`
1739
+
1740
+ Optional frequency for the rate of return chart (defaults to monthly). Possible values are daily, weekly, monthly, quarterly, yearly.
1741
+
1742
+ #### 🔄 Return
1743
+
1744
+ [PerformanceCustom](./models/performance-custom.ts)
1745
+
1746
+ #### 🌐 Endpoint
1747
+
1748
+ `/performance/custom` `GET`
1749
+
1750
+ [🔙 **Back to Table of Contents**](#table-of-contents)
1751
+
1752
+ ---
1753
+
150
1754
 
151
1755
  ## Author
152
1756
  This TypeScript package is automatically generated by [Konfig](https://konfigthis.com)