Edgoro
Python crypto bots

Builders

Python crypto bots with ccxt

Short answer

With the trading bots option, Edgoro writes complete crypto trading bots in Python 3.11 or later, built on ccxt, the open-source library that connects to most crypto exchanges. Without other instructions a bot targets Binance spot; you can ask for Bybit, OKX, Kraken or another ccxt exchange. Every bot is written to start in paper mode and reads your API keys from a .env file on your machine. The code is checked with Python's py_compile, which catches syntax errors only, with up to 2 automatic fix requests per conversation.

On this page

What you get

  • bot.py: the complete bot in one python code block.
  • requirements.txt: limited to ccxt, pandas and python-dotenv unless more is truly needed. Indicators are computed with pandas (EMA, Wilder RSI, ATR), so there's no TA-Lib to install.
  • How it works: data, entry, exit, risk and filters in plain English.
  • Run it safely: the numbered steps below.

Python code blocks have a Copy button (the Download button is for .pine and .mq5 files).

Defaults the bot is written with

These are the builder's instructions to the AI, so check them in the file before you run it:

  • Keys only from environment variables (os.getenv with python-dotenv), never written in the code.
  • ccxt.<exchange>({"enableRateLimit": True, ...}), PAPER = True by default (orders are logged instead of sent), and exchange.set_sandbox_mode(True) when the exchange has a testnet.
  • Candles from fetch_ohlcv into pandas; one action per closed candle; one position per symbol.
  • Size from your risk (RISK_PCT of the free balance and the stop distance), within the exchange's limits and rounded with amount_to_precision and price_to_precision.
  • Stop-loss and take-profit managed by the bot, or by exchange parameters when supported; a daily loss limit.
  • Retries on ccxt.NetworkError, clear logging, and a clean exit on Ctrl+C.

What the syntax check covers

When the answer is complete, the python block is sent to Edgoro's compile service, which runs Python's py_compile on a temporary file and deletes it. The same access rules as MQL5 apply: a plan with the trading bots option, up to 60 checks per hour.

  • "Python syntax checked: 0 errors" means the file parses as valid Python.
  • If it doesn't, the error and its line go back to the AI automatically, up to 2 automatic fix requests per conversation.

py_compile doesn't install the requirements, import ccxt, connect to an exchange or run the strategy. API permissions, minimum order sizes, symbols an exchange doesn't list and regional restrictions only show up when you run the bot, which is why it starts in paper mode.

How to run it

  1. Install Python 3.11 or later.
  2. Create an exchange API key with trading permission only: withdrawals disabled, and an IP whitelist if the exchange offers one. Testnet keys are separate from live keys.
  3. Put the keys in a .env file next to bot.py.
  4. Run pip install -r requirements.txt.
  5. Start on the testnet or in paper mode: python bot.py.
  6. Live trading starts only when you set PAPER = False yourself.

The bot runs wherever you start it, on your computer or a VPS. Edgoro never asks for your exchange keys and doesn't host bots.

Trading involves substantial risk of loss and is not suitable for every investor. Edgoro is a software tool, not a broker or financial adviser: nothing it produces is investment advice, and past or backtested performance does not guarantee future results.

Something wrong or missing? Email contact@edgoro.com