snaptrade-typescript-sdk 9.0.38 → 9.0.40
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 +89 -76
- package/dist/api/account-information-api-generated.d.ts +4 -4
- package/dist/api/account-information-api-generated.js +4 -4
- package/dist/api/authentication-api-generated.d.ts +4 -4
- package/dist/api/authentication-api-generated.js +4 -4
- package/dist/api/connections-api-generated.d.ts +44 -44
- package/dist/api/connections-api-generated.js +40 -40
- package/dist/api/trading-api-generated.d.ts +47 -47
- package/dist/api/trading-api-generated.js +46 -46
- package/dist/browser.js +1 -1
- package/dist/configuration.js +1 -1
- package/dist/models/account.d.ts +2 -2
- package/dist/models/action-strict.d.ts +1 -1
- package/dist/models/brokerage-authorization-disabled-confirmation.d.ts +1 -1
- package/dist/models/brokerage-authorization-refresh-confirmation.d.ts +1 -1
- package/dist/models/brokerage-authorization.d.ts +11 -9
- package/dist/models/brokerage-type.d.ts +1 -1
- package/dist/models/brokerage.d.ts +25 -38
- package/dist/models/index.d.ts +1 -0
- package/dist/models/index.js +1 -0
- package/dist/models/manual-trade-and-impact.d.ts +5 -4
- package/dist/models/manual-trade-balance.d.ts +5 -5
- package/dist/models/manual-trade-form.d.ts +21 -21
- package/dist/models/manual-trade-impact.d.ts +38 -0
- package/dist/models/manual-trade-impact.js +2 -0
- package/dist/models/manual-trade-symbol.d.ts +10 -6
- package/dist/models/manual-trade.d.ts +9 -8
- package/dist/models/notional-value.d.ts +1 -1
- package/dist/models/options-place-option-strategy-request.d.ts +2 -2
- package/dist/models/order-type-strict.d.ts +1 -1
- package/dist/models/symbols-quotes-inner.d.ts +8 -8
- package/dist/models/time-in-force-strict.d.ts +1 -1
- package/dist/models/trading-cancel-user-account-order-request.d.ts +1 -1
- package/dist/models/validated-trade-body.d.ts +2 -2
- package/dist/operationParameterMap.js +20 -20
- package/package.json +1 -1
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.40/typescript" : param.userAgent;
|
|
36
36
|
this.formDataCtor = param.formDataCtor;
|
|
37
37
|
}
|
|
38
38
|
/**
|
package/dist/models/account.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ export interface Account {
|
|
|
14
14
|
*/
|
|
15
15
|
'id'?: string;
|
|
16
16
|
/**
|
|
17
|
-
* Unique identifier for the connection
|
|
17
|
+
* Unique identifier for the connection. This is the UUID used to reference the connection in SnapTrade.
|
|
18
18
|
* @type {string}
|
|
19
19
|
* @memberof Account
|
|
20
20
|
*/
|
|
@@ -51,7 +51,7 @@ export interface Account {
|
|
|
51
51
|
*/
|
|
52
52
|
'created_date'?: string;
|
|
53
53
|
/**
|
|
54
|
-
* Additional information about the account, such as account type, status, etc. This information is specific to the brokerage and there\'s no standard format for this data.
|
|
54
|
+
* Additional information about the account, such as account type, status, etc. This information is specific to the brokerage and there\'s no standard format for this data. This field is deprecated and subject to removal in a future version.
|
|
55
55
|
* @type {{ [key: string]: any; }}
|
|
56
56
|
* @memberof Account
|
|
57
57
|
* @deprecated
|
|
@@ -1,27 +1,28 @@
|
|
|
1
1
|
import { Brokerage } from './brokerage';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* A single connection with a brokerage. Note that `Connection` and `Brokerage Authorization` are interchangeable, but the term `Connection` is preferred and used in the doc for consistency. A connection is usually tied to a single login at a brokerage. A single connection can contain multiple brokerage accounts. SnapTrade performs de-duping on connections for a given user. If the user has an existing connection with the brokerage, when connecting the brokerage with the same credentials, SnapTrade will return the existing connection instead of creating a new one.
|
|
4
4
|
* @export
|
|
5
5
|
* @interface BrokerageAuthorization
|
|
6
6
|
*/
|
|
7
7
|
export interface BrokerageAuthorization {
|
|
8
8
|
[key: string]: any;
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
10
|
+
* Unique identifier for the connection. This is the UUID used to reference the connection in SnapTrade.
|
|
11
11
|
* @type {string}
|
|
12
12
|
* @memberof BrokerageAuthorization
|
|
13
13
|
*/
|
|
14
14
|
'id'?: string;
|
|
15
15
|
/**
|
|
16
|
-
*
|
|
16
|
+
* Timestamp of when the connection was established in SnapTrade.
|
|
17
17
|
* @type {string}
|
|
18
18
|
* @memberof BrokerageAuthorization
|
|
19
19
|
*/
|
|
20
20
|
'created_date'?: string;
|
|
21
21
|
/**
|
|
22
|
-
*
|
|
22
|
+
* Timestamp of when the connection was last updated in SnapTrade. This field is deprecated. Please let us know if you have a valid use case for this field.
|
|
23
23
|
* @type {string}
|
|
24
24
|
* @memberof BrokerageAuthorization
|
|
25
|
+
* @deprecated
|
|
25
26
|
*/
|
|
26
27
|
'updated_date'?: string;
|
|
27
28
|
/**
|
|
@@ -31,33 +32,34 @@ export interface BrokerageAuthorization {
|
|
|
31
32
|
*/
|
|
32
33
|
'brokerage'?: Brokerage;
|
|
33
34
|
/**
|
|
34
|
-
*
|
|
35
|
+
* A short, human-readable name for the connection.
|
|
35
36
|
* @type {string}
|
|
36
37
|
* @memberof BrokerageAuthorization
|
|
37
38
|
*/
|
|
38
39
|
'name'?: string;
|
|
39
40
|
/**
|
|
40
|
-
*
|
|
41
|
+
* Whether the connection is read-only or trade-enabled. A read-only connection can only be used to fetch data, while a trade-enabled connection can be used to place trades. Valid values are `read` and `trade`.
|
|
41
42
|
* @type {string}
|
|
42
43
|
* @memberof BrokerageAuthorization
|
|
43
44
|
*/
|
|
44
45
|
'type'?: string;
|
|
45
46
|
/**
|
|
46
|
-
*
|
|
47
|
+
* Whether the connection is disabled. A disabled connection can no longer access the latest data from the brokerage, but will continue to return the last cached state. A connection can become disabled for many reasons and differs by brokerage. Here are some common scenarios: - The user has changed their username or password at the brokerage. - The user has explicitly removed the access grant at the brokerage. - The session has expired at the brokerage and now requires explicit user re-authentication. Please see [this guide](https://docs.snaptrade.com/docs/fix-broken-connections) on how to fix a disabled connection.
|
|
47
48
|
* @type {boolean}
|
|
48
49
|
* @memberof BrokerageAuthorization
|
|
49
50
|
*/
|
|
50
51
|
'disabled'?: boolean;
|
|
51
52
|
/**
|
|
52
|
-
*
|
|
53
|
+
* Timestamp of when the connection was disabled in SnapTrade.
|
|
53
54
|
* @type {string}
|
|
54
55
|
* @memberof BrokerageAuthorization
|
|
55
56
|
*/
|
|
56
57
|
'disabled_date'?: string | null;
|
|
57
58
|
/**
|
|
58
|
-
* Additional data about brokerage
|
|
59
|
+
* Additional data about the connection. This information is specific to the brokerage and there\'s no standard format for this data. This field is deprecated and subject to removal in a future version.
|
|
59
60
|
* @type {{ [key: string]: any; }}
|
|
60
61
|
* @memberof BrokerageAuthorization
|
|
62
|
+
* @deprecated
|
|
61
63
|
*/
|
|
62
64
|
'meta'?: {
|
|
63
65
|
[key: string]: any;
|
|
@@ -1,17 +1,23 @@
|
|
|
1
1
|
import { BrokerageType } from './brokerage-type';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* Describes a brokerage that SnapTrade supports.
|
|
4
4
|
* @export
|
|
5
5
|
* @interface Brokerage
|
|
6
6
|
*/
|
|
7
7
|
export interface Brokerage {
|
|
8
8
|
[key: string]: any;
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
10
|
+
* Unique identifier for the brokerage firm. This is the UUID used to reference the brokerage in SnapTrade.
|
|
11
11
|
* @type {string}
|
|
12
12
|
* @memberof Brokerage
|
|
13
13
|
*/
|
|
14
14
|
'id'?: string;
|
|
15
|
+
/**
|
|
16
|
+
* A short, unique identifier for the brokerage. It is usually the name of the brokerage in capital letters and will never change.
|
|
17
|
+
* @type {string}
|
|
18
|
+
* @memberof Brokerage
|
|
19
|
+
*/
|
|
20
|
+
'slug'?: string;
|
|
15
21
|
/**
|
|
16
22
|
* Full name of the brokerage.
|
|
17
23
|
* @type {string}
|
|
@@ -25,95 +31,75 @@ export interface Brokerage {
|
|
|
25
31
|
*/
|
|
26
32
|
'display_name'?: string;
|
|
27
33
|
/**
|
|
28
|
-
*
|
|
34
|
+
* A brief description of the brokerage.
|
|
29
35
|
* @type {string}
|
|
30
36
|
* @memberof Brokerage
|
|
31
37
|
*/
|
|
32
38
|
'description'?: string;
|
|
33
39
|
/**
|
|
34
|
-
*
|
|
40
|
+
* URL to the brokerage\'s logo.
|
|
35
41
|
* @type {string}
|
|
36
42
|
* @memberof Brokerage
|
|
37
43
|
*/
|
|
38
44
|
'aws_s3_logo_url'?: string;
|
|
39
45
|
/**
|
|
40
|
-
*
|
|
46
|
+
* URL to the brokerage\'s logo in square format.
|
|
41
47
|
* @type {string}
|
|
42
48
|
* @memberof Brokerage
|
|
43
49
|
*/
|
|
44
50
|
'aws_s3_square_logo_url'?: string | null;
|
|
45
51
|
/**
|
|
46
|
-
*
|
|
52
|
+
* This field is deprecated.
|
|
47
53
|
* @type {string}
|
|
48
54
|
* @memberof Brokerage
|
|
55
|
+
* @deprecated
|
|
49
56
|
*/
|
|
50
57
|
'open_url'?: string | null;
|
|
51
58
|
/**
|
|
52
|
-
*
|
|
53
|
-
* @type {string}
|
|
54
|
-
* @memberof Brokerage
|
|
55
|
-
*/
|
|
56
|
-
'slug'?: string;
|
|
57
|
-
/**
|
|
58
|
-
*
|
|
59
|
+
* URL to the brokerage\'s website.
|
|
59
60
|
* @type {string}
|
|
60
61
|
* @memberof Brokerage
|
|
61
62
|
*/
|
|
62
63
|
'url'?: string;
|
|
63
64
|
/**
|
|
64
|
-
*
|
|
65
|
+
* Whether the brokerage is enabled in SnapTrade. A disabled brokerage will not be available for new connections.
|
|
65
66
|
* @type {boolean}
|
|
66
67
|
* @memberof Brokerage
|
|
67
68
|
*/
|
|
68
69
|
'enabled'?: boolean;
|
|
69
70
|
/**
|
|
70
|
-
*
|
|
71
|
+
* Whether the brokerage is currently in maintenance mode. A brokerage in maintenance mode will not be available for new connections.
|
|
71
72
|
* @type {boolean}
|
|
72
73
|
* @memberof Brokerage
|
|
73
74
|
*/
|
|
74
75
|
'maintenance_mode'?: boolean;
|
|
75
76
|
/**
|
|
76
|
-
*
|
|
77
|
+
* This field is deprecated. Please contact us if you have a valid use case for it.
|
|
77
78
|
* @type {boolean}
|
|
78
79
|
* @memberof Brokerage
|
|
80
|
+
* @deprecated
|
|
79
81
|
*/
|
|
80
82
|
'allows_fractional_units'?: boolean | null;
|
|
81
83
|
/**
|
|
82
|
-
*
|
|
84
|
+
* Whether the brokerage allows trading through SnapTrade.
|
|
83
85
|
* @type {boolean}
|
|
84
86
|
* @memberof Brokerage
|
|
85
87
|
*/
|
|
86
88
|
'allows_trading'?: boolean | null;
|
|
87
89
|
/**
|
|
88
|
-
*
|
|
90
|
+
* This field is deprecated. Please contact us if you have a valid use case for it.
|
|
89
91
|
* @type {boolean}
|
|
90
92
|
* @memberof Brokerage
|
|
93
|
+
* @deprecated
|
|
91
94
|
*/
|
|
92
95
|
'has_reporting'?: boolean | null;
|
|
93
96
|
/**
|
|
94
|
-
*
|
|
97
|
+
* This field is deprecated. Please contact us if you have a valid use case for it.
|
|
95
98
|
* @type {boolean}
|
|
96
99
|
* @memberof Brokerage
|
|
100
|
+
* @deprecated
|
|
97
101
|
*/
|
|
98
102
|
'is_real_time_connection'?: boolean;
|
|
99
|
-
/**
|
|
100
|
-
*
|
|
101
|
-
* @type {boolean}
|
|
102
|
-
* @memberof Brokerage
|
|
103
|
-
*/
|
|
104
|
-
'allows_trading_through_snaptrade_api'?: boolean | null;
|
|
105
|
-
/**
|
|
106
|
-
*
|
|
107
|
-
* @type {boolean}
|
|
108
|
-
* @memberof Brokerage
|
|
109
|
-
*/
|
|
110
|
-
'is_scraping_integration'?: boolean;
|
|
111
|
-
/**
|
|
112
|
-
*
|
|
113
|
-
* @type {string}
|
|
114
|
-
* @memberof Brokerage
|
|
115
|
-
*/
|
|
116
|
-
'default_currency'?: string;
|
|
117
103
|
/**
|
|
118
104
|
*
|
|
119
105
|
* @type {BrokerageType}
|
|
@@ -121,9 +107,10 @@ export interface Brokerage {
|
|
|
121
107
|
*/
|
|
122
108
|
'brokerage_type'?: BrokerageType;
|
|
123
109
|
/**
|
|
124
|
-
*
|
|
110
|
+
* This field is deprecated. Please contact us if you have a valid use case for it.
|
|
125
111
|
* @type {Array<any>}
|
|
126
112
|
* @memberof Brokerage
|
|
113
|
+
* @deprecated
|
|
127
114
|
*/
|
|
128
115
|
'exchanges'?: Array<any>;
|
|
129
116
|
}
|
package/dist/models/index.d.ts
CHANGED
|
@@ -36,6 +36,7 @@ export * from './manual-trade-and-impact';
|
|
|
36
36
|
export * from './manual-trade-balance';
|
|
37
37
|
export * from './manual-trade-form';
|
|
38
38
|
export * from './manual-trade-form-notional-value';
|
|
39
|
+
export * from './manual-trade-impact';
|
|
39
40
|
export * from './manual-trade-symbol';
|
|
40
41
|
export * from './model400-failed-request-response';
|
|
41
42
|
export * from './model401-failed-request-response';
|
package/dist/models/index.js
CHANGED
|
@@ -52,6 +52,7 @@ __exportStar(require("./manual-trade-and-impact"), exports);
|
|
|
52
52
|
__exportStar(require("./manual-trade-balance"), exports);
|
|
53
53
|
__exportStar(require("./manual-trade-form"), exports);
|
|
54
54
|
__exportStar(require("./manual-trade-form-notional-value"), exports);
|
|
55
|
+
__exportStar(require("./manual-trade-impact"), exports);
|
|
55
56
|
__exportStar(require("./manual-trade-symbol"), exports);
|
|
56
57
|
__exportStar(require("./model400-failed-request-response"), exports);
|
|
57
58
|
__exportStar(require("./model401-failed-request-response"), exports);
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { ManualTrade } from './manual-trade';
|
|
2
2
|
import { ManualTradeBalance } from './manual-trade-balance';
|
|
3
|
+
import { ManualTradeImpact } from './manual-trade-impact';
|
|
3
4
|
/**
|
|
4
|
-
*
|
|
5
|
+
*
|
|
5
6
|
* @export
|
|
6
7
|
* @interface ManualTradeAndImpact
|
|
7
8
|
*/
|
|
@@ -14,11 +15,11 @@ export interface ManualTradeAndImpact {
|
|
|
14
15
|
*/
|
|
15
16
|
'trade'?: ManualTrade;
|
|
16
17
|
/**
|
|
17
|
-
*
|
|
18
|
-
* @type {Array<
|
|
18
|
+
* List of impacts of the trade on the account. The list always contains one value at the moment.
|
|
19
|
+
* @type {Array<ManualTradeImpact>}
|
|
19
20
|
* @memberof ManualTradeAndImpact
|
|
20
21
|
*/
|
|
21
|
-
'trade_impacts'?: Array<
|
|
22
|
+
'trade_impacts'?: Array<ManualTradeImpact>;
|
|
22
23
|
/**
|
|
23
24
|
*
|
|
24
25
|
* @type {ManualTradeBalance}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AccountSimple } from './account-simple';
|
|
2
2
|
import { Currency } from './currency';
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* Estimated remaining balance of the account after the trade is executed.
|
|
5
5
|
* @export
|
|
6
6
|
* @interface ManualTradeBalance
|
|
7
7
|
*/
|
|
@@ -9,10 +9,10 @@ export interface ManualTradeBalance {
|
|
|
9
9
|
[key: string]: any;
|
|
10
10
|
/**
|
|
11
11
|
*
|
|
12
|
-
* @type {
|
|
12
|
+
* @type {AccountSimple}
|
|
13
13
|
* @memberof ManualTradeBalance
|
|
14
14
|
*/
|
|
15
|
-
'account'?:
|
|
15
|
+
'account'?: AccountSimple;
|
|
16
16
|
/**
|
|
17
17
|
*
|
|
18
18
|
* @type {Currency}
|
|
@@ -20,7 +20,7 @@ export interface ManualTradeBalance {
|
|
|
20
20
|
*/
|
|
21
21
|
'currency'?: Currency;
|
|
22
22
|
/**
|
|
23
|
-
*
|
|
23
|
+
* Estimated amount of cash remaining in the account after the trade. At the moment this is the same as `remaining_cash` under `trade_impacts`.
|
|
24
24
|
* @type {number}
|
|
25
25
|
* @memberof ManualTradeBalance
|
|
26
26
|
*/
|
|
@@ -3,59 +3,59 @@ import { ManualTradeFormNotionalValue } from './manual-trade-form-notional-value
|
|
|
3
3
|
import { OrderTypeStrict } from './order-type-strict';
|
|
4
4
|
import { TimeInForceStrict } from './time-in-force-strict';
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* Inputs for placing an order with the brokerage.
|
|
7
7
|
* @export
|
|
8
8
|
* @interface ManualTradeForm
|
|
9
9
|
*/
|
|
10
10
|
export interface ManualTradeForm {
|
|
11
11
|
/**
|
|
12
|
-
*
|
|
12
|
+
* Unique identifier for the connected brokerage account. This is the UUID used to reference the account in SnapTrade.
|
|
13
13
|
* @type {string}
|
|
14
14
|
* @memberof ManualTradeForm
|
|
15
15
|
*/
|
|
16
|
-
'account_id'
|
|
16
|
+
'account_id': string;
|
|
17
17
|
/**
|
|
18
|
-
*
|
|
18
|
+
* The action describes the intent or side of a trade. This is either `BUY` or `SELL`
|
|
19
19
|
* @type {ActionStrict}
|
|
20
20
|
* @memberof ManualTradeForm
|
|
21
21
|
*/
|
|
22
|
-
'action'
|
|
22
|
+
'action': ActionStrict;
|
|
23
23
|
/**
|
|
24
|
-
*
|
|
25
|
-
* @type {
|
|
24
|
+
* Unique identifier for the symbol within SnapTrade. This is the ID used to reference the symbol in SnapTrade API calls.
|
|
25
|
+
* @type {string}
|
|
26
26
|
* @memberof ManualTradeForm
|
|
27
27
|
*/
|
|
28
|
-
'
|
|
28
|
+
'universal_symbol_id': string;
|
|
29
29
|
/**
|
|
30
|
-
*
|
|
31
|
-
* @type {
|
|
30
|
+
* The type of order to place. - For `Limit` and `StopLimit` orders, the `price` field is required. - For `Stop` and `StopLimit` orders, the `stop` field is required.
|
|
31
|
+
* @type {OrderTypeStrict}
|
|
32
32
|
* @memberof ManualTradeForm
|
|
33
33
|
*/
|
|
34
|
-
'
|
|
34
|
+
'order_type': OrderTypeStrict;
|
|
35
35
|
/**
|
|
36
|
-
*
|
|
37
|
-
* @type {
|
|
36
|
+
* The Time in Force type for the order. This field indicates how long the order will remain active before it is executed or expires. Here are the supported values: - `Day` - Day. The order is valid only for the trading day on which it is placed. - `GTC` - Good Til Canceled. The order is valid until it is executed or canceled. - `FOK` - Fill Or Kill. The order must be executed in its entirety immediately or be canceled completely.
|
|
37
|
+
* @type {TimeInForceStrict}
|
|
38
38
|
* @memberof ManualTradeForm
|
|
39
39
|
*/
|
|
40
|
-
'
|
|
40
|
+
'time_in_force': TimeInForceStrict;
|
|
41
41
|
/**
|
|
42
|
-
*
|
|
43
|
-
* @type {
|
|
42
|
+
* The limit price for `Limit` and `StopLimit` orders.
|
|
43
|
+
* @type {number}
|
|
44
44
|
* @memberof ManualTradeForm
|
|
45
45
|
*/
|
|
46
|
-
'
|
|
46
|
+
'price'?: number | null;
|
|
47
47
|
/**
|
|
48
|
-
*
|
|
48
|
+
* The price at which a stop order is triggered for `Stop` and `StopLimit` orders.
|
|
49
49
|
* @type {number}
|
|
50
50
|
* @memberof ManualTradeForm
|
|
51
51
|
*/
|
|
52
|
-
'
|
|
52
|
+
'stop'?: number | null;
|
|
53
53
|
/**
|
|
54
54
|
*
|
|
55
|
-
* @type {
|
|
55
|
+
* @type {number}
|
|
56
56
|
* @memberof ManualTradeForm
|
|
57
57
|
*/
|
|
58
|
-
'
|
|
58
|
+
'units'?: number | null;
|
|
59
59
|
/**
|
|
60
60
|
*
|
|
61
61
|
* @type {ManualTradeFormNotionalValue}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* @export
|
|
4
|
+
* @interface ManualTradeImpact
|
|
5
|
+
*/
|
|
6
|
+
export interface ManualTradeImpact {
|
|
7
|
+
[key: string]: any;
|
|
8
|
+
/**
|
|
9
|
+
* Unique identifier for the connected brokerage account. This is the UUID used to reference the account in SnapTrade.
|
|
10
|
+
* @type {string}
|
|
11
|
+
* @memberof ManualTradeImpact
|
|
12
|
+
*/
|
|
13
|
+
'account'?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Unique identifier for the currency. This is the UUID used to reference the currency in SnapTrade.
|
|
16
|
+
* @type {string}
|
|
17
|
+
* @memberof ManualTradeImpact
|
|
18
|
+
*/
|
|
19
|
+
'currency'?: string;
|
|
20
|
+
/**
|
|
21
|
+
* Estimated amount of cash remaining in the account after the trade.
|
|
22
|
+
* @type {number}
|
|
23
|
+
* @memberof ManualTradeImpact
|
|
24
|
+
*/
|
|
25
|
+
'remaining_cash'?: number | null;
|
|
26
|
+
/**
|
|
27
|
+
* Estimated commission for the trade.
|
|
28
|
+
* @type {number}
|
|
29
|
+
* @memberof ManualTradeImpact
|
|
30
|
+
*/
|
|
31
|
+
'estimated_commission'?: number | null;
|
|
32
|
+
/**
|
|
33
|
+
* Estimated foreign transaction fees for the trade.
|
|
34
|
+
* @type {number}
|
|
35
|
+
* @memberof ManualTradeImpact
|
|
36
|
+
*/
|
|
37
|
+
'forex_fees'?: number | null;
|
|
38
|
+
}
|
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
import { Currency } from './currency';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* Information about the security for the order.
|
|
4
4
|
* @export
|
|
5
5
|
* @interface ManualTradeSymbol
|
|
6
6
|
*/
|
|
7
7
|
export interface ManualTradeSymbol {
|
|
8
8
|
[key: string]: any;
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
10
|
+
* A unique ID for the security within SnapTrade, scoped to the brokerage account that the security belongs to. This is a legacy field and should not be used. Do not rely on this being a stable ID as it can change.
|
|
11
11
|
* @type {string}
|
|
12
12
|
* @memberof ManualTradeSymbol
|
|
13
|
+
* @deprecated
|
|
13
14
|
*/
|
|
14
15
|
'brokerage_symbol_id'?: string;
|
|
15
16
|
/**
|
|
16
|
-
*
|
|
17
|
+
* Unique identifier for the symbol within SnapTrade. This is the ID used to reference the symbol in SnapTrade API calls.
|
|
17
18
|
* @type {string}
|
|
18
19
|
* @memberof ManualTradeSymbol
|
|
19
20
|
*/
|
|
@@ -25,21 +26,24 @@ export interface ManualTradeSymbol {
|
|
|
25
26
|
*/
|
|
26
27
|
'currency'?: Currency;
|
|
27
28
|
/**
|
|
28
|
-
*
|
|
29
|
+
* This field is deprecated and should not be used.
|
|
29
30
|
* @type {string}
|
|
30
31
|
* @memberof ManualTradeSymbol
|
|
32
|
+
* @deprecated
|
|
31
33
|
*/
|
|
32
34
|
'local_id'?: string;
|
|
33
35
|
/**
|
|
34
|
-
*
|
|
36
|
+
* This field is deprecated and should not be used.
|
|
35
37
|
* @type {string}
|
|
36
38
|
* @memberof ManualTradeSymbol
|
|
39
|
+
* @deprecated
|
|
37
40
|
*/
|
|
38
41
|
'description'?: string | null;
|
|
39
42
|
/**
|
|
40
|
-
*
|
|
43
|
+
* This field is deprecated and should not be used.
|
|
41
44
|
* @type {string}
|
|
42
45
|
* @memberof ManualTradeSymbol
|
|
46
|
+
* @deprecated
|
|
43
47
|
*/
|
|
44
48
|
'symbol'?: string;
|
|
45
49
|
}
|
|
@@ -1,37 +1,38 @@
|
|
|
1
1
|
import { ActionStrict } from './action-strict';
|
|
2
2
|
import { ManualTradeSymbol } from './manual-trade-symbol';
|
|
3
3
|
import { OrderTypeStrict } from './order-type-strict';
|
|
4
|
+
import { TimeInForceStrict } from './time-in-force-strict';
|
|
4
5
|
/**
|
|
5
|
-
*
|
|
6
|
+
* Contains the details of a submitted order.
|
|
6
7
|
* @export
|
|
7
8
|
* @interface ManualTrade
|
|
8
9
|
*/
|
|
9
10
|
export interface ManualTrade {
|
|
10
11
|
[key: string]: any;
|
|
11
12
|
/**
|
|
12
|
-
*
|
|
13
|
+
* Unique identifier for the submitted order through SnapTrade.
|
|
13
14
|
* @type {string}
|
|
14
15
|
* @memberof ManualTrade
|
|
15
16
|
*/
|
|
16
17
|
'id'?: string;
|
|
17
18
|
/**
|
|
18
|
-
*
|
|
19
|
+
* Unique identifier for the connected brokerage account. This is the UUID used to reference the account in SnapTrade.
|
|
19
20
|
* @type {string}
|
|
20
21
|
* @memberof ManualTrade
|
|
21
22
|
*/
|
|
22
23
|
'account'?: string;
|
|
23
24
|
/**
|
|
24
|
-
*
|
|
25
|
+
* The type of order to place. - For `Limit` and `StopLimit` orders, the `price` field is required. - For `Stop` and `StopLimit` orders, the `stop` field is required.
|
|
25
26
|
* @type {OrderTypeStrict}
|
|
26
27
|
* @memberof ManualTrade
|
|
27
28
|
*/
|
|
28
29
|
'order_type'?: OrderTypeStrict;
|
|
29
30
|
/**
|
|
30
|
-
*
|
|
31
|
-
* @type {
|
|
31
|
+
* The Time in Force type for the order. This field indicates how long the order will remain active before it is executed or expires. Here are the supported values: - `Day` - Day. The order is valid only for the trading day on which it is placed. - `GTC` - Good Til Canceled. The order is valid until it is executed or canceled. - `FOK` - Fill Or Kill. The order must be executed in its entirety immediately or be canceled completely.
|
|
32
|
+
* @type {TimeInForceStrict}
|
|
32
33
|
* @memberof ManualTrade
|
|
33
34
|
*/
|
|
34
|
-
'time_in_force'?:
|
|
35
|
+
'time_in_force'?: TimeInForceStrict;
|
|
35
36
|
/**
|
|
36
37
|
*
|
|
37
38
|
* @type {ManualTradeSymbol}
|
|
@@ -39,7 +40,7 @@ export interface ManualTrade {
|
|
|
39
40
|
*/
|
|
40
41
|
'symbol'?: ManualTradeSymbol;
|
|
41
42
|
/**
|
|
42
|
-
*
|
|
43
|
+
* The action describes the intent or side of a trade. This is either `BUY` or `SELL`
|
|
43
44
|
* @type {ActionStrict}
|
|
44
45
|
* @memberof ManualTrade
|
|
45
46
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @type NotionalValue
|
|
3
|
-
*
|
|
3
|
+
* Total notional amount for the order. Must be `null` if `units` is provided. Can only work with `Market` for `order_type` and `Day` for `time_in_force`. This is only available for certain brokerages. Please check the [integrations doc](https://snaptrade.notion.site/66793431ad0b416489eaabaf248d0afb?v=e7bbcbf9f272441593f93decde660687) for more information.
|
|
4
4
|
* @export
|
|
5
5
|
*/
|
|
6
6
|
export type NotionalValue = number | string;
|
|
@@ -7,13 +7,13 @@ import { TimeInForceStrict } from './time-in-force-strict';
|
|
|
7
7
|
*/
|
|
8
8
|
export interface OptionsPlaceOptionStrategyRequest {
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
10
|
+
* The type of order to place. - For `Limit` and `StopLimit` orders, the `price` field is required. - For `Stop` and `StopLimit` orders, the `stop` field is required.
|
|
11
11
|
* @type {OrderTypeStrict}
|
|
12
12
|
* @memberof OptionsPlaceOptionStrategyRequest
|
|
13
13
|
*/
|
|
14
14
|
'order_type': OrderTypeStrict;
|
|
15
15
|
/**
|
|
16
|
-
*
|
|
16
|
+
* The Time in Force type for the order. This field indicates how long the order will remain active before it is executed or expires. Here are the supported values: - `Day` - Day. The order is valid only for the trading day on which it is placed. - `GTC` - Good Til Canceled. The order is valid until it is executed or canceled. - `FOK` - Fill Or Kill. The order must be executed in its entirety immediately or be canceled completely.
|
|
17
17
|
* @type {TimeInForceStrict}
|
|
18
18
|
* @memberof OptionsPlaceOptionStrategyRequest
|
|
19
19
|
*/
|