snaptrade-typescript-sdk 8.7.0 → 8.9.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 +1 -3
- package/dist/api/portfolio-management-api.d.ts +0 -47
- package/dist/api/portfolio-management-api.js +0 -103
- package/dist/api.d.ts +0 -1
- package/dist/api.js +0 -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 +0 -1
- package/dist/models/index.js +0 -1
- 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/dist/api/api-disclaimer-api-custom.d.ts +0 -3
- package/dist/api/api-disclaimer-api-custom.js +0 -27
- package/dist/api/api-disclaimer-api.d.ts +0 -97
- package/dist/api/api-disclaimer-api.js +0 -247
- package/dist/models/apidisclaimer-accept-request.d.ts +0 -24
- package/dist/models/apidisclaimer-accept-request.js +0 -15
- package/docs/AccountInformationApi.md +0 -469
- package/docs/ApiDisclaimerApi.md +0 -64
- package/docs/ApiStatusApi.md +0 -58
- package/docs/AuthenticationApi.md +0 -293
- package/docs/ConnectionsApi.md +0 -238
- package/docs/ErrorLogsApi.md +0 -62
- package/docs/OptionsApi.md +0 -312
- package/docs/PortfolioManagementApi.md +0 -1785
- package/docs/ReferenceDataApi.md +0 -568
- package/docs/TradingApi.md +0 -596
- package/docs/TransactionsAndReportingApi.md +0 -144
- 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 -80
- 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 -76
- 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/options-api.ts
DELETED
|
@@ -1,739 +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 { OptionChainInner } from '../models';
|
|
24
|
-
// @ts-ignore
|
|
25
|
-
import { OptionLeg } from '../models';
|
|
26
|
-
// @ts-ignore
|
|
27
|
-
import { OptionsGetOptionStrategyRequest } from '../models';
|
|
28
|
-
// @ts-ignore
|
|
29
|
-
import { OptionsHoldings } from '../models';
|
|
30
|
-
// @ts-ignore
|
|
31
|
-
import { OptionsPlaceOptionStrategyRequest } from '../models';
|
|
32
|
-
// @ts-ignore
|
|
33
|
-
import { StrategyOrderRecord } from '../models';
|
|
34
|
-
// @ts-ignore
|
|
35
|
-
import { StrategyQuotes } from '../models';
|
|
36
|
-
import { paginate } from "../pagination/paginate";
|
|
37
|
-
import { requestBeforeHook } from '../requestBeforeHook';
|
|
38
|
-
import { OptionsApiCustom } from "./options-api-custom";
|
|
39
|
-
/**
|
|
40
|
-
* OptionsApi - axios parameter creator
|
|
41
|
-
* @export
|
|
42
|
-
*/
|
|
43
|
-
export const OptionsApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
44
|
-
return {
|
|
45
|
-
/**
|
|
46
|
-
*
|
|
47
|
-
* @summary Creates an option strategy object that will be used to place an option strategy order
|
|
48
|
-
* @param {string} userId
|
|
49
|
-
* @param {string} userSecret
|
|
50
|
-
* @param {string} accountId The ID of the account get positions.
|
|
51
|
-
* @param {OptionsGetOptionStrategyRequest} optionsGetOptionStrategyRequest
|
|
52
|
-
* @param {*} [options] Override http request option.
|
|
53
|
-
* @throws {RequiredError}
|
|
54
|
-
*/
|
|
55
|
-
getOptionStrategy: async (userId: string, userSecret: string, accountId: string, optionsGetOptionStrategyRequest: OptionsGetOptionStrategyRequest, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
56
|
-
// verify required parameter 'userId' is not null or undefined
|
|
57
|
-
assertParamExists('getOptionStrategy', 'userId', userId)
|
|
58
|
-
// verify required parameter 'userSecret' is not null or undefined
|
|
59
|
-
assertParamExists('getOptionStrategy', 'userSecret', userSecret)
|
|
60
|
-
// verify required parameter 'accountId' is not null or undefined
|
|
61
|
-
assertParamExists('getOptionStrategy', 'accountId', accountId)
|
|
62
|
-
// verify required parameter 'optionsGetOptionStrategyRequest' is not null or undefined
|
|
63
|
-
assertParamExists('getOptionStrategy', 'optionsGetOptionStrategyRequest', optionsGetOptionStrategyRequest)
|
|
64
|
-
const localVarPath = `/accounts/{accountId}/optionStrategy`
|
|
65
|
-
.replace(`{${"accountId"}}`, encodeURIComponent(String(accountId)));
|
|
66
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
67
|
-
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
68
|
-
let baseOptions;
|
|
69
|
-
if (configuration) {
|
|
70
|
-
baseOptions = configuration.baseOptions;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
const localVarRequestOptions: AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
|
|
74
|
-
const localVarHeaderParameter = configuration ? { "User-Agent": configuration.userAgent } : {} as any;
|
|
75
|
-
const localVarQueryParameter = {} as any;
|
|
76
|
-
|
|
77
|
-
// authentication PartnerClientId required
|
|
78
|
-
await setApiKeyToObject({object: localVarQueryParameter, keyParamName: "clientId", configuration})
|
|
79
|
-
// authentication PartnerSignature required
|
|
80
|
-
await setApiKeyToObject({ object: localVarHeaderParameter, keyParamName: "Signature", configuration })
|
|
81
|
-
// authentication PartnerTimestamp required
|
|
82
|
-
await setApiKeyToObject({object: localVarQueryParameter, keyParamName: "timestamp", configuration})
|
|
83
|
-
if (userId !== undefined) {
|
|
84
|
-
localVarQueryParameter['userId'] = userId;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
if (userSecret !== undefined) {
|
|
88
|
-
localVarQueryParameter['userSecret'] = userSecret;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
94
|
-
|
|
95
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
96
|
-
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
97
|
-
requestBeforeHook({
|
|
98
|
-
requestBody: optionsGetOptionStrategyRequest,
|
|
99
|
-
queryParameters: localVarQueryParameter,
|
|
100
|
-
requestConfig: localVarRequestOptions,
|
|
101
|
-
path: localVarPath,
|
|
102
|
-
configuration
|
|
103
|
-
});
|
|
104
|
-
localVarRequestOptions.data = serializeDataIfNeeded(optionsGetOptionStrategyRequest, localVarRequestOptions, configuration)
|
|
105
|
-
|
|
106
|
-
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
107
|
-
return {
|
|
108
|
-
url: toPathString(localVarUrlObj),
|
|
109
|
-
options: localVarRequestOptions,
|
|
110
|
-
};
|
|
111
|
-
},
|
|
112
|
-
/**
|
|
113
|
-
*
|
|
114
|
-
* @summary Get the options chain
|
|
115
|
-
* @param {string} userId
|
|
116
|
-
* @param {string} userSecret
|
|
117
|
-
* @param {string} accountId The ID of the account get positions.
|
|
118
|
-
* @param {string} symbol Universal symbol ID if symbol
|
|
119
|
-
* @param {*} [options] Override http request option.
|
|
120
|
-
* @throws {RequiredError}
|
|
121
|
-
*/
|
|
122
|
-
getOptionsChain: async (userId: string, userSecret: string, accountId: string, symbol: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
123
|
-
// verify required parameter 'userId' is not null or undefined
|
|
124
|
-
assertParamExists('getOptionsChain', 'userId', userId)
|
|
125
|
-
// verify required parameter 'userSecret' is not null or undefined
|
|
126
|
-
assertParamExists('getOptionsChain', 'userSecret', userSecret)
|
|
127
|
-
// verify required parameter 'accountId' is not null or undefined
|
|
128
|
-
assertParamExists('getOptionsChain', 'accountId', accountId)
|
|
129
|
-
// verify required parameter 'symbol' is not null or undefined
|
|
130
|
-
assertParamExists('getOptionsChain', 'symbol', symbol)
|
|
131
|
-
const localVarPath = `/accounts/{accountId}/optionsChain`
|
|
132
|
-
.replace(`{${"accountId"}}`, encodeURIComponent(String(accountId)));
|
|
133
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
134
|
-
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
135
|
-
let baseOptions;
|
|
136
|
-
if (configuration) {
|
|
137
|
-
baseOptions = configuration.baseOptions;
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
const localVarRequestOptions: AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
|
|
141
|
-
const localVarHeaderParameter = configuration ? { "User-Agent": configuration.userAgent } : {} as any;
|
|
142
|
-
const localVarQueryParameter = {} as any;
|
|
143
|
-
|
|
144
|
-
// authentication PartnerClientId required
|
|
145
|
-
await setApiKeyToObject({object: localVarQueryParameter, keyParamName: "clientId", configuration})
|
|
146
|
-
// authentication PartnerSignature required
|
|
147
|
-
await setApiKeyToObject({ object: localVarHeaderParameter, keyParamName: "Signature", configuration })
|
|
148
|
-
// authentication PartnerTimestamp required
|
|
149
|
-
await setApiKeyToObject({object: localVarQueryParameter, keyParamName: "timestamp", configuration})
|
|
150
|
-
if (userId !== undefined) {
|
|
151
|
-
localVarQueryParameter['userId'] = userId;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
if (userSecret !== undefined) {
|
|
155
|
-
localVarQueryParameter['userSecret'] = userSecret;
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
if (symbol !== undefined) {
|
|
159
|
-
localVarQueryParameter['symbol'] = symbol;
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
165
|
-
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
166
|
-
requestBeforeHook({
|
|
167
|
-
queryParameters: localVarQueryParameter,
|
|
168
|
-
requestConfig: localVarRequestOptions,
|
|
169
|
-
path: localVarPath,
|
|
170
|
-
configuration
|
|
171
|
-
});
|
|
172
|
-
|
|
173
|
-
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
174
|
-
return {
|
|
175
|
-
url: toPathString(localVarUrlObj),
|
|
176
|
-
options: localVarRequestOptions,
|
|
177
|
-
};
|
|
178
|
-
},
|
|
179
|
-
/**
|
|
180
|
-
*
|
|
181
|
-
* @summary Get latest market data of option strategy
|
|
182
|
-
* @param {string} userId
|
|
183
|
-
* @param {string} userSecret
|
|
184
|
-
* @param {string} accountId The ID of the account get positions.
|
|
185
|
-
* @param {string} optionStrategyId Option strategy id obtained from response when creating option strategy object
|
|
186
|
-
* @param {*} [options] Override http request option.
|
|
187
|
-
* @throws {RequiredError}
|
|
188
|
-
*/
|
|
189
|
-
getOptionsStrategyQuote: async (userId: string, userSecret: string, accountId: string, optionStrategyId: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
190
|
-
// verify required parameter 'userId' is not null or undefined
|
|
191
|
-
assertParamExists('getOptionsStrategyQuote', 'userId', userId)
|
|
192
|
-
// verify required parameter 'userSecret' is not null or undefined
|
|
193
|
-
assertParamExists('getOptionsStrategyQuote', 'userSecret', userSecret)
|
|
194
|
-
// verify required parameter 'accountId' is not null or undefined
|
|
195
|
-
assertParamExists('getOptionsStrategyQuote', 'accountId', accountId)
|
|
196
|
-
// verify required parameter 'optionStrategyId' is not null or undefined
|
|
197
|
-
assertParamExists('getOptionsStrategyQuote', 'optionStrategyId', optionStrategyId)
|
|
198
|
-
const localVarPath = `/accounts/{accountId}/optionStrategy/{optionStrategyId}`
|
|
199
|
-
.replace(`{${"accountId"}}`, encodeURIComponent(String(accountId)))
|
|
200
|
-
.replace(`{${"optionStrategyId"}}`, encodeURIComponent(String(optionStrategyId)));
|
|
201
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
202
|
-
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
203
|
-
let baseOptions;
|
|
204
|
-
if (configuration) {
|
|
205
|
-
baseOptions = configuration.baseOptions;
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
const localVarRequestOptions: AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
|
|
209
|
-
const localVarHeaderParameter = configuration ? { "User-Agent": configuration.userAgent } : {} as any;
|
|
210
|
-
const localVarQueryParameter = {} as any;
|
|
211
|
-
|
|
212
|
-
// authentication PartnerClientId required
|
|
213
|
-
await setApiKeyToObject({object: localVarQueryParameter, keyParamName: "clientId", configuration})
|
|
214
|
-
// authentication PartnerSignature required
|
|
215
|
-
await setApiKeyToObject({ object: localVarHeaderParameter, keyParamName: "Signature", configuration })
|
|
216
|
-
// authentication PartnerTimestamp required
|
|
217
|
-
await setApiKeyToObject({object: localVarQueryParameter, keyParamName: "timestamp", configuration})
|
|
218
|
-
if (userId !== undefined) {
|
|
219
|
-
localVarQueryParameter['userId'] = userId;
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
if (userSecret !== undefined) {
|
|
223
|
-
localVarQueryParameter['userSecret'] = userSecret;
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
229
|
-
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
230
|
-
requestBeforeHook({
|
|
231
|
-
queryParameters: localVarQueryParameter,
|
|
232
|
-
requestConfig: localVarRequestOptions,
|
|
233
|
-
path: localVarPath,
|
|
234
|
-
configuration
|
|
235
|
-
});
|
|
236
|
-
|
|
237
|
-
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
238
|
-
return {
|
|
239
|
-
url: toPathString(localVarUrlObj),
|
|
240
|
-
options: localVarRequestOptions,
|
|
241
|
-
};
|
|
242
|
-
},
|
|
243
|
-
/**
|
|
244
|
-
*
|
|
245
|
-
* @summary Get the options holdings in the account
|
|
246
|
-
* @param {string} userId
|
|
247
|
-
* @param {string} userSecret
|
|
248
|
-
* @param {string} accountId The ID of the account get positions.
|
|
249
|
-
* @param {*} [options] Override http request option.
|
|
250
|
-
* @throws {RequiredError}
|
|
251
|
-
*/
|
|
252
|
-
listOptionHoldings: async (userId: string, userSecret: string, accountId: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
253
|
-
// verify required parameter 'userId' is not null or undefined
|
|
254
|
-
assertParamExists('listOptionHoldings', 'userId', userId)
|
|
255
|
-
// verify required parameter 'userSecret' is not null or undefined
|
|
256
|
-
assertParamExists('listOptionHoldings', 'userSecret', userSecret)
|
|
257
|
-
// verify required parameter 'accountId' is not null or undefined
|
|
258
|
-
assertParamExists('listOptionHoldings', 'accountId', accountId)
|
|
259
|
-
const localVarPath = `/accounts/{accountId}/options`
|
|
260
|
-
.replace(`{${"accountId"}}`, encodeURIComponent(String(accountId)));
|
|
261
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
262
|
-
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
263
|
-
let baseOptions;
|
|
264
|
-
if (configuration) {
|
|
265
|
-
baseOptions = configuration.baseOptions;
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
const localVarRequestOptions: AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
|
|
269
|
-
const localVarHeaderParameter = configuration ? { "User-Agent": configuration.userAgent } : {} as any;
|
|
270
|
-
const localVarQueryParameter = {} as any;
|
|
271
|
-
|
|
272
|
-
// authentication PartnerClientId required
|
|
273
|
-
await setApiKeyToObject({object: localVarQueryParameter, keyParamName: "clientId", configuration})
|
|
274
|
-
// authentication PartnerSignature required
|
|
275
|
-
await setApiKeyToObject({ object: localVarHeaderParameter, keyParamName: "Signature", configuration })
|
|
276
|
-
// authentication PartnerTimestamp required
|
|
277
|
-
await setApiKeyToObject({object: localVarQueryParameter, keyParamName: "timestamp", configuration})
|
|
278
|
-
if (userId !== undefined) {
|
|
279
|
-
localVarQueryParameter['userId'] = userId;
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
if (userSecret !== undefined) {
|
|
283
|
-
localVarQueryParameter['userSecret'] = userSecret;
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
289
|
-
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
290
|
-
requestBeforeHook({
|
|
291
|
-
queryParameters: localVarQueryParameter,
|
|
292
|
-
requestConfig: localVarRequestOptions,
|
|
293
|
-
path: localVarPath,
|
|
294
|
-
configuration
|
|
295
|
-
});
|
|
296
|
-
|
|
297
|
-
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
298
|
-
return {
|
|
299
|
-
url: toPathString(localVarUrlObj),
|
|
300
|
-
options: localVarRequestOptions,
|
|
301
|
-
};
|
|
302
|
-
},
|
|
303
|
-
/**
|
|
304
|
-
*
|
|
305
|
-
* @summary Place an option strategy order on the brokerage
|
|
306
|
-
* @param {string} userId
|
|
307
|
-
* @param {string} userSecret
|
|
308
|
-
* @param {string} accountId The ID of the account get positions.
|
|
309
|
-
* @param {string} optionStrategyId Option strategy id obtained from response when creating option strategy object
|
|
310
|
-
* @param {OptionsPlaceOptionStrategyRequest} optionsPlaceOptionStrategyRequest
|
|
311
|
-
* @param {*} [options] Override http request option.
|
|
312
|
-
* @throws {RequiredError}
|
|
313
|
-
*/
|
|
314
|
-
placeOptionStrategy: async (userId: string, userSecret: string, accountId: string, optionStrategyId: string, optionsPlaceOptionStrategyRequest: OptionsPlaceOptionStrategyRequest, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
315
|
-
// verify required parameter 'userId' is not null or undefined
|
|
316
|
-
assertParamExists('placeOptionStrategy', 'userId', userId)
|
|
317
|
-
// verify required parameter 'userSecret' is not null or undefined
|
|
318
|
-
assertParamExists('placeOptionStrategy', 'userSecret', userSecret)
|
|
319
|
-
// verify required parameter 'accountId' is not null or undefined
|
|
320
|
-
assertParamExists('placeOptionStrategy', 'accountId', accountId)
|
|
321
|
-
// verify required parameter 'optionStrategyId' is not null or undefined
|
|
322
|
-
assertParamExists('placeOptionStrategy', 'optionStrategyId', optionStrategyId)
|
|
323
|
-
// verify required parameter 'optionsPlaceOptionStrategyRequest' is not null or undefined
|
|
324
|
-
assertParamExists('placeOptionStrategy', 'optionsPlaceOptionStrategyRequest', optionsPlaceOptionStrategyRequest)
|
|
325
|
-
const localVarPath = `/accounts/{accountId}/optionStrategy/{optionStrategyId}/execute`
|
|
326
|
-
.replace(`{${"accountId"}}`, encodeURIComponent(String(accountId)))
|
|
327
|
-
.replace(`{${"optionStrategyId"}}`, encodeURIComponent(String(optionStrategyId)));
|
|
328
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
329
|
-
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
330
|
-
let baseOptions;
|
|
331
|
-
if (configuration) {
|
|
332
|
-
baseOptions = configuration.baseOptions;
|
|
333
|
-
}
|
|
334
|
-
|
|
335
|
-
const localVarRequestOptions: AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options};
|
|
336
|
-
const localVarHeaderParameter = configuration ? { "User-Agent": configuration.userAgent } : {} as any;
|
|
337
|
-
const localVarQueryParameter = {} as any;
|
|
338
|
-
|
|
339
|
-
// authentication PartnerClientId required
|
|
340
|
-
await setApiKeyToObject({object: localVarQueryParameter, keyParamName: "clientId", configuration})
|
|
341
|
-
// authentication PartnerSignature required
|
|
342
|
-
await setApiKeyToObject({ object: localVarHeaderParameter, keyParamName: "Signature", configuration })
|
|
343
|
-
// authentication PartnerTimestamp required
|
|
344
|
-
await setApiKeyToObject({object: localVarQueryParameter, keyParamName: "timestamp", configuration})
|
|
345
|
-
if (userId !== undefined) {
|
|
346
|
-
localVarQueryParameter['userId'] = userId;
|
|
347
|
-
}
|
|
348
|
-
|
|
349
|
-
if (userSecret !== undefined) {
|
|
350
|
-
localVarQueryParameter['userSecret'] = userSecret;
|
|
351
|
-
}
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
356
|
-
|
|
357
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
358
|
-
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
359
|
-
requestBeforeHook({
|
|
360
|
-
requestBody: optionsPlaceOptionStrategyRequest,
|
|
361
|
-
queryParameters: localVarQueryParameter,
|
|
362
|
-
requestConfig: localVarRequestOptions,
|
|
363
|
-
path: localVarPath,
|
|
364
|
-
configuration
|
|
365
|
-
});
|
|
366
|
-
localVarRequestOptions.data = serializeDataIfNeeded(optionsPlaceOptionStrategyRequest, localVarRequestOptions, configuration)
|
|
367
|
-
|
|
368
|
-
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
369
|
-
return {
|
|
370
|
-
url: toPathString(localVarUrlObj),
|
|
371
|
-
options: localVarRequestOptions,
|
|
372
|
-
};
|
|
373
|
-
},
|
|
374
|
-
}
|
|
375
|
-
};
|
|
376
|
-
|
|
377
|
-
/**
|
|
378
|
-
* OptionsApi - functional programming interface
|
|
379
|
-
* @export
|
|
380
|
-
*/
|
|
381
|
-
export const OptionsApiFp = function(configuration?: Configuration) {
|
|
382
|
-
const localVarAxiosParamCreator = OptionsApiAxiosParamCreator(configuration)
|
|
383
|
-
return {
|
|
384
|
-
/**
|
|
385
|
-
*
|
|
386
|
-
* @summary Creates an option strategy object that will be used to place an option strategy order
|
|
387
|
-
* @param {OptionsApiGetOptionStrategyRequest} requestParameters Request parameters.
|
|
388
|
-
* @param {*} [options] Override http request option.
|
|
389
|
-
* @throws {RequiredError}
|
|
390
|
-
*/
|
|
391
|
-
async getOptionStrategy(requestParameters: OptionsApiGetOptionStrategyRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<StrategyQuotes>> {
|
|
392
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.getOptionStrategy(requestParameters.userId, requestParameters.userSecret, requestParameters.accountId, requestParameters, options);
|
|
393
|
-
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
394
|
-
},
|
|
395
|
-
/**
|
|
396
|
-
*
|
|
397
|
-
* @summary Get the options chain
|
|
398
|
-
* @param {OptionsApiGetOptionsChainRequest} requestParameters Request parameters.
|
|
399
|
-
* @param {*} [options] Override http request option.
|
|
400
|
-
* @throws {RequiredError}
|
|
401
|
-
*/
|
|
402
|
-
async getOptionsChain(requestParameters: OptionsApiGetOptionsChainRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<OptionChainInner>>> {
|
|
403
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.getOptionsChain(requestParameters.userId, requestParameters.userSecret, requestParameters.accountId, requestParameters.symbol, options);
|
|
404
|
-
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
405
|
-
},
|
|
406
|
-
/**
|
|
407
|
-
*
|
|
408
|
-
* @summary Get latest market data of option strategy
|
|
409
|
-
* @param {OptionsApiGetOptionsStrategyQuoteRequest} requestParameters Request parameters.
|
|
410
|
-
* @param {*} [options] Override http request option.
|
|
411
|
-
* @throws {RequiredError}
|
|
412
|
-
*/
|
|
413
|
-
async getOptionsStrategyQuote(requestParameters: OptionsApiGetOptionsStrategyQuoteRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<StrategyQuotes>> {
|
|
414
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.getOptionsStrategyQuote(requestParameters.userId, requestParameters.userSecret, requestParameters.accountId, requestParameters.optionStrategyId, options);
|
|
415
|
-
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
416
|
-
},
|
|
417
|
-
/**
|
|
418
|
-
*
|
|
419
|
-
* @summary Get the options holdings in the account
|
|
420
|
-
* @param {OptionsApiListOptionHoldingsRequest} requestParameters Request parameters.
|
|
421
|
-
* @param {*} [options] Override http request option.
|
|
422
|
-
* @throws {RequiredError}
|
|
423
|
-
*/
|
|
424
|
-
async listOptionHoldings(requestParameters: OptionsApiListOptionHoldingsRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<OptionsHoldings>> {
|
|
425
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.listOptionHoldings(requestParameters.userId, requestParameters.userSecret, requestParameters.accountId, options);
|
|
426
|
-
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
427
|
-
},
|
|
428
|
-
/**
|
|
429
|
-
*
|
|
430
|
-
* @summary Place an option strategy order on the brokerage
|
|
431
|
-
* @param {OptionsApiPlaceOptionStrategyRequest} requestParameters Request parameters.
|
|
432
|
-
* @param {*} [options] Override http request option.
|
|
433
|
-
* @throws {RequiredError}
|
|
434
|
-
*/
|
|
435
|
-
async placeOptionStrategy(requestParameters: OptionsApiPlaceOptionStrategyRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<StrategyOrderRecord>> {
|
|
436
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.placeOptionStrategy(requestParameters.userId, requestParameters.userSecret, requestParameters.accountId, requestParameters.optionStrategyId, requestParameters, options);
|
|
437
|
-
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
438
|
-
},
|
|
439
|
-
}
|
|
440
|
-
};
|
|
441
|
-
|
|
442
|
-
/**
|
|
443
|
-
* OptionsApi - factory interface
|
|
444
|
-
* @export
|
|
445
|
-
*/
|
|
446
|
-
export const OptionsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
447
|
-
const localVarFp = OptionsApiFp(configuration)
|
|
448
|
-
return {
|
|
449
|
-
/**
|
|
450
|
-
*
|
|
451
|
-
* @summary Creates an option strategy object that will be used to place an option strategy order
|
|
452
|
-
* @param {OptionsApiGetOptionStrategyRequest} requestParameters Request parameters.
|
|
453
|
-
* @param {*} [options] Override http request option.
|
|
454
|
-
* @throws {RequiredError}
|
|
455
|
-
*/
|
|
456
|
-
getOptionStrategy(requestParameters: OptionsApiGetOptionStrategyRequest, options?: AxiosRequestConfig): AxiosPromise<StrategyQuotes> {
|
|
457
|
-
return localVarFp.getOptionStrategy(requestParameters, options).then((request) => request(axios, basePath));
|
|
458
|
-
},
|
|
459
|
-
/**
|
|
460
|
-
*
|
|
461
|
-
* @summary Get the options chain
|
|
462
|
-
* @param {OptionsApiGetOptionsChainRequest} requestParameters Request parameters.
|
|
463
|
-
* @param {*} [options] Override http request option.
|
|
464
|
-
* @throws {RequiredError}
|
|
465
|
-
*/
|
|
466
|
-
getOptionsChain(requestParameters: OptionsApiGetOptionsChainRequest, options?: AxiosRequestConfig): AxiosPromise<Array<OptionChainInner>> {
|
|
467
|
-
return localVarFp.getOptionsChain(requestParameters, options).then((request) => request(axios, basePath));
|
|
468
|
-
},
|
|
469
|
-
/**
|
|
470
|
-
*
|
|
471
|
-
* @summary Get latest market data of option strategy
|
|
472
|
-
* @param {OptionsApiGetOptionsStrategyQuoteRequest} requestParameters Request parameters.
|
|
473
|
-
* @param {*} [options] Override http request option.
|
|
474
|
-
* @throws {RequiredError}
|
|
475
|
-
*/
|
|
476
|
-
getOptionsStrategyQuote(requestParameters: OptionsApiGetOptionsStrategyQuoteRequest, options?: AxiosRequestConfig): AxiosPromise<StrategyQuotes> {
|
|
477
|
-
return localVarFp.getOptionsStrategyQuote(requestParameters, options).then((request) => request(axios, basePath));
|
|
478
|
-
},
|
|
479
|
-
/**
|
|
480
|
-
*
|
|
481
|
-
* @summary Get the options holdings in the account
|
|
482
|
-
* @param {OptionsApiListOptionHoldingsRequest} requestParameters Request parameters.
|
|
483
|
-
* @param {*} [options] Override http request option.
|
|
484
|
-
* @throws {RequiredError}
|
|
485
|
-
*/
|
|
486
|
-
listOptionHoldings(requestParameters: OptionsApiListOptionHoldingsRequest, options?: AxiosRequestConfig): AxiosPromise<OptionsHoldings> {
|
|
487
|
-
return localVarFp.listOptionHoldings(requestParameters, options).then((request) => request(axios, basePath));
|
|
488
|
-
},
|
|
489
|
-
/**
|
|
490
|
-
*
|
|
491
|
-
* @summary Place an option strategy order on the brokerage
|
|
492
|
-
* @param {OptionsApiPlaceOptionStrategyRequest} requestParameters Request parameters.
|
|
493
|
-
* @param {*} [options] Override http request option.
|
|
494
|
-
* @throws {RequiredError}
|
|
495
|
-
*/
|
|
496
|
-
placeOptionStrategy(requestParameters: OptionsApiPlaceOptionStrategyRequest, options?: AxiosRequestConfig): AxiosPromise<StrategyOrderRecord> {
|
|
497
|
-
return localVarFp.placeOptionStrategy(requestParameters, options).then((request) => request(axios, basePath));
|
|
498
|
-
},
|
|
499
|
-
};
|
|
500
|
-
};
|
|
501
|
-
|
|
502
|
-
/**
|
|
503
|
-
* Request parameters for getOptionStrategy operation in OptionsApi.
|
|
504
|
-
* @export
|
|
505
|
-
* @interface OptionsApiGetOptionStrategyRequest
|
|
506
|
-
*/
|
|
507
|
-
export type OptionsApiGetOptionStrategyRequest = {
|
|
508
|
-
|
|
509
|
-
/**
|
|
510
|
-
*
|
|
511
|
-
* @type {string}
|
|
512
|
-
* @memberof OptionsApiGetOptionStrategy
|
|
513
|
-
*/
|
|
514
|
-
readonly userId: string
|
|
515
|
-
|
|
516
|
-
/**
|
|
517
|
-
*
|
|
518
|
-
* @type {string}
|
|
519
|
-
* @memberof OptionsApiGetOptionStrategy
|
|
520
|
-
*/
|
|
521
|
-
readonly userSecret: string
|
|
522
|
-
|
|
523
|
-
/**
|
|
524
|
-
* The ID of the account get positions.
|
|
525
|
-
* @type {string}
|
|
526
|
-
* @memberof OptionsApiGetOptionStrategy
|
|
527
|
-
*/
|
|
528
|
-
readonly accountId: string
|
|
529
|
-
|
|
530
|
-
} & OptionsGetOptionStrategyRequest
|
|
531
|
-
|
|
532
|
-
/**
|
|
533
|
-
* Request parameters for getOptionsChain operation in OptionsApi.
|
|
534
|
-
* @export
|
|
535
|
-
* @interface OptionsApiGetOptionsChainRequest
|
|
536
|
-
*/
|
|
537
|
-
export type OptionsApiGetOptionsChainRequest = {
|
|
538
|
-
|
|
539
|
-
/**
|
|
540
|
-
*
|
|
541
|
-
* @type {string}
|
|
542
|
-
* @memberof OptionsApiGetOptionsChain
|
|
543
|
-
*/
|
|
544
|
-
readonly userId: string
|
|
545
|
-
|
|
546
|
-
/**
|
|
547
|
-
*
|
|
548
|
-
* @type {string}
|
|
549
|
-
* @memberof OptionsApiGetOptionsChain
|
|
550
|
-
*/
|
|
551
|
-
readonly userSecret: string
|
|
552
|
-
|
|
553
|
-
/**
|
|
554
|
-
* The ID of the account get positions.
|
|
555
|
-
* @type {string}
|
|
556
|
-
* @memberof OptionsApiGetOptionsChain
|
|
557
|
-
*/
|
|
558
|
-
readonly accountId: string
|
|
559
|
-
|
|
560
|
-
/**
|
|
561
|
-
* Universal symbol ID if symbol
|
|
562
|
-
* @type {string}
|
|
563
|
-
* @memberof OptionsApiGetOptionsChain
|
|
564
|
-
*/
|
|
565
|
-
readonly symbol: string
|
|
566
|
-
|
|
567
|
-
}
|
|
568
|
-
|
|
569
|
-
/**
|
|
570
|
-
* Request parameters for getOptionsStrategyQuote operation in OptionsApi.
|
|
571
|
-
* @export
|
|
572
|
-
* @interface OptionsApiGetOptionsStrategyQuoteRequest
|
|
573
|
-
*/
|
|
574
|
-
export type OptionsApiGetOptionsStrategyQuoteRequest = {
|
|
575
|
-
|
|
576
|
-
/**
|
|
577
|
-
*
|
|
578
|
-
* @type {string}
|
|
579
|
-
* @memberof OptionsApiGetOptionsStrategyQuote
|
|
580
|
-
*/
|
|
581
|
-
readonly userId: string
|
|
582
|
-
|
|
583
|
-
/**
|
|
584
|
-
*
|
|
585
|
-
* @type {string}
|
|
586
|
-
* @memberof OptionsApiGetOptionsStrategyQuote
|
|
587
|
-
*/
|
|
588
|
-
readonly userSecret: string
|
|
589
|
-
|
|
590
|
-
/**
|
|
591
|
-
* The ID of the account get positions.
|
|
592
|
-
* @type {string}
|
|
593
|
-
* @memberof OptionsApiGetOptionsStrategyQuote
|
|
594
|
-
*/
|
|
595
|
-
readonly accountId: string
|
|
596
|
-
|
|
597
|
-
/**
|
|
598
|
-
* Option strategy id obtained from response when creating option strategy object
|
|
599
|
-
* @type {string}
|
|
600
|
-
* @memberof OptionsApiGetOptionsStrategyQuote
|
|
601
|
-
*/
|
|
602
|
-
readonly optionStrategyId: string
|
|
603
|
-
|
|
604
|
-
}
|
|
605
|
-
|
|
606
|
-
/**
|
|
607
|
-
* Request parameters for listOptionHoldings operation in OptionsApi.
|
|
608
|
-
* @export
|
|
609
|
-
* @interface OptionsApiListOptionHoldingsRequest
|
|
610
|
-
*/
|
|
611
|
-
export type OptionsApiListOptionHoldingsRequest = {
|
|
612
|
-
|
|
613
|
-
/**
|
|
614
|
-
*
|
|
615
|
-
* @type {string}
|
|
616
|
-
* @memberof OptionsApiListOptionHoldings
|
|
617
|
-
*/
|
|
618
|
-
readonly userId: string
|
|
619
|
-
|
|
620
|
-
/**
|
|
621
|
-
*
|
|
622
|
-
* @type {string}
|
|
623
|
-
* @memberof OptionsApiListOptionHoldings
|
|
624
|
-
*/
|
|
625
|
-
readonly userSecret: string
|
|
626
|
-
|
|
627
|
-
/**
|
|
628
|
-
* The ID of the account get positions.
|
|
629
|
-
* @type {string}
|
|
630
|
-
* @memberof OptionsApiListOptionHoldings
|
|
631
|
-
*/
|
|
632
|
-
readonly accountId: string
|
|
633
|
-
|
|
634
|
-
}
|
|
635
|
-
|
|
636
|
-
/**
|
|
637
|
-
* Request parameters for placeOptionStrategy operation in OptionsApi.
|
|
638
|
-
* @export
|
|
639
|
-
* @interface OptionsApiPlaceOptionStrategyRequest
|
|
640
|
-
*/
|
|
641
|
-
export type OptionsApiPlaceOptionStrategyRequest = {
|
|
642
|
-
|
|
643
|
-
/**
|
|
644
|
-
*
|
|
645
|
-
* @type {string}
|
|
646
|
-
* @memberof OptionsApiPlaceOptionStrategy
|
|
647
|
-
*/
|
|
648
|
-
readonly userId: string
|
|
649
|
-
|
|
650
|
-
/**
|
|
651
|
-
*
|
|
652
|
-
* @type {string}
|
|
653
|
-
* @memberof OptionsApiPlaceOptionStrategy
|
|
654
|
-
*/
|
|
655
|
-
readonly userSecret: string
|
|
656
|
-
|
|
657
|
-
/**
|
|
658
|
-
* The ID of the account get positions.
|
|
659
|
-
* @type {string}
|
|
660
|
-
* @memberof OptionsApiPlaceOptionStrategy
|
|
661
|
-
*/
|
|
662
|
-
readonly accountId: string
|
|
663
|
-
|
|
664
|
-
/**
|
|
665
|
-
* Option strategy id obtained from response when creating option strategy object
|
|
666
|
-
* @type {string}
|
|
667
|
-
* @memberof OptionsApiPlaceOptionStrategy
|
|
668
|
-
*/
|
|
669
|
-
readonly optionStrategyId: string
|
|
670
|
-
|
|
671
|
-
} & OptionsPlaceOptionStrategyRequest
|
|
672
|
-
|
|
673
|
-
/**
|
|
674
|
-
* OptionsApi - object-oriented interface
|
|
675
|
-
* @export
|
|
676
|
-
* @class OptionsApi
|
|
677
|
-
* @extends {BaseAPI}
|
|
678
|
-
*/
|
|
679
|
-
export class OptionsApi extends OptionsApiCustom {
|
|
680
|
-
/**
|
|
681
|
-
*
|
|
682
|
-
* @summary Creates an option strategy object that will be used to place an option strategy order
|
|
683
|
-
* @param {OptionsApiGetOptionStrategyRequest} requestParameters Request parameters.
|
|
684
|
-
* @param {*} [options] Override http request option.
|
|
685
|
-
* @throws {RequiredError}
|
|
686
|
-
* @memberof OptionsApi
|
|
687
|
-
*/
|
|
688
|
-
public getOptionStrategy(requestParameters: OptionsApiGetOptionStrategyRequest, options?: AxiosRequestConfig) {
|
|
689
|
-
return OptionsApiFp(this.configuration).getOptionStrategy(requestParameters, options).then((request) => request(this.axios, this.basePath));
|
|
690
|
-
}
|
|
691
|
-
|
|
692
|
-
/**
|
|
693
|
-
*
|
|
694
|
-
* @summary Get the options chain
|
|
695
|
-
* @param {OptionsApiGetOptionsChainRequest} requestParameters Request parameters.
|
|
696
|
-
* @param {*} [options] Override http request option.
|
|
697
|
-
* @throws {RequiredError}
|
|
698
|
-
* @memberof OptionsApi
|
|
699
|
-
*/
|
|
700
|
-
public getOptionsChain(requestParameters: OptionsApiGetOptionsChainRequest, options?: AxiosRequestConfig) {
|
|
701
|
-
return OptionsApiFp(this.configuration).getOptionsChain(requestParameters, options).then((request) => request(this.axios, this.basePath));
|
|
702
|
-
}
|
|
703
|
-
|
|
704
|
-
/**
|
|
705
|
-
*
|
|
706
|
-
* @summary Get latest market data of option strategy
|
|
707
|
-
* @param {OptionsApiGetOptionsStrategyQuoteRequest} requestParameters Request parameters.
|
|
708
|
-
* @param {*} [options] Override http request option.
|
|
709
|
-
* @throws {RequiredError}
|
|
710
|
-
* @memberof OptionsApi
|
|
711
|
-
*/
|
|
712
|
-
public getOptionsStrategyQuote(requestParameters: OptionsApiGetOptionsStrategyQuoteRequest, options?: AxiosRequestConfig) {
|
|
713
|
-
return OptionsApiFp(this.configuration).getOptionsStrategyQuote(requestParameters, options).then((request) => request(this.axios, this.basePath));
|
|
714
|
-
}
|
|
715
|
-
|
|
716
|
-
/**
|
|
717
|
-
*
|
|
718
|
-
* @summary Get the options holdings in the account
|
|
719
|
-
* @param {OptionsApiListOptionHoldingsRequest} requestParameters Request parameters.
|
|
720
|
-
* @param {*} [options] Override http request option.
|
|
721
|
-
* @throws {RequiredError}
|
|
722
|
-
* @memberof OptionsApi
|
|
723
|
-
*/
|
|
724
|
-
public listOptionHoldings(requestParameters: OptionsApiListOptionHoldingsRequest, options?: AxiosRequestConfig) {
|
|
725
|
-
return OptionsApiFp(this.configuration).listOptionHoldings(requestParameters, options).then((request) => request(this.axios, this.basePath));
|
|
726
|
-
}
|
|
727
|
-
|
|
728
|
-
/**
|
|
729
|
-
*
|
|
730
|
-
* @summary Place an option strategy order on the brokerage
|
|
731
|
-
* @param {OptionsApiPlaceOptionStrategyRequest} requestParameters Request parameters.
|
|
732
|
-
* @param {*} [options] Override http request option.
|
|
733
|
-
* @throws {RequiredError}
|
|
734
|
-
* @memberof OptionsApi
|
|
735
|
-
*/
|
|
736
|
-
public placeOptionStrategy(requestParameters: OptionsApiPlaceOptionStrategyRequest, options?: AxiosRequestConfig) {
|
|
737
|
-
return OptionsApiFp(this.configuration).placeOptionStrategy(requestParameters, options).then((request) => request(this.axios, this.basePath));
|
|
738
|
-
}
|
|
739
|
-
}
|