snaptrade-typescript-sdk 9.0.190 → 9.0.191
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 +41 -51
- package/dist/api/account-information-api-generated.d.ts +61 -0
- package/dist/api/account-information-api-generated.js +89 -0
- package/dist/api/experimental-endpoints-api-generated.d.ts +5 -80
- package/dist/api/experimental-endpoints-api-generated.js +6 -103
- package/dist/browser.js +1 -1
- package/dist/configuration.js +1 -1
- package/dist/models/adr-instrument.d.ts +59 -0
- package/dist/models/adr-instrument.js +2 -0
- package/dist/models/all-account-positions-response.d.ts +2 -20
- package/dist/models/cef-instrument.d.ts +59 -0
- package/dist/models/cef-instrument.js +2 -0
- package/dist/models/index.d.ts +3 -0
- package/dist/models/index.js +3 -0
- package/dist/models/instrument.d.ts +9 -0
- package/dist/models/mutual-fund-instrument.d.ts +59 -0
- package/dist/models/mutual-fund-instrument.js +2 -0
- package/dist/models/underlying-option-instrument.d.ts +9 -0
- package/dist/operationParameterMap.js +13 -19
- package/package.json +1 -1
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.191/typescript" : param.userAgent;
|
|
36
36
|
this.formDataCtor = param.formDataCtor;
|
|
37
37
|
}
|
|
38
38
|
/**
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { StockInstrumentFigiInstrument } from './stock-instrument-figi-instrument';
|
|
2
|
+
/**
|
|
3
|
+
* Security instrument metadata for ADR positions.
|
|
4
|
+
* @export
|
|
5
|
+
* @interface AdrInstrument
|
|
6
|
+
*/
|
|
7
|
+
export interface AdrInstrument {
|
|
8
|
+
[key: string]: any;
|
|
9
|
+
/**
|
|
10
|
+
* Type of security instrument.
|
|
11
|
+
* @type {string}
|
|
12
|
+
* @memberof AdrInstrument
|
|
13
|
+
*/
|
|
14
|
+
'kind': AdrInstrumentKindEnum;
|
|
15
|
+
/**
|
|
16
|
+
* Unique identifier for the instrument.
|
|
17
|
+
* @type {string}
|
|
18
|
+
* @memberof AdrInstrument
|
|
19
|
+
*/
|
|
20
|
+
'id': string;
|
|
21
|
+
/**
|
|
22
|
+
* The formatted trading symbol for the security.
|
|
23
|
+
* @type {string}
|
|
24
|
+
* @memberof AdrInstrument
|
|
25
|
+
*/
|
|
26
|
+
'symbol': string;
|
|
27
|
+
/**
|
|
28
|
+
* The raw symbol without any exchange suffix.
|
|
29
|
+
* @type {string}
|
|
30
|
+
* @memberof AdrInstrument
|
|
31
|
+
*/
|
|
32
|
+
'raw_symbol': string;
|
|
33
|
+
/**
|
|
34
|
+
* Human-readable description of the security.
|
|
35
|
+
* @type {string}
|
|
36
|
+
* @memberof AdrInstrument
|
|
37
|
+
*/
|
|
38
|
+
'description'?: string | null;
|
|
39
|
+
/**
|
|
40
|
+
* ISO-4217 currency code for the security listing.
|
|
41
|
+
* @type {string}
|
|
42
|
+
* @memberof AdrInstrument
|
|
43
|
+
*/
|
|
44
|
+
'currency'?: string | null;
|
|
45
|
+
/**
|
|
46
|
+
* Exchange MIC code or exchange code for the security.
|
|
47
|
+
* @type {string}
|
|
48
|
+
* @memberof AdrInstrument
|
|
49
|
+
*/
|
|
50
|
+
'exchange'?: string | null;
|
|
51
|
+
/**
|
|
52
|
+
*
|
|
53
|
+
* @type {StockInstrumentFigiInstrument}
|
|
54
|
+
* @memberof AdrInstrument
|
|
55
|
+
*/
|
|
56
|
+
'figi_instrument'?: StockInstrumentFigiInstrument | null;
|
|
57
|
+
}
|
|
58
|
+
type AdrInstrumentKindEnum = 'adr';
|
|
59
|
+
export {};
|
|
@@ -1,31 +1,13 @@
|
|
|
1
1
|
import { AccountPosition } from './account-position';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* Information about all account positions.
|
|
4
4
|
* @export
|
|
5
5
|
* @interface AllAccountPositionsResponse
|
|
6
6
|
*/
|
|
7
7
|
export interface AllAccountPositionsResponse {
|
|
8
8
|
[key: string]: any;
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
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.
|
|
10
|
+
* Positions returned for the request.
|
|
29
11
|
* @type {Array<AccountPosition>}
|
|
30
12
|
* @memberof AllAccountPositionsResponse
|
|
31
13
|
*/
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { StockInstrumentFigiInstrument } from './stock-instrument-figi-instrument';
|
|
2
|
+
/**
|
|
3
|
+
* Security instrument metadata for closed-end fund positions.
|
|
4
|
+
* @export
|
|
5
|
+
* @interface CefInstrument
|
|
6
|
+
*/
|
|
7
|
+
export interface CefInstrument {
|
|
8
|
+
[key: string]: any;
|
|
9
|
+
/**
|
|
10
|
+
* Type of security instrument.
|
|
11
|
+
* @type {string}
|
|
12
|
+
* @memberof CefInstrument
|
|
13
|
+
*/
|
|
14
|
+
'kind': CefInstrumentKindEnum;
|
|
15
|
+
/**
|
|
16
|
+
* Unique identifier for the instrument.
|
|
17
|
+
* @type {string}
|
|
18
|
+
* @memberof CefInstrument
|
|
19
|
+
*/
|
|
20
|
+
'id': string;
|
|
21
|
+
/**
|
|
22
|
+
* The formatted trading symbol for the security.
|
|
23
|
+
* @type {string}
|
|
24
|
+
* @memberof CefInstrument
|
|
25
|
+
*/
|
|
26
|
+
'symbol': string;
|
|
27
|
+
/**
|
|
28
|
+
* The raw symbol without any exchange suffix.
|
|
29
|
+
* @type {string}
|
|
30
|
+
* @memberof CefInstrument
|
|
31
|
+
*/
|
|
32
|
+
'raw_symbol': string;
|
|
33
|
+
/**
|
|
34
|
+
* Human-readable description of the security.
|
|
35
|
+
* @type {string}
|
|
36
|
+
* @memberof CefInstrument
|
|
37
|
+
*/
|
|
38
|
+
'description'?: string | null;
|
|
39
|
+
/**
|
|
40
|
+
* ISO-4217 currency code for the security listing.
|
|
41
|
+
* @type {string}
|
|
42
|
+
* @memberof CefInstrument
|
|
43
|
+
*/
|
|
44
|
+
'currency'?: string | null;
|
|
45
|
+
/**
|
|
46
|
+
* Exchange MIC code or exchange code for the security.
|
|
47
|
+
* @type {string}
|
|
48
|
+
* @memberof CefInstrument
|
|
49
|
+
*/
|
|
50
|
+
'exchange'?: string | null;
|
|
51
|
+
/**
|
|
52
|
+
*
|
|
53
|
+
* @type {StockInstrumentFigiInstrument}
|
|
54
|
+
* @memberof CefInstrument
|
|
55
|
+
*/
|
|
56
|
+
'figi_instrument'?: StockInstrumentFigiInstrument | null;
|
|
57
|
+
}
|
|
58
|
+
type CefInstrumentKindEnum = 'cef';
|
|
59
|
+
export {};
|
package/dist/models/index.d.ts
CHANGED
|
@@ -28,6 +28,7 @@ export * from './account-value-history-item';
|
|
|
28
28
|
export * from './account-value-history-response';
|
|
29
29
|
export * from './action-strict';
|
|
30
30
|
export * from './action-strict-with-options';
|
|
31
|
+
export * from './adr-instrument';
|
|
31
32
|
export * from './all-account-positions-response';
|
|
32
33
|
export * from './authentication-login-snap-trade-user200-response';
|
|
33
34
|
export * from './balance';
|
|
@@ -43,6 +44,7 @@ export * from './brokerage-instrument';
|
|
|
43
44
|
export * from './brokerage-instruments-response';
|
|
44
45
|
export * from './brokerage-type';
|
|
45
46
|
export * from './cancel-order-response';
|
|
47
|
+
export * from './cef-instrument';
|
|
46
48
|
export * from './child-brokerage-order-ids';
|
|
47
49
|
export * from './complex-order-leg';
|
|
48
50
|
export * from './complex-order-response';
|
|
@@ -97,6 +99,7 @@ export * from './model404-failed-request-response';
|
|
|
97
99
|
export * from './model425-failed-request-response';
|
|
98
100
|
export * from './model500-unexpected-exception-response';
|
|
99
101
|
export * from './monthly-dividends';
|
|
102
|
+
export * from './mutual-fund-instrument';
|
|
100
103
|
export * from './net-contributions';
|
|
101
104
|
export * from './net-dividend';
|
|
102
105
|
export * from './notional-value';
|
package/dist/models/index.js
CHANGED
|
@@ -44,6 +44,7 @@ __exportStar(require("./account-value-history-item"), exports);
|
|
|
44
44
|
__exportStar(require("./account-value-history-response"), exports);
|
|
45
45
|
__exportStar(require("./action-strict"), exports);
|
|
46
46
|
__exportStar(require("./action-strict-with-options"), exports);
|
|
47
|
+
__exportStar(require("./adr-instrument"), exports);
|
|
47
48
|
__exportStar(require("./all-account-positions-response"), exports);
|
|
48
49
|
__exportStar(require("./authentication-login-snap-trade-user200-response"), exports);
|
|
49
50
|
__exportStar(require("./balance"), exports);
|
|
@@ -59,6 +60,7 @@ __exportStar(require("./brokerage-instrument"), exports);
|
|
|
59
60
|
__exportStar(require("./brokerage-instruments-response"), exports);
|
|
60
61
|
__exportStar(require("./brokerage-type"), exports);
|
|
61
62
|
__exportStar(require("./cancel-order-response"), exports);
|
|
63
|
+
__exportStar(require("./cef-instrument"), exports);
|
|
62
64
|
__exportStar(require("./child-brokerage-order-ids"), exports);
|
|
63
65
|
__exportStar(require("./complex-order-leg"), exports);
|
|
64
66
|
__exportStar(require("./complex-order-response"), exports);
|
|
@@ -113,6 +115,7 @@ __exportStar(require("./model404-failed-request-response"), exports);
|
|
|
113
115
|
__exportStar(require("./model425-failed-request-response"), exports);
|
|
114
116
|
__exportStar(require("./model500-unexpected-exception-response"), exports);
|
|
115
117
|
__exportStar(require("./monthly-dividends"), exports);
|
|
118
|
+
__exportStar(require("./mutual-fund-instrument"), exports);
|
|
116
119
|
__exportStar(require("./net-contributions"), exports);
|
|
117
120
|
__exportStar(require("./net-dividend"), exports);
|
|
118
121
|
__exportStar(require("./notional-value"), exports);
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import { AdrInstrument } from './adr-instrument';
|
|
2
|
+
import { CefInstrument } from './cef-instrument';
|
|
1
3
|
import { CryptoInstrument } from './crypto-instrument';
|
|
2
4
|
import { EtfInstrument } from './etf-instrument';
|
|
3
5
|
import { FutureInstrument } from './future-instrument';
|
|
6
|
+
import { MutualFundInstrument } from './mutual-fund-instrument';
|
|
4
7
|
import { OptionInstrument } from './option-instrument';
|
|
5
8
|
import { OtherInstrument } from './other-instrument';
|
|
6
9
|
import { StockInstrument } from './stock-instrument';
|
|
@@ -10,12 +13,18 @@ import { StockInstrument } from './stock-instrument';
|
|
|
10
13
|
* @export
|
|
11
14
|
*/
|
|
12
15
|
export type Instrument = {
|
|
16
|
+
kind: 'adr';
|
|
17
|
+
} & AdrInstrument | {
|
|
18
|
+
kind: 'cef';
|
|
19
|
+
} & CefInstrument | {
|
|
13
20
|
kind: 'crypto';
|
|
14
21
|
} & CryptoInstrument | {
|
|
15
22
|
kind: 'etf';
|
|
16
23
|
} & EtfInstrument | {
|
|
17
24
|
kind: 'future';
|
|
18
25
|
} & FutureInstrument | {
|
|
26
|
+
kind: 'mutualfund';
|
|
27
|
+
} & MutualFundInstrument | {
|
|
19
28
|
kind: 'option';
|
|
20
29
|
} & OptionInstrument | {
|
|
21
30
|
kind: 'other';
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { StockInstrumentFigiInstrument } from './stock-instrument-figi-instrument';
|
|
2
|
+
/**
|
|
3
|
+
* Security instrument metadata for mutual fund positions.
|
|
4
|
+
* @export
|
|
5
|
+
* @interface MutualFundInstrument
|
|
6
|
+
*/
|
|
7
|
+
export interface MutualFundInstrument {
|
|
8
|
+
[key: string]: any;
|
|
9
|
+
/**
|
|
10
|
+
* Type of security instrument.
|
|
11
|
+
* @type {string}
|
|
12
|
+
* @memberof MutualFundInstrument
|
|
13
|
+
*/
|
|
14
|
+
'kind': MutualFundInstrumentKindEnum;
|
|
15
|
+
/**
|
|
16
|
+
* Unique identifier for the instrument.
|
|
17
|
+
* @type {string}
|
|
18
|
+
* @memberof MutualFundInstrument
|
|
19
|
+
*/
|
|
20
|
+
'id': string;
|
|
21
|
+
/**
|
|
22
|
+
* The formatted trading symbol for the security.
|
|
23
|
+
* @type {string}
|
|
24
|
+
* @memberof MutualFundInstrument
|
|
25
|
+
*/
|
|
26
|
+
'symbol': string;
|
|
27
|
+
/**
|
|
28
|
+
* The raw symbol without any exchange suffix.
|
|
29
|
+
* @type {string}
|
|
30
|
+
* @memberof MutualFundInstrument
|
|
31
|
+
*/
|
|
32
|
+
'raw_symbol': string;
|
|
33
|
+
/**
|
|
34
|
+
* Human-readable description of the security.
|
|
35
|
+
* @type {string}
|
|
36
|
+
* @memberof MutualFundInstrument
|
|
37
|
+
*/
|
|
38
|
+
'description'?: string | null;
|
|
39
|
+
/**
|
|
40
|
+
* ISO-4217 currency code for the security listing.
|
|
41
|
+
* @type {string}
|
|
42
|
+
* @memberof MutualFundInstrument
|
|
43
|
+
*/
|
|
44
|
+
'currency'?: string | null;
|
|
45
|
+
/**
|
|
46
|
+
* Exchange MIC code or exchange code for the security.
|
|
47
|
+
* @type {string}
|
|
48
|
+
* @memberof MutualFundInstrument
|
|
49
|
+
*/
|
|
50
|
+
'exchange'?: string | null;
|
|
51
|
+
/**
|
|
52
|
+
*
|
|
53
|
+
* @type {StockInstrumentFigiInstrument}
|
|
54
|
+
* @memberof MutualFundInstrument
|
|
55
|
+
*/
|
|
56
|
+
'figi_instrument'?: StockInstrumentFigiInstrument | null;
|
|
57
|
+
}
|
|
58
|
+
type MutualFundInstrumentKindEnum = 'mutualfund';
|
|
59
|
+
export {};
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
+
import { AdrInstrument } from './adr-instrument';
|
|
2
|
+
import { CefInstrument } from './cef-instrument';
|
|
1
3
|
import { CryptoInstrument } from './crypto-instrument';
|
|
2
4
|
import { EtfInstrument } from './etf-instrument';
|
|
5
|
+
import { MutualFundInstrument } from './mutual-fund-instrument';
|
|
3
6
|
import { OtherInstrument } from './other-instrument';
|
|
4
7
|
import { StockInstrument } from './stock-instrument';
|
|
5
8
|
/**
|
|
@@ -8,10 +11,16 @@ import { StockInstrument } from './stock-instrument';
|
|
|
8
11
|
* @export
|
|
9
12
|
*/
|
|
10
13
|
export type UnderlyingOptionInstrument = {
|
|
14
|
+
kind: 'adr';
|
|
15
|
+
} & AdrInstrument | {
|
|
16
|
+
kind: 'cef';
|
|
17
|
+
} & CefInstrument | {
|
|
11
18
|
kind: 'crypto';
|
|
12
19
|
} & CryptoInstrument | {
|
|
13
20
|
kind: 'etf';
|
|
14
21
|
} & EtfInstrument | {
|
|
22
|
+
kind: 'mutualfund';
|
|
23
|
+
} & MutualFundInstrument | {
|
|
15
24
|
kind: 'other';
|
|
16
25
|
} & OtherInstrument | {
|
|
17
26
|
kind: 'stock';
|
|
@@ -30,6 +30,19 @@ exports.operationParameterMap = {
|
|
|
30
30
|
},
|
|
31
31
|
]
|
|
32
32
|
},
|
|
33
|
+
'/accounts/{accountId}/balanceHistory-GET': {
|
|
34
|
+
parameters: [
|
|
35
|
+
{
|
|
36
|
+
name: 'userId'
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
name: 'userSecret'
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
name: 'accountId'
|
|
43
|
+
},
|
|
44
|
+
]
|
|
45
|
+
},
|
|
33
46
|
'/holdings-GET': {
|
|
34
47
|
parameters: [
|
|
35
48
|
{
|
|
@@ -353,19 +366,6 @@ exports.operationParameterMap = {
|
|
|
353
366
|
},
|
|
354
367
|
]
|
|
355
368
|
},
|
|
356
|
-
'/accounts/{accountId}/balanceHistory-GET': {
|
|
357
|
-
parameters: [
|
|
358
|
-
{
|
|
359
|
-
name: 'userId'
|
|
360
|
-
},
|
|
361
|
-
{
|
|
362
|
-
name: 'userSecret'
|
|
363
|
-
},
|
|
364
|
-
{
|
|
365
|
-
name: 'accountId'
|
|
366
|
-
},
|
|
367
|
-
]
|
|
368
|
-
},
|
|
369
369
|
'/accounts/{accountId}/positions/all-GET': {
|
|
370
370
|
parameters: [
|
|
371
371
|
{
|
|
@@ -377,12 +377,6 @@ exports.operationParameterMap = {
|
|
|
377
377
|
{
|
|
378
378
|
name: 'accountId'
|
|
379
379
|
},
|
|
380
|
-
{
|
|
381
|
-
name: 'page'
|
|
382
|
-
},
|
|
383
|
-
{
|
|
384
|
-
name: 'page_size'
|
|
385
|
-
},
|
|
386
380
|
]
|
|
387
381
|
},
|
|
388
382
|
'/accounts/{accountId}/orders/details/v2/{brokerageOrderId}-GET': {
|