explaingit

bgylsport/bgyl

0Audience · ops devopsComplexity · 3/5ActiveSetup · moderate

TLDR

Self-hosted Docker-based quantitative trading bot for the OKX crypto exchange, with a Telegram remote control and a grid strategy configured via env vars.

Mindmap

mindmap
  root((BGYL))
    Inputs
      OKX V5 API key
      Telegram bot token
      Strategy config string
      Linux server
    Outputs
      Live trades
      Container logs
      Telegram alerts
    Use Cases
      Run a grid bot
      Control trades from Telegram
      Private sandbox trading
    Tech Stack
      Docker
      Docker Compose
      Telegram Bot API
      OKX V5 API

Things people build with this

USE CASE 1

Self-host a grid trading bot for BTC perpetuals on OKX with leverage and a USDT-per-grid budget.

USE CASE 2

Run a strategy container plus a Telegram bot container side by side on a Linux VPS.

USE CASE 3

Add a six-digit password confirmation to a personal Telegram trading bot before any order is sent.

USE CASE 4

Tail and restart a containerized trading loop after pulling a fresh image fix.

Tech stack

DockerDocker ComposeOKX APITelegram Bot API

Getting it running

Difficulty · moderate Time to first run · 1h+

Needs a Linux server with Docker, an IP-bound OKX V5 API key without withdrawal, and a BotFather Telegram bot before first run.

License is not stated in the available content.

In plain English

BGYL is a self-hosted quantitative trading bot for the OKX cryptocurrency exchange. The README is written in Chinese and describes the project as a private sandbox deployment, where all API keys and trading logic run only on the user's own server. The author frames this as the safety guarantee: keys never leave the box, so the operator alone bears the risk and control. Setup is delivered as a three-step guide. The first step covers preparation. The user needs a Linux server with Docker installed, an OKX V5 API key bound to the server's public IP address, and a Telegram bot created through BotFather. The README is explicit that the API key must be limited to read and trade permissions only, and that withdrawal must never be enabled. The user also notes their own Telegram numeric ID and picks a six-digit password used as a second confirmation step before any command runs. The second step writes a docker-compose.yml file with two services, both running the same image bgylcom/docker:latest. One container runs the main strategy loop, the other runs the Telegram bot. Environment variables hold the OKX credentials, a loop interval in seconds, and a strategy configuration string that encodes the symbol, direction, leverage, grid spacing, USDT per grid, and a maximum position value, for example BTC,long,10,0.01,10,1000. The third step starts everything with docker compose up -d, then explains how to tail the logs of either container, how to stop everything with docker compose down if something looks wrong, and how to pull a fresh image and restart after a fix. Remote control happens through the Telegram bot. The README does not state a license.

Copy-paste prompts

Prompt 1
Write the docker-compose.yml for BGYL with two services on image bgylcom/docker:latest, one for the strategy loop and one for the Telegram bot, with the OKX and Telegram env vars.
Prompt 2
Help me build the strategy configuration string for a long BTC grid at 10x leverage with 0.01 spacing, 10 USDT per grid, and a 1000 USDT max position.
Prompt 3
Walk me through creating an OKX V5 API key with read and trade permissions only, bound to my server IP, with withdrawal disabled.
Prompt 4
Set up a Telegram bot via BotFather and pin my numeric Telegram ID plus a six-digit confirmation password into the BGYL env file.
Prompt 5
Show me how to tail the logs of the strategy container, stop the stack with docker compose down, and restart it after pulling a new image.
Open on GitHub → Explain another repo

Generated 2026-05-22 · Model: sonnet-4-6 · Verify against the repo before relying on details.