@tastytrade/api 3.1.0 → 5.0.0
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/.vscode/launch.json +29 -0
- package/CHANGELOG.md +41 -0
- package/CODEOWNERS +1 -0
- package/README.md +64 -31
- package/dist/account-streamer.d.ts +10 -8
- package/dist/account-streamer.d.ts.map +1 -0
- package/dist/account-streamer.js +147 -229
- package/dist/account-streamer.js.map +1 -0
- package/dist/logger.d.ts +20 -0
- package/dist/logger.d.ts.map +1 -0
- package/dist/logger.js +36 -0
- package/dist/logger.js.map +1 -0
- package/dist/market-data-streamer.d.ts +7 -5
- package/dist/market-data-streamer.d.ts.map +1 -0
- package/dist/market-data-streamer.js +139 -172
- package/dist/market-data-streamer.js.map +1 -0
- package/dist/models/tastytrade-session.d.ts +1 -0
- package/dist/models/tastytrade-session.d.ts.map +1 -0
- package/dist/models/tastytrade-session.js +10 -20
- package/dist/models/tastytrade-session.js.map +1 -0
- package/dist/services/account-status-service.d.ts +2 -1
- package/dist/services/account-status-service.d.ts.map +1 -0
- package/dist/services/account-status-service.js +11 -60
- package/dist/services/account-status-service.js.map +1 -0
- package/dist/services/accounts-and-customers-service.d.ts +2 -1
- package/dist/services/accounts-and-customers-service.d.ts.map +1 -0
- package/dist/services/accounts-and-customers-service.js +29 -112
- package/dist/services/accounts-and-customers-service.js.map +1 -0
- package/dist/services/balances-and-positions-service.d.ts +2 -1
- package/dist/services/balances-and-positions-service.d.ts.map +1 -0
- package/dist/services/balances-and-positions-service.js +22 -88
- package/dist/services/balances-and-positions-service.js.map +1 -0
- package/dist/services/instruments-service.d.ts +2 -1
- package/dist/services/instruments-service.d.ts.map +1 -0
- package/dist/services/instruments-service.js +130 -365
- package/dist/services/instruments-service.js.map +1 -0
- package/dist/services/margin-requirements-service.d.ts +2 -1
- package/dist/services/margin-requirements-service.d.ts.map +1 -0
- package/dist/services/margin-requirements-service.js +16 -73
- package/dist/services/margin-requirements-service.js.map +1 -0
- package/dist/services/market-metrics-service.d.ts +2 -1
- package/dist/services/market-metrics-service.d.ts.map +1 -0
- package/dist/services/market-metrics-service.js +21 -88
- package/dist/services/market-metrics-service.js.map +1 -0
- package/dist/services/net-liquidating-value-history-service.d.ts +2 -1
- package/dist/services/net-liquidating-value-history-service.d.ts.map +1 -0
- package/dist/services/net-liquidating-value-history-service.js +16 -74
- package/dist/services/net-liquidating-value-history-service.js.map +1 -0
- package/dist/services/orders-service.d.ts +2 -1
- package/dist/services/orders-service.d.ts.map +1 -0
- package/dist/services/orders-service.js +76 -231
- package/dist/services/orders-service.js.map +1 -0
- package/dist/services/risk-parameters-service.d.ts +2 -1
- package/dist/services/risk-parameters-service.d.ts.map +1 -0
- package/dist/services/risk-parameters-service.js +16 -73
- package/dist/services/risk-parameters-service.js.map +1 -0
- package/dist/services/session-service.d.ts +2 -1
- package/dist/services/session-service.d.ts.map +1 -0
- package/dist/services/session-service.js +30 -110
- package/dist/services/session-service.js.map +1 -0
- package/dist/services/symbol-search-service.d.ts +2 -1
- package/dist/services/symbol-search-service.d.ts.map +1 -0
- package/dist/services/symbol-search-service.js +11 -60
- package/dist/services/symbol-search-service.js.map +1 -0
- package/dist/services/tastytrade-http-client.d.ts +5 -3
- package/dist/services/tastytrade-http-client.d.ts.map +1 -0
- package/dist/services/tastytrade-http-client.js +53 -134
- package/dist/services/tastytrade-http-client.js.map +1 -0
- package/dist/services/transactions-service.d.ts +2 -1
- package/dist/services/transactions-service.d.ts.map +1 -0
- package/dist/services/transactions-service.js +22 -87
- package/dist/services/transactions-service.js.map +1 -0
- package/dist/services/watchlists-service.d.ts +2 -1
- package/dist/services/watchlists-service.d.ts.map +1 -0
- package/dist/services/watchlists-service.js +51 -165
- package/dist/services/watchlists-service.js.map +1 -0
- package/dist/tastytrade-api.d.ts +32 -22
- package/dist/tastytrade-api.d.ts.map +1 -0
- package/dist/tastytrade-api.js +44 -79
- package/dist/tastytrade-api.js.map +1 -0
- package/dist/utils/constants.d.ts +1 -0
- package/dist/utils/constants.d.ts.map +1 -0
- package/dist/utils/constants.js +2 -4
- package/dist/utils/constants.js.map +1 -0
- package/dist/utils/json-util.d.ts +4 -3
- package/dist/utils/json-util.d.ts.map +1 -0
- package/dist/utils/json-util.js +14 -25
- package/dist/utils/json-util.js.map +1 -0
- package/dist/utils/response-util.d.ts +1 -0
- package/dist/utils/response-util.d.ts.map +1 -0
- package/dist/utils/response-util.js +7 -12
- package/dist/utils/response-util.js.map +1 -0
- package/lib/account-streamer.ts +19 -12
- package/lib/logger.ts +48 -0
- package/lib/market-data-streamer.ts +5 -1
- package/lib/services/account-status-service.ts +2 -2
- package/lib/services/accounts-and-customers-service.ts +2 -2
- package/lib/services/balances-and-positions-service.ts +2 -2
- package/lib/services/instruments-service.ts +2 -2
- package/lib/services/margin-requirements-service.ts +2 -2
- package/lib/services/market-metrics-service.ts +2 -2
- package/lib/services/net-liquidating-value-history-service.ts +2 -2
- package/lib/services/orders-service.ts +2 -2
- package/lib/services/risk-parameters-service.ts +2 -2
- package/lib/services/session-service.ts +2 -2
- package/lib/services/symbol-search-service.ts +2 -2
- package/lib/services/tastytrade-http-client.ts +21 -16
- package/lib/services/transactions-service.ts +2 -2
- package/lib/services/watchlists-service.ts +2 -2
- package/lib/tastytrade-api.ts +35 -22
- package/package.json +14 -9
- package/tsconfig.json +12 -11
package/tsconfig.json
CHANGED
|
@@ -4,18 +4,18 @@
|
|
|
4
4
|
|
|
5
5
|
/* Basic Options */
|
|
6
6
|
// "incremental": true, /* Enable incremental compilation */
|
|
7
|
-
"target": "
|
|
8
|
-
"module": "
|
|
7
|
+
"target": "es2020", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */
|
|
8
|
+
"module": "node16", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */
|
|
9
9
|
// "lib": [], /* Specify library files to be included in the compilation. */
|
|
10
|
-
"allowJs": true,
|
|
10
|
+
"allowJs": true, /* Allow javascript files to be compiled. */
|
|
11
11
|
// "checkJs": true, /* Report errors in .js files. */
|
|
12
12
|
// "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */
|
|
13
|
-
"declaration": true,
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
"declaration": true, /* Generates corresponding '.d.ts' file. */
|
|
14
|
+
"declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */
|
|
15
|
+
"sourceMap": true, /* Generates corresponding '.map' file. */
|
|
16
16
|
// "outFile": "./", /* Concatenate and emit output to single file. */
|
|
17
|
-
"outDir": "./dist",
|
|
18
|
-
// "rootDir": "./lib",
|
|
17
|
+
"outDir": "./dist", /* Redirect output structure to the directory. */
|
|
18
|
+
// "rootDir": "./lib", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
|
|
19
19
|
// "composite": true, /* Enable project compilation */
|
|
20
20
|
// "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */
|
|
21
21
|
// "removeComments": true, /* Do not emit comments to output. */
|
|
@@ -41,14 +41,14 @@
|
|
|
41
41
|
// "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
|
|
42
42
|
|
|
43
43
|
/* Module Resolution Options */
|
|
44
|
-
|
|
44
|
+
"moduleResolution": "nodenext", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */
|
|
45
45
|
// "baseUrl": "./", /* Base directory to resolve non-absolute module names. */
|
|
46
46
|
// "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */
|
|
47
47
|
// "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
|
|
48
48
|
// "typeRoots": [], /* List of folders to include type definitions from. */
|
|
49
49
|
// "types": [], /* Type declaration files to be included in compilation. */
|
|
50
50
|
// "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */
|
|
51
|
-
"esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
|
|
51
|
+
// "esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
|
|
52
52
|
// "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */
|
|
53
53
|
// "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
|
|
54
54
|
|
|
@@ -64,7 +64,8 @@
|
|
|
64
64
|
|
|
65
65
|
/* Advanced Options */
|
|
66
66
|
"skipLibCheck": true, /* Skip type checking of declaration files. */
|
|
67
|
-
"forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */
|
|
67
|
+
"forceConsistentCasingInFileNames": true, /* Disallow inconsistently-cased references to the same file. */
|
|
68
|
+
"verbatimModuleSyntax": true, /* Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting. */
|
|
68
69
|
},
|
|
69
70
|
"include": ["lib/**/*"],
|
|
70
71
|
"exclude": ["node_modules", "dist", "tests/**/*", "examples", ".env", ".env.sample"]
|