npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

n8n-nodes-metatrader5

v0.5.8

Published

n8n community node for MetaTrader 5 integration

Readme

n8n-nodes-metatrader5

This is an n8n community node. It lets you use MetaTrader 5 in your n8n workflows.

MetaTrader 5 is a multi-asset platform for trading forex, stocks, futures, and CFDs.

n8n is a fair-code licensed workflow automation platform.

Installation

Recommended: GitHub Packages (Private npm)

The easiest way to install and keep this node updated is via GitHub Packages. This method provides:

  • ✅ Easy installation with npm
  • ✅ Automatic updates with npm update
  • ✅ Version management
  • ✅ Works with Docker and non-Docker n8n

See the complete guide: GITHUB_PACKAGES_INSTALL.md

Quick install (after setup):

npm install -g n8n-nodes-metatrader5

Alternative: Local Development/Testing

This project includes a Docker setup for local development and testing. See DEPLOYMENT.md for the complete guide on:

  • Building the TypeScript code
  • Deploying to Docker
  • Testing and debugging
  • Quick rebuild commands

Quick deploy command:

npm run build; Copy-Item -Path ".\dist\nodes" -Destination ".\n8n-docker\custom_nodes\" -Recurse -Force; Copy-Item -Path ".\dist\credentials" -Destination ".\n8n-docker\custom_nodes\" -Recurse -Force; cd n8n-docker; docker-compose restart; cd ..

For n8n Cloud

n8n Cloud does not support custom community nodes that are not published to the public npm registry. You must use a self-hosted n8n instance to use this node.

Operations

The MetaTrader 5 node provides comprehensive access to the MetaTrader 5 WebAPI with 14 resource categories and 43+ operations.

User Account Management

  • Create User: Create a new user account with full profile information and password validation
  • Get User: Get user information by login
  • Get Users Batch: Get information about multiple users by logins or groups
  • Update User: Update user account information with structured required/optional fields
  • Delete User: Delete a user account
  • Get User by External ID: Get user by external trading system account
  • Get User Group: Get user group by login
  • Get Total Users: Get total number of users on the server
  • Sync External: Synchronize with external trading system
  • Check Balance: Check and correct user balance
  • Add to Archive: Move user to archive database

Client Management

  • Create Client: Create a new client record with personal/contact information
  • Get Client: Retrieve client information by ID or multiple IDs
  • Update Client: Update existing client information
  • Delete Client: Delete a client record
  • Get Client IDs: Get list of all client IDs (optionally filtered by trading group)

Account Binding

  • Bind Account: Bind a trading account to a client record
  • Unbind Account: Remove the binding between a trading account and client
  • Get Bound Accounts: Get all trading accounts bound to a specific client

Trading Account

  • Get Account Info: Get trading account information
  • Get Accounts Batch: Get multiple trading accounts info
  • Get Account Logins: Get accounts in specified groups
  • Deposit: Add funds to a trading account
  • Withdrawal: Remove funds from a trading account

Symbols

  • Get Symbol List: Get list of all available trading symbols
  • Get Symbol Total: Get total number of symbols on the server
  • Get Symbol: Get detailed information about a specific symbol or symbols matching a pattern

Prices

  • Get Current Price: Get current bid/ask prices for a symbol
  • Get Price Stats: Get daily price statistics for a symbol
  • Get Tick History: Get historical tick data with customizable data fields (date, bid, ask, last, volume)

Password Management

  • Check Password: Check user password with validation
  • Change Password: Change user password (main/investor/phone) with comprehensive validation

Certificate Management

  • Update Certificate: Add or update user certificate
  • Get Certificate: Get user certificate
  • Delete Certificate: Delete user certificate
  • Confirm Certificate: Confirm user certificate

OTP (One-Time Password)

  • Get OTP Secret: Get OTP secret key
  • Set OTP Secret: Set OTP secret key

Archive Management

  • Get from Archive: Get user from archive database
  • Get Archive Batch: Get multiple users from archive
  • Restore from Archive: Restore users from archive

Backup Management

  • List Backups: Get backup creation dates
  • Get from Backup: Get user from specific backup

Notification

  • Send Notification: Send push notifications to MetaQuotes IDs

Features

Data Formatting

  • Simplify Parameter: Toggle between simplified table format (field names as columns) and raw API response
  • Field Filtering: System fields are automatically filtered for cleaner data presentation
  • Array Flattening: Nested arrays are flattened for better table display

Dynamic Selectors

  • Group Dropdown: Dynamic loading of trading groups from MT5 server with 5-minute caching
  • Smart Caching: Reduces API calls while keeping data fresh

Validation

  • Password Validation: Comprehensive password requirements (8-16 chars, uppercase, lowercase, numbers, special chars)
  • Input Validation: Amount limits, required field checks, and helpful error messages

Performance

  • Connection Pooling: HTTPS agent reuse for better performance
  • Caching: 5-minute in-memory cache for frequently accessed data like groups
  • Efficient API Calls: Optimized requests with proper error handling

Credentials

You need to set up MetaTrader 5 API credentials:

  • Server: Your MetaTrader 5 server address (e.g., 185.97.161.179:443)
  • Login: Account login number
  • Password: Account password

Compatibility

  • Minimum n8n version: 1.0.0
  • Tested with n8n versions: 1.0.0+
  • MetaTrader 5 WebAPI compatible

Usage

  1. Install the node package
  2. Set up your MetaTrader 5 credentials in n8n
  3. Use the MetaTrader 5 node in your workflows
  4. Select the appropriate resource and operation
  5. Configure parameters and execute

Resources

Version history

  • 0.1.0: Initial release with basic account, order, and position operations
  • 0.2.0: Added MetaTrader 5 Client node for comprehensive client management and account binding operations
  • 0.3.0: Added MetaTrader 5 User node for complete user account management, including passwords, certificates, OTP, archives, backups, and notifications
  • 0.4.0: Major Update - Consolidated all functionality into single MetaTrader5 node with 14 resources
    • Added Symbols and Prices resources for market data access
    • Implemented dynamic group selector with caching
    • Added comprehensive password validation
    • Added deposit/withdrawal operations for Trading Account
    • Improved data formatting with Simplify parameter
    • Enhanced error handling and user experience