snaptrade-typescript-sdk 8.6.0 → 8.8.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 (169) hide show
  1. package/README.md +9 -12
  2. package/dist/api/portfolio-management-api.d.ts +0 -47
  3. package/dist/api/portfolio-management-api.js +0 -103
  4. package/dist/configuration.js +1 -1
  5. package/dist/models/session-event.d.ts +6 -0
  6. package/dist/models/symbol.d.ts +7 -0
  7. package/package.json +4 -1
  8. package/.konfig/generate-id.txt +0 -1
  9. package/.konfigignore +0 -3
  10. package/api/account-information-api-custom.ts +0 -3
  11. package/api/account-information-api.ts +0 -1062
  12. package/api/api-disclaimer-api-custom.ts +0 -3
  13. package/api/api-disclaimer-api.ts +0 -183
  14. package/api/api-status-api-custom.ts +0 -3
  15. package/api/api-status-api.ts +0 -128
  16. package/api/authentication-api-custom.ts +0 -3
  17. package/api/authentication-api.ts +0 -568
  18. package/api/connections-api-custom.ts +0 -3
  19. package/api/connections-api.ts +0 -544
  20. package/api/error-logs-api-custom.ts +0 -3
  21. package/api/error-logs-api.ts +0 -174
  22. package/api/options-api-custom.ts +0 -3
  23. package/api/options-api.ts +0 -739
  24. package/api/portfolio-management-api-custom.ts +0 -3
  25. package/api/portfolio-management-api.ts +0 -3301
  26. package/api/reference-data-api-custom.ts +0 -3
  27. package/api/reference-data-api.ts +0 -1031
  28. package/api/trading-api-custom.ts +0 -3
  29. package/api/trading-api.ts +0 -1304
  30. package/api/transactions-and-reporting-api-custom.ts +0 -3
  31. package/api/transactions-and-reporting-api.ts +0 -408
  32. package/api.ts +0 -27
  33. package/base.ts +0 -70
  34. package/client-custom.ts +0 -5
  35. package/client.ts +0 -59
  36. package/common.ts +0 -163
  37. package/configuration.ts +0 -131
  38. package/docs/AccountInformationApi.md +0 -469
  39. package/docs/ApiDisclaimerApi.md +0 -65
  40. package/docs/ApiStatusApi.md +0 -59
  41. package/docs/AuthenticationApi.md +0 -293
  42. package/docs/ConnectionsApi.md +0 -237
  43. package/docs/ErrorLogsApi.md +0 -63
  44. package/docs/OptionsApi.md +0 -314
  45. package/docs/PortfolioManagementApi.md +0 -1786
  46. package/docs/ReferenceDataApi.md +0 -570
  47. package/docs/TradingApi.md +0 -600
  48. package/docs/TransactionsAndReportingApi.md +0 -141
  49. package/index.test.ts +0 -177
  50. package/index.ts +0 -18
  51. package/jest.config.ts +0 -11
  52. package/models/account-holdings-account.ts +0 -61
  53. package/models/account-holdings.ts +0 -61
  54. package/models/account-order-record-status.ts +0 -48
  55. package/models/account-order-record.ts +0 -151
  56. package/models/account-simple.ts +0 -52
  57. package/models/account-sync-status.ts +0 -32
  58. package/models/account.ts +0 -91
  59. package/models/action.ts +0 -30
  60. package/models/apidisclaimer-accept-request.ts +0 -29
  61. package/models/authentication-login-snap-trade-user200-response.ts +0 -31
  62. package/models/balance.ts +0 -40
  63. package/models/brokerage-authorization-type-read-only-brokerage.ts +0 -43
  64. package/models/brokerage-authorization-type-read-only.ts +0 -68
  65. package/models/brokerage-authorization-type.ts +0 -39
  66. package/models/brokerage-authorization.ts +0 -82
  67. package/models/brokerage-symbol.ts +0 -61
  68. package/models/brokerage-type.ts +0 -37
  69. package/models/brokerage.ts +0 -136
  70. package/models/calculated-trade.ts +0 -40
  71. package/models/cash-restriction.ts +0 -63
  72. package/models/connections-session-events200-response-inner.ts +0 -25
  73. package/models/currency.ts +0 -43
  74. package/models/delete-user-response.ts +0 -37
  75. package/models/dividend-at-date.ts +0 -43
  76. package/models/encrypted-response-encrypted-message-data.ts +0 -43
  77. package/models/encrypted-response.ts +0 -38
  78. package/models/exchange-rate-pairs.ts +0 -46
  79. package/models/exchange.ts +0 -73
  80. package/models/excluded-asset.ts +0 -34
  81. package/models/index.ts +0 -109
  82. package/models/jwt.ts +0 -31
  83. package/models/login-redirect-uri.ts +0 -35
  84. package/models/manual-trade-and-impact.ts +0 -49
  85. package/models/manual-trade-balance.ts +0 -49
  86. package/models/manual-trade-form.ts +0 -80
  87. package/models/manual-trade-symbol.ts +0 -64
  88. package/models/manual-trade.ts +0 -88
  89. package/models/model-asset-class-details.ts +0 -41
  90. package/models/model-asset-class-target.ts +0 -34
  91. package/models/model-asset-class.ts +0 -37
  92. package/models/model-portfolio-asset-class.ts +0 -40
  93. package/models/model-portfolio-details.ts +0 -50
  94. package/models/model-portfolio-security.ts +0 -40
  95. package/models/model-portfolio.ts +0 -52
  96. package/models/model400-failed-request-response.ts +0 -37
  97. package/models/model401-failed-request-response.ts +0 -37
  98. package/models/model403-failed-request-response.ts +0 -37
  99. package/models/model404-failed-request-response.ts +0 -37
  100. package/models/monthly-dividends.ts +0 -40
  101. package/models/net-contributions.ts +0 -43
  102. package/models/net-dividend.ts +0 -46
  103. package/models/option-chain-inner-chain-per-root-inner-chain-per-strike-price-inner.ts +0 -43
  104. package/models/option-chain-inner-chain-per-root-inner.ts +0 -46
  105. package/models/option-chain-inner.ts +0 -58
  106. package/models/option-leg.ts +0 -53
  107. package/models/option-strategy-legs-inner.ts +0 -47
  108. package/models/option-strategy.ts +0 -61
  109. package/models/options-get-option-strategy-request.ts +0 -51
  110. package/models/options-holdings.ts +0 -67
  111. package/models/options-place-option-strategy-request.ts +0 -57
  112. package/models/options-position.ts +0 -73
  113. package/models/options-symbol.ts +0 -94
  114. package/models/order-type.ts +0 -32
  115. package/models/partner-data.ts +0 -100
  116. package/models/past-value.ts +0 -43
  117. package/models/performance-custom.ts +0 -154
  118. package/models/portfolio-group-info.ts +0 -115
  119. package/models/portfolio-group-position.ts +0 -46
  120. package/models/portfolio-group-settings.ts +0 -58
  121. package/models/portfolio-group.ts +0 -37
  122. package/models/position-symbol.ts +0 -64
  123. package/models/position.ts +0 -64
  124. package/models/redirect-tokenand-pin.ts +0 -37
  125. package/models/security-type.ts +0 -49
  126. package/models/session-event.ts +0 -74
  127. package/models/snap-trade-apidisclaimer-accept-status.ts +0 -37
  128. package/models/snap-trade-holdings-account-account-id.ts +0 -82
  129. package/models/snap-trade-holdings-account.ts +0 -79
  130. package/models/snap-trade-holdings-total-value.ts +0 -37
  131. package/models/snap-trade-login-user-request-body.ts +0 -61
  132. package/models/snap-trade-register-user-request-body.ts +0 -35
  133. package/models/status.ts +0 -43
  134. package/models/strategy-impact-legs-inner.ts +0 -67
  135. package/models/strategy-impact.ts +0 -94
  136. package/models/strategy-order-place-orders-inner-legs-inner.ts +0 -67
  137. package/models/strategy-order-place-orders-inner.ts +0 -286
  138. package/models/strategy-order-place.ts +0 -40
  139. package/models/strategy-order-record.ts +0 -133
  140. package/models/strategy-quotes-greek.ts +0 -55
  141. package/models/strategy-quotes.ts +0 -67
  142. package/models/sub-period-return-rate.ts +0 -43
  143. package/models/symbol-query.ts +0 -29
  144. package/models/symbol.ts +0 -67
  145. package/models/symbols-quotes.ts +0 -64
  146. package/models/target-asset.ts +0 -62
  147. package/models/time-in-force.ts +0 -31
  148. package/models/trade-execution-status.ts +0 -105
  149. package/models/trade-impact.ts +0 -61
  150. package/models/trade.ts +0 -88
  151. package/models/trading-cancel-user-account-order-request.ts +0 -29
  152. package/models/trading-place-ocoorder-request.ts +0 -35
  153. package/models/transactions-status.ts +0 -35
  154. package/models/underlying-symbol.ts +0 -76
  155. package/models/universal-activity.ts +0 -127
  156. package/models/universal-symbol-ticker.ts +0 -82
  157. package/models/universal-symbol.ts +0 -80
  158. package/models/user-error-log.ts +0 -61
  159. package/models/user-idand-secret.ts +0 -37
  160. package/models/user-settings.ts +0 -88
  161. package/models/usexchange.ts +0 -79
  162. package/pagination/page-types.ts +0 -34
  163. package/pagination/page.ts +0 -58
  164. package/pagination/pageable.ts +0 -113
  165. package/pagination/paginate.ts +0 -41
  166. package/requestAfterHook.ts +0 -53
  167. package/requestBeforeHook.ts +0 -15
  168. package/tsconfig.json +0 -22
  169. package/tsconfig.test.json +0 -6
@@ -1,141 +0,0 @@
1
- # TransactionsAndReportingApi
2
-
3
- All URIs are relative to *https://api.snaptrade.com/api/v1*
4
-
5
- Method | HTTP request | Description
6
- ------------- | ------------- | -------------
7
- [**getActivities**](TransactionsAndReportingApi.md#getActivities) | **GET** /activities | Get transaction history for a user
8
- [**getReportingCustomRange**](TransactionsAndReportingApi.md#getReportingCustomRange) | **GET** /performance/custom | Get performance information for a specific timeframe
9
-
10
-
11
- # **getActivities**
12
-
13
- #### **GET** /activities
14
-
15
- ### Description
16
- Returns activities (transactions) for a user. Specifing start and end date is highly recommended for automatic calls for better performance
17
-
18
- ### Example
19
-
20
-
21
- ```typescript
22
- import { Snaptrade } from "snaptrade-typescript-sdk"
23
-
24
- const snaptrade = new Snaptrade({
25
- // Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
26
- // basePath: "https://api.snaptrade.com/api/v1",
27
- consumerKey: "YOUR_CONSUMER_KEY",
28
- clientId: "YOUR_CLIENT_ID",
29
- })
30
-
31
- const getActivitiesResponse = await snaptrade.transactionsAndReporting.getActivities({
32
- "startDate": "2022-01-24",
33
- "endDate": "2022-01-24",
34
- "accounts": "917c8734-8470-4a3e-a18f-57c3f2ee6631,65e839a3-9103-4cfb-9b72-2071ef80c5f2",
35
- "brokerageAuthorizations": "917c8734-8470-4a3e-a18f-57c3f2ee6631,65e839a3-9103-4cfb-9b72-2071ef80c5f2",
36
- "userId": "John.doe@snaptrade.com",
37
- "userSecret": "USERSECRET123",
38
- })
39
-
40
- console.log(getActivitiesResponse)
41
-
42
- ```
43
-
44
-
45
- ### Parameters
46
-
47
- Name | Type | Description | Notes
48
- ------------- | ------------- | ------------- | -------------
49
- **userId** | [**string**] | | defaults to undefined
50
- **userSecret** | [**string**] | | defaults to undefined
51
- **startDate** | [**string | Date**] | | (optional) defaults to undefined
52
- **endDate** | [**string | Date**] | | (optional) defaults to undefined
53
- **accounts** | [**string**] | Optional comma seperated list of account IDs used to filter the request on specific accounts | (optional) defaults to undefined
54
- **brokerageAuthorizations** | [**string**] | Optional comma seperated list of brokerage authorization IDs used to filter the request on only accounts that belong to those authorizations | (optional) defaults to undefined
55
-
56
-
57
- ### Return type
58
-
59
- **Array<UniversalActivity>**
60
-
61
- ### HTTP request headers
62
-
63
- - **Content-Type**: Not defined
64
- - **Accept**: application/json
65
-
66
-
67
- ### HTTP response details
68
- | Status code | Description | Response headers |
69
- |-------------|-------------|------------------|
70
- **200** | Successfully retrieved transaction history | - |
71
- **0** | Unexpected error | - |
72
-
73
- [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
74
-
75
- # **getReportingCustomRange**
76
-
77
- #### **GET** /performance/custom
78
-
79
- ### Description
80
- 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
81
-
82
- ### Example
83
-
84
-
85
- ```typescript
86
- import { Snaptrade } from "snaptrade-typescript-sdk"
87
-
88
- const snaptrade = new Snaptrade({
89
- // Defining the base path is optional and defaults to https://api.snaptrade.com/api/v1
90
- // basePath: "https://api.snaptrade.com/api/v1",
91
- consumerKey: "YOUR_CONSUMER_KEY",
92
- clientId: "YOUR_CLIENT_ID",
93
- })
94
-
95
- const getReportingCustomRangeResponse = await snaptrade.transactionsAndReporting.getReportingCustomRange({
96
- "startDate": "2022-01-24",
97
- "endDate": "2022-01-24",
98
- "accounts": "917c8734-8470-4a3e-a18f-57c3f2ee6631,65e839a3-9103-4cfb-9b72-2071ef80c5f2",
99
- "detailed": true,
100
- "frequency": "monthly",
101
- "userId": "John.doe@snaptrade.com",
102
- "userSecret": "USERSECRET123",
103
- })
104
-
105
- console.log(getReportingCustomRangeResponse)
106
-
107
- ```
108
-
109
-
110
- ### Parameters
111
-
112
- Name | Type | Description | Notes
113
- ------------- | ------------- | ------------- | -------------
114
- **startDate** | [**string | Date**] | | defaults to undefined
115
- **endDate** | [**string | Date**] | | defaults to undefined
116
- **userId** | [**string**] | | defaults to undefined
117
- **userSecret** | [**string**] | | defaults to undefined
118
- **accounts** | [**string**] | Optional comma seperated list of account IDs used to filter the request on specific accounts | (optional) defaults to undefined
119
- **detailed** | [**boolean**] | Optional, increases frequency of data points for the total value and contribution charts if set to true | (optional) defaults to undefined
120
- **frequency** | [**string**] | Optional frequency for the rate of return chart (defaults to monthly). Possible values are daily, weekly, monthly, quarterly, yearly. | (optional) defaults to undefined
121
-
122
-
123
- ### Return type
124
-
125
- **PerformanceCustom**
126
-
127
- ### HTTP request headers
128
-
129
- - **Content-Type**: Not defined
130
- - **Accept**: application/json
131
-
132
-
133
- ### HTTP response details
134
- | Status code | Description | Response headers |
135
- |-------------|-------------|------------------|
136
- **200** | Successfully retrieved performance data | - |
137
- **0** | Unexpected error | - |
138
-
139
- [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
140
-
141
-
package/index.test.ts DELETED
@@ -1,177 +0,0 @@
1
- import { Snaptrade } from "./index";
2
-
3
- function uuid() {
4
- var d = new Date().getTime(); //Timestamp
5
- var d2 =
6
- (typeof performance !== "undefined" &&
7
- performance.now &&
8
- performance.now() * 1000) ||
9
- 0; //Time in microseconds since page-load or 0 if unsupported
10
- return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function (c) {
11
- var r = Math.random() * 16; //random number between 0 and 16
12
- if (d > 0) {
13
- //Use timestamp until depleted
14
- r = (d + r) % 16 | 0;
15
- d = Math.floor(d / 16);
16
- } else {
17
- //Use microseconds since page-load if supported
18
- r = (d2 + r) % 16 | 0;
19
- d2 = Math.floor(d2 / 16);
20
- }
21
- return (c === "x" ? r : (r & 0x3) | 0x8).toString(16);
22
- });
23
- }
24
-
25
- it("getting started", async () => {
26
- // 1) Initialize a client with your clientID and consumerKey.
27
- const snaptrade = new Snaptrade({
28
- consumerKey: process.env.SNAPTRADE_CONSUMER_KEY,
29
- clientId: process.env.SNAPTRADE_CLIENT_ID,
30
- });
31
-
32
- // 2) Check that the client is able to make a request to the API server.
33
- const status = await snaptrade.apiStatus.check();
34
- console.log("status:", status.data);
35
-
36
- // 3) Create a new user on SnapTrade
37
- const userId = uuid();
38
- const { userSecret } = (
39
- await snaptrade.authentication.registerSnapTradeUser({
40
- userId,
41
- })
42
- ).data;
43
-
44
- // Note: A user secret is only generated once. It's required to access
45
- // resources for certain endpoints.
46
- console.log("userSecret:", userSecret);
47
-
48
- // 4) Get a redirect URI. Users will need this to connect
49
- const data = (
50
- await snaptrade.authentication.loginSnapTradeUser({ userId, userSecret })
51
- ).data;
52
- if (!("redirectURI" in data)) throw Error("Should have gotten redirect URI");
53
- console.log("redirectURI:", data.redirectURI);
54
-
55
- // 5) Obtaining account holdings data
56
- const holdings = (
57
- await snaptrade.accountInformation.getAllUserHoldings({
58
- userId,
59
- userSecret,
60
- })
61
- ).data;
62
- console.log("holdings:", holdings);
63
-
64
- // 6) Deleting a user
65
- const deleteResponse = (
66
- await snaptrade.authentication.deleteSnapTradeUser({ userId })
67
- ).data;
68
- console.log("deleteResponse:", deleteResponse);
69
- });
70
-
71
- it("getUserAccountBalance", async () => {
72
- const snaptrade = new Snaptrade({
73
- consumerKey: process.env.SNAPTRADE_CONSUMER_KEY,
74
- clientId: process.env.SNAPTRADE_CLIENT_ID,
75
- });
76
- const userId = process.env.SNAPTRADE_TEST_USER_ID;
77
- const userSecret = process.env.SNAPTRADE_TEST_USER_SECRET;
78
- const accounts = await snaptrade.accountInformation.listUserAccounts({
79
- userId,
80
- userSecret,
81
- });
82
- console.log(accounts.data);
83
- const response = await snaptrade.accountInformation.getUserAccountBalance({
84
- accountId: accounts.data[0].id,
85
- userId,
86
- userSecret,
87
- });
88
- console.log(response.data);
89
- });
90
-
91
- it("getActivities", async () => {
92
- const snaptrade = new Snaptrade({
93
- consumerKey: process.env.SNAPTRADE_CONSUMER_KEY,
94
- clientId: process.env.SNAPTRADE_CLIENT_ID,
95
- });
96
- const userId = process.env.SNAPTRADE_TEST_USER_ID;
97
- const userSecret = process.env.SNAPTRADE_TEST_USER_SECRET;
98
- let activities = await snaptrade.transactionsAndReporting.getActivities({
99
- userId,
100
- userSecret,
101
- });
102
- console.log(activities.data);
103
- expect(activities).not.toBeNull();
104
- // create two variables "startDate" and "endDate" that are strings representing 1 year ago and today in yyyy-mm-dd format using today's date
105
- const startDate = "2020-01-01";
106
- const endDate = "2020-12-31";
107
- activities = await snaptrade.transactionsAndReporting.getActivities({
108
- userId,
109
- userSecret,
110
- startDate,
111
- endDate,
112
- });
113
- console.log(activities.data);
114
- expect(activities).not.toBeNull();
115
- // create two variables "startDate" and "endDate" that are Date instances representing 1 year ago and today
116
- const endDate2 = new Date();
117
- // create variable startDate2 which is 1 year before endDate2
118
- const startDate2 = new Date(endDate2);
119
- startDate2.setFullYear(startDate2.getFullYear() - 1);
120
- activities = await snaptrade.transactionsAndReporting.getActivities({
121
- userId,
122
- userSecret,
123
- startDate: startDate2,
124
- endDate: endDate2,
125
- });
126
- console.log(activities.data);
127
- expect(activities).not.toBeNull();
128
- });
129
-
130
- it("getUserHoldings", async () => {
131
- const snaptrade = new Snaptrade({
132
- consumerKey: process.env.SNAPTRADE_CONSUMER_KEY,
133
- clientId: process.env.SNAPTRADE_CLIENT_ID,
134
- });
135
- const userId = process.env.SNAPTRADE_TEST_USER_ID;
136
- const userSecret = process.env.SNAPTRADE_TEST_USER_SECRET;
137
- const accounts = await snaptrade.accountInformation.listUserAccounts({
138
- userId,
139
- userSecret,
140
- });
141
- const holdings = await snaptrade.accountInformation.getUserHoldings({
142
- userId,
143
- userSecret,
144
- accountId: accounts.data[0].id,
145
- });
146
- // assert holdings is not null with jest
147
- expect(holdings).not.toBeNull();
148
- console.log(holdings.data);
149
- });
150
-
151
- it.skip("getOptionsChain", async () => {
152
- const snaptrade = new Snaptrade({
153
- consumerKey: process.env.SNAPTRADE_CONSUMER_KEY,
154
- clientId: process.env.SNAPTRADE_CLIENT_ID,
155
- });
156
- const userId = process.env.SNAPTRADE_TEST_USER_ID;
157
- const userSecret = process.env.SNAPTRADE_TEST_USER_SECRET;
158
- const accounts = await snaptrade.accountInformation.listUserAccounts({
159
- userId,
160
- userSecret,
161
- });
162
- console.log(accounts.data);
163
- const accountId = accounts.data[0].id;
164
- const symbols = await snaptrade.referenceData.getSymbols({
165
- substring: "apple",
166
- });
167
- console.log(symbols);
168
- const symbol = symbols.data[0].id;
169
- console.log(symbol);
170
- const response = await snaptrade.options.getOptionsChain({
171
- accountId,
172
- userId,
173
- userSecret,
174
- symbol,
175
- });
176
- console.log(response.data);
177
- });
package/index.ts DELETED
@@ -1,18 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * SnapTrade
5
- * Connect brokerage accounts to your app for live positions and trading
6
- *
7
- * The version of the OpenAPI document: 1.0.0
8
- * Contact: api@snaptrade.com
9
- *
10
- * NOTE: This file is auto generated by Konfig (https://konfigthis.com).
11
- * https://konfigthis.com
12
- * Do not edit the class manually.
13
- */
14
-
15
- export * from "./api";
16
- export * from "./configuration";
17
- export * from "./models";
18
- export * from "./client";
package/jest.config.ts DELETED
@@ -1,11 +0,0 @@
1
- import type { Config } from "@jest/types";
2
- const config: Config.InitialOptions = {
3
- verbose: true,
4
- preset: "ts-jest",
5
- testEnvironment: "node",
6
- testPathIgnorePatterns: ["dist/"],
7
- transform: {
8
- "^.+\\.ts?$": ["ts-jest", { tsconfig: "./tsconfig.test.json" }],
9
- },
10
- };
11
- export default config;
@@ -1,61 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * SnapTrade
5
- * Connect brokerage accounts to your app for live positions and trading
6
- *
7
- * The version of the OpenAPI document: 1.0.0
8
- * Contact: api@snaptrade.com
9
- *
10
- * NOTE: This file is auto generated by Konfig (https://konfigthis.com).
11
- * https://konfigthis.com
12
- * Do not edit the class manually.
13
- */
14
-
15
- // May contain unused imports in some cases
16
- // @ts-ignore
17
- import { Balance } from './balance';
18
- // May contain unused imports in some cases
19
- // @ts-ignore
20
- import { Position } from './position';
21
- // May contain unused imports in some cases
22
- // @ts-ignore
23
- import { SnapTradeHoldingsAccountAccountId } from './snap-trade-holdings-account-account-id';
24
- // May contain unused imports in some cases
25
- // @ts-ignore
26
- import { SnapTradeHoldingsTotalValue } from './snap-trade-holdings-total-value';
27
-
28
- /**
29
- * Account Holdings with Account ID
30
- * @export
31
- * @interface AccountHoldingsAccount
32
- */
33
- export interface AccountHoldingsAccount {
34
- [key: string]: any;
35
-
36
- /**
37
- *
38
- * @type {SnapTradeHoldingsAccountAccountId}
39
- * @memberof AccountHoldingsAccount
40
- */
41
- 'account'?: SnapTradeHoldingsAccountAccountId;
42
- /**
43
- *
44
- * @type {Array<Balance>}
45
- * @memberof AccountHoldingsAccount
46
- */
47
- 'balances'?: Array<Balance>;
48
- /**
49
- *
50
- * @type {Array<Position>}
51
- * @memberof AccountHoldingsAccount
52
- */
53
- 'positions'?: Array<Position>;
54
- /**
55
- *
56
- * @type {SnapTradeHoldingsTotalValue}
57
- * @memberof AccountHoldingsAccount
58
- */
59
- 'total_value'?: SnapTradeHoldingsTotalValue;
60
- }
61
-
@@ -1,61 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * SnapTrade
5
- * Connect brokerage accounts to your app for live positions and trading
6
- *
7
- * The version of the OpenAPI document: 1.0.0
8
- * Contact: api@snaptrade.com
9
- *
10
- * NOTE: This file is auto generated by Konfig (https://konfigthis.com).
11
- * https://konfigthis.com
12
- * Do not edit the class manually.
13
- */
14
-
15
- // May contain unused imports in some cases
16
- // @ts-ignore
17
- import { Balance } from './balance';
18
- // May contain unused imports in some cases
19
- // @ts-ignore
20
- import { Position } from './position';
21
- // May contain unused imports in some cases
22
- // @ts-ignore
23
- import { SnapTradeHoldingsAccount } from './snap-trade-holdings-account';
24
- // May contain unused imports in some cases
25
- // @ts-ignore
26
- import { SnapTradeHoldingsTotalValue } from './snap-trade-holdings-total-value';
27
-
28
- /**
29
- * Account Holdings
30
- * @export
31
- * @interface AccountHoldings
32
- */
33
- export interface AccountHoldings {
34
- [key: string]: any;
35
-
36
- /**
37
- *
38
- * @type {SnapTradeHoldingsAccount}
39
- * @memberof AccountHoldings
40
- */
41
- 'account'?: SnapTradeHoldingsAccount;
42
- /**
43
- *
44
- * @type {Array<Balance>}
45
- * @memberof AccountHoldings
46
- */
47
- 'balances'?: Array<Balance>;
48
- /**
49
- *
50
- * @type {Array<Position>}
51
- * @memberof AccountHoldings
52
- */
53
- 'positions'?: Array<Position>;
54
- /**
55
- *
56
- * @type {SnapTradeHoldingsTotalValue}
57
- * @memberof AccountHoldings
58
- */
59
- 'total_value'?: SnapTradeHoldingsTotalValue;
60
- }
61
-
@@ -1,48 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * SnapTrade
5
- * Connect brokerage accounts to your app for live positions and trading
6
- *
7
- * The version of the OpenAPI document: 1.0.0
8
- * Contact: api@snaptrade.com
9
- *
10
- * NOTE: This file is auto generated by Konfig (https://konfigthis.com).
11
- * https://konfigthis.com
12
- * Do not edit the class manually.
13
- */
14
-
15
-
16
- /**
17
- *
18
- * @export
19
- * @enum {string}
20
- */
21
-
22
- export const AccountOrderRecordStatus = {
23
- None: 'NONE',
24
- Pending: 'PENDING',
25
- Accepted: 'ACCEPTED',
26
- Failed: 'FAILED',
27
- Rejected: 'REJECTED',
28
- Canceled: 'CANCELED',
29
- PartialCanceled: 'PARTIAL_CANCELED',
30
- CancelPending: 'CANCEL_PENDING',
31
- Executed: 'EXECUTED',
32
- Partial: 'PARTIAL',
33
- ReplacePending: 'REPLACE_PENDING',
34
- Replaced: 'REPLACED',
35
- Stopped: 'STOPPED',
36
- Suspended: 'SUSPENDED',
37
- Expired: 'EXPIRED',
38
- Queued: 'QUEUED',
39
- Triggered: 'TRIGGERED',
40
- Activated: 'ACTIVATED',
41
- PendingRiskReview: 'PENDING_RISK_REVIEW',
42
- ContingentOrder: 'CONTINGENT_ORDER'
43
- } as const;
44
-
45
- export type AccountOrderRecordStatus = typeof AccountOrderRecordStatus[keyof typeof AccountOrderRecordStatus];
46
-
47
-
48
-
@@ -1,151 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * SnapTrade
5
- * Connect brokerage accounts to your app for live positions and trading
6
- *
7
- * The version of the OpenAPI document: 1.0.0
8
- * Contact: api@snaptrade.com
9
- *
10
- * NOTE: This file is auto generated by Konfig (https://konfigthis.com).
11
- * https://konfigthis.com
12
- * Do not edit the class manually.
13
- */
14
-
15
- // May contain unused imports in some cases
16
- // @ts-ignore
17
- import { AccountOrderRecordStatus } from './account-order-record-status';
18
- // May contain unused imports in some cases
19
- // @ts-ignore
20
- import { Action } from './action';
21
- // May contain unused imports in some cases
22
- // @ts-ignore
23
- import { OptionsSymbol } from './options-symbol';
24
- // May contain unused imports in some cases
25
- // @ts-ignore
26
- import { OrderType } from './order-type';
27
- // May contain unused imports in some cases
28
- // @ts-ignore
29
- import { TimeInForce } from './time-in-force';
30
- // May contain unused imports in some cases
31
- // @ts-ignore
32
- import { UniversalSymbol } from './universal-symbol';
33
-
34
- /**
35
- * Record of order in brokerageaccount
36
- * @export
37
- * @interface AccountOrderRecord
38
- */
39
- export interface AccountOrderRecord {
40
- [key: string]: any;
41
-
42
- /**
43
- * Order id returned by brokerage
44
- * @type {string}
45
- * @memberof AccountOrderRecord
46
- */
47
- 'brokerage_order_id'?: string;
48
- /**
49
- *
50
- * @type {AccountOrderRecordStatus}
51
- * @memberof AccountOrderRecord
52
- */
53
- 'status'?: AccountOrderRecordStatus;
54
- /**
55
- *
56
- * @type {string}
57
- * @memberof AccountOrderRecord
58
- */
59
- 'symbol'?: string;
60
- /**
61
- *
62
- * @type {UniversalSymbol}
63
- * @memberof AccountOrderRecord
64
- */
65
- 'universal_symbol'?: UniversalSymbol;
66
- /**
67
- *
68
- * @type {OptionsSymbol}
69
- * @memberof AccountOrderRecord
70
- */
71
- 'option_symbol'?: OptionsSymbol;
72
- /**
73
- *
74
- * @type {Action}
75
- * @memberof AccountOrderRecord
76
- */
77
- 'action'?: Action;
78
- /**
79
- * Trade Units
80
- * @type {number}
81
- * @memberof AccountOrderRecord
82
- */
83
- 'total_quantity'?: number;
84
- /**
85
- * Trade Units
86
- * @type {number}
87
- * @memberof AccountOrderRecord
88
- */
89
- 'open_quantity'?: number;
90
- /**
91
- * Trade Units
92
- * @type {number}
93
- * @memberof AccountOrderRecord
94
- */
95
- 'canceled_quantity'?: number;
96
- /**
97
- * Trade Units
98
- * @type {number}
99
- * @memberof AccountOrderRecord
100
- */
101
- 'filled_quantity'?: number;
102
- /**
103
- * Trade Price if limit or stop limit order
104
- * @type {number}
105
- * @memberof AccountOrderRecord
106
- */
107
- 'execution_price'?: number;
108
- /**
109
- * Trade Price if limit or stop limit order
110
- * @type {number}
111
- * @memberof AccountOrderRecord
112
- */
113
- 'limit_price'?: number;
114
- /**
115
- * Trade Price if limit or stop limit order
116
- * @type {number}
117
- * @memberof AccountOrderRecord
118
- */
119
- 'stop_price'?: number;
120
- /**
121
- *
122
- * @type {OrderType}
123
- * @memberof AccountOrderRecord
124
- */
125
- 'order_type'?: OrderType;
126
- /**
127
- *
128
- * @type {TimeInForce}
129
- * @memberof AccountOrderRecord
130
- */
131
- 'time_in_force'?: TimeInForce;
132
- /**
133
- * Time
134
- * @type {string}
135
- * @memberof AccountOrderRecord
136
- */
137
- 'time_placed'?: string;
138
- /**
139
- * Time
140
- * @type {string}
141
- * @memberof AccountOrderRecord
142
- */
143
- 'time_updated'?: string;
144
- /**
145
- * Time
146
- * @type {string}
147
- * @memberof AccountOrderRecord
148
- */
149
- 'expiry_date'?: string;
150
- }
151
-