0
mirror of https://github.com/valentineus/go-metatrader4.git synced 2025-07-07 01:10:27 +03:00
  • v1.0.0 0dad8875ac

    Valentin Popov released this 2025-06-09 15:07:16 +03:00 | 2 commits to master since this release

    v1.0.0: First Stable Release

    Hi! I'm excited to share the first stable version of a project I've been working on: a lightweight, low-level Go client for interacting with MetaTrader 4 (MT4) trading servers over TCP.

    This library is designed for developers who need direct, programmatic access to MT4 without relying on heavyweight platforms or closed binaries. If you're building trading bots, gateways, or dashboards — this is for you.

    🚀 Key Features

    • 🧱 Minimal API – idiomatic Go interface, no extra layers
    • 🔌 Raw TCP Connection – communicate with MT4 servers directly
    • ⏱️ Timeout Configs – customize dial/read/write behavior
    • 🔁 Auto-Close (Optional) – auto-manage connections or control manually
    • 🧠 Context Support – works seamlessly with context.Context

    📦 Install

    go get go.popov.link/metatrader4
    

    🧪 Quick Start

    import "go.popov.link/metatrader4/mt4"
    
    client := mt4.NewClient("127.0.0.1", 443,
        mt4.WithDialTimeout(3*time.Second),
        mt4.WithAutoClose(true),
    )
    ctx := context.Background()
    params := map[string]string{
        "login":    "55555",
        "password": "_some_password_",
    }
    res, err := client.Execute(ctx, "WWAPUSER", params)
    

    Requirements

    • Go 1.24+
    • MT4 Server with TCP access enabled

    📚 Resources

    🤝 Feedback & Contributions

    If you try it out and something breaks — open an issue, I'll take a look. If you find it useful — the repo or share your use case. Pull requests are also welcome!

    Downloads