.. Generated by scripts/generate_ccxt_exchange_pages.py from docsrc/_data/. Edit the data, not this page. Bitvavo Trading Bot in Python: AI Agent and Algorithmic Trading with LumiBot ============================================================================ .. meta:: :description: Build a Bitvavo trading bot in Python with LumiBot and CCXT. Create Bitvavo API keys, connect them, and run a regular or AI agent strategy. :keywords: Bitvavo trading bot, Bitvavo API, Bitvavo Python, agentic trading Bitvavo, AI trading bot Bitvavo, algorithmic trading Bitvavo, ccxt bitvavo This guide shows how to build a Bitvavo trading bot in Python with LumiBot. LumiBot connects to Bitvavo through CCXT, the open source library that talks to more than 100 crypto exchanges. You will create a Bitvavo account and API key, connect it, and run two examples: a simple algorithmic trading bot and an agentic trading bot where an AI agent makes the calls. Bitvavo at a glance ------------------- .. list-table:: :widths: 35 65 * - CCXT exchange id - ``bitvavo`` * - Markets - Spot * - Testnet (sandbox) - No * - Credentials - API key, API secret * - Live data streams - prices, order book, trades, candles, your orders * - CCXT request spacing - about 60 ms between requests * - Official site - https://bitvavo.com/ * - API docs - https://docs.bitvavo.com/ * - Fees - https://bitvavo.com/en/fees What is Bitvavo? ---------------- Bitvavo is a crypto exchange based in the Netherlands. It offers spot trading with prices in euros. Sign up for Bitvavo ------------------- #. Create a Bitvavo account and finish identity verification. #. Turn on two-factor authentication. Bitvavo will not let you create API keys without it. #. Bitvavo has no testnet, so plan to test with a very small amount. `Open a Bitvavo account `_ Create a Bitvavo API key ------------------------ #. Log in on the website (keys cannot be made in the app), click your name and choose Settings. #. Open the API tab and click Add new API key. #. Enter a name and the IP address of your bot. Separate more than one IP with commas. #. Choose the permissions (see below). #. Enter your two-factor code and click Confirm. Save the key and secret right away; you cannot see the secret again. **Which permissions to turn on:** Turn on View access and Trade digital assets. Bitvavo needs both to read your orders and trades. Leave Withdraw digital assets off: Bitvavo warns that API withdrawals skip two-factor and email checks. .. warning:: Never turn on withdrawals for a Bitvavo trading bot key. Bind the key to your server's IP address when Bitvavo lets you, keep the secret out of your code and out of Git, and delete the key if it ever leaks. Connect Bitvavo to LumiBot -------------------------- The simplest way: put these lines in a ``.env`` file next to your strategy. LumiBot loads the file, sees ``TRADING_BROKER=bitvavo`` and connects to Bitvavo for you, so your strategy needs no broker code. .. code-block:: bash TRADING_BROKER=bitvavo BITVAVO_API_KEY=your_apiKey BITVAVO_API_SECRET=your_secret LumiBot reads exactly the fields CCXT needs for Bitvavo (``apiKey``, ``secret``). If one is missing, LumiBot stops at start-up and names the variable you still need. You can also build the broker in code. This is handy when one script talks to more than one exchange. The keys in the config are CCXT's own credential names for Bitvavo: .. code-block:: python import os BITVAVO_CONFIG = { "exchange_id": "bitvavo", "apiKey": os.environ.get("BITVAVO_API_KEY"), "secret": os.environ.get("BITVAVO_API_SECRET"), "sandbox": False, # this exchange has no CCXT sandbox } from lumibot.brokers import Ccxt broker = Ccxt(BITVAVO_CONFIG) # then: MyStrategy(broker=broker, ...) Either way, LumiBot turns on CCXT's built-in rate limiting for you. Testing on Bitvavo ------------------ Bitvavo has no sandbox, and CCXT lists no test URL for it, so test with a very small amount. With environment variables, leave ``BITVAVO_SANDBOX`` unset. In a code config, always set ``"sandbox": False``: a code config without it turns sandbox mode on, and CCXT then fails because Bitvavo has no test site. Algorithmic trading example: a simple Bitvavo bot ------------------------------------------------- This bot buys about 50 EUR of bitcoin on Bitvavo once and then holds it. It is a starting point to check that your keys, balances and orders work. .. code-block:: python from lumibot.entities import Asset from lumibot.strategies import Strategy class BuyBitcoinOnBitvavo(Strategy): """Buy a small amount of BTC once, then hold it.""" def initialize(self): self.sleeptime = "1H" self.set_market("24/7") # crypto trades all day, every day def on_trading_iteration(self): btc = Asset("BTC", asset_type=Asset.AssetType.CRYPTO) if self.get_position(btc) is not None: return # already holding BTC price = self.get_last_price(btc, quote=self.quote_asset) if price: quantity = round(50 / price, 6) # about 50 EUR worth order = self.create_order(btc, quantity, "buy", quote=self.quote_asset) self.submit_order(order) if __name__ == "__main__": # LumiBot reads TRADING_BROKER and the keys from your .env file. strategy = BuyBitcoinOnBitvavo(quote_asset=Asset("EUR", asset_type=Asset.AssetType.CRYPTO)) strategy.run_live() Agentic trading example: an AI agent that trades on Bitvavo ----------------------------------------------------------- Agentic trading means an AI agent reads the market and decides what to do. In this example one LumiBot agent looks at prices and your Bitvavo account, then places the orders itself. There is no Python logic in between: you set the rules in plain English in the prompt, such as which coins it may trade and how big each order can be. This follows the same pattern as LumiBot's AI trading team examples. .. code-block:: python from lumibot.entities import Asset from lumibot.strategies import Strategy class BitvavoAITrader(Strategy): """One AI agent researches the market and places the trades itself.""" def initialize(self): self.sleeptime = "4H" self.set_market("24/7") self.agents.create( name="trader", model="openai/gpt-6-luna", reasoning_effort="high", allow_trading=True, system_prompt=( "You manage a small crypto account on Bitvavo. You may trade BTC and ETH " "against EUR (asset_type 'crypto', quote_symbol 'EUR'), or hold cash. " "Before every order, call account_portfolio, account_positions and " "market_last_price for that exact symbol in the same run. " "Keep each order under 10% of the account value. " "Explain each decision in one short paragraph." ), ) def on_trading_iteration(self): self.agents["trader"].run( task_prompt=( "Review recent BTC/EUR and ETH/EUR prices and your current holdings, " "then decide whether to buy, sell or hold." ), context={"exchange": "Bitvavo", "quote": "EUR", "date": self.get_datetime().isoformat()}, ) if __name__ == "__main__": # LumiBot reads TRADING_BROKER and the keys from your .env file. strategy = BitvavoAITrader(quote_asset=Asset("EUR", asset_type=Asset.AssetType.CRYPTO)) strategy.run_live() The agent needs a model key such as ``OPENAI_API_KEY`` in your environment. See the :doc:`AI agents quickstart ` for models, tools and memory. What you can trade on Bitvavo through CCXT ------------------------------------------ .. list-table:: :header-rows: 1 :widths: 40 60 * - Market - Listed by CCXT * - Spot - Yes * - Margin - No * - Perpetual swaps - No * - Dated futures - No * - Options - No CCXT lists these order features for Bitvavo: market orders, limit orders, stop orders, editing open orders, canceling orders. Bitvavo tips ------------ * Bitvavo markets are priced in euros, so use ``EUR`` as your quote asset (for example ``BTC/EUR``). * Bitvavo supports sub-accounts. An API key can be given access to sub-accounts and internal transfers, but a trading bot does not need those permissions. Frequently asked questions -------------------------- **Can I build a Bitvavo trading bot in Python?** Yes. Install LumiBot (``pip install lumibot``), set your Bitvavo keys and use the ``bitvavo`` CCXT exchange id as shown above. **Does Bitvavo have a testnet?** CCXT does not list a testnet for Bitvavo. Leave ``BITVAVO_SANDBOX`` unset and start with a small amount. **Which API permissions does a Bitvavo bot need?** Turn on View access and Trade digital assets. Bitvavo needs both to read your orders and trades. Leave Withdraw digital assets off: Bitvavo warns that API withdrawals skip two-factor and email checks. **Can an AI agent trade on Bitvavo by itself?** Yes. The agentic example above gives one agent permission to trade. You control what it may trade and how much through its prompt. **Can I trade Bitvavo perpetual futures with LumiBot?** CCXT does not list perpetual swaps for Bitvavo, so use spot markets. **Is LumiBot free?** Yes. LumiBot is open source on GitHub at https://github.com/Lumiwealth/lumibot. You pay only your exchange's trading fees and, for AI agents, your model provider. Run it in the cloud with BotSpot -------------------------------- Do not want to keep a computer running for your Bitvavo bot? BotSpot is the hosted home for LumiBot strategies and AI trading agents: build with AI, backtest, connect a broker, and watch every trade with logs and alerts. `Try BotSpot `_ Related guides -------------- * :doc:`CCXT crypto trading with LumiBot ` * :doc:`AI agents quickstart ` * :doc:`Binance trading bot ` * :doc:`BitMEX trading bot ` * :doc:`Bybit trading bot ` * :doc:`Coinbase Advanced trading bot ` Sources ------- * `Bitvavo Help Center: What are API keys and how do I create them? `_ (read 2026-10-23) * `Bitvavo API docs: get started `_ (read 2026-10-23) * `Bitvavo REST API: permissions `_ (read 2026-10-23) * Exchange id, URLs, markets, credentials and stream support: CCXT 4.5.64 metadata, generated 2026-10-23