Build a ChatGPT Trading Bot With Real Time News (Alpaca Markets API / JavaScript)
Cooper Codes Cooper Codes
12.7K subscribers
15,755 views
456

 Published On Apr 13, 2023

🎓 Join my learning platform for module based courses, learning exercises, and more: https://coderprep.com/

In this video we create a stock trading bot that uses ChatGPT and the Alpaca Markets API to trade against live news! This video is a great project for anyone who is looking to use ChatGPT functionality (or any other OpenAI API call) to enhance their trading, alongside making buys / sells to the market through an API. We use WebSockets to connect to a live news event data source from Alpaca Markets, analyze the headlines of live news, and then make decisions to buy/sell stocks based off of ChatGPT's reaction to the breaking news. A great introduction to WebSockets, API trading, and ChatGPT API calls.

Final project code: https://github.com/coopercodes/ChatGP...

0:00 Intro
0:35 Trading system discussion
2:13 Setup Alpaca API and OpenAI API
4:10 Setup server.js / environment variables
6:32 Setup WebSocket to live news events
14:05 Create trading logic with ChatGPT API
25:15 Testing out buy / sell logic (Alongside other notes!)
28:17 Thank you so much for watching!

show more

Share/Embed