Packt
Advanced Trading Bot on DYDX with AWS & Python

Unlock access to 10,000+ courses with Coursera Plus. Start 7-Day free trial.

Packt

Advanced Trading Bot on DYDX with AWS & Python

Included with Coursera Plus

Gain insight into a topic and learn the fundamentals.
Advanced level

Recommended experience

1 week to complete
at 10 hours a week
Flexible schedule
Learn at your own pace
Gain insight into a topic and learn the fundamentals.
Advanced level

Recommended experience

1 week to complete
at 10 hours a week
Flexible schedule
Learn at your own pace

What you'll learn

  • Implement statistical arbitrage and cointegration strategies using Python and DYDX APIs.

  • Build and automate trading bot infrastructure with AWS EC2 and CRON.

  • Integrate Telegram messaging for real-time trading alerts and updates.

  • Apply effective position sizing, risk management, and trade automation techniques.

Details to know

Shareable certificate

Add to your LinkedIn profile

Recently updated!

December 2025

Assessments

11 assignments

Taught in English

See how employees at top companies are mastering in-demand skills

 logos of Petrobras, TATA, Danone, Capgemini, P&G and L'Oreal

There are 10 modules in this course

In this module, we will introduce you to the course and set the stage for your learning journey. You’ll understand what to expect, what not to expect, and the course structure. We’ll also show you how to connect with the community on Discord and explain how to manually trade on DYDX, offering valuable insights for creating your own advanced trading bot later in the course.

What's included

6 videos1 reading1 assignment

In this module, we will explore the key strategies used in pairs trading, starting with statistical arbitrage and cointegration to identify profitable trading pairs. You will learn how to apply the Z-Score for entry and exit points, calculate the hedge ratio to manage market risk, and understand the concept of half-life in mean-reverting strategies. Additionally, we’ll cover position sizing and risk management, ensuring you’re equipped to manage risk effectively while maximizing potential returns.

What's included

5 videos1 assignment

In this module, we will take you through the technical setup needed to interact with the DYDX platform. From installing MetaMask and setting up the Alchemy HTTP provider, to securely accessing your DYDX credentials, you’ll be ready to programmatically trade on the platform. We’ll walk you through connecting to DYDX using Python and Colab, interpreting the API documentation, and retrieving crucial market data. By the end of this module, you'll know how to place and manage orders on DYDX using the platform’s private API.

What's included

7 videos1 assignment

In this module, we will guide you through setting up your development environment for building the trading bot. You’ll learn how to configure VS Code and Python virtual environments, ensuring a clean and manageable workspace. We’ll also walk you through creating a GitHub repository for version control, and show you how to securely store sensitive information, like API keys, as environment variables to protect your data.

What's included

3 videos1 assignment

In this module, we will guide you through the initial steps of building your trading bot. You'll begin by configuring the bot constants, followed by an overview of the plan for Stage 1. We will walk you through securely connecting your bot to the DYDX platform and then dive into developing the close all positions function, split across two parts. By the end of this stage, your bot will be able to connect to DYDX and manage open positions.

What's included

5 videos1 assignment

In this module, we will dive into Stage 2 of building the trading bot. You'll begin by understanding the plan of attack for gathering and processing key data, such as ISO times and market prices. We’ll walk you through constructing market prices, followed by implementing cointegration functions to identify asset pairs that move together. Finally, we’ll guide you on how to store and manage cointegrated pairs data, ensuring your bot can make informed decisions based on this critical information.

What's included

6 videos1 assignment

In this module, we’ll focus on the final stages of building your trading bot. You’ll start by initializing and completing the BotAgent class, which will allow your bot to interact with the trading platform and execute trades. We’ll guide you through setting up open trades, implementing trade triggers based on your trading strategy, and automating the execution process. Additionally, we’ll cover managing trade exits with various strategies to ensure effective risk management. Finally, you’ll build a test run to evaluate your bot’s performance before deploying it using Git for live trading.

What's included

10 videos1 assignment

In this module, we’ll integrate Telegram messaging into your trading bot for real-time notifications. You’ll start by setting up a Telegram bot and learning how to send messages via URL for basic communication. We’ll then guide you through sending messages programmatically using Python for more flexibility. Finally, we’ll discuss the strategic placement of messages within your code and how to use GitHub for version control, ensuring smooth integration and collaboration for your project.

What's included

4 videos1 assignment

In this module, we’ll walk you through the process of deploying your trading bot on AWS, starting with an overview of AWS and signing up for an account. You will learn how to launch an EC2 instance, create a security group for secure communication, and install Python. Once your bot is running on AWS, we’ll show you how to test, update, and iterate on your code. Finally, we’ll introduce CRON for automating your trading bot, ensuring that it runs continuously and autonomously in the cloud.

What's included

8 videos1 assignment

In this final module, we will explore the next steps you can take to improve your trading bot. You’ll gain insights on enhancing its strategies, adding new features, and adjusting to dynamic market conditions. This video will serve as a guide for ongoing development, ensuring that your trading bot remains effective and optimized as you continue to evolve its performance over time.

What's included

1 video2 assignments

Instructor

Packt - Course Instructors
Packt
1,194 Courses293,786 learners

Offered by

Packt

Explore more from Cloud Computing

Why people choose Coursera for their career

Felipe M.
Learner since 2018
"To be able to take courses at my own pace and rhythm has been an amazing experience. I can learn whenever it fits my schedule and mood."
Jennifer J.
Learner since 2020
"I directly applied the concepts and skills I learned from my courses to an exciting new project at work."
Larry W.
Learner since 2021
"When I need courses on topics that my university doesn't offer, Coursera is one of the best places to go."
Chaitanya A.
"Learning isn't just about being better at your job: it's so much more than that. Coursera allows me to learn without limits."
Coursera Plus

Open new doors with Coursera Plus

Unlimited access to 10,000+ world-class courses, hands-on projects, and job-ready certificate programs - all included in your subscription

Advance your career with an online degree

Earn a degree from world-class universities - 100% online

Join over 3,400 global companies that choose Coursera for Business

Upskill your employees to excel in the digital economy

Frequently asked questions