Skip to content

danilshap/mercator

Repository files navigation

Mercator - Crypto Trading Bot

🪙 A flexible, strategy-driven cryptocurrency trading bot written in Go.

Features

  • 📊 Multiple trading strategies support (MACD, etc.)
  • 🔒 Safe automated trading with clear architecture
  • 📱 Telegram bot interface
  • 💾 PostgreSQL for persistence
  • ☁️ Optional S3 integration
  • 🔧 Configurable via YAML and environment variables

Quick Start

  1. Clone the repository
git clone https://github.com/your-username/mercator.git
  1. Set up configuration
cp .local.env.example .local.env
  1. Start PostgreSQL
make start-postgres
make create-db
make migrate-up
  1. Run the bot
make run

Configuration

The bot can be configured using both YAML files and environment variables:

app:
  log_level: "info"
  log_format: "text"

wallet:
  use_local_file: true
  mock_balance_file: "balance.json"

Environment variables:

  • BINANCE_API_KEY - Your Binance API key
  • BINANCE_SECRET_KEY - Your Binance Secret key
  • TELEGRAM_BOT_TOKEN - Telegram Bot Token
  • DB_DRIVER - Database driver (default: postgres)
  • DB_SOURCE - Database connection string

Architecture

├── cmd           # Application entrypoints
├── config        # Configuration
├── internal      # Internal packages
│   ├── app      # Application setup
│   ├── domain   # Domain models
│   ├── handlers # Request handlers
│   ├── infra    # Infrastructure layer
│   ├── reporters# Output formatting
│   └── services # Business logic

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published