snaptrade-typescript-sdk 9.0.33 → 9.0.35
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 +25 -20
- package/dist/api/account-information-api-generated.d.ts +40 -40
- package/dist/api/account-information-api-generated.js +36 -36
- package/dist/api/options-api-generated.d.ts +10 -10
- package/dist/api/options-api-generated.js +9 -9
- package/dist/browser.js +1 -1
- package/dist/configuration.js +1 -1
- package/dist/models/account-balance-total.d.ts +1 -1
- package/dist/models/account-holdings-account.d.ts +4 -4
- package/dist/models/account-order-record-option-symbol.d.ts +52 -0
- package/dist/models/account-order-record-universal-symbol.d.ts +73 -0
- package/dist/models/account-order-record.d.ts +22 -22
- package/dist/models/account-sync-status.d.ts +1 -1
- package/dist/models/account.d.ts +16 -14
- package/dist/models/balance-currency.d.ts +25 -0
- package/dist/models/balance.d.ts +3 -3
- package/dist/models/holdings-status.d.ts +4 -4
- package/dist/models/index.d.ts +3 -4
- package/dist/models/index.js +3 -4
- package/dist/models/monthly-dividends.d.ts +1 -1
- package/dist/models/net-contributions.d.ts +1 -1
- package/dist/models/order-type-strict.d.ts +1 -1
- package/dist/models/past-value.d.ts +1 -1
- package/dist/models/strategy-order-record.d.ts +1 -1
- package/dist/models/sub-period-return-rate.d.ts +2 -2
- package/dist/models/transactions-status.d.ts +6 -6
- package/package.json +1 -1
- package/dist/models/amount.d.ts +0 -19
- package/dist/models/cash-restriction.d.ts +0 -40
- package/dist/models/snap-trade-holdings-account-account-id-balance.d.ts +0 -14
- package/dist/models/snap-trade-holdings-account-account-id.d.ts +0 -75
- package/dist/models/snap-trade-holdings-account-account-id.js +0 -2
- /package/dist/models/{amount.js → account-order-record-option-symbol.js} +0 -0
- /package/dist/models/{cash-restriction.js → account-order-record-universal-symbol.js} +0 -0
- /package/dist/models/{snap-trade-holdings-account-account-id-balance.js → balance-currency.js} +0 -0
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.35/typescript" : param.userAgent;
|
|
36
36
|
this.formDataCtor = param.formDataCtor;
|
|
37
37
|
}
|
|
38
38
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Total value of this account (includes cash, equity, fixed income, etc)
|
|
2
|
+
* Total market value of this account (includes cash, equity, fixed income, etc). This value is directly obtained from the brokerage and should reflect the most accurate value of the account.
|
|
3
3
|
* @export
|
|
4
4
|
* @interface AccountBalanceTotal
|
|
5
5
|
*/
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { Account } from './account';
|
|
1
2
|
import { AccountOrderRecord } from './account-order-record';
|
|
2
3
|
import { Balance } from './balance';
|
|
3
4
|
import { OptionsPosition } from './options-position';
|
|
4
5
|
import { Position } from './position';
|
|
5
|
-
import { SnapTradeHoldingsAccountAccountId } from './snap-trade-holdings-account-account-id';
|
|
6
6
|
import { SnapTradeHoldingsTotalValue } from './snap-trade-holdings-total-value';
|
|
7
7
|
/**
|
|
8
8
|
* A wrapper object containing holdings information for a single account.
|
|
@@ -13,10 +13,10 @@ export interface AccountHoldingsAccount {
|
|
|
13
13
|
[key: string]: any;
|
|
14
14
|
/**
|
|
15
15
|
*
|
|
16
|
-
* @type {
|
|
16
|
+
* @type {Account}
|
|
17
17
|
* @memberof AccountHoldingsAccount
|
|
18
18
|
*/
|
|
19
|
-
'account'?:
|
|
19
|
+
'account'?: Account;
|
|
20
20
|
/**
|
|
21
21
|
* List of balances for the account. Each element of the list has a distinct currency. Some brokerages like Questrade [allows holding multiple currencies in the same account](https://www.questrade.com/learning/questrade-basics/balances-and-reports/understanding-your-account-balances).
|
|
22
22
|
* @type {Array<Balance>}
|
|
@@ -36,7 +36,7 @@ export interface AccountHoldingsAccount {
|
|
|
36
36
|
*/
|
|
37
37
|
'option_positions'?: Array<OptionsPosition> | null;
|
|
38
38
|
/**
|
|
39
|
-
* List of recent orders in the account, including both pending and executed orders.
|
|
39
|
+
* List of recent orders in the account, including both pending and executed orders. Note that option orders are included in this list. Option orders will have a null `universal_symbol` field and a non-null `option_symbol` field.
|
|
40
40
|
* @type {Array<AccountOrderRecord>}
|
|
41
41
|
* @memberof AccountHoldingsAccount
|
|
42
42
|
*/
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { UnderlyingSymbol } from './underlying-symbol';
|
|
2
|
+
/**
|
|
3
|
+
* Contains information about the option contract that the order is for. This field is only present for option orders. For stock/ETF/crypto/mutual fund orders, this field will be null and the `universal_symbol` field will be populated.
|
|
4
|
+
* @export
|
|
5
|
+
* @interface AccountOrderRecordOptionSymbol
|
|
6
|
+
*/
|
|
7
|
+
export interface AccountOrderRecordOptionSymbol {
|
|
8
|
+
/**
|
|
9
|
+
* Unique identifier for the option symbol within SnapTrade. This is the ID used to reference the symbol in SnapTrade API calls.
|
|
10
|
+
* @type {string}
|
|
11
|
+
* @memberof AccountOrderRecordOptionSymbol
|
|
12
|
+
*/
|
|
13
|
+
'id': string;
|
|
14
|
+
/**
|
|
15
|
+
* The [OCC symbol](https://en.wikipedia.org/wiki/Option_symbol) for the option.
|
|
16
|
+
* @type {string}
|
|
17
|
+
* @memberof AccountOrderRecordOptionSymbol
|
|
18
|
+
*/
|
|
19
|
+
'ticker': string;
|
|
20
|
+
/**
|
|
21
|
+
* The type of option. Either \"CALL\" or \"PUT\".
|
|
22
|
+
* @type {string}
|
|
23
|
+
* @memberof AccountOrderRecordOptionSymbol
|
|
24
|
+
*/
|
|
25
|
+
'option_type': AccountOrderRecordOptionSymbolOptionTypeEnum;
|
|
26
|
+
/**
|
|
27
|
+
* The option strike price.
|
|
28
|
+
* @type {number}
|
|
29
|
+
* @memberof AccountOrderRecordOptionSymbol
|
|
30
|
+
*/
|
|
31
|
+
'strike_price': number;
|
|
32
|
+
/**
|
|
33
|
+
* The option expiration date.
|
|
34
|
+
* @type {string}
|
|
35
|
+
* @memberof AccountOrderRecordOptionSymbol
|
|
36
|
+
*/
|
|
37
|
+
'expiration_date': string;
|
|
38
|
+
/**
|
|
39
|
+
* Whether the option is a mini option. Mini options have 10 underlying shares per contract instead of the standard 100.
|
|
40
|
+
* @type {boolean}
|
|
41
|
+
* @memberof AccountOrderRecordOptionSymbol
|
|
42
|
+
*/
|
|
43
|
+
'is_mini_option'?: boolean;
|
|
44
|
+
/**
|
|
45
|
+
*
|
|
46
|
+
* @type {UnderlyingSymbol}
|
|
47
|
+
* @memberof AccountOrderRecordOptionSymbol
|
|
48
|
+
*/
|
|
49
|
+
'underlying_symbol': UnderlyingSymbol;
|
|
50
|
+
}
|
|
51
|
+
type AccountOrderRecordOptionSymbolOptionTypeEnum = 'CALL' | 'PUT';
|
|
52
|
+
export {};
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { Currency } from './currency';
|
|
2
|
+
import { SecurityType } from './security-type';
|
|
3
|
+
import { SymbolFigiInstrument } from './symbol-figi-instrument';
|
|
4
|
+
import { UniversalSymbolCurrency } from './universal-symbol-currency';
|
|
5
|
+
import { UniversalSymbolExchange } from './universal-symbol-exchange';
|
|
6
|
+
/**
|
|
7
|
+
* Contains information about the security that the order is for. This field is only present for stock/ETF/crypto/mutual fund orders. For option orders, this field will be null and the `option_symbol` field will be populated.
|
|
8
|
+
* @export
|
|
9
|
+
* @interface AccountOrderRecordUniversalSymbol
|
|
10
|
+
*/
|
|
11
|
+
export interface AccountOrderRecordUniversalSymbol {
|
|
12
|
+
/**
|
|
13
|
+
* Unique identifier for the symbol within SnapTrade. This is the ID used to reference the symbol in SnapTrade API calls.
|
|
14
|
+
* @type {string}
|
|
15
|
+
* @memberof AccountOrderRecordUniversalSymbol
|
|
16
|
+
*/
|
|
17
|
+
'id': string;
|
|
18
|
+
/**
|
|
19
|
+
* The security\'s trading ticker symbol. For example \"AAPL\" for Apple Inc. We largely follow the [Yahoo Finance ticker format](https://help.yahoo.com/kb/SLN2310.html)(click on \"Yahoo Finance Market Coverage and Data Delays\"). For example, for securities traded on the Toronto Stock Exchange, the symbol has a \'.TO\' suffix. For securities traded on NASDAQ or NYSE, the symbol does not have a suffix.
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof AccountOrderRecordUniversalSymbol
|
|
22
|
+
*/
|
|
23
|
+
'symbol': string;
|
|
24
|
+
/**
|
|
25
|
+
* The raw symbol is `symbol` with the exchange suffix removed. For example, if `symbol` is \"VAB.TO\", then `raw_symbol` is \"VAB\".
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof AccountOrderRecordUniversalSymbol
|
|
28
|
+
*/
|
|
29
|
+
'raw_symbol': string;
|
|
30
|
+
/**
|
|
31
|
+
* A human-readable description of the security. This is usually the company name or ETF name.
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof AccountOrderRecordUniversalSymbol
|
|
34
|
+
*/
|
|
35
|
+
'description'?: string | null;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {UniversalSymbolCurrency}
|
|
39
|
+
* @memberof AccountOrderRecordUniversalSymbol
|
|
40
|
+
*/
|
|
41
|
+
'currency': UniversalSymbolCurrency;
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
* @type {UniversalSymbolExchange}
|
|
45
|
+
* @memberof AccountOrderRecordUniversalSymbol
|
|
46
|
+
*/
|
|
47
|
+
'exchange'?: UniversalSymbolExchange;
|
|
48
|
+
/**
|
|
49
|
+
*
|
|
50
|
+
* @type {SecurityType}
|
|
51
|
+
* @memberof AccountOrderRecordUniversalSymbol
|
|
52
|
+
*/
|
|
53
|
+
'type': SecurityType;
|
|
54
|
+
/**
|
|
55
|
+
* This field is deprecated and should not be used. Please reach out to SnapTrade support if you have a valid usecase for this.
|
|
56
|
+
* @type {Array<Currency>}
|
|
57
|
+
* @memberof AccountOrderRecordUniversalSymbol
|
|
58
|
+
* @deprecated
|
|
59
|
+
*/
|
|
60
|
+
'currencies': Array<Currency>;
|
|
61
|
+
/**
|
|
62
|
+
* This identifier is unique per security per trading venue. See section 1.4.1 of the [FIGI Standard](https://www.openfigi.com/assets/local/figi-allocation-rules.pdf) for more information. This value should be the same as the `figi_code` in the `figi_instrument` child property.
|
|
63
|
+
* @type {string}
|
|
64
|
+
* @memberof AccountOrderRecordUniversalSymbol
|
|
65
|
+
*/
|
|
66
|
+
'figi_code'?: string | null;
|
|
67
|
+
/**
|
|
68
|
+
*
|
|
69
|
+
* @type {SymbolFigiInstrument}
|
|
70
|
+
* @memberof AccountOrderRecordUniversalSymbol
|
|
71
|
+
*/
|
|
72
|
+
'figi_instrument'?: SymbolFigiInstrument | null;
|
|
73
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { AccountOrderRecordOptionSymbol } from './account-order-record-option-symbol';
|
|
1
2
|
import { AccountOrderRecordStatus } from './account-order-record-status';
|
|
2
|
-
import {
|
|
3
|
-
import { UniversalSymbol } from './universal-symbol';
|
|
3
|
+
import { AccountOrderRecordUniversalSymbol } from './account-order-record-universal-symbol';
|
|
4
4
|
/**
|
|
5
|
-
* Describes a single recent order in an account.
|
|
5
|
+
* 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.
|
|
6
6
|
* @export
|
|
7
7
|
* @interface AccountOrderRecord
|
|
8
8
|
*/
|
|
@@ -29,98 +29,98 @@ export interface AccountOrderRecord {
|
|
|
29
29
|
'symbol'?: string;
|
|
30
30
|
/**
|
|
31
31
|
*
|
|
32
|
-
* @type {
|
|
32
|
+
* @type {AccountOrderRecordUniversalSymbol}
|
|
33
33
|
* @memberof AccountOrderRecord
|
|
34
34
|
*/
|
|
35
|
-
'universal_symbol'?:
|
|
35
|
+
'universal_symbol'?: AccountOrderRecordUniversalSymbol;
|
|
36
36
|
/**
|
|
37
37
|
*
|
|
38
|
-
* @type {
|
|
38
|
+
* @type {AccountOrderRecordOptionSymbol}
|
|
39
39
|
* @memberof AccountOrderRecord
|
|
40
40
|
*/
|
|
41
|
-
'option_symbol'?:
|
|
41
|
+
'option_symbol'?: AccountOrderRecordOptionSymbol;
|
|
42
42
|
/**
|
|
43
|
-
*
|
|
43
|
+
* The action describes the intent or side of a trade. This is usually `BUY` or `SELL` but can include other potential values like the following depending on the specific brokerage. - BUY - SELL - BUY_COVER - SELL_SHORT - BUY_OPEN - BUY_CLOSE - SELL_OPEN - SELL_CLOSE
|
|
44
44
|
* @type {string}
|
|
45
45
|
* @memberof AccountOrderRecord
|
|
46
46
|
*/
|
|
47
47
|
'action'?: string;
|
|
48
48
|
/**
|
|
49
|
-
*
|
|
49
|
+
* The total number of shares or contracts of the order. This should be the sum of the filled, canceled, and open quantities. Can be a decimal number for fractional shares.
|
|
50
50
|
* @type {number}
|
|
51
51
|
* @memberof AccountOrderRecord
|
|
52
52
|
*/
|
|
53
53
|
'total_quantity'?: number | null;
|
|
54
54
|
/**
|
|
55
|
-
*
|
|
55
|
+
* The number of shares or contracts that are still open (waiting for execution). Can be a decimal number for fractional shares.
|
|
56
56
|
* @type {number}
|
|
57
57
|
* @memberof AccountOrderRecord
|
|
58
58
|
*/
|
|
59
59
|
'open_quantity'?: number | null;
|
|
60
60
|
/**
|
|
61
|
-
*
|
|
61
|
+
* The number of shares or contracts that have been canceled. Can be a decimal number for fractional shares.
|
|
62
62
|
* @type {number}
|
|
63
63
|
* @memberof AccountOrderRecord
|
|
64
64
|
*/
|
|
65
65
|
'canceled_quantity'?: number | null;
|
|
66
66
|
/**
|
|
67
|
-
*
|
|
67
|
+
* The number of shares or contracts that have been filled. Can be a decimal number for fractional shares.
|
|
68
68
|
* @type {number}
|
|
69
69
|
* @memberof AccountOrderRecord
|
|
70
70
|
*/
|
|
71
71
|
'filled_quantity'?: number | null;
|
|
72
72
|
/**
|
|
73
|
-
*
|
|
73
|
+
* The price at which the order was executed.
|
|
74
74
|
* @type {number}
|
|
75
75
|
* @memberof AccountOrderRecord
|
|
76
76
|
*/
|
|
77
77
|
'execution_price'?: number | null;
|
|
78
78
|
/**
|
|
79
|
-
*
|
|
79
|
+
* The limit price is maximum price one is willing to pay for a buy order or the minimum price one is willing to accept for a sell order. Should only apply to `Limit` and `StopLimit` orders.
|
|
80
80
|
* @type {number}
|
|
81
81
|
* @memberof AccountOrderRecord
|
|
82
82
|
*/
|
|
83
83
|
'limit_price'?: number | null;
|
|
84
84
|
/**
|
|
85
|
-
*
|
|
85
|
+
* The stop price is the price at which a stop order is triggered. Should only apply to `Stop` and `StopLimit` orders.
|
|
86
86
|
* @type {number}
|
|
87
87
|
* @memberof AccountOrderRecord
|
|
88
88
|
*/
|
|
89
89
|
'stop_price'?: number | null;
|
|
90
90
|
/**
|
|
91
|
-
*
|
|
91
|
+
* 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.
|
|
92
92
|
* @type {string}
|
|
93
93
|
* @memberof AccountOrderRecord
|
|
94
94
|
*/
|
|
95
95
|
'order_type'?: string | null;
|
|
96
96
|
/**
|
|
97
|
-
*
|
|
97
|
+
* The Time in Force type for the order. This field indicates how long the order will remain active before it is executed or expires. We try our best to map brokerage time in force values to the following. When mapping fails, we will return the brokerage\'s time in force value. - `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. - `IOC` - Immediate Or Cancel. The order must be executed immediately. Any portion of the order that cannot be filled immediately will be canceled. - `GTD` - Good Til Date. The order is valid until the specified date.
|
|
98
98
|
* @type {string}
|
|
99
99
|
* @memberof AccountOrderRecord
|
|
100
100
|
*/
|
|
101
101
|
'time_in_force'?: string;
|
|
102
102
|
/**
|
|
103
|
-
*
|
|
103
|
+
* The time the order was placed. This is the time the order was submitted to the brokerage.
|
|
104
104
|
* @type {string}
|
|
105
105
|
* @memberof AccountOrderRecord
|
|
106
106
|
*/
|
|
107
107
|
'time_placed'?: string;
|
|
108
108
|
/**
|
|
109
|
-
*
|
|
109
|
+
* The time the order was last updated in the brokerage system. This value is not always available from the brokerage.
|
|
110
110
|
* @type {string}
|
|
111
111
|
* @memberof AccountOrderRecord
|
|
112
112
|
*/
|
|
113
113
|
'time_updated'?: string | null;
|
|
114
114
|
/**
|
|
115
|
-
*
|
|
115
|
+
* The time the order was executed in the brokerage system. This value is not always available from the brokerage.
|
|
116
116
|
* @type {string}
|
|
117
117
|
* @memberof AccountOrderRecord
|
|
118
118
|
*/
|
|
119
119
|
'time_executed'?: string | null;
|
|
120
120
|
/**
|
|
121
|
-
*
|
|
121
|
+
* The time the order expires. This value is not always available from the brokerage.
|
|
122
122
|
* @type {string}
|
|
123
123
|
* @memberof AccountOrderRecord
|
|
124
124
|
*/
|
|
125
|
-
'expiry_date'?: string;
|
|
125
|
+
'expiry_date'?: string | null;
|
|
126
126
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { HoldingsStatus } from './holdings-status';
|
|
2
2
|
import { TransactionsStatus } from './transactions-status';
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* Contains status update for the account sync process between SnapTrade and the brokerage.
|
|
5
5
|
* @export
|
|
6
6
|
* @interface AccountSyncStatus
|
|
7
7
|
*/
|
package/dist/models/account.d.ts
CHANGED
|
@@ -1,69 +1,71 @@
|
|
|
1
1
|
import { AccountBalance } from './account-balance';
|
|
2
2
|
import { AccountSyncStatus } from './account-sync-status';
|
|
3
|
-
import { CashRestriction } from './cash-restriction';
|
|
4
3
|
/**
|
|
5
|
-
*
|
|
4
|
+
* A single brokerage account at a financial institution.
|
|
6
5
|
* @export
|
|
7
6
|
* @interface Account
|
|
8
7
|
*/
|
|
9
8
|
export interface Account {
|
|
10
9
|
[key: string]: any;
|
|
11
10
|
/**
|
|
12
|
-
*
|
|
11
|
+
* Unique identifier for the connected brokerage account. This is the UUID used to reference the account in SnapTrade. This ID should not change for as long as the connection stays active. If the connection is deleted and re-added, a new account ID will be generated. If you want a stable identifier for the account, use the `number` field.
|
|
13
12
|
* @type {string}
|
|
14
13
|
* @memberof Account
|
|
15
14
|
*/
|
|
16
15
|
'id'?: string;
|
|
17
16
|
/**
|
|
18
|
-
*
|
|
17
|
+
* Unique identifier for the connection (brokerage authorization). This is the UUID used to reference the connection in SnapTrade.
|
|
19
18
|
* @type {string}
|
|
20
19
|
* @memberof Account
|
|
21
20
|
*/
|
|
22
21
|
'brokerage_authorization'?: string;
|
|
23
22
|
/**
|
|
24
|
-
*
|
|
23
|
+
* Portfolio Group ID. Portfolio Groups have been deprecated. Please contact support if you have a usecase for it.
|
|
25
24
|
* @type {string}
|
|
26
25
|
* @memberof Account
|
|
26
|
+
* @deprecated
|
|
27
27
|
*/
|
|
28
28
|
'portfolio_group'?: string;
|
|
29
29
|
/**
|
|
30
|
-
*
|
|
30
|
+
* A display name for the account. Either assigned by the user or by the financial institution itself. For certain institutions, SnapTrade appends the institution name to the account name for clarity.
|
|
31
31
|
* @type {string}
|
|
32
32
|
* @memberof Account
|
|
33
33
|
*/
|
|
34
|
-
'name'?: string;
|
|
34
|
+
'name'?: string | null;
|
|
35
35
|
/**
|
|
36
|
-
*
|
|
36
|
+
* The account number assigned by the financial institution.
|
|
37
37
|
* @type {string}
|
|
38
38
|
* @memberof Account
|
|
39
39
|
*/
|
|
40
40
|
'number'?: string;
|
|
41
41
|
/**
|
|
42
|
-
*
|
|
42
|
+
* The name of the financial institution that holds the account.
|
|
43
43
|
* @type {string}
|
|
44
44
|
* @memberof Account
|
|
45
45
|
*/
|
|
46
46
|
'institution_name'?: string;
|
|
47
47
|
/**
|
|
48
|
-
*
|
|
48
|
+
* Timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format indicating when the account was created in SnapTrade. This is _not_ the account opening date at the financial institution.
|
|
49
49
|
* @type {string}
|
|
50
50
|
* @memberof Account
|
|
51
51
|
*/
|
|
52
52
|
'created_date'?: string;
|
|
53
53
|
/**
|
|
54
|
-
*
|
|
54
|
+
* Additional information about the account, such as account type, status, etc. This information is specific to the financial institution and there\'s no standard format for this data. Please use at your own risk.
|
|
55
55
|
* @type {{ [key: string]: any; }}
|
|
56
56
|
* @memberof Account
|
|
57
|
+
* @deprecated
|
|
57
58
|
*/
|
|
58
59
|
'meta'?: {
|
|
59
60
|
[key: string]: any;
|
|
60
61
|
};
|
|
61
62
|
/**
|
|
62
|
-
*
|
|
63
|
-
* @type {Array<
|
|
63
|
+
* This field is deprecated.
|
|
64
|
+
* @type {Array<string>}
|
|
64
65
|
* @memberof Account
|
|
66
|
+
* @deprecated
|
|
65
67
|
*/
|
|
66
|
-
'cash_restrictions'?: Array<
|
|
68
|
+
'cash_restrictions'?: Array<string>;
|
|
67
69
|
/**
|
|
68
70
|
*
|
|
69
71
|
* @type {AccountSyncStatus}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The currency of the balance. This applies to both `cash` and `buying_power`.
|
|
3
|
+
* @export
|
|
4
|
+
* @interface BalanceCurrency
|
|
5
|
+
*/
|
|
6
|
+
export interface BalanceCurrency {
|
|
7
|
+
/**
|
|
8
|
+
* Unique identifier for the currency. This is the UUID used to reference the currency in SnapTrade.
|
|
9
|
+
* @type {string}
|
|
10
|
+
* @memberof BalanceCurrency
|
|
11
|
+
*/
|
|
12
|
+
'id'?: string;
|
|
13
|
+
/**
|
|
14
|
+
* The ISO-4217 currency code for the currency.
|
|
15
|
+
* @type {string}
|
|
16
|
+
* @memberof BalanceCurrency
|
|
17
|
+
*/
|
|
18
|
+
'code'?: string;
|
|
19
|
+
/**
|
|
20
|
+
* A human-friendly name of the currency.
|
|
21
|
+
* @type {string}
|
|
22
|
+
* @memberof BalanceCurrency
|
|
23
|
+
*/
|
|
24
|
+
'name'?: string;
|
|
25
|
+
}
|
package/dist/models/balance.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BalanceCurrency } from './balance-currency';
|
|
2
2
|
/**
|
|
3
3
|
* Holds balance information for a single currency in an account.
|
|
4
4
|
* @export
|
|
@@ -8,10 +8,10 @@ export interface Balance {
|
|
|
8
8
|
[key: string]: any;
|
|
9
9
|
/**
|
|
10
10
|
*
|
|
11
|
-
* @type {
|
|
11
|
+
* @type {BalanceCurrency}
|
|
12
12
|
* @memberof Balance
|
|
13
13
|
*/
|
|
14
|
-
'currency'?:
|
|
14
|
+
'currency'?: BalanceCurrency;
|
|
15
15
|
/**
|
|
16
16
|
* The amount of available cash in the account denominated in the currency of the `currency` field.
|
|
17
17
|
* @type {number}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Status of account holdings sync
|
|
2
|
+
* Status of account holdings sync. SnapTrade syncs holdings from the brokerage under the following conditions: 1. Initial connection - SnapTrade syncs all holdings (positions, balances, recent orders, and transactions) immediately after the connection is established. 2. Daily sync - Once a day SnapTrade refreshes all holdings from the brokerage. 3. Manual sync - You can trigger a refresh of holdings with the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint.
|
|
3
3
|
* @export
|
|
4
4
|
* @interface HoldingsStatus
|
|
5
5
|
*/
|
|
6
6
|
export interface HoldingsStatus {
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
8
|
+
* Indicates if the initial sync of holdings has been completed. For accounts with a large number of positions/orders/transactions, the initial sync may take a while to complete.
|
|
9
9
|
* @type {boolean}
|
|
10
10
|
* @memberof HoldingsStatus
|
|
11
11
|
*/
|
|
12
12
|
'initial_sync_completed'?: boolean;
|
|
13
13
|
/**
|
|
14
|
-
*
|
|
14
|
+
* The last time holdings were successfully synced by SnapTrade.
|
|
15
15
|
* @type {string}
|
|
16
16
|
* @memberof HoldingsStatus
|
|
17
17
|
*/
|
|
18
|
-
'last_successful_sync'?: string
|
|
18
|
+
'last_successful_sync'?: string;
|
|
19
19
|
}
|
package/dist/models/index.d.ts
CHANGED
|
@@ -4,13 +4,15 @@ export * from './account-balance-total';
|
|
|
4
4
|
export * from './account-holdings';
|
|
5
5
|
export * from './account-holdings-account';
|
|
6
6
|
export * from './account-order-record';
|
|
7
|
+
export * from './account-order-record-option-symbol';
|
|
7
8
|
export * from './account-order-record-status';
|
|
9
|
+
export * from './account-order-record-universal-symbol';
|
|
8
10
|
export * from './account-simple';
|
|
9
11
|
export * from './account-sync-status';
|
|
10
12
|
export * from './action-strict';
|
|
11
|
-
export * from './amount';
|
|
12
13
|
export * from './authentication-login-snap-trade-user200-response';
|
|
13
14
|
export * from './balance';
|
|
15
|
+
export * from './balance-currency';
|
|
14
16
|
export * from './brokerage';
|
|
15
17
|
export * from './brokerage-authorization';
|
|
16
18
|
export * from './brokerage-authorization-disabled-confirmation';
|
|
@@ -18,7 +20,6 @@ export * from './brokerage-authorization-refresh-confirmation';
|
|
|
18
20
|
export * from './brokerage-authorization-type-read-only';
|
|
19
21
|
export * from './brokerage-authorization-type-read-only-brokerage';
|
|
20
22
|
export * from './brokerage-type';
|
|
21
|
-
export * from './cash-restriction';
|
|
22
23
|
export * from './connections-session-events200-response-inner';
|
|
23
24
|
export * from './currency';
|
|
24
25
|
export * from './delete-user-response';
|
|
@@ -69,8 +70,6 @@ export * from './position-symbol';
|
|
|
69
70
|
export * from './security-type';
|
|
70
71
|
export * from './session-event';
|
|
71
72
|
export * from './snap-trade-holdings-account';
|
|
72
|
-
export * from './snap-trade-holdings-account-account-id';
|
|
73
|
-
export * from './snap-trade-holdings-account-account-id-balance';
|
|
74
73
|
export * from './snap-trade-holdings-total-value';
|
|
75
74
|
export * from './snap-trade-login-user-request-body';
|
|
76
75
|
export * from './snap-trade-register-user-request-body';
|
package/dist/models/index.js
CHANGED
|
@@ -20,13 +20,15 @@ __exportStar(require("./account-balance-total"), exports);
|
|
|
20
20
|
__exportStar(require("./account-holdings"), exports);
|
|
21
21
|
__exportStar(require("./account-holdings-account"), exports);
|
|
22
22
|
__exportStar(require("./account-order-record"), exports);
|
|
23
|
+
__exportStar(require("./account-order-record-option-symbol"), exports);
|
|
23
24
|
__exportStar(require("./account-order-record-status"), exports);
|
|
25
|
+
__exportStar(require("./account-order-record-universal-symbol"), exports);
|
|
24
26
|
__exportStar(require("./account-simple"), exports);
|
|
25
27
|
__exportStar(require("./account-sync-status"), exports);
|
|
26
28
|
__exportStar(require("./action-strict"), exports);
|
|
27
|
-
__exportStar(require("./amount"), exports);
|
|
28
29
|
__exportStar(require("./authentication-login-snap-trade-user200-response"), exports);
|
|
29
30
|
__exportStar(require("./balance"), exports);
|
|
31
|
+
__exportStar(require("./balance-currency"), exports);
|
|
30
32
|
__exportStar(require("./brokerage"), exports);
|
|
31
33
|
__exportStar(require("./brokerage-authorization"), exports);
|
|
32
34
|
__exportStar(require("./brokerage-authorization-disabled-confirmation"), exports);
|
|
@@ -34,7 +36,6 @@ __exportStar(require("./brokerage-authorization-refresh-confirmation"), exports)
|
|
|
34
36
|
__exportStar(require("./brokerage-authorization-type-read-only"), exports);
|
|
35
37
|
__exportStar(require("./brokerage-authorization-type-read-only-brokerage"), exports);
|
|
36
38
|
__exportStar(require("./brokerage-type"), exports);
|
|
37
|
-
__exportStar(require("./cash-restriction"), exports);
|
|
38
39
|
__exportStar(require("./connections-session-events200-response-inner"), exports);
|
|
39
40
|
__exportStar(require("./currency"), exports);
|
|
40
41
|
__exportStar(require("./delete-user-response"), exports);
|
|
@@ -85,8 +86,6 @@ __exportStar(require("./position-symbol"), exports);
|
|
|
85
86
|
__exportStar(require("./security-type"), exports);
|
|
86
87
|
__exportStar(require("./session-event"), exports);
|
|
87
88
|
__exportStar(require("./snap-trade-holdings-account"), exports);
|
|
88
|
-
__exportStar(require("./snap-trade-holdings-account-account-id"), exports);
|
|
89
|
-
__exportStar(require("./snap-trade-holdings-account-account-id-balance"), exports);
|
|
90
89
|
__exportStar(require("./snap-trade-holdings-total-value"), exports);
|
|
91
90
|
__exportStar(require("./snap-trade-login-user-request-body"), exports);
|
|
92
91
|
__exportStar(require("./snap-trade-register-user-request-body"), exports);
|
|
@@ -7,7 +7,7 @@ import { DividendAtDate } from './dividend-at-date';
|
|
|
7
7
|
export interface MonthlyDividends {
|
|
8
8
|
[key: string]: any;
|
|
9
9
|
/**
|
|
10
|
-
* Date used to specify timeframe for a reporting call (in YYYY-MM-DD format)
|
|
10
|
+
* Date used to specify timeframe for a reporting call (in YYYY-MM-DD format). These dates are inclusive.
|
|
11
11
|
* @type {string}
|
|
12
12
|
* @memberof MonthlyDividends
|
|
13
13
|
*/
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
export interface NetContributions {
|
|
7
7
|
[key: string]: any;
|
|
8
8
|
/**
|
|
9
|
-
* Date used to specify timeframe for a reporting call (in YYYY-MM-DD format)
|
|
9
|
+
* Date used to specify timeframe for a reporting call (in YYYY-MM-DD format). These dates are inclusive.
|
|
10
10
|
* @type {string}
|
|
11
11
|
* @memberof NetContributions
|
|
12
12
|
*/
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
export interface PastValue {
|
|
7
7
|
[key: string]: any;
|
|
8
8
|
/**
|
|
9
|
-
* Date used to specify timeframe for a reporting call (in YYYY-MM-DD format)
|
|
9
|
+
* Date used to specify timeframe for a reporting call (in YYYY-MM-DD format). These dates are inclusive.
|
|
10
10
|
* @type {string}
|
|
11
11
|
* @memberof PastValue
|
|
12
12
|
*/
|
|
@@ -37,7 +37,7 @@ export interface StrategyOrderRecord {
|
|
|
37
37
|
*/
|
|
38
38
|
'closed_quantity'?: number;
|
|
39
39
|
/**
|
|
40
|
-
* Order Type potential values include (but are not limited to) - Limit - Market - StopLimit -
|
|
40
|
+
* Order Type potential values include (but are not limited to) - Limit - Market - StopLimit - Stop
|
|
41
41
|
* @type {string}
|
|
42
42
|
* @memberof StrategyOrderRecord
|
|
43
43
|
*/
|
|
@@ -6,13 +6,13 @@
|
|
|
6
6
|
export interface SubPeriodReturnRate {
|
|
7
7
|
[key: string]: any;
|
|
8
8
|
/**
|
|
9
|
-
* Date used to specify timeframe for a reporting call (in YYYY-MM-DD format)
|
|
9
|
+
* Date used to specify timeframe for a reporting call (in YYYY-MM-DD format). These dates are inclusive.
|
|
10
10
|
* @type {string}
|
|
11
11
|
* @memberof SubPeriodReturnRate
|
|
12
12
|
*/
|
|
13
13
|
'periodStart'?: string;
|
|
14
14
|
/**
|
|
15
|
-
* Date used to specify timeframe for a reporting call (in YYYY-MM-DD format)
|
|
15
|
+
* Date used to specify timeframe for a reporting call (in YYYY-MM-DD format). These dates are inclusive.
|
|
16
16
|
* @type {string}
|
|
17
17
|
* @memberof SubPeriodReturnRate
|
|
18
18
|
*/
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Status of account transaction sync
|
|
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://snaptrade.notion.site/66793431ad0b416489eaabaf248d0afb?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 retrigger an incremental sync of transactions with the [manual refresh](/reference/Connections/Connections_refreshBrokerageAuthorization) endpoint.
|
|
3
3
|
* @export
|
|
4
4
|
* @interface TransactionsStatus
|
|
5
5
|
*/
|
|
6
6
|
export interface TransactionsStatus {
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
8
|
+
* Indicates if the initial sync of transactions has been completed. For accounts with a large number of transactions, the initial sync may take a while to complete.
|
|
9
9
|
* @type {boolean}
|
|
10
10
|
* @memberof TransactionsStatus
|
|
11
11
|
*/
|
|
12
12
|
'initial_sync_completed'?: boolean;
|
|
13
13
|
/**
|
|
14
|
-
*
|
|
14
|
+
* All transactions up to this date have been successfully synced. Please note that this is not the date of the last transaction, nor the last time SnapTrade attempted to sync transactions.
|
|
15
15
|
* @type {string}
|
|
16
16
|
* @memberof TransactionsStatus
|
|
17
17
|
*/
|
|
18
|
-
'last_successful_sync'?: string
|
|
18
|
+
'last_successful_sync'?: string;
|
|
19
19
|
/**
|
|
20
|
-
*
|
|
20
|
+
* The date of the first transaction in the account known to SnapTrade. It\'s possible that the account has transactions before this date, but they are not known to SnapTrade.
|
|
21
21
|
* @type {string}
|
|
22
22
|
* @memberof TransactionsStatus
|
|
23
23
|
*/
|
|
24
|
-
'first_transaction_date'?: string
|
|
24
|
+
'first_transaction_date'?: string;
|
|
25
25
|
}
|