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.
- package/README.md +30 -22
- package/dist/api/account-information-api-generated.d.ts +2 -2
- package/dist/api/account-information-api-generated.js +1 -1
- package/dist/api/authentication-api-generated.d.ts +28 -28
- package/dist/api/authentication-api-generated.js +28 -28
- package/dist/api/connections-api-generated.d.ts +4 -4
- package/dist/api/connections-api-generated.js +2 -2
- package/dist/api/transactions-and-reporting-api-generated.d.ts +16 -16
- package/dist/api/transactions-and-reporting-api-generated.js +10 -10
- package/dist/browser.js +1 -1
- package/dist/configuration.js +1 -1
- package/dist/models/account-order-record-universal-symbol.d.ts +6 -6
- package/dist/models/account-order-record.d.ts +1 -1
- package/dist/models/account-simple.d.ts +4 -4
- package/dist/models/account.d.ts +7 -7
- package/dist/models/delete-user-response.d.ts +8 -2
- package/dist/models/index.d.ts +5 -2
- package/dist/models/index.js +5 -2
- package/dist/models/login-redirect-uri.d.ts +4 -4
- package/dist/models/snap-trade-login-user-request-body.d.ts +6 -6
- package/dist/models/{universal-symbol-currency.d.ts → symbol-currency.d.ts} +5 -5
- package/dist/models/{universal-symbol-exchange.d.ts → symbol-exchange.d.ts} +10 -10
- package/dist/models/symbol.d.ts +13 -13
- package/dist/models/underlying-symbol.d.ts +3 -3
- package/dist/models/universal-activity-currency.d.ts +25 -0
- package/dist/models/universal-activity-currency.js +2 -0
- package/dist/models/universal-activity-option-symbol.d.ts +52 -0
- package/dist/models/universal-activity-option-symbol.js +2 -0
- package/dist/models/universal-activity-symbol.d.ts +65 -0
- package/dist/models/universal-activity-symbol.js +2 -0
- package/dist/models/universal-activity.d.ts +40 -40
- package/dist/models/universal-symbol.d.ts +6 -6
- package/dist/models/user-idand-secret.d.ts +1 -1
- package/package.json +1 -1
- /package/dist/models/{universal-symbol-currency.js → symbol-currency.js} +0 -0
- /package/dist/models/{universal-symbol-exchange.js → symbol-exchange.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.37/typescript" : param.userAgent;
|
|
36
36
|
this.formDataCtor = param.formDataCtor;
|
|
37
37
|
}
|
|
38
38
|
/**
|
|
@@ -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
|
* 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
8
|
* @export
|
|
@@ -35,16 +35,16 @@ export interface AccountOrderRecordUniversalSymbol {
|
|
|
35
35
|
'description'?: string | null;
|
|
36
36
|
/**
|
|
37
37
|
*
|
|
38
|
-
* @type {
|
|
38
|
+
* @type {SymbolCurrency}
|
|
39
39
|
* @memberof AccountOrderRecordUniversalSymbol
|
|
40
40
|
*/
|
|
41
|
-
'currency':
|
|
41
|
+
'currency': SymbolCurrency;
|
|
42
42
|
/**
|
|
43
43
|
*
|
|
44
|
-
* @type {
|
|
44
|
+
* @type {SymbolExchange}
|
|
45
45
|
* @memberof AccountOrderRecordUniversalSymbol
|
|
46
46
|
*/
|
|
47
|
-
'exchange'?:
|
|
47
|
+
'exchange'?: SymbolExchange;
|
|
48
48
|
/**
|
|
49
49
|
*
|
|
50
50
|
* @type {SecurityType}
|
|
@@ -94,7 +94,7 @@ export interface AccountOrderRecord {
|
|
|
94
94
|
*/
|
|
95
95
|
'order_type'?: string | null;
|
|
96
96
|
/**
|
|
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.
|
|
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. - `MOO` - Market On Open. The order is to be executed at the day\'s opening price. - `EHP` - Extended Hours P.M. The order is to be placed during extended hour trading, after markets close.
|
|
98
98
|
* @type {string}
|
|
99
99
|
* @memberof AccountOrderRecord
|
|
100
100
|
*/
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import { AccountSyncStatus } from './account-sync-status';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* A single account at a brokerage.
|
|
4
4
|
* @export
|
|
5
5
|
* @interface AccountSimple
|
|
6
6
|
*/
|
|
7
7
|
export interface AccountSimple {
|
|
8
8
|
[key: string]: any;
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
10
|
+
* Unique identifier for the connected brokerage account. This is the UUID used to reference the account in SnapTrade.
|
|
11
11
|
* @type {string}
|
|
12
12
|
* @memberof AccountSimple
|
|
13
13
|
*/
|
|
14
14
|
'id'?: string;
|
|
15
15
|
/**
|
|
16
|
-
*
|
|
16
|
+
* A display name for the account. Either assigned by the user or by the brokerage itself. For certain brokerages, SnapTrade appends the brokerage name to the account name for clarity.
|
|
17
17
|
* @type {string}
|
|
18
18
|
* @memberof AccountSimple
|
|
19
19
|
*/
|
|
20
20
|
'name'?: string;
|
|
21
21
|
/**
|
|
22
|
-
*
|
|
22
|
+
* The account number assigned by the brokerage. For some brokerages, this field may be masked for security reasons.
|
|
23
23
|
* @type {string}
|
|
24
24
|
* @memberof AccountSimple
|
|
25
25
|
*/
|
package/dist/models/account.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { AccountBalance } from './account-balance';
|
|
2
2
|
import { AccountSyncStatus } from './account-sync-status';
|
|
3
3
|
/**
|
|
4
|
-
* A single
|
|
4
|
+
* A single account at a brokerage.
|
|
5
5
|
* @export
|
|
6
6
|
* @interface Account
|
|
7
7
|
*/
|
|
8
8
|
export interface Account {
|
|
9
9
|
[key: string]: any;
|
|
10
10
|
/**
|
|
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.
|
|
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.
|
|
12
12
|
* @type {string}
|
|
13
13
|
* @memberof Account
|
|
14
14
|
*/
|
|
@@ -27,31 +27,31 @@ export interface Account {
|
|
|
27
27
|
*/
|
|
28
28
|
'portfolio_group'?: string;
|
|
29
29
|
/**
|
|
30
|
-
* A display name for the account. Either assigned by the user or by the
|
|
30
|
+
* A display name for the account. Either assigned by the user or by the brokerage itself. For certain brokerages, SnapTrade appends the brokerage name to the account name for clarity.
|
|
31
31
|
* @type {string}
|
|
32
32
|
* @memberof Account
|
|
33
33
|
*/
|
|
34
34
|
'name'?: string | null;
|
|
35
35
|
/**
|
|
36
|
-
* The account number assigned by the
|
|
36
|
+
* The account number assigned by the brokerage. For some brokerages, this field may be masked for security reasons.
|
|
37
37
|
* @type {string}
|
|
38
38
|
* @memberof Account
|
|
39
39
|
*/
|
|
40
40
|
'number'?: string;
|
|
41
41
|
/**
|
|
42
|
-
* The name of the
|
|
42
|
+
* The name of the brokerage that holds the account.
|
|
43
43
|
* @type {string}
|
|
44
44
|
* @memberof Account
|
|
45
45
|
*/
|
|
46
46
|
'institution_name'?: string;
|
|
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
|
|
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 brokerage.
|
|
49
49
|
* @type {string}
|
|
50
50
|
* @memberof 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
|
|
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. Please use at your own risk.
|
|
55
55
|
* @type {{ [key: string]: any; }}
|
|
56
56
|
* @memberof Account
|
|
57
57
|
* @deprecated
|
|
@@ -1,16 +1,22 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
*
|
|
3
3
|
* @export
|
|
4
4
|
* @interface DeleteUserResponse
|
|
5
5
|
*/
|
|
6
6
|
export interface DeleteUserResponse {
|
|
7
7
|
[key: string]: any;
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
9
|
+
* This is always `deleted` when a user is queued for deletion.
|
|
10
10
|
* @type {string}
|
|
11
11
|
* @memberof DeleteUserResponse
|
|
12
12
|
*/
|
|
13
13
|
'status'?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Human friendly message about the deletion status.
|
|
16
|
+
* @type {string}
|
|
17
|
+
* @memberof DeleteUserResponse
|
|
18
|
+
*/
|
|
19
|
+
'detail'?: string;
|
|
14
20
|
/**
|
|
15
21
|
* SnapTrade User ID. This is chosen by the API partner and can be any string that is a) unique to the user, and b) immutable for the user. It is recommended to NOT use email addresses for this property because they are usually not immutable.
|
|
16
22
|
* @type {string}
|
package/dist/models/index.d.ts
CHANGED
|
@@ -79,6 +79,8 @@ export * from './strategy-quotes';
|
|
|
79
79
|
export * from './strategy-quotes-greek';
|
|
80
80
|
export * from './sub-period-return-rate';
|
|
81
81
|
export * from './symbol';
|
|
82
|
+
export * from './symbol-currency';
|
|
83
|
+
export * from './symbol-exchange';
|
|
82
84
|
export * from './symbol-figi-instrument';
|
|
83
85
|
export * from './symbol-query';
|
|
84
86
|
export * from './symbols-quotes-inner';
|
|
@@ -90,8 +92,9 @@ export * from './underlying-symbol';
|
|
|
90
92
|
export * from './underlying-symbol-exchange';
|
|
91
93
|
export * from './underlying-symbol-type';
|
|
92
94
|
export * from './universal-activity';
|
|
95
|
+
export * from './universal-activity-currency';
|
|
96
|
+
export * from './universal-activity-option-symbol';
|
|
97
|
+
export * from './universal-activity-symbol';
|
|
93
98
|
export * from './universal-symbol';
|
|
94
|
-
export * from './universal-symbol-currency';
|
|
95
|
-
export * from './universal-symbol-exchange';
|
|
96
99
|
export * from './user-idand-secret';
|
|
97
100
|
export * from './validated-trade-body';
|
package/dist/models/index.js
CHANGED
|
@@ -95,6 +95,8 @@ __exportStar(require("./strategy-quotes"), exports);
|
|
|
95
95
|
__exportStar(require("./strategy-quotes-greek"), exports);
|
|
96
96
|
__exportStar(require("./sub-period-return-rate"), exports);
|
|
97
97
|
__exportStar(require("./symbol"), exports);
|
|
98
|
+
__exportStar(require("./symbol-currency"), exports);
|
|
99
|
+
__exportStar(require("./symbol-exchange"), exports);
|
|
98
100
|
__exportStar(require("./symbol-figi-instrument"), exports);
|
|
99
101
|
__exportStar(require("./symbol-query"), exports);
|
|
100
102
|
__exportStar(require("./symbols-quotes-inner"), exports);
|
|
@@ -106,8 +108,9 @@ __exportStar(require("./underlying-symbol"), exports);
|
|
|
106
108
|
__exportStar(require("./underlying-symbol-exchange"), exports);
|
|
107
109
|
__exportStar(require("./underlying-symbol-type"), exports);
|
|
108
110
|
__exportStar(require("./universal-activity"), exports);
|
|
111
|
+
__exportStar(require("./universal-activity-currency"), exports);
|
|
112
|
+
__exportStar(require("./universal-activity-option-symbol"), exports);
|
|
113
|
+
__exportStar(require("./universal-activity-symbol"), exports);
|
|
109
114
|
__exportStar(require("./universal-symbol"), exports);
|
|
110
|
-
__exportStar(require("./universal-symbol-currency"), exports);
|
|
111
|
-
__exportStar(require("./universal-symbol-exchange"), exports);
|
|
112
115
|
__exportStar(require("./user-idand-secret"), exports);
|
|
113
116
|
__exportStar(require("./validated-trade-body"), exports);
|
|
@@ -5,13 +5,13 @@
|
|
|
5
5
|
*/
|
|
6
6
|
export interface LoginRedirectURI {
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
9
|
-
* @type {
|
|
8
|
+
* Connection Portal link to redirect user to connect a brokerage account.
|
|
9
|
+
* @type {string}
|
|
10
10
|
* @memberof LoginRedirectURI
|
|
11
11
|
*/
|
|
12
|
-
'redirectURI'?:
|
|
12
|
+
'redirectURI'?: string;
|
|
13
13
|
/**
|
|
14
|
-
*
|
|
14
|
+
* ID to identify the connection portal session.
|
|
15
15
|
* @type {string}
|
|
16
16
|
* @memberof LoginRedirectURI
|
|
17
17
|
*/
|
|
@@ -5,37 +5,37 @@
|
|
|
5
5
|
*/
|
|
6
6
|
export interface SnapTradeLoginUserRequestBody {
|
|
7
7
|
/**
|
|
8
|
-
* Slug of the brokerage to connect the user to. See [
|
|
8
|
+
* Slug of the brokerage to connect the user to. See [the integrations page](https://snaptrade.notion.site/66793431ad0b416489eaabaf248d0afb?v=3cfea70ef4254afc89704e47275a7a9a&pvs=4) for a list of supported brokerages and their slugs.
|
|
9
9
|
* @type {string}
|
|
10
10
|
* @memberof SnapTradeLoginUserRequestBody
|
|
11
11
|
*/
|
|
12
12
|
'broker'?: string;
|
|
13
13
|
/**
|
|
14
|
-
* When set to
|
|
14
|
+
* When set to `true`, user will be redirected back to the partner\'s site instead of the connection portal. This parameter is ignored if the connection portal is loaded inside an iframe. See the [guide on ways to integrate the connection portal](https://docs.snaptrade.com/docs/implement-connection-portal) for more information.
|
|
15
15
|
* @type {boolean}
|
|
16
16
|
* @memberof SnapTradeLoginUserRequestBody
|
|
17
17
|
*/
|
|
18
18
|
'immediateRedirect'?: boolean;
|
|
19
19
|
/**
|
|
20
|
-
* URL to redirect the user to after the user connects their brokerage account
|
|
20
|
+
* URL to redirect the user to after the user connects their brokerage account. This parameter is ignored if the connection portal is loaded inside an iframe. See the [guide on ways to integrate the connection portal](https://docs.snaptrade.com/docs/implement-connection-portal) for more information.
|
|
21
21
|
* @type {string}
|
|
22
22
|
* @memberof SnapTradeLoginUserRequestBody
|
|
23
23
|
*/
|
|
24
24
|
'customRedirect'?: string;
|
|
25
25
|
/**
|
|
26
|
-
* The UUID of the brokerage connection to be reconnected. This parameter should be left empty unless you are reconnecting a disabled connection. See
|
|
26
|
+
* The UUID of the brokerage connection to be reconnected. This parameter should be left empty unless you are reconnecting a disabled connection. See the [guide on fixing broken connections](https://docs.snaptrade.com/docs/fix-broken-connections) for more information.
|
|
27
27
|
* @type {string}
|
|
28
28
|
* @memberof SnapTradeLoginUserRequestBody
|
|
29
29
|
*/
|
|
30
30
|
'reconnect'?: string;
|
|
31
31
|
/**
|
|
32
|
-
* Sets whether the connection should be read or trade
|
|
32
|
+
* Sets whether the connection should be read-only or trade-enabled.
|
|
33
33
|
* @type {string}
|
|
34
34
|
* @memberof SnapTradeLoginUserRequestBody
|
|
35
35
|
*/
|
|
36
36
|
'connectionType'?: SnapTradeLoginUserRequestBodyConnectionTypeEnum;
|
|
37
37
|
/**
|
|
38
|
-
* Sets the version of the connection portal to render
|
|
38
|
+
* Sets the version of the connection portal to render.
|
|
39
39
|
* @type {string}
|
|
40
40
|
* @memberof SnapTradeLoginUserRequestBody
|
|
41
41
|
*/
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The currency in which the security is traded.
|
|
3
3
|
* @export
|
|
4
|
-
* @interface
|
|
4
|
+
* @interface SymbolCurrency
|
|
5
5
|
*/
|
|
6
|
-
export interface
|
|
6
|
+
export interface SymbolCurrency {
|
|
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
|
|
10
|
+
* @memberof SymbolCurrency
|
|
11
11
|
*/
|
|
12
12
|
'id'?: string;
|
|
13
13
|
/**
|
|
14
14
|
* The ISO-4217 currency code for the currency.
|
|
15
15
|
* @type {string}
|
|
16
|
-
* @memberof
|
|
16
|
+
* @memberof SymbolCurrency
|
|
17
17
|
*/
|
|
18
18
|
'code'?: string;
|
|
19
19
|
/**
|
|
20
20
|
* A human-friendly name of the currency.
|
|
21
21
|
* @type {string}
|
|
22
|
-
* @memberof
|
|
22
|
+
* @memberof SymbolCurrency
|
|
23
23
|
*/
|
|
24
24
|
'name'?: string;
|
|
25
25
|
}
|
|
@@ -1,55 +1,55 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The exchange on which the security is listed and traded.
|
|
3
3
|
* @export
|
|
4
|
-
* @interface
|
|
4
|
+
* @interface SymbolExchange
|
|
5
5
|
*/
|
|
6
|
-
export interface
|
|
6
|
+
export interface SymbolExchange {
|
|
7
7
|
/**
|
|
8
8
|
* Unique ID for the exchange in SnapTrade.
|
|
9
9
|
* @type {string}
|
|
10
|
-
* @memberof
|
|
10
|
+
* @memberof SymbolExchange
|
|
11
11
|
*/
|
|
12
12
|
'id'?: string;
|
|
13
13
|
/**
|
|
14
14
|
* A short name for the exchange. For standardized exchange code, please us the `mic_code` field.
|
|
15
15
|
* @type {string}
|
|
16
|
-
* @memberof
|
|
16
|
+
* @memberof SymbolExchange
|
|
17
17
|
*/
|
|
18
18
|
'code'?: string;
|
|
19
19
|
/**
|
|
20
20
|
* The [Market Identifier Code](https://en.wikipedia.org/wiki/Market_Identifier_Code) (MIC) for the exchange.
|
|
21
21
|
* @type {string}
|
|
22
|
-
* @memberof
|
|
22
|
+
* @memberof SymbolExchange
|
|
23
23
|
*/
|
|
24
24
|
'mic_code'?: string;
|
|
25
25
|
/**
|
|
26
26
|
* The full name of the exchange.
|
|
27
27
|
* @type {string}
|
|
28
|
-
* @memberof
|
|
28
|
+
* @memberof SymbolExchange
|
|
29
29
|
*/
|
|
30
30
|
'name'?: string;
|
|
31
31
|
/**
|
|
32
32
|
* The timezone for the trading hours (`start_time` and `close_time`) of the exchange.
|
|
33
33
|
* @type {string}
|
|
34
|
-
* @memberof
|
|
34
|
+
* @memberof SymbolExchange
|
|
35
35
|
*/
|
|
36
36
|
'timezone'?: string;
|
|
37
37
|
/**
|
|
38
38
|
* The time when the exchange opens for trading.
|
|
39
39
|
* @type {string}
|
|
40
|
-
* @memberof
|
|
40
|
+
* @memberof SymbolExchange
|
|
41
41
|
*/
|
|
42
42
|
'start_time'?: string;
|
|
43
43
|
/**
|
|
44
44
|
* The time when the exchange closes for trading.
|
|
45
45
|
* @type {string}
|
|
46
|
-
* @memberof
|
|
46
|
+
* @memberof SymbolExchange
|
|
47
47
|
*/
|
|
48
48
|
'close_time'?: string;
|
|
49
49
|
/**
|
|
50
50
|
* The suffix to be appended to the symbol when trading on this exchange. For example, the suffix for the Toronto Stock Exchange is `.TO`. See `UniversalSymbol->symbol` and `UniversalSymbol->raw_symbol` for more detail.
|
|
51
51
|
* @type {string}
|
|
52
|
-
* @memberof
|
|
52
|
+
* @memberof SymbolExchange
|
|
53
53
|
*/
|
|
54
54
|
'suffix'?: string | null;
|
|
55
55
|
}
|
package/dist/models/symbol.d.ts
CHANGED
|
@@ -1,50 +1,50 @@
|
|
|
1
|
-
import { Currency } from './currency';
|
|
2
|
-
import { Exchange } from './exchange';
|
|
3
1
|
import { SecurityType } from './security-type';
|
|
2
|
+
import { SymbolCurrency } from './symbol-currency';
|
|
3
|
+
import { SymbolExchange } from './symbol-exchange';
|
|
4
4
|
import { SymbolFigiInstrument } from './symbol-figi-instrument';
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* Uniquely describes a single security + exchange combination across all brokerages.
|
|
7
7
|
* @export
|
|
8
8
|
* @interface Symbol
|
|
9
9
|
*/
|
|
10
10
|
export interface Symbol {
|
|
11
11
|
[key: string]: any;
|
|
12
12
|
/**
|
|
13
|
-
*
|
|
13
|
+
* Unique identifier for the symbol within SnapTrade. This is the ID used to reference the symbol in SnapTrade API calls.
|
|
14
14
|
* @type {string}
|
|
15
15
|
* @memberof Symbol
|
|
16
16
|
*/
|
|
17
17
|
'id'?: string;
|
|
18
18
|
/**
|
|
19
|
-
*
|
|
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
20
|
* @type {string}
|
|
21
21
|
* @memberof Symbol
|
|
22
22
|
*/
|
|
23
23
|
'symbol'?: string;
|
|
24
24
|
/**
|
|
25
|
-
*
|
|
25
|
+
* The raw symbol is `symbol` with the exchange suffix removed. For example, if `symbol` is \"VAB.TO\", then `raw_symbol` is \"VAB\".
|
|
26
26
|
* @type {string}
|
|
27
27
|
* @memberof Symbol
|
|
28
28
|
*/
|
|
29
29
|
'raw_symbol'?: string;
|
|
30
30
|
/**
|
|
31
|
-
*
|
|
31
|
+
* A human-readable description of the security. This is usually the company name or ETF name.
|
|
32
32
|
* @type {string}
|
|
33
33
|
* @memberof Symbol
|
|
34
34
|
*/
|
|
35
|
-
'
|
|
35
|
+
'description'?: string | null;
|
|
36
36
|
/**
|
|
37
37
|
*
|
|
38
|
-
* @type {
|
|
38
|
+
* @type {SymbolCurrency}
|
|
39
39
|
* @memberof Symbol
|
|
40
40
|
*/
|
|
41
|
-
'currency'?:
|
|
41
|
+
'currency'?: SymbolCurrency;
|
|
42
42
|
/**
|
|
43
43
|
*
|
|
44
|
-
* @type {
|
|
44
|
+
* @type {SymbolExchange}
|
|
45
45
|
* @memberof Symbol
|
|
46
46
|
*/
|
|
47
|
-
'exchange'?:
|
|
47
|
+
'exchange'?: SymbolExchange;
|
|
48
48
|
/**
|
|
49
49
|
*
|
|
50
50
|
* @type {SecurityType}
|
|
@@ -52,7 +52,7 @@ export interface Symbol {
|
|
|
52
52
|
*/
|
|
53
53
|
'type'?: SecurityType;
|
|
54
54
|
/**
|
|
55
|
-
*
|
|
55
|
+
* 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.
|
|
56
56
|
* @type {string}
|
|
57
57
|
* @memberof Symbol
|
|
58
58
|
*/
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Currency } from './currency';
|
|
2
|
+
import { SymbolCurrency } from './symbol-currency';
|
|
2
3
|
import { SymbolFigiInstrument } from './symbol-figi-instrument';
|
|
3
4
|
import { UnderlyingSymbolExchange } from './underlying-symbol-exchange';
|
|
4
5
|
import { UnderlyingSymbolType } from './underlying-symbol-type';
|
|
5
|
-
import { UniversalSymbolCurrency } from './universal-symbol-currency';
|
|
6
6
|
/**
|
|
7
7
|
* Symbol object for the underlying security of an option.
|
|
8
8
|
* @export
|
|
@@ -36,10 +36,10 @@ export interface UnderlyingSymbol {
|
|
|
36
36
|
'description'?: string | null;
|
|
37
37
|
/**
|
|
38
38
|
*
|
|
39
|
-
* @type {
|
|
39
|
+
* @type {SymbolCurrency}
|
|
40
40
|
* @memberof UnderlyingSymbol
|
|
41
41
|
*/
|
|
42
|
-
'currency'?:
|
|
42
|
+
'currency'?: SymbolCurrency;
|
|
43
43
|
/**
|
|
44
44
|
*
|
|
45
45
|
* @type {UnderlyingSymbolExchange}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The currency in which the transaction `price` and `amount` is denominated.
|
|
3
|
+
* @export
|
|
4
|
+
* @interface UniversalActivityCurrency
|
|
5
|
+
*/
|
|
6
|
+
export interface UniversalActivityCurrency {
|
|
7
|
+
/**
|
|
8
|
+
* Unique identifier for the currency. This is the UUID used to reference the currency in SnapTrade.
|
|
9
|
+
* @type {string}
|
|
10
|
+
* @memberof UniversalActivityCurrency
|
|
11
|
+
*/
|
|
12
|
+
'id'?: string;
|
|
13
|
+
/**
|
|
14
|
+
* The ISO-4217 currency code for the currency.
|
|
15
|
+
* @type {string}
|
|
16
|
+
* @memberof UniversalActivityCurrency
|
|
17
|
+
*/
|
|
18
|
+
'code'?: string;
|
|
19
|
+
/**
|
|
20
|
+
* A human-friendly name of the currency.
|
|
21
|
+
* @type {string}
|
|
22
|
+
* @memberof UniversalActivityCurrency
|
|
23
|
+
*/
|
|
24
|
+
'name'?: string;
|
|
25
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { UnderlyingSymbol } from './underlying-symbol';
|
|
2
|
+
/**
|
|
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
|
+
* @export
|
|
5
|
+
* @interface UniversalActivityOptionSymbol
|
|
6
|
+
*/
|
|
7
|
+
export interface UniversalActivityOptionSymbol {
|
|
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 UniversalActivityOptionSymbol
|
|
12
|
+
*/
|
|
13
|
+
'id': string;
|
|
14
|
+
/**
|
|
15
|
+
* The [OCC symbol](https://en.wikipedia.org/wiki/Option_symbol) for the option.
|
|
16
|
+
* @type {string}
|
|
17
|
+
* @memberof UniversalActivityOptionSymbol
|
|
18
|
+
*/
|
|
19
|
+
'ticker': string;
|
|
20
|
+
/**
|
|
21
|
+
* The type of option. Either \"CALL\" or \"PUT\".
|
|
22
|
+
* @type {string}
|
|
23
|
+
* @memberof UniversalActivityOptionSymbol
|
|
24
|
+
*/
|
|
25
|
+
'option_type': UniversalActivityOptionSymbolOptionTypeEnum;
|
|
26
|
+
/**
|
|
27
|
+
* The option strike price.
|
|
28
|
+
* @type {number}
|
|
29
|
+
* @memberof UniversalActivityOptionSymbol
|
|
30
|
+
*/
|
|
31
|
+
'strike_price': number;
|
|
32
|
+
/**
|
|
33
|
+
* The option expiration date.
|
|
34
|
+
* @type {string}
|
|
35
|
+
* @memberof UniversalActivityOptionSymbol
|
|
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 UniversalActivityOptionSymbol
|
|
42
|
+
*/
|
|
43
|
+
'is_mini_option'?: boolean;
|
|
44
|
+
/**
|
|
45
|
+
*
|
|
46
|
+
* @type {UnderlyingSymbol}
|
|
47
|
+
* @memberof UniversalActivityOptionSymbol
|
|
48
|
+
*/
|
|
49
|
+
'underlying_symbol': UnderlyingSymbol;
|
|
50
|
+
}
|
|
51
|
+
type UniversalActivityOptionSymbolOptionTypeEnum = 'CALL' | 'PUT';
|
|
52
|
+
export {};
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { SecurityType } from './security-type';
|
|
2
|
+
import { SymbolCurrency } from './symbol-currency';
|
|
3
|
+
import { SymbolExchange } from './symbol-exchange';
|
|
4
|
+
import { SymbolFigiInstrument } from './symbol-figi-instrument';
|
|
5
|
+
/**
|
|
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
|
+
* @export
|
|
8
|
+
* @interface UniversalActivitySymbol
|
|
9
|
+
*/
|
|
10
|
+
export interface UniversalActivitySymbol {
|
|
11
|
+
/**
|
|
12
|
+
* Unique identifier for the symbol within SnapTrade. This is the ID used to reference the symbol in SnapTrade API calls.
|
|
13
|
+
* @type {string}
|
|
14
|
+
* @memberof UniversalActivitySymbol
|
|
15
|
+
*/
|
|
16
|
+
'id'?: string;
|
|
17
|
+
/**
|
|
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
|
+
* @type {string}
|
|
20
|
+
* @memberof UniversalActivitySymbol
|
|
21
|
+
*/
|
|
22
|
+
'symbol'?: string;
|
|
23
|
+
/**
|
|
24
|
+
* The raw symbol is `symbol` with the exchange suffix removed. For example, if `symbol` is \"VAB.TO\", then `raw_symbol` is \"VAB\".
|
|
25
|
+
* @type {string}
|
|
26
|
+
* @memberof UniversalActivitySymbol
|
|
27
|
+
*/
|
|
28
|
+
'raw_symbol'?: string;
|
|
29
|
+
/**
|
|
30
|
+
* A human-readable description of the security. This is usually the company name or ETF name.
|
|
31
|
+
* @type {string}
|
|
32
|
+
* @memberof UniversalActivitySymbol
|
|
33
|
+
*/
|
|
34
|
+
'description'?: string | null;
|
|
35
|
+
/**
|
|
36
|
+
*
|
|
37
|
+
* @type {SymbolCurrency}
|
|
38
|
+
* @memberof UniversalActivitySymbol
|
|
39
|
+
*/
|
|
40
|
+
'currency'?: SymbolCurrency;
|
|
41
|
+
/**
|
|
42
|
+
*
|
|
43
|
+
* @type {SymbolExchange}
|
|
44
|
+
* @memberof UniversalActivitySymbol
|
|
45
|
+
*/
|
|
46
|
+
'exchange'?: SymbolExchange;
|
|
47
|
+
/**
|
|
48
|
+
*
|
|
49
|
+
* @type {SecurityType}
|
|
50
|
+
* @memberof UniversalActivitySymbol
|
|
51
|
+
*/
|
|
52
|
+
'type'?: SecurityType;
|
|
53
|
+
/**
|
|
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
|
+
* @type {string}
|
|
56
|
+
* @memberof UniversalActivitySymbol
|
|
57
|
+
*/
|
|
58
|
+
'figi_code'?: string | null;
|
|
59
|
+
/**
|
|
60
|
+
*
|
|
61
|
+
* @type {SymbolFigiInstrument}
|
|
62
|
+
* @memberof UniversalActivitySymbol
|
|
63
|
+
*/
|
|
64
|
+
'figi_instrument'?: SymbolFigiInstrument | null;
|
|
65
|
+
}
|