0
mirror of https://github.com/valentineus/go-metatrader4.git synced 2025-08-12 09:26:40 +03:00

3 Commits

Author SHA1 Message Date
renovate[bot]
6b2c2905f2 Update actions/checkout action to v5 2025-08-11 13:59:24 +00:00
e073e69756 Deleted old GitHub Actions 2025-08-11 10:58:23 +00:00
61f75d0f7b Moved repositories to the organization 2025-08-11 10:57:49 +00:00
10 changed files with 16 additions and 49 deletions

View File

@@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Check out code - name: Check out code
uses: actions/checkout@v4 uses: actions/checkout@v5
- name: Set up Go - name: Set up Go
uses: actions/setup-go@v5 uses: actions/setup-go@v5
with: with:
@@ -47,7 +47,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Check out code - name: Check out code
uses: actions/checkout@v4 uses: actions/checkout@v5
- name: Set up Go - name: Set up Go
uses: actions/setup-go@v5 uses: actions/setup-go@v5
with: with:

View File

@@ -1,25 +0,0 @@
name: Mirror
on:
push:
branches: [master]
pull_request:
branches: [master]
permissions:
contents: read
jobs:
mirror:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Mirror to remote repository
uses: yesolutions/mirror-action@master
with:
REMOTE: "https://git.popov.link/go-metatrader4.git"
GIT_USERNAME: ${{ secrets.GIT_USERNAME }}
GIT_PASSWORD: ${{ secrets.GIT_PASSWORD }}

View File

@@ -1,4 +1,4 @@
Copyright (c) 2025 Valentin Popov <valentin@popov.link> Copyright (c) 2025 Valentin Popov <valentin.p@digineat.com>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

View File

@@ -1,15 +1,14 @@
# MT4 Client Library # MT4 Client Library
[![Go Reference](https://pkg.go.dev/badge/go.popov.link/metatrader4.svg)](https://pkg.go.dev/go.popov.link/metatrader4) [![Go Reference](https://pkg.go.dev/badge/github.com/digineat/go-metatrader4.svg)](https://pkg.go.dev/github.com/digineat/go-metatrader4)
[![codecov](https://codecov.io/gh/valentineus/go-metatrader4/graph/badge.svg?token=6ZE32TQERQ)](https://codecov.io/gh/valentineus/go-metatrader4) [![Go Report Card](https://goreportcard.com/badge/github.com/digineat/go-metatrader4)](https://goreportcard.com/report/github.com/digineat/go-metatrader4)
[![Go Report Card](https://goreportcard.com/badge/go.popov.link/metatrader4)](https://goreportcard.com/report/go.popov.link/metatrader4)
A lightweight Go client library for interacting with a MetaTrader 4 (MT4) trading server over TCP. A lightweight Go client library for interacting with a MetaTrader 4 (MT4) trading server over TCP.
## Example Usage ## Example Usage
```go ```go
import "go.popov.link/metatrader4/mt4" import "github.com/digineat/go-metatrader4/mt4"
client := mt4.NewClient("127.0.0.1", 443, client := mt4.NewClient("127.0.0.1", 443,
mt4.WithDialTimeout(3*time.Second), mt4.WithDialTimeout(3*time.Second),
@@ -40,11 +39,10 @@ Use `WithAutoClose(false)` if you want to reuse the connection manually via `cli
## Project Info ## Project Info
- Vanity import path: `go.popov.link/metatrader4` - Vanity import path: `github.com/digineat/go-metatrader4/mt4`
- Source mirror (read-only): [git.popov.link](https://git.popov.link/go-metatrader4/) - Issues and contributions: [GitHub](https://github.com/digineat/go-metatrader4/issues)
- Issues and contributions: [GitHub](https://github.com/valentineus/go-metatrader4/issues)
Maintained by [Valentin Popov](mailto:valentin@popov.link). Maintained by [Valentin Popov](mailto:valentin.p@digineat.com).
## License ## License

View File

@@ -1,6 +1,6 @@
# Example: INFO Command # Example: INFO Command
This example demonstrates how to use the [`go-metatrader4`](https://github.com/valentineus/go-metatrader4) library to send the `INFO` command to a MetaTrader 4 (MT4) server and retrieve server information. This example demonstrates how to use the [`go-metatrader4`](https://github.com/digineat/go-metatrader4) library to send the `INFO` command to a MetaTrader 4 (MT4) server and retrieve server information.
The `INFO` command requests basic server details such as build version and company name. The `INFO` command requests basic server details such as build version and company name.

View File

@@ -6,7 +6,7 @@ import (
"log" "log"
"time" "time"
"go.popov.link/metatrader4/mt4" "github.com/digineat/go-metatrader4/mt4"
) )
func main() { func main() {

2
go.mod
View File

@@ -1,4 +1,4 @@
module go.popov.link/metatrader4 module github.com/digineat/go-metatrader4
go 1.24.2 go 1.24.2

6
go.sum
View File

@@ -1,8 +1,2 @@
golang.org/x/text v0.25.0 h1:qVyWApTSYLk/drJRO5mDlNYskwQznZmkpV2c8q9zls4=
golang.org/x/text v0.25.0/go.mod h1:WEdwpYrmk1qmdHvhkSTNPm3app7v4rsT8F2UD6+VHIA=
golang.org/x/text v0.26.0 h1:P42AVeLghgTYr4+xUnTRKDMqpar+PtX7KWuNQL21L8M=
golang.org/x/text v0.26.0/go.mod h1:QK15LZJUUQVJxhz7wXgxSy/CJaTFjd0G+YLonydOVQA=
golang.org/x/text v0.27.0 h1:4fGWRpyh641NLlecmyl4LOe6yDdfaYNrGb2zdfo4JV4=
golang.org/x/text v0.27.0/go.mod h1:1D28KMCvyooCX9hBiosv5Tz/+YLxj0j7XhWjpSUF7CU=
golang.org/x/text v0.28.0 h1:rhazDwis8INMIwQ4tpjLDzUhx6RlXqZNPEM0huQojng= golang.org/x/text v0.28.0 h1:rhazDwis8INMIwQ4tpjLDzUhx6RlXqZNPEM0huQojng=
golang.org/x/text v0.28.0/go.mod h1:U8nCwOR8jO/marOQ0QbDiOngZVEBB7MAiitBuMjXiNU= golang.org/x/text v0.28.0/go.mod h1:U8nCwOR8jO/marOQ0QbDiOngZVEBB7MAiitBuMjXiNU=

View File

@@ -5,8 +5,8 @@ import (
"fmt" "fmt"
"time" "time"
"go.popov.link/metatrader4/internal/conn" "github.com/digineat/go-metatrader4/internal/conn"
"go.popov.link/metatrader4/internal/proto" "github.com/digineat/go-metatrader4/internal/proto"
) )
// Client provides access to a MetaTrader4 server. // Client provides access to a MetaTrader4 server.

View File

@@ -7,8 +7,8 @@ import (
"testing" "testing"
"time" "time"
ic "go.popov.link/metatrader4/internal/conn" ic "github.com/digineat/go-metatrader4/internal/conn"
"go.popov.link/metatrader4/internal/proto" "github.com/digineat/go-metatrader4/internal/proto"
) )
// mockServer returns net.Pipe connections with server writing resp to client. // mockServer returns net.Pipe connections with server writing resp to client.