VIZANIXSoftware · Automation · Design

ENGINEERING CASE · Bybit · USDT perpetual · production

Bybit Trading Bot

A multi-key Bybit V5 executor: candle stream, signal engine, bracketed exits and a full Telegram control plane.

The task: The client traded a reversal setup by hand and kept missing entries overnight. Several accounts had to run independently, each with its own parameters and its own coin universe, without a screen in front of anyone.

DELIVERY

What was built

  • Bybit V5 REST and WebSocket on a unified trading account
  • Sharded candle stream so one connection is never a single point of failure
  • Signal engine evaluating a candle-series and RSI setup per symbol per timeframe
  • Limit entry with a time-to-live, plus early cancel when the move happens without us
  • Bracket on fill: up to five partial take-profits and one stop, sized from the impulse
  • Fee-aware position sizing that accounts for entry and stop commission before the exchange does
  • Retry ladder when the venue reports insufficient funds — shrink and re-quote, up to five attempts
  • Rolling 7-day candle archive with automatic backfill
  • Telegram control plane: keys, parameters, universe, statistics, positions

EVIDENCE

Engineering measurements

725symbols streamed live
10 / 10WebSocket shards connected
1 850subscribed topics
1 450candle buffers (symbol × timeframe)
~900/smessages sustained
±40 msclock offset vs the venue
1.2Mmessages in a single session
15 klines of application code
5 klines of tests

Figures describe software behaviour and come from the running system. Client identity, strategy parameters and financial results stay under NDA; the cover is a schematic, not a client screenshot.

THE HARD PART

What could not be hand-waved

Partial fills and rate limits. A GTC entry that fills halfway leaves a position nobody planned; the naive fix — waiting for the TTL — leaves risk uncovered. Reconnects are the other one: a WebSocket drop must not produce duplicate orders.

THE RESPONSE

How the risk was addressed

Explicit order state machine. A partially filled entry cancels its remainder immediately instead of waiting out the TTL, and the filled part is either closed at market or bracketed, by configuration. On reconnect the bot recovers sequence and reconciles against the exchange before it is allowed to send anything.

START A PROJECT

Tell us what you want to build

A short description and one contact are enough. Do not send exchange keys, passwords or sensitive data.

Or contact us directly · @vx_ceo

Add an email or Telegram handle — at least one is required.