snaptrade-typescript-sdk 9.0.198 → 9.0.200
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.
- package/README.md +45 -215
- package/dist/api/trading-api-generated.d.ts +8 -4
- package/dist/api/trading-api-generated.js +8 -4
- package/dist/api.d.ts +0 -1
- package/dist/api.js +0 -1
- package/dist/browser.js +1 -1
- package/dist/client.d.ts +1 -2
- package/dist/client.js +0 -1
- package/dist/configuration.js +1 -1
- package/dist/models/index.d.ts +2 -0
- package/dist/models/index.js +2 -0
- package/dist/models/trade-detection-cancel-subscription-response.d.ts +14 -0
- package/dist/models/trade-detection-cancel-subscription-response.js +2 -0
- package/dist/models/trade-detection-subscription.d.ts +26 -0
- package/dist/models/trade-detection-subscription.js +2 -0
- package/dist/operationParameterMap.js +0 -64
- package/package.json +1 -1
- package/dist/api/experimental-endpoints-api-generated.d.ts +0 -300
- package/dist/api/experimental-endpoints-api-generated.js +0 -441
- package/dist/api/experimental-endpoints-api.d.ts +0 -4
- package/dist/api/experimental-endpoints-api.js +0 -22
|
@@ -1,441 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/* tslint:disable */
|
|
3
|
-
/* eslint-disable */
|
|
4
|
-
/*
|
|
5
|
-
SnapTrade
|
|
6
|
-
|
|
7
|
-
Connect brokerage accounts to your app for live positions and trading
|
|
8
|
-
|
|
9
|
-
The version of the OpenAPI document: 1.0.0
|
|
10
|
-
Contact: api@snaptrade.com
|
|
11
|
-
|
|
12
|
-
NOTE: This file is auto generated by Konfig (https://konfigthis.com).
|
|
13
|
-
*/
|
|
14
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
15
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
16
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
17
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
18
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
19
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
20
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
21
|
-
});
|
|
22
|
-
};
|
|
23
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24
|
-
exports.ExperimentalEndpointsApiGenerated = exports.ExperimentalEndpointsApiFactory = exports.ExperimentalEndpointsApiFp = exports.ExperimentalEndpointsApiAxiosParamCreator = void 0;
|
|
25
|
-
const axios_1 = require("axios");
|
|
26
|
-
// Some imports not used depending on template conditions
|
|
27
|
-
// @ts-ignore
|
|
28
|
-
const common_1 = require("../common");
|
|
29
|
-
// @ts-ignore
|
|
30
|
-
const base_1 = require("../base");
|
|
31
|
-
const requestBeforeHook_1 = require("../requestBeforeHook");
|
|
32
|
-
/**
|
|
33
|
-
* ExperimentalEndpointsApi - axios parameter creator
|
|
34
|
-
* @export
|
|
35
|
-
*/
|
|
36
|
-
const ExperimentalEndpointsApiAxiosParamCreator = function (configuration) {
|
|
37
|
-
return {
|
|
38
|
-
/**
|
|
39
|
-
* Returns the detail of a single order using the brokerage order ID provided as a path parameter. The V2 order response format includes all legs of the order in the `legs` list field. If the order is single legged, `legs` will be a list of one leg. This endpoint is always realtime and does not rely on cached data. This endpoint only returns orders placed through SnapTrade. In other words, orders placed outside of the SnapTrade network are not returned by this endpoint.
|
|
40
|
-
* @summary Get account order detail (V2)
|
|
41
|
-
* @param {string} accountId
|
|
42
|
-
* @param {string} brokerageOrderId
|
|
43
|
-
* @param {string} userId
|
|
44
|
-
* @param {string} userSecret
|
|
45
|
-
* @param {*} [options] Override http request option.
|
|
46
|
-
* @throws {RequiredError}
|
|
47
|
-
*/
|
|
48
|
-
getUserAccountOrderDetailV2: (accountId, brokerageOrderId, userId, userSecret, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
49
|
-
// verify required parameter 'accountId' is not null or undefined
|
|
50
|
-
(0, common_1.assertParamExists)('getUserAccountOrderDetailV2', 'accountId', accountId);
|
|
51
|
-
// verify required parameter 'brokerageOrderId' is not null or undefined
|
|
52
|
-
(0, common_1.assertParamExists)('getUserAccountOrderDetailV2', 'brokerageOrderId', brokerageOrderId);
|
|
53
|
-
// verify required parameter 'userId' is not null or undefined
|
|
54
|
-
(0, common_1.assertParamExists)('getUserAccountOrderDetailV2', 'userId', userId);
|
|
55
|
-
// verify required parameter 'userSecret' is not null or undefined
|
|
56
|
-
(0, common_1.assertParamExists)('getUserAccountOrderDetailV2', 'userSecret', userSecret);
|
|
57
|
-
const localVarPath = `/accounts/{accountId}/orders/details/v2/{brokerageOrderId}`
|
|
58
|
-
.replace(`{${"accountId"}}`, encodeURIComponent(String(accountId !== undefined ? accountId : `-accountId-`)))
|
|
59
|
-
.replace(`{${"brokerageOrderId"}}`, encodeURIComponent(String(brokerageOrderId !== undefined ? brokerageOrderId : `-brokerageOrderId-`)));
|
|
60
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
61
|
-
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
62
|
-
let baseOptions;
|
|
63
|
-
if (configuration) {
|
|
64
|
-
baseOptions = configuration.baseOptions;
|
|
65
|
-
}
|
|
66
|
-
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
67
|
-
const localVarHeaderParameter = configuration && !(0, common_1.isBrowser)() ? { "User-Agent": configuration.userAgent } : {};
|
|
68
|
-
const localVarQueryParameter = {};
|
|
69
|
-
// authentication PartnerClientId required
|
|
70
|
-
yield (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, key: "clientId", keyParamName: "clientId", configuration });
|
|
71
|
-
// authentication PartnerSignature required
|
|
72
|
-
yield (0, common_1.setApiKeyToObject)({ object: localVarHeaderParameter, key: "Signature", keyParamName: "signature", configuration });
|
|
73
|
-
// authentication PartnerTimestamp required
|
|
74
|
-
yield (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, key: "timestamp", keyParamName: "timestamp", configuration });
|
|
75
|
-
if (userId !== undefined) {
|
|
76
|
-
localVarQueryParameter['userId'] = userId;
|
|
77
|
-
}
|
|
78
|
-
if (userSecret !== undefined) {
|
|
79
|
-
localVarQueryParameter['userSecret'] = userSecret;
|
|
80
|
-
}
|
|
81
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
82
|
-
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
83
|
-
(0, requestBeforeHook_1.requestBeforeHook)({
|
|
84
|
-
queryParameters: localVarQueryParameter,
|
|
85
|
-
requestConfig: localVarRequestOptions,
|
|
86
|
-
path: localVarPath,
|
|
87
|
-
configuration,
|
|
88
|
-
pathTemplate: '/accounts/{accountId}/orders/details/v2/{brokerageOrderId}',
|
|
89
|
-
httpMethod: 'GET'
|
|
90
|
-
});
|
|
91
|
-
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
92
|
-
return {
|
|
93
|
-
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
94
|
-
options: localVarRequestOptions,
|
|
95
|
-
};
|
|
96
|
-
}),
|
|
97
|
-
/**
|
|
98
|
-
* Returns a list of recent orders in the specified account. The V2 order response format will include all legs of each order in the `legs` list field. If the order is single legged, `legs` will be a list of one leg. If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
|
|
99
|
-
* @summary List account orders v2
|
|
100
|
-
* @param {string} userId
|
|
101
|
-
* @param {string} userSecret
|
|
102
|
-
* @param {string} accountId
|
|
103
|
-
* @param {'all' | 'open' | 'executed'} [state] defaults value is set to \"all\"
|
|
104
|
-
* @param {number} [days] Number of days in the past to fetch the most recent orders. Defaults to the last 30 days if no value is passed in. Values greater than 90 will be capped at 90.
|
|
105
|
-
* @param {*} [options] Override http request option.
|
|
106
|
-
* @throws {RequiredError}
|
|
107
|
-
*/
|
|
108
|
-
getUserAccountOrdersV2: (userId, userSecret, accountId, state, days, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
109
|
-
// verify required parameter 'userId' is not null or undefined
|
|
110
|
-
(0, common_1.assertParamExists)('getUserAccountOrdersV2', 'userId', userId);
|
|
111
|
-
// verify required parameter 'userSecret' is not null or undefined
|
|
112
|
-
(0, common_1.assertParamExists)('getUserAccountOrdersV2', 'userSecret', userSecret);
|
|
113
|
-
// verify required parameter 'accountId' is not null or undefined
|
|
114
|
-
(0, common_1.assertParamExists)('getUserAccountOrdersV2', 'accountId', accountId);
|
|
115
|
-
const localVarPath = `/accounts/{accountId}/orders/v2`
|
|
116
|
-
.replace(`{${"accountId"}}`, encodeURIComponent(String(accountId !== undefined ? accountId : `-accountId-`)));
|
|
117
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
118
|
-
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
119
|
-
let baseOptions;
|
|
120
|
-
if (configuration) {
|
|
121
|
-
baseOptions = configuration.baseOptions;
|
|
122
|
-
}
|
|
123
|
-
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
124
|
-
const localVarHeaderParameter = configuration && !(0, common_1.isBrowser)() ? { "User-Agent": configuration.userAgent } : {};
|
|
125
|
-
const localVarQueryParameter = {};
|
|
126
|
-
// authentication PartnerClientId required
|
|
127
|
-
yield (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, key: "clientId", keyParamName: "clientId", configuration });
|
|
128
|
-
// authentication PartnerSignature required
|
|
129
|
-
yield (0, common_1.setApiKeyToObject)({ object: localVarHeaderParameter, key: "Signature", keyParamName: "signature", configuration });
|
|
130
|
-
// authentication PartnerTimestamp required
|
|
131
|
-
yield (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, key: "timestamp", keyParamName: "timestamp", configuration });
|
|
132
|
-
if (userId !== undefined) {
|
|
133
|
-
localVarQueryParameter['userId'] = userId;
|
|
134
|
-
}
|
|
135
|
-
if (userSecret !== undefined) {
|
|
136
|
-
localVarQueryParameter['userSecret'] = userSecret;
|
|
137
|
-
}
|
|
138
|
-
if (state !== undefined) {
|
|
139
|
-
localVarQueryParameter['state'] = state;
|
|
140
|
-
}
|
|
141
|
-
if (days !== undefined) {
|
|
142
|
-
localVarQueryParameter['days'] = days;
|
|
143
|
-
}
|
|
144
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
145
|
-
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
146
|
-
(0, requestBeforeHook_1.requestBeforeHook)({
|
|
147
|
-
queryParameters: localVarQueryParameter,
|
|
148
|
-
requestConfig: localVarRequestOptions,
|
|
149
|
-
path: localVarPath,
|
|
150
|
-
configuration,
|
|
151
|
-
pathTemplate: '/accounts/{accountId}/orders/v2',
|
|
152
|
-
httpMethod: 'GET'
|
|
153
|
-
});
|
|
154
|
-
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
155
|
-
return {
|
|
156
|
-
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
157
|
-
options: localVarRequestOptions,
|
|
158
|
-
};
|
|
159
|
-
}),
|
|
160
|
-
/**
|
|
161
|
-
* A lightweight endpoint that returns a list of orders executed in the last 24 hours in the specified account using the V2 order format. This endpoint is realtime and can be used to quickly check if account state has recently changed due to an execution, or check status of recently placed orders. Differs from /orders in that it is realtime, and only checks the last 24 hours as opposed to the last 30 days. By default only returns executed orders, but that can be changed by setting *only_executed* to false. **Because of the cost of realtime requests, each call to this endpoint incurs an additional charge. You can find the exact cost for your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing)**
|
|
162
|
-
* @summary List account recent orders (V2, last 24 hours only)
|
|
163
|
-
* @param {string} userId
|
|
164
|
-
* @param {string} userSecret
|
|
165
|
-
* @param {string} accountId
|
|
166
|
-
* @param {boolean} [onlyExecuted] Defaults to true. Indicates if request should fetch only executed orders. Set to false to retrieve non executed orders as well
|
|
167
|
-
* @param {*} [options] Override http request option.
|
|
168
|
-
* @throws {RequiredError}
|
|
169
|
-
*/
|
|
170
|
-
getUserAccountRecentOrdersV2: (userId, userSecret, accountId, onlyExecuted, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
171
|
-
// verify required parameter 'userId' is not null or undefined
|
|
172
|
-
(0, common_1.assertParamExists)('getUserAccountRecentOrdersV2', 'userId', userId);
|
|
173
|
-
// verify required parameter 'userSecret' is not null or undefined
|
|
174
|
-
(0, common_1.assertParamExists)('getUserAccountRecentOrdersV2', 'userSecret', userSecret);
|
|
175
|
-
// verify required parameter 'accountId' is not null or undefined
|
|
176
|
-
(0, common_1.assertParamExists)('getUserAccountRecentOrdersV2', 'accountId', accountId);
|
|
177
|
-
const localVarPath = `/accounts/{accountId}/recentOrders/v2`
|
|
178
|
-
.replace(`{${"accountId"}}`, encodeURIComponent(String(accountId !== undefined ? accountId : `-accountId-`)));
|
|
179
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
180
|
-
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
181
|
-
let baseOptions;
|
|
182
|
-
if (configuration) {
|
|
183
|
-
baseOptions = configuration.baseOptions;
|
|
184
|
-
}
|
|
185
|
-
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
186
|
-
const localVarHeaderParameter = configuration && !(0, common_1.isBrowser)() ? { "User-Agent": configuration.userAgent } : {};
|
|
187
|
-
const localVarQueryParameter = {};
|
|
188
|
-
// authentication PartnerClientId required
|
|
189
|
-
yield (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, key: "clientId", keyParamName: "clientId", configuration });
|
|
190
|
-
// authentication PartnerSignature required
|
|
191
|
-
yield (0, common_1.setApiKeyToObject)({ object: localVarHeaderParameter, key: "Signature", keyParamName: "signature", configuration });
|
|
192
|
-
// authentication PartnerTimestamp required
|
|
193
|
-
yield (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, key: "timestamp", keyParamName: "timestamp", configuration });
|
|
194
|
-
if (userId !== undefined) {
|
|
195
|
-
localVarQueryParameter['userId'] = userId;
|
|
196
|
-
}
|
|
197
|
-
if (userSecret !== undefined) {
|
|
198
|
-
localVarQueryParameter['userSecret'] = userSecret;
|
|
199
|
-
}
|
|
200
|
-
if (onlyExecuted !== undefined) {
|
|
201
|
-
localVarQueryParameter['only_executed'] = onlyExecuted;
|
|
202
|
-
}
|
|
203
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
204
|
-
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
205
|
-
(0, requestBeforeHook_1.requestBeforeHook)({
|
|
206
|
-
queryParameters: localVarQueryParameter,
|
|
207
|
-
requestConfig: localVarRequestOptions,
|
|
208
|
-
path: localVarPath,
|
|
209
|
-
configuration,
|
|
210
|
-
pathTemplate: '/accounts/{accountId}/recentOrders/v2',
|
|
211
|
-
httpMethod: 'GET'
|
|
212
|
-
});
|
|
213
|
-
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
214
|
-
return {
|
|
215
|
-
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
216
|
-
options: localVarRequestOptions,
|
|
217
|
-
};
|
|
218
|
-
}),
|
|
219
|
-
/**
|
|
220
|
-
* Trigger a transactions sync for all accounts under this connection. Updates will be queued asynchronously. Transactions are not updated intra-day, but calling this endpoint can ensure that the previous day\'s transactions have been synced. For more information on sync behaviour, see: https://docs.snaptrade.com/docs/syncing
|
|
221
|
-
* @summary Sync transactions for a connection
|
|
222
|
-
* @param {string} authorizationId
|
|
223
|
-
* @param {string} userId
|
|
224
|
-
* @param {string} userSecret
|
|
225
|
-
* @param {*} [options] Override http request option.
|
|
226
|
-
* @throws {RequiredError}
|
|
227
|
-
*/
|
|
228
|
-
syncBrokerageAuthorizationTransactions: (authorizationId, userId, userSecret, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
229
|
-
// verify required parameter 'authorizationId' is not null or undefined
|
|
230
|
-
(0, common_1.assertParamExists)('syncBrokerageAuthorizationTransactions', 'authorizationId', authorizationId);
|
|
231
|
-
// verify required parameter 'userId' is not null or undefined
|
|
232
|
-
(0, common_1.assertParamExists)('syncBrokerageAuthorizationTransactions', 'userId', userId);
|
|
233
|
-
// verify required parameter 'userSecret' is not null or undefined
|
|
234
|
-
(0, common_1.assertParamExists)('syncBrokerageAuthorizationTransactions', 'userSecret', userSecret);
|
|
235
|
-
const localVarPath = `/authorizations/{authorizationId}/transactions/sync`
|
|
236
|
-
.replace(`{${"authorizationId"}}`, encodeURIComponent(String(authorizationId !== undefined ? authorizationId : `-authorizationId-`)));
|
|
237
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
238
|
-
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
239
|
-
let baseOptions;
|
|
240
|
-
if (configuration) {
|
|
241
|
-
baseOptions = configuration.baseOptions;
|
|
242
|
-
}
|
|
243
|
-
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
244
|
-
const localVarHeaderParameter = configuration && !(0, common_1.isBrowser)() ? { "User-Agent": configuration.userAgent } : {};
|
|
245
|
-
const localVarQueryParameter = {};
|
|
246
|
-
// authentication PartnerClientId required
|
|
247
|
-
yield (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, key: "clientId", keyParamName: "clientId", configuration });
|
|
248
|
-
// authentication PartnerSignature required
|
|
249
|
-
yield (0, common_1.setApiKeyToObject)({ object: localVarHeaderParameter, key: "Signature", keyParamName: "signature", configuration });
|
|
250
|
-
// authentication PartnerTimestamp required
|
|
251
|
-
yield (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, key: "timestamp", keyParamName: "timestamp", configuration });
|
|
252
|
-
if (userId !== undefined) {
|
|
253
|
-
localVarQueryParameter['userId'] = userId;
|
|
254
|
-
}
|
|
255
|
-
if (userSecret !== undefined) {
|
|
256
|
-
localVarQueryParameter['userSecret'] = userSecret;
|
|
257
|
-
}
|
|
258
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
259
|
-
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
260
|
-
(0, requestBeforeHook_1.requestBeforeHook)({
|
|
261
|
-
queryParameters: localVarQueryParameter,
|
|
262
|
-
requestConfig: localVarRequestOptions,
|
|
263
|
-
path: localVarPath,
|
|
264
|
-
configuration,
|
|
265
|
-
pathTemplate: '/authorizations/{authorizationId}/transactions/sync',
|
|
266
|
-
httpMethod: 'POST'
|
|
267
|
-
});
|
|
268
|
-
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
269
|
-
return {
|
|
270
|
-
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
271
|
-
options: localVarRequestOptions,
|
|
272
|
-
};
|
|
273
|
-
}),
|
|
274
|
-
};
|
|
275
|
-
};
|
|
276
|
-
exports.ExperimentalEndpointsApiAxiosParamCreator = ExperimentalEndpointsApiAxiosParamCreator;
|
|
277
|
-
/**
|
|
278
|
-
* ExperimentalEndpointsApi - functional programming interface
|
|
279
|
-
* @export
|
|
280
|
-
*/
|
|
281
|
-
const ExperimentalEndpointsApiFp = function (configuration) {
|
|
282
|
-
const localVarAxiosParamCreator = (0, exports.ExperimentalEndpointsApiAxiosParamCreator)(configuration);
|
|
283
|
-
return {
|
|
284
|
-
/**
|
|
285
|
-
* Returns the detail of a single order using the brokerage order ID provided as a path parameter. The V2 order response format includes all legs of the order in the `legs` list field. If the order is single legged, `legs` will be a list of one leg. This endpoint is always realtime and does not rely on cached data. This endpoint only returns orders placed through SnapTrade. In other words, orders placed outside of the SnapTrade network are not returned by this endpoint.
|
|
286
|
-
* @summary Get account order detail (V2)
|
|
287
|
-
* @param {ExperimentalEndpointsApiGetUserAccountOrderDetailV2Request} requestParameters Request parameters.
|
|
288
|
-
* @param {*} [options] Override http request option.
|
|
289
|
-
* @throws {RequiredError}
|
|
290
|
-
*/
|
|
291
|
-
getUserAccountOrderDetailV2(requestParameters, options) {
|
|
292
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
293
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.getUserAccountOrderDetailV2(requestParameters.accountId, requestParameters.brokerageOrderId, requestParameters.userId, requestParameters.userSecret, options);
|
|
294
|
-
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
295
|
-
});
|
|
296
|
-
},
|
|
297
|
-
/**
|
|
298
|
-
* Returns a list of recent orders in the specified account. The V2 order response format will include all legs of each order in the `legs` list field. If the order is single legged, `legs` will be a list of one leg. If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
|
|
299
|
-
* @summary List account orders v2
|
|
300
|
-
* @param {ExperimentalEndpointsApiGetUserAccountOrdersV2Request} requestParameters Request parameters.
|
|
301
|
-
* @param {*} [options] Override http request option.
|
|
302
|
-
* @throws {RequiredError}
|
|
303
|
-
*/
|
|
304
|
-
getUserAccountOrdersV2(requestParameters, options) {
|
|
305
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
306
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.getUserAccountOrdersV2(requestParameters.userId, requestParameters.userSecret, requestParameters.accountId, requestParameters.state, requestParameters.days, options);
|
|
307
|
-
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
308
|
-
});
|
|
309
|
-
},
|
|
310
|
-
/**
|
|
311
|
-
* A lightweight endpoint that returns a list of orders executed in the last 24 hours in the specified account using the V2 order format. This endpoint is realtime and can be used to quickly check if account state has recently changed due to an execution, or check status of recently placed orders. Differs from /orders in that it is realtime, and only checks the last 24 hours as opposed to the last 30 days. By default only returns executed orders, but that can be changed by setting *only_executed* to false. **Because of the cost of realtime requests, each call to this endpoint incurs an additional charge. You can find the exact cost for your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing)**
|
|
312
|
-
* @summary List account recent orders (V2, last 24 hours only)
|
|
313
|
-
* @param {ExperimentalEndpointsApiGetUserAccountRecentOrdersV2Request} requestParameters Request parameters.
|
|
314
|
-
* @param {*} [options] Override http request option.
|
|
315
|
-
* @throws {RequiredError}
|
|
316
|
-
*/
|
|
317
|
-
getUserAccountRecentOrdersV2(requestParameters, options) {
|
|
318
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
319
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.getUserAccountRecentOrdersV2(requestParameters.userId, requestParameters.userSecret, requestParameters.accountId, requestParameters.onlyExecuted, options);
|
|
320
|
-
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
321
|
-
});
|
|
322
|
-
},
|
|
323
|
-
/**
|
|
324
|
-
* Trigger a transactions sync for all accounts under this connection. Updates will be queued asynchronously. Transactions are not updated intra-day, but calling this endpoint can ensure that the previous day\'s transactions have been synced. For more information on sync behaviour, see: https://docs.snaptrade.com/docs/syncing
|
|
325
|
-
* @summary Sync transactions for a connection
|
|
326
|
-
* @param {ExperimentalEndpointsApiSyncBrokerageAuthorizationTransactionsRequest} requestParameters Request parameters.
|
|
327
|
-
* @param {*} [options] Override http request option.
|
|
328
|
-
* @throws {RequiredError}
|
|
329
|
-
*/
|
|
330
|
-
syncBrokerageAuthorizationTransactions(requestParameters, options) {
|
|
331
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
332
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.syncBrokerageAuthorizationTransactions(requestParameters.authorizationId, requestParameters.userId, requestParameters.userSecret, options);
|
|
333
|
-
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
334
|
-
});
|
|
335
|
-
},
|
|
336
|
-
};
|
|
337
|
-
};
|
|
338
|
-
exports.ExperimentalEndpointsApiFp = ExperimentalEndpointsApiFp;
|
|
339
|
-
/**
|
|
340
|
-
* ExperimentalEndpointsApi - factory interface
|
|
341
|
-
* @export
|
|
342
|
-
*/
|
|
343
|
-
const ExperimentalEndpointsApiFactory = function (configuration, basePath, axios) {
|
|
344
|
-
const localVarFp = (0, exports.ExperimentalEndpointsApiFp)(configuration);
|
|
345
|
-
return {
|
|
346
|
-
/**
|
|
347
|
-
* Returns the detail of a single order using the brokerage order ID provided as a path parameter. The V2 order response format includes all legs of the order in the `legs` list field. If the order is single legged, `legs` will be a list of one leg. This endpoint is always realtime and does not rely on cached data. This endpoint only returns orders placed through SnapTrade. In other words, orders placed outside of the SnapTrade network are not returned by this endpoint.
|
|
348
|
-
* @summary Get account order detail (V2)
|
|
349
|
-
* @param {ExperimentalEndpointsApiGetUserAccountOrderDetailV2Request} requestParameters Request parameters.
|
|
350
|
-
* @param {*} [options] Override http request option.
|
|
351
|
-
* @throws {RequiredError}
|
|
352
|
-
*/
|
|
353
|
-
getUserAccountOrderDetailV2(requestParameters, options) {
|
|
354
|
-
return localVarFp.getUserAccountOrderDetailV2(requestParameters, options).then((request) => request(axios, basePath));
|
|
355
|
-
},
|
|
356
|
-
/**
|
|
357
|
-
* Returns a list of recent orders in the specified account. The V2 order response format will include all legs of each order in the `legs` list field. If the order is single legged, `legs` will be a list of one leg. If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
|
|
358
|
-
* @summary List account orders v2
|
|
359
|
-
* @param {ExperimentalEndpointsApiGetUserAccountOrdersV2Request} requestParameters Request parameters.
|
|
360
|
-
* @param {*} [options] Override http request option.
|
|
361
|
-
* @throws {RequiredError}
|
|
362
|
-
*/
|
|
363
|
-
getUserAccountOrdersV2(requestParameters, options) {
|
|
364
|
-
return localVarFp.getUserAccountOrdersV2(requestParameters, options).then((request) => request(axios, basePath));
|
|
365
|
-
},
|
|
366
|
-
/**
|
|
367
|
-
* A lightweight endpoint that returns a list of orders executed in the last 24 hours in the specified account using the V2 order format. This endpoint is realtime and can be used to quickly check if account state has recently changed due to an execution, or check status of recently placed orders. Differs from /orders in that it is realtime, and only checks the last 24 hours as opposed to the last 30 days. By default only returns executed orders, but that can be changed by setting *only_executed* to false. **Because of the cost of realtime requests, each call to this endpoint incurs an additional charge. You can find the exact cost for your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing)**
|
|
368
|
-
* @summary List account recent orders (V2, last 24 hours only)
|
|
369
|
-
* @param {ExperimentalEndpointsApiGetUserAccountRecentOrdersV2Request} requestParameters Request parameters.
|
|
370
|
-
* @param {*} [options] Override http request option.
|
|
371
|
-
* @throws {RequiredError}
|
|
372
|
-
*/
|
|
373
|
-
getUserAccountRecentOrdersV2(requestParameters, options) {
|
|
374
|
-
return localVarFp.getUserAccountRecentOrdersV2(requestParameters, options).then((request) => request(axios, basePath));
|
|
375
|
-
},
|
|
376
|
-
/**
|
|
377
|
-
* Trigger a transactions sync for all accounts under this connection. Updates will be queued asynchronously. Transactions are not updated intra-day, but calling this endpoint can ensure that the previous day\'s transactions have been synced. For more information on sync behaviour, see: https://docs.snaptrade.com/docs/syncing
|
|
378
|
-
* @summary Sync transactions for a connection
|
|
379
|
-
* @param {ExperimentalEndpointsApiSyncBrokerageAuthorizationTransactionsRequest} requestParameters Request parameters.
|
|
380
|
-
* @param {*} [options] Override http request option.
|
|
381
|
-
* @throws {RequiredError}
|
|
382
|
-
*/
|
|
383
|
-
syncBrokerageAuthorizationTransactions(requestParameters, options) {
|
|
384
|
-
return localVarFp.syncBrokerageAuthorizationTransactions(requestParameters, options).then((request) => request(axios, basePath));
|
|
385
|
-
},
|
|
386
|
-
};
|
|
387
|
-
};
|
|
388
|
-
exports.ExperimentalEndpointsApiFactory = ExperimentalEndpointsApiFactory;
|
|
389
|
-
/**
|
|
390
|
-
* ExperimentalEndpointsApiGenerated - object-oriented interface
|
|
391
|
-
* @export
|
|
392
|
-
* @class ExperimentalEndpointsApiGenerated
|
|
393
|
-
* @extends {BaseAPI}
|
|
394
|
-
*/
|
|
395
|
-
class ExperimentalEndpointsApiGenerated extends base_1.BaseAPI {
|
|
396
|
-
/**
|
|
397
|
-
* Returns the detail of a single order using the brokerage order ID provided as a path parameter. The V2 order response format includes all legs of the order in the `legs` list field. If the order is single legged, `legs` will be a list of one leg. This endpoint is always realtime and does not rely on cached data. This endpoint only returns orders placed through SnapTrade. In other words, orders placed outside of the SnapTrade network are not returned by this endpoint.
|
|
398
|
-
* @summary Get account order detail (V2)
|
|
399
|
-
* @param {ExperimentalEndpointsApiGetUserAccountOrderDetailV2Request} requestParameters Request parameters.
|
|
400
|
-
* @param {*} [options] Override http request option.
|
|
401
|
-
* @throws {RequiredError}
|
|
402
|
-
* @memberof ExperimentalEndpointsApiGenerated
|
|
403
|
-
*/
|
|
404
|
-
getUserAccountOrderDetailV2(requestParameters, options) {
|
|
405
|
-
return (0, exports.ExperimentalEndpointsApiFp)(this.configuration).getUserAccountOrderDetailV2(requestParameters, options).then((request) => request(this.axios, this.basePath));
|
|
406
|
-
}
|
|
407
|
-
/**
|
|
408
|
-
* Returns a list of recent orders in the specified account. The V2 order response format will include all legs of each order in the `legs` list field. If the order is single legged, `legs` will be a list of one leg. If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
|
|
409
|
-
* @summary List account orders v2
|
|
410
|
-
* @param {ExperimentalEndpointsApiGetUserAccountOrdersV2Request} requestParameters Request parameters.
|
|
411
|
-
* @param {*} [options] Override http request option.
|
|
412
|
-
* @throws {RequiredError}
|
|
413
|
-
* @memberof ExperimentalEndpointsApiGenerated
|
|
414
|
-
*/
|
|
415
|
-
getUserAccountOrdersV2(requestParameters, options) {
|
|
416
|
-
return (0, exports.ExperimentalEndpointsApiFp)(this.configuration).getUserAccountOrdersV2(requestParameters, options).then((request) => request(this.axios, this.basePath));
|
|
417
|
-
}
|
|
418
|
-
/**
|
|
419
|
-
* A lightweight endpoint that returns a list of orders executed in the last 24 hours in the specified account using the V2 order format. This endpoint is realtime and can be used to quickly check if account state has recently changed due to an execution, or check status of recently placed orders. Differs from /orders in that it is realtime, and only checks the last 24 hours as opposed to the last 30 days. By default only returns executed orders, but that can be changed by setting *only_executed* to false. **Because of the cost of realtime requests, each call to this endpoint incurs an additional charge. You can find the exact cost for your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing)**
|
|
420
|
-
* @summary List account recent orders (V2, last 24 hours only)
|
|
421
|
-
* @param {ExperimentalEndpointsApiGetUserAccountRecentOrdersV2Request} requestParameters Request parameters.
|
|
422
|
-
* @param {*} [options] Override http request option.
|
|
423
|
-
* @throws {RequiredError}
|
|
424
|
-
* @memberof ExperimentalEndpointsApiGenerated
|
|
425
|
-
*/
|
|
426
|
-
getUserAccountRecentOrdersV2(requestParameters, options) {
|
|
427
|
-
return (0, exports.ExperimentalEndpointsApiFp)(this.configuration).getUserAccountRecentOrdersV2(requestParameters, options).then((request) => request(this.axios, this.basePath));
|
|
428
|
-
}
|
|
429
|
-
/**
|
|
430
|
-
* Trigger a transactions sync for all accounts under this connection. Updates will be queued asynchronously. Transactions are not updated intra-day, but calling this endpoint can ensure that the previous day\'s transactions have been synced. For more information on sync behaviour, see: https://docs.snaptrade.com/docs/syncing
|
|
431
|
-
* @summary Sync transactions for a connection
|
|
432
|
-
* @param {ExperimentalEndpointsApiSyncBrokerageAuthorizationTransactionsRequest} requestParameters Request parameters.
|
|
433
|
-
* @param {*} [options] Override http request option.
|
|
434
|
-
* @throws {RequiredError}
|
|
435
|
-
* @memberof ExperimentalEndpointsApiGenerated
|
|
436
|
-
*/
|
|
437
|
-
syncBrokerageAuthorizationTransactions(requestParameters, options) {
|
|
438
|
-
return (0, exports.ExperimentalEndpointsApiFp)(this.configuration).syncBrokerageAuthorizationTransactions(requestParameters, options).then((request) => request(this.axios, this.basePath));
|
|
439
|
-
}
|
|
440
|
-
}
|
|
441
|
-
exports.ExperimentalEndpointsApiGenerated = ExperimentalEndpointsApiGenerated;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.ExperimentalEndpointsApi = void 0;
|
|
18
|
-
const experimental_endpoints_api_generated_1 = require("./experimental-endpoints-api-generated");
|
|
19
|
-
__exportStar(require("./experimental-endpoints-api-generated"), exports);
|
|
20
|
-
class ExperimentalEndpointsApi extends experimental_endpoints_api_generated_1.ExperimentalEndpointsApiGenerated {
|
|
21
|
-
}
|
|
22
|
-
exports.ExperimentalEndpointsApi = ExperimentalEndpointsApi;
|