snaptrade-typescript-sdk 9.0.34 → 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 +3 -3
- package/dist/models/account-sync-status.d.ts +1 -1
- package/dist/models/account.d.ts +12 -10
- 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 +1 -3
- package/dist/models/index.js +1 -3
- 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/snap-trade-holdings-account-account-id-balance.d.ts +0 -14
- package/dist/models/snap-trade-holdings-account-account-id-balance.js +0 -2
- package/dist/models/snap-trade-holdings-account-account-id.d.ts +0 -74
- package/dist/models/snap-trade-holdings-account-account-id.js +0 -2
- /package/dist/models/{amount.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>}
|
|
@@ -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,58 +1,60 @@
|
|
|
1
1
|
import { AccountBalance } from './account-balance';
|
|
2
2
|
import { AccountSyncStatus } from './account-sync-status';
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* A single brokerage account at a financial institution.
|
|
5
5
|
* @export
|
|
6
6
|
* @interface Account
|
|
7
7
|
*/
|
|
8
8
|
export interface Account {
|
|
9
9
|
[key: string]: any;
|
|
10
10
|
/**
|
|
11
|
-
*
|
|
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.
|
|
12
12
|
* @type {string}
|
|
13
13
|
* @memberof Account
|
|
14
14
|
*/
|
|
15
15
|
'id'?: string;
|
|
16
16
|
/**
|
|
17
|
-
*
|
|
17
|
+
* Unique identifier for the connection (brokerage authorization). This is the UUID used to reference the connection in SnapTrade.
|
|
18
18
|
* @type {string}
|
|
19
19
|
* @memberof Account
|
|
20
20
|
*/
|
|
21
21
|
'brokerage_authorization'?: string;
|
|
22
22
|
/**
|
|
23
|
-
*
|
|
23
|
+
* Portfolio Group ID. Portfolio Groups have been deprecated. Please contact support if you have a usecase for it.
|
|
24
24
|
* @type {string}
|
|
25
25
|
* @memberof Account
|
|
26
|
+
* @deprecated
|
|
26
27
|
*/
|
|
27
28
|
'portfolio_group'?: string;
|
|
28
29
|
/**
|
|
29
|
-
*
|
|
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.
|
|
30
31
|
* @type {string}
|
|
31
32
|
* @memberof Account
|
|
32
33
|
*/
|
|
33
|
-
'name'?: string;
|
|
34
|
+
'name'?: string | null;
|
|
34
35
|
/**
|
|
35
|
-
*
|
|
36
|
+
* The account number assigned by the financial institution.
|
|
36
37
|
* @type {string}
|
|
37
38
|
* @memberof Account
|
|
38
39
|
*/
|
|
39
40
|
'number'?: string;
|
|
40
41
|
/**
|
|
41
|
-
*
|
|
42
|
+
* The name of the financial institution that holds the account.
|
|
42
43
|
* @type {string}
|
|
43
44
|
* @memberof Account
|
|
44
45
|
*/
|
|
45
46
|
'institution_name'?: string;
|
|
46
47
|
/**
|
|
47
|
-
*
|
|
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.
|
|
48
49
|
* @type {string}
|
|
49
50
|
* @memberof Account
|
|
50
51
|
*/
|
|
51
52
|
'created_date'?: string;
|
|
52
53
|
/**
|
|
53
|
-
*
|
|
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.
|
|
54
55
|
* @type {{ [key: string]: any; }}
|
|
55
56
|
* @memberof Account
|
|
57
|
+
* @deprecated
|
|
56
58
|
*/
|
|
57
59
|
'meta'?: {
|
|
58
60
|
[key: string]: any;
|
|
@@ -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
|
@@ -10,9 +10,9 @@ export * from './account-order-record-universal-symbol';
|
|
|
10
10
|
export * from './account-simple';
|
|
11
11
|
export * from './account-sync-status';
|
|
12
12
|
export * from './action-strict';
|
|
13
|
-
export * from './amount';
|
|
14
13
|
export * from './authentication-login-snap-trade-user200-response';
|
|
15
14
|
export * from './balance';
|
|
15
|
+
export * from './balance-currency';
|
|
16
16
|
export * from './brokerage';
|
|
17
17
|
export * from './brokerage-authorization';
|
|
18
18
|
export * from './brokerage-authorization-disabled-confirmation';
|
|
@@ -70,8 +70,6 @@ export * from './position-symbol';
|
|
|
70
70
|
export * from './security-type';
|
|
71
71
|
export * from './session-event';
|
|
72
72
|
export * from './snap-trade-holdings-account';
|
|
73
|
-
export * from './snap-trade-holdings-account-account-id';
|
|
74
|
-
export * from './snap-trade-holdings-account-account-id-balance';
|
|
75
73
|
export * from './snap-trade-holdings-total-value';
|
|
76
74
|
export * from './snap-trade-login-user-request-body';
|
|
77
75
|
export * from './snap-trade-register-user-request-body';
|
package/dist/models/index.js
CHANGED
|
@@ -26,9 +26,9 @@ __exportStar(require("./account-order-record-universal-symbol"), exports);
|
|
|
26
26
|
__exportStar(require("./account-simple"), exports);
|
|
27
27
|
__exportStar(require("./account-sync-status"), exports);
|
|
28
28
|
__exportStar(require("./action-strict"), exports);
|
|
29
|
-
__exportStar(require("./amount"), exports);
|
|
30
29
|
__exportStar(require("./authentication-login-snap-trade-user200-response"), exports);
|
|
31
30
|
__exportStar(require("./balance"), exports);
|
|
31
|
+
__exportStar(require("./balance-currency"), exports);
|
|
32
32
|
__exportStar(require("./brokerage"), exports);
|
|
33
33
|
__exportStar(require("./brokerage-authorization"), exports);
|
|
34
34
|
__exportStar(require("./brokerage-authorization-disabled-confirmation"), exports);
|
|
@@ -86,8 +86,6 @@ __exportStar(require("./position-symbol"), exports);
|
|
|
86
86
|
__exportStar(require("./security-type"), exports);
|
|
87
87
|
__exportStar(require("./session-event"), exports);
|
|
88
88
|
__exportStar(require("./snap-trade-holdings-account"), exports);
|
|
89
|
-
__exportStar(require("./snap-trade-holdings-account-account-id"), exports);
|
|
90
|
-
__exportStar(require("./snap-trade-holdings-account-account-id-balance"), exports);
|
|
91
89
|
__exportStar(require("./snap-trade-holdings-total-value"), exports);
|
|
92
90
|
__exportStar(require("./snap-trade-login-user-request-body"), exports);
|
|
93
91
|
__exportStar(require("./snap-trade-register-user-request-body"), exports);
|
|
@@ -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
|
}
|
package/package.json
CHANGED
package/dist/models/amount.d.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Total value of the account, as reported by the brokerage
|
|
3
|
-
* @export
|
|
4
|
-
* @interface Amount
|
|
5
|
-
*/
|
|
6
|
-
export interface Amount {
|
|
7
|
-
/**
|
|
8
|
-
* Total value denominated in the currency of the `currency` field.
|
|
9
|
-
* @type {number}
|
|
10
|
-
* @memberof Amount
|
|
11
|
-
*/
|
|
12
|
-
'amount'?: number;
|
|
13
|
-
/**
|
|
14
|
-
* The ISO-4217 currency code for the amount.
|
|
15
|
-
* @type {string}
|
|
16
|
-
* @memberof Amount
|
|
17
|
-
*/
|
|
18
|
-
'currency'?: string;
|
|
19
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { AccountBalanceTotal } from './account-balance-total';
|
|
2
|
-
/**
|
|
3
|
-
*
|
|
4
|
-
* @export
|
|
5
|
-
* @interface SnapTradeHoldingsAccountAccountIdBalance
|
|
6
|
-
*/
|
|
7
|
-
export interface SnapTradeHoldingsAccountAccountIdBalance {
|
|
8
|
-
/**
|
|
9
|
-
*
|
|
10
|
-
* @type {AccountBalanceTotal}
|
|
11
|
-
* @memberof SnapTradeHoldingsAccountAccountIdBalance
|
|
12
|
-
*/
|
|
13
|
-
'total'?: AccountBalanceTotal | null;
|
|
14
|
-
}
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import { SnapTradeHoldingsAccountAccountIdBalance } from './snap-trade-holdings-account-account-id-balance';
|
|
2
|
-
/**
|
|
3
|
-
* A single brokerage account at a financial institution.
|
|
4
|
-
* @export
|
|
5
|
-
* @interface SnapTradeHoldingsAccountAccountId
|
|
6
|
-
*/
|
|
7
|
-
export interface SnapTradeHoldingsAccountAccountId {
|
|
8
|
-
[key: string]: any;
|
|
9
|
-
/**
|
|
10
|
-
* Unique identifier for the connected brokerage account. This is the UUID used to reference the account in SnapTrade.
|
|
11
|
-
* @type {string}
|
|
12
|
-
* @memberof SnapTradeHoldingsAccountAccountId
|
|
13
|
-
*/
|
|
14
|
-
'id'?: string;
|
|
15
|
-
/**
|
|
16
|
-
* Unique identifier for the connection (brokerage authorization). This is the UUID used to reference the connection in SnapTrade.
|
|
17
|
-
* @type {string}
|
|
18
|
-
* @memberof SnapTradeHoldingsAccountAccountId
|
|
19
|
-
*/
|
|
20
|
-
'brokerage_authorization'?: string;
|
|
21
|
-
/**
|
|
22
|
-
* Portfolio Group ID. Portfolio Groups have been deprecated. Please contact support if you have a usecase for it.
|
|
23
|
-
* @type {string}
|
|
24
|
-
* @memberof SnapTradeHoldingsAccountAccountId
|
|
25
|
-
* @deprecated
|
|
26
|
-
*/
|
|
27
|
-
'portfolio_group'?: string;
|
|
28
|
-
/**
|
|
29
|
-
* 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.
|
|
30
|
-
* @type {string}
|
|
31
|
-
* @memberof SnapTradeHoldingsAccountAccountId
|
|
32
|
-
*/
|
|
33
|
-
'name'?: string | null;
|
|
34
|
-
/**
|
|
35
|
-
* The account number assigned by the financial institution.
|
|
36
|
-
* @type {string}
|
|
37
|
-
* @memberof SnapTradeHoldingsAccountAccountId
|
|
38
|
-
*/
|
|
39
|
-
'number'?: string;
|
|
40
|
-
/**
|
|
41
|
-
* The name of the financial institution that holds the account.
|
|
42
|
-
* @type {string}
|
|
43
|
-
* @memberof SnapTradeHoldingsAccountAccountId
|
|
44
|
-
*/
|
|
45
|
-
'institution_name'?: string;
|
|
46
|
-
/**
|
|
47
|
-
*
|
|
48
|
-
* @type {SnapTradeHoldingsAccountAccountIdBalance}
|
|
49
|
-
* @memberof SnapTradeHoldingsAccountAccountId
|
|
50
|
-
*/
|
|
51
|
-
'balance'?: SnapTradeHoldingsAccountAccountIdBalance | null;
|
|
52
|
-
/**
|
|
53
|
-
* 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.
|
|
54
|
-
* @type {{ [key: string]: any; }}
|
|
55
|
-
* @memberof SnapTradeHoldingsAccountAccountId
|
|
56
|
-
* @deprecated
|
|
57
|
-
*/
|
|
58
|
-
'meta'?: {
|
|
59
|
-
[key: string]: any;
|
|
60
|
-
};
|
|
61
|
-
/**
|
|
62
|
-
* This field is deprecated.
|
|
63
|
-
* @type {Array<string>}
|
|
64
|
-
* @memberof SnapTradeHoldingsAccountAccountId
|
|
65
|
-
* @deprecated
|
|
66
|
-
*/
|
|
67
|
-
'cash_restrictions'?: Array<string>;
|
|
68
|
-
/**
|
|
69
|
-
* 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.
|
|
70
|
-
* @type {string}
|
|
71
|
-
* @memberof SnapTradeHoldingsAccountAccountId
|
|
72
|
-
*/
|
|
73
|
-
'created_date'?: string;
|
|
74
|
-
}
|
|
File without changes
|