Skip to main content
Trust, but verify. Binance is unCoded’s reference exchange — and we treat it like one. Every release passes through a comprehensive, code-level test suite that exercises Binance integration end-to-end before any change reaches users. This page documents exactly what gets tested, why it matters, and what the current pass status looks like. The full test suite below runs as part of every release pipeline. Tests are categorized into 7 sections (A–G), covering everything from byte-exact regression checks to concurrency, error taxonomy, security, and live API fidelity.

Why we test this thoroughly

Trading bots fail in subtle ways. A symbol-format bug, an unhandled error code, a misclassified network timeout, or a race condition during reconnection can each turn into real money lost. We’ve seen these failure modes in the wild — on other platforms — and we’ve designed our test suite specifically to catch them before they ship. For Binance specifically, we maintain a byte-identical regression policy: the bot’s behavior on Binance must match the pre-refactor reference exactly. Any change that would alter how an order is placed, how a symbol is resolved, how an error is classified, or how a fee is calculated has to either preserve existing behavior or be explicitly justified. The tests below are not marketing fluff — they are the actual checks that run in CI, and they are documented here so you can see exactly what guarantees you get when running unCoded on Binance.

A. Binance Regression Tests (byte-identical behavior)

These tests verify that the Binance integration behaves exactly as the original reference implementation. Every change must pass these tests unchanged.

A.1 Profile configuration

A.2 API options (must match pre-refactor values exactly)

A.3 Adapter capabilities

A.4 Symbol roundtrip

A.5 Order placement contract

A.6 Binance error code preservation

The bot must preserve all 8 critical Binance error codes for downstream handling:

A.7 Error class → kind mapping

Section A summary: 28/28 tests passing ✅

B. Live Public-API Fidelity Tests

These tests confirm that what unCoded reads from Binance matches what Binance actually serves — byte-exact, no rounding, no transformation drift.

B.1 Live exchangeInfo load

B.2 Filter fidelity (vs. raw Binance API)

The bot fetches tickSize, stepSize, and minNotional from Binance. Each value must match the raw Binance response byte-exactly — any rounding or string-to-float conversion would cause silent precision loss in order placement.

B.3 WebSocket connectivity

Section B summary: 13/13 tests passing ✅

C. Edge Case Tests

Real-world weirdness that has tripped up other platforms in the past — verified here for Binance specifically.

C.1 Symbol parsing edge cases

C.2 Client order ID adaptation

Binance is the only supported exchange where the full LINK_ID prefix must be preserved end-to-end (for the broker rebate program). Other exchanges strip or truncate the prefix.

C.3 Price-tick and lot-size precision

C.4 Time synchronization

Section C summary: 13/13 tests passing ✅

D. Error Taxonomy Tests

Every Binance error must map cleanly into unCoded’s standardized error kinds — so the rest of the bot can react correctly without parsing exchange-specific codes everywhere.

D.1 Standardized error kinds

The bot defines 11 error kinds, each tested for definition:

D.2 Binance code → kind mapping

D.3 Network-level error classification

D.4 Error body integrity

Section D summary: 25/25 tests passing ✅

E. Memory Safety Tests

Long-running processes that leak memory eventually crash. These tests verify that unCoded on Binance can run for weeks without resource buildup.

E.1 Adapter lifecycle

E.2 Symbol map bounds

E.3 Polling loop cleanup

E.4 24-hour soak test

Section E summary: 15/15 tests passing ✅

F. Concurrency / Lifecycle Tests

What happens when the bot has to do multiple things at once — handle a price update during an order placement, recover from a failed call, restart the WebSocket while an order is in flight.

F.1 Multi-instance coexistence

F.2 Mutex protection

F.3 Failure isolation

Section F summary: 9/9 tests passing ✅

G. Security Tests

The bot handles real API keys for real money. Security tests are non-negotiable.

G.1 Credential leak prevention

G.2 SQL injection prevention

G.3 Configuration safety

G.4 TOS gating

Section G summary: 17/17 tests passing ✅

H. Trading Logic Tests (Binance-specific scenarios)

These tests exercise the actual trading logic against Binance’s market behavior — placing orders, managing fills, calculating P&L.

H.1 Order placement

H.2 Order lifecycle

H.3 Multi-symbol concurrent trading

H.4 BNB fee tracking

H.5 Stop-loss and trailing stop-loss

H.6 Time-based exit curves

Section H summary: 24/24 tests passing ✅

I. Mode-specific tests (all 9 pre-built modes on Binance)

Each pre-built mode is tested end-to-end on Binance. Section I summary: 9/9 modes passing ✅

J. Static / Pre-deploy Verification Script

In addition to the runtime audit, every release runs a dedicated pre-deploy verification script: verify-binance.js. This script performs the following checks against a live Binance public API connection (no credentials required):

Test Suite Summary

✅ Binance integration: 203/203 tests passing — production ready.


Continuous testing policy

These tests are not a one-time audit. They are run:
  • Before every release — the entire suite must pass before a new bot version ships.
  • On every code change that touches the trading-bot, exchange-adapter, or exchange-profiles modules.
  • Periodically against live Binance API — to detect upstream API changes (new error codes, modified filter formats, deprecated endpoints) before they affect users.
  • As part of the pre-deploy verification when users redeploy unCoded — the verify-binance.js script can be run as a smoke test after any update.
If a test starts failing, the release is blocked until the regression is fixed. There are no “we’ll fix it in the next release” exceptions for Binance — it’s the reference exchange, and the standard is byte-identical behavior preservation.
Bottom line: When you run unCoded on Binance, you’re running the most thoroughly tested venue in the platform. Every commit to the trading-bot repo passes through 203 automated checks specifically designed to keep the Binance integration rock-solid.
Last modified on May 3, 2026