← All platforms

B Binance — full setup

A Python bot that connects to your Binance Futures account directly and trades on its own. No third party ever sees your keys. Follow every step in order — nothing is skipped.

⚠️ Stragenius never asks for your API key, password, or funds. The bot runs on your computer and talks straight to Binance. Anyone (even "support") asking for your keys is a scammer. Test on testnet (fake money) first.

1 · Install Python (one time)

The bot is a Python program, so you need Python on your computer. You only do this once.

  • Windows: go to python.org/downloads, click the big "Download Python" button, run the installer, and — this matters — tick "Add python.exe to PATH" at the bottom of the first screen before clicking Install.
  • Mac: download from the same page and run the installer (PATH is handled for you).
  • Check it worked: open a terminal (Windows: press Win, type cmd, Enter · Mac: open Terminal) and type python --version. You should see a version number like Python 3.12.x. (On Mac, if that fails, try python3 --version.)

2 · Install the Binance library (one time)

In that same terminal, run:

pip install -U python-binance

On Mac, if pip isn't found, use pip3 install -U python-binance. Wait for it to finish ("Successfully installed…"). The bot needs version 1.0.37 or newer: Binance moved take-profit / stop-loss orders to a new API in December 2025, and older versions can't place them. If you installed it earlier, run the same command again to update — the bot refuses to start on an old version.

3 · Enable Futures on Binance (do this before making a key)

Binance accounts don't trade Futures by default, and an API key made before Futures is enabled won't work for the bot. So enable it first:

  1. Log in to Binance → open the Futures section (top menu) → complete the short risk quiz to activate your USD-M Futures account.
  2. Move some USDT into your Futures wallet (Wallet → Transfer → Spot to USD-M Futures). Start small — the coin you picked shows a minimum on the generate page.
  3. Set the position mode to One-way: Futures → ⚙ Preferences → Position Mode → One-way Mode. In Hedge mode the bot stops at start and tells you to switch.
  4. Margin mode (Cross or Isolated, shown next to the leverage on the order panel) is your choice. Isolated limits a bad trade to that position's margin; Cross can use your whole Futures wallet. If unsure, pick Isolated for this coin before starting the bot.

4 · Create the API key (Futures + IP lock)

The API key is how the bot logs into your account to place orders. Create it carefully:

  1. Binance → Account → API Management → Create API → pick System generated → give it a name like "Stragenius" → verify with your 2FA.
  2. You'll now see two long strings: the API Key and the Secret Key. Copy the Secret Key somewhere safe right now — Binance shows it only once. Copy the API Key too.
  3. Click Edit restrictions, then tick Enable Futures. Leave Enable Withdrawals OFF — the bot never withdraws. Anyone telling you to turn it on is a scammer.
  4. Lock the key to your computer's IP (this stops anyone else from ever using it):
    • Find your public IP: open whatismyipaddress.com and copy the IPv4 number.
    • On Binance, choose "Restrict access to trusted IPs only", paste that number, and press Confirm — if you don't press Confirm, it won't save.
  5. Save.
Heads-up — home internet changes its IP. Most home connections get a new IP every few days. If the bot later stops with error -2015 ("invalid API-key / IP / permissions"), your IP changed: just re-open Edit restrictions on Binance and paste your new IP. Want it to never change? Run the bot on a cheap cloud server (VPS) with a static IP — see step 8.

5 · Download the bot & open a terminal in its folder

  1. From your Stragenius dashboard, download stragenius_binance_<SYMBOL>.py (e.g. stragenius_binance_BTCUSDT.py). It lands in your Downloads folder.
  2. Open a terminal in that folder — this is the step people miss:
    • Windows: open the Downloads folder, click the address bar, type cmd, press Enter. A black window opens already in that folder.
    • Mac: open Terminal and type cd ~/Downloads then Enter.

6 · Test with fake money first (testnet)

The bot ships with LIVE = False, so out of the box it trades on Binance's testnet — a practice exchange with fake money. Prove everything works there before risking a cent.

  1. Get free testnet keys: go to testnet.binancefuture.com, log in with GitHub/Google, and copy the testnet API Key and Secret shown there. The testnet account comes with fake USDT; if it runs out, use the testnet site's balance/faucet button. (Testnet is a completely separate account with separate keys — your real keys don't work there and testnet keys don't work live.)
  2. Run the bot:
    python stragenius_binance_<SYMBOL>.py
    (Mac: use python3 if python doesn't work.)
  3. The bot asks for your key and secret right in the terminal — paste the testnet ones and press Enter. You don't edit any files.

7 · What you'll see (and how to stop it)

  • On start it prints a line like Stragenius BTCUSDT leverage=2x TESTNET (generated …, settings …).
  • It checks the market once a minute. When it opens a trade you'll see a [bull] LONG … or [bear] LONG … line with the take-profit and stop it placed on Binance (you'll see them under Open Orders → TP/SL). When a trade closes you'll see it noted too.
  • If Binance refuses the take-profit / stop-loss, the bot closes the position immediately and stops, so you're never left holding an unprotected trade. Read the error it prints before restarting.
  • Signal skipped: position too small … means your margin per trade is below Binance's minimum for this coin; the line tells you the minimum. Generate the script again with a larger budget.
  • Nothing happening for a while is normal — the bot only trades when its rules line up (right regime, enough volatility, a real signal). Quiet markets = no trade, on purpose.
  • To stop it: click the terminal window and press Ctrl + C. Any open position keeps its take-profit / stop-loss on Binance — those stay active even after the bot is off.
  • Restarting: run it again from the same folder. The bot remembers its open trade in stragenius_<SYMBOL>_state.json and picks it up instead of buying again (it still closes it at the max hold time).
  • One bot per coin, hands off: don't trade the same coin by hand on that account and don't run two copies of the bot for the same coin. If the bot finds a position it didn't open, it refuses to start.

8 · Go live (only when you're confident)

  1. Open the .py file in any text editor (Notepad works) and change the line _LIVE = False to _LIVE = True. Save.
  2. Run it again and paste your real (IP-locked) API key and secret when asked.
  3. The bot needs an always-on machine to keep trading. Options: leave your PC on, or rent a small VPS (cloud server, ~a few $/month) — a VPS also gives you a fixed IP so the whitelist never breaks.

Remember: even if the bot or your internet goes down, your take-profit and stop-loss orders are sitting on Binance and will still trigger. That's why we place them on the exchange, not just in the bot.

Common problems

  • -2015 invalid API-key / IP / permissions → your IP changed (update the whitelist), or "Enable Futures" wasn't ticked, or you used spot keys. Re-check step 4.
  • 'python' is not recognized (Windows) → Python wasn't added to PATH. Re-install and tick "Add python.exe to PATH" (step 1).
  • ModuleNotFoundError: binance → the library isn't installed. Re-run pip install python-binance (step 2).
  • Signal skipped: position too small → your budget is below Binance's minimum for the coin. Pick a larger budget or a more liquid coin (the generate page shows each coin's minimum).
  • -4120 Order type not supported for this endpoint → the bot or library is out of date. Run pip install -U python-binance and download the script again from your dashboard (scripts generated before November 2026 use the old order API).
  • -1111 Precision is over the maximum or -1106 closePosition not required → an old script. Download it again from your dashboard; current scripts round to Binance's rules.
  • "Your Binance Futures account is in Hedge mode" → switch to One-way mode (step 3) and restart.
  • -2019 Margin is insufficient → not enough USDT in the Futures wallet for the trade. Transfer more (step 3) or lower the budget.