Abhi-AlgoForge Back home

Bitget Vision Trader

A vision-AI signal executor — Telegram chart posts read by GPT-4 Vision and traded on Bitget futures, multi-tenant.

Client engagement — source code stays private. Shown: architecture, flows and UI.

The signals for this system aren't structured at all — they're posts in a private Telegram channel: a chart screenshot plus a free-text caption. Bitget Vision Trader points GPT-4 Vision at both and extracts a structured trade: symbol, side, entry, a ladder of up to four take-profits and a stop. Extraction is hardened for production — retries, a targeted image-only fallback prompt when the entry price is missing, range midpoints, and sanity correction when the AI puts a stop on the wrong side of the entry.

Execution runs on Bitget USDT-margined perpetual futures: a limit entry with a preset stop-loss, fill polling, then the take-profit ladder placed as plan orders — split evenly or by custom distribution. A background monitor watches for the first target to fill and moves the stop to breakeven automatically, locking the trade risk-free.

It's multi-tenant by design: one channel listener serves an admin plus any number of sub-users, each with their own API keys, risk percentage, leverage and TP distribution — trades mirror to everyone independently. A web dashboard handles all configuration, and the exchange connectivity runs on a from-scratch Bitget SDK with HMAC-SHA256 and RSA request signing.

System architecture

The modules that make it up, and how data flows between them.

Signal listener

Telegram + GPT-4 Vision extract

Config dashboard

Keys · risk · TP modes · users

Execution engine

Sizing · entries · TP ladder · BE

Custom exchange SDK

Hand-rolled Bitget REST + WS

Hover a module to trace what it feeds.

Signal flow

One channel post, end to end — from chart screenshot to a breakeven-protected position.

  1. 1

    Channel post

    A chart image with caption lands in the channel; it's matched against configured users, and blacklisted keywords or paused bots skip it.

  2. 2

    Vision extraction

    GPT-4 Vision parses image and caption into JSON — up to three retries, with an image-only fallback prompt if the entry price didn't come through.

  3. 3

    Parameter completeness

    Full signal

    Symbol, side, entry, targets and stop all extracted — trade as posted.

    Partial signal

    Missing stop or targets fall back to the user's configured default percentages, with a Telegram warning.

    Unrecoverable

    No usable entry even after fallback — abort with an alert.

  4. 4

    Pre-trade guards

    A duplicate open position on the symbol or a balance below the configured minimum aborts before any order.

  5. 5

    Sizing & entry

    Size computed from balance × risk % × leverage at mark price, matched to the contract's precision; the limit entry goes out with its stop-loss preset.

  6. 6

    Fill watch

    Filled

    The take-profit ladder is placed — up to four plan orders, even split or custom distribution.

    Not filling

    Cancelled or erroring orders abort after four attempts, with an alert.

  7. 7

    Breakeven automation

    The monitor detects the first take-profit filling and modifies the live stop-loss to the entry price — the rest of the trade rides risk-free.

  8. 8

    Notify

    Every extraction, fill, fallback and error is mirrored to Telegram per user.

Engineering highlights

The details that keep it alive with real money on the line.

Vision-LLM parsing, hardened

Retries, targeted fallback prompts, price-range midpoints and wrong-side stop correction — the AI is treated as a noisy sensor, not an oracle.

Breakeven automation

TP1 detection via plan-order state, then an in-place modification of the live stop — no cancel-and-race window.

From-scratch exchange SDK

Full Bitget REST signing (HMAC-SHA256 and RSA) and websocket support written directly against the exchange docs.

Multi-tenant mirroring

One listener fans signals out to an admin plus sub-users, each on their own keys and risk profile.

Rate-limit etiquette

Randomized polling jitter on fill checks and monitors keeps N users' worth of traffic under the exchange's radar.

Under the hood

The stack, and the system in numbers.

AI
OpenAI GPT-4 Vision
Engine
Pythonpython-telegram-botCustom Bitget SDK
Dashboard
FlaskVanilla JS
Operations
Linux VPS
2.1k
Lines of code
4
Take-profit ladder levels
15
Exchange endpoints used
13
Settings per user

Need a system like this?

I design and build trading infrastructure end to end — let's talk about yours.