
In this course, you will learn how to use the OpenAI API to build and automate a crypto trading bot connected to Binance, capable of executing trades using the reasoning abilities of the GPT-4o model.
You will see how the bot decides when to enter a trade by generating an image with common technical indicators (TradingView-style) and combining it with a dataframe of recent price data. Both the image and the market data are sent to the LLM, which analyzes the information and decides whether to buy or stay out of the market.
When a buy decision is made, the bot automatically executes a market buy order. The entry price is then sent back to the LLM, which recommends appropriate take profit and stop loss levels. These levels are extracted programmatically and used to place an OCO (One-Cancels-the-Other) order, defining the trade’s exit conditions.
The bot continuously monitors the position, waiting until either the take profit or stop loss is reached. Once the trade is closed, the process starts again in a fully automated loop.
Throughout the course, you will work with the Binance API in Python to retrieve real-time price data, place market orders, and CCXT to manage OCO orders as they are commonly used in real trading systems.
Finally, you will learn how the entire trading bot is containerized using Docker, making it easy to run locally or deploy in different environments.