snaptrade-typescript-sdk 9.0.176 → 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
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.getUserAccountOptionQuotes`](#snaptradeoptionsgetuseraccountoptionquotes)
|
|
52
51
|
* [`snaptrade.options.listOptionHoldings`](#snaptradeoptionslistoptionholdings)
|
|
53
52
|
* [`snaptrade.referenceData.getCurrencyExchangeRatePair`](#snaptradereferencedatagetcurrencyexchangeratepair)
|
|
54
53
|
* [`snaptrade.referenceData.getPartnerInfo`](#snaptradereferencedatagetpartnerinfo)
|
|
@@ -1436,49 +1435,6 @@ Defaults to true. Indicates if request should fetch only executed orders. Set to
|
|
|
1436
1435
|
---
|
|
1437
1436
|
|
|
1438
1437
|
|
|
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
|
-
|
|
1482
1438
|
### `snaptrade.options.listOptionHoldings`<a id="snaptradeoptionslistoptionholdings"></a>
|
|
1483
1439
|
|
|
1484
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).
|
|
@@ -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 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>;
|
|
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 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>>;
|
|
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 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>;
|
|
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 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
|
-
};
|
|
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 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>>;
|
|
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 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
|