@mautriz/mt5 1.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/bench.ts +67 -0
- package/dist/index.d.ts +164 -0
- package/dist/index.js +257 -0
- package/dist/index.js.map +1 -0
- package/dist/mt5.test.d.ts +1 -0
- package/dist/mt5.test.js +155 -0
- package/dist/mt5.test.js.map +1 -0
- package/index.ts +477 -0
- package/mt5.test.ts +209 -0
- package/package.json +23 -0
- package/script.ts +15 -0
- package/tsconfig.json +17 -0
package/script.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { MT5Client } from ".";
|
|
2
|
+
|
|
3
|
+
const mt5 = new MT5Client("ws://localhost:8080", { timeout: 10_000 });
|
|
4
|
+
|
|
5
|
+
async function main() {
|
|
6
|
+
await mt5.connect();
|
|
7
|
+
console.log("Connected to MT5 WebSocket server");
|
|
8
|
+
|
|
9
|
+
console.log(await mt5.getTimeOffset());
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
main().then(() => {
|
|
13
|
+
console.log("Done");
|
|
14
|
+
mt5.disconnect();
|
|
15
|
+
});
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2020",
|
|
4
|
+
"module": "ES2020",
|
|
5
|
+
"moduleResolution": "bundler",
|
|
6
|
+
"lib": ["ES2020", "DOM"],
|
|
7
|
+
"types": ["node"],
|
|
8
|
+
"declaration": true,
|
|
9
|
+
"strict": true,
|
|
10
|
+
"skipLibCheck": true,
|
|
11
|
+
"outDir": "dist",
|
|
12
|
+
"rootDir": ".",
|
|
13
|
+
"sourceMap": true
|
|
14
|
+
},
|
|
15
|
+
"include": ["index.ts","**/*.test.ts"],
|
|
16
|
+
"exclude": ["node_modules", "dist"]
|
|
17
|
+
}
|