snaptrade-typescript-sdk 9.0.165 → 9.0.166
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 +74 -1
- package/dist/api/trading-api-generated.d.ts +62 -0
- package/dist/api/trading-api-generated.js +103 -0
- package/dist/browser.js +1 -1
- package/dist/configuration.js +1 -1
- package/dist/models/index.d.ts +1 -0
- package/dist/models/index.js +1 -0
- package/dist/models/option-impact.d.ts +20 -0
- package/dist/models/option-impact.js +2 -0
- package/dist/operationParameterMap.js +31 -0
- 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.166)
|
|
10
10
|
[](https://snaptrade.com/)
|
|
11
11
|
|
|
12
12
|
</div>
|
|
@@ -63,6 +63,7 @@ Connect brokerage accounts to your app for live positions and trading
|
|
|
63
63
|
* [`snaptrade.trading.cancelOrder`](#snaptradetradingcancelorder)
|
|
64
64
|
* [`snaptrade.trading.cancelUserAccountOrder`](#snaptradetradingcanceluseraccountorder)
|
|
65
65
|
* [`snaptrade.trading.getCryptocurrencyPairQuote`](#snaptradetradinggetcryptocurrencypairquote)
|
|
66
|
+
* [`snaptrade.trading.getOptionImpact`](#snaptradetradinggetoptionimpact)
|
|
66
67
|
* [`snaptrade.trading.getOrderImpact`](#snaptradetradinggetorderimpact)
|
|
67
68
|
* [`snaptrade.trading.getUserAccountQuotes`](#snaptradetradinggetuseraccountquotes)
|
|
68
69
|
* [`snaptrade.trading.placeBracketOrder`](#snaptradetradingplacebracketorder)
|
|
@@ -1914,6 +1915,78 @@ const getCryptocurrencyPairQuoteResponse =
|
|
|
1914
1915
|
---
|
|
1915
1916
|
|
|
1916
1917
|
|
|
1918
|
+
### `snaptrade.trading.getOptionImpact`<a id="snaptradetradinggetoptionimpact"></a>
|
|
1919
|
+
|
|
1920
|
+
Simulates an option order with up to 4 legs and returns the estimated cost and transaction fees without placing it.
|
|
1921
|
+
Only supported for certain brokerages. Please refer to https://snaptrade.notion.site/brokerages for more information on brokerage trading support.
|
|
1922
|
+
|
|
1923
|
+
|
|
1924
|
+
#### 🛠️ Usage<a id="🛠️-usage"></a>
|
|
1925
|
+
|
|
1926
|
+
```typescript
|
|
1927
|
+
const getOptionImpactResponse = await snaptrade.trading.getOptionImpact({
|
|
1928
|
+
userId: "snaptrade-user-123",
|
|
1929
|
+
userSecret: "adf2aa34-8219-40f7-a6b3-60156985cc61",
|
|
1930
|
+
accountId: "917c8734-8470-4a3e-a18f-57c3f2ee6631",
|
|
1931
|
+
order_type: "MARKET",
|
|
1932
|
+
time_in_force: "Day",
|
|
1933
|
+
limit_price: "",
|
|
1934
|
+
stop_price: "",
|
|
1935
|
+
price_effect: "DEBIT",
|
|
1936
|
+
legs: [
|
|
1937
|
+
{
|
|
1938
|
+
instrument: {
|
|
1939
|
+
symbol: "PBI 250718C00006000",
|
|
1940
|
+
instrument_type: "OPTION",
|
|
1941
|
+
},
|
|
1942
|
+
action: "BUY_TO_OPEN",
|
|
1943
|
+
units: 1,
|
|
1944
|
+
},
|
|
1945
|
+
],
|
|
1946
|
+
});
|
|
1947
|
+
```
|
|
1948
|
+
|
|
1949
|
+
#### ⚙️ Parameters<a id="⚙️-parameters"></a>
|
|
1950
|
+
|
|
1951
|
+
##### order_type: [`MlegOrderTypeStrict`](./models/mleg-order-type-strict.ts)<a id="order_type-mlegordertypestrictmodelsmleg-order-type-strictts"></a>
|
|
1952
|
+
|
|
1953
|
+
The type of order to place.
|
|
1954
|
+
|
|
1955
|
+
##### time_in_force: [`TimeInForceStrict`](./models/time-in-force-strict.ts)<a id="time_in_force-timeinforcestrictmodelstime-in-force-strictts"></a>
|
|
1956
|
+
|
|
1957
|
+
The Time in Force type for the order. This field indicates how long the order will remain active before it is executed or expires. Here are the supported values: - `Day` - Day. The order is valid only for the trading day on which it is placed. - `GTC` - Good Til Canceled. The order is valid until it is executed or canceled. - `FOK` - Fill Or Kill. The order must be executed in its entirety immediately or be canceled completely. - `IOC` - Immediate Or Cancel. The order must be executed immediately. Any portion of the order that cannot be filled immediately will be canceled.
|
|
1958
|
+
|
|
1959
|
+
##### legs: [`MlegLeg`](./models/mleg-leg.ts)[]<a id="legs-mleglegmodelsmleg-legts"></a>
|
|
1960
|
+
|
|
1961
|
+
##### userId: `string`<a id="userid-string"></a>
|
|
1962
|
+
|
|
1963
|
+
##### userSecret: `string`<a id="usersecret-string"></a>
|
|
1964
|
+
|
|
1965
|
+
##### accountId: `string`<a id="accountid-string"></a>
|
|
1966
|
+
|
|
1967
|
+
##### limit_price: `string`<a id="limit_price-string"></a>
|
|
1968
|
+
|
|
1969
|
+
The limit price. Required if the order type is LIMIT, STOP_LOSS_LIMIT.
|
|
1970
|
+
|
|
1971
|
+
##### stop_price: `string`<a id="stop_price-string"></a>
|
|
1972
|
+
|
|
1973
|
+
The stop price. Required if the order type is STOP_LOSS_MARKET, STOP_LOSS_LIMIT.
|
|
1974
|
+
|
|
1975
|
+
##### price_effect: [`MlegPriceEffectStrict`](./models/mleg-price-effect-strict.ts)<a id="price_effect-mlegpriceeffectstrictmodelsmleg-price-effect-strictts"></a>
|
|
1976
|
+
|
|
1977
|
+
#### 🔄 Return<a id="🔄-return"></a>
|
|
1978
|
+
|
|
1979
|
+
[OptionImpact](./models/option-impact.ts)
|
|
1980
|
+
|
|
1981
|
+
#### 🌐 Endpoint<a id="🌐-endpoint"></a>
|
|
1982
|
+
|
|
1983
|
+
`/accounts/{accountId}/trading/options/impact` `POST`
|
|
1984
|
+
|
|
1985
|
+
[🔙 **Back to Table of Contents**](#table-of-contents)
|
|
1986
|
+
|
|
1987
|
+
---
|
|
1988
|
+
|
|
1989
|
+
|
|
1917
1990
|
### `snaptrade.trading.getOrderImpact`<a id="snaptradetradinggetorderimpact"></a>
|
|
1918
1991
|
|
|
1919
1992
|
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.
|
|
@@ -14,6 +14,7 @@ import { ManualTradeFormWithOptions } from '../models';
|
|
|
14
14
|
import { ManualTradeReplaceForm } from '../models';
|
|
15
15
|
import { MlegOrderResponse } from '../models';
|
|
16
16
|
import { MlegTradeForm } from '../models';
|
|
17
|
+
import { OptionImpact } from '../models';
|
|
17
18
|
import { OrderUpdatedResponse } from '../models';
|
|
18
19
|
import { SymbolsQuotesInner } from '../models';
|
|
19
20
|
import { TradingSearchCryptocurrencyPairInstruments200Response } from '../models';
|
|
@@ -57,6 +58,17 @@ export declare const TradingApiAxiosParamCreator: (configuration?: Configuration
|
|
|
57
58
|
* @throws {RequiredError}
|
|
58
59
|
*/
|
|
59
60
|
getCryptocurrencyPairQuote: (userId: string, userSecret: string, accountId: string, instrumentSymbol: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
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 https://snaptrade.notion.site/brokerages for more information on brokerage trading support.
|
|
63
|
+
* @summary Get option order impact
|
|
64
|
+
* @param {string} userId
|
|
65
|
+
* @param {string} userSecret
|
|
66
|
+
* @param {string} accountId
|
|
67
|
+
* @param {MlegTradeForm} mlegTradeForm
|
|
68
|
+
* @param {*} [options] Override http request option.
|
|
69
|
+
* @throws {RequiredError}
|
|
70
|
+
*/
|
|
71
|
+
getOptionImpact: (userId: string, userSecret: string, accountId: string, mlegTradeForm: MlegTradeForm, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
60
72
|
/**
|
|
61
73
|
* 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.
|
|
62
74
|
* @summary Check equity order impact
|
|
@@ -198,6 +210,14 @@ export declare const TradingApiFp: (configuration?: Configuration) => {
|
|
|
198
210
|
* @throws {RequiredError}
|
|
199
211
|
*/
|
|
200
212
|
getCryptocurrencyPairQuote(requestParameters: TradingApiGetCryptocurrencyPairQuoteRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CryptocurrencyPairQuote>>;
|
|
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 https://snaptrade.notion.site/brokerages for more information on brokerage trading support.
|
|
215
|
+
* @summary Get option order impact
|
|
216
|
+
* @param {TradingApiGetOptionImpactRequest} requestParameters Request parameters.
|
|
217
|
+
* @param {*} [options] Override http request option.
|
|
218
|
+
* @throws {RequiredError}
|
|
219
|
+
*/
|
|
220
|
+
getOptionImpact(requestParameters: TradingApiGetOptionImpactRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<OptionImpact>>;
|
|
201
221
|
/**
|
|
202
222
|
* 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.
|
|
203
223
|
* @summary Check equity order impact
|
|
@@ -309,6 +329,14 @@ export declare const TradingApiFactory: (configuration?: Configuration, basePath
|
|
|
309
329
|
* @throws {RequiredError}
|
|
310
330
|
*/
|
|
311
331
|
getCryptocurrencyPairQuote(requestParameters: TradingApiGetCryptocurrencyPairQuoteRequest, options?: AxiosRequestConfig): AxiosPromise<CryptocurrencyPairQuote>;
|
|
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 https://snaptrade.notion.site/brokerages for more information on brokerage trading support.
|
|
334
|
+
* @summary Get option order impact
|
|
335
|
+
* @param {TradingApiGetOptionImpactRequest} requestParameters Request parameters.
|
|
336
|
+
* @param {*} [options] Override http request option.
|
|
337
|
+
* @throws {RequiredError}
|
|
338
|
+
*/
|
|
339
|
+
getOptionImpact(requestParameters: TradingApiGetOptionImpactRequest, options?: AxiosRequestConfig): AxiosPromise<OptionImpact>;
|
|
312
340
|
/**
|
|
313
341
|
* 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.
|
|
314
342
|
* @summary Check equity order impact
|
|
@@ -471,6 +499,31 @@ export type TradingApiGetCryptocurrencyPairQuoteRequest = {
|
|
|
471
499
|
*/
|
|
472
500
|
readonly instrumentSymbol: string;
|
|
473
501
|
};
|
|
502
|
+
/**
|
|
503
|
+
* Request parameters for getOptionImpact operation in TradingApi.
|
|
504
|
+
* @export
|
|
505
|
+
* @interface TradingApiGetOptionImpactRequest
|
|
506
|
+
*/
|
|
507
|
+
export type TradingApiGetOptionImpactRequest = {
|
|
508
|
+
/**
|
|
509
|
+
*
|
|
510
|
+
* @type {string}
|
|
511
|
+
* @memberof TradingApiGetOptionImpact
|
|
512
|
+
*/
|
|
513
|
+
readonly userId: string;
|
|
514
|
+
/**
|
|
515
|
+
*
|
|
516
|
+
* @type {string}
|
|
517
|
+
* @memberof TradingApiGetOptionImpact
|
|
518
|
+
*/
|
|
519
|
+
readonly userSecret: string;
|
|
520
|
+
/**
|
|
521
|
+
*
|
|
522
|
+
* @type {string}
|
|
523
|
+
* @memberof TradingApiGetOptionImpact
|
|
524
|
+
*/
|
|
525
|
+
readonly accountId: string;
|
|
526
|
+
} & MlegTradeForm;
|
|
474
527
|
/**
|
|
475
528
|
* Request parameters for getOrderImpact operation in TradingApi.
|
|
476
529
|
* @export
|
|
@@ -768,6 +821,15 @@ export declare class TradingApiGenerated extends BaseAPI {
|
|
|
768
821
|
* @memberof TradingApiGenerated
|
|
769
822
|
*/
|
|
770
823
|
getCryptocurrencyPairQuote(requestParameters: TradingApiGetCryptocurrencyPairQuoteRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CryptocurrencyPairQuote, any>>;
|
|
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 https://snaptrade.notion.site/brokerages for more information on brokerage trading support.
|
|
826
|
+
* @summary Get option order impact
|
|
827
|
+
* @param {TradingApiGetOptionImpactRequest} requestParameters Request parameters.
|
|
828
|
+
* @param {*} [options] Override http request option.
|
|
829
|
+
* @throws {RequiredError}
|
|
830
|
+
* @memberof TradingApiGenerated
|
|
831
|
+
*/
|
|
832
|
+
getOptionImpact(requestParameters: TradingApiGetOptionImpactRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<OptionImpact, any>>;
|
|
771
833
|
/**
|
|
772
834
|
* 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.
|
|
773
835
|
* @summary Check equity order impact
|
|
@@ -217,6 +217,67 @@ const TradingApiAxiosParamCreator = function (configuration) {
|
|
|
217
217
|
options: localVarRequestOptions,
|
|
218
218
|
};
|
|
219
219
|
}),
|
|
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 https://snaptrade.notion.site/brokerages for more information on brokerage trading support.
|
|
222
|
+
* @summary Get option order impact
|
|
223
|
+
* @param {string} userId
|
|
224
|
+
* @param {string} userSecret
|
|
225
|
+
* @param {string} accountId
|
|
226
|
+
* @param {MlegTradeForm} mlegTradeForm
|
|
227
|
+
* @param {*} [options] Override http request option.
|
|
228
|
+
* @throws {RequiredError}
|
|
229
|
+
*/
|
|
230
|
+
getOptionImpact: (userId, userSecret, accountId, mlegTradeForm, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
231
|
+
// verify required parameter 'userId' is not null or undefined
|
|
232
|
+
(0, common_1.assertParamExists)('getOptionImpact', 'userId', userId);
|
|
233
|
+
// verify required parameter 'userSecret' is not null or undefined
|
|
234
|
+
(0, common_1.assertParamExists)('getOptionImpact', 'userSecret', userSecret);
|
|
235
|
+
// verify required parameter 'accountId' is not null or undefined
|
|
236
|
+
(0, common_1.assertParamExists)('getOptionImpact', 'accountId', accountId);
|
|
237
|
+
// verify required parameter 'mlegTradeForm' is not null or undefined
|
|
238
|
+
(0, common_1.assertParamExists)('getOptionImpact', 'mlegTradeForm', mlegTradeForm);
|
|
239
|
+
const localVarPath = `/accounts/{accountId}/trading/options/impact`
|
|
240
|
+
.replace(`{${"accountId"}}`, encodeURIComponent(String(accountId !== undefined ? accountId : `-accountId-`)));
|
|
241
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
242
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
243
|
+
let baseOptions;
|
|
244
|
+
if (configuration) {
|
|
245
|
+
baseOptions = configuration.baseOptions;
|
|
246
|
+
}
|
|
247
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
248
|
+
const localVarHeaderParameter = configuration && !(0, common_1.isBrowser)() ? { "User-Agent": configuration.userAgent } : {};
|
|
249
|
+
const localVarQueryParameter = {};
|
|
250
|
+
// authentication PartnerClientId required
|
|
251
|
+
yield (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, key: "clientId", keyParamName: "clientId", configuration });
|
|
252
|
+
// authentication PartnerSignature required
|
|
253
|
+
yield (0, common_1.setApiKeyToObject)({ object: localVarHeaderParameter, key: "Signature", keyParamName: "signature", configuration });
|
|
254
|
+
// authentication PartnerTimestamp required
|
|
255
|
+
yield (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, key: "timestamp", keyParamName: "timestamp", configuration });
|
|
256
|
+
if (userId !== undefined) {
|
|
257
|
+
localVarQueryParameter['userId'] = userId;
|
|
258
|
+
}
|
|
259
|
+
if (userSecret !== undefined) {
|
|
260
|
+
localVarQueryParameter['userSecret'] = userSecret;
|
|
261
|
+
}
|
|
262
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
263
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
264
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
265
|
+
(0, requestBeforeHook_1.requestBeforeHook)({
|
|
266
|
+
requestBody: mlegTradeForm,
|
|
267
|
+
queryParameters: localVarQueryParameter,
|
|
268
|
+
requestConfig: localVarRequestOptions,
|
|
269
|
+
path: localVarPath,
|
|
270
|
+
configuration,
|
|
271
|
+
pathTemplate: '/accounts/{accountId}/trading/options/impact',
|
|
272
|
+
httpMethod: 'POST'
|
|
273
|
+
});
|
|
274
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(mlegTradeForm, localVarRequestOptions, configuration);
|
|
275
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
276
|
+
return {
|
|
277
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
278
|
+
options: localVarRequestOptions,
|
|
279
|
+
};
|
|
280
|
+
}),
|
|
220
281
|
/**
|
|
221
282
|
* 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.
|
|
222
283
|
* @summary Check equity order impact
|
|
@@ -879,6 +940,27 @@ const TradingApiFp = function (configuration) {
|
|
|
879
940
|
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
880
941
|
});
|
|
881
942
|
},
|
|
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 https://snaptrade.notion.site/brokerages for more information on brokerage trading support.
|
|
945
|
+
* @summary Get option order impact
|
|
946
|
+
* @param {TradingApiGetOptionImpactRequest} requestParameters Request parameters.
|
|
947
|
+
* @param {*} [options] Override http request option.
|
|
948
|
+
* @throws {RequiredError}
|
|
949
|
+
*/
|
|
950
|
+
getOptionImpact(requestParameters, options) {
|
|
951
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
952
|
+
const mlegTradeForm = {
|
|
953
|
+
order_type: requestParameters.order_type,
|
|
954
|
+
time_in_force: requestParameters.time_in_force,
|
|
955
|
+
limit_price: requestParameters.limit_price,
|
|
956
|
+
stop_price: requestParameters.stop_price,
|
|
957
|
+
price_effect: requestParameters.price_effect,
|
|
958
|
+
legs: requestParameters.legs
|
|
959
|
+
};
|
|
960
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getOptionImpact(requestParameters.userId, requestParameters.userSecret, requestParameters.accountId, mlegTradeForm, options);
|
|
961
|
+
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
962
|
+
});
|
|
963
|
+
},
|
|
882
964
|
/**
|
|
883
965
|
* 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.
|
|
884
966
|
* @summary Check equity order impact
|
|
@@ -1128,6 +1210,16 @@ const TradingApiFactory = function (configuration, basePath, axios) {
|
|
|
1128
1210
|
getCryptocurrencyPairQuote(requestParameters, options) {
|
|
1129
1211
|
return localVarFp.getCryptocurrencyPairQuote(requestParameters, options).then((request) => request(axios, basePath));
|
|
1130
1212
|
},
|
|
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 https://snaptrade.notion.site/brokerages for more information on brokerage trading support.
|
|
1215
|
+
* @summary Get option order impact
|
|
1216
|
+
* @param {TradingApiGetOptionImpactRequest} requestParameters Request parameters.
|
|
1217
|
+
* @param {*} [options] Override http request option.
|
|
1218
|
+
* @throws {RequiredError}
|
|
1219
|
+
*/
|
|
1220
|
+
getOptionImpact(requestParameters, options) {
|
|
1221
|
+
return localVarFp.getOptionImpact(requestParameters, options).then((request) => request(axios, basePath));
|
|
1222
|
+
},
|
|
1131
1223
|
/**
|
|
1132
1224
|
* 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.
|
|
1133
1225
|
* @summary Check equity order impact
|
|
@@ -1272,6 +1364,17 @@ class TradingApiGenerated extends base_1.BaseAPI {
|
|
|
1272
1364
|
getCryptocurrencyPairQuote(requestParameters, options) {
|
|
1273
1365
|
return (0, exports.TradingApiFp)(this.configuration).getCryptocurrencyPairQuote(requestParameters, options).then((request) => request(this.axios, this.basePath));
|
|
1274
1366
|
}
|
|
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 https://snaptrade.notion.site/brokerages for more information on brokerage trading support.
|
|
1369
|
+
* @summary Get option order impact
|
|
1370
|
+
* @param {TradingApiGetOptionImpactRequest} requestParameters Request parameters.
|
|
1371
|
+
* @param {*} [options] Override http request option.
|
|
1372
|
+
* @throws {RequiredError}
|
|
1373
|
+
* @memberof TradingApiGenerated
|
|
1374
|
+
*/
|
|
1375
|
+
getOptionImpact(requestParameters, options) {
|
|
1376
|
+
return (0, exports.TradingApiFp)(this.configuration).getOptionImpact(requestParameters, options).then((request) => request(this.axios, this.basePath));
|
|
1377
|
+
}
|
|
1275
1378
|
/**
|
|
1276
1379
|
* 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.
|
|
1277
1380
|
* @summary Check equity order impact
|