Documentation Index
Fetch the complete documentation index at: https://uncoded.ch/docs/llms.txt
Use this file to discover all available pages before exploring further.
Status: ✅ Fully integrated, fully tested, production-ready
Binance is the flagship integration of unCoded. It is the venue where the bot was originally developed, the venue with the longest production track record across the entire user base, and the venue against which every code change is regression-tested before release. If you are looking for the most polished, most thoroughly validated unCoded experience, Binance is the right choice.
This page covers everything you need to know about running unCoded on Binance — what’s supported, what’s tested, how to set up your account and API keys correctly, what to expect operationally, and which mistakes to avoid.
1. Why Binance is unCoded’s reference exchange
Binance has been the development home of unCoded since day one. Every feature the bot offers — buy splits, sell percentages, trailing stop-loss, time-based exit curves, maker-only mode, multi-symbol trading, all 9 pre-built modes — was designed against Binance’s API, tested against Binance’s market data, and validated against Binance’s order-execution behavior before being generalized to other exchanges.
What that means in practice:
- Binance is the reference implementation. The internal regression-test suite includes a dedicated “Binance regression” section that runs on every release to verify that pre-existing trading behavior is preserved. No release ships without passing this section.
- The longest live track record. Binance has been running unCoded in production environments longer than any other supported exchange. Every edge case that other venues encounter for the first time has, at some point, been encountered and resolved on Binance first.
- Binance-specific quirks are documented and handled. The exchange’s API has many subtle behaviors —
recvWindow, time-difference adjustment, order-rate limits, WebSocket listenKey expiry, symbol-status transitions, partial fills — and unCoded has explicit, tested handling for each of these.
- Most extensive setup documentation. This page, the API key guide, the sub-account guide, and the troubleshooting guide are all most thoroughly developed for Binance.
If you are a new user and unsure where to start, Binance is the recommended path.
2. What’s supported on Binance
unCoded uses the full Binance Spot Trading API. Every feature available in unCoded is available on Binance — there are no Binance-side feature gaps.
✅ Trading capabilities
- Spot trading (long-only) — the only trading style unCoded supports.
- All Binance Spot trading pairs that match the bot’s standard quote assets (USDT, USDC, BUSD, BTC, ETH, BNB, EUR, TRY, FDUSD).
- Maker and taker orders, with optional maker-only mode for tighter fee structures.
- Limit orders with full price-tick and lot-size precision handling.
- Order rate at the maximum exchange-permitted rate: 50 orders per 10 seconds.
- Multi-symbol concurrent trading from a single bot instance — trade BTC, ETH, SOL, and any number of additional pairs simultaneously, each on its own assigned mode.
✅ API integration depth
- REST API via
api.binance.com — used for order placement, account queries, and historical data.
- WebSocket streams via
stream.binance.com — used for real-time price updates, order updates, and balance updates. WebSocket-driven execution is one of the key reasons the bot can operate at maximum order frequency without missing market moves.
- listenKey-based user data streams with automatic refresh and 410-expiry handling — if Binance invalidates the listenKey (a known periodic occurrence), the bot detects it and re-establishes the connection without missing trades.
- Automatic time synchronization via
adjustForTimeDifference — Binance rejects orders whose timestamp drifts too far from server time. unCoded continuously adjusts for clock drift.
recvWindow set to 60 seconds — the maximum allowed value, giving the bot the largest possible tolerance window before an order is rejected for being “stale.”
✅ Account features
- Sub-account support — strongly recommended and fully supported. Run the bot on a dedicated sub-account isolated from your main holdings.
- IP whitelisting — strongly recommended; lock the API key to your server’s IP address.
- Trading-only API permissions — the bot only ever needs trading permissions. Withdrawals can and should be disabled on the API key.
- BNB fee-token tracking — the bot tracks the live BNB price via WebSocket and uses it to convert fee amounts back into the quote asset for accurate P&L calculation when you have BNB-based fee discounts enabled.
✅ Quote assets supported
- USDT — the default and most common quote asset on Binance. Recommended for most users.
- USDC — fully supported, increasing in liquidity, recommended as a USD-stablecoin alternative.
- BUSD — supported (legacy; Binance has been winding down BUSD pairs).
- FDUSD — fully supported and required for the high-frequency MarketMaker modes (1001 and 1002).
- BTC / ETH / BNB — supported as quote assets for cross-pair trading.
- EUR, TRY — fiat quote assets supported on Binance’s regulated fiat pairs.
The bot’s symbol parser knows about all of these and handles them automatically.
3. Setting up your Binance account
If you don’t have a Binance account yet, follow these steps in order. The order matters because the fee discount cannot be applied retroactively.
Step 1: Create your account using the official referral link
⚠️ Important: Use the official unCoded referral link when creating your account. This activates a 20% lifetime fee discount on top of any other discounts you qualify for (BNB, VIP tiers). This discount cannot be added to an existing account — only at account creation.
If you already have a Binance account that was not created through the referral link, you have two options:
- Continue using your existing account at the standard fee rate.
- Create a fresh Binance account using the referral link, complete KYC on it, and use that account for the bot.
Step 2: Complete identity verification (KYC)
Binance requires full KYC for API trading. Complete the verification process before proceeding:
- Upload a valid government-issued photo ID.
- Complete the facial verification step.
- Wait for verification approval (usually minutes; can take up to a few days during high-volume periods).
You cannot generate a working trading API key on an unverified or partially verified account.
Step 3: Fund your account
Deposit the quote asset(s) you intend to trade with — typically USDT, USDC, or FDUSD. See the Capital requirements section in the system requirements for the recommended amount based on your chosen mode.
You can fund via:
- Bank transfer (SEPA, SWIFT, Faster Payments, etc.)
- Card purchase
- Crypto deposit from another wallet or exchange
- P2P trading
4. Setting up a Binance sub-account (strongly recommended)
A dedicated sub-account for the bot is the security and accounting best practice. It is not strictly required — the bot will work with a main-account API key — but the benefits are significant:
Why sub-accounts matter
- Isolation: The bot can only see and trade the assets you explicitly transfer to the sub-account. Your main holdings are untouchable from the bot’s API key.
- Clean accounting: All bot trades, balance changes, and P&L live in a single sub-account history. Tax reporting and performance review become trivially clean.
- Blast-radius limitation: If anything ever goes wrong — a bug, a leaked key, a misconfiguration — the worst case is limited to whatever you’ve placed in the sub-account.
- Multiple bots, multiple sub-accounts: If you ever want to run two unCoded instances with different strategies, two sub-accounts isolate them perfectly.
How to create a Binance sub-account
- Log into your main Binance account.
- Go to Account → Sub-Accounts.
- Click Create Sub-Account and choose a memorable name (e.g.,
uncoded-bot-1).
- Confirm via 2FA.
- Once created, transfer your trading capital from main → sub-account using the internal transfer feature (instant, no fees).
- Generate your API key on the sub-account, not the main account.
The sub-account inherits your main account’s KYC verification, so no additional ID verification is needed.
5. Generating the Binance API key
The API key is the credential the bot uses to place orders on your behalf. Get this step right — it is the most security-sensitive part of the entire setup.
Step-by-step
- Log into the sub-account (or the main account if you’ve decided not to use a sub-account).
- Go to Account → API Management.
- Click Create API.
- Choose System-generated API Key (the standard option).
- Give the key a memorable label (e.g.,
uncoded-trading).
- Complete 2FA verification.
- Configure permissions (see below) — this is the most important step.
Required API key permissions
| Permission | Setting | Why |
|---|
| Enable Reading | ✅ ON | The bot needs to read balances, order history, and account info. |
| Enable Spot & Margin Trading | ✅ ON (Spot only — leave Margin off if shown separately) | The bot needs to place buy and sell orders. |
| Enable Withdrawals | ❌ OFF — never enable | The bot does not need withdrawal access. Disabling this eliminates the risk of funds being moved out even if the key is somehow leaked. |
| Enable Internal Transfer | ❌ OFF | Not needed; leave disabled. |
| Enable Universal Transfer | ❌ OFF | Not needed; leave disabled. |
| Permits Universal Transfer | ❌ OFF | Not needed; leave disabled. |
| Enable Vanilla Options | ❌ OFF | Not needed; unCoded is spot-only. |
| Enable Futures | ❌ OFF | Not needed; unCoded is spot-only. |
| Enable European Options | ❌ OFF | Not needed. |
Required: IP whitelisting
This is one of the most important security steps and is strongly recommended for every user:
- After creating the API key, click Edit restrictions.
- Select Restrict access to trusted IPs only.
- Enter your VPS server’s public IP address.
- Save.
With IP whitelisting active, even if your API key is somehow leaked (committed to a Git repository, copied into a screenshot, captured by a compromised service), it cannot be used from any IP address other than your VPS. This single step prevents the vast majority of API-key-based attacks.
If your VPS provider gives you a static IP (which most do — Netcup, Hetzner, DigitalOcean, AWS, etc.), this is a one-time configuration. If your IP rotates, you’ll need to update the whitelist after each rotation. Choose a provider with static IPs.
After creation: store the credentials
Binance shows you the API key and the secret only once. Copy both into a secure location — a password manager is ideal — and then transfer them into your unCoded environment variables:
BINANCE_API_KEY = the API Key string
BINANCE_API_SECRET = the Secret Key string
If you lose the secret, you cannot recover it — you’ll have to delete the API key and create a new one.
6. BNB fee discount
Binance offers a 25% trading fee discount when fees are paid in BNB. unCoded supports this fully — when enabled on your account, the bot tracks live BNB pricing via WebSocket and accurately accounts for fees in your P&L calculations.
How to enable the BNB fee discount
- Log into your Binance account (the same one your API key is on — main or sub-account).
- Go to Profile → Dashboard.
- Toggle Use BNB to pay fees to ON.
How much BNB to keep
Keep a small BNB balance so fees can be deducted automatically. The bot does not auto-purchase BNB for you. Recommended balance:
- ~$50 worth of BNB at all times for typical trading activity.
- For very high-volume MarketMaker-mode trading (1001/1002), $100+ in BNB is safer.
If your BNB balance runs out, Binance falls back to deducting fees in the asset you’re trading, which costs you the 25% discount until you top up BNB again. Set a reminder to check your BNB balance once a month.
Compounding with the 20% referral discount
If you created your account through the unCoded referral link, the 20% referral discount stacks with the BNB discount. Effective trading fee: roughly 0.06% on standard spot pairs, vs. the standard 0.10% — a 40% total reduction.
7. Recommended trading pairs on Binance
Binance has several thousand spot pairs, but not all of them are suitable for automated grid trading. The pairs that work best on Binance share a few characteristics:
- High liquidity — tight bid/ask spreads and deep order books.
- Reasonable volatility — enough movement for the bot’s grid to fill, not so much that splits are exhausted in single moves.
- Stable trading status — pairs that aren’t on Binance’s “monitoring” or “innovation zone” lists (those can be delisted with little warning).
Generally well-suited pairs
| Quote asset | Examples | Notes |
|---|
| USDT | BTCUSDT, ETHUSDT, BNBUSDT, SOLUSDT, XRPUSDT, ADAUSDT, DOTUSDT, LINKUSDT, AVAXUSDT, MATICUSDT | The deepest liquidity on Binance. Default for most users. |
| USDC | BTCUSDC, ETHUSDC, SOLUSDC | Growing liquidity; good USDT alternative. |
| FDUSD | BTCFDUSD, ETHFDUSD, SOLFDUSD | Required for MarketMaker modes (1001, 1002). |
| EUR | BTCEUR, ETHEUR | For European users who prefer EUR-denominated trading. |
Pairs to avoid or use with caution
- Newly listed pairs (less than 30 days on Binance) — extreme volatility, low liquidity, high delisting risk.
- Pairs flagged with the “monitoring” tag — Binance reviews these for potential delisting. Read the warning when adding them to a watchlist.
- Pairs with very low daily volume (under ~$1M / 24h) — spreads are wide, slippage is high, and the bot’s grid logic underperforms.
- Stablecoin/stablecoin pairs (USDT/USDC, etc.) — minimal volatility, not suited for grid trading. (FDUSD pairs against USDT are an exception when used with the dedicated MarketMaker modes.)
The dashboard’s pair-management UI lets you maintain whitelist and blacklist sets so the bot only trades pairs you’ve explicitly approved.
8. Operational characteristics on Binance
Once the bot is running on Binance, here’s what to expect operationally:
Order rate
The bot operates at the maximum Binance-permitted rate of 50 orders per 10 seconds. In practice, you will rarely hit this ceiling unless you are:
- Running many symbols concurrently (10+ active pairs).
- Using the high-frequency MarketMaker modes (1001/1002) on multiple pairs.
- Experiencing rapid market moves that trigger many split fills in quick succession.
If you hit the rate limit, the bot waits and retries — orders are not lost.
WebSocket connectivity
Binance’s WebSocket streams are reliable but not infinite. The bot includes:
- Automatic reconnect on dropped connections.
- listenKey refresh every 30 minutes (Binance expires them at 60 minutes).
- Special handling for HTTP 410 responses indicating an expired listenKey.
You may occasionally see brief reconnect events in the logs — this is normal.
Time synchronization
Binance enforces strict timestamp validation. Orders with a timestamp more than recvWindow milliseconds outside Binance server time are rejected with error -1021 (“Timestamp for this request is outside of the recvWindow”).
unCoded sets recvWindow to 60,000 ms (60 seconds) — the maximum Binance allows — and continuously adjusts for clock drift via Binance’s server-time endpoint. This handles even significant VPS clock skew without rejected orders.
Common Binance error codes the bot handles automatically
| Code | Meaning | How unCoded handles it |
|---|
| -1021 | Timestamp out of recvWindow | Re-syncs server time, retries |
| -2010 | New order rejected (insufficient balance, market closed, etc.) | Logs, skips, continues |
| -2013 | Order does not exist | Treats as already-filled or already-cancelled |
| -2014 | Bad API key format | Fatal; bot exits with clear error |
| -2015 | Invalid API key, IP, or permissions | Fatal; check API-key config |
| -1003 | Too many requests (rate limit) | Backs off and retries |
| -1006 | Unexpected response | Logs and retries |
| -1102 | Mandatory parameter missing or empty | Logs and skips |
The dashboard surfaces any persistent error condition so you don’t have to read raw logs to diagnose problems.
9. Modes that work especially well on Binance
All 9 pre-built modes work on Binance, but a few were designed specifically for Binance’s market characteristics:
- Mode 4 — BasicMode: The default mode and the one the team has tested most extensively on Binance. Recommended for first-time users on Binance.
- Mode 1 — FullBullMarket: Designed and validated against Binance’s BTC and ETH USDT pairs during bull-market conditions.
- Mode 1001 — MarketMaker (FDUSD): Designed exclusively for Binance’s BTC/FDUSD, ETH/FDUSD, and SOL/FDUSD maker-only pairs. These pairs are zero-fee on Binance under specific promotion terms — the MarketMaker mode is built around this.
- Mode 1002 — MarketMakerMinimal (FDUSD): Same FDUSD-pair design, with a single-target-plus-time-curve approach for maximum capital turnover.
The MarketMaker modes (1001, 1002) only make economic sense on Binance because of Binance’s FDUSD zero-fee promotion. On other exchanges that don’t have an equivalent zero-fee maker promotion, the high turnover would be eaten by trading fees. If you want to run a MarketMaker mode, you want to run it on Binance.
10. Common Binance-specific mistakes (and how to avoid them)
A short list of issues that come up most often for new Binance users — and how to prevent them:
❌ “I created my Binance account without the referral link”
Impact: You’re paying 20% more in trading fees than you have to, with no way to retroactively apply the discount.
Fix: Either accept the higher rate, or create a fresh Binance account using the referral link, complete KYC on it, transfer your funds, and use that account going forward. Annoying, but worth it for high-volume trading.
❌ “I enabled Withdrawals on the API key”
Impact: Massive security risk. If the key leaks, your funds can be withdrawn.
Fix: Edit the API key and disable withdrawals immediately. unCoded never needs withdrawal access.
❌ “I didn’t enable IP whitelisting”
Impact: Anyone with the API key can use it from anywhere.
Fix: Edit the API key and add your VPS’s IP address to the trusted IP list. Test the bot still works after.
❌ “I’m using the main account, not a sub-account”
Impact: All your Binance assets are exposed to the bot’s API key. Accounting becomes messy.
Fix: Create a sub-account, transfer your trading capital to it, generate a new API key on the sub-account, and update your unCoded environment variables. Delete the old main-account API key.
❌ “I forgot to enable BNB fee discount”
Impact: You’re paying 25% more in fees than necessary.
Fix: Toggle “Use BNB to pay fees” to ON in your Binance dashboard, and keep ~$50 worth of BNB on the trading account.
❌ “I’m trying to run MarketMaker mode on a USDT pair”
Impact: The mode is calibrated for FDUSD pairs with zero-fee promotions. On a fee-bearing USDT pair, the high turnover loses money to fees.
Fix: Either switch to an FDUSD pair (BTCFDUSD, ETHFDUSD, SOLFDUSD) for MarketMaker modes, or pick a different mode (BasicMode, LongTimeLong, etc.) for USDT pairs.
❌ “I funded the wrong sub-account / wrong asset”
Impact: Bot reports zero balance and skips all buys.
Fix: Verify in the dashboard which account the API key belongs to, and transfer your quote asset (USDT, USDC, FDUSD) to that exact account. Internal transfers between sub-accounts are instant on Binance.
11. What’s next?
If you’ve decided Binance is the right venue for your unCoded setup:
- ✅ Confirm your system requirements are met (server, capital, accounts).
- 📝 Follow the detailed Binance setup guide to walk through account creation, KYC, sub-account, and API key generation step by step.
- 🚀 Move to the deployment guide to install unCoded on your server.
- 🎛️ Use the mode-selection guide to pick the right pre-built mode for your capital and risk profile.
- 📊 Open the dashboard and monitor your first trades.
Personal setup support: If you’d like a one-on-one walkthrough of your Binance setup specifically — referral link, sub-account creation, API key permissions, IP whitelist — book a personal setup call via Calendly. Most users finish a Binance setup call in 30–45 minutes.
12. TL;DR
- ✅ Binance is fully integrated and fully tested — it’s the reference exchange for unCoded.
- ✅ All unCoded features work on Binance — every mode, every parameter, every order type.
- ✅ Use the official referral link to activate the 20% lifetime fee discount.
- ✅ Create a sub-account for isolation and clean accounting.
- ✅ API key with trading-only permissions and IP whitelisting is the secure default.
- ✅ Keep ~$50 in BNB for the additional 25% fee discount.
- ✅ USDT, USDC, FDUSD, EUR are all supported quote assets.
- ✅ MarketMaker modes (1001, 1002) are Binance-FDUSD-specific and benefit from the zero-fee FDUSD promotion.
- ✅ Maximum order rate (50/10s) and WebSocket-driven execution for top-tier performance.
- ✅ Battle-tested error handling for every common Binance API edge case.
Welcome to running unCoded on Binance.