snaptrade-typescript-sdk 9.0.180 → 9.0.186
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 +56 -3
- package/dist/api/account-information-api-generated.d.ts +16 -9
- package/dist/api/account-information-api-generated.js +14 -10
- package/dist/api/connections-api-generated.d.ts +16 -9
- package/dist/api/connections-api-generated.js +14 -10
- package/dist/api/experimental-endpoints-api-generated.d.ts +61 -0
- package/dist/api/experimental-endpoints-api-generated.js +89 -0
- package/dist/api/transactions-and-reporting-api-generated.d.ts +4 -4
- package/dist/api/transactions-and-reporting-api-generated.js +4 -4
- package/dist/browser.js +1 -1
- package/dist/configuration.js +1 -1
- package/dist/models/account-order-record-trailing-stop.d.ts +21 -0
- package/dist/models/account-order-record-trailing-stop.js +2 -0
- package/dist/models/account-order-record-v2.d.ts +7 -0
- package/dist/models/account-order-record.d.ts +7 -0
- package/dist/models/brokerage-authorization-transactions-sync-confirmation.d.ts +14 -0
- package/dist/models/brokerage-authorization-transactions-sync-confirmation.js +2 -0
- package/dist/models/index.d.ts +3 -0
- package/dist/models/index.js +3 -0
- package/dist/models/order-updated-response-order.d.ts +7 -0
- package/dist/models/rate-of-return-object.d.ts +1 -1
- package/dist/models/trailing-stop.d.ts +22 -0
- package/dist/models/trailing-stop.js +2 -0
- package/dist/models/transactions-status.d.ts +1 -1
- package/dist/operationParameterMap.js +19 -0
- package/package.json +1 -1
package/dist/configuration.js
CHANGED
|
@@ -32,7 +32,7 @@ class Configuration {
|
|
|
32
32
|
this.accessToken = param.accessToken;
|
|
33
33
|
this.basePath = param.basePath;
|
|
34
34
|
this.baseOptions = (_a = param.baseOptions) !== null && _a !== void 0 ? _a : {};
|
|
35
|
-
this.userAgent = param.userAgent === undefined ? "Konfig/9.0.
|
|
35
|
+
this.userAgent = param.userAgent === undefined ? "Konfig/9.0.186/typescript" : param.userAgent;
|
|
36
36
|
this.formDataCtor = param.formDataCtor;
|
|
37
37
|
}
|
|
38
38
|
/**
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* For trailing stop orders, contains the trail configuration. Null for all other order types.
|
|
3
|
+
* @export
|
|
4
|
+
* @interface AccountOrderRecordTrailingStop
|
|
5
|
+
*/
|
|
6
|
+
export interface AccountOrderRecordTrailingStop {
|
|
7
|
+
/**
|
|
8
|
+
* The trail amount. Interpreted as dollars if `type` is `DOLLAR`, or a percentage if `type` is `PERCENT`.
|
|
9
|
+
* @type {string}
|
|
10
|
+
* @memberof AccountOrderRecordTrailingStop
|
|
11
|
+
*/
|
|
12
|
+
'amount': string;
|
|
13
|
+
/**
|
|
14
|
+
* Whether the trail `amount` is a dollar amount (`DOLLAR`) or a percentage (`PERCENT`). For example, if `amount` is \"0.60\" and `type` is `DOLLAR`, the stop price will trail the market price by $0.60. If `amount` is \"5\" and `type` is `PERCENT`, the stop price will trail the market price by 5%.
|
|
15
|
+
* @type {string}
|
|
16
|
+
* @memberof AccountOrderRecordTrailingStop
|
|
17
|
+
*/
|
|
18
|
+
'type': AccountOrderRecordTrailingStopTypeEnum;
|
|
19
|
+
}
|
|
20
|
+
type AccountOrderRecordTrailingStopTypeEnum = 'DOLLAR' | 'PERCENT';
|
|
21
|
+
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { AccountOrderRecordLeg } from './account-order-record-leg';
|
|
2
2
|
import { AccountOrderRecordStatus } from './account-order-record-status';
|
|
3
|
+
import { AccountOrderRecordTrailingStop } from './account-order-record-trailing-stop';
|
|
3
4
|
/**
|
|
4
5
|
* Describes a single order in the standardized V2 format.
|
|
5
6
|
* @export
|
|
@@ -67,6 +68,12 @@ export interface AccountOrderRecordV2 {
|
|
|
67
68
|
* @memberof AccountOrderRecordV2
|
|
68
69
|
*/
|
|
69
70
|
'stop_price'?: number | null;
|
|
71
|
+
/**
|
|
72
|
+
*
|
|
73
|
+
* @type {AccountOrderRecordTrailingStop}
|
|
74
|
+
* @memberof AccountOrderRecordV2
|
|
75
|
+
*/
|
|
76
|
+
'trailing_stop'?: AccountOrderRecordTrailingStop | null;
|
|
70
77
|
/**
|
|
71
78
|
* List of legs that make up the order.
|
|
72
79
|
* @type {Array<AccountOrderRecordLeg>}
|
|
@@ -3,6 +3,7 @@ import { AccountOrderRecordOptionSymbol } from './account-order-record-option-sy
|
|
|
3
3
|
import { AccountOrderRecordQuoteCurrency } from './account-order-record-quote-currency';
|
|
4
4
|
import { AccountOrderRecordQuoteUniversalSymbol } from './account-order-record-quote-universal-symbol';
|
|
5
5
|
import { AccountOrderRecordStatus } from './account-order-record-status';
|
|
6
|
+
import { AccountOrderRecordTrailingStop } from './account-order-record-trailing-stop';
|
|
6
7
|
import { AccountOrderRecordUniversalSymbol } from './account-order-record-universal-symbol';
|
|
7
8
|
/**
|
|
8
9
|
* Describes a single recent order in an account. Each record here represents a single order leg. For multi-leg orders, there will be multiple records.
|
|
@@ -95,6 +96,12 @@ export interface AccountOrderRecord {
|
|
|
95
96
|
* @memberof AccountOrderRecord
|
|
96
97
|
*/
|
|
97
98
|
'stop_price'?: number | null;
|
|
99
|
+
/**
|
|
100
|
+
*
|
|
101
|
+
* @type {AccountOrderRecordTrailingStop}
|
|
102
|
+
* @memberof AccountOrderRecord
|
|
103
|
+
*/
|
|
104
|
+
'trailing_stop'?: AccountOrderRecordTrailingStop | null;
|
|
98
105
|
/**
|
|
99
106
|
* The type of order placed. The most common values are `Market`, `Limit`, `Stop`, and `StopLimit`. We try our best to map brokerage order types to these values. When mapping fails, we will return the brokerage\'s order type value.
|
|
100
107
|
* @type {string}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Confirmation that the transaction syncs have been scheduled.
|
|
3
|
+
* @export
|
|
4
|
+
* @interface BrokerageAuthorizationTransactionsSyncConfirmation
|
|
5
|
+
*/
|
|
6
|
+
export interface BrokerageAuthorizationTransactionsSyncConfirmation {
|
|
7
|
+
[key: string]: any;
|
|
8
|
+
/**
|
|
9
|
+
* Transactions sync confirmation details
|
|
10
|
+
* @type {string}
|
|
11
|
+
* @memberof BrokerageAuthorizationTransactionsSyncConfirmation
|
|
12
|
+
*/
|
|
13
|
+
'detail'?: string;
|
|
14
|
+
}
|
package/dist/models/index.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ export * from './account-order-record-quote-currency';
|
|
|
13
13
|
export * from './account-order-record-quote-universal-symbol';
|
|
14
14
|
export * from './account-order-record-status';
|
|
15
15
|
export * from './account-order-record-status-v2';
|
|
16
|
+
export * from './account-order-record-trailing-stop';
|
|
16
17
|
export * from './account-order-record-universal-symbol';
|
|
17
18
|
export * from './account-order-record-v2';
|
|
18
19
|
export * from './account-orders-v2-response';
|
|
@@ -33,6 +34,7 @@ export * from './brokerage';
|
|
|
33
34
|
export * from './brokerage-authorization';
|
|
34
35
|
export * from './brokerage-authorization-disabled-confirmation';
|
|
35
36
|
export * from './brokerage-authorization-refresh-confirmation';
|
|
37
|
+
export * from './brokerage-authorization-transactions-sync-confirmation';
|
|
36
38
|
export * from './brokerage-authorization-type-read-only';
|
|
37
39
|
export * from './brokerage-authorization-type-read-only-brokerage';
|
|
38
40
|
export * from './brokerage-instrument';
|
|
@@ -141,6 +143,7 @@ export * from './time-in-force-strict';
|
|
|
141
143
|
export * from './trading-instrument';
|
|
142
144
|
export * from './trading-search-cryptocurrency-pair-instruments200-response';
|
|
143
145
|
export * from './trading-session';
|
|
146
|
+
export * from './trailing-stop';
|
|
144
147
|
export * from './transactions-status';
|
|
145
148
|
export * from './usexchange';
|
|
146
149
|
export * from './underlying-symbol';
|
package/dist/models/index.js
CHANGED
|
@@ -29,6 +29,7 @@ __exportStar(require("./account-order-record-quote-currency"), exports);
|
|
|
29
29
|
__exportStar(require("./account-order-record-quote-universal-symbol"), exports);
|
|
30
30
|
__exportStar(require("./account-order-record-status"), exports);
|
|
31
31
|
__exportStar(require("./account-order-record-status-v2"), exports);
|
|
32
|
+
__exportStar(require("./account-order-record-trailing-stop"), exports);
|
|
32
33
|
__exportStar(require("./account-order-record-universal-symbol"), exports);
|
|
33
34
|
__exportStar(require("./account-order-record-v2"), exports);
|
|
34
35
|
__exportStar(require("./account-orders-v2-response"), exports);
|
|
@@ -49,6 +50,7 @@ __exportStar(require("./brokerage"), exports);
|
|
|
49
50
|
__exportStar(require("./brokerage-authorization"), exports);
|
|
50
51
|
__exportStar(require("./brokerage-authorization-disabled-confirmation"), exports);
|
|
51
52
|
__exportStar(require("./brokerage-authorization-refresh-confirmation"), exports);
|
|
53
|
+
__exportStar(require("./brokerage-authorization-transactions-sync-confirmation"), exports);
|
|
52
54
|
__exportStar(require("./brokerage-authorization-type-read-only"), exports);
|
|
53
55
|
__exportStar(require("./brokerage-authorization-type-read-only-brokerage"), exports);
|
|
54
56
|
__exportStar(require("./brokerage-instrument"), exports);
|
|
@@ -157,6 +159,7 @@ __exportStar(require("./time-in-force-strict"), exports);
|
|
|
157
159
|
__exportStar(require("./trading-instrument"), exports);
|
|
158
160
|
__exportStar(require("./trading-search-cryptocurrency-pair-instruments200-response"), exports);
|
|
159
161
|
__exportStar(require("./trading-session"), exports);
|
|
162
|
+
__exportStar(require("./trailing-stop"), exports);
|
|
160
163
|
__exportStar(require("./transactions-status"), exports);
|
|
161
164
|
__exportStar(require("./usexchange"), exports);
|
|
162
165
|
__exportStar(require("./underlying-symbol"), exports);
|
|
@@ -3,6 +3,7 @@ import { AccountOrderRecordOptionSymbol } from './account-order-record-option-sy
|
|
|
3
3
|
import { AccountOrderRecordQuoteCurrency } from './account-order-record-quote-currency';
|
|
4
4
|
import { AccountOrderRecordQuoteUniversalSymbol } from './account-order-record-quote-universal-symbol';
|
|
5
5
|
import { AccountOrderRecordStatus } from './account-order-record-status';
|
|
6
|
+
import { AccountOrderRecordTrailingStop } from './account-order-record-trailing-stop';
|
|
6
7
|
import { AccountOrderRecordUniversalSymbol } from './account-order-record-universal-symbol';
|
|
7
8
|
/**
|
|
8
9
|
*
|
|
@@ -94,6 +95,12 @@ export interface OrderUpdatedResponseOrder {
|
|
|
94
95
|
* @memberof OrderUpdatedResponseOrder
|
|
95
96
|
*/
|
|
96
97
|
'stop_price'?: number | null;
|
|
98
|
+
/**
|
|
99
|
+
*
|
|
100
|
+
* @type {AccountOrderRecordTrailingStop}
|
|
101
|
+
* @memberof OrderUpdatedResponseOrder
|
|
102
|
+
*/
|
|
103
|
+
'trailing_stop'?: AccountOrderRecordTrailingStop | null;
|
|
97
104
|
/**
|
|
98
105
|
* The type of order placed. The most common values are `Market`, `Limit`, `Stop`, and `StopLimit`. We try our best to map brokerage order types to these values. When mapping fails, we will return the brokerage\'s order type value.
|
|
99
106
|
* @type {string}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Trail configuration for trailing stop orders.
|
|
3
|
+
* @export
|
|
4
|
+
* @interface TrailingStop
|
|
5
|
+
*/
|
|
6
|
+
export interface TrailingStop {
|
|
7
|
+
[key: string]: any;
|
|
8
|
+
/**
|
|
9
|
+
* The trail amount. Interpreted as dollars if `type` is `DOLLAR`, or a percentage if `type` is `PERCENT`.
|
|
10
|
+
* @type {string}
|
|
11
|
+
* @memberof TrailingStop
|
|
12
|
+
*/
|
|
13
|
+
'amount': string;
|
|
14
|
+
/**
|
|
15
|
+
* Whether the trail `amount` is a dollar amount (`DOLLAR`) or a percentage (`PERCENT`). For example, if `amount` is \"0.60\" and `type` is `DOLLAR`, the stop price will trail the market price by $0.60. If `amount` is \"5\" and `type` is `PERCENT`, the stop price will trail the market price by 5%.
|
|
16
|
+
* @type {string}
|
|
17
|
+
* @memberof TrailingStop
|
|
18
|
+
*/
|
|
19
|
+
'type': TrailingStopTypeEnum;
|
|
20
|
+
}
|
|
21
|
+
type TrailingStopTypeEnum = 'DOLLAR' | 'PERCENT';
|
|
22
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Status of account transaction sync. SnapTrade syncs transactions from the brokerage under the following conditions: 1. Initial connection - SnapTrade syncs all transactions from the brokerage account as far back as the brokerage allows. Check [our integrations doc](https://support.snaptrade.com/brokerages-table?v=6fab8012ade6441fa0c6d9af9c55ce3a) for details on how far back we sync for each brokerage. 2. Daily sync - Once a day SnapTrade syncs new transactions from the brokerage. 3. Manual sync - You can
|
|
2
|
+
* Status of account transaction sync. SnapTrade syncs transactions from the brokerage under the following conditions: 1. Initial connection - SnapTrade syncs all transactions from the brokerage account as far back as the brokerage allows. Check [our integrations doc](https://support.snaptrade.com/brokerages-table?v=6fab8012ade6441fa0c6d9af9c55ce3a) for details on how far back we sync for each brokerage. 2. Daily sync - Once a day SnapTrade syncs new transactions from the brokerage. 3. Manual sync - You can trigger an incremental sync of transactions with the [transactions sync](/reference/Experimental%20endpoints/Connections_syncBrokerageAuthorizationTransactions) endpoint.
|
|
3
3
|
* @export
|
|
4
4
|
* @interface TransactionsStatus
|
|
5
5
|
*/
|
|
@@ -144,6 +144,9 @@ exports.operationParameterMap = {
|
|
|
144
144
|
{
|
|
145
145
|
name: 'accountId'
|
|
146
146
|
},
|
|
147
|
+
{
|
|
148
|
+
name: 'timeframes'
|
|
149
|
+
},
|
|
147
150
|
]
|
|
148
151
|
},
|
|
149
152
|
'/accounts/{accountId}/holdings-GET': {
|
|
@@ -332,6 +335,9 @@ exports.operationParameterMap = {
|
|
|
332
335
|
{
|
|
333
336
|
name: 'authorizationId'
|
|
334
337
|
},
|
|
338
|
+
{
|
|
339
|
+
name: 'timeframes'
|
|
340
|
+
},
|
|
335
341
|
]
|
|
336
342
|
},
|
|
337
343
|
'/sessionEvents-GET': {
|
|
@@ -411,6 +417,19 @@ exports.operationParameterMap = {
|
|
|
411
417
|
},
|
|
412
418
|
]
|
|
413
419
|
},
|
|
420
|
+
'/authorizations/{authorizationId}/transactions/sync-POST': {
|
|
421
|
+
parameters: [
|
|
422
|
+
{
|
|
423
|
+
name: 'authorizationId'
|
|
424
|
+
},
|
|
425
|
+
{
|
|
426
|
+
name: 'userId'
|
|
427
|
+
},
|
|
428
|
+
{
|
|
429
|
+
name: 'userSecret'
|
|
430
|
+
},
|
|
431
|
+
]
|
|
432
|
+
},
|
|
414
433
|
'/accounts/{accountId}/options-GET': {
|
|
415
434
|
parameters: [
|
|
416
435
|
{
|