snaptrade-typescript-sdk 9.0.178 → 9.0.180
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 +46 -46
- package/dist/api/account-information-api-generated.d.ts +12 -12
- package/dist/api/api-status-api-generated.d.ts +1 -1
- package/dist/api/authentication-api-generated.d.ts +5 -5
- package/dist/api/connections-api-generated.d.ts +8 -8
- package/dist/api/experimental-endpoints-api-generated.d.ts +4 -4
- package/dist/api/options-api-generated.d.ts +1 -69
- package/dist/api/options-api-generated.js +0 -95
- package/dist/api/reference-data-api-generated.d.ts +12 -12
- package/dist/api/trading-api-generated.d.ts +82 -14
- package/dist/api/trading-api-generated.js +95 -0
- package/dist/api/transactions-and-reporting-api-generated.d.ts +2 -2
- package/dist/browser.js +1 -1
- package/dist/browser.js.LICENSE.txt +1 -1
- package/dist/common.d.ts +1 -1
- package/dist/configuration.js +1 -1
- package/dist/models/account-order-record.d.ts +3 -3
- package/dist/models/account-universal-activity.d.ts +1 -1
- package/dist/models/order-updated-response-order.d.ts +3 -3
- package/dist/models/snap-trade-login-user-request-body.d.ts +1 -1
- package/dist/operationParameterMap.js +16 -16
- package/package.json +2 -2
|
@@ -35,67 +35,6 @@ const requestBeforeHook_1 = require("../requestBeforeHook");
|
|
|
35
35
|
*/
|
|
36
36
|
const OptionsApiAxiosParamCreator = function (configuration) {
|
|
37
37
|
return {
|
|
38
|
-
/**
|
|
39
|
-
* Returns a quote for a single option contract. The option contract is specified using in the 21 character OCC format. For example `AAPL 251114C00240000` represents a call option on AAPL expiring on 2025-11-14 with a strike price of $240. For more information on the OCC format, see [here](https://en.wikipedia.org/wiki/Option_symbol#OCC_format) **Note:** These are derived values and are not suitable for trading purposes.
|
|
40
|
-
* @summary Get option quote
|
|
41
|
-
* @param {string} userId
|
|
42
|
-
* @param {string} userSecret
|
|
43
|
-
* @param {string} accountId
|
|
44
|
-
* @param {string} symbol The OCC-formatted option symbol.
|
|
45
|
-
* @param {*} [options] Override http request option.
|
|
46
|
-
* @throws {RequiredError}
|
|
47
|
-
*/
|
|
48
|
-
getUserAccountOptionQuotes: (userId, userSecret, accountId, symbol, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
49
|
-
// verify required parameter 'userId' is not null or undefined
|
|
50
|
-
(0, common_1.assertParamExists)('getUserAccountOptionQuotes', 'userId', userId);
|
|
51
|
-
// verify required parameter 'userSecret' is not null or undefined
|
|
52
|
-
(0, common_1.assertParamExists)('getUserAccountOptionQuotes', 'userSecret', userSecret);
|
|
53
|
-
// verify required parameter 'accountId' is not null or undefined
|
|
54
|
-
(0, common_1.assertParamExists)('getUserAccountOptionQuotes', 'accountId', accountId);
|
|
55
|
-
// verify required parameter 'symbol' is not null or undefined
|
|
56
|
-
(0, common_1.assertParamExists)('getUserAccountOptionQuotes', 'symbol', symbol);
|
|
57
|
-
const localVarPath = `/accounts/{accountId}/quotes/options`
|
|
58
|
-
.replace(`{${"accountId"}}`, encodeURIComponent(String(accountId !== undefined ? accountId : `-accountId-`)));
|
|
59
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
60
|
-
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
61
|
-
let baseOptions;
|
|
62
|
-
if (configuration) {
|
|
63
|
-
baseOptions = configuration.baseOptions;
|
|
64
|
-
}
|
|
65
|
-
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
66
|
-
const localVarHeaderParameter = configuration && !(0, common_1.isBrowser)() ? { "User-Agent": configuration.userAgent } : {};
|
|
67
|
-
const localVarQueryParameter = {};
|
|
68
|
-
// authentication PartnerClientId required
|
|
69
|
-
yield (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, key: "clientId", keyParamName: "clientId", configuration });
|
|
70
|
-
// authentication PartnerSignature required
|
|
71
|
-
yield (0, common_1.setApiKeyToObject)({ object: localVarHeaderParameter, key: "Signature", keyParamName: "signature", configuration });
|
|
72
|
-
// authentication PartnerTimestamp required
|
|
73
|
-
yield (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, key: "timestamp", keyParamName: "timestamp", configuration });
|
|
74
|
-
if (userId !== undefined) {
|
|
75
|
-
localVarQueryParameter['userId'] = userId;
|
|
76
|
-
}
|
|
77
|
-
if (userSecret !== undefined) {
|
|
78
|
-
localVarQueryParameter['userSecret'] = userSecret;
|
|
79
|
-
}
|
|
80
|
-
if (symbol !== undefined) {
|
|
81
|
-
localVarQueryParameter['symbol'] = symbol;
|
|
82
|
-
}
|
|
83
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
84
|
-
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
85
|
-
(0, requestBeforeHook_1.requestBeforeHook)({
|
|
86
|
-
queryParameters: localVarQueryParameter,
|
|
87
|
-
requestConfig: localVarRequestOptions,
|
|
88
|
-
path: localVarPath,
|
|
89
|
-
configuration,
|
|
90
|
-
pathTemplate: '/accounts/{accountId}/quotes/options',
|
|
91
|
-
httpMethod: 'GET'
|
|
92
|
-
});
|
|
93
|
-
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
94
|
-
return {
|
|
95
|
-
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
96
|
-
options: localVarRequestOptions,
|
|
97
|
-
};
|
|
98
|
-
}),
|
|
99
38
|
/**
|
|
100
39
|
* Returns a list of option positions in the specified account. For stock/ETF/crypto/mutual fund positions, please use the [positions endpoint](/reference/Account%20Information/AccountInformation_getUserAccountPositions). Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do, this endpoint returns real-time data. - If you don\'t, the data is cached and refreshed once a day. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://support.snaptrade.com/brokerages-table?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for \"Cache Expiry Time\" to see the exact value for a specific brokerage. If you need real-time, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint.
|
|
101
40
|
* @summary List account option positions
|
|
@@ -161,19 +100,6 @@ exports.OptionsApiAxiosParamCreator = OptionsApiAxiosParamCreator;
|
|
|
161
100
|
const OptionsApiFp = function (configuration) {
|
|
162
101
|
const localVarAxiosParamCreator = (0, exports.OptionsApiAxiosParamCreator)(configuration);
|
|
163
102
|
return {
|
|
164
|
-
/**
|
|
165
|
-
* Returns a quote for a single option contract. The option contract is specified using in the 21 character OCC format. For example `AAPL 251114C00240000` represents a call option on AAPL expiring on 2025-11-14 with a strike price of $240. For more information on the OCC format, see [here](https://en.wikipedia.org/wiki/Option_symbol#OCC_format) **Note:** These are derived values and are not suitable for trading purposes.
|
|
166
|
-
* @summary Get option quote
|
|
167
|
-
* @param {OptionsApiGetUserAccountOptionQuotesRequest} requestParameters Request parameters.
|
|
168
|
-
* @param {*} [options] Override http request option.
|
|
169
|
-
* @throws {RequiredError}
|
|
170
|
-
*/
|
|
171
|
-
getUserAccountOptionQuotes(requestParameters, options) {
|
|
172
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
173
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.getUserAccountOptionQuotes(requestParameters.userId, requestParameters.userSecret, requestParameters.accountId, requestParameters.symbol, options);
|
|
174
|
-
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
175
|
-
});
|
|
176
|
-
},
|
|
177
103
|
/**
|
|
178
104
|
* Returns a list of option positions in the specified account. For stock/ETF/crypto/mutual fund positions, please use the [positions endpoint](/reference/Account%20Information/AccountInformation_getUserAccountPositions). Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do, this endpoint returns real-time data. - If you don\'t, the data is cached and refreshed once a day. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://support.snaptrade.com/brokerages-table?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for \"Cache Expiry Time\" to see the exact value for a specific brokerage. If you need real-time, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint.
|
|
179
105
|
* @summary List account option positions
|
|
@@ -197,16 +123,6 @@ exports.OptionsApiFp = OptionsApiFp;
|
|
|
197
123
|
const OptionsApiFactory = function (configuration, basePath, axios) {
|
|
198
124
|
const localVarFp = (0, exports.OptionsApiFp)(configuration);
|
|
199
125
|
return {
|
|
200
|
-
/**
|
|
201
|
-
* Returns a quote for a single option contract. The option contract is specified using in the 21 character OCC format. For example `AAPL 251114C00240000` represents a call option on AAPL expiring on 2025-11-14 with a strike price of $240. For more information on the OCC format, see [here](https://en.wikipedia.org/wiki/Option_symbol#OCC_format) **Note:** These are derived values and are not suitable for trading purposes.
|
|
202
|
-
* @summary Get option quote
|
|
203
|
-
* @param {OptionsApiGetUserAccountOptionQuotesRequest} requestParameters Request parameters.
|
|
204
|
-
* @param {*} [options] Override http request option.
|
|
205
|
-
* @throws {RequiredError}
|
|
206
|
-
*/
|
|
207
|
-
getUserAccountOptionQuotes(requestParameters, options) {
|
|
208
|
-
return localVarFp.getUserAccountOptionQuotes(requestParameters, options).then((request) => request(axios, basePath));
|
|
209
|
-
},
|
|
210
126
|
/**
|
|
211
127
|
* Returns a list of option positions in the specified account. For stock/ETF/crypto/mutual fund positions, please use the [positions endpoint](/reference/Account%20Information/AccountInformation_getUserAccountPositions). Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do, this endpoint returns real-time data. - If you don\'t, the data is cached and refreshed once a day. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://support.snaptrade.com/brokerages-table?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for \"Cache Expiry Time\" to see the exact value for a specific brokerage. If you need real-time, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint.
|
|
212
128
|
* @summary List account option positions
|
|
@@ -227,17 +143,6 @@ exports.OptionsApiFactory = OptionsApiFactory;
|
|
|
227
143
|
* @extends {BaseAPI}
|
|
228
144
|
*/
|
|
229
145
|
class OptionsApiGenerated extends base_1.BaseAPI {
|
|
230
|
-
/**
|
|
231
|
-
* Returns a quote for a single option contract. The option contract is specified using in the 21 character OCC format. For example `AAPL 251114C00240000` represents a call option on AAPL expiring on 2025-11-14 with a strike price of $240. For more information on the OCC format, see [here](https://en.wikipedia.org/wiki/Option_symbol#OCC_format) **Note:** These are derived values and are not suitable for trading purposes.
|
|
232
|
-
* @summary Get option quote
|
|
233
|
-
* @param {OptionsApiGetUserAccountOptionQuotesRequest} requestParameters Request parameters.
|
|
234
|
-
* @param {*} [options] Override http request option.
|
|
235
|
-
* @throws {RequiredError}
|
|
236
|
-
* @memberof OptionsApiGenerated
|
|
237
|
-
*/
|
|
238
|
-
getUserAccountOptionQuotes(requestParameters, options) {
|
|
239
|
-
return (0, exports.OptionsApiFp)(this.configuration).getUserAccountOptionQuotes(requestParameters, options).then((request) => request(this.axios, this.basePath));
|
|
240
|
-
}
|
|
241
146
|
/**
|
|
242
147
|
* Returns a list of option positions in the specified account. For stock/ETF/crypto/mutual fund positions, please use the [positions endpoint](/reference/Account%20Information/AccountInformation_getUserAccountPositions). Check your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing) to see if you have real-time data access: - If you do, this endpoint returns real-time data. - If you don\'t, the data is cached and refreshed once a day. How long the data is cached for varies by brokerage. Check the [brokerage integrations doc](https://support.snaptrade.com/brokerages-table?v=d16c4c97b8d5438bbb2d8581ac53b11e) and look for \"Cache Expiry Time\" to see the exact value for a specific brokerage. If you need real-time, use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint.
|
|
243
148
|
* @summary List account option positions
|
|
@@ -400,7 +400,7 @@ export declare class ReferenceDataApiGenerated extends BaseAPI {
|
|
|
400
400
|
* @throws {RequiredError}
|
|
401
401
|
* @memberof ReferenceDataApiGenerated
|
|
402
402
|
*/
|
|
403
|
-
getCurrencyExchangeRatePair(requestParameters: ReferenceDataApiGetCurrencyExchangeRatePairRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ExchangeRatePairs, any>>;
|
|
403
|
+
getCurrencyExchangeRatePair(requestParameters: ReferenceDataApiGetCurrencyExchangeRatePairRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ExchangeRatePairs, any, {}>>;
|
|
404
404
|
/**
|
|
405
405
|
* Returns configurations for your SnapTrade Client ID, including allowed brokerages and data access.
|
|
406
406
|
* @summary Get Client Info
|
|
@@ -408,7 +408,7 @@ export declare class ReferenceDataApiGenerated extends BaseAPI {
|
|
|
408
408
|
* @throws {RequiredError}
|
|
409
409
|
* @memberof ReferenceDataApiGenerated
|
|
410
410
|
*/
|
|
411
|
-
getPartnerInfo(options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<PartnerData, any>>;
|
|
411
|
+
getPartnerInfo(options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<PartnerData, any, {}>>;
|
|
412
412
|
/**
|
|
413
413
|
* Return all available security types supported by SnapTrade.
|
|
414
414
|
* @summary List security types
|
|
@@ -416,7 +416,7 @@ export declare class ReferenceDataApiGenerated extends BaseAPI {
|
|
|
416
416
|
* @throws {RequiredError}
|
|
417
417
|
* @memberof ReferenceDataApiGenerated
|
|
418
418
|
*/
|
|
419
|
-
getSecurityTypes(options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<SecurityType[], any>>;
|
|
419
|
+
getSecurityTypes(options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<SecurityType[], any, {}>>;
|
|
420
420
|
/**
|
|
421
421
|
* Returns a list of all supported Exchanges.
|
|
422
422
|
* @summary Get exchanges
|
|
@@ -424,7 +424,7 @@ export declare class ReferenceDataApiGenerated extends BaseAPI {
|
|
|
424
424
|
* @throws {RequiredError}
|
|
425
425
|
* @memberof ReferenceDataApiGenerated
|
|
426
426
|
*/
|
|
427
|
-
getStockExchanges(options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<Exchange[], any>>;
|
|
427
|
+
getStockExchanges(options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<Exchange[], any, {}>>;
|
|
428
428
|
/**
|
|
429
429
|
* Returns a list of Universal Symbol objects that match the given query. The matching takes into consideration both the ticker and the name of the symbol. Only the first 20 results are returned.
|
|
430
430
|
* @summary Search symbols
|
|
@@ -433,7 +433,7 @@ export declare class ReferenceDataApiGenerated extends BaseAPI {
|
|
|
433
433
|
* @throws {RequiredError}
|
|
434
434
|
* @memberof ReferenceDataApiGenerated
|
|
435
435
|
*/
|
|
436
|
-
getSymbols(requestParameters?: ReferenceDataApiGetSymbolsRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<UniversalSymbol[], any>>;
|
|
436
|
+
getSymbols(requestParameters?: ReferenceDataApiGetSymbolsRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<UniversalSymbol[], any, {}>>;
|
|
437
437
|
/**
|
|
438
438
|
* Returns the Universal Symbol object specified by the ticker or the Universal Symbol ID. When a ticker is specified, the first matching result is returned. We largely follow the [Yahoo Finance ticker format](https://help.yahoo.com/kb/SLN2310.html)(click on \"Yahoo Finance Market Coverage and Data Delays\"). For example, for securities traded on the Toronto Stock Exchange, the symbol has a \'.TO\' suffix. For securities traded on NASDAQ or NYSE, the symbol does not have a suffix. Please use the ticker with the proper suffix for the best results.
|
|
439
439
|
* @summary Get symbol detail
|
|
@@ -442,7 +442,7 @@ export declare class ReferenceDataApiGenerated extends BaseAPI {
|
|
|
442
442
|
* @throws {RequiredError}
|
|
443
443
|
* @memberof ReferenceDataApiGenerated
|
|
444
444
|
*/
|
|
445
|
-
getSymbolsByTicker(requestParameters: ReferenceDataApiGetSymbolsByTickerRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<UniversalSymbol, any>>;
|
|
445
|
+
getSymbolsByTicker(requestParameters: ReferenceDataApiGetSymbolsByTickerRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<UniversalSymbol, any, {}>>;
|
|
446
446
|
/**
|
|
447
447
|
* Returns a list of all defined Brokerage authorization Type objects.
|
|
448
448
|
* @summary Get all brokerage authorization types
|
|
@@ -451,7 +451,7 @@ export declare class ReferenceDataApiGenerated extends BaseAPI {
|
|
|
451
451
|
* @throws {RequiredError}
|
|
452
452
|
* @memberof ReferenceDataApiGenerated
|
|
453
453
|
*/
|
|
454
|
-
listAllBrokerageAuthorizationType(requestParameters?: ReferenceDataApiListAllBrokerageAuthorizationTypeRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<BrokerageAuthorizationTypeReadOnly[], any>>;
|
|
454
|
+
listAllBrokerageAuthorizationType(requestParameters?: ReferenceDataApiListAllBrokerageAuthorizationTypeRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<BrokerageAuthorizationTypeReadOnly[], any, {}>>;
|
|
455
455
|
/**
|
|
456
456
|
* Returns a list of all brokerage instruments available for a given brokerage. Not all brokerages support this. The ones that don\'t will return an empty list.
|
|
457
457
|
* @summary Get brokerage instruments
|
|
@@ -460,7 +460,7 @@ export declare class ReferenceDataApiGenerated extends BaseAPI {
|
|
|
460
460
|
* @throws {RequiredError}
|
|
461
461
|
* @memberof ReferenceDataApiGenerated
|
|
462
462
|
*/
|
|
463
|
-
listAllBrokerageInstruments(requestParameters: ReferenceDataApiListAllBrokerageInstrumentsRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<BrokerageInstrumentsResponse, any>>;
|
|
463
|
+
listAllBrokerageInstruments(requestParameters: ReferenceDataApiListAllBrokerageInstrumentsRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<BrokerageInstrumentsResponse, any, {}>>;
|
|
464
464
|
/**
|
|
465
465
|
* Returns a list of all defined Brokerage objects.
|
|
466
466
|
* @summary Get brokerages
|
|
@@ -468,7 +468,7 @@ export declare class ReferenceDataApiGenerated extends BaseAPI {
|
|
|
468
468
|
* @throws {RequiredError}
|
|
469
469
|
* @memberof ReferenceDataApiGenerated
|
|
470
470
|
*/
|
|
471
|
-
listAllBrokerages(options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<Brokerage[], any>>;
|
|
471
|
+
listAllBrokerages(options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<Brokerage[], any, {}>>;
|
|
472
472
|
/**
|
|
473
473
|
* Returns a list of all defined Currency objects.
|
|
474
474
|
* @summary Get currencies
|
|
@@ -476,7 +476,7 @@ export declare class ReferenceDataApiGenerated extends BaseAPI {
|
|
|
476
476
|
* @throws {RequiredError}
|
|
477
477
|
* @memberof ReferenceDataApiGenerated
|
|
478
478
|
*/
|
|
479
|
-
listAllCurrencies(options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<Currency[], any>>;
|
|
479
|
+
listAllCurrencies(options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<Currency[], any, {}>>;
|
|
480
480
|
/**
|
|
481
481
|
* Returns a list of all Exchange Rate Pairs for all supported Currencies.
|
|
482
482
|
* @summary Get currency exchange rates
|
|
@@ -484,7 +484,7 @@ export declare class ReferenceDataApiGenerated extends BaseAPI {
|
|
|
484
484
|
* @throws {RequiredError}
|
|
485
485
|
* @memberof ReferenceDataApiGenerated
|
|
486
486
|
*/
|
|
487
|
-
listAllCurrenciesRates(options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ExchangeRatePairs[], any>>;
|
|
487
|
+
listAllCurrenciesRates(options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ExchangeRatePairs[], any, {}>>;
|
|
488
488
|
/**
|
|
489
489
|
* Returns a list of Universal Symbol objects that match the given query. The matching takes into consideration both the ticker and the name of the symbol. Only the first 20 results are returned. The search results are further limited to the symbols supported by the brokerage for which the account is under.
|
|
490
490
|
* @summary Search account symbols
|
|
@@ -493,5 +493,5 @@ export declare class ReferenceDataApiGenerated extends BaseAPI {
|
|
|
493
493
|
* @throws {RequiredError}
|
|
494
494
|
* @memberof ReferenceDataApiGenerated
|
|
495
495
|
*/
|
|
496
|
-
symbolSearchUserAccount(requestParameters: ReferenceDataApiSymbolSearchUserAccountRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<UniversalSymbol[], any>>;
|
|
496
|
+
symbolSearchUserAccount(requestParameters: ReferenceDataApiSymbolSearchUserAccountRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<UniversalSymbol[], any, {}>>;
|
|
497
497
|
}
|
|
@@ -15,6 +15,7 @@ import { ManualTradeReplaceForm } from '../models';
|
|
|
15
15
|
import { MlegOrderResponse } from '../models';
|
|
16
16
|
import { MlegTradeForm } from '../models';
|
|
17
17
|
import { OptionImpact } from '../models';
|
|
18
|
+
import { OptionQuote } from '../models';
|
|
18
19
|
import { OrderUpdatedResponse } from '../models';
|
|
19
20
|
import { SymbolsQuotesInner } from '../models';
|
|
20
21
|
import { TradingSearchCryptocurrencyPairInstruments200Response } from '../models';
|
|
@@ -79,6 +80,17 @@ export declare const TradingApiAxiosParamCreator: (configuration?: Configuration
|
|
|
79
80
|
* @throws {RequiredError}
|
|
80
81
|
*/
|
|
81
82
|
getOrderImpact: (userId: string, userSecret: string, manualTradeForm: ManualTradeForm, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
83
|
+
/**
|
|
84
|
+
* Returns a quote for a single option contract. The option contract is specified using in the 21 character OCC format. For example `AAPL 251114C00240000` represents a call option on AAPL expiring on 2025-11-14 with a strike price of $240. For more information on the OCC format, see [here](https://en.wikipedia.org/wiki/Option_symbol#OCC_format) **Note:** These are derived values and are not suitable for trading purposes.
|
|
85
|
+
* @summary Get option quote
|
|
86
|
+
* @param {string} userId
|
|
87
|
+
* @param {string} userSecret
|
|
88
|
+
* @param {string} accountId
|
|
89
|
+
* @param {string} symbol The OCC-formatted option symbol.
|
|
90
|
+
* @param {*} [options] Override http request option.
|
|
91
|
+
* @throws {RequiredError}
|
|
92
|
+
*/
|
|
93
|
+
getUserAccountOptionQuotes: (userId: string, userSecret: string, accountId: string, symbol: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
82
94
|
/**
|
|
83
95
|
* Returns quotes from the brokerage for the specified symbols and account. The quotes returned can be delayed depending on the brokerage the account belongs to. It is highly recommended that you use your own market data provider for real-time quotes instead of relying on this endpoint. **This endpoint is not a substitute for a market data provider. Frequent polling of this endpoint may result in the disabling of your keys** This endpoint does not work for options quotes. This endpoint is disabled for free plans by default. Please contact support to enable this endpoint if needed.
|
|
84
96
|
* @summary Get equity symbol quotes
|
|
@@ -226,6 +238,14 @@ export declare const TradingApiFp: (configuration?: Configuration) => {
|
|
|
226
238
|
* @throws {RequiredError}
|
|
227
239
|
*/
|
|
228
240
|
getOrderImpact(requestParameters: TradingApiGetOrderImpactRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ManualTradeAndImpact>>;
|
|
241
|
+
/**
|
|
242
|
+
* Returns a quote for a single option contract. The option contract is specified using in the 21 character OCC format. For example `AAPL 251114C00240000` represents a call option on AAPL expiring on 2025-11-14 with a strike price of $240. For more information on the OCC format, see [here](https://en.wikipedia.org/wiki/Option_symbol#OCC_format) **Note:** These are derived values and are not suitable for trading purposes.
|
|
243
|
+
* @summary Get option quote
|
|
244
|
+
* @param {TradingApiGetUserAccountOptionQuotesRequest} requestParameters Request parameters.
|
|
245
|
+
* @param {*} [options] Override http request option.
|
|
246
|
+
* @throws {RequiredError}
|
|
247
|
+
*/
|
|
248
|
+
getUserAccountOptionQuotes(requestParameters: TradingApiGetUserAccountOptionQuotesRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<OptionQuote>>;
|
|
229
249
|
/**
|
|
230
250
|
* Returns quotes from the brokerage for the specified symbols and account. The quotes returned can be delayed depending on the brokerage the account belongs to. It is highly recommended that you use your own market data provider for real-time quotes instead of relying on this endpoint. **This endpoint is not a substitute for a market data provider. Frequent polling of this endpoint may result in the disabling of your keys** This endpoint does not work for options quotes. This endpoint is disabled for free plans by default. Please contact support to enable this endpoint if needed.
|
|
231
251
|
* @summary Get equity symbol quotes
|
|
@@ -345,6 +365,14 @@ export declare const TradingApiFactory: (configuration?: Configuration, basePath
|
|
|
345
365
|
* @throws {RequiredError}
|
|
346
366
|
*/
|
|
347
367
|
getOrderImpact(requestParameters: TradingApiGetOrderImpactRequest, options?: AxiosRequestConfig): AxiosPromise<ManualTradeAndImpact>;
|
|
368
|
+
/**
|
|
369
|
+
* Returns a quote for a single option contract. The option contract is specified using in the 21 character OCC format. For example `AAPL 251114C00240000` represents a call option on AAPL expiring on 2025-11-14 with a strike price of $240. For more information on the OCC format, see [here](https://en.wikipedia.org/wiki/Option_symbol#OCC_format) **Note:** These are derived values and are not suitable for trading purposes.
|
|
370
|
+
* @summary Get option quote
|
|
371
|
+
* @param {TradingApiGetUserAccountOptionQuotesRequest} requestParameters Request parameters.
|
|
372
|
+
* @param {*} [options] Override http request option.
|
|
373
|
+
* @throws {RequiredError}
|
|
374
|
+
*/
|
|
375
|
+
getUserAccountOptionQuotes(requestParameters: TradingApiGetUserAccountOptionQuotesRequest, options?: AxiosRequestConfig): AxiosPromise<OptionQuote>;
|
|
348
376
|
/**
|
|
349
377
|
* Returns quotes from the brokerage for the specified symbols and account. The quotes returned can be delayed depending on the brokerage the account belongs to. It is highly recommended that you use your own market data provider for real-time quotes instead of relying on this endpoint. **This endpoint is not a substitute for a market data provider. Frequent polling of this endpoint may result in the disabling of your keys** This endpoint does not work for options quotes. This endpoint is disabled for free plans by default. Please contact support to enable this endpoint if needed.
|
|
350
378
|
* @summary Get equity symbol quotes
|
|
@@ -543,6 +571,37 @@ export type TradingApiGetOrderImpactRequest = {
|
|
|
543
571
|
*/
|
|
544
572
|
readonly userSecret: string;
|
|
545
573
|
} & ManualTradeForm;
|
|
574
|
+
/**
|
|
575
|
+
* Request parameters for getUserAccountOptionQuotes operation in TradingApi.
|
|
576
|
+
* @export
|
|
577
|
+
* @interface TradingApiGetUserAccountOptionQuotesRequest
|
|
578
|
+
*/
|
|
579
|
+
export type TradingApiGetUserAccountOptionQuotesRequest = {
|
|
580
|
+
/**
|
|
581
|
+
*
|
|
582
|
+
* @type {string}
|
|
583
|
+
* @memberof TradingApiGetUserAccountOptionQuotes
|
|
584
|
+
*/
|
|
585
|
+
readonly userId: string;
|
|
586
|
+
/**
|
|
587
|
+
*
|
|
588
|
+
* @type {string}
|
|
589
|
+
* @memberof TradingApiGetUserAccountOptionQuotes
|
|
590
|
+
*/
|
|
591
|
+
readonly userSecret: string;
|
|
592
|
+
/**
|
|
593
|
+
*
|
|
594
|
+
* @type {string}
|
|
595
|
+
* @memberof TradingApiGetUserAccountOptionQuotes
|
|
596
|
+
*/
|
|
597
|
+
readonly accountId: string;
|
|
598
|
+
/**
|
|
599
|
+
* The OCC-formatted option symbol.
|
|
600
|
+
* @type {string}
|
|
601
|
+
* @memberof TradingApiGetUserAccountOptionQuotes
|
|
602
|
+
*/
|
|
603
|
+
readonly symbol: string;
|
|
604
|
+
};
|
|
546
605
|
/**
|
|
547
606
|
* Request parameters for getUserAccountQuotes operation in TradingApi.
|
|
548
607
|
* @export
|
|
@@ -801,7 +860,7 @@ export declare class TradingApiGenerated extends BaseAPI {
|
|
|
801
860
|
* @throws {RequiredError}
|
|
802
861
|
* @memberof TradingApiGenerated
|
|
803
862
|
*/
|
|
804
|
-
cancelOrder(requestParameters: TradingApiCancelOrderRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CancelOrderResponse, any>>;
|
|
863
|
+
cancelOrder(requestParameters: TradingApiCancelOrderRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CancelOrderResponse, any, {}>>;
|
|
805
864
|
/**
|
|
806
865
|
* **This endpoint is deprecated. Please switch to [the new cancel order endpoint](/reference/Trading/Trading_cancelOrder) ** Attempts to cancel an open order with the brokerage. If the order is no longer cancellable, the request will be rejected.
|
|
807
866
|
* @summary Cancel equity order
|
|
@@ -811,7 +870,7 @@ export declare class TradingApiGenerated extends BaseAPI {
|
|
|
811
870
|
* @throws {RequiredError}
|
|
812
871
|
* @memberof TradingApiGenerated
|
|
813
872
|
*/
|
|
814
|
-
cancelUserAccountOrder(requestParameters: TradingApiCancelUserAccountOrderRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<AccountOrderRecord, any>>;
|
|
873
|
+
cancelUserAccountOrder(requestParameters: TradingApiCancelUserAccountOrderRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<AccountOrderRecord, any, {}>>;
|
|
815
874
|
/**
|
|
816
875
|
* Gets a quote for the specified account.
|
|
817
876
|
* @summary Get crypto pair quote
|
|
@@ -820,7 +879,7 @@ export declare class TradingApiGenerated extends BaseAPI {
|
|
|
820
879
|
* @throws {RequiredError}
|
|
821
880
|
* @memberof TradingApiGenerated
|
|
822
881
|
*/
|
|
823
|
-
getCryptocurrencyPairQuote(requestParameters: TradingApiGetCryptocurrencyPairQuoteRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CryptocurrencyPairQuote, any>>;
|
|
882
|
+
getCryptocurrencyPairQuote(requestParameters: TradingApiGetCryptocurrencyPairQuoteRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CryptocurrencyPairQuote, any, {}>>;
|
|
824
883
|
/**
|
|
825
884
|
* Simulates an option order with up to 4 legs and returns the estimated cost and transaction fees without placing it. Only supported for certain enabled brokerages. Please refer to the [brokerage trading support page](https://support.snaptrade.com/brokerages) for more information on which brokerages support this endpoint.
|
|
826
885
|
* @summary Get option order impact
|
|
@@ -829,7 +888,7 @@ export declare class TradingApiGenerated extends BaseAPI {
|
|
|
829
888
|
* @throws {RequiredError}
|
|
830
889
|
* @memberof TradingApiGenerated
|
|
831
890
|
*/
|
|
832
|
-
getOptionImpact(requestParameters: TradingApiGetOptionImpactRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<OptionImpact, any>>;
|
|
891
|
+
getOptionImpact(requestParameters: TradingApiGetOptionImpactRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<OptionImpact, any, {}>>;
|
|
833
892
|
/**
|
|
834
893
|
* Simulates an order and its impact on the account. This endpoint does not place the order with the brokerage. If successful, it returns a `Trade` object and the ID of the object can be used to place the order with the brokerage using the [place checked order endpoint](/reference/Trading/Trading_placeOrder). Please note that the `Trade` object returned expires after 5 minutes. Any order placed using an expired `Trade` will be rejected.
|
|
835
894
|
* @summary Check equity order impact
|
|
@@ -838,7 +897,16 @@ export declare class TradingApiGenerated extends BaseAPI {
|
|
|
838
897
|
* @throws {RequiredError}
|
|
839
898
|
* @memberof TradingApiGenerated
|
|
840
899
|
*/
|
|
841
|
-
getOrderImpact(requestParameters: TradingApiGetOrderImpactRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ManualTradeAndImpact, any>>;
|
|
900
|
+
getOrderImpact(requestParameters: TradingApiGetOrderImpactRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ManualTradeAndImpact, any, {}>>;
|
|
901
|
+
/**
|
|
902
|
+
* Returns a quote for a single option contract. The option contract is specified using in the 21 character OCC format. For example `AAPL 251114C00240000` represents a call option on AAPL expiring on 2025-11-14 with a strike price of $240. For more information on the OCC format, see [here](https://en.wikipedia.org/wiki/Option_symbol#OCC_format) **Note:** These are derived values and are not suitable for trading purposes.
|
|
903
|
+
* @summary Get option quote
|
|
904
|
+
* @param {TradingApiGetUserAccountOptionQuotesRequest} requestParameters Request parameters.
|
|
905
|
+
* @param {*} [options] Override http request option.
|
|
906
|
+
* @throws {RequiredError}
|
|
907
|
+
* @memberof TradingApiGenerated
|
|
908
|
+
*/
|
|
909
|
+
getUserAccountOptionQuotes(requestParameters: TradingApiGetUserAccountOptionQuotesRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<OptionQuote, any, {}>>;
|
|
842
910
|
/**
|
|
843
911
|
* Returns quotes from the brokerage for the specified symbols and account. The quotes returned can be delayed depending on the brokerage the account belongs to. It is highly recommended that you use your own market data provider for real-time quotes instead of relying on this endpoint. **This endpoint is not a substitute for a market data provider. Frequent polling of this endpoint may result in the disabling of your keys** This endpoint does not work for options quotes. This endpoint is disabled for free plans by default. Please contact support to enable this endpoint if needed.
|
|
844
912
|
* @summary Get equity symbol quotes
|
|
@@ -847,7 +915,7 @@ export declare class TradingApiGenerated extends BaseAPI {
|
|
|
847
915
|
* @throws {RequiredError}
|
|
848
916
|
* @memberof TradingApiGenerated
|
|
849
917
|
*/
|
|
850
|
-
getUserAccountQuotes(requestParameters: TradingApiGetUserAccountQuotesRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<SymbolsQuotesInner[], any>>;
|
|
918
|
+
getUserAccountQuotes(requestParameters: TradingApiGetUserAccountQuotesRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<SymbolsQuotesInner[], any, {}>>;
|
|
851
919
|
/**
|
|
852
920
|
* Places a bracket order (entry order + OCO of stop loss and take profit). Disabled by default please contact support for use. Only supported on certain brokerages
|
|
853
921
|
* @summary Place bracket order
|
|
@@ -856,7 +924,7 @@ export declare class TradingApiGenerated extends BaseAPI {
|
|
|
856
924
|
* @throws {RequiredError}
|
|
857
925
|
* @memberof TradingApiGenerated
|
|
858
926
|
*/
|
|
859
|
-
placeBracketOrder(requestParameters: TradingApiPlaceBracketOrderRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<AccountOrderRecord, any>>;
|
|
927
|
+
placeBracketOrder(requestParameters: TradingApiPlaceBracketOrderRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<AccountOrderRecord, any, {}>>;
|
|
860
928
|
/**
|
|
861
929
|
* Places an order in the specified account. This endpoint does not compute the impact to the account balance from the order before submitting the order.
|
|
862
930
|
* @summary Place crypto order
|
|
@@ -865,7 +933,7 @@ export declare class TradingApiGenerated extends BaseAPI {
|
|
|
865
933
|
* @throws {RequiredError}
|
|
866
934
|
* @memberof TradingApiGenerated
|
|
867
935
|
*/
|
|
868
|
-
placeCryptoOrder(requestParameters: TradingApiPlaceCryptoOrderRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<OrderUpdatedResponse, any>>;
|
|
936
|
+
placeCryptoOrder(requestParameters: TradingApiPlaceCryptoOrderRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<OrderUpdatedResponse, any, {}>>;
|
|
869
937
|
/**
|
|
870
938
|
* Places a brokerage order in the specified account. The order could be rejected by the brokerage if it is invalid or if the account does not have sufficient funds. This endpoint does not compute the impact to the account balance from the order and any potential commissions before submitting the order to the brokerage. If that is desired, you can use the [check order impact endpoint](/reference/Trading/Trading_getOrderImpact). It\'s recommended to trigger a manual refresh of the account after placing an order to ensure the account is up to date. You can use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint for this.
|
|
871
939
|
* @summary Place equity order
|
|
@@ -874,7 +942,7 @@ export declare class TradingApiGenerated extends BaseAPI {
|
|
|
874
942
|
* @throws {RequiredError}
|
|
875
943
|
* @memberof TradingApiGenerated
|
|
876
944
|
*/
|
|
877
|
-
placeForceOrder(requestParameters: TradingApiPlaceForceOrderRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<AccountOrderRecord, any>>;
|
|
945
|
+
placeForceOrder(requestParameters: TradingApiPlaceForceOrderRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<AccountOrderRecord, any, {}>>;
|
|
878
946
|
/**
|
|
879
947
|
* Places a multi-leg option order. Only supported on certain option trading brokerages. https://support.snaptrade.com/brokerages has information on brokerage trading support
|
|
880
948
|
* @summary Place option order
|
|
@@ -883,7 +951,7 @@ export declare class TradingApiGenerated extends BaseAPI {
|
|
|
883
951
|
* @throws {RequiredError}
|
|
884
952
|
* @memberof TradingApiGenerated
|
|
885
953
|
*/
|
|
886
|
-
placeMlegOrder(requestParameters: TradingApiPlaceMlegOrderRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<MlegOrderResponse, any>>;
|
|
954
|
+
placeMlegOrder(requestParameters: TradingApiPlaceMlegOrderRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<MlegOrderResponse, any, {}>>;
|
|
887
955
|
/**
|
|
888
956
|
* Places the previously checked order with the brokerage. The `tradeId` is obtained from the [check order impact endpoint](/reference/Trading/Trading_getOrderImpact). If you prefer to place the order without checking for impact first, you can use the [place order endpoint](/reference/Trading/Trading_placeForceOrder). It\'s recommended to trigger a manual refresh of the account after placing an order to ensure the account is up to date. You can use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint for this.
|
|
889
957
|
* @summary Place checked equity order
|
|
@@ -892,7 +960,7 @@ export declare class TradingApiGenerated extends BaseAPI {
|
|
|
892
960
|
* @throws {RequiredError}
|
|
893
961
|
* @memberof TradingApiGenerated
|
|
894
962
|
*/
|
|
895
|
-
placeOrder(requestParameters: TradingApiPlaceOrderRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<AccountOrderRecord, any>>;
|
|
963
|
+
placeOrder(requestParameters: TradingApiPlaceOrderRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<AccountOrderRecord, any, {}>>;
|
|
896
964
|
/**
|
|
897
965
|
* Previews an order using the specified account.
|
|
898
966
|
* @summary Preview crypto order
|
|
@@ -901,7 +969,7 @@ export declare class TradingApiGenerated extends BaseAPI {
|
|
|
901
969
|
* @throws {RequiredError}
|
|
902
970
|
* @memberof TradingApiGenerated
|
|
903
971
|
*/
|
|
904
|
-
previewCryptoOrder(requestParameters: TradingApiPreviewCryptoOrderRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CryptoOrderPreview, any>>;
|
|
972
|
+
previewCryptoOrder(requestParameters: TradingApiPreviewCryptoOrderRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CryptoOrderPreview, any, {}>>;
|
|
905
973
|
/**
|
|
906
974
|
* Replaces an existing pending order with a new one. The way this works is brokerage dependent, but usually involves cancelling the existing order and placing a new one. The order\'s brokerage_order_id may or may not change, be sure to use the one returned in the response going forward. Only supported on some brokerages
|
|
907
975
|
* @summary Replace order
|
|
@@ -910,7 +978,7 @@ export declare class TradingApiGenerated extends BaseAPI {
|
|
|
910
978
|
* @throws {RequiredError}
|
|
911
979
|
* @memberof TradingApiGenerated
|
|
912
980
|
*/
|
|
913
|
-
replaceOrder(requestParameters: TradingApiReplaceOrderRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<AccountOrderRecord, any>>;
|
|
981
|
+
replaceOrder(requestParameters: TradingApiReplaceOrderRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<AccountOrderRecord, any, {}>>;
|
|
914
982
|
/**
|
|
915
983
|
* Searches cryptocurrency pairs instruments accessible to the specified account. Both `base` and `quote` are optional. Omit both for a full list of cryptocurrency pairs.
|
|
916
984
|
* @summary Get crypto pairs
|
|
@@ -919,5 +987,5 @@ export declare class TradingApiGenerated extends BaseAPI {
|
|
|
919
987
|
* @throws {RequiredError}
|
|
920
988
|
* @memberof TradingApiGenerated
|
|
921
989
|
*/
|
|
922
|
-
searchCryptocurrencyPairInstruments(requestParameters: TradingApiSearchCryptocurrencyPairInstrumentsRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<TradingSearchCryptocurrencyPairInstruments200Response, any>>;
|
|
990
|
+
searchCryptocurrencyPairInstruments(requestParameters: TradingApiSearchCryptocurrencyPairInstrumentsRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<TradingSearchCryptocurrencyPairInstruments200Response, any, {}>>;
|
|
923
991
|
}
|
|
@@ -335,6 +335,67 @@ const TradingApiAxiosParamCreator = function (configuration) {
|
|
|
335
335
|
options: localVarRequestOptions,
|
|
336
336
|
};
|
|
337
337
|
}),
|
|
338
|
+
/**
|
|
339
|
+
* Returns a quote for a single option contract. The option contract is specified using in the 21 character OCC format. For example `AAPL 251114C00240000` represents a call option on AAPL expiring on 2025-11-14 with a strike price of $240. For more information on the OCC format, see [here](https://en.wikipedia.org/wiki/Option_symbol#OCC_format) **Note:** These are derived values and are not suitable for trading purposes.
|
|
340
|
+
* @summary Get option quote
|
|
341
|
+
* @param {string} userId
|
|
342
|
+
* @param {string} userSecret
|
|
343
|
+
* @param {string} accountId
|
|
344
|
+
* @param {string} symbol The OCC-formatted option symbol.
|
|
345
|
+
* @param {*} [options] Override http request option.
|
|
346
|
+
* @throws {RequiredError}
|
|
347
|
+
*/
|
|
348
|
+
getUserAccountOptionQuotes: (userId, userSecret, accountId, symbol, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
349
|
+
// verify required parameter 'userId' is not null or undefined
|
|
350
|
+
(0, common_1.assertParamExists)('getUserAccountOptionQuotes', 'userId', userId);
|
|
351
|
+
// verify required parameter 'userSecret' is not null or undefined
|
|
352
|
+
(0, common_1.assertParamExists)('getUserAccountOptionQuotes', 'userSecret', userSecret);
|
|
353
|
+
// verify required parameter 'accountId' is not null or undefined
|
|
354
|
+
(0, common_1.assertParamExists)('getUserAccountOptionQuotes', 'accountId', accountId);
|
|
355
|
+
// verify required parameter 'symbol' is not null or undefined
|
|
356
|
+
(0, common_1.assertParamExists)('getUserAccountOptionQuotes', 'symbol', symbol);
|
|
357
|
+
const localVarPath = `/accounts/{accountId}/quotes/options`
|
|
358
|
+
.replace(`{${"accountId"}}`, encodeURIComponent(String(accountId !== undefined ? accountId : `-accountId-`)));
|
|
359
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
360
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
361
|
+
let baseOptions;
|
|
362
|
+
if (configuration) {
|
|
363
|
+
baseOptions = configuration.baseOptions;
|
|
364
|
+
}
|
|
365
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
366
|
+
const localVarHeaderParameter = configuration && !(0, common_1.isBrowser)() ? { "User-Agent": configuration.userAgent } : {};
|
|
367
|
+
const localVarQueryParameter = {};
|
|
368
|
+
// authentication PartnerClientId required
|
|
369
|
+
yield (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, key: "clientId", keyParamName: "clientId", configuration });
|
|
370
|
+
// authentication PartnerSignature required
|
|
371
|
+
yield (0, common_1.setApiKeyToObject)({ object: localVarHeaderParameter, key: "Signature", keyParamName: "signature", configuration });
|
|
372
|
+
// authentication PartnerTimestamp required
|
|
373
|
+
yield (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, key: "timestamp", keyParamName: "timestamp", configuration });
|
|
374
|
+
if (userId !== undefined) {
|
|
375
|
+
localVarQueryParameter['userId'] = userId;
|
|
376
|
+
}
|
|
377
|
+
if (userSecret !== undefined) {
|
|
378
|
+
localVarQueryParameter['userSecret'] = userSecret;
|
|
379
|
+
}
|
|
380
|
+
if (symbol !== undefined) {
|
|
381
|
+
localVarQueryParameter['symbol'] = symbol;
|
|
382
|
+
}
|
|
383
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
384
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
385
|
+
(0, requestBeforeHook_1.requestBeforeHook)({
|
|
386
|
+
queryParameters: localVarQueryParameter,
|
|
387
|
+
requestConfig: localVarRequestOptions,
|
|
388
|
+
path: localVarPath,
|
|
389
|
+
configuration,
|
|
390
|
+
pathTemplate: '/accounts/{accountId}/quotes/options',
|
|
391
|
+
httpMethod: 'GET'
|
|
392
|
+
});
|
|
393
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
394
|
+
return {
|
|
395
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
396
|
+
options: localVarRequestOptions,
|
|
397
|
+
};
|
|
398
|
+
}),
|
|
338
399
|
/**
|
|
339
400
|
* Returns quotes from the brokerage for the specified symbols and account. The quotes returned can be delayed depending on the brokerage the account belongs to. It is highly recommended that you use your own market data provider for real-time quotes instead of relying on this endpoint. **This endpoint is not a substitute for a market data provider. Frequent polling of this endpoint may result in the disabling of your keys** This endpoint does not work for options quotes. This endpoint is disabled for free plans by default. Please contact support to enable this endpoint if needed.
|
|
340
401
|
* @summary Get equity symbol quotes
|
|
@@ -985,6 +1046,19 @@ const TradingApiFp = function (configuration) {
|
|
|
985
1046
|
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
986
1047
|
});
|
|
987
1048
|
},
|
|
1049
|
+
/**
|
|
1050
|
+
* Returns a quote for a single option contract. The option contract is specified using in the 21 character OCC format. For example `AAPL 251114C00240000` represents a call option on AAPL expiring on 2025-11-14 with a strike price of $240. For more information on the OCC format, see [here](https://en.wikipedia.org/wiki/Option_symbol#OCC_format) **Note:** These are derived values and are not suitable for trading purposes.
|
|
1051
|
+
* @summary Get option quote
|
|
1052
|
+
* @param {TradingApiGetUserAccountOptionQuotesRequest} requestParameters Request parameters.
|
|
1053
|
+
* @param {*} [options] Override http request option.
|
|
1054
|
+
* @throws {RequiredError}
|
|
1055
|
+
*/
|
|
1056
|
+
getUserAccountOptionQuotes(requestParameters, options) {
|
|
1057
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1058
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getUserAccountOptionQuotes(requestParameters.userId, requestParameters.userSecret, requestParameters.accountId, requestParameters.symbol, options);
|
|
1059
|
+
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
1060
|
+
});
|
|
1061
|
+
},
|
|
988
1062
|
/**
|
|
989
1063
|
* Returns quotes from the brokerage for the specified symbols and account. The quotes returned can be delayed depending on the brokerage the account belongs to. It is highly recommended that you use your own market data provider for real-time quotes instead of relying on this endpoint. **This endpoint is not a substitute for a market data provider. Frequent polling of this endpoint may result in the disabling of your keys** This endpoint does not work for options quotes. This endpoint is disabled for free plans by default. Please contact support to enable this endpoint if needed.
|
|
990
1064
|
* @summary Get equity symbol quotes
|
|
@@ -1230,6 +1304,16 @@ const TradingApiFactory = function (configuration, basePath, axios) {
|
|
|
1230
1304
|
getOrderImpact(requestParameters, options) {
|
|
1231
1305
|
return localVarFp.getOrderImpact(requestParameters, options).then((request) => request(axios, basePath));
|
|
1232
1306
|
},
|
|
1307
|
+
/**
|
|
1308
|
+
* Returns a quote for a single option contract. The option contract is specified using in the 21 character OCC format. For example `AAPL 251114C00240000` represents a call option on AAPL expiring on 2025-11-14 with a strike price of $240. For more information on the OCC format, see [here](https://en.wikipedia.org/wiki/Option_symbol#OCC_format) **Note:** These are derived values and are not suitable for trading purposes.
|
|
1309
|
+
* @summary Get option quote
|
|
1310
|
+
* @param {TradingApiGetUserAccountOptionQuotesRequest} requestParameters Request parameters.
|
|
1311
|
+
* @param {*} [options] Override http request option.
|
|
1312
|
+
* @throws {RequiredError}
|
|
1313
|
+
*/
|
|
1314
|
+
getUserAccountOptionQuotes(requestParameters, options) {
|
|
1315
|
+
return localVarFp.getUserAccountOptionQuotes(requestParameters, options).then((request) => request(axios, basePath));
|
|
1316
|
+
},
|
|
1233
1317
|
/**
|
|
1234
1318
|
* Returns quotes from the brokerage for the specified symbols and account. The quotes returned can be delayed depending on the brokerage the account belongs to. It is highly recommended that you use your own market data provider for real-time quotes instead of relying on this endpoint. **This endpoint is not a substitute for a market data provider. Frequent polling of this endpoint may result in the disabling of your keys** This endpoint does not work for options quotes. This endpoint is disabled for free plans by default. Please contact support to enable this endpoint if needed.
|
|
1235
1319
|
* @summary Get equity symbol quotes
|
|
@@ -1386,6 +1470,17 @@ class TradingApiGenerated extends base_1.BaseAPI {
|
|
|
1386
1470
|
getOrderImpact(requestParameters, options) {
|
|
1387
1471
|
return (0, exports.TradingApiFp)(this.configuration).getOrderImpact(requestParameters, options).then((request) => request(this.axios, this.basePath));
|
|
1388
1472
|
}
|
|
1473
|
+
/**
|
|
1474
|
+
* Returns a quote for a single option contract. The option contract is specified using in the 21 character OCC format. For example `AAPL 251114C00240000` represents a call option on AAPL expiring on 2025-11-14 with a strike price of $240. For more information on the OCC format, see [here](https://en.wikipedia.org/wiki/Option_symbol#OCC_format) **Note:** These are derived values and are not suitable for trading purposes.
|
|
1475
|
+
* @summary Get option quote
|
|
1476
|
+
* @param {TradingApiGetUserAccountOptionQuotesRequest} requestParameters Request parameters.
|
|
1477
|
+
* @param {*} [options] Override http request option.
|
|
1478
|
+
* @throws {RequiredError}
|
|
1479
|
+
* @memberof TradingApiGenerated
|
|
1480
|
+
*/
|
|
1481
|
+
getUserAccountOptionQuotes(requestParameters, options) {
|
|
1482
|
+
return (0, exports.TradingApiFp)(this.configuration).getUserAccountOptionQuotes(requestParameters, options).then((request) => request(this.axios, this.basePath));
|
|
1483
|
+
}
|
|
1389
1484
|
/**
|
|
1390
1485
|
* Returns quotes from the brokerage for the specified symbols and account. The quotes returned can be delayed depending on the brokerage the account belongs to. It is highly recommended that you use your own market data provider for real-time quotes instead of relying on this endpoint. **This endpoint is not a substitute for a market data provider. Frequent polling of this endpoint may result in the disabling of your keys** This endpoint does not work for options quotes. This endpoint is disabled for free plans by default. Please contact support to enable this endpoint if needed.
|
|
1391
1486
|
* @summary Get equity symbol quotes
|
|
@@ -201,7 +201,7 @@ export declare class TransactionsAndReportingApiGenerated extends BaseAPI {
|
|
|
201
201
|
* @throws {RequiredError}
|
|
202
202
|
* @memberof TransactionsAndReportingApiGenerated
|
|
203
203
|
*/
|
|
204
|
-
getActivities(requestParameters: TransactionsAndReportingApiGetActivitiesRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<UniversalActivity[], any>>;
|
|
204
|
+
getActivities(requestParameters: TransactionsAndReportingApiGetActivitiesRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<UniversalActivity[], any, {}>>;
|
|
205
205
|
/**
|
|
206
206
|
* Returns performance information (contributions, dividends, rate of return, etc) for a specific timeframe. Please note that Total Equity Timeframe and Rate of Returns are experimental features. Please contact support@snaptrade.com if you notice any inconsistencies.
|
|
207
207
|
* @summary Get performance information for a specific timeframe
|
|
@@ -211,5 +211,5 @@ export declare class TransactionsAndReportingApiGenerated extends BaseAPI {
|
|
|
211
211
|
* @throws {RequiredError}
|
|
212
212
|
* @memberof TransactionsAndReportingApiGenerated
|
|
213
213
|
*/
|
|
214
|
-
getReportingCustomRange(requestParameters: TransactionsAndReportingApiGetReportingCustomRangeRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<PerformanceCustom, any>>;
|
|
214
|
+
getReportingCustomRange(requestParameters: TransactionsAndReportingApiGetReportingCustomRangeRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<PerformanceCustom, any, {}>>;
|
|
215
215
|
}
|