snaptrade-typescript-sdk 9.0.177 → 9.0.178
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
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.178)
|
|
10
10
|
[](https://snaptrade.com/)
|
|
11
11
|
|
|
12
12
|
</div>
|
|
@@ -48,6 +48,7 @@ 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.getUserAccountOptionQuotes`](#snaptradeoptionsgetuseraccountoptionquotes)
|
|
51
52
|
* [`snaptrade.options.listOptionHoldings`](#snaptradeoptionslistoptionholdings)
|
|
52
53
|
* [`snaptrade.referenceData.getCurrencyExchangeRatePair`](#snaptradereferencedatagetcurrencyexchangeratepair)
|
|
53
54
|
* [`snaptrade.referenceData.getPartnerInfo`](#snaptradereferencedatagetpartnerinfo)
|
|
@@ -1435,6 +1436,49 @@ Defaults to true. Indicates if request should fetch only executed orders. Set to
|
|
|
1435
1436
|
---
|
|
1436
1437
|
|
|
1437
1438
|
|
|
1439
|
+
### `snaptrade.options.getUserAccountOptionQuotes`<a id="snaptradeoptionsgetuseraccountoptionquotes"></a>
|
|
1440
|
+
|
|
1441
|
+
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)
|
|
1442
|
+
**Note:** These are derived values and are not suitable for trading purposes.
|
|
1443
|
+
|
|
1444
|
+
|
|
1445
|
+
#### 🛠️ Usage<a id="🛠️-usage"></a>
|
|
1446
|
+
|
|
1447
|
+
```typescript
|
|
1448
|
+
const getUserAccountOptionQuotesResponse =
|
|
1449
|
+
await snaptrade.options.getUserAccountOptionQuotes({
|
|
1450
|
+
userId: "snaptrade-user-123",
|
|
1451
|
+
userSecret: "adf2aa34-8219-40f7-a6b3-60156985cc61",
|
|
1452
|
+
accountId: "917c8734-8470-4a3e-a18f-57c3f2ee6631",
|
|
1453
|
+
symbol: "AAPL 251219C00150000",
|
|
1454
|
+
});
|
|
1455
|
+
```
|
|
1456
|
+
|
|
1457
|
+
#### ⚙️ Parameters<a id="⚙️-parameters"></a>
|
|
1458
|
+
|
|
1459
|
+
##### userId: `string`<a id="userid-string"></a>
|
|
1460
|
+
|
|
1461
|
+
##### userSecret: `string`<a id="usersecret-string"></a>
|
|
1462
|
+
|
|
1463
|
+
##### accountId: `string`<a id="accountid-string"></a>
|
|
1464
|
+
|
|
1465
|
+
##### symbol: `string`<a id="symbol-string"></a>
|
|
1466
|
+
|
|
1467
|
+
The OCC-formatted option symbol.
|
|
1468
|
+
|
|
1469
|
+
#### 🔄 Return<a id="🔄-return"></a>
|
|
1470
|
+
|
|
1471
|
+
[OptionQuote](./models/option-quote.ts)
|
|
1472
|
+
|
|
1473
|
+
#### 🌐 Endpoint<a id="🌐-endpoint"></a>
|
|
1474
|
+
|
|
1475
|
+
`/accounts/{accountId}/quotes/options` `GET`
|
|
1476
|
+
|
|
1477
|
+
[🔙 **Back to Table of Contents**](#table-of-contents)
|
|
1478
|
+
|
|
1479
|
+
---
|
|
1480
|
+
|
|
1481
|
+
|
|
1438
1482
|
### `snaptrade.options.listOptionHoldings`<a id="snaptradeoptionslistoptionholdings"></a>
|
|
1439
1483
|
|
|
1440
1484
|
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).
|
|
@@ -1,12 +1,24 @@
|
|
|
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';
|
|
4
5
|
import { OptionsPosition } from '../models';
|
|
5
6
|
/**
|
|
6
7
|
* OptionsApi - axios parameter creator
|
|
7
8
|
* @export
|
|
8
9
|
*/
|
|
9
10
|
export declare const OptionsApiAxiosParamCreator: (configuration?: Configuration) => {
|
|
11
|
+
/**
|
|
12
|
+
* 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.
|
|
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
|
+
getUserAccountOptionQuotes: (userId: string, userSecret: string, accountId: string, symbol: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
10
22
|
/**
|
|
11
23
|
* 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.
|
|
12
24
|
* @summary List account option positions
|
|
@@ -23,6 +35,14 @@ export declare const OptionsApiAxiosParamCreator: (configuration?: Configuration
|
|
|
23
35
|
* @export
|
|
24
36
|
*/
|
|
25
37
|
export declare const OptionsApiFp: (configuration?: Configuration) => {
|
|
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 {OptionsApiGetUserAccountOptionQuotesRequest} requestParameters Request parameters.
|
|
42
|
+
* @param {*} [options] Override http request option.
|
|
43
|
+
* @throws {RequiredError}
|
|
44
|
+
*/
|
|
45
|
+
getUserAccountOptionQuotes(requestParameters: OptionsApiGetUserAccountOptionQuotesRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<OptionQuote>>;
|
|
26
46
|
/**
|
|
27
47
|
* 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.
|
|
28
48
|
* @summary List account option positions
|
|
@@ -37,6 +57,14 @@ export declare const OptionsApiFp: (configuration?: Configuration) => {
|
|
|
37
57
|
* @export
|
|
38
58
|
*/
|
|
39
59
|
export declare const OptionsApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
|
|
60
|
+
/**
|
|
61
|
+
* 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.
|
|
62
|
+
* @summary Get option quote
|
|
63
|
+
* @param {OptionsApiGetUserAccountOptionQuotesRequest} requestParameters Request parameters.
|
|
64
|
+
* @param {*} [options] Override http request option.
|
|
65
|
+
* @throws {RequiredError}
|
|
66
|
+
*/
|
|
67
|
+
getUserAccountOptionQuotes(requestParameters: OptionsApiGetUserAccountOptionQuotesRequest, options?: AxiosRequestConfig): AxiosPromise<OptionQuote>;
|
|
40
68
|
/**
|
|
41
69
|
* 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.
|
|
42
70
|
* @summary List account option positions
|
|
@@ -46,6 +74,37 @@ export declare const OptionsApiFactory: (configuration?: Configuration, basePath
|
|
|
46
74
|
*/
|
|
47
75
|
listOptionHoldings(requestParameters: OptionsApiListOptionHoldingsRequest, options?: AxiosRequestConfig): AxiosPromise<Array<OptionsPosition>>;
|
|
48
76
|
};
|
|
77
|
+
/**
|
|
78
|
+
* Request parameters for getUserAccountOptionQuotes operation in OptionsApi.
|
|
79
|
+
* @export
|
|
80
|
+
* @interface OptionsApiGetUserAccountOptionQuotesRequest
|
|
81
|
+
*/
|
|
82
|
+
export type OptionsApiGetUserAccountOptionQuotesRequest = {
|
|
83
|
+
/**
|
|
84
|
+
*
|
|
85
|
+
* @type {string}
|
|
86
|
+
* @memberof OptionsApiGetUserAccountOptionQuotes
|
|
87
|
+
*/
|
|
88
|
+
readonly userId: string;
|
|
89
|
+
/**
|
|
90
|
+
*
|
|
91
|
+
* @type {string}
|
|
92
|
+
* @memberof OptionsApiGetUserAccountOptionQuotes
|
|
93
|
+
*/
|
|
94
|
+
readonly userSecret: string;
|
|
95
|
+
/**
|
|
96
|
+
*
|
|
97
|
+
* @type {string}
|
|
98
|
+
* @memberof OptionsApiGetUserAccountOptionQuotes
|
|
99
|
+
*/
|
|
100
|
+
readonly accountId: string;
|
|
101
|
+
/**
|
|
102
|
+
* The OCC-formatted option symbol.
|
|
103
|
+
* @type {string}
|
|
104
|
+
* @memberof OptionsApiGetUserAccountOptionQuotes
|
|
105
|
+
*/
|
|
106
|
+
readonly symbol: string;
|
|
107
|
+
};
|
|
49
108
|
/**
|
|
50
109
|
* Request parameters for listOptionHoldings operation in OptionsApi.
|
|
51
110
|
* @export
|
|
@@ -78,6 +137,15 @@ export type OptionsApiListOptionHoldingsRequest = {
|
|
|
78
137
|
* @extends {BaseAPI}
|
|
79
138
|
*/
|
|
80
139
|
export declare class OptionsApiGenerated extends BaseAPI {
|
|
140
|
+
/**
|
|
141
|
+
* 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.
|
|
142
|
+
* @summary Get option quote
|
|
143
|
+
* @param {OptionsApiGetUserAccountOptionQuotesRequest} requestParameters Request parameters.
|
|
144
|
+
* @param {*} [options] Override http request option.
|
|
145
|
+
* @throws {RequiredError}
|
|
146
|
+
* @memberof OptionsApiGenerated
|
|
147
|
+
*/
|
|
148
|
+
getUserAccountOptionQuotes(requestParameters: OptionsApiGetUserAccountOptionQuotesRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<OptionQuote, any>>;
|
|
81
149
|
/**
|
|
82
150
|
* 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.
|
|
83
151
|
* @summary List account option positions
|
|
@@ -35,6 +35,67 @@ 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
|
+
}),
|
|
38
99
|
/**
|
|
39
100
|
* 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.
|
|
40
101
|
* @summary List account option positions
|
|
@@ -100,6 +161,19 @@ exports.OptionsApiAxiosParamCreator = OptionsApiAxiosParamCreator;
|
|
|
100
161
|
const OptionsApiFp = function (configuration) {
|
|
101
162
|
const localVarAxiosParamCreator = (0, exports.OptionsApiAxiosParamCreator)(configuration);
|
|
102
163
|
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
|
+
},
|
|
103
177
|
/**
|
|
104
178
|
* 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.
|
|
105
179
|
* @summary List account option positions
|
|
@@ -123,6 +197,16 @@ exports.OptionsApiFp = OptionsApiFp;
|
|
|
123
197
|
const OptionsApiFactory = function (configuration, basePath, axios) {
|
|
124
198
|
const localVarFp = (0, exports.OptionsApiFp)(configuration);
|
|
125
199
|
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
|
+
},
|
|
126
210
|
/**
|
|
127
211
|
* 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.
|
|
128
212
|
* @summary List account option positions
|
|
@@ -143,6 +227,17 @@ exports.OptionsApiFactory = OptionsApiFactory;
|
|
|
143
227
|
* @extends {BaseAPI}
|
|
144
228
|
*/
|
|
145
229
|
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
|
+
}
|
|
146
241
|
/**
|
|
147
242
|
* 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.
|
|
148
243
|
* @summary List account option positions
|