snaptrade-typescript-sdk 9.0.134 → 9.0.136
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 +13 -11
- package/dist/api/account-information-api-generated.d.ts +8 -8
- package/dist/api/account-information-api-generated.js +8 -8
- package/dist/api/connections-api-generated.d.ts +4 -4
- package/dist/api/connections-api-generated.js +4 -4
- package/dist/api/trading-api-generated.d.ts +7 -7
- package/dist/api/trading-api-generated.js +16 -16
- package/dist/browser.js +1 -1
- package/dist/configuration.js +1 -1
- package/dist/models/index.d.ts +0 -1
- package/dist/models/index.js +0 -1
- package/dist/models/stop-loss.d.ts +1 -1
- package/dist/models/take-profit.d.ts +1 -1
- package/dist/operationParameterMap.js +6 -6
- package/package.json +1 -1
- package/dist/models/trading-cancel-user-account-order-request.d.ts +0 -13
- package/dist/models/trading-cancel-user-account-order-request.js +0 -2
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.136)
|
|
10
10
|
[](https://snaptrade.com/)
|
|
11
11
|
|
|
12
12
|
</div>
|
|
@@ -379,6 +379,8 @@ const getUserAccountDetailsResponse =
|
|
|
379
379
|
|
|
380
380
|
Returns the detail of a single order using the external order ID provided in the request body.
|
|
381
381
|
|
|
382
|
+
This endpoint only works for single-leg orders at this time. Support for multi-leg orders will be added in the future.
|
|
383
|
+
|
|
382
384
|
This endpoint is always realtime and does not rely on cached data.
|
|
383
385
|
|
|
384
386
|
This endpoint only returns orders placed through SnapTrade. In other words, orders placed outside of the SnapTrade network are not returned by this endpoint.
|
|
@@ -515,7 +517,7 @@ A lightweight endpoint that returns a list of orders executed in the last 24 hou
|
|
|
515
517
|
This endpoint is realtime and can be used to quickly check if account state has recently changed due to an execution, or check status of recently placed orders
|
|
516
518
|
Differs from /orders in that it is realtime, and only checks the last 24 hours as opposed to the last 30 days
|
|
517
519
|
By default only returns executed orders, but that can be changed by setting *only_executed* to false
|
|
518
|
-
**
|
|
520
|
+
**Because of the cost of realtime requests, each call to this endpoint incurs an additional charge. You can find the exact cost for your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing)**
|
|
519
521
|
|
|
520
522
|
|
|
521
523
|
#### 🛠️ Usage<a id="🛠️-usage"></a>
|
|
@@ -1034,7 +1036,7 @@ const listBrokerageAuthorizationsResponse =
|
|
|
1034
1036
|
Trigger a holdings update for all accounts under this connection. Updates will be queued asynchronously. [`ACCOUNT_HOLDINGS_UPDATED` webhook](/docs/webhooks#webhooks-account_holdings_updated) will be sent once the sync completes for each account under the connection.
|
|
1035
1037
|
This endpoint will also trigger a transaction sync for the past day if one has not yet occurred.
|
|
1036
1038
|
|
|
1037
|
-
**Because of the cost of refreshing a connection, each call to this endpoint incurs
|
|
1039
|
+
**Please contact support before use. Because of the cost of refreshing a connection, each call to this endpoint incurs an additional charge. You can find the exact cost for your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing)**
|
|
1038
1040
|
|
|
1039
1041
|
|
|
1040
1042
|
#### 🛠️ Usage<a id="🛠️-usage"></a>
|
|
@@ -1624,16 +1626,16 @@ const cancelOrderResponse = await snaptrade.trading.cancelOrder({
|
|
|
1624
1626
|
|
|
1625
1627
|
#### ⚙️ Parameters<a id="⚙️-parameters"></a>
|
|
1626
1628
|
|
|
1629
|
+
##### brokerage_order_id: `string`<a id="brokerage_order_id-string"></a>
|
|
1630
|
+
|
|
1631
|
+
Order ID returned by brokerage. This is the unique identifier for the order in the brokerage system.
|
|
1632
|
+
|
|
1627
1633
|
##### userId: `string`<a id="userid-string"></a>
|
|
1628
1634
|
|
|
1629
1635
|
##### userSecret: `string`<a id="usersecret-string"></a>
|
|
1630
1636
|
|
|
1631
1637
|
##### accountId: `string`<a id="accountid-string"></a>
|
|
1632
1638
|
|
|
1633
|
-
##### brokerage_order_id: `string`<a id="brokerage_order_id-string"></a>
|
|
1634
|
-
|
|
1635
|
-
Order ID returned by brokerage. This is the unique identifier for the order in the brokerage system.
|
|
1636
|
-
|
|
1637
1639
|
#### 🔄 Return<a id="🔄-return"></a>
|
|
1638
1640
|
|
|
1639
1641
|
[CancelOrderResponse](./models/cancel-order-response.ts)
|
|
@@ -1668,16 +1670,16 @@ const cancelUserAccountOrderResponse =
|
|
|
1668
1670
|
|
|
1669
1671
|
#### ⚙️ Parameters<a id="⚙️-parameters"></a>
|
|
1670
1672
|
|
|
1673
|
+
##### brokerage_order_id: `string`<a id="brokerage_order_id-string"></a>
|
|
1674
|
+
|
|
1675
|
+
Order ID returned by brokerage. This is the unique identifier for the order in the brokerage system.
|
|
1676
|
+
|
|
1671
1677
|
##### userId: `string`<a id="userid-string"></a>
|
|
1672
1678
|
|
|
1673
1679
|
##### userSecret: `string`<a id="usersecret-string"></a>
|
|
1674
1680
|
|
|
1675
1681
|
##### accountId: `string`<a id="accountid-string"></a>
|
|
1676
1682
|
|
|
1677
|
-
##### brokerage_order_id: `string`<a id="brokerage_order_id-string"></a>
|
|
1678
|
-
|
|
1679
|
-
Order ID returned by brokerage. This is the unique identifier for the order in the brokerage system.
|
|
1680
|
-
|
|
1681
1683
|
#### 🔄 Return<a id="🔄-return"></a>
|
|
1682
1684
|
|
|
1683
1685
|
[AccountOrderRecord](./models/account-order-record.ts)
|
|
@@ -63,7 +63,7 @@ export declare const AccountInformationApiAxiosParamCreator: (configuration?: Co
|
|
|
63
63
|
*/
|
|
64
64
|
getUserAccountDetails: (userId: string, userSecret: string, accountId: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
65
65
|
/**
|
|
66
|
-
* Returns the detail of a single order using the external order ID provided in the request body. This endpoint is always realtime and does not rely on cached data. This endpoint only returns orders placed through SnapTrade. In other words, orders placed outside of the SnapTrade network are not returned by this endpoint.
|
|
66
|
+
* Returns the detail of a single order using the external order ID provided in the request body. This endpoint only works for single-leg orders at this time. Support for multi-leg orders will be added in the future. This endpoint is always realtime and does not rely on cached data. This endpoint only returns orders placed through SnapTrade. In other words, orders placed outside of the SnapTrade network are not returned by this endpoint.
|
|
67
67
|
* @summary Get account order detail
|
|
68
68
|
* @param {string} accountId
|
|
69
69
|
* @param {string} userId
|
|
@@ -96,7 +96,7 @@ export declare const AccountInformationApiAxiosParamCreator: (configuration?: Co
|
|
|
96
96
|
*/
|
|
97
97
|
getUserAccountPositions: (userId: string, userSecret: string, accountId: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
98
98
|
/**
|
|
99
|
-
* A lightweight endpoint that returns a list of orders executed in the last 24 hours in the specified account. This endpoint is realtime and can be used to quickly check if account state has recently changed due to an execution, or check status of recently placed orders Differs from /orders in that it is realtime, and only checks the last 24 hours as opposed to the last 30 days By default only returns executed orders, but that can be changed by setting *only_executed* to false **
|
|
99
|
+
* A lightweight endpoint that returns a list of orders executed in the last 24 hours in the specified account. This endpoint is realtime and can be used to quickly check if account state has recently changed due to an execution, or check status of recently placed orders Differs from /orders in that it is realtime, and only checks the last 24 hours as opposed to the last 30 days By default only returns executed orders, but that can be changed by setting *only_executed* to false **Because of the cost of realtime requests, each call to this endpoint incurs an additional charge. You can find the exact cost for your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing)**
|
|
100
100
|
* @summary List account recent orders (last 24 hours only)
|
|
101
101
|
* @param {string} userId
|
|
102
102
|
* @param {string} userSecret
|
|
@@ -185,7 +185,7 @@ export declare const AccountInformationApiFp: (configuration?: Configuration) =>
|
|
|
185
185
|
*/
|
|
186
186
|
getUserAccountDetails(requestParameters: AccountInformationApiGetUserAccountDetailsRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Account>>;
|
|
187
187
|
/**
|
|
188
|
-
* Returns the detail of a single order using the external order ID provided in the request body. This endpoint is always realtime and does not rely on cached data. This endpoint only returns orders placed through SnapTrade. In other words, orders placed outside of the SnapTrade network are not returned by this endpoint.
|
|
188
|
+
* Returns the detail of a single order using the external order ID provided in the request body. This endpoint only works for single-leg orders at this time. Support for multi-leg orders will be added in the future. This endpoint is always realtime and does not rely on cached data. This endpoint only returns orders placed through SnapTrade. In other words, orders placed outside of the SnapTrade network are not returned by this endpoint.
|
|
189
189
|
* @summary Get account order detail
|
|
190
190
|
* @param {AccountInformationApiGetUserAccountOrderDetailRequest} requestParameters Request parameters.
|
|
191
191
|
* @param {*} [options] Override http request option.
|
|
@@ -209,7 +209,7 @@ export declare const AccountInformationApiFp: (configuration?: Configuration) =>
|
|
|
209
209
|
*/
|
|
210
210
|
getUserAccountPositions(requestParameters: AccountInformationApiGetUserAccountPositionsRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<Position>>>;
|
|
211
211
|
/**
|
|
212
|
-
* A lightweight endpoint that returns a list of orders executed in the last 24 hours in the specified account. This endpoint is realtime and can be used to quickly check if account state has recently changed due to an execution, or check status of recently placed orders Differs from /orders in that it is realtime, and only checks the last 24 hours as opposed to the last 30 days By default only returns executed orders, but that can be changed by setting *only_executed* to false **
|
|
212
|
+
* A lightweight endpoint that returns a list of orders executed in the last 24 hours in the specified account. This endpoint is realtime and can be used to quickly check if account state has recently changed due to an execution, or check status of recently placed orders Differs from /orders in that it is realtime, and only checks the last 24 hours as opposed to the last 30 days By default only returns executed orders, but that can be changed by setting *only_executed* to false **Because of the cost of realtime requests, each call to this endpoint incurs an additional charge. You can find the exact cost for your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing)**
|
|
213
213
|
* @summary List account recent orders (last 24 hours only)
|
|
214
214
|
* @param {AccountInformationApiGetUserAccountRecentOrdersRequest} requestParameters Request parameters.
|
|
215
215
|
* @param {*} [options] Override http request option.
|
|
@@ -288,7 +288,7 @@ export declare const AccountInformationApiFactory: (configuration?: Configuratio
|
|
|
288
288
|
*/
|
|
289
289
|
getUserAccountDetails(requestParameters: AccountInformationApiGetUserAccountDetailsRequest, options?: AxiosRequestConfig): AxiosPromise<Account>;
|
|
290
290
|
/**
|
|
291
|
-
* Returns the detail of a single order using the external order ID provided in the request body. This endpoint is always realtime and does not rely on cached data. This endpoint only returns orders placed through SnapTrade. In other words, orders placed outside of the SnapTrade network are not returned by this endpoint.
|
|
291
|
+
* Returns the detail of a single order using the external order ID provided in the request body. This endpoint only works for single-leg orders at this time. Support for multi-leg orders will be added in the future. This endpoint is always realtime and does not rely on cached data. This endpoint only returns orders placed through SnapTrade. In other words, orders placed outside of the SnapTrade network are not returned by this endpoint.
|
|
292
292
|
* @summary Get account order detail
|
|
293
293
|
* @param {AccountInformationApiGetUserAccountOrderDetailRequest} requestParameters Request parameters.
|
|
294
294
|
* @param {*} [options] Override http request option.
|
|
@@ -312,7 +312,7 @@ export declare const AccountInformationApiFactory: (configuration?: Configuratio
|
|
|
312
312
|
*/
|
|
313
313
|
getUserAccountPositions(requestParameters: AccountInformationApiGetUserAccountPositionsRequest, options?: AxiosRequestConfig): AxiosPromise<Array<Position>>;
|
|
314
314
|
/**
|
|
315
|
-
* A lightweight endpoint that returns a list of orders executed in the last 24 hours in the specified account. This endpoint is realtime and can be used to quickly check if account state has recently changed due to an execution, or check status of recently placed orders Differs from /orders in that it is realtime, and only checks the last 24 hours as opposed to the last 30 days By default only returns executed orders, but that can be changed by setting *only_executed* to false **
|
|
315
|
+
* A lightweight endpoint that returns a list of orders executed in the last 24 hours in the specified account. This endpoint is realtime and can be used to quickly check if account state has recently changed due to an execution, or check status of recently placed orders Differs from /orders in that it is realtime, and only checks the last 24 hours as opposed to the last 30 days By default only returns executed orders, but that can be changed by setting *only_executed* to false **Because of the cost of realtime requests, each call to this endpoint incurs an additional charge. You can find the exact cost for your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing)**
|
|
316
316
|
* @summary List account recent orders (last 24 hours only)
|
|
317
317
|
* @param {AccountInformationApiGetUserAccountRecentOrdersRequest} requestParameters Request parameters.
|
|
318
318
|
* @param {*} [options] Override http request option.
|
|
@@ -739,7 +739,7 @@ export declare class AccountInformationApiGenerated extends BaseAPI {
|
|
|
739
739
|
*/
|
|
740
740
|
getUserAccountDetails(requestParameters: AccountInformationApiGetUserAccountDetailsRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<Account, any>>;
|
|
741
741
|
/**
|
|
742
|
-
* Returns the detail of a single order using the external order ID provided in the request body. This endpoint is always realtime and does not rely on cached data. This endpoint only returns orders placed through SnapTrade. In other words, orders placed outside of the SnapTrade network are not returned by this endpoint.
|
|
742
|
+
* Returns the detail of a single order using the external order ID provided in the request body. This endpoint only works for single-leg orders at this time. Support for multi-leg orders will be added in the future. This endpoint is always realtime and does not rely on cached data. This endpoint only returns orders placed through SnapTrade. In other words, orders placed outside of the SnapTrade network are not returned by this endpoint.
|
|
743
743
|
* @summary Get account order detail
|
|
744
744
|
* @param {AccountInformationApiGetUserAccountOrderDetailRequest} requestParameters Request parameters.
|
|
745
745
|
* @param {*} [options] Override http request option.
|
|
@@ -766,7 +766,7 @@ export declare class AccountInformationApiGenerated extends BaseAPI {
|
|
|
766
766
|
*/
|
|
767
767
|
getUserAccountPositions(requestParameters: AccountInformationApiGetUserAccountPositionsRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<Position[], any>>;
|
|
768
768
|
/**
|
|
769
|
-
* A lightweight endpoint that returns a list of orders executed in the last 24 hours in the specified account. This endpoint is realtime and can be used to quickly check if account state has recently changed due to an execution, or check status of recently placed orders Differs from /orders in that it is realtime, and only checks the last 24 hours as opposed to the last 30 days By default only returns executed orders, but that can be changed by setting *only_executed* to false **
|
|
769
|
+
* A lightweight endpoint that returns a list of orders executed in the last 24 hours in the specified account. This endpoint is realtime and can be used to quickly check if account state has recently changed due to an execution, or check status of recently placed orders Differs from /orders in that it is realtime, and only checks the last 24 hours as opposed to the last 30 days By default only returns executed orders, but that can be changed by setting *only_executed* to false **Because of the cost of realtime requests, each call to this endpoint incurs an additional charge. You can find the exact cost for your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing)**
|
|
770
770
|
* @summary List account recent orders (last 24 hours only)
|
|
771
771
|
* @param {AccountInformationApiGetUserAccountRecentOrdersRequest} requestParameters Request parameters.
|
|
772
772
|
* @param {*} [options] Override http request option.
|
|
@@ -281,7 +281,7 @@ const AccountInformationApiAxiosParamCreator = function (configuration) {
|
|
|
281
281
|
};
|
|
282
282
|
}),
|
|
283
283
|
/**
|
|
284
|
-
* Returns the detail of a single order using the external order ID provided in the request body. This endpoint is always realtime and does not rely on cached data. This endpoint only returns orders placed through SnapTrade. In other words, orders placed outside of the SnapTrade network are not returned by this endpoint.
|
|
284
|
+
* Returns the detail of a single order using the external order ID provided in the request body. This endpoint only works for single-leg orders at this time. Support for multi-leg orders will be added in the future. This endpoint is always realtime and does not rely on cached data. This endpoint only returns orders placed through SnapTrade. In other words, orders placed outside of the SnapTrade network are not returned by this endpoint.
|
|
285
285
|
* @summary Get account order detail
|
|
286
286
|
* @param {string} accountId
|
|
287
287
|
* @param {string} userId
|
|
@@ -460,7 +460,7 @@ const AccountInformationApiAxiosParamCreator = function (configuration) {
|
|
|
460
460
|
};
|
|
461
461
|
}),
|
|
462
462
|
/**
|
|
463
|
-
* A lightweight endpoint that returns a list of orders executed in the last 24 hours in the specified account. This endpoint is realtime and can be used to quickly check if account state has recently changed due to an execution, or check status of recently placed orders Differs from /orders in that it is realtime, and only checks the last 24 hours as opposed to the last 30 days By default only returns executed orders, but that can be changed by setting *only_executed* to false **
|
|
463
|
+
* A lightweight endpoint that returns a list of orders executed in the last 24 hours in the specified account. This endpoint is realtime and can be used to quickly check if account state has recently changed due to an execution, or check status of recently placed orders Differs from /orders in that it is realtime, and only checks the last 24 hours as opposed to the last 30 days By default only returns executed orders, but that can be changed by setting *only_executed* to false **Because of the cost of realtime requests, each call to this endpoint incurs an additional charge. You can find the exact cost for your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing)**
|
|
464
464
|
* @summary List account recent orders (last 24 hours only)
|
|
465
465
|
* @param {string} userId
|
|
466
466
|
* @param {string} userSecret
|
|
@@ -798,7 +798,7 @@ const AccountInformationApiFp = function (configuration) {
|
|
|
798
798
|
});
|
|
799
799
|
},
|
|
800
800
|
/**
|
|
801
|
-
* Returns the detail of a single order using the external order ID provided in the request body. This endpoint is always realtime and does not rely on cached data. This endpoint only returns orders placed through SnapTrade. In other words, orders placed outside of the SnapTrade network are not returned by this endpoint.
|
|
801
|
+
* Returns the detail of a single order using the external order ID provided in the request body. This endpoint only works for single-leg orders at this time. Support for multi-leg orders will be added in the future. This endpoint is always realtime and does not rely on cached data. This endpoint only returns orders placed through SnapTrade. In other words, orders placed outside of the SnapTrade network are not returned by this endpoint.
|
|
802
802
|
* @summary Get account order detail
|
|
803
803
|
* @param {AccountInformationApiGetUserAccountOrderDetailRequest} requestParameters Request parameters.
|
|
804
804
|
* @param {*} [options] Override http request option.
|
|
@@ -840,7 +840,7 @@ const AccountInformationApiFp = function (configuration) {
|
|
|
840
840
|
});
|
|
841
841
|
},
|
|
842
842
|
/**
|
|
843
|
-
* A lightweight endpoint that returns a list of orders executed in the last 24 hours in the specified account. This endpoint is realtime and can be used to quickly check if account state has recently changed due to an execution, or check status of recently placed orders Differs from /orders in that it is realtime, and only checks the last 24 hours as opposed to the last 30 days By default only returns executed orders, but that can be changed by setting *only_executed* to false **
|
|
843
|
+
* A lightweight endpoint that returns a list of orders executed in the last 24 hours in the specified account. This endpoint is realtime and can be used to quickly check if account state has recently changed due to an execution, or check status of recently placed orders Differs from /orders in that it is realtime, and only checks the last 24 hours as opposed to the last 30 days By default only returns executed orders, but that can be changed by setting *only_executed* to false **Because of the cost of realtime requests, each call to this endpoint incurs an additional charge. You can find the exact cost for your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing)**
|
|
844
844
|
* @summary List account recent orders (last 24 hours only)
|
|
845
845
|
* @param {AccountInformationApiGetUserAccountRecentOrdersRequest} requestParameters Request parameters.
|
|
846
846
|
* @param {*} [options] Override http request option.
|
|
@@ -956,7 +956,7 @@ const AccountInformationApiFactory = function (configuration, basePath, axios) {
|
|
|
956
956
|
return localVarFp.getUserAccountDetails(requestParameters, options).then((request) => request(axios, basePath));
|
|
957
957
|
},
|
|
958
958
|
/**
|
|
959
|
-
* Returns the detail of a single order using the external order ID provided in the request body. This endpoint is always realtime and does not rely on cached data. This endpoint only returns orders placed through SnapTrade. In other words, orders placed outside of the SnapTrade network are not returned by this endpoint.
|
|
959
|
+
* Returns the detail of a single order using the external order ID provided in the request body. This endpoint only works for single-leg orders at this time. Support for multi-leg orders will be added in the future. This endpoint is always realtime and does not rely on cached data. This endpoint only returns orders placed through SnapTrade. In other words, orders placed outside of the SnapTrade network are not returned by this endpoint.
|
|
960
960
|
* @summary Get account order detail
|
|
961
961
|
* @param {AccountInformationApiGetUserAccountOrderDetailRequest} requestParameters Request parameters.
|
|
962
962
|
* @param {*} [options] Override http request option.
|
|
@@ -986,7 +986,7 @@ const AccountInformationApiFactory = function (configuration, basePath, axios) {
|
|
|
986
986
|
return localVarFp.getUserAccountPositions(requestParameters, options).then((request) => request(axios, basePath));
|
|
987
987
|
},
|
|
988
988
|
/**
|
|
989
|
-
* A lightweight endpoint that returns a list of orders executed in the last 24 hours in the specified account. This endpoint is realtime and can be used to quickly check if account state has recently changed due to an execution, or check status of recently placed orders Differs from /orders in that it is realtime, and only checks the last 24 hours as opposed to the last 30 days By default only returns executed orders, but that can be changed by setting *only_executed* to false **
|
|
989
|
+
* A lightweight endpoint that returns a list of orders executed in the last 24 hours in the specified account. This endpoint is realtime and can be used to quickly check if account state has recently changed due to an execution, or check status of recently placed orders Differs from /orders in that it is realtime, and only checks the last 24 hours as opposed to the last 30 days By default only returns executed orders, but that can be changed by setting *only_executed* to false **Because of the cost of realtime requests, each call to this endpoint incurs an additional charge. You can find the exact cost for your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing)**
|
|
990
990
|
* @summary List account recent orders (last 24 hours only)
|
|
991
991
|
* @param {AccountInformationApiGetUserAccountRecentOrdersRequest} requestParameters Request parameters.
|
|
992
992
|
* @param {*} [options] Override http request option.
|
|
@@ -1091,7 +1091,7 @@ class AccountInformationApiGenerated extends base_1.BaseAPI {
|
|
|
1091
1091
|
return (0, exports.AccountInformationApiFp)(this.configuration).getUserAccountDetails(requestParameters, options).then((request) => request(this.axios, this.basePath));
|
|
1092
1092
|
}
|
|
1093
1093
|
/**
|
|
1094
|
-
* Returns the detail of a single order using the external order ID provided in the request body. This endpoint is always realtime and does not rely on cached data. This endpoint only returns orders placed through SnapTrade. In other words, orders placed outside of the SnapTrade network are not returned by this endpoint.
|
|
1094
|
+
* Returns the detail of a single order using the external order ID provided in the request body. This endpoint only works for single-leg orders at this time. Support for multi-leg orders will be added in the future. This endpoint is always realtime and does not rely on cached data. This endpoint only returns orders placed through SnapTrade. In other words, orders placed outside of the SnapTrade network are not returned by this endpoint.
|
|
1095
1095
|
* @summary Get account order detail
|
|
1096
1096
|
* @param {AccountInformationApiGetUserAccountOrderDetailRequest} requestParameters Request parameters.
|
|
1097
1097
|
* @param {*} [options] Override http request option.
|
|
@@ -1124,7 +1124,7 @@ class AccountInformationApiGenerated extends base_1.BaseAPI {
|
|
|
1124
1124
|
return (0, exports.AccountInformationApiFp)(this.configuration).getUserAccountPositions(requestParameters, options).then((request) => request(this.axios, this.basePath));
|
|
1125
1125
|
}
|
|
1126
1126
|
/**
|
|
1127
|
-
* A lightweight endpoint that returns a list of orders executed in the last 24 hours in the specified account. This endpoint is realtime and can be used to quickly check if account state has recently changed due to an execution, or check status of recently placed orders Differs from /orders in that it is realtime, and only checks the last 24 hours as opposed to the last 30 days By default only returns executed orders, but that can be changed by setting *only_executed* to false **
|
|
1127
|
+
* A lightweight endpoint that returns a list of orders executed in the last 24 hours in the specified account. This endpoint is realtime and can be used to quickly check if account state has recently changed due to an execution, or check status of recently placed orders Differs from /orders in that it is realtime, and only checks the last 24 hours as opposed to the last 30 days By default only returns executed orders, but that can be changed by setting *only_executed* to false **Because of the cost of realtime requests, each call to this endpoint incurs an additional charge. You can find the exact cost for your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing)**
|
|
1128
1128
|
* @summary List account recent orders (last 24 hours only)
|
|
1129
1129
|
* @param {AccountInformationApiGetUserAccountRecentOrdersRequest} requestParameters Request parameters.
|
|
1130
1130
|
* @param {*} [options] Override http request option.
|
|
@@ -41,7 +41,7 @@ export declare const ConnectionsApiAxiosParamCreator: (configuration?: Configura
|
|
|
41
41
|
*/
|
|
42
42
|
listBrokerageAuthorizations: (userId: string, userSecret: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
43
43
|
/**
|
|
44
|
-
* Trigger a holdings update for all accounts under this connection. Updates will be queued asynchronously. [`ACCOUNT_HOLDINGS_UPDATED` webhook](/docs/webhooks#webhooks-account_holdings_updated) will be sent once the sync completes for each account under the connection. This endpoint will also trigger a transaction sync for the past day if one has not yet occurred. **Because of the cost of refreshing a connection, each call to this endpoint incurs
|
|
44
|
+
* Trigger a holdings update for all accounts under this connection. Updates will be queued asynchronously. [`ACCOUNT_HOLDINGS_UPDATED` webhook](/docs/webhooks#webhooks-account_holdings_updated) will be sent once the sync completes for each account under the connection. This endpoint will also trigger a transaction sync for the past day if one has not yet occurred. **Please contact support before use. Because of the cost of refreshing a connection, each call to this endpoint incurs an additional charge. You can find the exact cost for your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing)**
|
|
45
45
|
* @summary Refresh holdings for a connection
|
|
46
46
|
* @param {string} authorizationId
|
|
47
47
|
* @param {string} userId
|
|
@@ -111,7 +111,7 @@ export declare const ConnectionsApiFp: (configuration?: Configuration) => {
|
|
|
111
111
|
*/
|
|
112
112
|
listBrokerageAuthorizations(requestParameters: ConnectionsApiListBrokerageAuthorizationsRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<BrokerageAuthorization>>>;
|
|
113
113
|
/**
|
|
114
|
-
* Trigger a holdings update for all accounts under this connection. Updates will be queued asynchronously. [`ACCOUNT_HOLDINGS_UPDATED` webhook](/docs/webhooks#webhooks-account_holdings_updated) will be sent once the sync completes for each account under the connection. This endpoint will also trigger a transaction sync for the past day if one has not yet occurred. **Because of the cost of refreshing a connection, each call to this endpoint incurs
|
|
114
|
+
* Trigger a holdings update for all accounts under this connection. Updates will be queued asynchronously. [`ACCOUNT_HOLDINGS_UPDATED` webhook](/docs/webhooks#webhooks-account_holdings_updated) will be sent once the sync completes for each account under the connection. This endpoint will also trigger a transaction sync for the past day if one has not yet occurred. **Please contact support before use. Because of the cost of refreshing a connection, each call to this endpoint incurs an additional charge. You can find the exact cost for your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing)**
|
|
115
115
|
* @summary Refresh holdings for a connection
|
|
116
116
|
* @param {ConnectionsApiRefreshBrokerageAuthorizationRequest} requestParameters Request parameters.
|
|
117
117
|
* @param {*} [options] Override http request option.
|
|
@@ -173,7 +173,7 @@ export declare const ConnectionsApiFactory: (configuration?: Configuration, base
|
|
|
173
173
|
*/
|
|
174
174
|
listBrokerageAuthorizations(requestParameters: ConnectionsApiListBrokerageAuthorizationsRequest, options?: AxiosRequestConfig): AxiosPromise<Array<BrokerageAuthorization>>;
|
|
175
175
|
/**
|
|
176
|
-
* Trigger a holdings update for all accounts under this connection. Updates will be queued asynchronously. [`ACCOUNT_HOLDINGS_UPDATED` webhook](/docs/webhooks#webhooks-account_holdings_updated) will be sent once the sync completes for each account under the connection. This endpoint will also trigger a transaction sync for the past day if one has not yet occurred. **Because of the cost of refreshing a connection, each call to this endpoint incurs
|
|
176
|
+
* Trigger a holdings update for all accounts under this connection. Updates will be queued asynchronously. [`ACCOUNT_HOLDINGS_UPDATED` webhook](/docs/webhooks#webhooks-account_holdings_updated) will be sent once the sync completes for each account under the connection. This endpoint will also trigger a transaction sync for the past day if one has not yet occurred. **Please contact support before use. Because of the cost of refreshing a connection, each call to this endpoint incurs an additional charge. You can find the exact cost for your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing)**
|
|
177
177
|
* @summary Refresh holdings for a connection
|
|
178
178
|
* @param {ConnectionsApiRefreshBrokerageAuthorizationRequest} requestParameters Request parameters.
|
|
179
179
|
* @param {*} [options] Override http request option.
|
|
@@ -409,7 +409,7 @@ export declare class ConnectionsApiGenerated extends BaseAPI {
|
|
|
409
409
|
*/
|
|
410
410
|
listBrokerageAuthorizations(requestParameters: ConnectionsApiListBrokerageAuthorizationsRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<BrokerageAuthorization[], any>>;
|
|
411
411
|
/**
|
|
412
|
-
* Trigger a holdings update for all accounts under this connection. Updates will be queued asynchronously. [`ACCOUNT_HOLDINGS_UPDATED` webhook](/docs/webhooks#webhooks-account_holdings_updated) will be sent once the sync completes for each account under the connection. This endpoint will also trigger a transaction sync for the past day if one has not yet occurred. **Because of the cost of refreshing a connection, each call to this endpoint incurs
|
|
412
|
+
* Trigger a holdings update for all accounts under this connection. Updates will be queued asynchronously. [`ACCOUNT_HOLDINGS_UPDATED` webhook](/docs/webhooks#webhooks-account_holdings_updated) will be sent once the sync completes for each account under the connection. This endpoint will also trigger a transaction sync for the past day if one has not yet occurred. **Please contact support before use. Because of the cost of refreshing a connection, each call to this endpoint incurs an additional charge. You can find the exact cost for your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing)**
|
|
413
413
|
* @summary Refresh holdings for a connection
|
|
414
414
|
* @param {ConnectionsApiRefreshBrokerageAuthorizationRequest} requestParameters Request parameters.
|
|
415
415
|
* @param {*} [options] Override http request option.
|
|
@@ -197,7 +197,7 @@ const ConnectionsApiAxiosParamCreator = function (configuration) {
|
|
|
197
197
|
};
|
|
198
198
|
}),
|
|
199
199
|
/**
|
|
200
|
-
* Trigger a holdings update for all accounts under this connection. Updates will be queued asynchronously. [`ACCOUNT_HOLDINGS_UPDATED` webhook](/docs/webhooks#webhooks-account_holdings_updated) will be sent once the sync completes for each account under the connection. This endpoint will also trigger a transaction sync for the past day if one has not yet occurred. **Because of the cost of refreshing a connection, each call to this endpoint incurs
|
|
200
|
+
* Trigger a holdings update for all accounts under this connection. Updates will be queued asynchronously. [`ACCOUNT_HOLDINGS_UPDATED` webhook](/docs/webhooks#webhooks-account_holdings_updated) will be sent once the sync completes for each account under the connection. This endpoint will also trigger a transaction sync for the past day if one has not yet occurred. **Please contact support before use. Because of the cost of refreshing a connection, each call to this endpoint incurs an additional charge. You can find the exact cost for your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing)**
|
|
201
201
|
* @summary Refresh holdings for a connection
|
|
202
202
|
* @param {string} authorizationId
|
|
203
203
|
* @param {string} userId
|
|
@@ -464,7 +464,7 @@ const ConnectionsApiFp = function (configuration) {
|
|
|
464
464
|
});
|
|
465
465
|
},
|
|
466
466
|
/**
|
|
467
|
-
* Trigger a holdings update for all accounts under this connection. Updates will be queued asynchronously. [`ACCOUNT_HOLDINGS_UPDATED` webhook](/docs/webhooks#webhooks-account_holdings_updated) will be sent once the sync completes for each account under the connection. This endpoint will also trigger a transaction sync for the past day if one has not yet occurred. **Because of the cost of refreshing a connection, each call to this endpoint incurs
|
|
467
|
+
* Trigger a holdings update for all accounts under this connection. Updates will be queued asynchronously. [`ACCOUNT_HOLDINGS_UPDATED` webhook](/docs/webhooks#webhooks-account_holdings_updated) will be sent once the sync completes for each account under the connection. This endpoint will also trigger a transaction sync for the past day if one has not yet occurred. **Please contact support before use. Because of the cost of refreshing a connection, each call to this endpoint incurs an additional charge. You can find the exact cost for your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing)**
|
|
468
468
|
* @summary Refresh holdings for a connection
|
|
469
469
|
* @param {ConnectionsApiRefreshBrokerageAuthorizationRequest} requestParameters Request parameters.
|
|
470
470
|
* @param {*} [options] Override http request option.
|
|
@@ -556,7 +556,7 @@ const ConnectionsApiFactory = function (configuration, basePath, axios) {
|
|
|
556
556
|
return localVarFp.listBrokerageAuthorizations(requestParameters, options).then((request) => request(axios, basePath));
|
|
557
557
|
},
|
|
558
558
|
/**
|
|
559
|
-
* Trigger a holdings update for all accounts under this connection. Updates will be queued asynchronously. [`ACCOUNT_HOLDINGS_UPDATED` webhook](/docs/webhooks#webhooks-account_holdings_updated) will be sent once the sync completes for each account under the connection. This endpoint will also trigger a transaction sync for the past day if one has not yet occurred. **Because of the cost of refreshing a connection, each call to this endpoint incurs
|
|
559
|
+
* Trigger a holdings update for all accounts under this connection. Updates will be queued asynchronously. [`ACCOUNT_HOLDINGS_UPDATED` webhook](/docs/webhooks#webhooks-account_holdings_updated) will be sent once the sync completes for each account under the connection. This endpoint will also trigger a transaction sync for the past day if one has not yet occurred. **Please contact support before use. Because of the cost of refreshing a connection, each call to this endpoint incurs an additional charge. You can find the exact cost for your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing)**
|
|
560
560
|
* @summary Refresh holdings for a connection
|
|
561
561
|
* @param {ConnectionsApiRefreshBrokerageAuthorizationRequest} requestParameters Request parameters.
|
|
562
562
|
* @param {*} [options] Override http request option.
|
|
@@ -639,7 +639,7 @@ class ConnectionsApiGenerated extends base_1.BaseAPI {
|
|
|
639
639
|
return (0, exports.ConnectionsApiFp)(this.configuration).listBrokerageAuthorizations(requestParameters, options).then((request) => request(this.axios, this.basePath));
|
|
640
640
|
}
|
|
641
641
|
/**
|
|
642
|
-
* Trigger a holdings update for all accounts under this connection. Updates will be queued asynchronously. [`ACCOUNT_HOLDINGS_UPDATED` webhook](/docs/webhooks#webhooks-account_holdings_updated) will be sent once the sync completes for each account under the connection. This endpoint will also trigger a transaction sync for the past day if one has not yet occurred. **Because of the cost of refreshing a connection, each call to this endpoint incurs
|
|
642
|
+
* Trigger a holdings update for all accounts under this connection. Updates will be queued asynchronously. [`ACCOUNT_HOLDINGS_UPDATED` webhook](/docs/webhooks#webhooks-account_holdings_updated) will be sent once the sync completes for each account under the connection. This endpoint will also trigger a transaction sync for the past day if one has not yet occurred. **Please contact support before use. Because of the cost of refreshing a connection, each call to this endpoint incurs an additional charge. You can find the exact cost for your API key on the [Customer Dashboard billing page](https://dashboard.snaptrade.com/settings/billing)**
|
|
643
643
|
* @summary Refresh holdings for a connection
|
|
644
644
|
* @param {ConnectionsApiRefreshBrokerageAuthorizationRequest} requestParameters Request parameters.
|
|
645
645
|
* @param {*} [options] Override http request option.
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
|
|
2
2
|
import { Configuration } from '../configuration';
|
|
3
3
|
import { RequestArgs, BaseAPI } from '../base';
|
|
4
|
+
import { AccountInformationGetUserAccountOrderDetailRequest } from '../models';
|
|
4
5
|
import { AccountOrderRecord } from '../models';
|
|
5
6
|
import { CancelOrderResponse } from '../models';
|
|
6
7
|
import { CryptoOrderForm } from '../models';
|
|
@@ -15,7 +16,6 @@ import { MlegOrderResponse } from '../models';
|
|
|
15
16
|
import { MlegTradeForm } from '../models';
|
|
16
17
|
import { OrderUpdatedResponse } from '../models';
|
|
17
18
|
import { SymbolsQuotesInner } from '../models';
|
|
18
|
-
import { TradingCancelUserAccountOrderRequest } from '../models';
|
|
19
19
|
import { TradingSearchCryptocurrencyPairInstruments200Response } from '../models';
|
|
20
20
|
import { ValidatedTradeBody } from '../models';
|
|
21
21
|
/**
|
|
@@ -29,23 +29,23 @@ export declare const TradingApiAxiosParamCreator: (configuration?: Configuration
|
|
|
29
29
|
* @param {string} userId
|
|
30
30
|
* @param {string} userSecret
|
|
31
31
|
* @param {string} accountId
|
|
32
|
-
* @param {
|
|
32
|
+
* @param {AccountInformationGetUserAccountOrderDetailRequest} accountInformationGetUserAccountOrderDetailRequest
|
|
33
33
|
* @param {*} [options] Override http request option.
|
|
34
34
|
* @throws {RequiredError}
|
|
35
35
|
*/
|
|
36
|
-
cancelOrder: (userId: string, userSecret: string, accountId: string,
|
|
36
|
+
cancelOrder: (userId: string, userSecret: string, accountId: string, accountInformationGetUserAccountOrderDetailRequest: AccountInformationGetUserAccountOrderDetailRequest, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
37
37
|
/**
|
|
38
38
|
* **This endpoint is deprecated. Please switch to [the new cancel order endpoint](/reference/Trading/Trading_cancelOrder) ** Attempts to cancel an open order with the brokerage. If the order is no longer cancellable, the request will be rejected.
|
|
39
39
|
* @summary Cancel equity order
|
|
40
40
|
* @param {string} userId
|
|
41
41
|
* @param {string} userSecret
|
|
42
42
|
* @param {string} accountId
|
|
43
|
-
* @param {
|
|
43
|
+
* @param {AccountInformationGetUserAccountOrderDetailRequest} accountInformationGetUserAccountOrderDetailRequest
|
|
44
44
|
* @param {*} [options] Override http request option.
|
|
45
45
|
* @deprecated
|
|
46
46
|
* @throws {RequiredError}
|
|
47
47
|
*/
|
|
48
|
-
cancelUserAccountOrder: (userId: string, userSecret: string, accountId: string,
|
|
48
|
+
cancelUserAccountOrder: (userId: string, userSecret: string, accountId: string, accountInformationGetUserAccountOrderDetailRequest: AccountInformationGetUserAccountOrderDetailRequest, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
49
49
|
/**
|
|
50
50
|
* Gets a quote for the specified account.
|
|
51
51
|
* @summary Get crypto pair quote
|
|
@@ -414,7 +414,7 @@ export type TradingApiCancelOrderRequest = {
|
|
|
414
414
|
* @memberof TradingApiCancelOrder
|
|
415
415
|
*/
|
|
416
416
|
readonly accountId: string;
|
|
417
|
-
} &
|
|
417
|
+
} & AccountInformationGetUserAccountOrderDetailRequest;
|
|
418
418
|
/**
|
|
419
419
|
* Request parameters for cancelUserAccountOrder operation in TradingApi.
|
|
420
420
|
* @export
|
|
@@ -439,7 +439,7 @@ export type TradingApiCancelUserAccountOrderRequest = {
|
|
|
439
439
|
* @memberof TradingApiCancelUserAccountOrder
|
|
440
440
|
*/
|
|
441
441
|
readonly accountId: string;
|
|
442
|
-
} &
|
|
442
|
+
} & AccountInformationGetUserAccountOrderDetailRequest;
|
|
443
443
|
/**
|
|
444
444
|
* Request parameters for getCryptocurrencyPairQuote operation in TradingApi.
|
|
445
445
|
* @export
|
|
@@ -41,19 +41,19 @@ const TradingApiAxiosParamCreator = function (configuration) {
|
|
|
41
41
|
* @param {string} userId
|
|
42
42
|
* @param {string} userSecret
|
|
43
43
|
* @param {string} accountId
|
|
44
|
-
* @param {
|
|
44
|
+
* @param {AccountInformationGetUserAccountOrderDetailRequest} accountInformationGetUserAccountOrderDetailRequest
|
|
45
45
|
* @param {*} [options] Override http request option.
|
|
46
46
|
* @throws {RequiredError}
|
|
47
47
|
*/
|
|
48
|
-
cancelOrder: (userId, userSecret, accountId,
|
|
48
|
+
cancelOrder: (userId, userSecret, accountId, accountInformationGetUserAccountOrderDetailRequest, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
49
49
|
// verify required parameter 'userId' is not null or undefined
|
|
50
50
|
(0, common_1.assertParamExists)('cancelOrder', 'userId', userId);
|
|
51
51
|
// verify required parameter 'userSecret' is not null or undefined
|
|
52
52
|
(0, common_1.assertParamExists)('cancelOrder', 'userSecret', userSecret);
|
|
53
53
|
// verify required parameter 'accountId' is not null or undefined
|
|
54
54
|
(0, common_1.assertParamExists)('cancelOrder', 'accountId', accountId);
|
|
55
|
-
// verify required parameter '
|
|
56
|
-
(0, common_1.assertParamExists)('cancelOrder', '
|
|
55
|
+
// verify required parameter 'accountInformationGetUserAccountOrderDetailRequest' is not null or undefined
|
|
56
|
+
(0, common_1.assertParamExists)('cancelOrder', 'accountInformationGetUserAccountOrderDetailRequest', accountInformationGetUserAccountOrderDetailRequest);
|
|
57
57
|
const localVarPath = `/accounts/{accountId}/trading/cancel`
|
|
58
58
|
.replace(`{${"accountId"}}`, encodeURIComponent(String(accountId !== undefined ? accountId : `-accountId-`)));
|
|
59
59
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
@@ -81,7 +81,7 @@ const TradingApiAxiosParamCreator = function (configuration) {
|
|
|
81
81
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
82
82
|
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
83
83
|
(0, requestBeforeHook_1.requestBeforeHook)({
|
|
84
|
-
requestBody:
|
|
84
|
+
requestBody: accountInformationGetUserAccountOrderDetailRequest,
|
|
85
85
|
queryParameters: localVarQueryParameter,
|
|
86
86
|
requestConfig: localVarRequestOptions,
|
|
87
87
|
path: localVarPath,
|
|
@@ -89,7 +89,7 @@ const TradingApiAxiosParamCreator = function (configuration) {
|
|
|
89
89
|
pathTemplate: '/accounts/{accountId}/trading/cancel',
|
|
90
90
|
httpMethod: 'POST'
|
|
91
91
|
});
|
|
92
|
-
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(
|
|
92
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(accountInformationGetUserAccountOrderDetailRequest, localVarRequestOptions, configuration);
|
|
93
93
|
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
94
94
|
return {
|
|
95
95
|
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
@@ -102,20 +102,20 @@ const TradingApiAxiosParamCreator = function (configuration) {
|
|
|
102
102
|
* @param {string} userId
|
|
103
103
|
* @param {string} userSecret
|
|
104
104
|
* @param {string} accountId
|
|
105
|
-
* @param {
|
|
105
|
+
* @param {AccountInformationGetUserAccountOrderDetailRequest} accountInformationGetUserAccountOrderDetailRequest
|
|
106
106
|
* @param {*} [options] Override http request option.
|
|
107
107
|
* @deprecated
|
|
108
108
|
* @throws {RequiredError}
|
|
109
109
|
*/
|
|
110
|
-
cancelUserAccountOrder: (userId, userSecret, accountId,
|
|
110
|
+
cancelUserAccountOrder: (userId, userSecret, accountId, accountInformationGetUserAccountOrderDetailRequest, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
111
111
|
// verify required parameter 'userId' is not null or undefined
|
|
112
112
|
(0, common_1.assertParamExists)('cancelUserAccountOrder', 'userId', userId);
|
|
113
113
|
// verify required parameter 'userSecret' is not null or undefined
|
|
114
114
|
(0, common_1.assertParamExists)('cancelUserAccountOrder', 'userSecret', userSecret);
|
|
115
115
|
// verify required parameter 'accountId' is not null or undefined
|
|
116
116
|
(0, common_1.assertParamExists)('cancelUserAccountOrder', 'accountId', accountId);
|
|
117
|
-
// verify required parameter '
|
|
118
|
-
(0, common_1.assertParamExists)('cancelUserAccountOrder', '
|
|
117
|
+
// verify required parameter 'accountInformationGetUserAccountOrderDetailRequest' is not null or undefined
|
|
118
|
+
(0, common_1.assertParamExists)('cancelUserAccountOrder', 'accountInformationGetUserAccountOrderDetailRequest', accountInformationGetUserAccountOrderDetailRequest);
|
|
119
119
|
const localVarPath = `/accounts/{accountId}/orders/cancel`
|
|
120
120
|
.replace(`{${"accountId"}}`, encodeURIComponent(String(accountId !== undefined ? accountId : `-accountId-`)));
|
|
121
121
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
@@ -143,7 +143,7 @@ const TradingApiAxiosParamCreator = function (configuration) {
|
|
|
143
143
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
144
144
|
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
145
145
|
(0, requestBeforeHook_1.requestBeforeHook)({
|
|
146
|
-
requestBody:
|
|
146
|
+
requestBody: accountInformationGetUserAccountOrderDetailRequest,
|
|
147
147
|
queryParameters: localVarQueryParameter,
|
|
148
148
|
requestConfig: localVarRequestOptions,
|
|
149
149
|
path: localVarPath,
|
|
@@ -151,7 +151,7 @@ const TradingApiAxiosParamCreator = function (configuration) {
|
|
|
151
151
|
pathTemplate: '/accounts/{accountId}/orders/cancel',
|
|
152
152
|
httpMethod: 'POST'
|
|
153
153
|
});
|
|
154
|
-
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(
|
|
154
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(accountInformationGetUserAccountOrderDetailRequest, localVarRequestOptions, configuration);
|
|
155
155
|
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
156
156
|
return {
|
|
157
157
|
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
@@ -842,10 +842,10 @@ const TradingApiFp = function (configuration) {
|
|
|
842
842
|
*/
|
|
843
843
|
cancelOrder(requestParameters, options) {
|
|
844
844
|
return __awaiter(this, void 0, void 0, function* () {
|
|
845
|
-
const
|
|
845
|
+
const accountInformationGetUserAccountOrderDetailRequest = {
|
|
846
846
|
brokerage_order_id: requestParameters.brokerage_order_id
|
|
847
847
|
};
|
|
848
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.cancelOrder(requestParameters.userId, requestParameters.userSecret, requestParameters.accountId,
|
|
848
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.cancelOrder(requestParameters.userId, requestParameters.userSecret, requestParameters.accountId, accountInformationGetUserAccountOrderDetailRequest, options);
|
|
849
849
|
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
850
850
|
});
|
|
851
851
|
},
|
|
@@ -859,10 +859,10 @@ const TradingApiFp = function (configuration) {
|
|
|
859
859
|
*/
|
|
860
860
|
cancelUserAccountOrder(requestParameters, options) {
|
|
861
861
|
return __awaiter(this, void 0, void 0, function* () {
|
|
862
|
-
const
|
|
862
|
+
const accountInformationGetUserAccountOrderDetailRequest = {
|
|
863
863
|
brokerage_order_id: requestParameters.brokerage_order_id
|
|
864
864
|
};
|
|
865
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.cancelUserAccountOrder(requestParameters.userId, requestParameters.userSecret, requestParameters.accountId,
|
|
865
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.cancelUserAccountOrder(requestParameters.userId, requestParameters.userSecret, requestParameters.accountId, accountInformationGetUserAccountOrderDetailRequest, options);
|
|
866
866
|
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
867
867
|
});
|
|
868
868
|
},
|