snaptrade-typescript-sdk 9.0.76 → 9.0.78

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.
@@ -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.76/typescript" : param.userAgent;
35
+ this.userAgent = param.userAgent === undefined ? "Konfig/9.0.78/typescript" : param.userAgent;
36
36
  this.formDataCtor = param.formDataCtor;
37
37
  }
38
38
  /**
@@ -1,25 +1,25 @@
1
1
  /**
2
2
  * The currency in which the transaction `price` and `amount` is denominated.
3
3
  * @export
4
- * @interface UniversalActivityCurrency
4
+ * @interface AccountUniversalActivityCurrency
5
5
  */
6
- export interface UniversalActivityCurrency {
6
+ export interface AccountUniversalActivityCurrency {
7
7
  /**
8
8
  * Unique identifier for the currency. This is the UUID used to reference the currency in SnapTrade.
9
9
  * @type {string}
10
- * @memberof UniversalActivityCurrency
10
+ * @memberof AccountUniversalActivityCurrency
11
11
  */
12
12
  'id'?: string;
13
13
  /**
14
14
  * The ISO-4217 currency code for the currency.
15
15
  * @type {string}
16
- * @memberof UniversalActivityCurrency
16
+ * @memberof AccountUniversalActivityCurrency
17
17
  */
18
18
  'code'?: string;
19
19
  /**
20
20
  * A human-friendly name of the currency.
21
21
  * @type {string}
22
- * @memberof UniversalActivityCurrency
22
+ * @memberof AccountUniversalActivityCurrency
23
23
  */
24
24
  'name'?: string;
25
25
  }
@@ -2,51 +2,51 @@ import { UnderlyingSymbol } from './underlying-symbol';
2
2
  /**
3
3
  * The option security for the transaction. The field is `null` if the transaction is not related to an option security (like a deposit, withdrawal, fee, etc). SnapTrade does a best effort to map the brokerage\'s option symbol. In cases where the brokerage option symbol is not recognized, the field will be set to `null`.
4
4
  * @export
5
- * @interface UniversalActivityOptionSymbol
5
+ * @interface AccountUniversalActivityOptionSymbol
6
6
  */
7
- export interface UniversalActivityOptionSymbol {
7
+ export interface AccountUniversalActivityOptionSymbol {
8
8
  /**
9
9
  * Unique identifier for the option symbol within SnapTrade. This is the ID used to reference the symbol in SnapTrade API calls.
10
10
  * @type {string}
11
- * @memberof UniversalActivityOptionSymbol
11
+ * @memberof AccountUniversalActivityOptionSymbol
12
12
  */
13
13
  'id': string;
14
14
  /**
15
15
  * The [OCC symbol](https://en.wikipedia.org/wiki/Option_symbol) for the option.
16
16
  * @type {string}
17
- * @memberof UniversalActivityOptionSymbol
17
+ * @memberof AccountUniversalActivityOptionSymbol
18
18
  */
19
19
  'ticker': string;
20
20
  /**
21
21
  * The type of option. Either \"CALL\" or \"PUT\".
22
22
  * @type {string}
23
- * @memberof UniversalActivityOptionSymbol
23
+ * @memberof AccountUniversalActivityOptionSymbol
24
24
  */
25
- 'option_type': UniversalActivityOptionSymbolOptionTypeEnum;
25
+ 'option_type': AccountUniversalActivityOptionSymbolOptionTypeEnum;
26
26
  /**
27
27
  * The option strike price.
28
28
  * @type {number}
29
- * @memberof UniversalActivityOptionSymbol
29
+ * @memberof AccountUniversalActivityOptionSymbol
30
30
  */
31
31
  'strike_price': number;
32
32
  /**
33
33
  * The option expiration date.
34
34
  * @type {string}
35
- * @memberof UniversalActivityOptionSymbol
35
+ * @memberof AccountUniversalActivityOptionSymbol
36
36
  */
37
37
  'expiration_date': string;
38
38
  /**
39
39
  * Whether the option is a mini option. Mini options have 10 underlying shares per contract instead of the standard 100.
40
40
  * @type {boolean}
41
- * @memberof UniversalActivityOptionSymbol
41
+ * @memberof AccountUniversalActivityOptionSymbol
42
42
  */
43
43
  'is_mini_option'?: boolean;
44
44
  /**
45
45
  *
46
46
  * @type {UnderlyingSymbol}
47
- * @memberof UniversalActivityOptionSymbol
47
+ * @memberof AccountUniversalActivityOptionSymbol
48
48
  */
49
49
  'underlying_symbol': UnderlyingSymbol;
50
50
  }
51
- type UniversalActivityOptionSymbolOptionTypeEnum = 'CALL' | 'PUT';
51
+ type AccountUniversalActivityOptionSymbolOptionTypeEnum = 'CALL' | 'PUT';
52
52
  export {};
@@ -5,61 +5,61 @@ import { SymbolFigiInstrument } from './symbol-figi-instrument';
5
5
  /**
6
6
  * The security for the transaction. The field is `null` if the transaction is not related to a security (like a deposit, withdrawal, fee, etc). SnapTrade does a best effort to map the brokerage\'s symbol. In cases where the brokerage symbol is not recognized, the field will be set to `null`.
7
7
  * @export
8
- * @interface UniversalActivitySymbol
8
+ * @interface AccountUniversalActivitySymbol
9
9
  */
10
- export interface UniversalActivitySymbol {
10
+ export interface AccountUniversalActivitySymbol {
11
11
  /**
12
12
  * Unique identifier for the symbol within SnapTrade. This is the ID used to reference the symbol in SnapTrade API calls.
13
13
  * @type {string}
14
- * @memberof UniversalActivitySymbol
14
+ * @memberof AccountUniversalActivitySymbol
15
15
  */
16
16
  'id'?: string;
17
17
  /**
18
18
  * 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.
19
19
  * @type {string}
20
- * @memberof UniversalActivitySymbol
20
+ * @memberof AccountUniversalActivitySymbol
21
21
  */
22
22
  'symbol'?: string;
23
23
  /**
24
24
  * The raw symbol is `symbol` with the exchange suffix removed. For example, if `symbol` is \"VAB.TO\", then `raw_symbol` is \"VAB\".
25
25
  * @type {string}
26
- * @memberof UniversalActivitySymbol
26
+ * @memberof AccountUniversalActivitySymbol
27
27
  */
28
28
  'raw_symbol'?: string;
29
29
  /**
30
30
  * A human-readable description of the security. This is usually the company name or ETF name.
31
31
  * @type {string}
32
- * @memberof UniversalActivitySymbol
32
+ * @memberof AccountUniversalActivitySymbol
33
33
  */
34
34
  'description'?: string | null;
35
35
  /**
36
36
  *
37
37
  * @type {SymbolCurrency}
38
- * @memberof UniversalActivitySymbol
38
+ * @memberof AccountUniversalActivitySymbol
39
39
  */
40
40
  'currency'?: SymbolCurrency;
41
41
  /**
42
42
  *
43
43
  * @type {SymbolExchange}
44
- * @memberof UniversalActivitySymbol
44
+ * @memberof AccountUniversalActivitySymbol
45
45
  */
46
46
  'exchange'?: SymbolExchange;
47
47
  /**
48
48
  *
49
49
  * @type {SecurityType}
50
- * @memberof UniversalActivitySymbol
50
+ * @memberof AccountUniversalActivitySymbol
51
51
  */
52
52
  'type'?: SecurityType;
53
53
  /**
54
54
  * 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.
55
55
  * @type {string}
56
- * @memberof UniversalActivitySymbol
56
+ * @memberof AccountUniversalActivitySymbol
57
57
  */
58
58
  'figi_code'?: string | null;
59
59
  /**
60
60
  *
61
61
  * @type {SymbolFigiInstrument}
62
- * @memberof UniversalActivitySymbol
62
+ * @memberof AccountUniversalActivitySymbol
63
63
  */
64
64
  'figi_instrument'?: SymbolFigiInstrument | null;
65
65
  }
@@ -0,0 +1,107 @@
1
+ import { AccountUniversalActivityCurrency } from './account-universal-activity-currency';
2
+ import { AccountUniversalActivityOptionSymbol } from './account-universal-activity-option-symbol';
3
+ import { AccountUniversalActivitySymbol } from './account-universal-activity-symbol';
4
+ /**
5
+ * A transaction or activity from an institution
6
+ * @export
7
+ * @interface AccountUniversalActivity
8
+ */
9
+ export interface AccountUniversalActivity {
10
+ [key: string]: any;
11
+ /**
12
+ * 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.
13
+ * @type {string}
14
+ * @memberof AccountUniversalActivity
15
+ */
16
+ 'id'?: string;
17
+ /**
18
+ *
19
+ * @type {AccountUniversalActivitySymbol}
20
+ * @memberof AccountUniversalActivity
21
+ */
22
+ 'symbol'?: AccountUniversalActivitySymbol | null;
23
+ /**
24
+ *
25
+ * @type {AccountUniversalActivityOptionSymbol}
26
+ * @memberof AccountUniversalActivity
27
+ */
28
+ 'option_symbol'?: AccountUniversalActivityOptionSymbol | null;
29
+ /**
30
+ * The price of the security for the transaction. This is mostly applicable to `BUY`, `SELL`, and `DIVIDEND` transactions.
31
+ * @type {number}
32
+ * @memberof AccountUniversalActivity
33
+ */
34
+ 'price'?: number;
35
+ /**
36
+ * The number of units of the security for the transaction. This is mostly applicable to `BUY`, `SELL`, and `DIVIDEND` transactions.
37
+ * @type {number}
38
+ * @memberof AccountUniversalActivity
39
+ */
40
+ 'units'?: number;
41
+ /**
42
+ * 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.
43
+ * @type {number}
44
+ * @memberof AccountUniversalActivity
45
+ */
46
+ 'amount'?: number | null;
47
+ /**
48
+ *
49
+ * @type {AccountUniversalActivityCurrency}
50
+ * @memberof AccountUniversalActivity
51
+ */
52
+ 'currency'?: AccountUniversalActivityCurrency;
53
+ /**
54
+ * 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` - Asset bought. - `SELL` - Asset sold. - `DIVIDEND` - Dividend payout. - `CONTRIBUTION` - Cash contribution. - `WITHDRAWAL` - Cash withdrawal. - `REI` - Dividend reinvestment. - `INTEREST` - Interest deposited into the account. - `FEE` - Fee withdrawn from the account. - `OPTIONEXPIRATION` - Option expiration event. `option_symbol` contains the related option contract info. - `OPTIONASSIGNMENT` - Option assignment event. `option_symbol` contains the related option contract info. - `OPTIONEXERCISE` - Option exercise event. `option_symbol` contains the related option contract info.
55
+ * @type {string}
56
+ * @memberof AccountUniversalActivity
57
+ */
58
+ 'type'?: string;
59
+ /**
60
+ * 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
61
+ * @type {string}
62
+ * @memberof AccountUniversalActivity
63
+ */
64
+ 'option_type'?: string;
65
+ /**
66
+ * A human-readable description of the transaction. This is usually the brokerage\'s description of the transaction.
67
+ * @type {string}
68
+ * @memberof AccountUniversalActivity
69
+ */
70
+ 'description'?: string;
71
+ /**
72
+ * 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.
73
+ * @type {string}
74
+ * @memberof AccountUniversalActivity
75
+ */
76
+ 'trade_date'?: string | null;
77
+ /**
78
+ * The date on which the transaction is settled.
79
+ * @type {string}
80
+ * @memberof AccountUniversalActivity
81
+ */
82
+ 'settlement_date'?: string;
83
+ /**
84
+ * Any fee associated with the transaction if provided by the brokerage.
85
+ * @type {number}
86
+ * @memberof AccountUniversalActivity
87
+ */
88
+ 'fee'?: number;
89
+ /**
90
+ * 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)
91
+ * @type {number}
92
+ * @memberof AccountUniversalActivity
93
+ */
94
+ 'fx_rate'?: number | null;
95
+ /**
96
+ * The institution that the transaction is associated with. This is usually the brokerage name.
97
+ * @type {string}
98
+ * @memberof AccountUniversalActivity
99
+ */
100
+ 'institution'?: string;
101
+ /**
102
+ * 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`
103
+ * @type {string}
104
+ * @memberof AccountUniversalActivity
105
+ */
106
+ 'external_reference_id'?: string | null;
107
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -9,6 +9,10 @@ export * from './account-order-record-status';
9
9
  export * from './account-order-record-universal-symbol';
10
10
  export * from './account-simple';
11
11
  export * from './account-sync-status';
12
+ export * from './account-universal-activity';
13
+ export * from './account-universal-activity-currency';
14
+ export * from './account-universal-activity-option-symbol';
15
+ export * from './account-universal-activity-symbol';
12
16
  export * from './action-strict';
13
17
  export * from './action-strict-with-options';
14
18
  export * from './authentication-login-snap-trade-user200-response';
@@ -68,6 +72,8 @@ export * from './options-position';
68
72
  export * from './options-position-currency';
69
73
  export * from './options-symbol';
70
74
  export * from './order-type-strict';
75
+ export * from './paginated-universal-activity';
76
+ export * from './pagination-details';
71
77
  export * from './partner-data';
72
78
  export * from './past-value';
73
79
  export * from './performance-custom';
@@ -103,9 +109,6 @@ export * from './underlying-symbol';
103
109
  export * from './underlying-symbol-exchange';
104
110
  export * from './underlying-symbol-type';
105
111
  export * from './universal-activity';
106
- export * from './universal-activity-currency';
107
- export * from './universal-activity-option-symbol';
108
- export * from './universal-activity-symbol';
109
112
  export * from './universal-symbol';
110
113
  export * from './user-idand-secret';
111
114
  export * from './validated-trade-body';
@@ -25,6 +25,10 @@ __exportStar(require("./account-order-record-status"), exports);
25
25
  __exportStar(require("./account-order-record-universal-symbol"), exports);
26
26
  __exportStar(require("./account-simple"), exports);
27
27
  __exportStar(require("./account-sync-status"), exports);
28
+ __exportStar(require("./account-universal-activity"), exports);
29
+ __exportStar(require("./account-universal-activity-currency"), exports);
30
+ __exportStar(require("./account-universal-activity-option-symbol"), exports);
31
+ __exportStar(require("./account-universal-activity-symbol"), exports);
28
32
  __exportStar(require("./action-strict"), exports);
29
33
  __exportStar(require("./action-strict-with-options"), exports);
30
34
  __exportStar(require("./authentication-login-snap-trade-user200-response"), exports);
@@ -84,6 +88,8 @@ __exportStar(require("./options-position"), exports);
84
88
  __exportStar(require("./options-position-currency"), exports);
85
89
  __exportStar(require("./options-symbol"), exports);
86
90
  __exportStar(require("./order-type-strict"), exports);
91
+ __exportStar(require("./paginated-universal-activity"), exports);
92
+ __exportStar(require("./pagination-details"), exports);
87
93
  __exportStar(require("./partner-data"), exports);
88
94
  __exportStar(require("./past-value"), exports);
89
95
  __exportStar(require("./performance-custom"), exports);
@@ -119,9 +125,6 @@ __exportStar(require("./underlying-symbol"), exports);
119
125
  __exportStar(require("./underlying-symbol-exchange"), exports);
120
126
  __exportStar(require("./underlying-symbol-type"), exports);
121
127
  __exportStar(require("./universal-activity"), exports);
122
- __exportStar(require("./universal-activity-currency"), exports);
123
- __exportStar(require("./universal-activity-option-symbol"), exports);
124
- __exportStar(require("./universal-activity-symbol"), exports);
125
128
  __exportStar(require("./universal-symbol"), exports);
126
129
  __exportStar(require("./user-idand-secret"), exports);
127
130
  __exportStar(require("./validated-trade-body"), exports);
@@ -0,0 +1,22 @@
1
+ import { AccountUniversalActivity } from './account-universal-activity';
2
+ import { PaginationDetails } from './pagination-details';
3
+ /**
4
+ * A paginated list of UniversalActivity objects.
5
+ * @export
6
+ * @interface PaginatedUniversalActivity
7
+ */
8
+ export interface PaginatedUniversalActivity {
9
+ [key: string]: any;
10
+ /**
11
+ *
12
+ * @type {Array<AccountUniversalActivity>}
13
+ * @memberof PaginatedUniversalActivity
14
+ */
15
+ 'data'?: Array<AccountUniversalActivity>;
16
+ /**
17
+ *
18
+ * @type {PaginationDetails}
19
+ * @memberof PaginatedUniversalActivity
20
+ */
21
+ 'pagination'?: PaginationDetails;
22
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Details about the pagination of the results.
3
+ * @export
4
+ * @interface PaginationDetails
5
+ */
6
+ export interface PaginationDetails {
7
+ [key: string]: any;
8
+ /**
9
+ * The starting point of the paginated results.
10
+ * @type {number}
11
+ * @memberof PaginationDetails
12
+ */
13
+ 'offset'?: number;
14
+ /**
15
+ * The maximum number of items to return in the response.
16
+ * @type {number}
17
+ * @memberof PaginationDetails
18
+ */
19
+ 'limit'?: number;
20
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,7 +1,7 @@
1
1
  import { AccountSimple } from './account-simple';
2
- import { UniversalActivityCurrency } from './universal-activity-currency';
3
- import { UniversalActivityOptionSymbol } from './universal-activity-option-symbol';
4
- import { UniversalActivitySymbol } from './universal-activity-symbol';
2
+ import { AccountUniversalActivityCurrency } from './account-universal-activity-currency';
3
+ import { AccountUniversalActivityOptionSymbol } from './account-universal-activity-option-symbol';
4
+ import { AccountUniversalActivitySymbol } from './account-universal-activity-symbol';
5
5
  /**
6
6
  * A transaction or activity from an institution
7
7
  * @export
@@ -23,16 +23,16 @@ export interface UniversalActivity {
23
23
  'account'?: AccountSimple;
24
24
  /**
25
25
  *
26
- * @type {UniversalActivitySymbol}
26
+ * @type {AccountUniversalActivitySymbol}
27
27
  * @memberof UniversalActivity
28
28
  */
29
- 'symbol'?: UniversalActivitySymbol | null;
29
+ 'symbol'?: AccountUniversalActivitySymbol | null;
30
30
  /**
31
31
  *
32
- * @type {UniversalActivityOptionSymbol}
32
+ * @type {AccountUniversalActivityOptionSymbol}
33
33
  * @memberof UniversalActivity
34
34
  */
35
- 'option_symbol'?: UniversalActivityOptionSymbol | null;
35
+ 'option_symbol'?: AccountUniversalActivityOptionSymbol | null;
36
36
  /**
37
37
  * The price of the security for the transaction. This is mostly applicable to `BUY`, `SELL`, and `DIVIDEND` transactions.
38
38
  * @type {number}
@@ -53,10 +53,10 @@ export interface UniversalActivity {
53
53
  'amount'?: number | null;
54
54
  /**
55
55
  *
56
- * @type {UniversalActivityCurrency}
56
+ * @type {AccountUniversalActivityCurrency}
57
57
  * @memberof UniversalActivity
58
58
  */
59
- 'currency'?: UniversalActivityCurrency;
59
+ 'currency'?: AccountUniversalActivityCurrency;
60
60
  /**
61
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` - Asset bought. - `SELL` - Asset sold. - `DIVIDEND` - Dividend payout. - `CONTRIBUTION` - Cash contribution. - `WITHDRAWAL` - Cash withdrawal. - `REI` - Dividend reinvestment. - `INTEREST` - Interest deposited into the account. - `FEE` - Fee withdrawn from the account. - `OPTIONEXPIRATION` - Option expiration event. `option_symbol` contains the related option contract info. - `OPTIONASSIGNMENT` - Option assignment event. `option_symbol` contains the related option contract info. - `OPTIONEXERCISE` - Option exercise event. `option_symbol` contains the related option contract info.
62
62
  * @type {string}
@@ -19,6 +19,12 @@ exports.operationParameterMap = {
19
19
  {
20
20
  name: 'endDate'
21
21
  },
22
+ {
23
+ name: 'offset'
24
+ },
25
+ {
26
+ name: 'limit'
27
+ },
22
28
  {
23
29
  name: 'type'
24
30
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "snaptrade-typescript-sdk",
3
- "version": "9.0.76",
3
+ "version": "9.0.78",
4
4
  "description": "Client for SnapTrade",
5
5
  "author": "Konfig",
6
6
  "engines": {