snaptrade-typescript-sdk 9.0.161 → 9.0.163
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 +53 -3
- package/dist/api/account-information-api-generated.d.ts +4 -4
- package/dist/api/account-information-api-generated.js +4 -4
- package/dist/api/experimental-endpoints-api-generated.d.ts +63 -0
- package/dist/api/experimental-endpoints-api-generated.js +98 -0
- package/dist/browser.js +1 -1
- package/dist/configuration.js +1 -1
- package/dist/operationParameterMap.js +16 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
Connect brokerage accounts to your app for live positions and trading
|
|
8
8
|
|
|
9
|
-
[](https://www.npmjs.com/package/snaptrade-typescript-sdk/v/9.0.163)
|
|
10
10
|
[](https://snaptrade.com/)
|
|
11
11
|
|
|
12
12
|
</div>
|
|
@@ -43,6 +43,7 @@ Connect brokerage accounts to your app for live positions and trading
|
|
|
43
43
|
* [`snaptrade.connections.removeBrokerageAuthorization`](#snaptradeconnectionsremovebrokerageauthorization)
|
|
44
44
|
* [`snaptrade.connections.returnRates`](#snaptradeconnectionsreturnrates)
|
|
45
45
|
* [`snaptrade.connections.sessionEvents`](#snaptradeconnectionssessionevents)
|
|
46
|
+
* [`snaptrade.experimentalEndpoints.getUserAccountOrderDetailV2`](#snaptradeexperimentalendpointsgetuseraccountorderdetailv2)
|
|
46
47
|
* [`snaptrade.experimentalEndpoints.getUserAccountOrdersV2`](#snaptradeexperimentalendpointsgetuseraccountordersv2)
|
|
47
48
|
* [`snaptrade.experimentalEndpoints.getUserAccountRecentOrdersV2`](#snaptradeexperimentalendpointsgetuseraccountrecentordersv2)
|
|
48
49
|
* [`snaptrade.options.getOptionsChain`](#snaptradeoptionsgetoptionschain)
|
|
@@ -533,9 +534,9 @@ const getUserAccountPositionsResponse =
|
|
|
533
534
|
|
|
534
535
|
### `snaptrade.accountInformation.getUserAccountRecentOrders`<a id="snaptradeaccountinformationgetuseraccountrecentorders"></a>
|
|
535
536
|
|
|
536
|
-
A lightweight endpoint that returns
|
|
537
|
+
A lightweight endpoint that returns the latest page of orders placed in the last 24 hours in the specified account. For most brokerages, the default page size is 100 meaning the endpoint will return a max of 100 orders.
|
|
537
538
|
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
|
|
538
|
-
Differs from /orders in that it is realtime, and only checks the last 24 hours
|
|
539
|
+
Differs from /orders in that it is always realtime, and only checks the last 24 hours
|
|
539
540
|
By default only returns executed orders, but that can be changed by setting *only_executed* to false
|
|
540
541
|
|
|
541
542
|
|
|
@@ -1215,6 +1216,55 @@ Optional comma separated list of session IDs used to filter the request on speci
|
|
|
1215
1216
|
---
|
|
1216
1217
|
|
|
1217
1218
|
|
|
1219
|
+
### `snaptrade.experimentalEndpoints.getUserAccountOrderDetailV2`<a id="snaptradeexperimentalendpointsgetuseraccountorderdetailv2"></a>
|
|
1220
|
+
|
|
1221
|
+
Returns the detail of a single order using the external order ID provided in the request body.
|
|
1222
|
+
|
|
1223
|
+
The V2 order response format includes all legs of the order in the `legs` list field.
|
|
1224
|
+
If the order is single legged, `legs` will be a list of one leg.
|
|
1225
|
+
|
|
1226
|
+
This endpoint is always realtime and does not rely on cached data.
|
|
1227
|
+
|
|
1228
|
+
This endpoint only returns orders placed through SnapTrade. In other words, orders placed outside of the SnapTrade network are not returned by this endpoint.
|
|
1229
|
+
|
|
1230
|
+
|
|
1231
|
+
#### 🛠️ Usage<a id="🛠️-usage"></a>
|
|
1232
|
+
|
|
1233
|
+
```typescript
|
|
1234
|
+
const getUserAccountOrderDetailV2Response =
|
|
1235
|
+
await snaptrade.experimentalEndpoints.getUserAccountOrderDetailV2({
|
|
1236
|
+
accountId: "917c8734-8470-4a3e-a18f-57c3f2ee6631",
|
|
1237
|
+
userId: "snaptrade-user-123",
|
|
1238
|
+
userSecret: "adf2aa34-8219-40f7-a6b3-60156985cc61",
|
|
1239
|
+
brokerage_order_id: "66a033fa-da74-4fcf-b527-feefdec9257e",
|
|
1240
|
+
});
|
|
1241
|
+
```
|
|
1242
|
+
|
|
1243
|
+
#### ⚙️ Parameters<a id="⚙️-parameters"></a>
|
|
1244
|
+
|
|
1245
|
+
##### brokerage_order_id: `string`<a id="brokerage_order_id-string"></a>
|
|
1246
|
+
|
|
1247
|
+
Order ID returned by brokerage. This is the unique identifier for the order in the brokerage system.
|
|
1248
|
+
|
|
1249
|
+
##### accountId: `string`<a id="accountid-string"></a>
|
|
1250
|
+
|
|
1251
|
+
##### userId: `string`<a id="userid-string"></a>
|
|
1252
|
+
|
|
1253
|
+
##### userSecret: `string`<a id="usersecret-string"></a>
|
|
1254
|
+
|
|
1255
|
+
#### 🔄 Return<a id="🔄-return"></a>
|
|
1256
|
+
|
|
1257
|
+
[AccountOrderRecordV2](./models/account-order-record-v2.ts)
|
|
1258
|
+
|
|
1259
|
+
#### 🌐 Endpoint<a id="🌐-endpoint"></a>
|
|
1260
|
+
|
|
1261
|
+
`/accounts/{accountId}/orders/details/v2` `POST`
|
|
1262
|
+
|
|
1263
|
+
[🔙 **Back to Table of Contents**](#table-of-contents)
|
|
1264
|
+
|
|
1265
|
+
---
|
|
1266
|
+
|
|
1267
|
+
|
|
1218
1268
|
### `snaptrade.experimentalEndpoints.getUserAccountOrdersV2`<a id="snaptradeexperimentalendpointsgetuseraccountordersv2"></a>
|
|
1219
1269
|
|
|
1220
1270
|
Returns a list of recent orders in the specified account.
|
|
@@ -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
|
|
99
|
+
* A lightweight endpoint that returns the latest page of orders placed in the last 24 hours in the specified account. For most brokerages, the default page size is 100 meaning the endpoint will return a max of 100 orders. 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 always realtime, and only checks the last 24 hours By default only returns executed orders, but that can be changed by setting *only_executed* to false
|
|
100
100
|
* @summary List account recent orders (last 24 hours only)
|
|
101
101
|
* @param {string} userId
|
|
102
102
|
* @param {string} userSecret
|
|
@@ -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
|
|
212
|
+
* A lightweight endpoint that returns the latest page of orders placed in the last 24 hours in the specified account. For most brokerages, the default page size is 100 meaning the endpoint will return a max of 100 orders. 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 always realtime, and only checks the last 24 hours By default only returns executed orders, but that can be changed by setting *only_executed* to false
|
|
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.
|
|
@@ -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
|
|
315
|
+
* A lightweight endpoint that returns the latest page of orders placed in the last 24 hours in the specified account. For most brokerages, the default page size is 100 meaning the endpoint will return a max of 100 orders. 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 always realtime, and only checks the last 24 hours By default only returns executed orders, but that can be changed by setting *only_executed* to false
|
|
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.
|
|
@@ -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
|
|
769
|
+
* A lightweight endpoint that returns the latest page of orders placed in the last 24 hours in the specified account. For most brokerages, the default page size is 100 meaning the endpoint will return a max of 100 orders. 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 always realtime, and only checks the last 24 hours By default only returns executed orders, but that can be changed by setting *only_executed* to false
|
|
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.
|
|
@@ -460,7 +460,7 @@ const AccountInformationApiAxiosParamCreator = function (configuration) {
|
|
|
460
460
|
};
|
|
461
461
|
}),
|
|
462
462
|
/**
|
|
463
|
-
* A lightweight endpoint that returns
|
|
463
|
+
* A lightweight endpoint that returns the latest page of orders placed in the last 24 hours in the specified account. For most brokerages, the default page size is 100 meaning the endpoint will return a max of 100 orders. 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 always realtime, and only checks the last 24 hours By default only returns executed orders, but that can be changed by setting *only_executed* to false
|
|
464
464
|
* @summary List account recent orders (last 24 hours only)
|
|
465
465
|
* @param {string} userId
|
|
466
466
|
* @param {string} userSecret
|
|
@@ -840,7 +840,7 @@ const AccountInformationApiFp = function (configuration) {
|
|
|
840
840
|
});
|
|
841
841
|
},
|
|
842
842
|
/**
|
|
843
|
-
* A lightweight endpoint that returns
|
|
843
|
+
* A lightweight endpoint that returns the latest page of orders placed in the last 24 hours in the specified account. For most brokerages, the default page size is 100 meaning the endpoint will return a max of 100 orders. 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 always realtime, and only checks the last 24 hours By default only returns executed orders, but that can be changed by setting *only_executed* to false
|
|
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.
|
|
@@ -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
|
|
989
|
+
* A lightweight endpoint that returns the latest page of orders placed in the last 24 hours in the specified account. For most brokerages, the default page size is 100 meaning the endpoint will return a max of 100 orders. 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 always realtime, and only checks the last 24 hours By default only returns executed orders, but that can be changed by setting *only_executed* to false
|
|
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.
|
|
@@ -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
|
|
1127
|
+
* A lightweight endpoint that returns the latest page of orders placed in the last 24 hours in the specified account. For most brokerages, the default page size is 100 meaning the endpoint will return a max of 100 orders. 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 always realtime, and only checks the last 24 hours By default only returns executed orders, but that can be changed by setting *only_executed* to false
|
|
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.
|
|
@@ -1,12 +1,25 @@
|
|
|
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';
|
|
5
|
+
import { AccountOrderRecordV2 } from '../models';
|
|
4
6
|
import { AccountOrdersV2Response } from '../models';
|
|
5
7
|
/**
|
|
6
8
|
* ExperimentalEndpointsApi - axios parameter creator
|
|
7
9
|
* @export
|
|
8
10
|
*/
|
|
9
11
|
export declare const ExperimentalEndpointsApiAxiosParamCreator: (configuration?: Configuration) => {
|
|
12
|
+
/**
|
|
13
|
+
* Returns the detail of a single order using the external order ID provided in the request body. The V2 order response format includes all legs of the order in the `legs` list field. If the order is single legged, `legs` will be a list of one leg. 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.
|
|
14
|
+
* @summary Get account order detail (V2)
|
|
15
|
+
* @param {string} accountId
|
|
16
|
+
* @param {string} userId
|
|
17
|
+
* @param {string} userSecret
|
|
18
|
+
* @param {AccountInformationGetUserAccountOrderDetailRequest} accountInformationGetUserAccountOrderDetailRequest
|
|
19
|
+
* @param {*} [options] Override http request option.
|
|
20
|
+
* @throws {RequiredError}
|
|
21
|
+
*/
|
|
22
|
+
getUserAccountOrderDetailV2: (accountId: string, userId: string, userSecret: string, accountInformationGetUserAccountOrderDetailRequest: AccountInformationGetUserAccountOrderDetailRequest, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
10
23
|
/**
|
|
11
24
|
* Returns a list of recent orders in the specified account. The V2 order response format will include all legs of each order in the `legs` list field. If the order is single legged, `legs` will be a list of one leg. If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
|
|
12
25
|
* @summary List account orders v2
|
|
@@ -36,6 +49,14 @@ export declare const ExperimentalEndpointsApiAxiosParamCreator: (configuration?:
|
|
|
36
49
|
* @export
|
|
37
50
|
*/
|
|
38
51
|
export declare const ExperimentalEndpointsApiFp: (configuration?: Configuration) => {
|
|
52
|
+
/**
|
|
53
|
+
* Returns the detail of a single order using the external order ID provided in the request body. The V2 order response format includes all legs of the order in the `legs` list field. If the order is single legged, `legs` will be a list of one leg. 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.
|
|
54
|
+
* @summary Get account order detail (V2)
|
|
55
|
+
* @param {ExperimentalEndpointsApiGetUserAccountOrderDetailV2Request} requestParameters Request parameters.
|
|
56
|
+
* @param {*} [options] Override http request option.
|
|
57
|
+
* @throws {RequiredError}
|
|
58
|
+
*/
|
|
59
|
+
getUserAccountOrderDetailV2(requestParameters: ExperimentalEndpointsApiGetUserAccountOrderDetailV2Request, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AccountOrderRecordV2>>;
|
|
39
60
|
/**
|
|
40
61
|
* Returns a list of recent orders in the specified account. The V2 order response format will include all legs of each order in the `legs` list field. If the order is single legged, `legs` will be a list of one leg. If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
|
|
41
62
|
* @summary List account orders v2
|
|
@@ -58,6 +79,14 @@ export declare const ExperimentalEndpointsApiFp: (configuration?: Configuration)
|
|
|
58
79
|
* @export
|
|
59
80
|
*/
|
|
60
81
|
export declare const ExperimentalEndpointsApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
|
|
82
|
+
/**
|
|
83
|
+
* Returns the detail of a single order using the external order ID provided in the request body. The V2 order response format includes all legs of the order in the `legs` list field. If the order is single legged, `legs` will be a list of one leg. 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.
|
|
84
|
+
* @summary Get account order detail (V2)
|
|
85
|
+
* @param {ExperimentalEndpointsApiGetUserAccountOrderDetailV2Request} requestParameters Request parameters.
|
|
86
|
+
* @param {*} [options] Override http request option.
|
|
87
|
+
* @throws {RequiredError}
|
|
88
|
+
*/
|
|
89
|
+
getUserAccountOrderDetailV2(requestParameters: ExperimentalEndpointsApiGetUserAccountOrderDetailV2Request, options?: AxiosRequestConfig): AxiosPromise<AccountOrderRecordV2>;
|
|
61
90
|
/**
|
|
62
91
|
* Returns a list of recent orders in the specified account. The V2 order response format will include all legs of each order in the `legs` list field. If the order is single legged, `legs` will be a list of one leg. If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
|
|
63
92
|
* @summary List account orders v2
|
|
@@ -75,6 +104,31 @@ export declare const ExperimentalEndpointsApiFactory: (configuration?: Configura
|
|
|
75
104
|
*/
|
|
76
105
|
getUserAccountRecentOrdersV2(requestParameters: ExperimentalEndpointsApiGetUserAccountRecentOrdersV2Request, options?: AxiosRequestConfig): AxiosPromise<AccountOrdersV2Response>;
|
|
77
106
|
};
|
|
107
|
+
/**
|
|
108
|
+
* Request parameters for getUserAccountOrderDetailV2 operation in ExperimentalEndpointsApi.
|
|
109
|
+
* @export
|
|
110
|
+
* @interface ExperimentalEndpointsApiGetUserAccountOrderDetailV2Request
|
|
111
|
+
*/
|
|
112
|
+
export type ExperimentalEndpointsApiGetUserAccountOrderDetailV2Request = {
|
|
113
|
+
/**
|
|
114
|
+
*
|
|
115
|
+
* @type {string}
|
|
116
|
+
* @memberof ExperimentalEndpointsApiGetUserAccountOrderDetailV2
|
|
117
|
+
*/
|
|
118
|
+
readonly accountId: string;
|
|
119
|
+
/**
|
|
120
|
+
*
|
|
121
|
+
* @type {string}
|
|
122
|
+
* @memberof ExperimentalEndpointsApiGetUserAccountOrderDetailV2
|
|
123
|
+
*/
|
|
124
|
+
readonly userId: string;
|
|
125
|
+
/**
|
|
126
|
+
*
|
|
127
|
+
* @type {string}
|
|
128
|
+
* @memberof ExperimentalEndpointsApiGetUserAccountOrderDetailV2
|
|
129
|
+
*/
|
|
130
|
+
readonly userSecret: string;
|
|
131
|
+
} & AccountInformationGetUserAccountOrderDetailRequest;
|
|
78
132
|
/**
|
|
79
133
|
* Request parameters for getUserAccountOrdersV2 operation in ExperimentalEndpointsApi.
|
|
80
134
|
* @export
|
|
@@ -150,6 +204,15 @@ export type ExperimentalEndpointsApiGetUserAccountRecentOrdersV2Request = {
|
|
|
150
204
|
* @extends {BaseAPI}
|
|
151
205
|
*/
|
|
152
206
|
export declare class ExperimentalEndpointsApiGenerated extends BaseAPI {
|
|
207
|
+
/**
|
|
208
|
+
* Returns the detail of a single order using the external order ID provided in the request body. The V2 order response format includes all legs of the order in the `legs` list field. If the order is single legged, `legs` will be a list of one leg. 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.
|
|
209
|
+
* @summary Get account order detail (V2)
|
|
210
|
+
* @param {ExperimentalEndpointsApiGetUserAccountOrderDetailV2Request} requestParameters Request parameters.
|
|
211
|
+
* @param {*} [options] Override http request option.
|
|
212
|
+
* @throws {RequiredError}
|
|
213
|
+
* @memberof ExperimentalEndpointsApiGenerated
|
|
214
|
+
*/
|
|
215
|
+
getUserAccountOrderDetailV2(requestParameters: ExperimentalEndpointsApiGetUserAccountOrderDetailV2Request, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<AccountOrderRecordV2, any>>;
|
|
153
216
|
/**
|
|
154
217
|
* Returns a list of recent orders in the specified account. The V2 order response format will include all legs of each order in the `legs` list field. If the order is single legged, `legs` will be a list of one leg. If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
|
|
155
218
|
* @summary List account orders v2
|
|
@@ -35,6 +35,67 @@ const requestBeforeHook_1 = require("../requestBeforeHook");
|
|
|
35
35
|
*/
|
|
36
36
|
const ExperimentalEndpointsApiAxiosParamCreator = function (configuration) {
|
|
37
37
|
return {
|
|
38
|
+
/**
|
|
39
|
+
* Returns the detail of a single order using the external order ID provided in the request body. The V2 order response format includes all legs of the order in the `legs` list field. If the order is single legged, `legs` will be a list of one leg. 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.
|
|
40
|
+
* @summary Get account order detail (V2)
|
|
41
|
+
* @param {string} accountId
|
|
42
|
+
* @param {string} userId
|
|
43
|
+
* @param {string} userSecret
|
|
44
|
+
* @param {AccountInformationGetUserAccountOrderDetailRequest} accountInformationGetUserAccountOrderDetailRequest
|
|
45
|
+
* @param {*} [options] Override http request option.
|
|
46
|
+
* @throws {RequiredError}
|
|
47
|
+
*/
|
|
48
|
+
getUserAccountOrderDetailV2: (accountId, userId, userSecret, accountInformationGetUserAccountOrderDetailRequest, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
49
|
+
// verify required parameter 'accountId' is not null or undefined
|
|
50
|
+
(0, common_1.assertParamExists)('getUserAccountOrderDetailV2', 'accountId', accountId);
|
|
51
|
+
// verify required parameter 'userId' is not null or undefined
|
|
52
|
+
(0, common_1.assertParamExists)('getUserAccountOrderDetailV2', 'userId', userId);
|
|
53
|
+
// verify required parameter 'userSecret' is not null or undefined
|
|
54
|
+
(0, common_1.assertParamExists)('getUserAccountOrderDetailV2', 'userSecret', userSecret);
|
|
55
|
+
// verify required parameter 'accountInformationGetUserAccountOrderDetailRequest' is not null or undefined
|
|
56
|
+
(0, common_1.assertParamExists)('getUserAccountOrderDetailV2', 'accountInformationGetUserAccountOrderDetailRequest', accountInformationGetUserAccountOrderDetailRequest);
|
|
57
|
+
const localVarPath = `/accounts/{accountId}/orders/details/v2`
|
|
58
|
+
.replace(`{${"accountId"}}`, encodeURIComponent(String(accountId !== undefined ? accountId : `-accountId-`)));
|
|
59
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
60
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
61
|
+
let baseOptions;
|
|
62
|
+
if (configuration) {
|
|
63
|
+
baseOptions = configuration.baseOptions;
|
|
64
|
+
}
|
|
65
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
66
|
+
const localVarHeaderParameter = configuration && !(0, common_1.isBrowser)() ? { "User-Agent": configuration.userAgent } : {};
|
|
67
|
+
const localVarQueryParameter = {};
|
|
68
|
+
// authentication PartnerClientId required
|
|
69
|
+
yield (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, key: "clientId", keyParamName: "clientId", configuration });
|
|
70
|
+
// authentication PartnerSignature required
|
|
71
|
+
yield (0, common_1.setApiKeyToObject)({ object: localVarHeaderParameter, key: "Signature", keyParamName: "signature", configuration });
|
|
72
|
+
// authentication PartnerTimestamp required
|
|
73
|
+
yield (0, common_1.setApiKeyToObject)({ object: localVarQueryParameter, key: "timestamp", keyParamName: "timestamp", configuration });
|
|
74
|
+
if (userId !== undefined) {
|
|
75
|
+
localVarQueryParameter['userId'] = userId;
|
|
76
|
+
}
|
|
77
|
+
if (userSecret !== undefined) {
|
|
78
|
+
localVarQueryParameter['userSecret'] = userSecret;
|
|
79
|
+
}
|
|
80
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
81
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
82
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
83
|
+
(0, requestBeforeHook_1.requestBeforeHook)({
|
|
84
|
+
requestBody: accountInformationGetUserAccountOrderDetailRequest,
|
|
85
|
+
queryParameters: localVarQueryParameter,
|
|
86
|
+
requestConfig: localVarRequestOptions,
|
|
87
|
+
path: localVarPath,
|
|
88
|
+
configuration,
|
|
89
|
+
pathTemplate: '/accounts/{accountId}/orders/details/v2',
|
|
90
|
+
httpMethod: 'POST'
|
|
91
|
+
});
|
|
92
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(accountInformationGetUserAccountOrderDetailRequest, localVarRequestOptions, configuration);
|
|
93
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
94
|
+
return {
|
|
95
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
96
|
+
options: localVarRequestOptions,
|
|
97
|
+
};
|
|
98
|
+
}),
|
|
38
99
|
/**
|
|
39
100
|
* Returns a list of recent orders in the specified account. The V2 order response format will include all legs of each order in the `legs` list field. If the order is single legged, `legs` will be a list of one leg. If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
|
|
40
101
|
* @summary List account orders v2
|
|
@@ -167,6 +228,22 @@ exports.ExperimentalEndpointsApiAxiosParamCreator = ExperimentalEndpointsApiAxio
|
|
|
167
228
|
const ExperimentalEndpointsApiFp = function (configuration) {
|
|
168
229
|
const localVarAxiosParamCreator = (0, exports.ExperimentalEndpointsApiAxiosParamCreator)(configuration);
|
|
169
230
|
return {
|
|
231
|
+
/**
|
|
232
|
+
* Returns the detail of a single order using the external order ID provided in the request body. The V2 order response format includes all legs of the order in the `legs` list field. If the order is single legged, `legs` will be a list of one leg. 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.
|
|
233
|
+
* @summary Get account order detail (V2)
|
|
234
|
+
* @param {ExperimentalEndpointsApiGetUserAccountOrderDetailV2Request} requestParameters Request parameters.
|
|
235
|
+
* @param {*} [options] Override http request option.
|
|
236
|
+
* @throws {RequiredError}
|
|
237
|
+
*/
|
|
238
|
+
getUserAccountOrderDetailV2(requestParameters, options) {
|
|
239
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
240
|
+
const accountInformationGetUserAccountOrderDetailRequest = {
|
|
241
|
+
brokerage_order_id: requestParameters.brokerage_order_id
|
|
242
|
+
};
|
|
243
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getUserAccountOrderDetailV2(requestParameters.accountId, requestParameters.userId, requestParameters.userSecret, accountInformationGetUserAccountOrderDetailRequest, options);
|
|
244
|
+
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
245
|
+
});
|
|
246
|
+
},
|
|
170
247
|
/**
|
|
171
248
|
* Returns a list of recent orders in the specified account. The V2 order response format will include all legs of each order in the `legs` list field. If the order is single legged, `legs` will be a list of one leg. If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
|
|
172
249
|
* @summary List account orders v2
|
|
@@ -203,6 +280,16 @@ exports.ExperimentalEndpointsApiFp = ExperimentalEndpointsApiFp;
|
|
|
203
280
|
const ExperimentalEndpointsApiFactory = function (configuration, basePath, axios) {
|
|
204
281
|
const localVarFp = (0, exports.ExperimentalEndpointsApiFp)(configuration);
|
|
205
282
|
return {
|
|
283
|
+
/**
|
|
284
|
+
* Returns the detail of a single order using the external order ID provided in the request body. The V2 order response format includes all legs of the order in the `legs` list field. If the order is single legged, `legs` will be a list of one leg. 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
|
+
* @summary Get account order detail (V2)
|
|
286
|
+
* @param {ExperimentalEndpointsApiGetUserAccountOrderDetailV2Request} requestParameters Request parameters.
|
|
287
|
+
* @param {*} [options] Override http request option.
|
|
288
|
+
* @throws {RequiredError}
|
|
289
|
+
*/
|
|
290
|
+
getUserAccountOrderDetailV2(requestParameters, options) {
|
|
291
|
+
return localVarFp.getUserAccountOrderDetailV2(requestParameters, options).then((request) => request(axios, basePath));
|
|
292
|
+
},
|
|
206
293
|
/**
|
|
207
294
|
* Returns a list of recent orders in the specified account. The V2 order response format will include all legs of each order in the `legs` list field. If the order is single legged, `legs` will be a list of one leg. If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
|
|
208
295
|
* @summary List account orders v2
|
|
@@ -233,6 +320,17 @@ exports.ExperimentalEndpointsApiFactory = ExperimentalEndpointsApiFactory;
|
|
|
233
320
|
* @extends {BaseAPI}
|
|
234
321
|
*/
|
|
235
322
|
class ExperimentalEndpointsApiGenerated extends base_1.BaseAPI {
|
|
323
|
+
/**
|
|
324
|
+
* Returns the detail of a single order using the external order ID provided in the request body. The V2 order response format includes all legs of the order in the `legs` list field. If the order is single legged, `legs` will be a list of one leg. 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.
|
|
325
|
+
* @summary Get account order detail (V2)
|
|
326
|
+
* @param {ExperimentalEndpointsApiGetUserAccountOrderDetailV2Request} requestParameters Request parameters.
|
|
327
|
+
* @param {*} [options] Override http request option.
|
|
328
|
+
* @throws {RequiredError}
|
|
329
|
+
* @memberof ExperimentalEndpointsApiGenerated
|
|
330
|
+
*/
|
|
331
|
+
getUserAccountOrderDetailV2(requestParameters, options) {
|
|
332
|
+
return (0, exports.ExperimentalEndpointsApiFp)(this.configuration).getUserAccountOrderDetailV2(requestParameters, options).then((request) => request(this.axios, this.basePath));
|
|
333
|
+
}
|
|
236
334
|
/**
|
|
237
335
|
* Returns a list of recent orders in the specified account. The V2 order response format will include all legs of each order in the `legs` list field. If the order is single legged, `legs` will be a list of one leg. If the connection has become disabled, it can no longer access the latest data from the brokerage, but will continue to return the last available cached state. Please see [this guide](/docs/fix-broken-connections) on how to fix a disabled connection.
|
|
238
336
|
* @summary List account orders v2
|