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.
- package/README.md +9 -12
- package/dist/api/portfolio-management-api.d.ts +0 -47
- package/dist/api/portfolio-management-api.js +0 -103
- package/dist/configuration.js +1 -1
- package/dist/models/session-event.d.ts +6 -0
- package/dist/models/symbol.d.ts +7 -0
- package/package.json +4 -1
- package/.konfig/generate-id.txt +0 -1
- package/.konfigignore +0 -3
- package/api/account-information-api-custom.ts +0 -3
- package/api/account-information-api.ts +0 -1062
- package/api/api-disclaimer-api-custom.ts +0 -3
- package/api/api-disclaimer-api.ts +0 -183
- package/api/api-status-api-custom.ts +0 -3
- package/api/api-status-api.ts +0 -128
- package/api/authentication-api-custom.ts +0 -3
- package/api/authentication-api.ts +0 -568
- package/api/connections-api-custom.ts +0 -3
- package/api/connections-api.ts +0 -544
- package/api/error-logs-api-custom.ts +0 -3
- package/api/error-logs-api.ts +0 -174
- package/api/options-api-custom.ts +0 -3
- package/api/options-api.ts +0 -739
- package/api/portfolio-management-api-custom.ts +0 -3
- package/api/portfolio-management-api.ts +0 -3301
- package/api/reference-data-api-custom.ts +0 -3
- package/api/reference-data-api.ts +0 -1031
- package/api/trading-api-custom.ts +0 -3
- package/api/trading-api.ts +0 -1304
- package/api/transactions-and-reporting-api-custom.ts +0 -3
- package/api/transactions-and-reporting-api.ts +0 -408
- package/api.ts +0 -27
- package/base.ts +0 -70
- package/client-custom.ts +0 -5
- package/client.ts +0 -59
- package/common.ts +0 -163
- package/configuration.ts +0 -131
- package/docs/AccountInformationApi.md +0 -469
- package/docs/ApiDisclaimerApi.md +0 -65
- package/docs/ApiStatusApi.md +0 -59
- package/docs/AuthenticationApi.md +0 -293
- package/docs/ConnectionsApi.md +0 -237
- package/docs/ErrorLogsApi.md +0 -63
- package/docs/OptionsApi.md +0 -314
- package/docs/PortfolioManagementApi.md +0 -1786
- package/docs/ReferenceDataApi.md +0 -570
- package/docs/TradingApi.md +0 -600
- package/docs/TransactionsAndReportingApi.md +0 -141
- package/index.test.ts +0 -177
- package/index.ts +0 -18
- package/jest.config.ts +0 -11
- package/models/account-holdings-account.ts +0 -61
- package/models/account-holdings.ts +0 -61
- package/models/account-order-record-status.ts +0 -48
- package/models/account-order-record.ts +0 -151
- package/models/account-simple.ts +0 -52
- package/models/account-sync-status.ts +0 -32
- package/models/account.ts +0 -91
- package/models/action.ts +0 -30
- package/models/apidisclaimer-accept-request.ts +0 -29
- package/models/authentication-login-snap-trade-user200-response.ts +0 -31
- package/models/balance.ts +0 -40
- package/models/brokerage-authorization-type-read-only-brokerage.ts +0 -43
- package/models/brokerage-authorization-type-read-only.ts +0 -68
- package/models/brokerage-authorization-type.ts +0 -39
- package/models/brokerage-authorization.ts +0 -82
- package/models/brokerage-symbol.ts +0 -61
- package/models/brokerage-type.ts +0 -37
- package/models/brokerage.ts +0 -136
- package/models/calculated-trade.ts +0 -40
- package/models/cash-restriction.ts +0 -63
- package/models/connections-session-events200-response-inner.ts +0 -25
- package/models/currency.ts +0 -43
- package/models/delete-user-response.ts +0 -37
- package/models/dividend-at-date.ts +0 -43
- package/models/encrypted-response-encrypted-message-data.ts +0 -43
- package/models/encrypted-response.ts +0 -38
- package/models/exchange-rate-pairs.ts +0 -46
- package/models/exchange.ts +0 -73
- package/models/excluded-asset.ts +0 -34
- package/models/index.ts +0 -109
- package/models/jwt.ts +0 -31
- package/models/login-redirect-uri.ts +0 -35
- package/models/manual-trade-and-impact.ts +0 -49
- package/models/manual-trade-balance.ts +0 -49
- package/models/manual-trade-form.ts +0 -80
- package/models/manual-trade-symbol.ts +0 -64
- package/models/manual-trade.ts +0 -88
- package/models/model-asset-class-details.ts +0 -41
- package/models/model-asset-class-target.ts +0 -34
- package/models/model-asset-class.ts +0 -37
- package/models/model-portfolio-asset-class.ts +0 -40
- package/models/model-portfolio-details.ts +0 -50
- package/models/model-portfolio-security.ts +0 -40
- package/models/model-portfolio.ts +0 -52
- package/models/model400-failed-request-response.ts +0 -37
- package/models/model401-failed-request-response.ts +0 -37
- package/models/model403-failed-request-response.ts +0 -37
- package/models/model404-failed-request-response.ts +0 -37
- package/models/monthly-dividends.ts +0 -40
- package/models/net-contributions.ts +0 -43
- package/models/net-dividend.ts +0 -46
- package/models/option-chain-inner-chain-per-root-inner-chain-per-strike-price-inner.ts +0 -43
- package/models/option-chain-inner-chain-per-root-inner.ts +0 -46
- package/models/option-chain-inner.ts +0 -58
- package/models/option-leg.ts +0 -53
- package/models/option-strategy-legs-inner.ts +0 -47
- package/models/option-strategy.ts +0 -61
- package/models/options-get-option-strategy-request.ts +0 -51
- package/models/options-holdings.ts +0 -67
- package/models/options-place-option-strategy-request.ts +0 -57
- package/models/options-position.ts +0 -73
- package/models/options-symbol.ts +0 -94
- package/models/order-type.ts +0 -32
- package/models/partner-data.ts +0 -100
- package/models/past-value.ts +0 -43
- package/models/performance-custom.ts +0 -154
- package/models/portfolio-group-info.ts +0 -115
- package/models/portfolio-group-position.ts +0 -46
- package/models/portfolio-group-settings.ts +0 -58
- package/models/portfolio-group.ts +0 -37
- package/models/position-symbol.ts +0 -64
- package/models/position.ts +0 -64
- package/models/redirect-tokenand-pin.ts +0 -37
- package/models/security-type.ts +0 -49
- package/models/session-event.ts +0 -74
- package/models/snap-trade-apidisclaimer-accept-status.ts +0 -37
- package/models/snap-trade-holdings-account-account-id.ts +0 -82
- package/models/snap-trade-holdings-account.ts +0 -79
- package/models/snap-trade-holdings-total-value.ts +0 -37
- package/models/snap-trade-login-user-request-body.ts +0 -61
- package/models/snap-trade-register-user-request-body.ts +0 -35
- package/models/status.ts +0 -43
- package/models/strategy-impact-legs-inner.ts +0 -67
- package/models/strategy-impact.ts +0 -94
- package/models/strategy-order-place-orders-inner-legs-inner.ts +0 -67
- package/models/strategy-order-place-orders-inner.ts +0 -286
- package/models/strategy-order-place.ts +0 -40
- package/models/strategy-order-record.ts +0 -133
- package/models/strategy-quotes-greek.ts +0 -55
- package/models/strategy-quotes.ts +0 -67
- package/models/sub-period-return-rate.ts +0 -43
- package/models/symbol-query.ts +0 -29
- package/models/symbol.ts +0 -67
- package/models/symbols-quotes.ts +0 -64
- package/models/target-asset.ts +0 -62
- package/models/time-in-force.ts +0 -31
- package/models/trade-execution-status.ts +0 -105
- package/models/trade-impact.ts +0 -61
- package/models/trade.ts +0 -88
- package/models/trading-cancel-user-account-order-request.ts +0 -29
- package/models/trading-place-ocoorder-request.ts +0 -35
- package/models/transactions-status.ts +0 -35
- package/models/underlying-symbol.ts +0 -76
- package/models/universal-activity.ts +0 -127
- package/models/universal-symbol-ticker.ts +0 -82
- package/models/universal-symbol.ts +0 -80
- package/models/user-error-log.ts +0 -61
- package/models/user-idand-secret.ts +0 -37
- package/models/user-settings.ts +0 -88
- package/models/usexchange.ts +0 -79
- package/pagination/page-types.ts +0 -34
- package/pagination/page.ts +0 -58
- package/pagination/pageable.ts +0 -113
- package/pagination/paginate.ts +0 -41
- package/requestAfterHook.ts +0 -53
- package/requestBeforeHook.ts +0 -15
- package/tsconfig.json +0 -22
- package/tsconfig.test.json +0 -6
package/api/trading-api.ts
DELETED
|
@@ -1,1304 +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
|
-
import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
|
|
16
|
-
import { Configuration } from '../configuration';
|
|
17
|
-
// Some imports not used depending on template conditions
|
|
18
|
-
// @ts-ignore
|
|
19
|
-
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
|
|
20
|
-
// @ts-ignore
|
|
21
|
-
import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
|
|
22
|
-
// @ts-ignore
|
|
23
|
-
import { Account } from '../models';
|
|
24
|
-
// @ts-ignore
|
|
25
|
-
import { AccountOrderRecord } from '../models';
|
|
26
|
-
// @ts-ignore
|
|
27
|
-
import { Action } from '../models';
|
|
28
|
-
// @ts-ignore
|
|
29
|
-
import { BrokerageSymbol } from '../models';
|
|
30
|
-
// @ts-ignore
|
|
31
|
-
import { ManualTradeAndImpact } from '../models';
|
|
32
|
-
// @ts-ignore
|
|
33
|
-
import { ManualTradeForm } from '../models';
|
|
34
|
-
// @ts-ignore
|
|
35
|
-
import { Model400FailedRequestResponse } from '../models';
|
|
36
|
-
// @ts-ignore
|
|
37
|
-
import { Model403FailedRequestResponse } from '../models';
|
|
38
|
-
// @ts-ignore
|
|
39
|
-
import { OrderType } from '../models';
|
|
40
|
-
// @ts-ignore
|
|
41
|
-
import { SymbolsQuotes } from '../models';
|
|
42
|
-
// @ts-ignore
|
|
43
|
-
import { TimeInForce } from '../models';
|
|
44
|
-
// @ts-ignore
|
|
45
|
-
import { Trade } from '../models';
|
|
46
|
-
// @ts-ignore
|
|
47
|
-
import { TradeExecutionStatus } from '../models';
|
|
48
|
-
// @ts-ignore
|
|
49
|
-
import { TradeImpact } from '../models';
|
|
50
|
-
// @ts-ignore
|
|
51
|
-
import { TradingCancelUserAccountOrderRequest } from '../models';
|
|
52
|
-
// @ts-ignore
|
|
53
|
-
import { TradingPlaceOCOOrderRequest } from '../models';
|
|
54
|
-
// @ts-ignore
|
|
55
|
-
import { UniversalSymbol } from '../models';
|
|
56
|
-
import { paginate } from "../pagination/paginate";
|
|
57
|
-
import { requestBeforeHook } from '../requestBeforeHook';
|
|
58
|
-
import { TradingApiCustom } from "./trading-api-custom";
|
|
59
|
-
/**
|
|
60
|
-
* TradingApi - axios parameter creator
|
|
61
|
-
* @export
|
|
62
|
-
*/
|
|
63
|
-
export const TradingApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
64
|
-
return {
|
|
65
|
-
/**
|
|
66
|
-
*
|
|
67
|
-
* @summary Cancel open order in account
|
|
68
|
-
* @param {string} userId
|
|
69
|
-
* @param {string} userSecret
|
|
70
|
-
* @param {string} accountId The ID of the account get positions.
|
|
71
|
-
* @param {TradingCancelUserAccountOrderRequest} tradingCancelUserAccountOrderRequest The Order ID to be canceled
|
|
72
|
-
* @param {*} [options] Override http request option.
|
|
73
|
-
* @throws {RequiredError}
|
|
74
|
-
*/
|
|
75
|
-
cancelUserAccountOrder: async (userId: string, userSecret: string, accountId: string, tradingCancelUserAccountOrderRequest: TradingCancelUserAccountOrderRequest, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
76
|
-
// verify required parameter 'userId' is not null or undefined
|
|
77
|
-
assertParamExists('cancelUserAccountOrder', 'userId', userId)
|
|
78
|
-
// verify required parameter 'userSecret' is not null or undefined
|
|
79
|
-
assertParamExists('cancelUserAccountOrder', 'userSecret', userSecret)
|
|
80
|
-
// verify required parameter 'accountId' is not null or undefined
|
|
81
|
-
assertParamExists('cancelUserAccountOrder', 'accountId', accountId)
|
|
82
|
-
// verify required parameter 'tradingCancelUserAccountOrderRequest' is not null or undefined
|
|
83
|
-
assertParamExists('cancelUserAccountOrder', 'tradingCancelUserAccountOrderRequest', tradingCancelUserAccountOrderRequest)
|
|
84
|
-
const localVarPath = `/accounts/{accountId}/orders/cancel`
|
|
85
|
-
.replace(`{${"accountId"}}`, encodeURIComponent(String(accountId)));
|
|
86
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
87
|
-
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
88
|
-
let baseOptions;
|
|
89
|
-
if (configuration) {
|
|
90
|
-
baseOptions = configuration.baseOptions;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
const localVarRequestOptions: AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
|
|
94
|
-
const localVarHeaderParameter = configuration ? { "User-Agent": configuration.userAgent } : {} as any;
|
|
95
|
-
const localVarQueryParameter = {} as any;
|
|
96
|
-
|
|
97
|
-
// authentication PartnerClientId required
|
|
98
|
-
await setApiKeyToObject({object: localVarQueryParameter, keyParamName: "clientId", configuration})
|
|
99
|
-
// authentication PartnerSignature required
|
|
100
|
-
await setApiKeyToObject({ object: localVarHeaderParameter, keyParamName: "Signature", configuration })
|
|
101
|
-
// authentication PartnerTimestamp required
|
|
102
|
-
await setApiKeyToObject({object: localVarQueryParameter, keyParamName: "timestamp", configuration})
|
|
103
|
-
if (userId !== undefined) {
|
|
104
|
-
localVarQueryParameter['userId'] = userId;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
if (userSecret !== undefined) {
|
|
108
|
-
localVarQueryParameter['userSecret'] = userSecret;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
114
|
-
|
|
115
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
116
|
-
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
117
|
-
requestBeforeHook({
|
|
118
|
-
requestBody: tradingCancelUserAccountOrderRequest,
|
|
119
|
-
queryParameters: localVarQueryParameter,
|
|
120
|
-
requestConfig: localVarRequestOptions,
|
|
121
|
-
path: localVarPath,
|
|
122
|
-
configuration
|
|
123
|
-
});
|
|
124
|
-
localVarRequestOptions.data = serializeDataIfNeeded(tradingCancelUserAccountOrderRequest, localVarRequestOptions, configuration)
|
|
125
|
-
|
|
126
|
-
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
127
|
-
return {
|
|
128
|
-
url: toPathString(localVarUrlObj),
|
|
129
|
-
options: localVarRequestOptions,
|
|
130
|
-
};
|
|
131
|
-
},
|
|
132
|
-
/**
|
|
133
|
-
*
|
|
134
|
-
* @summary Return details of a specific trade before it\'s placed
|
|
135
|
-
* @param {string} portfolioGroupId The ID of the PortfolioGroup to perform rebalancing calculations
|
|
136
|
-
* @param {string} calculatedTradeId The ID of calculated trade to get account impact
|
|
137
|
-
* @param {string} tradeId The ID of trade object
|
|
138
|
-
* @param {*} [options] Override http request option.
|
|
139
|
-
* @throws {RequiredError}
|
|
140
|
-
*/
|
|
141
|
-
getCalculatedTradeImpactById: async (portfolioGroupId: string, calculatedTradeId: string, tradeId: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
142
|
-
// verify required parameter 'portfolioGroupId' is not null or undefined
|
|
143
|
-
assertParamExists('getCalculatedTradeImpactById', 'portfolioGroupId', portfolioGroupId)
|
|
144
|
-
// verify required parameter 'calculatedTradeId' is not null or undefined
|
|
145
|
-
assertParamExists('getCalculatedTradeImpactById', 'calculatedTradeId', calculatedTradeId)
|
|
146
|
-
// verify required parameter 'tradeId' is not null or undefined
|
|
147
|
-
assertParamExists('getCalculatedTradeImpactById', 'tradeId', tradeId)
|
|
148
|
-
const localVarPath = `/portfolioGroups/{portfolioGroupId}/calculatedtrades/{calculatedTradeId}/modify/{tradeId}`
|
|
149
|
-
.replace(`{${"portfolioGroupId"}}`, encodeURIComponent(String(portfolioGroupId)))
|
|
150
|
-
.replace(`{${"calculatedTradeId"}}`, encodeURIComponent(String(calculatedTradeId)))
|
|
151
|
-
.replace(`{${"tradeId"}}`, encodeURIComponent(String(tradeId)));
|
|
152
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
153
|
-
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
154
|
-
let baseOptions;
|
|
155
|
-
if (configuration) {
|
|
156
|
-
baseOptions = configuration.baseOptions;
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
const localVarRequestOptions: AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
|
|
160
|
-
const localVarHeaderParameter = configuration ? { "User-Agent": configuration.userAgent } : {} as any;
|
|
161
|
-
const localVarQueryParameter = {} as any;
|
|
162
|
-
|
|
163
|
-
// authentication PartnerClientId required
|
|
164
|
-
await setApiKeyToObject({object: localVarQueryParameter, keyParamName: "clientId", configuration})
|
|
165
|
-
// authentication PartnerSignature required
|
|
166
|
-
await setApiKeyToObject({ object: localVarHeaderParameter, keyParamName: "Signature", configuration })
|
|
167
|
-
// authentication PartnerTimestamp required
|
|
168
|
-
await setApiKeyToObject({object: localVarQueryParameter, keyParamName: "timestamp", configuration})
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
172
|
-
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
173
|
-
requestBeforeHook({
|
|
174
|
-
queryParameters: localVarQueryParameter,
|
|
175
|
-
requestConfig: localVarRequestOptions,
|
|
176
|
-
path: localVarPath,
|
|
177
|
-
configuration
|
|
178
|
-
});
|
|
179
|
-
|
|
180
|
-
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
181
|
-
return {
|
|
182
|
-
url: toPathString(localVarUrlObj),
|
|
183
|
-
options: localVarRequestOptions,
|
|
184
|
-
};
|
|
185
|
-
},
|
|
186
|
-
/**
|
|
187
|
-
*
|
|
188
|
-
* @summary Return the impact of placing a series of trades on the portfolio
|
|
189
|
-
* @param {string} portfolioGroupId The ID of the PortfolioGroup to perform rebalancing calculations
|
|
190
|
-
* @param {string} calculatedTradeId The ID of calculated trade to get account impact
|
|
191
|
-
* @param {*} [options] Override http request option.
|
|
192
|
-
* @throws {RequiredError}
|
|
193
|
-
*/
|
|
194
|
-
getCalculatedTradesImpact: async (portfolioGroupId: string, calculatedTradeId: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
195
|
-
// verify required parameter 'portfolioGroupId' is not null or undefined
|
|
196
|
-
assertParamExists('getCalculatedTradesImpact', 'portfolioGroupId', portfolioGroupId)
|
|
197
|
-
// verify required parameter 'calculatedTradeId' is not null or undefined
|
|
198
|
-
assertParamExists('getCalculatedTradesImpact', 'calculatedTradeId', calculatedTradeId)
|
|
199
|
-
const localVarPath = `/portfolioGroups/{portfolioGroupId}/calculatedtrades/{calculatedTradeId}/impact`
|
|
200
|
-
.replace(`{${"portfolioGroupId"}}`, encodeURIComponent(String(portfolioGroupId)))
|
|
201
|
-
.replace(`{${"calculatedTradeId"}}`, encodeURIComponent(String(calculatedTradeId)));
|
|
202
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
203
|
-
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
204
|
-
let baseOptions;
|
|
205
|
-
if (configuration) {
|
|
206
|
-
baseOptions = configuration.baseOptions;
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
const localVarRequestOptions: AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
|
|
210
|
-
const localVarHeaderParameter = configuration ? { "User-Agent": configuration.userAgent } : {} as any;
|
|
211
|
-
const localVarQueryParameter = {} as any;
|
|
212
|
-
|
|
213
|
-
// authentication PartnerClientId required
|
|
214
|
-
await setApiKeyToObject({object: localVarQueryParameter, keyParamName: "clientId", configuration})
|
|
215
|
-
// authentication PartnerSignature required
|
|
216
|
-
await setApiKeyToObject({ object: localVarHeaderParameter, keyParamName: "Signature", configuration })
|
|
217
|
-
// authentication PartnerTimestamp required
|
|
218
|
-
await setApiKeyToObject({object: localVarQueryParameter, keyParamName: "timestamp", configuration})
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
222
|
-
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
223
|
-
requestBeforeHook({
|
|
224
|
-
queryParameters: localVarQueryParameter,
|
|
225
|
-
requestConfig: localVarRequestOptions,
|
|
226
|
-
path: localVarPath,
|
|
227
|
-
configuration
|
|
228
|
-
});
|
|
229
|
-
|
|
230
|
-
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
231
|
-
return {
|
|
232
|
-
url: toPathString(localVarUrlObj),
|
|
233
|
-
options: localVarRequestOptions,
|
|
234
|
-
};
|
|
235
|
-
},
|
|
236
|
-
/**
|
|
237
|
-
*
|
|
238
|
-
* @summary Check impact of trades on account.
|
|
239
|
-
* @param {string} userId
|
|
240
|
-
* @param {string} userSecret
|
|
241
|
-
* @param {ManualTradeForm} manualTradeForm
|
|
242
|
-
* @param {*} [options] Override http request option.
|
|
243
|
-
* @throws {RequiredError}
|
|
244
|
-
*/
|
|
245
|
-
getOrderImpact: async (userId: string, userSecret: string, manualTradeForm: ManualTradeForm, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
246
|
-
// verify required parameter 'userId' is not null or undefined
|
|
247
|
-
assertParamExists('getOrderImpact', 'userId', userId)
|
|
248
|
-
// verify required parameter 'userSecret' is not null or undefined
|
|
249
|
-
assertParamExists('getOrderImpact', 'userSecret', userSecret)
|
|
250
|
-
// verify required parameter 'manualTradeForm' is not null or undefined
|
|
251
|
-
assertParamExists('getOrderImpact', 'manualTradeForm', manualTradeForm)
|
|
252
|
-
const localVarPath = `/trade/impact`;
|
|
253
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
254
|
-
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
255
|
-
let baseOptions;
|
|
256
|
-
if (configuration) {
|
|
257
|
-
baseOptions = configuration.baseOptions;
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
const localVarRequestOptions: AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
|
|
261
|
-
const localVarHeaderParameter = configuration ? { "User-Agent": configuration.userAgent } : {} as any;
|
|
262
|
-
const localVarQueryParameter = {} as any;
|
|
263
|
-
|
|
264
|
-
// authentication PartnerClientId required
|
|
265
|
-
await setApiKeyToObject({object: localVarQueryParameter, keyParamName: "clientId", configuration})
|
|
266
|
-
// authentication PartnerSignature required
|
|
267
|
-
await setApiKeyToObject({ object: localVarHeaderParameter, keyParamName: "Signature", configuration })
|
|
268
|
-
// authentication PartnerTimestamp required
|
|
269
|
-
await setApiKeyToObject({object: localVarQueryParameter, keyParamName: "timestamp", configuration})
|
|
270
|
-
if (userId !== undefined) {
|
|
271
|
-
localVarQueryParameter['userId'] = userId;
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
if (userSecret !== undefined) {
|
|
275
|
-
localVarQueryParameter['userSecret'] = userSecret;
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
281
|
-
|
|
282
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
283
|
-
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
284
|
-
requestBeforeHook({
|
|
285
|
-
requestBody: manualTradeForm,
|
|
286
|
-
queryParameters: localVarQueryParameter,
|
|
287
|
-
requestConfig: localVarRequestOptions,
|
|
288
|
-
path: localVarPath,
|
|
289
|
-
configuration
|
|
290
|
-
});
|
|
291
|
-
localVarRequestOptions.data = serializeDataIfNeeded(manualTradeForm, localVarRequestOptions, configuration)
|
|
292
|
-
|
|
293
|
-
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
294
|
-
return {
|
|
295
|
-
url: toPathString(localVarUrlObj),
|
|
296
|
-
options: localVarRequestOptions,
|
|
297
|
-
};
|
|
298
|
-
},
|
|
299
|
-
/**
|
|
300
|
-
*
|
|
301
|
-
* @summary Get symbol quotes
|
|
302
|
-
* @param {string} userId
|
|
303
|
-
* @param {string} userSecret
|
|
304
|
-
* @param {string} symbols List of universal_symbol_id or tickers to get quotes for.
|
|
305
|
-
* @param {string} accountId The ID of the account to get quotes.
|
|
306
|
-
* @param {boolean} [useTicker] Should be set to True if providing tickers.
|
|
307
|
-
* @param {*} [options] Override http request option.
|
|
308
|
-
* @throws {RequiredError}
|
|
309
|
-
*/
|
|
310
|
-
getUserAccountQuotes: async (userId: string, userSecret: string, symbols: string, accountId: string, useTicker?: boolean, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
311
|
-
// verify required parameter 'userId' is not null or undefined
|
|
312
|
-
assertParamExists('getUserAccountQuotes', 'userId', userId)
|
|
313
|
-
// verify required parameter 'userSecret' is not null or undefined
|
|
314
|
-
assertParamExists('getUserAccountQuotes', 'userSecret', userSecret)
|
|
315
|
-
// verify required parameter 'symbols' is not null or undefined
|
|
316
|
-
assertParamExists('getUserAccountQuotes', 'symbols', symbols)
|
|
317
|
-
// verify required parameter 'accountId' is not null or undefined
|
|
318
|
-
assertParamExists('getUserAccountQuotes', 'accountId', accountId)
|
|
319
|
-
const localVarPath = `/accounts/{accountId}/quotes`
|
|
320
|
-
.replace(`{${"accountId"}}`, encodeURIComponent(String(accountId)));
|
|
321
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
322
|
-
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
323
|
-
let baseOptions;
|
|
324
|
-
if (configuration) {
|
|
325
|
-
baseOptions = configuration.baseOptions;
|
|
326
|
-
}
|
|
327
|
-
|
|
328
|
-
const localVarRequestOptions: AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
|
|
329
|
-
const localVarHeaderParameter = configuration ? { "User-Agent": configuration.userAgent } : {} as any;
|
|
330
|
-
const localVarQueryParameter = {} as any;
|
|
331
|
-
|
|
332
|
-
// authentication PartnerClientId required
|
|
333
|
-
await setApiKeyToObject({object: localVarQueryParameter, keyParamName: "clientId", configuration})
|
|
334
|
-
// authentication PartnerSignature required
|
|
335
|
-
await setApiKeyToObject({ object: localVarHeaderParameter, keyParamName: "Signature", configuration })
|
|
336
|
-
// authentication PartnerTimestamp required
|
|
337
|
-
await setApiKeyToObject({object: localVarQueryParameter, keyParamName: "timestamp", configuration})
|
|
338
|
-
if (userId !== undefined) {
|
|
339
|
-
localVarQueryParameter['userId'] = userId;
|
|
340
|
-
}
|
|
341
|
-
|
|
342
|
-
if (userSecret !== undefined) {
|
|
343
|
-
localVarQueryParameter['userSecret'] = userSecret;
|
|
344
|
-
}
|
|
345
|
-
|
|
346
|
-
if (symbols !== undefined) {
|
|
347
|
-
localVarQueryParameter['symbols'] = symbols;
|
|
348
|
-
}
|
|
349
|
-
|
|
350
|
-
if (useTicker !== undefined) {
|
|
351
|
-
localVarQueryParameter['use_ticker'] = useTicker;
|
|
352
|
-
}
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
357
|
-
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
358
|
-
requestBeforeHook({
|
|
359
|
-
queryParameters: localVarQueryParameter,
|
|
360
|
-
requestConfig: localVarRequestOptions,
|
|
361
|
-
path: localVarPath,
|
|
362
|
-
configuration
|
|
363
|
-
});
|
|
364
|
-
|
|
365
|
-
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
366
|
-
return {
|
|
367
|
-
url: toPathString(localVarUrlObj),
|
|
368
|
-
options: localVarRequestOptions,
|
|
369
|
-
};
|
|
370
|
-
},
|
|
371
|
-
/**
|
|
372
|
-
*
|
|
373
|
-
* @summary Modify units of a trade before it is placed
|
|
374
|
-
* @param {string} portfolioGroupId The ID of the PortfolioGroup to perform rebalancing calculations
|
|
375
|
-
* @param {string} calculatedTradeId The ID of calculated trade to get account impact
|
|
376
|
-
* @param {string} tradeId The ID of trade object
|
|
377
|
-
* @param {Trade} [trade]
|
|
378
|
-
* @param {*} [options] Override http request option.
|
|
379
|
-
* @throws {RequiredError}
|
|
380
|
-
*/
|
|
381
|
-
modifyCalculatedTradeById: async (portfolioGroupId: string, calculatedTradeId: string, tradeId: string, trade?: Trade, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
382
|
-
// verify required parameter 'portfolioGroupId' is not null or undefined
|
|
383
|
-
assertParamExists('modifyCalculatedTradeById', 'portfolioGroupId', portfolioGroupId)
|
|
384
|
-
// verify required parameter 'calculatedTradeId' is not null or undefined
|
|
385
|
-
assertParamExists('modifyCalculatedTradeById', 'calculatedTradeId', calculatedTradeId)
|
|
386
|
-
// verify required parameter 'tradeId' is not null or undefined
|
|
387
|
-
assertParamExists('modifyCalculatedTradeById', 'tradeId', tradeId)
|
|
388
|
-
const localVarPath = `/portfolioGroups/{portfolioGroupId}/calculatedtrades/{calculatedTradeId}/modify/{tradeId}`
|
|
389
|
-
.replace(`{${"portfolioGroupId"}}`, encodeURIComponent(String(portfolioGroupId)))
|
|
390
|
-
.replace(`{${"calculatedTradeId"}}`, encodeURIComponent(String(calculatedTradeId)))
|
|
391
|
-
.replace(`{${"tradeId"}}`, encodeURIComponent(String(tradeId)));
|
|
392
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
393
|
-
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
394
|
-
let baseOptions;
|
|
395
|
-
if (configuration) {
|
|
396
|
-
baseOptions = configuration.baseOptions;
|
|
397
|
-
}
|
|
398
|
-
|
|
399
|
-
const localVarRequestOptions: AxiosRequestConfig = { method: 'PATCH', ...baseOptions, ...options};
|
|
400
|
-
const localVarHeaderParameter = configuration ? { "User-Agent": configuration.userAgent } : {} as any;
|
|
401
|
-
const localVarQueryParameter = {} as any;
|
|
402
|
-
|
|
403
|
-
// authentication PartnerClientId required
|
|
404
|
-
await setApiKeyToObject({object: localVarQueryParameter, keyParamName: "clientId", configuration})
|
|
405
|
-
// authentication PartnerSignature required
|
|
406
|
-
await setApiKeyToObject({ object: localVarHeaderParameter, keyParamName: "Signature", configuration })
|
|
407
|
-
// authentication PartnerTimestamp required
|
|
408
|
-
await setApiKeyToObject({object: localVarQueryParameter, keyParamName: "timestamp", configuration})
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
412
|
-
|
|
413
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
414
|
-
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
415
|
-
requestBeforeHook({
|
|
416
|
-
requestBody: trade,
|
|
417
|
-
queryParameters: localVarQueryParameter,
|
|
418
|
-
requestConfig: localVarRequestOptions,
|
|
419
|
-
path: localVarPath,
|
|
420
|
-
configuration
|
|
421
|
-
});
|
|
422
|
-
localVarRequestOptions.data = serializeDataIfNeeded(trade, localVarRequestOptions, configuration)
|
|
423
|
-
|
|
424
|
-
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
425
|
-
return {
|
|
426
|
-
url: toPathString(localVarUrlObj),
|
|
427
|
-
options: localVarRequestOptions,
|
|
428
|
-
};
|
|
429
|
-
},
|
|
430
|
-
/**
|
|
431
|
-
*
|
|
432
|
-
* @summary Place orders for the CalculatedTrades in series
|
|
433
|
-
* @param {string} portfolioGroupId The ID of the PortfolioGroup to perform rebalancing calculations
|
|
434
|
-
* @param {string} calculatedTradeId The ID of calculated trade to get account impact
|
|
435
|
-
* @param {*} [options] Override http request option.
|
|
436
|
-
* @throws {RequiredError}
|
|
437
|
-
*/
|
|
438
|
-
placeCalculatedTrades: async (portfolioGroupId: string, calculatedTradeId: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
439
|
-
// verify required parameter 'portfolioGroupId' is not null or undefined
|
|
440
|
-
assertParamExists('placeCalculatedTrades', 'portfolioGroupId', portfolioGroupId)
|
|
441
|
-
// verify required parameter 'calculatedTradeId' is not null or undefined
|
|
442
|
-
assertParamExists('placeCalculatedTrades', 'calculatedTradeId', calculatedTradeId)
|
|
443
|
-
const localVarPath = `/portfolioGroups/{portfolioGroupId}/calculatedtrades/{calculatedTradeId}/placeOrders`
|
|
444
|
-
.replace(`{${"portfolioGroupId"}}`, encodeURIComponent(String(portfolioGroupId)))
|
|
445
|
-
.replace(`{${"calculatedTradeId"}}`, encodeURIComponent(String(calculatedTradeId)));
|
|
446
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
447
|
-
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
448
|
-
let baseOptions;
|
|
449
|
-
if (configuration) {
|
|
450
|
-
baseOptions = configuration.baseOptions;
|
|
451
|
-
}
|
|
452
|
-
|
|
453
|
-
const localVarRequestOptions: AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
|
|
454
|
-
const localVarHeaderParameter = configuration ? { "User-Agent": configuration.userAgent } : {} as any;
|
|
455
|
-
const localVarQueryParameter = {} as any;
|
|
456
|
-
|
|
457
|
-
// authentication PartnerClientId required
|
|
458
|
-
await setApiKeyToObject({object: localVarQueryParameter, keyParamName: "clientId", configuration})
|
|
459
|
-
// authentication PartnerSignature required
|
|
460
|
-
await setApiKeyToObject({ object: localVarHeaderParameter, keyParamName: "Signature", configuration })
|
|
461
|
-
// authentication PartnerTimestamp required
|
|
462
|
-
await setApiKeyToObject({object: localVarQueryParameter, keyParamName: "timestamp", configuration})
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
466
|
-
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
467
|
-
requestBeforeHook({
|
|
468
|
-
queryParameters: localVarQueryParameter,
|
|
469
|
-
requestConfig: localVarRequestOptions,
|
|
470
|
-
path: localVarPath,
|
|
471
|
-
configuration
|
|
472
|
-
});
|
|
473
|
-
|
|
474
|
-
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
475
|
-
return {
|
|
476
|
-
url: toPathString(localVarUrlObj),
|
|
477
|
-
options: localVarRequestOptions,
|
|
478
|
-
};
|
|
479
|
-
},
|
|
480
|
-
/**
|
|
481
|
-
*
|
|
482
|
-
* @summary Place a trade with NO validation.
|
|
483
|
-
* @param {string} userId
|
|
484
|
-
* @param {string} userSecret
|
|
485
|
-
* @param {ManualTradeForm} manualTradeForm
|
|
486
|
-
* @param {*} [options] Override http request option.
|
|
487
|
-
* @throws {RequiredError}
|
|
488
|
-
*/
|
|
489
|
-
placeForceOrder: async (userId: string, userSecret: string, manualTradeForm: ManualTradeForm, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
490
|
-
// verify required parameter 'userId' is not null or undefined
|
|
491
|
-
assertParamExists('placeForceOrder', 'userId', userId)
|
|
492
|
-
// verify required parameter 'userSecret' is not null or undefined
|
|
493
|
-
assertParamExists('placeForceOrder', 'userSecret', userSecret)
|
|
494
|
-
// verify required parameter 'manualTradeForm' is not null or undefined
|
|
495
|
-
assertParamExists('placeForceOrder', 'manualTradeForm', manualTradeForm)
|
|
496
|
-
const localVarPath = `/trade/place`;
|
|
497
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
498
|
-
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
499
|
-
let baseOptions;
|
|
500
|
-
if (configuration) {
|
|
501
|
-
baseOptions = configuration.baseOptions;
|
|
502
|
-
}
|
|
503
|
-
|
|
504
|
-
const localVarRequestOptions: AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
|
|
505
|
-
const localVarHeaderParameter = configuration ? { "User-Agent": configuration.userAgent } : {} as any;
|
|
506
|
-
const localVarQueryParameter = {} as any;
|
|
507
|
-
|
|
508
|
-
// authentication PartnerClientId required
|
|
509
|
-
await setApiKeyToObject({object: localVarQueryParameter, keyParamName: "clientId", configuration})
|
|
510
|
-
// authentication PartnerSignature required
|
|
511
|
-
await setApiKeyToObject({ object: localVarHeaderParameter, keyParamName: "Signature", configuration })
|
|
512
|
-
// authentication PartnerTimestamp required
|
|
513
|
-
await setApiKeyToObject({object: localVarQueryParameter, keyParamName: "timestamp", configuration})
|
|
514
|
-
if (userId !== undefined) {
|
|
515
|
-
localVarQueryParameter['userId'] = userId;
|
|
516
|
-
}
|
|
517
|
-
|
|
518
|
-
if (userSecret !== undefined) {
|
|
519
|
-
localVarQueryParameter['userSecret'] = userSecret;
|
|
520
|
-
}
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
525
|
-
|
|
526
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
527
|
-
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
528
|
-
requestBeforeHook({
|
|
529
|
-
requestBody: manualTradeForm,
|
|
530
|
-
queryParameters: localVarQueryParameter,
|
|
531
|
-
requestConfig: localVarRequestOptions,
|
|
532
|
-
path: localVarPath,
|
|
533
|
-
configuration
|
|
534
|
-
});
|
|
535
|
-
localVarRequestOptions.data = serializeDataIfNeeded(manualTradeForm, localVarRequestOptions, configuration)
|
|
536
|
-
|
|
537
|
-
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
538
|
-
return {
|
|
539
|
-
url: toPathString(localVarUrlObj),
|
|
540
|
-
options: localVarRequestOptions,
|
|
541
|
-
};
|
|
542
|
-
},
|
|
543
|
-
/**
|
|
544
|
-
*
|
|
545
|
-
* @summary Place a OCO (One Cancels Other) order
|
|
546
|
-
* @param {string} userId
|
|
547
|
-
* @param {string} userSecret
|
|
548
|
-
* @param {TradingPlaceOCOOrderRequest} tradingPlaceOCOOrderRequest
|
|
549
|
-
* @param {*} [options] Override http request option.
|
|
550
|
-
* @throws {RequiredError}
|
|
551
|
-
*/
|
|
552
|
-
placeOCOOrder: async (userId: string, userSecret: string, tradingPlaceOCOOrderRequest: TradingPlaceOCOOrderRequest, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
553
|
-
// verify required parameter 'userId' is not null or undefined
|
|
554
|
-
assertParamExists('placeOCOOrder', 'userId', userId)
|
|
555
|
-
// verify required parameter 'userSecret' is not null or undefined
|
|
556
|
-
assertParamExists('placeOCOOrder', 'userSecret', userSecret)
|
|
557
|
-
// verify required parameter 'tradingPlaceOCOOrderRequest' is not null or undefined
|
|
558
|
-
assertParamExists('placeOCOOrder', 'tradingPlaceOCOOrderRequest', tradingPlaceOCOOrderRequest)
|
|
559
|
-
const localVarPath = `/trade/oco`;
|
|
560
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
561
|
-
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
562
|
-
let baseOptions;
|
|
563
|
-
if (configuration) {
|
|
564
|
-
baseOptions = configuration.baseOptions;
|
|
565
|
-
}
|
|
566
|
-
|
|
567
|
-
const localVarRequestOptions: AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
|
|
568
|
-
const localVarHeaderParameter = configuration ? { "User-Agent": configuration.userAgent } : {} as any;
|
|
569
|
-
const localVarQueryParameter = {} as any;
|
|
570
|
-
|
|
571
|
-
// authentication PartnerClientId required
|
|
572
|
-
await setApiKeyToObject({object: localVarQueryParameter, keyParamName: "clientId", configuration})
|
|
573
|
-
// authentication PartnerSignature required
|
|
574
|
-
await setApiKeyToObject({ object: localVarHeaderParameter, keyParamName: "Signature", configuration })
|
|
575
|
-
// authentication PartnerTimestamp required
|
|
576
|
-
await setApiKeyToObject({object: localVarQueryParameter, keyParamName: "timestamp", configuration})
|
|
577
|
-
if (userId !== undefined) {
|
|
578
|
-
localVarQueryParameter['userId'] = userId;
|
|
579
|
-
}
|
|
580
|
-
|
|
581
|
-
if (userSecret !== undefined) {
|
|
582
|
-
localVarQueryParameter['userSecret'] = userSecret;
|
|
583
|
-
}
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
588
|
-
|
|
589
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
590
|
-
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
591
|
-
requestBeforeHook({
|
|
592
|
-
requestBody: tradingPlaceOCOOrderRequest,
|
|
593
|
-
queryParameters: localVarQueryParameter,
|
|
594
|
-
requestConfig: localVarRequestOptions,
|
|
595
|
-
path: localVarPath,
|
|
596
|
-
configuration
|
|
597
|
-
});
|
|
598
|
-
localVarRequestOptions.data = serializeDataIfNeeded(tradingPlaceOCOOrderRequest, localVarRequestOptions, configuration)
|
|
599
|
-
|
|
600
|
-
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
601
|
-
return {
|
|
602
|
-
url: toPathString(localVarUrlObj),
|
|
603
|
-
options: localVarRequestOptions,
|
|
604
|
-
};
|
|
605
|
-
},
|
|
606
|
-
/**
|
|
607
|
-
*
|
|
608
|
-
* @summary Place order
|
|
609
|
-
* @param {string} tradeId The ID of trade object obtained from trade/impact endpoint
|
|
610
|
-
* @param {string} userId
|
|
611
|
-
* @param {string} userSecret
|
|
612
|
-
* @param {*} [options] Override http request option.
|
|
613
|
-
* @throws {RequiredError}
|
|
614
|
-
*/
|
|
615
|
-
placeOrder: async (tradeId: string, userId: string, userSecret: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
616
|
-
// verify required parameter 'tradeId' is not null or undefined
|
|
617
|
-
assertParamExists('placeOrder', 'tradeId', tradeId)
|
|
618
|
-
// verify required parameter 'userId' is not null or undefined
|
|
619
|
-
assertParamExists('placeOrder', 'userId', userId)
|
|
620
|
-
// verify required parameter 'userSecret' is not null or undefined
|
|
621
|
-
assertParamExists('placeOrder', 'userSecret', userSecret)
|
|
622
|
-
const localVarPath = `/trade/{tradeId}`
|
|
623
|
-
.replace(`{${"tradeId"}}`, encodeURIComponent(String(tradeId)));
|
|
624
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
625
|
-
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
626
|
-
let baseOptions;
|
|
627
|
-
if (configuration) {
|
|
628
|
-
baseOptions = configuration.baseOptions;
|
|
629
|
-
}
|
|
630
|
-
|
|
631
|
-
const localVarRequestOptions: AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
|
|
632
|
-
const localVarHeaderParameter = configuration ? { "User-Agent": configuration.userAgent } : {} as any;
|
|
633
|
-
const localVarQueryParameter = {} as any;
|
|
634
|
-
|
|
635
|
-
// authentication PartnerClientId required
|
|
636
|
-
await setApiKeyToObject({object: localVarQueryParameter, keyParamName: "clientId", configuration})
|
|
637
|
-
// authentication PartnerSignature required
|
|
638
|
-
await setApiKeyToObject({ object: localVarHeaderParameter, keyParamName: "Signature", configuration })
|
|
639
|
-
// authentication PartnerTimestamp required
|
|
640
|
-
await setApiKeyToObject({object: localVarQueryParameter, keyParamName: "timestamp", configuration})
|
|
641
|
-
if (userId !== undefined) {
|
|
642
|
-
localVarQueryParameter['userId'] = userId;
|
|
643
|
-
}
|
|
644
|
-
|
|
645
|
-
if (userSecret !== undefined) {
|
|
646
|
-
localVarQueryParameter['userSecret'] = userSecret;
|
|
647
|
-
}
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
652
|
-
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
653
|
-
requestBeforeHook({
|
|
654
|
-
queryParameters: localVarQueryParameter,
|
|
655
|
-
requestConfig: localVarRequestOptions,
|
|
656
|
-
path: localVarPath,
|
|
657
|
-
configuration
|
|
658
|
-
});
|
|
659
|
-
|
|
660
|
-
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
661
|
-
return {
|
|
662
|
-
url: toPathString(localVarUrlObj),
|
|
663
|
-
options: localVarRequestOptions,
|
|
664
|
-
};
|
|
665
|
-
},
|
|
666
|
-
}
|
|
667
|
-
};
|
|
668
|
-
|
|
669
|
-
/**
|
|
670
|
-
* TradingApi - functional programming interface
|
|
671
|
-
* @export
|
|
672
|
-
*/
|
|
673
|
-
export const TradingApiFp = function(configuration?: Configuration) {
|
|
674
|
-
const localVarAxiosParamCreator = TradingApiAxiosParamCreator(configuration)
|
|
675
|
-
return {
|
|
676
|
-
/**
|
|
677
|
-
*
|
|
678
|
-
* @summary Cancel open order in account
|
|
679
|
-
* @param {TradingApiCancelUserAccountOrderRequest} requestParameters Request parameters.
|
|
680
|
-
* @param {*} [options] Override http request option.
|
|
681
|
-
* @throws {RequiredError}
|
|
682
|
-
*/
|
|
683
|
-
async cancelUserAccountOrder(requestParameters: TradingApiCancelUserAccountOrderRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AccountOrderRecord>> {
|
|
684
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.cancelUserAccountOrder(requestParameters.userId, requestParameters.userSecret, requestParameters.accountId, requestParameters, options);
|
|
685
|
-
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
686
|
-
},
|
|
687
|
-
/**
|
|
688
|
-
*
|
|
689
|
-
* @summary Return details of a specific trade before it\'s placed
|
|
690
|
-
* @param {TradingApiGetCalculatedTradeImpactByIdRequest} requestParameters Request parameters.
|
|
691
|
-
* @param {*} [options] Override http request option.
|
|
692
|
-
* @throws {RequiredError}
|
|
693
|
-
*/
|
|
694
|
-
async getCalculatedTradeImpactById(requestParameters: TradingApiGetCalculatedTradeImpactByIdRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Trade>> {
|
|
695
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.getCalculatedTradeImpactById(requestParameters.portfolioGroupId, requestParameters.calculatedTradeId, requestParameters.tradeId, options);
|
|
696
|
-
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
697
|
-
},
|
|
698
|
-
/**
|
|
699
|
-
*
|
|
700
|
-
* @summary Return the impact of placing a series of trades on the portfolio
|
|
701
|
-
* @param {TradingApiGetCalculatedTradesImpactRequest} requestParameters Request parameters.
|
|
702
|
-
* @param {*} [options] Override http request option.
|
|
703
|
-
* @throws {RequiredError}
|
|
704
|
-
*/
|
|
705
|
-
async getCalculatedTradesImpact(requestParameters: TradingApiGetCalculatedTradesImpactRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<TradeImpact>>> {
|
|
706
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.getCalculatedTradesImpact(requestParameters.portfolioGroupId, requestParameters.calculatedTradeId, options);
|
|
707
|
-
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
708
|
-
},
|
|
709
|
-
/**
|
|
710
|
-
*
|
|
711
|
-
* @summary Check impact of trades on account.
|
|
712
|
-
* @param {TradingApiGetOrderImpactRequest} requestParameters Request parameters.
|
|
713
|
-
* @param {*} [options] Override http request option.
|
|
714
|
-
* @throws {RequiredError}
|
|
715
|
-
*/
|
|
716
|
-
async getOrderImpact(requestParameters: TradingApiGetOrderImpactRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ManualTradeAndImpact>> {
|
|
717
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.getOrderImpact(requestParameters.userId, requestParameters.userSecret, requestParameters, options);
|
|
718
|
-
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
719
|
-
},
|
|
720
|
-
/**
|
|
721
|
-
*
|
|
722
|
-
* @summary Get symbol quotes
|
|
723
|
-
* @param {TradingApiGetUserAccountQuotesRequest} requestParameters Request parameters.
|
|
724
|
-
* @param {*} [options] Override http request option.
|
|
725
|
-
* @throws {RequiredError}
|
|
726
|
-
*/
|
|
727
|
-
async getUserAccountQuotes(requestParameters: TradingApiGetUserAccountQuotesRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SymbolsQuotes>> {
|
|
728
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.getUserAccountQuotes(requestParameters.userId, requestParameters.userSecret, requestParameters.symbols, requestParameters.accountId, requestParameters.useTicker, options);
|
|
729
|
-
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
730
|
-
},
|
|
731
|
-
/**
|
|
732
|
-
*
|
|
733
|
-
* @summary Modify units of a trade before it is placed
|
|
734
|
-
* @param {TradingApiModifyCalculatedTradeByIdRequest} requestParameters Request parameters.
|
|
735
|
-
* @param {*} [options] Override http request option.
|
|
736
|
-
* @throws {RequiredError}
|
|
737
|
-
*/
|
|
738
|
-
async modifyCalculatedTradeById(requestParameters: TradingApiModifyCalculatedTradeByIdRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Trade>> {
|
|
739
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.modifyCalculatedTradeById(requestParameters.portfolioGroupId, requestParameters.calculatedTradeId, requestParameters.tradeId, requestParameters, options);
|
|
740
|
-
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
741
|
-
},
|
|
742
|
-
/**
|
|
743
|
-
*
|
|
744
|
-
* @summary Place orders for the CalculatedTrades in series
|
|
745
|
-
* @param {TradingApiPlaceCalculatedTradesRequest} requestParameters Request parameters.
|
|
746
|
-
* @param {*} [options] Override http request option.
|
|
747
|
-
* @throws {RequiredError}
|
|
748
|
-
*/
|
|
749
|
-
async placeCalculatedTrades(requestParameters: TradingApiPlaceCalculatedTradesRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<TradeExecutionStatus>>> {
|
|
750
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.placeCalculatedTrades(requestParameters.portfolioGroupId, requestParameters.calculatedTradeId, options);
|
|
751
|
-
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
752
|
-
},
|
|
753
|
-
/**
|
|
754
|
-
*
|
|
755
|
-
* @summary Place a trade with NO validation.
|
|
756
|
-
* @param {TradingApiPlaceForceOrderRequest} requestParameters Request parameters.
|
|
757
|
-
* @param {*} [options] Override http request option.
|
|
758
|
-
* @throws {RequiredError}
|
|
759
|
-
*/
|
|
760
|
-
async placeForceOrder(requestParameters: TradingApiPlaceForceOrderRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AccountOrderRecord>> {
|
|
761
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.placeForceOrder(requestParameters.userId, requestParameters.userSecret, requestParameters, options);
|
|
762
|
-
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
763
|
-
},
|
|
764
|
-
/**
|
|
765
|
-
*
|
|
766
|
-
* @summary Place a OCO (One Cancels Other) order
|
|
767
|
-
* @param {TradingApiPlaceOCOOrderRequest} requestParameters Request parameters.
|
|
768
|
-
* @param {*} [options] Override http request option.
|
|
769
|
-
* @throws {RequiredError}
|
|
770
|
-
*/
|
|
771
|
-
async placeOCOOrder(requestParameters: TradingApiPlaceOCOOrderRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AccountOrderRecord>> {
|
|
772
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.placeOCOOrder(requestParameters.userId, requestParameters.userSecret, requestParameters, options);
|
|
773
|
-
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
774
|
-
},
|
|
775
|
-
/**
|
|
776
|
-
*
|
|
777
|
-
* @summary Place order
|
|
778
|
-
* @param {TradingApiPlaceOrderRequest} requestParameters Request parameters.
|
|
779
|
-
* @param {*} [options] Override http request option.
|
|
780
|
-
* @throws {RequiredError}
|
|
781
|
-
*/
|
|
782
|
-
async placeOrder(requestParameters: TradingApiPlaceOrderRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AccountOrderRecord>> {
|
|
783
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.placeOrder(requestParameters.tradeId, requestParameters.userId, requestParameters.userSecret, options);
|
|
784
|
-
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
785
|
-
},
|
|
786
|
-
}
|
|
787
|
-
};
|
|
788
|
-
|
|
789
|
-
/**
|
|
790
|
-
* TradingApi - factory interface
|
|
791
|
-
* @export
|
|
792
|
-
*/
|
|
793
|
-
export const TradingApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
794
|
-
const localVarFp = TradingApiFp(configuration)
|
|
795
|
-
return {
|
|
796
|
-
/**
|
|
797
|
-
*
|
|
798
|
-
* @summary Cancel open order in account
|
|
799
|
-
* @param {TradingApiCancelUserAccountOrderRequest} requestParameters Request parameters.
|
|
800
|
-
* @param {*} [options] Override http request option.
|
|
801
|
-
* @throws {RequiredError}
|
|
802
|
-
*/
|
|
803
|
-
cancelUserAccountOrder(requestParameters: TradingApiCancelUserAccountOrderRequest, options?: AxiosRequestConfig): AxiosPromise<AccountOrderRecord> {
|
|
804
|
-
return localVarFp.cancelUserAccountOrder(requestParameters, options).then((request) => request(axios, basePath));
|
|
805
|
-
},
|
|
806
|
-
/**
|
|
807
|
-
*
|
|
808
|
-
* @summary Return details of a specific trade before it\'s placed
|
|
809
|
-
* @param {TradingApiGetCalculatedTradeImpactByIdRequest} requestParameters Request parameters.
|
|
810
|
-
* @param {*} [options] Override http request option.
|
|
811
|
-
* @throws {RequiredError}
|
|
812
|
-
*/
|
|
813
|
-
getCalculatedTradeImpactById(requestParameters: TradingApiGetCalculatedTradeImpactByIdRequest, options?: AxiosRequestConfig): AxiosPromise<Trade> {
|
|
814
|
-
return localVarFp.getCalculatedTradeImpactById(requestParameters, options).then((request) => request(axios, basePath));
|
|
815
|
-
},
|
|
816
|
-
/**
|
|
817
|
-
*
|
|
818
|
-
* @summary Return the impact of placing a series of trades on the portfolio
|
|
819
|
-
* @param {TradingApiGetCalculatedTradesImpactRequest} requestParameters Request parameters.
|
|
820
|
-
* @param {*} [options] Override http request option.
|
|
821
|
-
* @throws {RequiredError}
|
|
822
|
-
*/
|
|
823
|
-
getCalculatedTradesImpact(requestParameters: TradingApiGetCalculatedTradesImpactRequest, options?: AxiosRequestConfig): AxiosPromise<Array<TradeImpact>> {
|
|
824
|
-
return localVarFp.getCalculatedTradesImpact(requestParameters, options).then((request) => request(axios, basePath));
|
|
825
|
-
},
|
|
826
|
-
/**
|
|
827
|
-
*
|
|
828
|
-
* @summary Check impact of trades on account.
|
|
829
|
-
* @param {TradingApiGetOrderImpactRequest} requestParameters Request parameters.
|
|
830
|
-
* @param {*} [options] Override http request option.
|
|
831
|
-
* @throws {RequiredError}
|
|
832
|
-
*/
|
|
833
|
-
getOrderImpact(requestParameters: TradingApiGetOrderImpactRequest, options?: AxiosRequestConfig): AxiosPromise<ManualTradeAndImpact> {
|
|
834
|
-
return localVarFp.getOrderImpact(requestParameters, options).then((request) => request(axios, basePath));
|
|
835
|
-
},
|
|
836
|
-
/**
|
|
837
|
-
*
|
|
838
|
-
* @summary Get symbol quotes
|
|
839
|
-
* @param {TradingApiGetUserAccountQuotesRequest} requestParameters Request parameters.
|
|
840
|
-
* @param {*} [options] Override http request option.
|
|
841
|
-
* @throws {RequiredError}
|
|
842
|
-
*/
|
|
843
|
-
getUserAccountQuotes(requestParameters: TradingApiGetUserAccountQuotesRequest, options?: AxiosRequestConfig): AxiosPromise<SymbolsQuotes> {
|
|
844
|
-
return localVarFp.getUserAccountQuotes(requestParameters, options).then((request) => request(axios, basePath));
|
|
845
|
-
},
|
|
846
|
-
/**
|
|
847
|
-
*
|
|
848
|
-
* @summary Modify units of a trade before it is placed
|
|
849
|
-
* @param {TradingApiModifyCalculatedTradeByIdRequest} requestParameters Request parameters.
|
|
850
|
-
* @param {*} [options] Override http request option.
|
|
851
|
-
* @throws {RequiredError}
|
|
852
|
-
*/
|
|
853
|
-
modifyCalculatedTradeById(requestParameters: TradingApiModifyCalculatedTradeByIdRequest, options?: AxiosRequestConfig): AxiosPromise<Trade> {
|
|
854
|
-
return localVarFp.modifyCalculatedTradeById(requestParameters, options).then((request) => request(axios, basePath));
|
|
855
|
-
},
|
|
856
|
-
/**
|
|
857
|
-
*
|
|
858
|
-
* @summary Place orders for the CalculatedTrades in series
|
|
859
|
-
* @param {TradingApiPlaceCalculatedTradesRequest} requestParameters Request parameters.
|
|
860
|
-
* @param {*} [options] Override http request option.
|
|
861
|
-
* @throws {RequiredError}
|
|
862
|
-
*/
|
|
863
|
-
placeCalculatedTrades(requestParameters: TradingApiPlaceCalculatedTradesRequest, options?: AxiosRequestConfig): AxiosPromise<Array<TradeExecutionStatus>> {
|
|
864
|
-
return localVarFp.placeCalculatedTrades(requestParameters, options).then((request) => request(axios, basePath));
|
|
865
|
-
},
|
|
866
|
-
/**
|
|
867
|
-
*
|
|
868
|
-
* @summary Place a trade with NO validation.
|
|
869
|
-
* @param {TradingApiPlaceForceOrderRequest} requestParameters Request parameters.
|
|
870
|
-
* @param {*} [options] Override http request option.
|
|
871
|
-
* @throws {RequiredError}
|
|
872
|
-
*/
|
|
873
|
-
placeForceOrder(requestParameters: TradingApiPlaceForceOrderRequest, options?: AxiosRequestConfig): AxiosPromise<AccountOrderRecord> {
|
|
874
|
-
return localVarFp.placeForceOrder(requestParameters, options).then((request) => request(axios, basePath));
|
|
875
|
-
},
|
|
876
|
-
/**
|
|
877
|
-
*
|
|
878
|
-
* @summary Place a OCO (One Cancels Other) order
|
|
879
|
-
* @param {TradingApiPlaceOCOOrderRequest} requestParameters Request parameters.
|
|
880
|
-
* @param {*} [options] Override http request option.
|
|
881
|
-
* @throws {RequiredError}
|
|
882
|
-
*/
|
|
883
|
-
placeOCOOrder(requestParameters: TradingApiPlaceOCOOrderRequest, options?: AxiosRequestConfig): AxiosPromise<AccountOrderRecord> {
|
|
884
|
-
return localVarFp.placeOCOOrder(requestParameters, options).then((request) => request(axios, basePath));
|
|
885
|
-
},
|
|
886
|
-
/**
|
|
887
|
-
*
|
|
888
|
-
* @summary Place order
|
|
889
|
-
* @param {TradingApiPlaceOrderRequest} requestParameters Request parameters.
|
|
890
|
-
* @param {*} [options] Override http request option.
|
|
891
|
-
* @throws {RequiredError}
|
|
892
|
-
*/
|
|
893
|
-
placeOrder(requestParameters: TradingApiPlaceOrderRequest, options?: AxiosRequestConfig): AxiosPromise<AccountOrderRecord> {
|
|
894
|
-
return localVarFp.placeOrder(requestParameters, options).then((request) => request(axios, basePath));
|
|
895
|
-
},
|
|
896
|
-
};
|
|
897
|
-
};
|
|
898
|
-
|
|
899
|
-
/**
|
|
900
|
-
* Request parameters for cancelUserAccountOrder operation in TradingApi.
|
|
901
|
-
* @export
|
|
902
|
-
* @interface TradingApiCancelUserAccountOrderRequest
|
|
903
|
-
*/
|
|
904
|
-
export type TradingApiCancelUserAccountOrderRequest = {
|
|
905
|
-
|
|
906
|
-
/**
|
|
907
|
-
*
|
|
908
|
-
* @type {string}
|
|
909
|
-
* @memberof TradingApiCancelUserAccountOrder
|
|
910
|
-
*/
|
|
911
|
-
readonly userId: string
|
|
912
|
-
|
|
913
|
-
/**
|
|
914
|
-
*
|
|
915
|
-
* @type {string}
|
|
916
|
-
* @memberof TradingApiCancelUserAccountOrder
|
|
917
|
-
*/
|
|
918
|
-
readonly userSecret: string
|
|
919
|
-
|
|
920
|
-
/**
|
|
921
|
-
* The ID of the account get positions.
|
|
922
|
-
* @type {string}
|
|
923
|
-
* @memberof TradingApiCancelUserAccountOrder
|
|
924
|
-
*/
|
|
925
|
-
readonly accountId: string
|
|
926
|
-
|
|
927
|
-
} & TradingCancelUserAccountOrderRequest
|
|
928
|
-
|
|
929
|
-
/**
|
|
930
|
-
* Request parameters for getCalculatedTradeImpactById operation in TradingApi.
|
|
931
|
-
* @export
|
|
932
|
-
* @interface TradingApiGetCalculatedTradeImpactByIdRequest
|
|
933
|
-
*/
|
|
934
|
-
export type TradingApiGetCalculatedTradeImpactByIdRequest = {
|
|
935
|
-
|
|
936
|
-
/**
|
|
937
|
-
* The ID of the PortfolioGroup to perform rebalancing calculations
|
|
938
|
-
* @type {string}
|
|
939
|
-
* @memberof TradingApiGetCalculatedTradeImpactById
|
|
940
|
-
*/
|
|
941
|
-
readonly portfolioGroupId: string
|
|
942
|
-
|
|
943
|
-
/**
|
|
944
|
-
* The ID of calculated trade to get account impact
|
|
945
|
-
* @type {string}
|
|
946
|
-
* @memberof TradingApiGetCalculatedTradeImpactById
|
|
947
|
-
*/
|
|
948
|
-
readonly calculatedTradeId: string
|
|
949
|
-
|
|
950
|
-
/**
|
|
951
|
-
* The ID of trade object
|
|
952
|
-
* @type {string}
|
|
953
|
-
* @memberof TradingApiGetCalculatedTradeImpactById
|
|
954
|
-
*/
|
|
955
|
-
readonly tradeId: string
|
|
956
|
-
|
|
957
|
-
}
|
|
958
|
-
|
|
959
|
-
/**
|
|
960
|
-
* Request parameters for getCalculatedTradesImpact operation in TradingApi.
|
|
961
|
-
* @export
|
|
962
|
-
* @interface TradingApiGetCalculatedTradesImpactRequest
|
|
963
|
-
*/
|
|
964
|
-
export type TradingApiGetCalculatedTradesImpactRequest = {
|
|
965
|
-
|
|
966
|
-
/**
|
|
967
|
-
* The ID of the PortfolioGroup to perform rebalancing calculations
|
|
968
|
-
* @type {string}
|
|
969
|
-
* @memberof TradingApiGetCalculatedTradesImpact
|
|
970
|
-
*/
|
|
971
|
-
readonly portfolioGroupId: string
|
|
972
|
-
|
|
973
|
-
/**
|
|
974
|
-
* The ID of calculated trade to get account impact
|
|
975
|
-
* @type {string}
|
|
976
|
-
* @memberof TradingApiGetCalculatedTradesImpact
|
|
977
|
-
*/
|
|
978
|
-
readonly calculatedTradeId: string
|
|
979
|
-
|
|
980
|
-
}
|
|
981
|
-
|
|
982
|
-
/**
|
|
983
|
-
* Request parameters for getOrderImpact operation in TradingApi.
|
|
984
|
-
* @export
|
|
985
|
-
* @interface TradingApiGetOrderImpactRequest
|
|
986
|
-
*/
|
|
987
|
-
export type TradingApiGetOrderImpactRequest = {
|
|
988
|
-
|
|
989
|
-
/**
|
|
990
|
-
*
|
|
991
|
-
* @type {string}
|
|
992
|
-
* @memberof TradingApiGetOrderImpact
|
|
993
|
-
*/
|
|
994
|
-
readonly userId: string
|
|
995
|
-
|
|
996
|
-
/**
|
|
997
|
-
*
|
|
998
|
-
* @type {string}
|
|
999
|
-
* @memberof TradingApiGetOrderImpact
|
|
1000
|
-
*/
|
|
1001
|
-
readonly userSecret: string
|
|
1002
|
-
|
|
1003
|
-
} & ManualTradeForm
|
|
1004
|
-
|
|
1005
|
-
/**
|
|
1006
|
-
* Request parameters for getUserAccountQuotes operation in TradingApi.
|
|
1007
|
-
* @export
|
|
1008
|
-
* @interface TradingApiGetUserAccountQuotesRequest
|
|
1009
|
-
*/
|
|
1010
|
-
export type TradingApiGetUserAccountQuotesRequest = {
|
|
1011
|
-
|
|
1012
|
-
/**
|
|
1013
|
-
*
|
|
1014
|
-
* @type {string}
|
|
1015
|
-
* @memberof TradingApiGetUserAccountQuotes
|
|
1016
|
-
*/
|
|
1017
|
-
readonly userId: string
|
|
1018
|
-
|
|
1019
|
-
/**
|
|
1020
|
-
*
|
|
1021
|
-
* @type {string}
|
|
1022
|
-
* @memberof TradingApiGetUserAccountQuotes
|
|
1023
|
-
*/
|
|
1024
|
-
readonly userSecret: string
|
|
1025
|
-
|
|
1026
|
-
/**
|
|
1027
|
-
* List of universal_symbol_id or tickers to get quotes for.
|
|
1028
|
-
* @type {string}
|
|
1029
|
-
* @memberof TradingApiGetUserAccountQuotes
|
|
1030
|
-
*/
|
|
1031
|
-
readonly symbols: string
|
|
1032
|
-
|
|
1033
|
-
/**
|
|
1034
|
-
* The ID of the account to get quotes.
|
|
1035
|
-
* @type {string}
|
|
1036
|
-
* @memberof TradingApiGetUserAccountQuotes
|
|
1037
|
-
*/
|
|
1038
|
-
readonly accountId: string
|
|
1039
|
-
|
|
1040
|
-
/**
|
|
1041
|
-
* Should be set to True if providing tickers.
|
|
1042
|
-
* @type {boolean}
|
|
1043
|
-
* @memberof TradingApiGetUserAccountQuotes
|
|
1044
|
-
*/
|
|
1045
|
-
readonly useTicker?: boolean
|
|
1046
|
-
|
|
1047
|
-
}
|
|
1048
|
-
|
|
1049
|
-
/**
|
|
1050
|
-
* Request parameters for modifyCalculatedTradeById operation in TradingApi.
|
|
1051
|
-
* @export
|
|
1052
|
-
* @interface TradingApiModifyCalculatedTradeByIdRequest
|
|
1053
|
-
*/
|
|
1054
|
-
export type TradingApiModifyCalculatedTradeByIdRequest = {
|
|
1055
|
-
|
|
1056
|
-
/**
|
|
1057
|
-
* The ID of the PortfolioGroup to perform rebalancing calculations
|
|
1058
|
-
* @type {string}
|
|
1059
|
-
* @memberof TradingApiModifyCalculatedTradeById
|
|
1060
|
-
*/
|
|
1061
|
-
readonly portfolioGroupId: string
|
|
1062
|
-
|
|
1063
|
-
/**
|
|
1064
|
-
* The ID of calculated trade to get account impact
|
|
1065
|
-
* @type {string}
|
|
1066
|
-
* @memberof TradingApiModifyCalculatedTradeById
|
|
1067
|
-
*/
|
|
1068
|
-
readonly calculatedTradeId: string
|
|
1069
|
-
|
|
1070
|
-
/**
|
|
1071
|
-
* The ID of trade object
|
|
1072
|
-
* @type {string}
|
|
1073
|
-
* @memberof TradingApiModifyCalculatedTradeById
|
|
1074
|
-
*/
|
|
1075
|
-
readonly tradeId: string
|
|
1076
|
-
|
|
1077
|
-
} & Trade
|
|
1078
|
-
|
|
1079
|
-
/**
|
|
1080
|
-
* Request parameters for placeCalculatedTrades operation in TradingApi.
|
|
1081
|
-
* @export
|
|
1082
|
-
* @interface TradingApiPlaceCalculatedTradesRequest
|
|
1083
|
-
*/
|
|
1084
|
-
export type TradingApiPlaceCalculatedTradesRequest = {
|
|
1085
|
-
|
|
1086
|
-
/**
|
|
1087
|
-
* The ID of the PortfolioGroup to perform rebalancing calculations
|
|
1088
|
-
* @type {string}
|
|
1089
|
-
* @memberof TradingApiPlaceCalculatedTrades
|
|
1090
|
-
*/
|
|
1091
|
-
readonly portfolioGroupId: string
|
|
1092
|
-
|
|
1093
|
-
/**
|
|
1094
|
-
* The ID of calculated trade to get account impact
|
|
1095
|
-
* @type {string}
|
|
1096
|
-
* @memberof TradingApiPlaceCalculatedTrades
|
|
1097
|
-
*/
|
|
1098
|
-
readonly calculatedTradeId: string
|
|
1099
|
-
|
|
1100
|
-
}
|
|
1101
|
-
|
|
1102
|
-
/**
|
|
1103
|
-
* Request parameters for placeForceOrder operation in TradingApi.
|
|
1104
|
-
* @export
|
|
1105
|
-
* @interface TradingApiPlaceForceOrderRequest
|
|
1106
|
-
*/
|
|
1107
|
-
export type TradingApiPlaceForceOrderRequest = {
|
|
1108
|
-
|
|
1109
|
-
/**
|
|
1110
|
-
*
|
|
1111
|
-
* @type {string}
|
|
1112
|
-
* @memberof TradingApiPlaceForceOrder
|
|
1113
|
-
*/
|
|
1114
|
-
readonly userId: string
|
|
1115
|
-
|
|
1116
|
-
/**
|
|
1117
|
-
*
|
|
1118
|
-
* @type {string}
|
|
1119
|
-
* @memberof TradingApiPlaceForceOrder
|
|
1120
|
-
*/
|
|
1121
|
-
readonly userSecret: string
|
|
1122
|
-
|
|
1123
|
-
} & ManualTradeForm
|
|
1124
|
-
|
|
1125
|
-
/**
|
|
1126
|
-
* Request parameters for placeOCOOrder operation in TradingApi.
|
|
1127
|
-
* @export
|
|
1128
|
-
* @interface TradingApiPlaceOCOOrderRequest
|
|
1129
|
-
*/
|
|
1130
|
-
export type TradingApiPlaceOCOOrderRequest = {
|
|
1131
|
-
|
|
1132
|
-
/**
|
|
1133
|
-
*
|
|
1134
|
-
* @type {string}
|
|
1135
|
-
* @memberof TradingApiPlaceOCOOrder
|
|
1136
|
-
*/
|
|
1137
|
-
readonly userId: string
|
|
1138
|
-
|
|
1139
|
-
/**
|
|
1140
|
-
*
|
|
1141
|
-
* @type {string}
|
|
1142
|
-
* @memberof TradingApiPlaceOCOOrder
|
|
1143
|
-
*/
|
|
1144
|
-
readonly userSecret: string
|
|
1145
|
-
|
|
1146
|
-
} & TradingPlaceOCOOrderRequest
|
|
1147
|
-
|
|
1148
|
-
/**
|
|
1149
|
-
* Request parameters for placeOrder operation in TradingApi.
|
|
1150
|
-
* @export
|
|
1151
|
-
* @interface TradingApiPlaceOrderRequest
|
|
1152
|
-
*/
|
|
1153
|
-
export type TradingApiPlaceOrderRequest = {
|
|
1154
|
-
|
|
1155
|
-
/**
|
|
1156
|
-
* The ID of trade object obtained from trade/impact endpoint
|
|
1157
|
-
* @type {string}
|
|
1158
|
-
* @memberof TradingApiPlaceOrder
|
|
1159
|
-
*/
|
|
1160
|
-
readonly tradeId: string
|
|
1161
|
-
|
|
1162
|
-
/**
|
|
1163
|
-
*
|
|
1164
|
-
* @type {string}
|
|
1165
|
-
* @memberof TradingApiPlaceOrder
|
|
1166
|
-
*/
|
|
1167
|
-
readonly userId: string
|
|
1168
|
-
|
|
1169
|
-
/**
|
|
1170
|
-
*
|
|
1171
|
-
* @type {string}
|
|
1172
|
-
* @memberof TradingApiPlaceOrder
|
|
1173
|
-
*/
|
|
1174
|
-
readonly userSecret: string
|
|
1175
|
-
|
|
1176
|
-
}
|
|
1177
|
-
|
|
1178
|
-
/**
|
|
1179
|
-
* TradingApi - object-oriented interface
|
|
1180
|
-
* @export
|
|
1181
|
-
* @class TradingApi
|
|
1182
|
-
* @extends {BaseAPI}
|
|
1183
|
-
*/
|
|
1184
|
-
export class TradingApi extends TradingApiCustom {
|
|
1185
|
-
/**
|
|
1186
|
-
*
|
|
1187
|
-
* @summary Cancel open order in account
|
|
1188
|
-
* @param {TradingApiCancelUserAccountOrderRequest} requestParameters Request parameters.
|
|
1189
|
-
* @param {*} [options] Override http request option.
|
|
1190
|
-
* @throws {RequiredError}
|
|
1191
|
-
* @memberof TradingApi
|
|
1192
|
-
*/
|
|
1193
|
-
public cancelUserAccountOrder(requestParameters: TradingApiCancelUserAccountOrderRequest, options?: AxiosRequestConfig) {
|
|
1194
|
-
return TradingApiFp(this.configuration).cancelUserAccountOrder(requestParameters, options).then((request) => request(this.axios, this.basePath));
|
|
1195
|
-
}
|
|
1196
|
-
|
|
1197
|
-
/**
|
|
1198
|
-
*
|
|
1199
|
-
* @summary Return details of a specific trade before it\'s placed
|
|
1200
|
-
* @param {TradingApiGetCalculatedTradeImpactByIdRequest} requestParameters Request parameters.
|
|
1201
|
-
* @param {*} [options] Override http request option.
|
|
1202
|
-
* @throws {RequiredError}
|
|
1203
|
-
* @memberof TradingApi
|
|
1204
|
-
*/
|
|
1205
|
-
public getCalculatedTradeImpactById(requestParameters: TradingApiGetCalculatedTradeImpactByIdRequest, options?: AxiosRequestConfig) {
|
|
1206
|
-
return TradingApiFp(this.configuration).getCalculatedTradeImpactById(requestParameters, options).then((request) => request(this.axios, this.basePath));
|
|
1207
|
-
}
|
|
1208
|
-
|
|
1209
|
-
/**
|
|
1210
|
-
*
|
|
1211
|
-
* @summary Return the impact of placing a series of trades on the portfolio
|
|
1212
|
-
* @param {TradingApiGetCalculatedTradesImpactRequest} requestParameters Request parameters.
|
|
1213
|
-
* @param {*} [options] Override http request option.
|
|
1214
|
-
* @throws {RequiredError}
|
|
1215
|
-
* @memberof TradingApi
|
|
1216
|
-
*/
|
|
1217
|
-
public getCalculatedTradesImpact(requestParameters: TradingApiGetCalculatedTradesImpactRequest, options?: AxiosRequestConfig) {
|
|
1218
|
-
return TradingApiFp(this.configuration).getCalculatedTradesImpact(requestParameters, options).then((request) => request(this.axios, this.basePath));
|
|
1219
|
-
}
|
|
1220
|
-
|
|
1221
|
-
/**
|
|
1222
|
-
*
|
|
1223
|
-
* @summary Check impact of trades on account.
|
|
1224
|
-
* @param {TradingApiGetOrderImpactRequest} requestParameters Request parameters.
|
|
1225
|
-
* @param {*} [options] Override http request option.
|
|
1226
|
-
* @throws {RequiredError}
|
|
1227
|
-
* @memberof TradingApi
|
|
1228
|
-
*/
|
|
1229
|
-
public getOrderImpact(requestParameters: TradingApiGetOrderImpactRequest, options?: AxiosRequestConfig) {
|
|
1230
|
-
return TradingApiFp(this.configuration).getOrderImpact(requestParameters, options).then((request) => request(this.axios, this.basePath));
|
|
1231
|
-
}
|
|
1232
|
-
|
|
1233
|
-
/**
|
|
1234
|
-
*
|
|
1235
|
-
* @summary Get symbol quotes
|
|
1236
|
-
* @param {TradingApiGetUserAccountQuotesRequest} requestParameters Request parameters.
|
|
1237
|
-
* @param {*} [options] Override http request option.
|
|
1238
|
-
* @throws {RequiredError}
|
|
1239
|
-
* @memberof TradingApi
|
|
1240
|
-
*/
|
|
1241
|
-
public getUserAccountQuotes(requestParameters: TradingApiGetUserAccountQuotesRequest, options?: AxiosRequestConfig) {
|
|
1242
|
-
return TradingApiFp(this.configuration).getUserAccountQuotes(requestParameters, options).then((request) => request(this.axios, this.basePath));
|
|
1243
|
-
}
|
|
1244
|
-
|
|
1245
|
-
/**
|
|
1246
|
-
*
|
|
1247
|
-
* @summary Modify units of a trade before it is placed
|
|
1248
|
-
* @param {TradingApiModifyCalculatedTradeByIdRequest} requestParameters Request parameters.
|
|
1249
|
-
* @param {*} [options] Override http request option.
|
|
1250
|
-
* @throws {RequiredError}
|
|
1251
|
-
* @memberof TradingApi
|
|
1252
|
-
*/
|
|
1253
|
-
public modifyCalculatedTradeById(requestParameters: TradingApiModifyCalculatedTradeByIdRequest, options?: AxiosRequestConfig) {
|
|
1254
|
-
return TradingApiFp(this.configuration).modifyCalculatedTradeById(requestParameters, options).then((request) => request(this.axios, this.basePath));
|
|
1255
|
-
}
|
|
1256
|
-
|
|
1257
|
-
/**
|
|
1258
|
-
*
|
|
1259
|
-
* @summary Place orders for the CalculatedTrades in series
|
|
1260
|
-
* @param {TradingApiPlaceCalculatedTradesRequest} requestParameters Request parameters.
|
|
1261
|
-
* @param {*} [options] Override http request option.
|
|
1262
|
-
* @throws {RequiredError}
|
|
1263
|
-
* @memberof TradingApi
|
|
1264
|
-
*/
|
|
1265
|
-
public placeCalculatedTrades(requestParameters: TradingApiPlaceCalculatedTradesRequest, options?: AxiosRequestConfig) {
|
|
1266
|
-
return TradingApiFp(this.configuration).placeCalculatedTrades(requestParameters, options).then((request) => request(this.axios, this.basePath));
|
|
1267
|
-
}
|
|
1268
|
-
|
|
1269
|
-
/**
|
|
1270
|
-
*
|
|
1271
|
-
* @summary Place a trade with NO validation.
|
|
1272
|
-
* @param {TradingApiPlaceForceOrderRequest} requestParameters Request parameters.
|
|
1273
|
-
* @param {*} [options] Override http request option.
|
|
1274
|
-
* @throws {RequiredError}
|
|
1275
|
-
* @memberof TradingApi
|
|
1276
|
-
*/
|
|
1277
|
-
public placeForceOrder(requestParameters: TradingApiPlaceForceOrderRequest, options?: AxiosRequestConfig) {
|
|
1278
|
-
return TradingApiFp(this.configuration).placeForceOrder(requestParameters, options).then((request) => request(this.axios, this.basePath));
|
|
1279
|
-
}
|
|
1280
|
-
|
|
1281
|
-
/**
|
|
1282
|
-
*
|
|
1283
|
-
* @summary Place a OCO (One Cancels Other) order
|
|
1284
|
-
* @param {TradingApiPlaceOCOOrderRequest} requestParameters Request parameters.
|
|
1285
|
-
* @param {*} [options] Override http request option.
|
|
1286
|
-
* @throws {RequiredError}
|
|
1287
|
-
* @memberof TradingApi
|
|
1288
|
-
*/
|
|
1289
|
-
public placeOCOOrder(requestParameters: TradingApiPlaceOCOOrderRequest, options?: AxiosRequestConfig) {
|
|
1290
|
-
return TradingApiFp(this.configuration).placeOCOOrder(requestParameters, options).then((request) => request(this.axios, this.basePath));
|
|
1291
|
-
}
|
|
1292
|
-
|
|
1293
|
-
/**
|
|
1294
|
-
*
|
|
1295
|
-
* @summary Place order
|
|
1296
|
-
* @param {TradingApiPlaceOrderRequest} requestParameters Request parameters.
|
|
1297
|
-
* @param {*} [options] Override http request option.
|
|
1298
|
-
* @throws {RequiredError}
|
|
1299
|
-
* @memberof TradingApi
|
|
1300
|
-
*/
|
|
1301
|
-
public placeOrder(requestParameters: TradingApiPlaceOrderRequest, options?: AxiosRequestConfig) {
|
|
1302
|
-
return TradingApiFp(this.configuration).placeOrder(requestParameters, options).then((request) => request(this.axios, this.basePath));
|
|
1303
|
-
}
|
|
1304
|
-
}
|