snaptrade-typescript-sdk 9.0.35 → 9.0.37

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.
Files changed (36) hide show
  1. package/README.md +30 -22
  2. package/dist/api/account-information-api-generated.d.ts +2 -2
  3. package/dist/api/account-information-api-generated.js +1 -1
  4. package/dist/api/authentication-api-generated.d.ts +28 -28
  5. package/dist/api/authentication-api-generated.js +28 -28
  6. package/dist/api/connections-api-generated.d.ts +4 -4
  7. package/dist/api/connections-api-generated.js +2 -2
  8. package/dist/api/transactions-and-reporting-api-generated.d.ts +16 -16
  9. package/dist/api/transactions-and-reporting-api-generated.js +10 -10
  10. package/dist/browser.js +1 -1
  11. package/dist/configuration.js +1 -1
  12. package/dist/models/account-order-record-universal-symbol.d.ts +6 -6
  13. package/dist/models/account-order-record.d.ts +1 -1
  14. package/dist/models/account-simple.d.ts +4 -4
  15. package/dist/models/account.d.ts +7 -7
  16. package/dist/models/delete-user-response.d.ts +8 -2
  17. package/dist/models/index.d.ts +5 -2
  18. package/dist/models/index.js +5 -2
  19. package/dist/models/login-redirect-uri.d.ts +4 -4
  20. package/dist/models/snap-trade-login-user-request-body.d.ts +6 -6
  21. package/dist/models/{universal-symbol-currency.d.ts → symbol-currency.d.ts} +5 -5
  22. package/dist/models/{universal-symbol-exchange.d.ts → symbol-exchange.d.ts} +10 -10
  23. package/dist/models/symbol.d.ts +13 -13
  24. package/dist/models/underlying-symbol.d.ts +3 -3
  25. package/dist/models/universal-activity-currency.d.ts +25 -0
  26. package/dist/models/universal-activity-currency.js +2 -0
  27. package/dist/models/universal-activity-option-symbol.d.ts +52 -0
  28. package/dist/models/universal-activity-option-symbol.js +2 -0
  29. package/dist/models/universal-activity-symbol.d.ts +65 -0
  30. package/dist/models/universal-activity-symbol.js +2 -0
  31. package/dist/models/universal-activity.d.ts +40 -40
  32. package/dist/models/universal-symbol.d.ts +6 -6
  33. package/dist/models/user-idand-secret.d.ts +1 -1
  34. package/package.json +1 -1
  35. /package/dist/models/{universal-symbol-currency.js → symbol-currency.js} +0 -0
  36. /package/dist/models/{universal-symbol-exchange.js → symbol-exchange.js} +0 -0
@@ -1,7 +1,7 @@
1
1
  import { AccountSimple } from './account-simple';
2
- import { Currency } from './currency';
3
- import { OptionsSymbol } from './options-symbol';
4
- import { Symbol } from './symbol';
2
+ import { UniversalActivityCurrency } from './universal-activity-currency';
3
+ import { UniversalActivityOptionSymbol } from './universal-activity-option-symbol';
4
+ import { UniversalActivitySymbol } from './universal-activity-symbol';
5
5
  /**
6
6
  * A transaction or activity from an institution
7
7
  * @export
@@ -10,7 +10,7 @@ import { Symbol } from './symbol';
10
10
  export interface UniversalActivity {
11
11
  [key: string]: any;
12
12
  /**
13
- *
13
+ * Unique identifier for the transaction. This is the ID used to reference the transaction in SnapTrade. Please note that this ID _can_ change if the transaction is deleted and re-added. Under normal circumstances, SnapTrade does not delete transactions. The only time this would happen is if SnapTrade re-fetches and reprocesses the data from the brokerage, which is rare. If you require a stable ID, please let us know and we can work with you to provide one.
14
14
  * @type {string}
15
15
  * @memberof UniversalActivity
16
16
  */
@@ -23,92 +23,92 @@ export interface UniversalActivity {
23
23
  'account'?: AccountSimple;
24
24
  /**
25
25
  *
26
- * @type {number}
26
+ * @type {UniversalActivitySymbol}
27
27
  * @memberof UniversalActivity
28
28
  */
29
- 'amount'?: number | null;
29
+ 'symbol'?: UniversalActivitySymbol | null;
30
30
  /**
31
31
  *
32
- * @type {Currency}
32
+ * @type {UniversalActivityOptionSymbol}
33
33
  * @memberof UniversalActivity
34
34
  */
35
- 'currency'?: Currency;
35
+ 'option_symbol'?: UniversalActivityOptionSymbol | null;
36
36
  /**
37
- *
38
- * @type {string}
37
+ * The price of the security for the transaction. This is mostly applicable to `BUY`, `SELL`, and `DIVIDEND` transactions.
38
+ * @type {number}
39
39
  * @memberof UniversalActivity
40
40
  */
41
- 'description'?: string;
41
+ 'price'?: number;
42
42
  /**
43
- *
43
+ * The number of units of the security for the transaction. This is mostly applicable to `BUY`, `SELL`, and `DIVIDEND` transactions.
44
44
  * @type {number}
45
45
  * @memberof UniversalActivity
46
46
  */
47
- 'fee'?: number;
47
+ 'units'?: number;
48
48
  /**
49
- * The forex conversion rate involved in the transaction if provided by the brokerage. Used in cases where securities of one currency are purchased in a different currency, and the forex conversion is automatic. In those cases, price, amount and fee will be in the top level currency (activity -> currency)
49
+ * The amount of the transaction denominated in `currency`. This can be positive or negative. In general, transactions that positively affect the account balance (like sell, deposits, dividends, etc) will have a positive amount, while transactions that negatively affect the account balance (like buy, withdrawals, fees, etc) will have a negative amount.
50
50
  * @type {number}
51
51
  * @memberof UniversalActivity
52
52
  */
53
- 'fx_rate'?: number | null;
53
+ 'amount'?: number | null;
54
54
  /**
55
55
  *
56
- * @type {string}
56
+ * @type {UniversalActivityCurrency}
57
57
  * @memberof UniversalActivity
58
58
  */
59
- 'institution'?: string;
59
+ 'currency'?: UniversalActivityCurrency;
60
60
  /**
61
- * If an option transaction, then it\'s type (BUY_TO_OPEN, SELL_TO_CLOSE, etc), otherwise empty string
61
+ * A string representing the type of transaction. SnapTrade does a best effort to categorize the brokerage transaction types into a common set of values. Here are some of the most popular values: - BUY - SELL - DIVIDEND - CONTRIBUTION - WITHDRAWAL - REI - INTEREST - FEE
62
62
  * @type {string}
63
63
  * @memberof UniversalActivity
64
64
  */
65
- 'option_type'?: string;
65
+ 'type'?: string;
66
66
  /**
67
- *
68
- * @type {number}
67
+ * If an option `BUY` or `SELL` transaction, this further specifies the type of action. The possible values are: - BUY_TO_OPEN - BUY_TO_CLOSE - SELL_TO_OPEN - SELL_TO_CLOSE
68
+ * @type {string}
69
69
  * @memberof UniversalActivity
70
70
  */
71
- 'price'?: number;
71
+ 'option_type'?: string;
72
72
  /**
73
- *
73
+ * A human-readable description of the transaction. This is usually the brokerage\'s description of the transaction.
74
74
  * @type {string}
75
75
  * @memberof UniversalActivity
76
76
  */
77
- 'settlement_date'?: string;
77
+ 'description'?: string;
78
78
  /**
79
- * Reference ID from brokerage used to identify related transactions. For example if an order comprises of several transactions (buy, fee, fx), they can be grouped if they share the same external_reference_id
79
+ * The recorded time for the transaction. The granularity of this timestamp depends on the brokerage. Some brokerages provide the exact time of the transaction, while others provide only the date. Please check the [integrations page](https://snaptrade.notion.site/66793431ad0b416489eaabaf248d0afb?v=6fab8012ade6441fa0c6d9af9c55ce3a) for the specific brokerage to see the granularity of the timestamps. Note that even though the field is named `trade_date`, it can represent any type of transaction, not just trades.
80
80
  * @type {string}
81
81
  * @memberof UniversalActivity
82
82
  */
83
- 'external_reference_id'?: string | null;
83
+ 'trade_date'?: string | null;
84
84
  /**
85
- *
86
- * @type {Symbol}
85
+ * The date on which the transaction is settled.
86
+ * @type {string}
87
87
  * @memberof UniversalActivity
88
88
  */
89
- 'symbol'?: Symbol;
89
+ 'settlement_date'?: string;
90
90
  /**
91
- *
92
- * @type {OptionsSymbol}
91
+ * Any fee associated with the transaction if provided by the brokerage.
92
+ * @type {number}
93
93
  * @memberof UniversalActivity
94
94
  */
95
- 'option_symbol'?: OptionsSymbol;
95
+ 'fee'?: number;
96
96
  /**
97
- *
98
- * @type {string}
97
+ * The forex conversion rate involved in the transaction if provided by the brokerage. Used in cases where securities of one currency are purchased in a different currency, and the forex conversion is automatic. In those cases, price, amount and fee will be in the top level currency (activity -> currency)
98
+ * @type {number}
99
99
  * @memberof UniversalActivity
100
100
  */
101
- 'trade_date'?: string | null;
101
+ 'fx_rate'?: number | null;
102
102
  /**
103
- * Potential values include (but are not limited to) - DIVIDEND - BUY - SELL - CONTRIBUTION - WITHDRAWAL - EXTERNAL_ASSET_TRANSFER_IN - EXTERNAL_ASSET_TRANSFER_OUT - INTERNAL_CASH_TRANSFER_IN - INTERNAL_CASH_TRANSFER_OUT - INTERNAL_ASSET_TRANSFER_IN - INTERNAL_ASSET_TRANSFER_OUT - INTEREST - REBATE - GOV_GRANT - TAX - FEE - REI - FXT
103
+ * The institution that the transaction is associated with. This is usually the brokerage name.
104
104
  * @type {string}
105
105
  * @memberof UniversalActivity
106
106
  */
107
- 'type'?: string;
107
+ 'institution'?: string;
108
108
  /**
109
- * Usually but not necessarily an integer
110
- * @type {number}
109
+ * Reference ID from brokerage used to identify related transactions. For example if an order comprises of several transactions (buy, fee, fx), they can be grouped if they share the same `external_reference_id`
110
+ * @type {string}
111
111
  * @memberof UniversalActivity
112
112
  */
113
- 'units'?: number;
113
+ 'external_reference_id'?: string | null;
114
114
  }
@@ -1,8 +1,8 @@
1
1
  import { Currency } from './currency';
2
2
  import { SecurityType } from './security-type';
3
+ import { SymbolCurrency } from './symbol-currency';
4
+ import { SymbolExchange } from './symbol-exchange';
3
5
  import { SymbolFigiInstrument } from './symbol-figi-instrument';
4
- import { UniversalSymbolCurrency } from './universal-symbol-currency';
5
- import { UniversalSymbolExchange } from './universal-symbol-exchange';
6
6
  /**
7
7
  * Uniquely describes a single security + exchange combination across all brokerages.
8
8
  * @export
@@ -36,16 +36,16 @@ export interface UniversalSymbol {
36
36
  'description'?: string | null;
37
37
  /**
38
38
  *
39
- * @type {UniversalSymbolCurrency}
39
+ * @type {SymbolCurrency}
40
40
  * @memberof UniversalSymbol
41
41
  */
42
- 'currency': UniversalSymbolCurrency;
42
+ 'currency': SymbolCurrency;
43
43
  /**
44
44
  *
45
- * @type {UniversalSymbolExchange}
45
+ * @type {SymbolExchange}
46
46
  * @memberof UniversalSymbol
47
47
  */
48
- 'exchange'?: UniversalSymbolExchange;
48
+ 'exchange'?: SymbolExchange;
49
49
  /**
50
50
  *
51
51
  * @type {SecurityType}
@@ -11,7 +11,7 @@ export interface UserIDandSecret {
11
11
  */
12
12
  'userId'?: string;
13
13
  /**
14
- * SnapTrade User Secret randomly generated by SnapTrade. This is privileged information and if compromised, should be rotated via the SnapTrade API.
14
+ * SnapTrade User Secret randomly generated by SnapTrade. This is privileged information and if compromised, should be rotated via the [rotate user secret endpoint](/reference/Authentication/Authentication_resetSnapTradeUserSecret)
15
15
  * @type {string}
16
16
  * @memberof UserIDandSecret
17
17
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "snaptrade-typescript-sdk",
3
- "version": "9.0.35",
3
+ "version": "9.0.37",
4
4
  "description": "Client for SnapTrade",
5
5
  "author": "Konfig",
6
6
  "engines": {