snaptrade-typescript-sdk 9.0.175 → 9.0.177
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 +2 -44
- package/dist/api/options-api-generated.d.ts +0 -68
- package/dist/api/options-api-generated.js +0 -95
- package/dist/api/trading-api-generated.d.ts +4 -4
- package/dist/api/trading-api-generated.js +4 -4
- package/dist/browser.js +1 -1
- package/dist/configuration.js +1 -1
- package/dist/models/index.d.ts +2 -0
- package/dist/models/index.js +2 -0
- package/dist/models/option-quote-greeks.d.ts +32 -0
- package/dist/models/option-quote-greeks.js +2 -0
- package/dist/models/option-quote.d.ts +9 -50
- package/dist/models/order-updated-response-order.d.ts +146 -0
- package/dist/models/order-updated-response-order.js +2 -0
- package/dist/models/order-updated-response.d.ts +3 -3
- package/dist/models/position.d.ts +1 -1
- package/dist/operationParameterMap.js +0 -16
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
Connect brokerage accounts to your app for live positions and trading
|
|
8
8
|
|
|
9
|
-
[](https://www.npmjs.com/package/snaptrade-typescript-sdk/v/9.0.177)
|
|
10
10
|
[](https://snaptrade.com/)
|
|
11
11
|
|
|
12
12
|
</div>
|
|
@@ -48,7 +48,6 @@ Connect brokerage accounts to your app for live positions and trading
|
|
|
48
48
|
* [`snaptrade.experimentalEndpoints.getUserAccountOrderDetailV2`](#snaptradeexperimentalendpointsgetuseraccountorderdetailv2)
|
|
49
49
|
* [`snaptrade.experimentalEndpoints.getUserAccountOrdersV2`](#snaptradeexperimentalendpointsgetuseraccountordersv2)
|
|
50
50
|
* [`snaptrade.experimentalEndpoints.getUserAccountRecentOrdersV2`](#snaptradeexperimentalendpointsgetuseraccountrecentordersv2)
|
|
51
|
-
* [`snaptrade.options.getOptionQuote`](#snaptradeoptionsgetoptionquote)
|
|
52
51
|
* [`snaptrade.options.listOptionHoldings`](#snaptradeoptionslistoptionholdings)
|
|
53
52
|
* [`snaptrade.referenceData.getCurrencyExchangeRatePair`](#snaptradereferencedatagetcurrencyexchangeratepair)
|
|
54
53
|
* [`snaptrade.referenceData.getPartnerInfo`](#snaptradereferencedatagetpartnerinfo)
|
|
@@ -1436,47 +1435,6 @@ Defaults to true. Indicates if request should fetch only executed orders. Set to
|
|
|
1436
1435
|
---
|
|
1437
1436
|
|
|
1438
1437
|
|
|
1439
|
-
### `snaptrade.options.getOptionQuote`<a id="snaptradeoptionsgetoptionquote"></a>
|
|
1440
|
-
|
|
1441
|
-
Returns a real-time 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)
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
#### 🛠️ Usage<a id="🛠️-usage"></a>
|
|
1445
|
-
|
|
1446
|
-
```typescript
|
|
1447
|
-
const getOptionQuoteResponse = await snaptrade.options.getOptionQuote({
|
|
1448
|
-
userId: "snaptrade-user-123",
|
|
1449
|
-
userSecret: "adf2aa34-8219-40f7-a6b3-60156985cc61",
|
|
1450
|
-
accountId: "917c8734-8470-4a3e-a18f-57c3f2ee6631",
|
|
1451
|
-
symbol: "AAPL 251219C00150000",
|
|
1452
|
-
});
|
|
1453
|
-
```
|
|
1454
|
-
|
|
1455
|
-
#### ⚙️ Parameters<a id="⚙️-parameters"></a>
|
|
1456
|
-
|
|
1457
|
-
##### userId: `string`<a id="userid-string"></a>
|
|
1458
|
-
|
|
1459
|
-
##### userSecret: `string`<a id="usersecret-string"></a>
|
|
1460
|
-
|
|
1461
|
-
##### accountId: `string`<a id="accountid-string"></a>
|
|
1462
|
-
|
|
1463
|
-
##### symbol: `string`<a id="symbol-string"></a>
|
|
1464
|
-
|
|
1465
|
-
The OCC-formatted option symbol.
|
|
1466
|
-
|
|
1467
|
-
#### 🔄 Return<a id="🔄-return"></a>
|
|
1468
|
-
|
|
1469
|
-
[OptionQuote](./models/option-quote.ts)
|
|
1470
|
-
|
|
1471
|
-
#### 🌐 Endpoint<a id="🌐-endpoint"></a>
|
|
1472
|
-
|
|
1473
|
-
`/accounts/{accountId}/quotes/options` `GET`
|
|
1474
|
-
|
|
1475
|
-
[🔙 **Back to Table of Contents**](#table-of-contents)
|
|
1476
|
-
|
|
1477
|
-
---
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
1438
|
### `snaptrade.options.listOptionHoldings`<a id="snaptradeoptionslistoptionholdings"></a>
|
|
1481
1439
|
|
|
1482
1440
|
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).
|
|
@@ -1993,7 +1951,7 @@ const getCryptocurrencyPairQuoteResponse =
|
|
|
1993
1951
|
### `snaptrade.trading.getOptionImpact`<a id="snaptradetradinggetoptionimpact"></a>
|
|
1994
1952
|
|
|
1995
1953
|
Simulates an option order with up to 4 legs and returns the estimated cost and transaction fees without placing it.
|
|
1996
|
-
Only supported for certain brokerages. Please refer to the [brokerage trading support page](https://snaptrade.
|
|
1954
|
+
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.
|
|
1997
1955
|
|
|
1998
1956
|
|
|
1999
1957
|
#### 🛠️ Usage<a id="🛠️-usage"></a>
|
|
@@ -1,24 +1,12 @@
|
|
|
1
1
|
import { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
|
|
2
2
|
import { Configuration } from '../configuration';
|
|
3
3
|
import { RequestArgs, BaseAPI } from '../base';
|
|
4
|
-
import { OptionQuote } from '../models';
|
|
5
4
|
import { OptionsPosition } from '../models';
|
|
6
5
|
/**
|
|
7
6
|
* OptionsApi - axios parameter creator
|
|
8
7
|
* @export
|
|
9
8
|
*/
|
|
10
9
|
export declare const OptionsApiAxiosParamCreator: (configuration?: Configuration) => {
|
|
11
|
-
/**
|
|
12
|
-
* Returns a real-time 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)
|
|
13
|
-
* @summary Get option quote
|
|
14
|
-
* @param {string} userId
|
|
15
|
-
* @param {string} userSecret
|
|
16
|
-
* @param {string} accountId
|
|
17
|
-
* @param {string} symbol The OCC-formatted option symbol.
|
|
18
|
-
* @param {*} [options] Override http request option.
|
|
19
|
-
* @throws {RequiredError}
|
|
20
|
-
*/
|
|
21
|
-
getOptionQuote: (userId: string, userSecret: string, accountId: string, symbol: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
22
10
|
/**
|
|
23
11
|
* 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.
|
|
24
12
|
* @summary List account option positions
|
|
@@ -35,14 +23,6 @@ export declare const OptionsApiAxiosParamCreator: (configuration?: Configuration
|
|
|
35
23
|
* @export
|
|
36
24
|
*/
|
|
37
25
|
export declare const OptionsApiFp: (configuration?: Configuration) => {
|
|
38
|
-
/**
|
|
39
|
-
* Returns a real-time 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)
|
|
40
|
-
* @summary Get option quote
|
|
41
|
-
* @param {OptionsApiGetOptionQuoteRequest} requestParameters Request parameters.
|
|
42
|
-
* @param {*} [options] Override http request option.
|
|
43
|
-
* @throws {RequiredError}
|
|
44
|
-
*/
|
|
45
|
-
getOptionQuote(requestParameters: OptionsApiGetOptionQuoteRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<OptionQuote>>;
|
|
46
26
|
/**
|
|
47
27
|
* 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.
|
|
48
28
|
* @summary List account option positions
|
|
@@ -57,14 +37,6 @@ export declare const OptionsApiFp: (configuration?: Configuration) => {
|
|
|
57
37
|
* @export
|
|
58
38
|
*/
|
|
59
39
|
export declare const OptionsApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
|
|
60
|
-
/**
|
|
61
|
-
* Returns a real-time 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)
|
|
62
|
-
* @summary Get option quote
|
|
63
|
-
* @param {OptionsApiGetOptionQuoteRequest} requestParameters Request parameters.
|
|
64
|
-
* @param {*} [options] Override http request option.
|
|
65
|
-
* @throws {RequiredError}
|
|
66
|
-
*/
|
|
67
|
-
getOptionQuote(requestParameters: OptionsApiGetOptionQuoteRequest, options?: AxiosRequestConfig): AxiosPromise<OptionQuote>;
|
|
68
40
|
/**
|
|
69
41
|
* 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.
|
|
70
42
|
* @summary List account option positions
|
|
@@ -74,37 +46,6 @@ export declare const OptionsApiFactory: (configuration?: Configuration, basePath
|
|
|
74
46
|
*/
|
|
75
47
|
listOptionHoldings(requestParameters: OptionsApiListOptionHoldingsRequest, options?: AxiosRequestConfig): AxiosPromise<Array<OptionsPosition>>;
|
|
76
48
|
};
|
|
77
|
-
/**
|
|
78
|
-
* Request parameters for getOptionQuote operation in OptionsApi.
|
|
79
|
-
* @export
|
|
80
|
-
* @interface OptionsApiGetOptionQuoteRequest
|
|
81
|
-
*/
|
|
82
|
-
export type OptionsApiGetOptionQuoteRequest = {
|
|
83
|
-
/**
|
|
84
|
-
*
|
|
85
|
-
* @type {string}
|
|
86
|
-
* @memberof OptionsApiGetOptionQuote
|
|
87
|
-
*/
|
|
88
|
-
readonly userId: string;
|
|
89
|
-
/**
|
|
90
|
-
*
|
|
91
|
-
* @type {string}
|
|
92
|
-
* @memberof OptionsApiGetOptionQuote
|
|
93
|
-
*/
|
|
94
|
-
readonly userSecret: string;
|
|
95
|
-
/**
|
|
96
|
-
*
|
|
97
|
-
* @type {string}
|
|
98
|
-
* @memberof OptionsApiGetOptionQuote
|
|
99
|
-
*/
|
|
100
|
-
readonly accountId: string;
|
|
101
|
-
/**
|
|
102
|
-
* The OCC-formatted option symbol.
|
|
103
|
-
* @type {string}
|
|
104
|
-
* @memberof OptionsApiGetOptionQuote
|
|
105
|
-
*/
|
|
106
|
-
readonly symbol: string;
|
|
107
|
-
};
|
|
108
49
|
/**
|
|
109
50
|
* Request parameters for listOptionHoldings operation in OptionsApi.
|
|
110
51
|
* @export
|
|
@@ -137,15 +78,6 @@ export type OptionsApiListOptionHoldingsRequest = {
|
|
|
137
78
|
* @extends {BaseAPI}
|
|
138
79
|
*/
|
|
139
80
|
export declare class OptionsApiGenerated extends BaseAPI {
|
|
140
|
-
/**
|
|
141
|
-
* Returns a real-time 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)
|
|
142
|
-
* @summary Get option quote
|
|
143
|
-
* @param {OptionsApiGetOptionQuoteRequest} requestParameters Request parameters.
|
|
144
|
-
* @param {*} [options] Override http request option.
|
|
145
|
-
* @throws {RequiredError}
|
|
146
|
-
* @memberof OptionsApiGenerated
|
|
147
|
-
*/
|
|
148
|
-
getOptionQuote(requestParameters: OptionsApiGetOptionQuoteRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<OptionQuote, any>>;
|
|
149
81
|
/**
|
|
150
82
|
* 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.
|
|
151
83
|
* @summary List account option positions
|
|
@@ -35,67 +35,6 @@ const requestBeforeHook_1 = require("../requestBeforeHook");
|
|
|
35
35
|
*/
|
|
36
36
|
const OptionsApiAxiosParamCreator = function (configuration) {
|
|
37
37
|
return {
|
|
38
|
-
/**
|
|
39
|
-
* Returns a real-time 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)
|
|
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
|
-
getOptionQuote: (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)('getOptionQuote', 'userId', userId);
|
|
51
|
-
// verify required parameter 'userSecret' is not null or undefined
|
|
52
|
-
(0, common_1.assertParamExists)('getOptionQuote', 'userSecret', userSecret);
|
|
53
|
-
// verify required parameter 'accountId' is not null or undefined
|
|
54
|
-
(0, common_1.assertParamExists)('getOptionQuote', 'accountId', accountId);
|
|
55
|
-
// verify required parameter 'symbol' is not null or undefined
|
|
56
|
-
(0, common_1.assertParamExists)('getOptionQuote', '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 real-time 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)
|
|
166
|
-
* @summary Get option quote
|
|
167
|
-
* @param {OptionsApiGetOptionQuoteRequest} requestParameters Request parameters.
|
|
168
|
-
* @param {*} [options] Override http request option.
|
|
169
|
-
* @throws {RequiredError}
|
|
170
|
-
*/
|
|
171
|
-
getOptionQuote(requestParameters, options) {
|
|
172
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
173
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.getOptionQuote(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 real-time 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)
|
|
202
|
-
* @summary Get option quote
|
|
203
|
-
* @param {OptionsApiGetOptionQuoteRequest} requestParameters Request parameters.
|
|
204
|
-
* @param {*} [options] Override http request option.
|
|
205
|
-
* @throws {RequiredError}
|
|
206
|
-
*/
|
|
207
|
-
getOptionQuote(requestParameters, options) {
|
|
208
|
-
return localVarFp.getOptionQuote(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 real-time 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)
|
|
232
|
-
* @summary Get option quote
|
|
233
|
-
* @param {OptionsApiGetOptionQuoteRequest} requestParameters Request parameters.
|
|
234
|
-
* @param {*} [options] Override http request option.
|
|
235
|
-
* @throws {RequiredError}
|
|
236
|
-
* @memberof OptionsApiGenerated
|
|
237
|
-
*/
|
|
238
|
-
getOptionQuote(requestParameters, options) {
|
|
239
|
-
return (0, exports.OptionsApiFp)(this.configuration).getOptionQuote(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
|
|
@@ -59,7 +59,7 @@ export declare const TradingApiAxiosParamCreator: (configuration?: Configuration
|
|
|
59
59
|
*/
|
|
60
60
|
getCryptocurrencyPairQuote: (userId: string, userSecret: string, accountId: string, instrumentSymbol: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
61
61
|
/**
|
|
62
|
-
* Simulates an option order with up to 4 legs and returns the estimated cost and transaction fees without placing it. Only supported for certain brokerages. Please refer to the [brokerage trading support page](https://snaptrade.
|
|
62
|
+
* 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.
|
|
63
63
|
* @summary Get option order impact
|
|
64
64
|
* @param {string} userId
|
|
65
65
|
* @param {string} userSecret
|
|
@@ -211,7 +211,7 @@ export declare const TradingApiFp: (configuration?: Configuration) => {
|
|
|
211
211
|
*/
|
|
212
212
|
getCryptocurrencyPairQuote(requestParameters: TradingApiGetCryptocurrencyPairQuoteRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CryptocurrencyPairQuote>>;
|
|
213
213
|
/**
|
|
214
|
-
* Simulates an option order with up to 4 legs and returns the estimated cost and transaction fees without placing it. Only supported for certain brokerages. Please refer to the [brokerage trading support page](https://snaptrade.
|
|
214
|
+
* 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.
|
|
215
215
|
* @summary Get option order impact
|
|
216
216
|
* @param {TradingApiGetOptionImpactRequest} requestParameters Request parameters.
|
|
217
217
|
* @param {*} [options] Override http request option.
|
|
@@ -330,7 +330,7 @@ export declare const TradingApiFactory: (configuration?: Configuration, basePath
|
|
|
330
330
|
*/
|
|
331
331
|
getCryptocurrencyPairQuote(requestParameters: TradingApiGetCryptocurrencyPairQuoteRequest, options?: AxiosRequestConfig): AxiosPromise<CryptocurrencyPairQuote>;
|
|
332
332
|
/**
|
|
333
|
-
* Simulates an option order with up to 4 legs and returns the estimated cost and transaction fees without placing it. Only supported for certain brokerages. Please refer to the [brokerage trading support page](https://snaptrade.
|
|
333
|
+
* 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.
|
|
334
334
|
* @summary Get option order impact
|
|
335
335
|
* @param {TradingApiGetOptionImpactRequest} requestParameters Request parameters.
|
|
336
336
|
* @param {*} [options] Override http request option.
|
|
@@ -822,7 +822,7 @@ export declare class TradingApiGenerated extends BaseAPI {
|
|
|
822
822
|
*/
|
|
823
823
|
getCryptocurrencyPairQuote(requestParameters: TradingApiGetCryptocurrencyPairQuoteRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CryptocurrencyPairQuote, any>>;
|
|
824
824
|
/**
|
|
825
|
-
* Simulates an option order with up to 4 legs and returns the estimated cost and transaction fees without placing it. Only supported for certain brokerages. Please refer to the [brokerage trading support page](https://snaptrade.
|
|
825
|
+
* 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
826
|
* @summary Get option order impact
|
|
827
827
|
* @param {TradingApiGetOptionImpactRequest} requestParameters Request parameters.
|
|
828
828
|
* @param {*} [options] Override http request option.
|
|
@@ -218,7 +218,7 @@ const TradingApiAxiosParamCreator = function (configuration) {
|
|
|
218
218
|
};
|
|
219
219
|
}),
|
|
220
220
|
/**
|
|
221
|
-
* Simulates an option order with up to 4 legs and returns the estimated cost and transaction fees without placing it. Only supported for certain brokerages. Please refer to the [brokerage trading support page](https://snaptrade.
|
|
221
|
+
* 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.
|
|
222
222
|
* @summary Get option order impact
|
|
223
223
|
* @param {string} userId
|
|
224
224
|
* @param {string} userSecret
|
|
@@ -941,7 +941,7 @@ const TradingApiFp = function (configuration) {
|
|
|
941
941
|
});
|
|
942
942
|
},
|
|
943
943
|
/**
|
|
944
|
-
* Simulates an option order with up to 4 legs and returns the estimated cost and transaction fees without placing it. Only supported for certain brokerages. Please refer to the [brokerage trading support page](https://snaptrade.
|
|
944
|
+
* 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.
|
|
945
945
|
* @summary Get option order impact
|
|
946
946
|
* @param {TradingApiGetOptionImpactRequest} requestParameters Request parameters.
|
|
947
947
|
* @param {*} [options] Override http request option.
|
|
@@ -1211,7 +1211,7 @@ const TradingApiFactory = function (configuration, basePath, axios) {
|
|
|
1211
1211
|
return localVarFp.getCryptocurrencyPairQuote(requestParameters, options).then((request) => request(axios, basePath));
|
|
1212
1212
|
},
|
|
1213
1213
|
/**
|
|
1214
|
-
* Simulates an option order with up to 4 legs and returns the estimated cost and transaction fees without placing it. Only supported for certain brokerages. Please refer to the [brokerage trading support page](https://snaptrade.
|
|
1214
|
+
* 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.
|
|
1215
1215
|
* @summary Get option order impact
|
|
1216
1216
|
* @param {TradingApiGetOptionImpactRequest} requestParameters Request parameters.
|
|
1217
1217
|
* @param {*} [options] Override http request option.
|
|
@@ -1365,7 +1365,7 @@ class TradingApiGenerated extends base_1.BaseAPI {
|
|
|
1365
1365
|
return (0, exports.TradingApiFp)(this.configuration).getCryptocurrencyPairQuote(requestParameters, options).then((request) => request(this.axios, this.basePath));
|
|
1366
1366
|
}
|
|
1367
1367
|
/**
|
|
1368
|
-
* Simulates an option order with up to 4 legs and returns the estimated cost and transaction fees without placing it. Only supported for certain brokerages. Please refer to the [brokerage trading support page](https://snaptrade.
|
|
1368
|
+
* 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.
|
|
1369
1369
|
* @summary Get option order impact
|
|
1370
1370
|
* @param {TradingApiGetOptionImpactRequest} requestParameters Request parameters.
|
|
1371
1371
|
* @param {*} [options] Override http request option.
|