Wallet Manager is a DI-wired TypeScript library that wrapsDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/tripolskypetr/wallet-manager/llms.txt
Use this file to discover all available pages before exploring further.
node-binance-api with production-correct order management logic. It ships an interactive REPL so you can drive your Binance spot account by hand — buy, sell, flatten a symbol, inspect balances and PnL — and serves as the canonical reference implementation for the exchange side of a backtest-kit broker adapter.
Introduction
Understand what Wallet Manager does, why it exists, and when to use it.
Quickstart
Configure your API keys, build the bundle, and run your first REPL command in minutes.
REPL Guide
Learn how to use the interactive REPL to inspect and trade your Binance spot wallet.
Broker Adapter
See the three rules that turn these flows into a production backtest-kit broker adapter.
Order Management
Understand the cancel → verify → sell sequence that prevents balance lock errors.
API Reference
Explore every method on WalletPublicService with full parameter and return type docs.
How it works
Configure your Binance API keys
Create a
.env file in the project directory with CC_BINANCE_API_KEY and CC_BINANCE_API_SECRET.Build and start the REPL
Run
npm start — it builds the ESM bundle with Rollup, loads .env via dotenv, and drops you into the interactive prompt.Drive the exchange by hand
Use
wallet.walletPublicService.* methods in the REPL to fetch prices, inspect orders, buy and sell — all with structured audit logging after every commit.Key design principles
Cancel before sell
Every resting order locks its quantity. Wallet Manager always cancels pending orders and verifies a clean book before selling — preventing insufficient-balance errors.
Poll → cancel → market fallback
Limit orders are polled for up to 100 seconds. On timeout, the order is cancelled and the remainder is filled with a market order — entries never stay resting.
Per-symbol serialized queue
WalletPublicService serializes all operations per symbol using a queued executor, preventing race conditions from concurrent calls.clientOrderId reconciliation
On retry, the adapter reconciles by
clientOrderId (= signalId) before posting a new order — a lost-response fill resolves to “already bought”, not a duplicate entry.