snaptrade-typescript-sdk 9.0.32 → 9.0.34
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 +3 -1
- package/dist/api/account-information-api-generated.d.ts +4 -4
- package/dist/api/account-information-api-generated.js +4 -4
- package/dist/browser.js +1 -1
- package/dist/configuration.js +1 -1
- package/dist/models/account-holdings-account.d.ts +2 -2
- package/dist/models/account-order-record-option-symbol.d.ts +52 -0
- package/dist/models/account-order-record-status.d.ts +1 -1
- package/dist/models/account-order-record-universal-symbol.d.ts +73 -0
- package/dist/models/account-order-record.d.ts +26 -25
- package/dist/models/account.d.ts +4 -4
- package/dist/models/exchange.d.ts +9 -9
- package/dist/models/figi-instrument.d.ts +3 -3
- package/dist/models/index.d.ts +6 -32
- package/dist/models/index.js +6 -32
- package/dist/models/monthly-dividends.d.ts +1 -1
- package/dist/models/net-contributions.d.ts +1 -1
- package/dist/models/option-brokerage-symbol.d.ts +5 -3
- package/dist/models/options-position-currency.d.ts +1 -1
- package/dist/models/options-position.d.ts +2 -1
- package/dist/models/options-symbol.d.ts +7 -19
- package/dist/models/order-type-strict.d.ts +1 -1
- package/dist/models/past-value.d.ts +1 -1
- package/dist/models/position-symbol.d.ts +11 -6
- package/dist/models/security-type.d.ts +6 -5
- package/dist/models/snap-trade-holdings-account-account-id.d.ts +2 -3
- package/dist/models/strategy-order-record.d.ts +1 -1
- package/dist/models/sub-period-return-rate.d.ts +2 -2
- package/dist/models/symbol-figi-instrument.d.ts +2 -2
- package/dist/models/underlying-symbol-exchange.d.ts +61 -0
- package/dist/models/underlying-symbol-type.d.ts +32 -0
- package/dist/models/underlying-symbol.d.ts +22 -14
- package/dist/models/universal-symbol-currency.d.ts +25 -0
- package/dist/models/universal-symbol-exchange.d.ts +55 -0
- package/dist/models/universal-symbol.d.ts +14 -12
- package/package.json +1 -1
- package/dist/models/brokerage-authorization-type.d.ts +0 -16
- package/dist/models/brokerage-symbol-option-symbol.d.ts +0 -64
- package/dist/models/brokerage-symbol-symbol.d.ts +0 -71
- package/dist/models/brokerage-symbol.d.ts +0 -47
- package/dist/models/calculated-trade.d.ts +0 -21
- package/dist/models/cash-restriction.d.ts +0 -40
- package/dist/models/excluded-asset.d.ts +0 -15
- package/dist/models/excluded-asset.js +0 -2
- package/dist/models/jwt.d.ts +0 -14
- package/dist/models/jwt.js +0 -2
- package/dist/models/model-asset-class-details.d.ts +0 -22
- package/dist/models/model-asset-class-details.js +0 -2
- package/dist/models/model-asset-class-target.d.ts +0 -15
- package/dist/models/model-asset-class-target.js +0 -2
- package/dist/models/model-asset-class.d.ts +0 -20
- package/dist/models/model-asset-class.js +0 -2
- package/dist/models/model-portfolio-asset-class.d.ts +0 -21
- package/dist/models/model-portfolio-asset-class.js +0 -2
- package/dist/models/model-portfolio-details.d.ts +0 -29
- package/dist/models/model-portfolio-details.js +0 -2
- package/dist/models/model-portfolio-security.d.ts +0 -21
- package/dist/models/model-portfolio-security.js +0 -2
- package/dist/models/model-portfolio.d.ts +0 -28
- package/dist/models/model-portfolio.js +0 -2
- package/dist/models/portfolio-group-info.d.ts +0 -82
- package/dist/models/portfolio-group-info.js +0 -2
- package/dist/models/portfolio-group-position.d.ts +0 -27
- package/dist/models/portfolio-group-position.js +0 -2
- package/dist/models/portfolio-group-settings.d.ts +0 -39
- package/dist/models/portfolio-group-settings.js +0 -2
- package/dist/models/portfolio-group.d.ts +0 -20
- package/dist/models/portfolio-group.js +0 -2
- package/dist/models/redirect-tokenand-pin.d.ts +0 -20
- package/dist/models/redirect-tokenand-pin.js +0 -2
- package/dist/models/snap-trade-apidisclaimer-accept-status.d.ts +0 -20
- package/dist/models/snap-trade-apidisclaimer-accept-status.js +0 -2
- package/dist/models/strategy-impact-legs-inner.d.ts +0 -50
- package/dist/models/strategy-impact-legs-inner.js +0 -2
- package/dist/models/strategy-impact.d.ts +0 -75
- package/dist/models/strategy-impact.js +0 -2
- package/dist/models/strategy-order-place-orders-inner-legs-inner.d.ts +0 -50
- package/dist/models/strategy-order-place-orders-inner-legs-inner.js +0 -2
- package/dist/models/strategy-order-place-orders-inner.d.ts +0 -267
- package/dist/models/strategy-order-place-orders-inner.js +0 -2
- package/dist/models/strategy-order-place.d.ts +0 -21
- package/dist/models/strategy-order-place.js +0 -2
- package/dist/models/target-asset.d.ts +0 -47
- package/dist/models/target-asset.js +0 -2
- package/dist/models/trade-execution-status.d.ts +0 -70
- package/dist/models/trade-execution-status.js +0 -2
- package/dist/models/trade-impact.d.ts +0 -40
- package/dist/models/trade-impact.js +0 -2
- package/dist/models/trade.d.ts +0 -61
- package/dist/models/trade.js +0 -2
- package/dist/models/user-error-log.d.ts +0 -44
- package/dist/models/user-error-log.js +0 -2
- package/dist/models/user-settings.d.ts +0 -69
- package/dist/models/user-settings.js +0 -2
- /package/dist/models/{brokerage-authorization-type.js → account-order-record-option-symbol.js} +0 -0
- /package/dist/models/{brokerage-symbol-option-symbol.js → account-order-record-universal-symbol.js} +0 -0
- /package/dist/models/{brokerage-symbol-symbol.js → underlying-symbol-exchange.js} +0 -0
- /package/dist/models/{brokerage-symbol.js → underlying-symbol-type.js} +0 -0
- /package/dist/models/{calculated-trade.js → universal-symbol-currency.js} +0 -0
- /package/dist/models/{cash-restriction.js → universal-symbol-exchange.js} +0 -0
|
@@ -1,21 +1,23 @@
|
|
|
1
1
|
import { OptionsSymbol } from './options-symbol';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* Uniquely describes a security for the option position within an account. The distinction between this and the `option_symbol` child property is that this object is specific to a position within an account, while the `option_symbol` child property is universal across all brokerage accounts. The caller should rely on the `option_symbol` child property for most use cases.
|
|
4
4
|
* @export
|
|
5
5
|
* @interface OptionBrokerageSymbol
|
|
6
6
|
*/
|
|
7
7
|
export interface OptionBrokerageSymbol {
|
|
8
8
|
[key: string]: any;
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
10
|
+
* A unique ID for the security within SnapTrade, scoped to the brokerage account that the security belongs to. This is a legacy field and should not be used. Do not rely on this being a stable ID as it can change.
|
|
11
11
|
* @type {string}
|
|
12
12
|
* @memberof OptionBrokerageSymbol
|
|
13
|
+
* @deprecated
|
|
13
14
|
*/
|
|
14
15
|
'id'?: string;
|
|
15
16
|
/**
|
|
16
|
-
*
|
|
17
|
+
* This field is deprecated and the caller should use the `option_symbol` child property\'s `description` instead.
|
|
17
18
|
* @type {string}
|
|
18
19
|
* @memberof OptionBrokerageSymbol
|
|
20
|
+
* @deprecated
|
|
19
21
|
*/
|
|
20
22
|
'description'?: string;
|
|
21
23
|
/**
|
|
@@ -20,7 +20,7 @@ export interface OptionsPosition {
|
|
|
20
20
|
*/
|
|
21
21
|
'price'?: number | null;
|
|
22
22
|
/**
|
|
23
|
-
* The number of contracts for this option position.
|
|
23
|
+
* The number of contracts for this option position. A positive number indicates a long position, while a negative number indicates a short position.
|
|
24
24
|
* @type {number}
|
|
25
25
|
* @memberof OptionsPosition
|
|
26
26
|
*/
|
|
@@ -29,6 +29,7 @@ export interface OptionsPosition {
|
|
|
29
29
|
*
|
|
30
30
|
* @type {OptionsPositionCurrency}
|
|
31
31
|
* @memberof OptionsPosition
|
|
32
|
+
* @deprecated
|
|
32
33
|
*/
|
|
33
34
|
'currency'?: OptionsPositionCurrency | null;
|
|
34
35
|
/**
|
|
@@ -1,43 +1,43 @@
|
|
|
1
1
|
import { UnderlyingSymbol } from './underlying-symbol';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* Uniquely describes an option security + exchange combination across all brokerages.
|
|
4
4
|
* @export
|
|
5
5
|
* @interface OptionsSymbol
|
|
6
6
|
*/
|
|
7
7
|
export interface OptionsSymbol {
|
|
8
8
|
[key: string]: any;
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
10
|
+
* Unique identifier for the option symbol within SnapTrade. This is the ID used to reference the symbol in SnapTrade API calls.
|
|
11
11
|
* @type {string}
|
|
12
12
|
* @memberof OptionsSymbol
|
|
13
13
|
*/
|
|
14
14
|
'id': string;
|
|
15
15
|
/**
|
|
16
|
-
*
|
|
16
|
+
* The [OCC symbol](https://en.wikipedia.org/wiki/Option_symbol) for the option.
|
|
17
17
|
* @type {string}
|
|
18
18
|
* @memberof OptionsSymbol
|
|
19
19
|
*/
|
|
20
20
|
'ticker': string;
|
|
21
21
|
/**
|
|
22
|
-
*
|
|
22
|
+
* The type of option. Either \"CALL\" or \"PUT\".
|
|
23
23
|
* @type {string}
|
|
24
24
|
* @memberof OptionsSymbol
|
|
25
25
|
*/
|
|
26
26
|
'option_type': OptionsSymbolOptionTypeEnum;
|
|
27
27
|
/**
|
|
28
|
-
*
|
|
28
|
+
* The option strike price.
|
|
29
29
|
* @type {number}
|
|
30
30
|
* @memberof OptionsSymbol
|
|
31
31
|
*/
|
|
32
32
|
'strike_price': number;
|
|
33
33
|
/**
|
|
34
|
-
*
|
|
34
|
+
* The option expiration date.
|
|
35
35
|
* @type {string}
|
|
36
36
|
* @memberof OptionsSymbol
|
|
37
37
|
*/
|
|
38
38
|
'expiration_date': string;
|
|
39
39
|
/**
|
|
40
|
-
*
|
|
40
|
+
* Whether the option is a mini option. Mini options have 10 underlying shares per contract instead of the standard 100.
|
|
41
41
|
* @type {boolean}
|
|
42
42
|
* @memberof OptionsSymbol
|
|
43
43
|
*/
|
|
@@ -48,18 +48,6 @@ export interface OptionsSymbol {
|
|
|
48
48
|
* @memberof OptionsSymbol
|
|
49
49
|
*/
|
|
50
50
|
'underlying_symbol': UnderlyingSymbol;
|
|
51
|
-
/**
|
|
52
|
-
*
|
|
53
|
-
* @type {string}
|
|
54
|
-
* @memberof OptionsSymbol
|
|
55
|
-
*/
|
|
56
|
-
'local_id'?: string;
|
|
57
|
-
/**
|
|
58
|
-
*
|
|
59
|
-
* @type {string}
|
|
60
|
-
* @memberof OptionsSymbol
|
|
61
|
-
*/
|
|
62
|
-
'exchange_id'?: string;
|
|
63
51
|
}
|
|
64
52
|
type OptionsSymbolOptionTypeEnum = 'CALL' | 'PUT';
|
|
65
53
|
export {};
|
|
@@ -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
|
*/
|
|
@@ -1,21 +1,23 @@
|
|
|
1
1
|
import { UniversalSymbol } from './universal-symbol';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* Uniquely describes a security for the position within an account. The distinction between this and the `symbol` child property is that this object is specific to a position within an account, while the `symbol` child property is universal across all brokerage accounts. The caller should rely on the `symbol` child property for most use cases.
|
|
4
4
|
* @export
|
|
5
5
|
* @interface PositionSymbol
|
|
6
6
|
*/
|
|
7
7
|
export interface PositionSymbol {
|
|
8
8
|
[key: string]: any;
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
10
|
+
* A unique ID for the security within SnapTrade, scoped to the brokerage account that the security belongs to. This is a legacy field and should not be used. Do not rely on this being a stable ID as it can change.
|
|
11
11
|
* @type {string}
|
|
12
12
|
* @memberof PositionSymbol
|
|
13
|
+
* @deprecated
|
|
13
14
|
*/
|
|
14
15
|
'id'?: string;
|
|
15
16
|
/**
|
|
16
|
-
*
|
|
17
|
+
* This field is deprecated and the caller should use the `symbol` child property\'s `description` instead.
|
|
17
18
|
* @type {string}
|
|
18
19
|
* @memberof PositionSymbol
|
|
20
|
+
* @deprecated
|
|
19
21
|
*/
|
|
20
22
|
'description'?: string;
|
|
21
23
|
/**
|
|
@@ -25,21 +27,24 @@ export interface PositionSymbol {
|
|
|
25
27
|
*/
|
|
26
28
|
'symbol'?: UniversalSymbol;
|
|
27
29
|
/**
|
|
28
|
-
*
|
|
30
|
+
* This field is deprecated and should not be used. Please reach out to SnapTrade support if you have a valid usecase for this.
|
|
29
31
|
* @type {string}
|
|
30
32
|
* @memberof PositionSymbol
|
|
33
|
+
* @deprecated
|
|
31
34
|
*/
|
|
32
35
|
'local_id'?: string | null;
|
|
33
36
|
/**
|
|
34
|
-
*
|
|
37
|
+
* This field is deprecated and should not be used. Please reach out to SnapTrade support if you have a valid usecase for this.
|
|
35
38
|
* @type {boolean}
|
|
36
39
|
* @memberof PositionSymbol
|
|
40
|
+
* @deprecated
|
|
37
41
|
*/
|
|
38
42
|
'is_quotable'?: boolean;
|
|
39
43
|
/**
|
|
40
|
-
*
|
|
44
|
+
* This field is deprecated and should not be used. Please reach out to SnapTrade support if you have a valid usecase for this.
|
|
41
45
|
* @type {boolean}
|
|
42
46
|
* @memberof PositionSymbol
|
|
47
|
+
* @deprecated
|
|
43
48
|
*/
|
|
44
49
|
'is_tradable'?: boolean;
|
|
45
50
|
}
|
|
@@ -1,32 +1,33 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* The type of security. For example, \"Common Stock\" or \"ETF\".
|
|
3
3
|
* @export
|
|
4
4
|
* @interface SecurityType
|
|
5
5
|
*/
|
|
6
6
|
export interface SecurityType {
|
|
7
7
|
[key: string]: any;
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
9
|
+
* Unique identifier for the security type within SnapTrade. This is the ID used to reference the security type in SnapTrade API calls.
|
|
10
10
|
* @type {string}
|
|
11
11
|
* @memberof SecurityType
|
|
12
12
|
*/
|
|
13
13
|
'id'?: string;
|
|
14
14
|
/**
|
|
15
|
-
*
|
|
15
|
+
* A short code representing the security type. For example, \"cs\" for Common Stock. Here are some common values: ad - ADR bnd - Bond cs - Common Stock cef - Closed End Fund et - ETF oef - Open Ended Fund ps - Preferred Stock rt - Right struct - Structured Product ut - Unit wi - When Issued wt - Warrant
|
|
16
16
|
* @type {string}
|
|
17
17
|
* @memberof SecurityType
|
|
18
18
|
*/
|
|
19
19
|
'code'?: string;
|
|
20
20
|
/**
|
|
21
|
-
*
|
|
21
|
+
* A human-readable description of the security type. For example, \"Common Stock\" or \"ETF\".
|
|
22
22
|
* @type {string}
|
|
23
23
|
* @memberof SecurityType
|
|
24
24
|
*/
|
|
25
25
|
'description'?: string;
|
|
26
26
|
/**
|
|
27
|
-
*
|
|
27
|
+
* This field is deprecated and should not be used. Please reach out to SnapTrade support if you have a valid usecase for this.
|
|
28
28
|
* @type {boolean}
|
|
29
29
|
* @memberof SecurityType
|
|
30
|
+
* @deprecated
|
|
30
31
|
*/
|
|
31
32
|
'is_supported'?: boolean;
|
|
32
33
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { CashRestriction } from './cash-restriction';
|
|
2
1
|
import { SnapTradeHoldingsAccountAccountIdBalance } from './snap-trade-holdings-account-account-id-balance';
|
|
3
2
|
/**
|
|
4
3
|
* A single brokerage account at a financial institution.
|
|
@@ -61,11 +60,11 @@ export interface SnapTradeHoldingsAccountAccountId {
|
|
|
61
60
|
};
|
|
62
61
|
/**
|
|
63
62
|
* This field is deprecated.
|
|
64
|
-
* @type {Array<
|
|
63
|
+
* @type {Array<string>}
|
|
65
64
|
* @memberof SnapTradeHoldingsAccountAccountId
|
|
66
65
|
* @deprecated
|
|
67
66
|
*/
|
|
68
|
-
'cash_restrictions'?: Array<
|
|
67
|
+
'cash_restrictions'?: Array<string>;
|
|
69
68
|
/**
|
|
70
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.
|
|
71
70
|
* @type {string}
|
|
@@ -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
|
*/
|
|
@@ -5,13 +5,13 @@
|
|
|
5
5
|
*/
|
|
6
6
|
export interface SymbolFigiInstrument {
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
8
|
+
* 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.
|
|
9
9
|
* @type {string}
|
|
10
10
|
* @memberof SymbolFigiInstrument
|
|
11
11
|
*/
|
|
12
12
|
'figi_code'?: string | null;
|
|
13
13
|
/**
|
|
14
|
-
*
|
|
14
|
+
* This enables users to link multiple FIGIs for the same security in order to obtain an aggregated view across all countries and all exchanges. For example, `AAPL` has a different FIGI for each exchange/trading venue it is traded on. The `figi_share_class` is the same for all of these FIGIs. See section 1.4.3 of the [FIGI Standard](https://www.openfigi.com/assets/local/figi-allocation-rules.pdf) for more information.
|
|
15
15
|
* @type {string}
|
|
16
16
|
* @memberof SymbolFigiInstrument
|
|
17
17
|
*/
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The exchange on which the security is listed and traded.
|
|
3
|
+
* @export
|
|
4
|
+
* @interface UnderlyingSymbolExchange
|
|
5
|
+
*/
|
|
6
|
+
export interface UnderlyingSymbolExchange {
|
|
7
|
+
/**
|
|
8
|
+
*
|
|
9
|
+
* @type {string}
|
|
10
|
+
* @memberof UnderlyingSymbolExchange
|
|
11
|
+
*/
|
|
12
|
+
'id'?: string;
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @type {string}
|
|
16
|
+
* @memberof UnderlyingSymbolExchange
|
|
17
|
+
*/
|
|
18
|
+
'code'?: string;
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @type {string}
|
|
22
|
+
* @memberof UnderlyingSymbolExchange
|
|
23
|
+
*/
|
|
24
|
+
'mic_code'?: string;
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
* @type {string}
|
|
28
|
+
* @memberof UnderlyingSymbolExchange
|
|
29
|
+
*/
|
|
30
|
+
'name'?: string;
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @type {string}
|
|
34
|
+
* @memberof UnderlyingSymbolExchange
|
|
35
|
+
*/
|
|
36
|
+
'timezone'?: string;
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @type {string}
|
|
40
|
+
* @memberof UnderlyingSymbolExchange
|
|
41
|
+
*/
|
|
42
|
+
'start_time'?: string;
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @type {string}
|
|
46
|
+
* @memberof UnderlyingSymbolExchange
|
|
47
|
+
*/
|
|
48
|
+
'close_time'?: string;
|
|
49
|
+
/**
|
|
50
|
+
*
|
|
51
|
+
* @type {string}
|
|
52
|
+
* @memberof UnderlyingSymbolExchange
|
|
53
|
+
*/
|
|
54
|
+
'suffix'?: string | null;
|
|
55
|
+
/**
|
|
56
|
+
*
|
|
57
|
+
* @type {boolean}
|
|
58
|
+
* @memberof UnderlyingSymbolExchange
|
|
59
|
+
*/
|
|
60
|
+
'allows_cryptocurrency_symbols'?: boolean;
|
|
61
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The type of security. For example, \"Common Stock\" or \"ETF\".
|
|
3
|
+
* @export
|
|
4
|
+
* @interface UnderlyingSymbolType
|
|
5
|
+
*/
|
|
6
|
+
export interface UnderlyingSymbolType {
|
|
7
|
+
/**
|
|
8
|
+
* Unique identifier for the security type within SnapTrade. This is the ID used to reference the security type in SnapTrade API calls.
|
|
9
|
+
* @type {string}
|
|
10
|
+
* @memberof UnderlyingSymbolType
|
|
11
|
+
*/
|
|
12
|
+
'id'?: string;
|
|
13
|
+
/**
|
|
14
|
+
* A short code representing the security type. For example, \"cs\" for Common Stock. Here are some common values: ad - ADR bnd - Bond cs - Common Stock cef - Closed End Fund et - ETF oef - Open Ended Fund ps - Preferred Stock rt - Right struct - Structured Product ut - Unit wi - When Issued wt - Warrant
|
|
15
|
+
* @type {string}
|
|
16
|
+
* @memberof UnderlyingSymbolType
|
|
17
|
+
*/
|
|
18
|
+
'code'?: string;
|
|
19
|
+
/**
|
|
20
|
+
* A human-readable description of the security type. For example, \"Common Stock\" or \"ETF\".
|
|
21
|
+
* @type {string}
|
|
22
|
+
* @memberof UnderlyingSymbolType
|
|
23
|
+
*/
|
|
24
|
+
'description'?: string;
|
|
25
|
+
/**
|
|
26
|
+
* This field is deprecated and should not be used. Please reach out to SnapTrade support if you have a valid usecase for this.
|
|
27
|
+
* @type {boolean}
|
|
28
|
+
* @memberof UnderlyingSymbolType
|
|
29
|
+
* @deprecated
|
|
30
|
+
*/
|
|
31
|
+
'is_supported'?: boolean;
|
|
32
|
+
}
|
|
@@ -1,58 +1,66 @@
|
|
|
1
1
|
import { Currency } from './currency';
|
|
2
|
-
import { SecurityType } from './security-type';
|
|
3
2
|
import { SymbolFigiInstrument } from './symbol-figi-instrument';
|
|
4
|
-
import {
|
|
3
|
+
import { UnderlyingSymbolExchange } from './underlying-symbol-exchange';
|
|
4
|
+
import { UnderlyingSymbolType } from './underlying-symbol-type';
|
|
5
|
+
import { UniversalSymbolCurrency } from './universal-symbol-currency';
|
|
5
6
|
/**
|
|
6
|
-
*
|
|
7
|
+
* Symbol object for the underlying security of an option.
|
|
7
8
|
* @export
|
|
8
9
|
* @interface UnderlyingSymbol
|
|
9
10
|
*/
|
|
10
11
|
export interface UnderlyingSymbol {
|
|
11
12
|
[key: string]: any;
|
|
12
13
|
/**
|
|
13
|
-
*
|
|
14
|
+
* Unique identifier for the symbol within SnapTrade. This is the ID used to reference the symbol in SnapTrade API calls.
|
|
14
15
|
* @type {string}
|
|
15
16
|
* @memberof UnderlyingSymbol
|
|
16
17
|
*/
|
|
17
18
|
'id'?: string;
|
|
18
19
|
/**
|
|
19
|
-
*
|
|
20
|
+
* 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
21
|
* @type {string}
|
|
21
22
|
* @memberof UnderlyingSymbol
|
|
22
23
|
*/
|
|
23
24
|
'symbol'?: string;
|
|
24
25
|
/**
|
|
25
|
-
*
|
|
26
|
+
* The raw symbol is `symbol` with the exchange suffix removed. For example, if `symbol` is \"VAB.TO\", then `raw_symbol` is \"VAB\".
|
|
27
|
+
* @type {string}
|
|
28
|
+
* @memberof UnderlyingSymbol
|
|
29
|
+
*/
|
|
30
|
+
'raw_symbol'?: string;
|
|
31
|
+
/**
|
|
32
|
+
* A human-readable description of the security. This is usually the company name or ETF name.
|
|
26
33
|
* @type {string}
|
|
27
34
|
* @memberof UnderlyingSymbol
|
|
28
35
|
*/
|
|
29
36
|
'description'?: string | null;
|
|
30
37
|
/**
|
|
31
38
|
*
|
|
32
|
-
* @type {
|
|
39
|
+
* @type {UniversalSymbolCurrency}
|
|
33
40
|
* @memberof UnderlyingSymbol
|
|
34
41
|
*/
|
|
35
|
-
'currency'?:
|
|
42
|
+
'currency'?: UniversalSymbolCurrency;
|
|
36
43
|
/**
|
|
37
44
|
*
|
|
38
|
-
* @type {
|
|
45
|
+
* @type {UnderlyingSymbolExchange}
|
|
39
46
|
* @memberof UnderlyingSymbol
|
|
40
47
|
*/
|
|
41
|
-
'exchange'?:
|
|
48
|
+
'exchange'?: UnderlyingSymbolExchange;
|
|
42
49
|
/**
|
|
43
50
|
*
|
|
44
|
-
* @type {
|
|
51
|
+
* @type {UnderlyingSymbolType}
|
|
45
52
|
* @memberof UnderlyingSymbol
|
|
46
53
|
*/
|
|
47
|
-
'type'?:
|
|
54
|
+
'type'?: UnderlyingSymbolType;
|
|
48
55
|
/**
|
|
49
|
-
*
|
|
56
|
+
* This field is deprecated and should not be used. Please reach out to SnapTrade support if you have a valid usecase for this.
|
|
50
57
|
* @type {Array<Currency>}
|
|
51
58
|
* @memberof UnderlyingSymbol
|
|
59
|
+
* @deprecated
|
|
52
60
|
*/
|
|
53
61
|
'currencies'?: Array<Currency>;
|
|
54
62
|
/**
|
|
55
|
-
*
|
|
63
|
+
* 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
64
|
* @type {string}
|
|
57
65
|
* @memberof UnderlyingSymbol
|
|
58
66
|
*/
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The currency in which the security is traded.
|
|
3
|
+
* @export
|
|
4
|
+
* @interface UniversalSymbolCurrency
|
|
5
|
+
*/
|
|
6
|
+
export interface UniversalSymbolCurrency {
|
|
7
|
+
/**
|
|
8
|
+
* Unique identifier for the currency. This is the UUID used to reference the currency in SnapTrade.
|
|
9
|
+
* @type {string}
|
|
10
|
+
* @memberof UniversalSymbolCurrency
|
|
11
|
+
*/
|
|
12
|
+
'id'?: string;
|
|
13
|
+
/**
|
|
14
|
+
* The ISO-4217 currency code for the currency.
|
|
15
|
+
* @type {string}
|
|
16
|
+
* @memberof UniversalSymbolCurrency
|
|
17
|
+
*/
|
|
18
|
+
'code'?: string;
|
|
19
|
+
/**
|
|
20
|
+
* A human-friendly name of the currency.
|
|
21
|
+
* @type {string}
|
|
22
|
+
* @memberof UniversalSymbolCurrency
|
|
23
|
+
*/
|
|
24
|
+
'name'?: string;
|
|
25
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The exchange on which the security is listed and traded.
|
|
3
|
+
* @export
|
|
4
|
+
* @interface UniversalSymbolExchange
|
|
5
|
+
*/
|
|
6
|
+
export interface UniversalSymbolExchange {
|
|
7
|
+
/**
|
|
8
|
+
* Unique ID for the exchange in SnapTrade.
|
|
9
|
+
* @type {string}
|
|
10
|
+
* @memberof UniversalSymbolExchange
|
|
11
|
+
*/
|
|
12
|
+
'id'?: string;
|
|
13
|
+
/**
|
|
14
|
+
* A short name for the exchange. For standardized exchange code, please us the `mic_code` field.
|
|
15
|
+
* @type {string}
|
|
16
|
+
* @memberof UniversalSymbolExchange
|
|
17
|
+
*/
|
|
18
|
+
'code'?: string;
|
|
19
|
+
/**
|
|
20
|
+
* The [Market Identifier Code](https://en.wikipedia.org/wiki/Market_Identifier_Code) (MIC) for the exchange.
|
|
21
|
+
* @type {string}
|
|
22
|
+
* @memberof UniversalSymbolExchange
|
|
23
|
+
*/
|
|
24
|
+
'mic_code'?: string;
|
|
25
|
+
/**
|
|
26
|
+
* The full name of the exchange.
|
|
27
|
+
* @type {string}
|
|
28
|
+
* @memberof UniversalSymbolExchange
|
|
29
|
+
*/
|
|
30
|
+
'name'?: string;
|
|
31
|
+
/**
|
|
32
|
+
* The timezone for the trading hours (`start_time` and `close_time`) of the exchange.
|
|
33
|
+
* @type {string}
|
|
34
|
+
* @memberof UniversalSymbolExchange
|
|
35
|
+
*/
|
|
36
|
+
'timezone'?: string;
|
|
37
|
+
/**
|
|
38
|
+
* The time when the exchange opens for trading.
|
|
39
|
+
* @type {string}
|
|
40
|
+
* @memberof UniversalSymbolExchange
|
|
41
|
+
*/
|
|
42
|
+
'start_time'?: string;
|
|
43
|
+
/**
|
|
44
|
+
* The time when the exchange closes for trading.
|
|
45
|
+
* @type {string}
|
|
46
|
+
* @memberof UniversalSymbolExchange
|
|
47
|
+
*/
|
|
48
|
+
'close_time'?: string;
|
|
49
|
+
/**
|
|
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
|
+
* @type {string}
|
|
52
|
+
* @memberof UniversalSymbolExchange
|
|
53
|
+
*/
|
|
54
|
+
'suffix'?: string | null;
|
|
55
|
+
}
|
|
@@ -1,50 +1,51 @@
|
|
|
1
1
|
import { Currency } from './currency';
|
|
2
|
-
import { Exchange } from './exchange';
|
|
3
2
|
import { SecurityType } from './security-type';
|
|
4
3
|
import { SymbolFigiInstrument } from './symbol-figi-instrument';
|
|
4
|
+
import { UniversalSymbolCurrency } from './universal-symbol-currency';
|
|
5
|
+
import { UniversalSymbolExchange } from './universal-symbol-exchange';
|
|
5
6
|
/**
|
|
6
|
-
*
|
|
7
|
+
* Uniquely describes a single security + exchange combination across all brokerages.
|
|
7
8
|
* @export
|
|
8
9
|
* @interface UniversalSymbol
|
|
9
10
|
*/
|
|
10
11
|
export interface UniversalSymbol {
|
|
11
12
|
[key: string]: any;
|
|
12
13
|
/**
|
|
13
|
-
*
|
|
14
|
+
* Unique identifier for the symbol within SnapTrade. This is the ID used to reference the symbol in SnapTrade API calls.
|
|
14
15
|
* @type {string}
|
|
15
16
|
* @memberof UniversalSymbol
|
|
16
17
|
*/
|
|
17
18
|
'id': string;
|
|
18
19
|
/**
|
|
19
|
-
*
|
|
20
|
+
* 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
21
|
* @type {string}
|
|
21
22
|
* @memberof UniversalSymbol
|
|
22
23
|
*/
|
|
23
24
|
'symbol': string;
|
|
24
25
|
/**
|
|
25
|
-
*
|
|
26
|
+
* The raw symbol is `symbol` with the exchange suffix removed. For example, if `symbol` is \"VAB.TO\", then `raw_symbol` is \"VAB\".
|
|
26
27
|
* @type {string}
|
|
27
28
|
* @memberof UniversalSymbol
|
|
28
29
|
*/
|
|
29
30
|
'raw_symbol': string;
|
|
30
31
|
/**
|
|
31
|
-
*
|
|
32
|
+
* A human-readable description of the security. This is usually the company name or ETF name.
|
|
32
33
|
* @type {string}
|
|
33
34
|
* @memberof UniversalSymbol
|
|
34
35
|
*/
|
|
35
36
|
'description'?: string | null;
|
|
36
37
|
/**
|
|
37
38
|
*
|
|
38
|
-
* @type {
|
|
39
|
+
* @type {UniversalSymbolCurrency}
|
|
39
40
|
* @memberof UniversalSymbol
|
|
40
41
|
*/
|
|
41
|
-
'currency':
|
|
42
|
+
'currency': UniversalSymbolCurrency;
|
|
42
43
|
/**
|
|
43
44
|
*
|
|
44
|
-
* @type {
|
|
45
|
+
* @type {UniversalSymbolExchange}
|
|
45
46
|
* @memberof UniversalSymbol
|
|
46
47
|
*/
|
|
47
|
-
'exchange'?:
|
|
48
|
+
'exchange'?: UniversalSymbolExchange;
|
|
48
49
|
/**
|
|
49
50
|
*
|
|
50
51
|
* @type {SecurityType}
|
|
@@ -52,13 +53,14 @@ export interface UniversalSymbol {
|
|
|
52
53
|
*/
|
|
53
54
|
'type': SecurityType;
|
|
54
55
|
/**
|
|
55
|
-
*
|
|
56
|
+
* This field is deprecated and should not be used. Please reach out to SnapTrade support if you have a valid usecase for this.
|
|
56
57
|
* @type {Array<Currency>}
|
|
57
58
|
* @memberof UniversalSymbol
|
|
59
|
+
* @deprecated
|
|
58
60
|
*/
|
|
59
61
|
'currencies': Array<Currency>;
|
|
60
62
|
/**
|
|
61
|
-
*
|
|
63
|
+
* 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.
|
|
62
64
|
* @type {string}
|
|
63
65
|
* @memberof UniversalSymbol
|
|
64
66
|
*/
|
package/package.json
CHANGED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
*
|
|
3
|
-
* @export
|
|
4
|
-
* @interface BrokerageAuthorizationType
|
|
5
|
-
*/
|
|
6
|
-
export interface BrokerageAuthorizationType {
|
|
7
|
-
[key: string]: any;
|
|
8
|
-
/**
|
|
9
|
-
*
|
|
10
|
-
* @type {string}
|
|
11
|
-
* @memberof BrokerageAuthorizationType
|
|
12
|
-
*/
|
|
13
|
-
'type'?: BrokerageAuthorizationTypeTypeEnum;
|
|
14
|
-
}
|
|
15
|
-
type BrokerageAuthorizationTypeTypeEnum = 'read' | 'trade';
|
|
16
|
-
export {};
|