---
title: 'How to Build an AI Crypto Trading Bot with Gemini'
source: 'https://youtube.com/watch?v=7pE7gcOID9A'
video_id: '7pE7gcOID9A'
date: 2026-08-04
duration_sec: 348
---

# How to Build an AI Crypto Trading Bot with Gemini

> Source: [How to Build an AI Crypto Trading Bot with Gemini](https://youtube.com/watch?v=7pE7gcOID9A)

## Summary

This video provides a step-by-step tutorial on setting up an AI-powered arbitrage trading bot for Ethereum. The bot uses AI to detect price differences in stablecoin mempools and execute arbitrage trades. The tutorial covers deploying the bot on a cloud server, creating a smart contract, funding it with Ether, and starting the bot.

### Key Points

- **Bot Overview** [00:01] — The bot makes profitable transactions on the Ethereum network by noticing price differences on stablecoin mempools and running arbitrage trades to grab the spread.
- **Prerequisites** [00:15] — Recommends using MetaMask wallet, but Trust Wallet or Phantom Wallet are fine alternatives. A free guide in the description provides steps and links for the wallet part.
- **Creating Bot File** [00:42] — On the hosting website, create a new file with a .py extension (e.g., bot.py) and paste the bot code from the description guide into the code editor.
- **Compiling and Deploying** [01:10] — Switch to the compile tab and press compile and build to handle dependencies. Then open the deploy tab and click deploy on cloud environment to deploy the bot container.
- **Smart Contract Deployment** [01:49] — Before making transactions, the bot needs a smart contract on Ethereum. Deploy it on Ethereum mainnet using the load smart contract function. Cost is about $50.
- **Verifying Contract** [02:17] — Verify the smart contract deployment on Etherscan to confirm ownership and successful deployment on the Ethereum network.
- **Funding the Contract** [02:30] — Copy the smart contract address and fund it with at least one Ether to cover gas fees and provide liquidity. More funds allow the bot to profit more from the spread.
- **Checking Liquidity** [03:18] — Use the update liquidity balance function to check the total liquidity balance, confirming the deposited Ether is available.
- **Starting the Bot** [03:34] — Kick off the start bot function. The bot initializes and begins scanning mempools in real time for profitable trades.
- **Results After 24 Hours** [04:24] — After running for 24 hours, the bot may have made trades, but results can be affected by network congestion and gas fees. To withdraw liquidity, stop the bot and run the liquidity function.

### Conclusion

The tutorial provides a complete walkthrough for setting up an AI arbitrage trading bot on Ethereum, from creating the bot file to deploying and funding it. While the bot can generate profits, results depend on network conditions and gas fees.

## Transcript

are some profitable transactions the bot made on the Ethereum network. The way it works is the AI notices price differences on stable coins mempools and runs arbitrage trades to grab the spread. If this kind of stuff is your
thing, drop a like and let's begin the tutorial. Hi guys, in this one we are going to set up an AI arbitrage trading bot that I made from scratch using AI. So, to kick things off, I really recommend the free
guide in the description box. It lays out all the steps and links you'll need for the wallet part. MetaMask works great and that's what I'm using. Though, Trust Wallet or Phantom Wallet are fine alternatives, too. Okay, so go to the
website down in the description. It's designed for developers to run projects on cloud hosted servers, and we'll host the bot there. First up, we need a bot file. So, in the files explorer tab, click on new file.
Give it a py extension. [music] I'm naming mine bot. py, though any name works. From here, copy the bot code that's in the description guide and paste it over into the code editor. Now, switch to the compile tab and press
compile and build. That handles downloading dependencies and compiling.
just go ahead and open the deploy tab. Since we're deploying for the first time, just go ahead and click deploy on cloud environment. And your bot cloud environment. And your bot container gets deployed on the cloud.
the right is the console. That's how we control the bot. And it just loaded up all the functions for interacting with it. So before the bot can make transactions, it needs a smart contract on Ethereum. Since it's a brand new
setup though, we'll deploy the smart contract on Ethereum mainet. So go ahead and fire up the load smart contract function. Deploying a contract is pretty affordable nowadays. It's about 50.
All right, let's confirm our smart contract deployed successfully [music] by verifying it over on the Etherscan link. Here it shows our smart contract is deployed on the Ethereum network and we can confirm we're the owner of the
bots's contract. Back on the website, the next move is giving our bot smart contract enough liquidity to trade with. Start by copying the address of your smart contract and funding it with enough
Ether. Right here, I'm funding the bot by sending some Ether into our contract. Personally, I'd recommend at least one Ether. That keeps gas fees from eating your profits and [music] gives the bot
enough liquidity to trade. One more thing, the more you send in, the more the bot can profit from the spread between two transactions.
the update liquidity balance function to check the total liquidity balance. There it is. The ether we deposited is now displaying in the total liquidity balance. All right, let's kick off the start bot function.
It takes a couple seconds for the bot to start and initialize.
trades while the AI scans the memp pools in real time. Now I'm going to let it run continuously. The AI will search for profitable trades for a full day. Then profitable trades for a full day. Then we'll check back for results. [music]
going by itself for around 24 hours now. Sweet. You can see the bot actually probably down to congestion on the Ethereum network plus gas fees given it depends heavily on stable coins mempools. Now, to take out the
liquidity, the bot needs to be stopped. Run the stopbot function and hold on Run the stopbot function and hold on while it finishes.
liquidity function. That can take up to 30 seconds, so sit tight.
[music] folks. That covers the whole walk through. If you want to run it description has you covered. [music] Please comment, subscribe, and I'll catch you guys in the next video. See you.
