# metatrader5-sdk

> A Node.js SDK for interacting with the MetaTrader 5 Web API, enabling seamless integration of MetaTrader 5 trading features into your applications.

Latest version **0.1.4** (published 2024-01-10) · MIT license · 0 weekly downloads

## Install

```sh
npm install metatrader5-sdk
pnpm add metatrader5-sdk
yarn add metatrader5-sdk
bun add metatrader5-sdk
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.4 |
| Published | 2024-01-10 |
| First published | 2023-09-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 11.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 6 |
| Author | altug0 |
| Maintainers | altug0 |
| Keywords | MetaTrader 5, Web API, SDK, trading, Node.js |

## Links

- npm: https://www.npmjs.com/package/metatrader5-sdk
- Repository: https://github.com/altug0/metatrader5-sdk
- Homepage: https://github.com/altug0/metatrader5-sdk#readme
- Issues: https://github.com/altug0/metatrader5-sdk/issues
- npm.io page: https://npm.io/package/metatrader5-sdk

## Recent versions

- 0.1.4 (latest) — 2024-01-10
- 0.1.3 — 2023-10-03
- 0.1.2 — 2023-09-30
- 0.1.1 — 2023-09-29
- 0.1.0 — 2023-09-29

## README

# 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](https://nodejs.org/).

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

```bash
npm install metatrader5-sdk
```

## Create an Instance

define metatrader instance

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

```
### Available API

| Library  | Function | Description | Return |
| ------------- | ------------- | ------------- | ------------- |
| user  | get("USER_LOGIN")  | get user information  | Object |
| user  | checkPassword("USER_LOGIN", "USER_PASSWORD", "PASSWORD_TYPE") | check users password  | Boolean |
| user  | changePassword("USER_LOGIN", "CURRENT_PASSWORD", "NEW_PASSWORD", "PASSWORD_TYPE") | check users password  | Boolean |

---
_Source: https://npm.io/package/metatrader5-sdk · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
