A Node.js SDK for interacting with the MetaTrader 5 Web API, enabling seamless integration of MetaTrader 5 trading features into your applications.
npm install mt5-sdkmt5-sdk package by running the following command in your project directory:
bash
npm install mt5-sdk
`
Create an Instance
define metatrader instance
`javascript
const Metatrader5 = require('mt5-sdk')
// ...
const mt5Instance = new Metatrader5('your.host.com', 443, {
login: "API_USER_LOGIN",
password: "API_USER_PASS",
build: "VERSION",
agent: "AGENT_NAME_FOR_TRACKING"
});
// ...
`
$3
`javascript
const mt5Instance = new MT5Request('your.host.com', 443, {
login: "API_USER_LOGIN",
password: "API_USER_PASS",
build: "VERSION",
agent: "AGENT_NAME_FOR_TRACKING"
});
async func(){
await mt5Instance.user.get("USER_LOGIN")
}
``