0.1.4 • Published 4 months ago

metatrader5-sdk v0.1.4

Weekly downloads
-
License
MIT
Repository
github
Last release
4 months ago

Metatrader5 SDK Example

This is a simple example of how to use the Metatrader5 SDK to interact with a MetaTrader 5 trading platform.

Installation

To use this example, you need to have Node.js installed on your system. If you haven't already, you can download it from nodejs.org.

Next, you can install the metatrader5-sdk package by running the following command in your project directory:

npm install metatrader5-sdk

Create an Instance

define metatrader instance

const Metatrader5 = require('metatrader5-sdk')
// ...
const mt5Instance = new Metatrader5('your.host.com', 443, {
    login: "API_USER_LOGIN",
    password: "API_USER_PASS",
    build: "VERSION",
    agent: "AGENT_NAME_FOR_TRACKING"
});
// ...

User Library Example

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")
}

Available API

LibraryFunctionDescriptionReturn
userget("USER_LOGIN")get user informationObject
usercheckPassword("USER_LOGIN", "USER_PASSWORD", "PASSWORD_TYPE")check users passwordBoolean
userchangePassword("USER_LOGIN", "CURRENT_PASSWORD", "NEW_PASSWORD", "PASSWORD_TYPE")check users passwordBoolean
0.1.4

4 months ago

0.1.3

7 months ago

0.1.2

7 months ago

0.1.1

7 months ago

0.1.0

7 months ago