DEV Community

GainAlgo
GainAlgo

Posted on

I built an open-source crypto trading bot that runs 4 exchanges from one server

GainAlgo is an MIT-licensed crypto trading bot I've been building. The latest update lets it manage four exchanges from a single server and one dashboard:

Exchange Futures (USDT-M) Spot
Binance
Bybit
Upbit
Bithumb

That's 2 futures + 4 spot markets, all in one process.

Honesty first: it's not a money machine

On its own, the bot is roughly break-even. I think of it as tilling the field and standing guard 24/7 — the human still does the final harvest. Defaults are deliberately safe: every engine off, paper mode, single server. Live trading is an explicit, per-exchange opt-in.

If you came for "wake up to money piling up," this isn't that. It's a framework you tune — together.

Why one server?

Running a separate bot per exchange means juggling windows and duplicated infra. GainAlgo keeps them in one place but fully isolated:

  • Capital — one exchange's balance/positions never leak into another's sizing.
  • Records — trade journals, daily P&L, and gate stats are kept per-exchange.
  • Settings — entry/exit configs are tuned independently per exchange.

One screen, zero cross-contamination.

What shipping multi-exchange taught me

Before open-sourcing the latest work, I ran a multi-agent adversarial audit over the code and fixed what it surfaced:

  • a paper-mode path that still queried the live account,
  • missing order idempotency (a retry could double-fill),
  • per-exchange record files that could overwrite each other.

Small bot, but I'd rather knock on the bridge before crossing it.

Try it

git clone https://github.com/gainalgo/nunnaya

Copy .env.example.env, fill only the exchange keys you use (withdrawal permission off), and run. It boots in paper mode by default — observe first.

Contribute

This is a community project — the whole point is finding good configs together. Issues, PRs, and honest teardowns are welcome.
⭐ Repo: https://github.com/gainalgo/nunnaya

Top comments (4)

Collapse
 
manolito99 profile image
Lolo

The bug where paper mode was still hitting the live account is the kind of thing that would have hurt someone. Good catch before shipping.

Curious how you're handling rate limits when all 4 exchanges are running at the same time that's usually where it gets messy.

Collapse
 
bravilogy profile image
Bravi

Hi, thanks for sharing! I've also been polishing my Binance trading bot for quite some time and it's always super useful to see other strategies.

Some comments may only be visible to logged-in visitors. Sign in to view all comments.