snaptrade-typescript-sdk 9.0.187 → 9.0.189
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 +128 -1
- package/dist/api/experimental-endpoints-api-generated.d.ts +75 -0
- package/dist/api/experimental-endpoints-api-generated.js +97 -0
- package/dist/api/trading-api-generated.d.ts +63 -0
- package/dist/api/trading-api-generated.js +100 -0
- package/dist/browser.js +1 -1
- package/dist/configuration.js +1 -1
- package/dist/models/account-order-record-quote-universal-symbol.d.ts +3 -3
- package/dist/models/account-order-record-universal-symbol.d.ts +3 -3
- package/dist/models/account-position.d.ts +52 -0
- package/dist/models/account-universal-activity-symbol.d.ts +3 -3
- package/dist/models/all-account-positions-response.d.ts +33 -0
- package/dist/models/all-account-positions-response.js +2 -0
- package/dist/models/complex-order-leg.d.ts +62 -0
- package/dist/models/complex-order-leg.js +2 -0
- package/dist/models/complex-order-response.d.ts +22 -0
- package/dist/models/complex-order-response.js +2 -0
- package/dist/models/crypto-instrument.d.ts +59 -0
- package/dist/models/crypto-instrument.js +2 -0
- package/dist/models/etf-instrument.d.ts +59 -0
- package/dist/models/etf-instrument.js +2 -0
- package/dist/models/future-instrument.d.ts +64 -0
- package/dist/models/future-instrument.js +2 -0
- package/dist/models/index.d.ts +14 -1
- package/dist/models/index.js +14 -1
- package/dist/models/instrument.d.ts +24 -0
- package/dist/models/instrument.js +2 -0
- package/dist/models/manual-trade-form-complex.d.ts +28 -0
- package/dist/models/manual-trade-form-complex.js +2 -0
- package/dist/models/option-instrument.d.ts +60 -0
- package/dist/models/option-instrument.js +2 -0
- package/dist/models/other-instrument.d.ts +59 -0
- package/dist/models/other-instrument.js +2 -0
- package/dist/models/{symbol-figi-instrument.d.ts → stock-instrument-figi-instrument.d.ts} +4 -4
- package/dist/models/stock-instrument-figi-instrument.js +2 -0
- package/dist/models/stock-instrument.d.ts +59 -0
- package/dist/models/stock-instrument.js +2 -0
- package/dist/models/symbol.d.ts +3 -3
- package/dist/models/underlying-option-instrument.d.ts +18 -0
- package/dist/models/underlying-option-instrument.js +2 -0
- package/dist/models/underlying-symbol.d.ts +3 -3
- package/dist/models/universal-symbol.d.ts +3 -3
- package/dist/operationParameterMap.js +41 -0
- package/package.json +1 -1
- /package/dist/models/{symbol-figi-instrument.js → account-position.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.189/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 { StockInstrumentFigiInstrument } from './stock-instrument-figi-instrument';
|
|
3
4
|
import { SymbolCurrency } from './symbol-currency';
|
|
4
5
|
import { SymbolExchange } from './symbol-exchange';
|
|
5
|
-
import { SymbolFigiInstrument } from './symbol-figi-instrument';
|
|
6
6
|
/**
|
|
7
7
|
* Quote cryptocurrency. This field is only present for cryptocurrency pair orders with a cryptocurrency as quote.
|
|
8
8
|
* @export
|
|
@@ -59,10 +59,10 @@ export interface AccountOrderRecordQuoteUniversalSymbol {
|
|
|
59
59
|
'figi_code'?: string | null;
|
|
60
60
|
/**
|
|
61
61
|
*
|
|
62
|
-
* @type {
|
|
62
|
+
* @type {StockInstrumentFigiInstrument}
|
|
63
63
|
* @memberof AccountOrderRecordQuoteUniversalSymbol
|
|
64
64
|
*/
|
|
65
|
-
'figi_instrument'?:
|
|
65
|
+
'figi_instrument'?: StockInstrumentFigiInstrument | null;
|
|
66
66
|
/**
|
|
67
67
|
* This field is deprecated and should not be used. Please reach out to SnapTrade support if you have a valid use case for this.
|
|
68
68
|
* @type {Array<Currency>}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Currency } from './currency';
|
|
2
2
|
import { SecurityType } from './security-type';
|
|
3
|
+
import { StockInstrumentFigiInstrument } from './stock-instrument-figi-instrument';
|
|
3
4
|
import { SymbolCurrency } from './symbol-currency';
|
|
4
5
|
import { SymbolExchange } from './symbol-exchange';
|
|
5
|
-
import { SymbolFigiInstrument } from './symbol-figi-instrument';
|
|
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
|
|
@@ -59,10 +59,10 @@ export interface AccountOrderRecordUniversalSymbol {
|
|
|
59
59
|
'figi_code'?: string | null;
|
|
60
60
|
/**
|
|
61
61
|
*
|
|
62
|
-
* @type {
|
|
62
|
+
* @type {StockInstrumentFigiInstrument}
|
|
63
63
|
* @memberof AccountOrderRecordUniversalSymbol
|
|
64
64
|
*/
|
|
65
|
-
'figi_instrument'?:
|
|
65
|
+
'figi_instrument'?: StockInstrumentFigiInstrument | null;
|
|
66
66
|
/**
|
|
67
67
|
* This field is deprecated and should not be used. Please reach out to SnapTrade support if you have a valid use case for this.
|
|
68
68
|
* @type {Array<Currency>}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { Instrument } from './instrument';
|
|
2
|
+
import { TaxLot } from './tax-lot';
|
|
3
|
+
/**
|
|
4
|
+
* Describes a single position.
|
|
5
|
+
* @export
|
|
6
|
+
* @interface AccountPosition
|
|
7
|
+
*/
|
|
8
|
+
export interface AccountPosition {
|
|
9
|
+
[key: string]: any;
|
|
10
|
+
/**
|
|
11
|
+
*
|
|
12
|
+
* @type {Instrument}
|
|
13
|
+
* @memberof AccountPosition
|
|
14
|
+
*/
|
|
15
|
+
'instrument': Instrument;
|
|
16
|
+
/**
|
|
17
|
+
* The number of units held in the position. Positive numbers indicate long positions and negative numbers indicate short positions.
|
|
18
|
+
* @type {string}
|
|
19
|
+
* @memberof AccountPosition
|
|
20
|
+
*/
|
|
21
|
+
'units'?: string | null;
|
|
22
|
+
/**
|
|
23
|
+
* Last known market price for the position.
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof AccountPosition
|
|
26
|
+
*/
|
|
27
|
+
'price'?: string | null;
|
|
28
|
+
/**
|
|
29
|
+
* Book price or average purchase price for the position.
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof AccountPosition
|
|
32
|
+
*/
|
|
33
|
+
'cost_basis'?: string | null;
|
|
34
|
+
/**
|
|
35
|
+
* ISO-4217 currency code for the position `price` and `cost_basis`.
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof AccountPosition
|
|
38
|
+
*/
|
|
39
|
+
'currency'?: string | null;
|
|
40
|
+
/**
|
|
41
|
+
* Present for stock positions that are also counted in cash balance or buying power.
|
|
42
|
+
* @type {boolean}
|
|
43
|
+
* @memberof AccountPosition
|
|
44
|
+
*/
|
|
45
|
+
'cash_equivalent'?: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Present for stock positions when tax lot data is enabled for the account.
|
|
48
|
+
* @type {Array<TaxLot>}
|
|
49
|
+
* @memberof AccountPosition
|
|
50
|
+
*/
|
|
51
|
+
'tax_lots'?: Array<TaxLot>;
|
|
52
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SecurityType } from './security-type';
|
|
2
|
+
import { StockInstrumentFigiInstrument } from './stock-instrument-figi-instrument';
|
|
2
3
|
import { SymbolCurrency } from './symbol-currency';
|
|
3
4
|
import { SymbolExchange } from './symbol-exchange';
|
|
4
|
-
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
|
|
@@ -58,8 +58,8 @@ export interface AccountUniversalActivitySymbol {
|
|
|
58
58
|
'figi_code'?: string | null;
|
|
59
59
|
/**
|
|
60
60
|
*
|
|
61
|
-
* @type {
|
|
61
|
+
* @type {StockInstrumentFigiInstrument}
|
|
62
62
|
* @memberof AccountUniversalActivitySymbol
|
|
63
63
|
*/
|
|
64
|
-
'figi_instrument'?:
|
|
64
|
+
'figi_instrument'?: StockInstrumentFigiInstrument | null;
|
|
65
65
|
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { AccountPosition } from './account-position';
|
|
2
|
+
/**
|
|
3
|
+
* A paginated list of all account positions.
|
|
4
|
+
* @export
|
|
5
|
+
* @interface AllAccountPositionsResponse
|
|
6
|
+
*/
|
|
7
|
+
export interface AllAccountPositionsResponse {
|
|
8
|
+
[key: string]: any;
|
|
9
|
+
/**
|
|
10
|
+
* The total number of positions available across all pages.
|
|
11
|
+
* @type {number}
|
|
12
|
+
* @memberof AllAccountPositionsResponse
|
|
13
|
+
*/
|
|
14
|
+
'count': number;
|
|
15
|
+
/**
|
|
16
|
+
* The URL for the next page of results, or `null` if there is no next page.
|
|
17
|
+
* @type {string}
|
|
18
|
+
* @memberof AllAccountPositionsResponse
|
|
19
|
+
*/
|
|
20
|
+
'next': string | null;
|
|
21
|
+
/**
|
|
22
|
+
* The URL for the previous page of results, or `null` if there is no previous page.
|
|
23
|
+
* @type {string}
|
|
24
|
+
* @memberof AllAccountPositionsResponse
|
|
25
|
+
*/
|
|
26
|
+
'previous': string | null;
|
|
27
|
+
/**
|
|
28
|
+
* Positions returned for the current page.
|
|
29
|
+
* @type {Array<AccountPosition>}
|
|
30
|
+
* @memberof AllAccountPositionsResponse
|
|
31
|
+
*/
|
|
32
|
+
'results': Array<AccountPosition>;
|
|
33
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { ActionStrict } from './action-strict';
|
|
2
|
+
import { OrderTypeStrict } from './order-type-strict';
|
|
3
|
+
import { TimeInForceStrict } from './time-in-force-strict';
|
|
4
|
+
import { TradingInstrument } from './trading-instrument';
|
|
5
|
+
/**
|
|
6
|
+
* A single leg within a complex order.
|
|
7
|
+
* @export
|
|
8
|
+
* @interface ComplexOrderLeg
|
|
9
|
+
*/
|
|
10
|
+
export interface ComplexOrderLeg {
|
|
11
|
+
[key: string]: any;
|
|
12
|
+
/**
|
|
13
|
+
* The role of this leg within the complex order.
|
|
14
|
+
* @type {string}
|
|
15
|
+
* @memberof ComplexOrderLeg
|
|
16
|
+
*/
|
|
17
|
+
'order_role': ComplexOrderLegOrderRoleEnum;
|
|
18
|
+
/**
|
|
19
|
+
* The action describes the intent or side of a trade. This is either `BUY` or `SELL`.
|
|
20
|
+
* @type {ActionStrict}
|
|
21
|
+
* @memberof ComplexOrderLeg
|
|
22
|
+
*/
|
|
23
|
+
'action': ActionStrict;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {TradingInstrument}
|
|
27
|
+
* @memberof ComplexOrderLeg
|
|
28
|
+
*/
|
|
29
|
+
'instrument': TradingInstrument;
|
|
30
|
+
/**
|
|
31
|
+
* The type of order to place. - For `Limit` and `StopLimit` orders, the `price` field is required. - For `Stop` and `StopLimit` orders, the `stop` field is required.
|
|
32
|
+
* @type {OrderTypeStrict}
|
|
33
|
+
* @memberof ComplexOrderLeg
|
|
34
|
+
*/
|
|
35
|
+
'order_type': OrderTypeStrict;
|
|
36
|
+
/**
|
|
37
|
+
* Number of shares for the order. This can be a decimal for fractional orders. Must be `null` if `notional_value` is provided.
|
|
38
|
+
* @type {number}
|
|
39
|
+
* @memberof ComplexOrderLeg
|
|
40
|
+
*/
|
|
41
|
+
'units': number;
|
|
42
|
+
/**
|
|
43
|
+
* The Time in Force type for the order. This field indicates how long the order will remain active before it is executed or expires. Here are the supported values: - `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.
|
|
44
|
+
* @type {TimeInForceStrict}
|
|
45
|
+
* @memberof ComplexOrderLeg
|
|
46
|
+
*/
|
|
47
|
+
'time_in_force': TimeInForceStrict;
|
|
48
|
+
/**
|
|
49
|
+
* The limit price. Required when `order_type` is `Limit` or `StopLimit`.
|
|
50
|
+
* @type {number}
|
|
51
|
+
* @memberof ComplexOrderLeg
|
|
52
|
+
*/
|
|
53
|
+
'price'?: number | null;
|
|
54
|
+
/**
|
|
55
|
+
* The stop trigger price. Required when `order_type` is `Stop` or `StopLimit`.
|
|
56
|
+
* @type {number}
|
|
57
|
+
* @memberof ComplexOrderLeg
|
|
58
|
+
*/
|
|
59
|
+
'stop'?: number | null;
|
|
60
|
+
}
|
|
61
|
+
type ComplexOrderLegOrderRoleEnum = 'TRIGGER' | 'CONDITIONAL' | 'PEER';
|
|
62
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Response returned after successfully placing a complex order. AccountOrderRecord rows for the legs are not created synchronously — they\'re hydrated by the next brokerage sync, and can be queried later using the returned `brokerage_group_order_id`.
|
|
3
|
+
* @export
|
|
4
|
+
* @interface ComplexOrderResponse
|
|
5
|
+
*/
|
|
6
|
+
export interface ComplexOrderResponse {
|
|
7
|
+
[key: string]: any;
|
|
8
|
+
/**
|
|
9
|
+
* The complex order type that was placed.
|
|
10
|
+
* @type {string}
|
|
11
|
+
* @memberof ComplexOrderResponse
|
|
12
|
+
*/
|
|
13
|
+
'type'?: ComplexOrderResponseTypeEnum;
|
|
14
|
+
/**
|
|
15
|
+
* The brokerage-assigned identifier that links all legs of this complex order together. Each leg will eventually appear as a separate AccountOrderRecord sharing this value. May be null if the brokerage does not return a group identifier.
|
|
16
|
+
* @type {string}
|
|
17
|
+
* @memberof ComplexOrderResponse
|
|
18
|
+
*/
|
|
19
|
+
'brokerage_group_order_id'?: string | null;
|
|
20
|
+
}
|
|
21
|
+
type ComplexOrderResponseTypeEnum = 'OCO' | 'OTO' | 'OTOCO';
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { StockInstrumentFigiInstrument } from './stock-instrument-figi-instrument';
|
|
2
|
+
/**
|
|
3
|
+
* Security instrument metadata for crypto positions.
|
|
4
|
+
* @export
|
|
5
|
+
* @interface CryptoInstrument
|
|
6
|
+
*/
|
|
7
|
+
export interface CryptoInstrument {
|
|
8
|
+
[key: string]: any;
|
|
9
|
+
/**
|
|
10
|
+
* Type of security instrument.
|
|
11
|
+
* @type {string}
|
|
12
|
+
* @memberof CryptoInstrument
|
|
13
|
+
*/
|
|
14
|
+
'kind': CryptoInstrumentKindEnum;
|
|
15
|
+
/**
|
|
16
|
+
* Unique identifier for the instrument.
|
|
17
|
+
* @type {string}
|
|
18
|
+
* @memberof CryptoInstrument
|
|
19
|
+
*/
|
|
20
|
+
'id': string;
|
|
21
|
+
/**
|
|
22
|
+
* The formatted trading symbol for the security.
|
|
23
|
+
* @type {string}
|
|
24
|
+
* @memberof CryptoInstrument
|
|
25
|
+
*/
|
|
26
|
+
'symbol': string;
|
|
27
|
+
/**
|
|
28
|
+
* The raw symbol without any exchange suffix.
|
|
29
|
+
* @type {string}
|
|
30
|
+
* @memberof CryptoInstrument
|
|
31
|
+
*/
|
|
32
|
+
'raw_symbol': string;
|
|
33
|
+
/**
|
|
34
|
+
* Human-readable description of the security.
|
|
35
|
+
* @type {string}
|
|
36
|
+
* @memberof CryptoInstrument
|
|
37
|
+
*/
|
|
38
|
+
'description'?: string | null;
|
|
39
|
+
/**
|
|
40
|
+
* ISO-4217 currency code for the security listing.
|
|
41
|
+
* @type {string}
|
|
42
|
+
* @memberof CryptoInstrument
|
|
43
|
+
*/
|
|
44
|
+
'currency'?: string | null;
|
|
45
|
+
/**
|
|
46
|
+
* Exchange MIC code or exchange code for the security.
|
|
47
|
+
* @type {string}
|
|
48
|
+
* @memberof CryptoInstrument
|
|
49
|
+
*/
|
|
50
|
+
'exchange'?: string | null;
|
|
51
|
+
/**
|
|
52
|
+
*
|
|
53
|
+
* @type {StockInstrumentFigiInstrument}
|
|
54
|
+
* @memberof CryptoInstrument
|
|
55
|
+
*/
|
|
56
|
+
'figi_instrument'?: StockInstrumentFigiInstrument | null;
|
|
57
|
+
}
|
|
58
|
+
type CryptoInstrumentKindEnum = 'crypto';
|
|
59
|
+
export {};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { StockInstrumentFigiInstrument } from './stock-instrument-figi-instrument';
|
|
2
|
+
/**
|
|
3
|
+
* Security instrument metadata for ETF positions.
|
|
4
|
+
* @export
|
|
5
|
+
* @interface EtfInstrument
|
|
6
|
+
*/
|
|
7
|
+
export interface EtfInstrument {
|
|
8
|
+
[key: string]: any;
|
|
9
|
+
/**
|
|
10
|
+
* Type of security instrument.
|
|
11
|
+
* @type {string}
|
|
12
|
+
* @memberof EtfInstrument
|
|
13
|
+
*/
|
|
14
|
+
'kind': EtfInstrumentKindEnum;
|
|
15
|
+
/**
|
|
16
|
+
* Unique identifier for the instrument.
|
|
17
|
+
* @type {string}
|
|
18
|
+
* @memberof EtfInstrument
|
|
19
|
+
*/
|
|
20
|
+
'id': string;
|
|
21
|
+
/**
|
|
22
|
+
* The formatted trading symbol for the security.
|
|
23
|
+
* @type {string}
|
|
24
|
+
* @memberof EtfInstrument
|
|
25
|
+
*/
|
|
26
|
+
'symbol': string;
|
|
27
|
+
/**
|
|
28
|
+
* The raw symbol without any exchange suffix.
|
|
29
|
+
* @type {string}
|
|
30
|
+
* @memberof EtfInstrument
|
|
31
|
+
*/
|
|
32
|
+
'raw_symbol': string;
|
|
33
|
+
/**
|
|
34
|
+
* Human-readable description of the security.
|
|
35
|
+
* @type {string}
|
|
36
|
+
* @memberof EtfInstrument
|
|
37
|
+
*/
|
|
38
|
+
'description'?: string | null;
|
|
39
|
+
/**
|
|
40
|
+
* ISO-4217 currency code for the security listing.
|
|
41
|
+
* @type {string}
|
|
42
|
+
* @memberof EtfInstrument
|
|
43
|
+
*/
|
|
44
|
+
'currency'?: string | null;
|
|
45
|
+
/**
|
|
46
|
+
* Exchange MIC code or exchange code for the security.
|
|
47
|
+
* @type {string}
|
|
48
|
+
* @memberof EtfInstrument
|
|
49
|
+
*/
|
|
50
|
+
'exchange'?: string | null;
|
|
51
|
+
/**
|
|
52
|
+
*
|
|
53
|
+
* @type {StockInstrumentFigiInstrument}
|
|
54
|
+
* @memberof EtfInstrument
|
|
55
|
+
*/
|
|
56
|
+
'figi_instrument'?: StockInstrumentFigiInstrument | null;
|
|
57
|
+
}
|
|
58
|
+
type EtfInstrumentKindEnum = 'etf';
|
|
59
|
+
export {};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Future instrument metadata for a V2 position.
|
|
3
|
+
* @export
|
|
4
|
+
* @interface FutureInstrument
|
|
5
|
+
*/
|
|
6
|
+
export interface FutureInstrument {
|
|
7
|
+
[key: string]: any;
|
|
8
|
+
/**
|
|
9
|
+
*
|
|
10
|
+
* @type {string}
|
|
11
|
+
* @memberof FutureInstrument
|
|
12
|
+
*/
|
|
13
|
+
'kind': FutureInstrumentKindEnum;
|
|
14
|
+
/**
|
|
15
|
+
* Unique identifier for the future instrument.
|
|
16
|
+
* @type {string}
|
|
17
|
+
* @memberof FutureInstrument
|
|
18
|
+
*/
|
|
19
|
+
'id': string;
|
|
20
|
+
/**
|
|
21
|
+
* Display symbol for the future contract.
|
|
22
|
+
* @type {string}
|
|
23
|
+
* @memberof FutureInstrument
|
|
24
|
+
*/
|
|
25
|
+
'symbol': string;
|
|
26
|
+
/**
|
|
27
|
+
* Root symbol for the future contract.
|
|
28
|
+
* @type {string}
|
|
29
|
+
* @memberof FutureInstrument
|
|
30
|
+
*/
|
|
31
|
+
'root_symbol': string;
|
|
32
|
+
/**
|
|
33
|
+
* Exchange expiration code for the contract.
|
|
34
|
+
* @type {string}
|
|
35
|
+
* @memberof FutureInstrument
|
|
36
|
+
*/
|
|
37
|
+
'expiration_code': string;
|
|
38
|
+
/**
|
|
39
|
+
* Expiration date of the contract.
|
|
40
|
+
* @type {string}
|
|
41
|
+
* @memberof FutureInstrument
|
|
42
|
+
*/
|
|
43
|
+
'expiration_date'?: string | null;
|
|
44
|
+
/**
|
|
45
|
+
* Multiplier for the future contract.
|
|
46
|
+
* @type {string}
|
|
47
|
+
* @memberof FutureInstrument
|
|
48
|
+
*/
|
|
49
|
+
'multiplier'?: string | null;
|
|
50
|
+
/**
|
|
51
|
+
* ISO-4217 currency code for the contract.
|
|
52
|
+
* @type {string}
|
|
53
|
+
* @memberof FutureInstrument
|
|
54
|
+
*/
|
|
55
|
+
'currency'?: string | null;
|
|
56
|
+
/**
|
|
57
|
+
* Exchange MIC code or exchange code for the contract.
|
|
58
|
+
* @type {string}
|
|
59
|
+
* @memberof FutureInstrument
|
|
60
|
+
*/
|
|
61
|
+
'exchange'?: string | null;
|
|
62
|
+
}
|
|
63
|
+
type FutureInstrumentKindEnum = 'future';
|
|
64
|
+
export {};
|
package/dist/models/index.d.ts
CHANGED
|
@@ -17,6 +17,7 @@ export * from './account-order-record-trailing-stop';
|
|
|
17
17
|
export * from './account-order-record-universal-symbol';
|
|
18
18
|
export * from './account-order-record-v2';
|
|
19
19
|
export * from './account-orders-v2-response';
|
|
20
|
+
export * from './account-position';
|
|
20
21
|
export * from './account-simple';
|
|
21
22
|
export * from './account-sync-status';
|
|
22
23
|
export * from './account-universal-activity';
|
|
@@ -27,6 +28,7 @@ export * from './account-value-history-item';
|
|
|
27
28
|
export * from './account-value-history-response';
|
|
28
29
|
export * from './action-strict';
|
|
29
30
|
export * from './action-strict-with-options';
|
|
31
|
+
export * from './all-account-positions-response';
|
|
30
32
|
export * from './authentication-login-snap-trade-user200-response';
|
|
31
33
|
export * from './balance';
|
|
32
34
|
export * from './balance-currency';
|
|
@@ -42,7 +44,10 @@ export * from './brokerage-instruments-response';
|
|
|
42
44
|
export * from './brokerage-type';
|
|
43
45
|
export * from './cancel-order-response';
|
|
44
46
|
export * from './child-brokerage-order-ids';
|
|
47
|
+
export * from './complex-order-leg';
|
|
48
|
+
export * from './complex-order-response';
|
|
45
49
|
export * from './connections-session-events200-response-inner';
|
|
50
|
+
export * from './crypto-instrument';
|
|
46
51
|
export * from './crypto-order-form';
|
|
47
52
|
export * from './crypto-order-preview';
|
|
48
53
|
export * from './crypto-order-preview-estimated-fee';
|
|
@@ -55,16 +60,20 @@ export * from './delete-user-response';
|
|
|
55
60
|
export * from './dividend-at-date';
|
|
56
61
|
export * from './encrypted-response';
|
|
57
62
|
export * from './encrypted-response-encrypted-message-data';
|
|
63
|
+
export * from './etf-instrument';
|
|
58
64
|
export * from './exchange';
|
|
59
65
|
export * from './exchange-rate-pairs';
|
|
60
66
|
export * from './figi-instrument';
|
|
67
|
+
export * from './future-instrument';
|
|
61
68
|
export * from './holdings-status';
|
|
69
|
+
export * from './instrument';
|
|
62
70
|
export * from './login-redirect-uri';
|
|
63
71
|
export * from './manual-trade';
|
|
64
72
|
export * from './manual-trade-and-impact';
|
|
65
73
|
export * from './manual-trade-balance';
|
|
66
74
|
export * from './manual-trade-form';
|
|
67
75
|
export * from './manual-trade-form-bracket';
|
|
76
|
+
export * from './manual-trade-form-complex';
|
|
68
77
|
export * from './manual-trade-form-notional-value';
|
|
69
78
|
export * from './manual-trade-form-with-options';
|
|
70
79
|
export * from './manual-trade-impact';
|
|
@@ -96,6 +105,7 @@ export * from './option-chain-inner';
|
|
|
96
105
|
export * from './option-chain-inner-chain-per-root-inner';
|
|
97
106
|
export * from './option-chain-inner-chain-per-root-inner-chain-per-strike-price-inner';
|
|
98
107
|
export * from './option-impact';
|
|
108
|
+
export * from './option-instrument';
|
|
99
109
|
export * from './option-leg';
|
|
100
110
|
export * from './option-quote';
|
|
101
111
|
export * from './option-quote-greeks';
|
|
@@ -107,6 +117,7 @@ export * from './options-symbol';
|
|
|
107
117
|
export * from './order-type-strict';
|
|
108
118
|
export * from './order-updated-response';
|
|
109
119
|
export * from './order-updated-response-order';
|
|
120
|
+
export * from './other-instrument';
|
|
110
121
|
export * from './paginated-universal-activity';
|
|
111
122
|
export * from './pagination-details';
|
|
112
123
|
export * from './partner-data';
|
|
@@ -126,6 +137,8 @@ export * from './snap-trade-holdings-total-value';
|
|
|
126
137
|
export * from './snap-trade-login-user-request-body';
|
|
127
138
|
export * from './snap-trade-register-user-request-body';
|
|
128
139
|
export * from './status';
|
|
140
|
+
export * from './stock-instrument';
|
|
141
|
+
export * from './stock-instrument-figi-instrument';
|
|
129
142
|
export * from './stop-loss';
|
|
130
143
|
export * from './strategy-order-record';
|
|
131
144
|
export * from './strategy-quotes';
|
|
@@ -134,7 +147,6 @@ export * from './sub-period-return-rate';
|
|
|
134
147
|
export * from './symbol';
|
|
135
148
|
export * from './symbol-currency';
|
|
136
149
|
export * from './symbol-exchange';
|
|
137
|
-
export * from './symbol-figi-instrument';
|
|
138
150
|
export * from './symbol-query';
|
|
139
151
|
export * from './symbols-quotes-inner';
|
|
140
152
|
export * from './take-profit';
|
|
@@ -146,6 +158,7 @@ export * from './trading-session';
|
|
|
146
158
|
export * from './trailing-stop';
|
|
147
159
|
export * from './transactions-status';
|
|
148
160
|
export * from './usexchange';
|
|
161
|
+
export * from './underlying-option-instrument';
|
|
149
162
|
export * from './underlying-symbol';
|
|
150
163
|
export * from './underlying-symbol-exchange';
|
|
151
164
|
export * from './underlying-symbol-type';
|
package/dist/models/index.js
CHANGED
|
@@ -33,6 +33,7 @@ __exportStar(require("./account-order-record-trailing-stop"), exports);
|
|
|
33
33
|
__exportStar(require("./account-order-record-universal-symbol"), exports);
|
|
34
34
|
__exportStar(require("./account-order-record-v2"), exports);
|
|
35
35
|
__exportStar(require("./account-orders-v2-response"), exports);
|
|
36
|
+
__exportStar(require("./account-position"), exports);
|
|
36
37
|
__exportStar(require("./account-simple"), exports);
|
|
37
38
|
__exportStar(require("./account-sync-status"), exports);
|
|
38
39
|
__exportStar(require("./account-universal-activity"), exports);
|
|
@@ -43,6 +44,7 @@ __exportStar(require("./account-value-history-item"), exports);
|
|
|
43
44
|
__exportStar(require("./account-value-history-response"), exports);
|
|
44
45
|
__exportStar(require("./action-strict"), exports);
|
|
45
46
|
__exportStar(require("./action-strict-with-options"), exports);
|
|
47
|
+
__exportStar(require("./all-account-positions-response"), exports);
|
|
46
48
|
__exportStar(require("./authentication-login-snap-trade-user200-response"), exports);
|
|
47
49
|
__exportStar(require("./balance"), exports);
|
|
48
50
|
__exportStar(require("./balance-currency"), exports);
|
|
@@ -58,7 +60,10 @@ __exportStar(require("./brokerage-instruments-response"), exports);
|
|
|
58
60
|
__exportStar(require("./brokerage-type"), exports);
|
|
59
61
|
__exportStar(require("./cancel-order-response"), exports);
|
|
60
62
|
__exportStar(require("./child-brokerage-order-ids"), exports);
|
|
63
|
+
__exportStar(require("./complex-order-leg"), exports);
|
|
64
|
+
__exportStar(require("./complex-order-response"), exports);
|
|
61
65
|
__exportStar(require("./connections-session-events200-response-inner"), exports);
|
|
66
|
+
__exportStar(require("./crypto-instrument"), exports);
|
|
62
67
|
__exportStar(require("./crypto-order-form"), exports);
|
|
63
68
|
__exportStar(require("./crypto-order-preview"), exports);
|
|
64
69
|
__exportStar(require("./crypto-order-preview-estimated-fee"), exports);
|
|
@@ -71,16 +76,20 @@ __exportStar(require("./delete-user-response"), exports);
|
|
|
71
76
|
__exportStar(require("./dividend-at-date"), exports);
|
|
72
77
|
__exportStar(require("./encrypted-response"), exports);
|
|
73
78
|
__exportStar(require("./encrypted-response-encrypted-message-data"), exports);
|
|
79
|
+
__exportStar(require("./etf-instrument"), exports);
|
|
74
80
|
__exportStar(require("./exchange"), exports);
|
|
75
81
|
__exportStar(require("./exchange-rate-pairs"), exports);
|
|
76
82
|
__exportStar(require("./figi-instrument"), exports);
|
|
83
|
+
__exportStar(require("./future-instrument"), exports);
|
|
77
84
|
__exportStar(require("./holdings-status"), exports);
|
|
85
|
+
__exportStar(require("./instrument"), exports);
|
|
78
86
|
__exportStar(require("./login-redirect-uri"), exports);
|
|
79
87
|
__exportStar(require("./manual-trade"), exports);
|
|
80
88
|
__exportStar(require("./manual-trade-and-impact"), exports);
|
|
81
89
|
__exportStar(require("./manual-trade-balance"), exports);
|
|
82
90
|
__exportStar(require("./manual-trade-form"), exports);
|
|
83
91
|
__exportStar(require("./manual-trade-form-bracket"), exports);
|
|
92
|
+
__exportStar(require("./manual-trade-form-complex"), exports);
|
|
84
93
|
__exportStar(require("./manual-trade-form-notional-value"), exports);
|
|
85
94
|
__exportStar(require("./manual-trade-form-with-options"), exports);
|
|
86
95
|
__exportStar(require("./manual-trade-impact"), exports);
|
|
@@ -112,6 +121,7 @@ __exportStar(require("./option-chain-inner"), exports);
|
|
|
112
121
|
__exportStar(require("./option-chain-inner-chain-per-root-inner"), exports);
|
|
113
122
|
__exportStar(require("./option-chain-inner-chain-per-root-inner-chain-per-strike-price-inner"), exports);
|
|
114
123
|
__exportStar(require("./option-impact"), exports);
|
|
124
|
+
__exportStar(require("./option-instrument"), exports);
|
|
115
125
|
__exportStar(require("./option-leg"), exports);
|
|
116
126
|
__exportStar(require("./option-quote"), exports);
|
|
117
127
|
__exportStar(require("./option-quote-greeks"), exports);
|
|
@@ -123,6 +133,7 @@ __exportStar(require("./options-symbol"), exports);
|
|
|
123
133
|
__exportStar(require("./order-type-strict"), exports);
|
|
124
134
|
__exportStar(require("./order-updated-response"), exports);
|
|
125
135
|
__exportStar(require("./order-updated-response-order"), exports);
|
|
136
|
+
__exportStar(require("./other-instrument"), exports);
|
|
126
137
|
__exportStar(require("./paginated-universal-activity"), exports);
|
|
127
138
|
__exportStar(require("./pagination-details"), exports);
|
|
128
139
|
__exportStar(require("./partner-data"), exports);
|
|
@@ -142,6 +153,8 @@ __exportStar(require("./snap-trade-holdings-total-value"), exports);
|
|
|
142
153
|
__exportStar(require("./snap-trade-login-user-request-body"), exports);
|
|
143
154
|
__exportStar(require("./snap-trade-register-user-request-body"), exports);
|
|
144
155
|
__exportStar(require("./status"), exports);
|
|
156
|
+
__exportStar(require("./stock-instrument"), exports);
|
|
157
|
+
__exportStar(require("./stock-instrument-figi-instrument"), exports);
|
|
145
158
|
__exportStar(require("./stop-loss"), exports);
|
|
146
159
|
__exportStar(require("./strategy-order-record"), exports);
|
|
147
160
|
__exportStar(require("./strategy-quotes"), exports);
|
|
@@ -150,7 +163,6 @@ __exportStar(require("./sub-period-return-rate"), exports);
|
|
|
150
163
|
__exportStar(require("./symbol"), exports);
|
|
151
164
|
__exportStar(require("./symbol-currency"), exports);
|
|
152
165
|
__exportStar(require("./symbol-exchange"), exports);
|
|
153
|
-
__exportStar(require("./symbol-figi-instrument"), exports);
|
|
154
166
|
__exportStar(require("./symbol-query"), exports);
|
|
155
167
|
__exportStar(require("./symbols-quotes-inner"), exports);
|
|
156
168
|
__exportStar(require("./take-profit"), exports);
|
|
@@ -162,6 +174,7 @@ __exportStar(require("./trading-session"), exports);
|
|
|
162
174
|
__exportStar(require("./trailing-stop"), exports);
|
|
163
175
|
__exportStar(require("./transactions-status"), exports);
|
|
164
176
|
__exportStar(require("./usexchange"), exports);
|
|
177
|
+
__exportStar(require("./underlying-option-instrument"), exports);
|
|
165
178
|
__exportStar(require("./underlying-symbol"), exports);
|
|
166
179
|
__exportStar(require("./underlying-symbol-exchange"), exports);
|
|
167
180
|
__exportStar(require("./underlying-symbol-type"), exports);
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { CryptoInstrument } from './crypto-instrument';
|
|
2
|
+
import { EtfInstrument } from './etf-instrument';
|
|
3
|
+
import { FutureInstrument } from './future-instrument';
|
|
4
|
+
import { OptionInstrument } from './option-instrument';
|
|
5
|
+
import { OtherInstrument } from './other-instrument';
|
|
6
|
+
import { StockInstrument } from './stock-instrument';
|
|
7
|
+
/**
|
|
8
|
+
* @type Instrument
|
|
9
|
+
* Instrument metadata for a V2 position. Use `kind` to determine which schema is present.
|
|
10
|
+
* @export
|
|
11
|
+
*/
|
|
12
|
+
export type Instrument = {
|
|
13
|
+
kind: 'crypto';
|
|
14
|
+
} & CryptoInstrument | {
|
|
15
|
+
kind: 'etf';
|
|
16
|
+
} & EtfInstrument | {
|
|
17
|
+
kind: 'future';
|
|
18
|
+
} & FutureInstrument | {
|
|
19
|
+
kind: 'option';
|
|
20
|
+
} & OptionInstrument | {
|
|
21
|
+
kind: 'other';
|
|
22
|
+
} & OtherInstrument | {
|
|
23
|
+
kind: 'stock';
|
|
24
|
+
} & StockInstrument;
|