snaptrade-typescript-sdk 9.0.39 → 9.0.41
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 +79 -63
- package/dist/api/authentication-api-generated.d.ts +8 -8
- package/dist/api/authentication-api-generated.js +8 -8
- package/dist/api/connections-api-generated.d.ts +8 -8
- package/dist/api/connections-api-generated.js +8 -8
- package/dist/api/trading-api-generated.d.ts +47 -47
- package/dist/api/trading-api-generated.js +46 -46
- package/dist/browser.js +1 -1
- package/dist/configuration.js +1 -1
- package/dist/models/action-strict.d.ts +1 -1
- package/dist/models/brokerage-authorization.d.ts +1 -1
- package/dist/models/index.d.ts +1 -0
- package/dist/models/index.js +1 -0
- package/dist/models/manual-trade-and-impact.d.ts +5 -4
- package/dist/models/manual-trade-balance.d.ts +5 -5
- package/dist/models/manual-trade-form.d.ts +21 -21
- package/dist/models/manual-trade-impact.d.ts +38 -0
- package/dist/models/manual-trade-impact.js +2 -0
- package/dist/models/manual-trade-symbol.d.ts +10 -6
- package/dist/models/manual-trade.d.ts +9 -8
- package/dist/models/notional-value.d.ts +1 -1
- package/dist/models/options-place-option-strategy-request.d.ts +2 -2
- package/dist/models/order-type-strict.d.ts +1 -1
- package/dist/models/snap-trade-login-user-request-body.d.ts +3 -3
- package/dist/models/symbols-quotes-inner.d.ts +8 -8
- package/dist/models/time-in-force-strict.d.ts +1 -1
- package/dist/models/trading-cancel-user-account-order-request.d.ts +1 -1
- package/dist/models/validated-trade-body.d.ts +2 -2
- package/dist/operationParameterMap.js +20 -20
- package/package.json +1 -1
|
@@ -13,19 +13,19 @@ import { ValidatedTradeBody } from '../models';
|
|
|
13
13
|
*/
|
|
14
14
|
export declare const TradingApiAxiosParamCreator: (configuration?: Configuration) => {
|
|
15
15
|
/**
|
|
16
|
-
*
|
|
17
|
-
* @summary Cancel
|
|
16
|
+
* Attempts to cancel an open order with the brokerage. If the order is no longer cancellable, the request will be rejected.
|
|
17
|
+
* @summary Cancel order
|
|
18
18
|
* @param {string} userId
|
|
19
19
|
* @param {string} userSecret
|
|
20
|
-
* @param {string} accountId
|
|
21
|
-
* @param {TradingCancelUserAccountOrderRequest} tradingCancelUserAccountOrderRequest
|
|
20
|
+
* @param {string} accountId
|
|
21
|
+
* @param {TradingCancelUserAccountOrderRequest} tradingCancelUserAccountOrderRequest
|
|
22
22
|
* @param {*} [options] Override http request option.
|
|
23
23
|
* @throws {RequiredError}
|
|
24
24
|
*/
|
|
25
25
|
cancelUserAccountOrder: (userId: string, userSecret: string, accountId: string, tradingCancelUserAccountOrderRequest: TradingCancelUserAccountOrderRequest, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
26
26
|
/**
|
|
27
|
-
*
|
|
28
|
-
* @summary Check
|
|
27
|
+
* 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.
|
|
28
|
+
* @summary Check order impact
|
|
29
29
|
* @param {string} userId
|
|
30
30
|
* @param {string} userSecret
|
|
31
31
|
* @param {ManualTradeForm} manualTradeForm
|
|
@@ -34,20 +34,20 @@ export declare const TradingApiAxiosParamCreator: (configuration?: Configuration
|
|
|
34
34
|
*/
|
|
35
35
|
getOrderImpact: (userId: string, userSecret: string, manualTradeForm: ManualTradeForm, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
36
36
|
/**
|
|
37
|
-
* Returns
|
|
37
|
+
* Returns quotes from the brokerage for the specified symbols and account. The quotes returned can be delayed depending on the brokerage the account belongs to. It is highly recommended that you use your own market data provider for real-time quotes instead of relying on this endpoint. This endpoint does not work for options quotes.
|
|
38
38
|
* @summary Get symbol quotes
|
|
39
39
|
* @param {string} userId
|
|
40
40
|
* @param {string} userSecret
|
|
41
|
-
* @param {string} symbols List of
|
|
42
|
-
* @param {string} accountId
|
|
43
|
-
* @param {boolean} [useTicker] Should be set to True if
|
|
41
|
+
* @param {string} symbols List of Universal Symbol IDs or tickers to get quotes for.
|
|
42
|
+
* @param {string} accountId
|
|
43
|
+
* @param {boolean} [useTicker] Should be set to `True` if `symbols` are comprised of tickers. Defaults to `False` if not provided.
|
|
44
44
|
* @param {*} [options] Override http request option.
|
|
45
45
|
* @throws {RequiredError}
|
|
46
46
|
*/
|
|
47
47
|
getUserAccountQuotes: (userId: string, userSecret: string, symbols: string, accountId: string, useTicker?: boolean, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
48
48
|
/**
|
|
49
|
-
* Places a
|
|
50
|
-
* @summary Place
|
|
49
|
+
* Places a brokerage order in the specified account. The order could be rejected by the brokerage if it is invalid or if the account does not have sufficient funds. This endpoint does not compute the impact to the account balance from the order and any potential commissions before submitting the order to the brokerage. If that is desired, you can use the [check order impact endpoint](/reference/Trading/Trading_getOrderImpact). It\'s recommended to trigger a manual refresh of the account after placing an order to ensure the account is up to date. You can use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint for this.
|
|
50
|
+
* @summary Place order
|
|
51
51
|
* @param {string} userId
|
|
52
52
|
* @param {string} userSecret
|
|
53
53
|
* @param {ManualTradeForm} manualTradeForm
|
|
@@ -56,9 +56,9 @@ export declare const TradingApiAxiosParamCreator: (configuration?: Configuration
|
|
|
56
56
|
*/
|
|
57
57
|
placeForceOrder: (userId: string, userSecret: string, manualTradeForm: ManualTradeForm, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
58
58
|
/**
|
|
59
|
-
* Places the
|
|
60
|
-
* @summary Place order
|
|
61
|
-
* @param {string} tradeId
|
|
59
|
+
* Places the previously checked order with the brokerage. The `tradeId` is obtained from the [check order impact endpoint](/reference/Trading/Trading_getOrderImpact). If you prefer to place the order without checking for impact first, you can use the [place order endpoint](/reference/Trading/Trading_placeForceOrder). It\'s recommended to trigger a manual refresh of the account after placing an order to ensure the account is up to date. You can use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint for this.
|
|
60
|
+
* @summary Place checked order
|
|
61
|
+
* @param {string} tradeId Obtained from calling the [check order impact endpoint](/reference/Trading/Trading_getOrderImpact)
|
|
62
62
|
* @param {string} userId
|
|
63
63
|
* @param {string} userSecret
|
|
64
64
|
* @param {ValidatedTradeBody} [validatedTradeBody]
|
|
@@ -73,23 +73,23 @@ export declare const TradingApiAxiosParamCreator: (configuration?: Configuration
|
|
|
73
73
|
*/
|
|
74
74
|
export declare const TradingApiFp: (configuration?: Configuration) => {
|
|
75
75
|
/**
|
|
76
|
-
*
|
|
77
|
-
* @summary Cancel
|
|
76
|
+
* Attempts to cancel an open order with the brokerage. If the order is no longer cancellable, the request will be rejected.
|
|
77
|
+
* @summary Cancel order
|
|
78
78
|
* @param {TradingApiCancelUserAccountOrderRequest} requestParameters Request parameters.
|
|
79
79
|
* @param {*} [options] Override http request option.
|
|
80
80
|
* @throws {RequiredError}
|
|
81
81
|
*/
|
|
82
82
|
cancelUserAccountOrder(requestParameters: TradingApiCancelUserAccountOrderRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AccountOrderRecord>>;
|
|
83
83
|
/**
|
|
84
|
-
*
|
|
85
|
-
* @summary Check
|
|
84
|
+
* 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.
|
|
85
|
+
* @summary Check order impact
|
|
86
86
|
* @param {TradingApiGetOrderImpactRequest} requestParameters Request parameters.
|
|
87
87
|
* @param {*} [options] Override http request option.
|
|
88
88
|
* @throws {RequiredError}
|
|
89
89
|
*/
|
|
90
90
|
getOrderImpact(requestParameters: TradingApiGetOrderImpactRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ManualTradeAndImpact>>;
|
|
91
91
|
/**
|
|
92
|
-
* Returns
|
|
92
|
+
* Returns quotes from the brokerage for the specified symbols and account. The quotes returned can be delayed depending on the brokerage the account belongs to. It is highly recommended that you use your own market data provider for real-time quotes instead of relying on this endpoint. This endpoint does not work for options quotes.
|
|
93
93
|
* @summary Get symbol quotes
|
|
94
94
|
* @param {TradingApiGetUserAccountQuotesRequest} requestParameters Request parameters.
|
|
95
95
|
* @param {*} [options] Override http request option.
|
|
@@ -97,16 +97,16 @@ export declare const TradingApiFp: (configuration?: Configuration) => {
|
|
|
97
97
|
*/
|
|
98
98
|
getUserAccountQuotes(requestParameters: TradingApiGetUserAccountQuotesRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<SymbolsQuotesInner>>>;
|
|
99
99
|
/**
|
|
100
|
-
* Places a
|
|
101
|
-
* @summary Place
|
|
100
|
+
* Places a brokerage order in the specified account. The order could be rejected by the brokerage if it is invalid or if the account does not have sufficient funds. This endpoint does not compute the impact to the account balance from the order and any potential commissions before submitting the order to the brokerage. If that is desired, you can use the [check order impact endpoint](/reference/Trading/Trading_getOrderImpact). It\'s recommended to trigger a manual refresh of the account after placing an order to ensure the account is up to date. You can use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint for this.
|
|
101
|
+
* @summary Place order
|
|
102
102
|
* @param {TradingApiPlaceForceOrderRequest} requestParameters Request parameters.
|
|
103
103
|
* @param {*} [options] Override http request option.
|
|
104
104
|
* @throws {RequiredError}
|
|
105
105
|
*/
|
|
106
106
|
placeForceOrder(requestParameters: TradingApiPlaceForceOrderRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AccountOrderRecord>>;
|
|
107
107
|
/**
|
|
108
|
-
* Places the
|
|
109
|
-
* @summary Place order
|
|
108
|
+
* Places the previously checked order with the brokerage. The `tradeId` is obtained from the [check order impact endpoint](/reference/Trading/Trading_getOrderImpact). If you prefer to place the order without checking for impact first, you can use the [place order endpoint](/reference/Trading/Trading_placeForceOrder). It\'s recommended to trigger a manual refresh of the account after placing an order to ensure the account is up to date. You can use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint for this.
|
|
109
|
+
* @summary Place checked order
|
|
110
110
|
* @param {TradingApiPlaceOrderRequest} requestParameters Request parameters.
|
|
111
111
|
* @param {*} [options] Override http request option.
|
|
112
112
|
* @throws {RequiredError}
|
|
@@ -119,23 +119,23 @@ export declare const TradingApiFp: (configuration?: Configuration) => {
|
|
|
119
119
|
*/
|
|
120
120
|
export declare const TradingApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
|
|
121
121
|
/**
|
|
122
|
-
*
|
|
123
|
-
* @summary Cancel
|
|
122
|
+
* Attempts to cancel an open order with the brokerage. If the order is no longer cancellable, the request will be rejected.
|
|
123
|
+
* @summary Cancel order
|
|
124
124
|
* @param {TradingApiCancelUserAccountOrderRequest} requestParameters Request parameters.
|
|
125
125
|
* @param {*} [options] Override http request option.
|
|
126
126
|
* @throws {RequiredError}
|
|
127
127
|
*/
|
|
128
128
|
cancelUserAccountOrder(requestParameters: TradingApiCancelUserAccountOrderRequest, options?: AxiosRequestConfig): AxiosPromise<AccountOrderRecord>;
|
|
129
129
|
/**
|
|
130
|
-
*
|
|
131
|
-
* @summary Check
|
|
130
|
+
* 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.
|
|
131
|
+
* @summary Check order impact
|
|
132
132
|
* @param {TradingApiGetOrderImpactRequest} requestParameters Request parameters.
|
|
133
133
|
* @param {*} [options] Override http request option.
|
|
134
134
|
* @throws {RequiredError}
|
|
135
135
|
*/
|
|
136
136
|
getOrderImpact(requestParameters: TradingApiGetOrderImpactRequest, options?: AxiosRequestConfig): AxiosPromise<ManualTradeAndImpact>;
|
|
137
137
|
/**
|
|
138
|
-
* Returns
|
|
138
|
+
* Returns quotes from the brokerage for the specified symbols and account. The quotes returned can be delayed depending on the brokerage the account belongs to. It is highly recommended that you use your own market data provider for real-time quotes instead of relying on this endpoint. This endpoint does not work for options quotes.
|
|
139
139
|
* @summary Get symbol quotes
|
|
140
140
|
* @param {TradingApiGetUserAccountQuotesRequest} requestParameters Request parameters.
|
|
141
141
|
* @param {*} [options] Override http request option.
|
|
@@ -143,16 +143,16 @@ export declare const TradingApiFactory: (configuration?: Configuration, basePath
|
|
|
143
143
|
*/
|
|
144
144
|
getUserAccountQuotes(requestParameters: TradingApiGetUserAccountQuotesRequest, options?: AxiosRequestConfig): AxiosPromise<Array<SymbolsQuotesInner>>;
|
|
145
145
|
/**
|
|
146
|
-
* Places a
|
|
147
|
-
* @summary Place
|
|
146
|
+
* Places a brokerage order in the specified account. The order could be rejected by the brokerage if it is invalid or if the account does not have sufficient funds. This endpoint does not compute the impact to the account balance from the order and any potential commissions before submitting the order to the brokerage. If that is desired, you can use the [check order impact endpoint](/reference/Trading/Trading_getOrderImpact). It\'s recommended to trigger a manual refresh of the account after placing an order to ensure the account is up to date. You can use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint for this.
|
|
147
|
+
* @summary Place order
|
|
148
148
|
* @param {TradingApiPlaceForceOrderRequest} requestParameters Request parameters.
|
|
149
149
|
* @param {*} [options] Override http request option.
|
|
150
150
|
* @throws {RequiredError}
|
|
151
151
|
*/
|
|
152
152
|
placeForceOrder(requestParameters: TradingApiPlaceForceOrderRequest, options?: AxiosRequestConfig): AxiosPromise<AccountOrderRecord>;
|
|
153
153
|
/**
|
|
154
|
-
* Places the
|
|
155
|
-
* @summary Place order
|
|
154
|
+
* Places the previously checked order with the brokerage. The `tradeId` is obtained from the [check order impact endpoint](/reference/Trading/Trading_getOrderImpact). If you prefer to place the order without checking for impact first, you can use the [place order endpoint](/reference/Trading/Trading_placeForceOrder). It\'s recommended to trigger a manual refresh of the account after placing an order to ensure the account is up to date. You can use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint for this.
|
|
155
|
+
* @summary Place checked order
|
|
156
156
|
* @param {TradingApiPlaceOrderRequest} requestParameters Request parameters.
|
|
157
157
|
* @param {*} [options] Override http request option.
|
|
158
158
|
* @throws {RequiredError}
|
|
@@ -178,7 +178,7 @@ export type TradingApiCancelUserAccountOrderRequest = {
|
|
|
178
178
|
*/
|
|
179
179
|
readonly userSecret: string;
|
|
180
180
|
/**
|
|
181
|
-
*
|
|
181
|
+
*
|
|
182
182
|
* @type {string}
|
|
183
183
|
* @memberof TradingApiCancelUserAccountOrder
|
|
184
184
|
*/
|
|
@@ -222,19 +222,19 @@ export type TradingApiGetUserAccountQuotesRequest = {
|
|
|
222
222
|
*/
|
|
223
223
|
readonly userSecret: string;
|
|
224
224
|
/**
|
|
225
|
-
* List of
|
|
225
|
+
* List of Universal Symbol IDs or tickers to get quotes for.
|
|
226
226
|
* @type {string}
|
|
227
227
|
* @memberof TradingApiGetUserAccountQuotes
|
|
228
228
|
*/
|
|
229
229
|
readonly symbols: string;
|
|
230
230
|
/**
|
|
231
|
-
*
|
|
231
|
+
*
|
|
232
232
|
* @type {string}
|
|
233
233
|
* @memberof TradingApiGetUserAccountQuotes
|
|
234
234
|
*/
|
|
235
235
|
readonly accountId: string;
|
|
236
236
|
/**
|
|
237
|
-
* Should be set to True if
|
|
237
|
+
* Should be set to `True` if `symbols` are comprised of tickers. Defaults to `False` if not provided.
|
|
238
238
|
* @type {boolean}
|
|
239
239
|
* @memberof TradingApiGetUserAccountQuotes
|
|
240
240
|
*/
|
|
@@ -266,7 +266,7 @@ export type TradingApiPlaceForceOrderRequest = {
|
|
|
266
266
|
*/
|
|
267
267
|
export type TradingApiPlaceOrderRequest = {
|
|
268
268
|
/**
|
|
269
|
-
*
|
|
269
|
+
* Obtained from calling the [check order impact endpoint](/reference/Trading/Trading_getOrderImpact)
|
|
270
270
|
* @type {string}
|
|
271
271
|
* @memberof TradingApiPlaceOrder
|
|
272
272
|
*/
|
|
@@ -292,8 +292,8 @@ export type TradingApiPlaceOrderRequest = {
|
|
|
292
292
|
*/
|
|
293
293
|
export declare class TradingApiGenerated extends BaseAPI {
|
|
294
294
|
/**
|
|
295
|
-
*
|
|
296
|
-
* @summary Cancel
|
|
295
|
+
* Attempts to cancel an open order with the brokerage. If the order is no longer cancellable, the request will be rejected.
|
|
296
|
+
* @summary Cancel order
|
|
297
297
|
* @param {TradingApiCancelUserAccountOrderRequest} requestParameters Request parameters.
|
|
298
298
|
* @param {*} [options] Override http request option.
|
|
299
299
|
* @throws {RequiredError}
|
|
@@ -301,8 +301,8 @@ export declare class TradingApiGenerated extends BaseAPI {
|
|
|
301
301
|
*/
|
|
302
302
|
cancelUserAccountOrder(requestParameters: TradingApiCancelUserAccountOrderRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<AccountOrderRecord, any>>;
|
|
303
303
|
/**
|
|
304
|
-
*
|
|
305
|
-
* @summary Check
|
|
304
|
+
* 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.
|
|
305
|
+
* @summary Check order impact
|
|
306
306
|
* @param {TradingApiGetOrderImpactRequest} requestParameters Request parameters.
|
|
307
307
|
* @param {*} [options] Override http request option.
|
|
308
308
|
* @throws {RequiredError}
|
|
@@ -310,7 +310,7 @@ export declare class TradingApiGenerated extends BaseAPI {
|
|
|
310
310
|
*/
|
|
311
311
|
getOrderImpact(requestParameters: TradingApiGetOrderImpactRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ManualTradeAndImpact, any>>;
|
|
312
312
|
/**
|
|
313
|
-
* Returns
|
|
313
|
+
* Returns quotes from the brokerage for the specified symbols and account. The quotes returned can be delayed depending on the brokerage the account belongs to. It is highly recommended that you use your own market data provider for real-time quotes instead of relying on this endpoint. This endpoint does not work for options quotes.
|
|
314
314
|
* @summary Get symbol quotes
|
|
315
315
|
* @param {TradingApiGetUserAccountQuotesRequest} requestParameters Request parameters.
|
|
316
316
|
* @param {*} [options] Override http request option.
|
|
@@ -319,8 +319,8 @@ export declare class TradingApiGenerated extends BaseAPI {
|
|
|
319
319
|
*/
|
|
320
320
|
getUserAccountQuotes(requestParameters: TradingApiGetUserAccountQuotesRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<SymbolsQuotesInner[], any>>;
|
|
321
321
|
/**
|
|
322
|
-
* Places a
|
|
323
|
-
* @summary Place
|
|
322
|
+
* Places a brokerage order in the specified account. The order could be rejected by the brokerage if it is invalid or if the account does not have sufficient funds. This endpoint does not compute the impact to the account balance from the order and any potential commissions before submitting the order to the brokerage. If that is desired, you can use the [check order impact endpoint](/reference/Trading/Trading_getOrderImpact). It\'s recommended to trigger a manual refresh of the account after placing an order to ensure the account is up to date. You can use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint for this.
|
|
323
|
+
* @summary Place order
|
|
324
324
|
* @param {TradingApiPlaceForceOrderRequest} requestParameters Request parameters.
|
|
325
325
|
* @param {*} [options] Override http request option.
|
|
326
326
|
* @throws {RequiredError}
|
|
@@ -328,8 +328,8 @@ export declare class TradingApiGenerated extends BaseAPI {
|
|
|
328
328
|
*/
|
|
329
329
|
placeForceOrder(requestParameters: TradingApiPlaceForceOrderRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<AccountOrderRecord, any>>;
|
|
330
330
|
/**
|
|
331
|
-
* Places the
|
|
332
|
-
* @summary Place order
|
|
331
|
+
* Places the previously checked order with the brokerage. The `tradeId` is obtained from the [check order impact endpoint](/reference/Trading/Trading_getOrderImpact). If you prefer to place the order without checking for impact first, you can use the [place order endpoint](/reference/Trading/Trading_placeForceOrder). It\'s recommended to trigger a manual refresh of the account after placing an order to ensure the account is up to date. You can use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint for this.
|
|
332
|
+
* @summary Place checked order
|
|
333
333
|
* @param {TradingApiPlaceOrderRequest} requestParameters Request parameters.
|
|
334
334
|
* @param {*} [options] Override http request option.
|
|
335
335
|
* @throws {RequiredError}
|
|
@@ -36,12 +36,12 @@ const requestBeforeHook_1 = require("../requestBeforeHook");
|
|
|
36
36
|
const TradingApiAxiosParamCreator = function (configuration) {
|
|
37
37
|
return {
|
|
38
38
|
/**
|
|
39
|
-
*
|
|
40
|
-
* @summary Cancel
|
|
39
|
+
* Attempts to cancel an open order with the brokerage. If the order is no longer cancellable, the request will be rejected.
|
|
40
|
+
* @summary Cancel order
|
|
41
41
|
* @param {string} userId
|
|
42
42
|
* @param {string} userSecret
|
|
43
|
-
* @param {string} accountId
|
|
44
|
-
* @param {TradingCancelUserAccountOrderRequest} tradingCancelUserAccountOrderRequest
|
|
43
|
+
* @param {string} accountId
|
|
44
|
+
* @param {TradingCancelUserAccountOrderRequest} tradingCancelUserAccountOrderRequest
|
|
45
45
|
* @param {*} [options] Override http request option.
|
|
46
46
|
* @throws {RequiredError}
|
|
47
47
|
*/
|
|
@@ -97,8 +97,8 @@ const TradingApiAxiosParamCreator = function (configuration) {
|
|
|
97
97
|
};
|
|
98
98
|
}),
|
|
99
99
|
/**
|
|
100
|
-
*
|
|
101
|
-
* @summary Check
|
|
100
|
+
* 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.
|
|
101
|
+
* @summary Check order impact
|
|
102
102
|
* @param {string} userId
|
|
103
103
|
* @param {string} userSecret
|
|
104
104
|
* @param {ManualTradeForm} manualTradeForm
|
|
@@ -154,13 +154,13 @@ const TradingApiAxiosParamCreator = function (configuration) {
|
|
|
154
154
|
};
|
|
155
155
|
}),
|
|
156
156
|
/**
|
|
157
|
-
* Returns
|
|
157
|
+
* Returns quotes from the brokerage for the specified symbols and account. The quotes returned can be delayed depending on the brokerage the account belongs to. It is highly recommended that you use your own market data provider for real-time quotes instead of relying on this endpoint. This endpoint does not work for options quotes.
|
|
158
158
|
* @summary Get symbol quotes
|
|
159
159
|
* @param {string} userId
|
|
160
160
|
* @param {string} userSecret
|
|
161
|
-
* @param {string} symbols List of
|
|
162
|
-
* @param {string} accountId
|
|
163
|
-
* @param {boolean} [useTicker] Should be set to True if
|
|
161
|
+
* @param {string} symbols List of Universal Symbol IDs or tickers to get quotes for.
|
|
162
|
+
* @param {string} accountId
|
|
163
|
+
* @param {boolean} [useTicker] Should be set to `True` if `symbols` are comprised of tickers. Defaults to `False` if not provided.
|
|
164
164
|
* @param {*} [options] Override http request option.
|
|
165
165
|
* @throws {RequiredError}
|
|
166
166
|
*/
|
|
@@ -219,8 +219,8 @@ const TradingApiAxiosParamCreator = function (configuration) {
|
|
|
219
219
|
};
|
|
220
220
|
}),
|
|
221
221
|
/**
|
|
222
|
-
* Places a
|
|
223
|
-
* @summary Place
|
|
222
|
+
* Places a brokerage order in the specified account. The order could be rejected by the brokerage if it is invalid or if the account does not have sufficient funds. This endpoint does not compute the impact to the account balance from the order and any potential commissions before submitting the order to the brokerage. If that is desired, you can use the [check order impact endpoint](/reference/Trading/Trading_getOrderImpact). It\'s recommended to trigger a manual refresh of the account after placing an order to ensure the account is up to date. You can use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint for this.
|
|
223
|
+
* @summary Place order
|
|
224
224
|
* @param {string} userId
|
|
225
225
|
* @param {string} userSecret
|
|
226
226
|
* @param {ManualTradeForm} manualTradeForm
|
|
@@ -276,9 +276,9 @@ const TradingApiAxiosParamCreator = function (configuration) {
|
|
|
276
276
|
};
|
|
277
277
|
}),
|
|
278
278
|
/**
|
|
279
|
-
* Places the
|
|
280
|
-
* @summary Place order
|
|
281
|
-
* @param {string} tradeId
|
|
279
|
+
* Places the previously checked order with the brokerage. The `tradeId` is obtained from the [check order impact endpoint](/reference/Trading/Trading_getOrderImpact). If you prefer to place the order without checking for impact first, you can use the [place order endpoint](/reference/Trading/Trading_placeForceOrder). It\'s recommended to trigger a manual refresh of the account after placing an order to ensure the account is up to date. You can use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint for this.
|
|
280
|
+
* @summary Place checked order
|
|
281
|
+
* @param {string} tradeId Obtained from calling the [check order impact endpoint](/reference/Trading/Trading_getOrderImpact)
|
|
282
282
|
* @param {string} userId
|
|
283
283
|
* @param {string} userSecret
|
|
284
284
|
* @param {ValidatedTradeBody} [validatedTradeBody]
|
|
@@ -345,8 +345,8 @@ const TradingApiFp = function (configuration) {
|
|
|
345
345
|
const localVarAxiosParamCreator = (0, exports.TradingApiAxiosParamCreator)(configuration);
|
|
346
346
|
return {
|
|
347
347
|
/**
|
|
348
|
-
*
|
|
349
|
-
* @summary Cancel
|
|
348
|
+
* Attempts to cancel an open order with the brokerage. If the order is no longer cancellable, the request will be rejected.
|
|
349
|
+
* @summary Cancel order
|
|
350
350
|
* @param {TradingApiCancelUserAccountOrderRequest} requestParameters Request parameters.
|
|
351
351
|
* @param {*} [options] Override http request option.
|
|
352
352
|
* @throws {RequiredError}
|
|
@@ -361,8 +361,8 @@ const TradingApiFp = function (configuration) {
|
|
|
361
361
|
});
|
|
362
362
|
},
|
|
363
363
|
/**
|
|
364
|
-
*
|
|
365
|
-
* @summary Check
|
|
364
|
+
* 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.
|
|
365
|
+
* @summary Check order impact
|
|
366
366
|
* @param {TradingApiGetOrderImpactRequest} requestParameters Request parameters.
|
|
367
367
|
* @param {*} [options] Override http request option.
|
|
368
368
|
* @throws {RequiredError}
|
|
@@ -372,12 +372,12 @@ const TradingApiFp = function (configuration) {
|
|
|
372
372
|
const manualTradeForm = {
|
|
373
373
|
account_id: requestParameters.account_id,
|
|
374
374
|
action: requestParameters.action,
|
|
375
|
+
universal_symbol_id: requestParameters.universal_symbol_id,
|
|
375
376
|
order_type: requestParameters.order_type,
|
|
377
|
+
time_in_force: requestParameters.time_in_force,
|
|
376
378
|
price: requestParameters.price,
|
|
377
379
|
stop: requestParameters.stop,
|
|
378
|
-
time_in_force: requestParameters.time_in_force,
|
|
379
380
|
units: requestParameters.units,
|
|
380
|
-
universal_symbol_id: requestParameters.universal_symbol_id,
|
|
381
381
|
notional_value: requestParameters.notional_value
|
|
382
382
|
};
|
|
383
383
|
const localVarAxiosArgs = yield localVarAxiosParamCreator.getOrderImpact(requestParameters.userId, requestParameters.userSecret, manualTradeForm, options);
|
|
@@ -385,7 +385,7 @@ const TradingApiFp = function (configuration) {
|
|
|
385
385
|
});
|
|
386
386
|
},
|
|
387
387
|
/**
|
|
388
|
-
* Returns
|
|
388
|
+
* Returns quotes from the brokerage for the specified symbols and account. The quotes returned can be delayed depending on the brokerage the account belongs to. It is highly recommended that you use your own market data provider for real-time quotes instead of relying on this endpoint. This endpoint does not work for options quotes.
|
|
389
389
|
* @summary Get symbol quotes
|
|
390
390
|
* @param {TradingApiGetUserAccountQuotesRequest} requestParameters Request parameters.
|
|
391
391
|
* @param {*} [options] Override http request option.
|
|
@@ -398,8 +398,8 @@ const TradingApiFp = function (configuration) {
|
|
|
398
398
|
});
|
|
399
399
|
},
|
|
400
400
|
/**
|
|
401
|
-
* Places a
|
|
402
|
-
* @summary Place
|
|
401
|
+
* Places a brokerage order in the specified account. The order could be rejected by the brokerage if it is invalid or if the account does not have sufficient funds. This endpoint does not compute the impact to the account balance from the order and any potential commissions before submitting the order to the brokerage. If that is desired, you can use the [check order impact endpoint](/reference/Trading/Trading_getOrderImpact). It\'s recommended to trigger a manual refresh of the account after placing an order to ensure the account is up to date. You can use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint for this.
|
|
402
|
+
* @summary Place order
|
|
403
403
|
* @param {TradingApiPlaceForceOrderRequest} requestParameters Request parameters.
|
|
404
404
|
* @param {*} [options] Override http request option.
|
|
405
405
|
* @throws {RequiredError}
|
|
@@ -409,12 +409,12 @@ const TradingApiFp = function (configuration) {
|
|
|
409
409
|
const manualTradeForm = {
|
|
410
410
|
account_id: requestParameters.account_id,
|
|
411
411
|
action: requestParameters.action,
|
|
412
|
+
universal_symbol_id: requestParameters.universal_symbol_id,
|
|
412
413
|
order_type: requestParameters.order_type,
|
|
414
|
+
time_in_force: requestParameters.time_in_force,
|
|
413
415
|
price: requestParameters.price,
|
|
414
416
|
stop: requestParameters.stop,
|
|
415
|
-
time_in_force: requestParameters.time_in_force,
|
|
416
417
|
units: requestParameters.units,
|
|
417
|
-
universal_symbol_id: requestParameters.universal_symbol_id,
|
|
418
418
|
notional_value: requestParameters.notional_value
|
|
419
419
|
};
|
|
420
420
|
const localVarAxiosArgs = yield localVarAxiosParamCreator.placeForceOrder(requestParameters.userId, requestParameters.userSecret, manualTradeForm, options);
|
|
@@ -422,8 +422,8 @@ const TradingApiFp = function (configuration) {
|
|
|
422
422
|
});
|
|
423
423
|
},
|
|
424
424
|
/**
|
|
425
|
-
* Places the
|
|
426
|
-
* @summary Place order
|
|
425
|
+
* Places the previously checked order with the brokerage. The `tradeId` is obtained from the [check order impact endpoint](/reference/Trading/Trading_getOrderImpact). If you prefer to place the order without checking for impact first, you can use the [place order endpoint](/reference/Trading/Trading_placeForceOrder). It\'s recommended to trigger a manual refresh of the account after placing an order to ensure the account is up to date. You can use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint for this.
|
|
426
|
+
* @summary Place checked order
|
|
427
427
|
* @param {TradingApiPlaceOrderRequest} requestParameters Request parameters.
|
|
428
428
|
* @param {*} [options] Override http request option.
|
|
429
429
|
* @throws {RequiredError}
|
|
@@ -448,8 +448,8 @@ const TradingApiFactory = function (configuration, basePath, axios) {
|
|
|
448
448
|
const localVarFp = (0, exports.TradingApiFp)(configuration);
|
|
449
449
|
return {
|
|
450
450
|
/**
|
|
451
|
-
*
|
|
452
|
-
* @summary Cancel
|
|
451
|
+
* Attempts to cancel an open order with the brokerage. If the order is no longer cancellable, the request will be rejected.
|
|
452
|
+
* @summary Cancel order
|
|
453
453
|
* @param {TradingApiCancelUserAccountOrderRequest} requestParameters Request parameters.
|
|
454
454
|
* @param {*} [options] Override http request option.
|
|
455
455
|
* @throws {RequiredError}
|
|
@@ -458,8 +458,8 @@ const TradingApiFactory = function (configuration, basePath, axios) {
|
|
|
458
458
|
return localVarFp.cancelUserAccountOrder(requestParameters, options).then((request) => request(axios, basePath));
|
|
459
459
|
},
|
|
460
460
|
/**
|
|
461
|
-
*
|
|
462
|
-
* @summary Check
|
|
461
|
+
* 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.
|
|
462
|
+
* @summary Check order impact
|
|
463
463
|
* @param {TradingApiGetOrderImpactRequest} requestParameters Request parameters.
|
|
464
464
|
* @param {*} [options] Override http request option.
|
|
465
465
|
* @throws {RequiredError}
|
|
@@ -468,7 +468,7 @@ const TradingApiFactory = function (configuration, basePath, axios) {
|
|
|
468
468
|
return localVarFp.getOrderImpact(requestParameters, options).then((request) => request(axios, basePath));
|
|
469
469
|
},
|
|
470
470
|
/**
|
|
471
|
-
* Returns
|
|
471
|
+
* Returns quotes from the brokerage for the specified symbols and account. The quotes returned can be delayed depending on the brokerage the account belongs to. It is highly recommended that you use your own market data provider for real-time quotes instead of relying on this endpoint. This endpoint does not work for options quotes.
|
|
472
472
|
* @summary Get symbol quotes
|
|
473
473
|
* @param {TradingApiGetUserAccountQuotesRequest} requestParameters Request parameters.
|
|
474
474
|
* @param {*} [options] Override http request option.
|
|
@@ -478,8 +478,8 @@ const TradingApiFactory = function (configuration, basePath, axios) {
|
|
|
478
478
|
return localVarFp.getUserAccountQuotes(requestParameters, options).then((request) => request(axios, basePath));
|
|
479
479
|
},
|
|
480
480
|
/**
|
|
481
|
-
* Places a
|
|
482
|
-
* @summary Place
|
|
481
|
+
* Places a brokerage order in the specified account. The order could be rejected by the brokerage if it is invalid or if the account does not have sufficient funds. This endpoint does not compute the impact to the account balance from the order and any potential commissions before submitting the order to the brokerage. If that is desired, you can use the [check order impact endpoint](/reference/Trading/Trading_getOrderImpact). It\'s recommended to trigger a manual refresh of the account after placing an order to ensure the account is up to date. You can use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint for this.
|
|
482
|
+
* @summary Place order
|
|
483
483
|
* @param {TradingApiPlaceForceOrderRequest} requestParameters Request parameters.
|
|
484
484
|
* @param {*} [options] Override http request option.
|
|
485
485
|
* @throws {RequiredError}
|
|
@@ -488,8 +488,8 @@ const TradingApiFactory = function (configuration, basePath, axios) {
|
|
|
488
488
|
return localVarFp.placeForceOrder(requestParameters, options).then((request) => request(axios, basePath));
|
|
489
489
|
},
|
|
490
490
|
/**
|
|
491
|
-
* Places the
|
|
492
|
-
* @summary Place order
|
|
491
|
+
* Places the previously checked order with the brokerage. The `tradeId` is obtained from the [check order impact endpoint](/reference/Trading/Trading_getOrderImpact). If you prefer to place the order without checking for impact first, you can use the [place order endpoint](/reference/Trading/Trading_placeForceOrder). It\'s recommended to trigger a manual refresh of the account after placing an order to ensure the account is up to date. You can use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint for this.
|
|
492
|
+
* @summary Place checked order
|
|
493
493
|
* @param {TradingApiPlaceOrderRequest} requestParameters Request parameters.
|
|
494
494
|
* @param {*} [options] Override http request option.
|
|
495
495
|
* @throws {RequiredError}
|
|
@@ -508,8 +508,8 @@ exports.TradingApiFactory = TradingApiFactory;
|
|
|
508
508
|
*/
|
|
509
509
|
class TradingApiGenerated extends base_1.BaseAPI {
|
|
510
510
|
/**
|
|
511
|
-
*
|
|
512
|
-
* @summary Cancel
|
|
511
|
+
* Attempts to cancel an open order with the brokerage. If the order is no longer cancellable, the request will be rejected.
|
|
512
|
+
* @summary Cancel order
|
|
513
513
|
* @param {TradingApiCancelUserAccountOrderRequest} requestParameters Request parameters.
|
|
514
514
|
* @param {*} [options] Override http request option.
|
|
515
515
|
* @throws {RequiredError}
|
|
@@ -519,8 +519,8 @@ class TradingApiGenerated extends base_1.BaseAPI {
|
|
|
519
519
|
return (0, exports.TradingApiFp)(this.configuration).cancelUserAccountOrder(requestParameters, options).then((request) => request(this.axios, this.basePath));
|
|
520
520
|
}
|
|
521
521
|
/**
|
|
522
|
-
*
|
|
523
|
-
* @summary Check
|
|
522
|
+
* 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.
|
|
523
|
+
* @summary Check order impact
|
|
524
524
|
* @param {TradingApiGetOrderImpactRequest} requestParameters Request parameters.
|
|
525
525
|
* @param {*} [options] Override http request option.
|
|
526
526
|
* @throws {RequiredError}
|
|
@@ -530,7 +530,7 @@ class TradingApiGenerated extends base_1.BaseAPI {
|
|
|
530
530
|
return (0, exports.TradingApiFp)(this.configuration).getOrderImpact(requestParameters, options).then((request) => request(this.axios, this.basePath));
|
|
531
531
|
}
|
|
532
532
|
/**
|
|
533
|
-
* Returns
|
|
533
|
+
* Returns quotes from the brokerage for the specified symbols and account. The quotes returned can be delayed depending on the brokerage the account belongs to. It is highly recommended that you use your own market data provider for real-time quotes instead of relying on this endpoint. This endpoint does not work for options quotes.
|
|
534
534
|
* @summary Get symbol quotes
|
|
535
535
|
* @param {TradingApiGetUserAccountQuotesRequest} requestParameters Request parameters.
|
|
536
536
|
* @param {*} [options] Override http request option.
|
|
@@ -541,8 +541,8 @@ class TradingApiGenerated extends base_1.BaseAPI {
|
|
|
541
541
|
return (0, exports.TradingApiFp)(this.configuration).getUserAccountQuotes(requestParameters, options).then((request) => request(this.axios, this.basePath));
|
|
542
542
|
}
|
|
543
543
|
/**
|
|
544
|
-
* Places a
|
|
545
|
-
* @summary Place
|
|
544
|
+
* Places a brokerage order in the specified account. The order could be rejected by the brokerage if it is invalid or if the account does not have sufficient funds. This endpoint does not compute the impact to the account balance from the order and any potential commissions before submitting the order to the brokerage. If that is desired, you can use the [check order impact endpoint](/reference/Trading/Trading_getOrderImpact). It\'s recommended to trigger a manual refresh of the account after placing an order to ensure the account is up to date. You can use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint for this.
|
|
545
|
+
* @summary Place order
|
|
546
546
|
* @param {TradingApiPlaceForceOrderRequest} requestParameters Request parameters.
|
|
547
547
|
* @param {*} [options] Override http request option.
|
|
548
548
|
* @throws {RequiredError}
|
|
@@ -552,8 +552,8 @@ class TradingApiGenerated extends base_1.BaseAPI {
|
|
|
552
552
|
return (0, exports.TradingApiFp)(this.configuration).placeForceOrder(requestParameters, options).then((request) => request(this.axios, this.basePath));
|
|
553
553
|
}
|
|
554
554
|
/**
|
|
555
|
-
* Places the
|
|
556
|
-
* @summary Place order
|
|
555
|
+
* Places the previously checked order with the brokerage. The `tradeId` is obtained from the [check order impact endpoint](/reference/Trading/Trading_getOrderImpact). If you prefer to place the order without checking for impact first, you can use the [place order endpoint](/reference/Trading/Trading_placeForceOrder). It\'s recommended to trigger a manual refresh of the account after placing an order to ensure the account is up to date. You can use the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint for this.
|
|
556
|
+
* @summary Place checked order
|
|
557
557
|
* @param {TradingApiPlaceOrderRequest} requestParameters Request parameters.
|
|
558
558
|
* @param {*} [options] Override http request option.
|
|
559
559
|
* @throws {RequiredError}
|