Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. AI in Finance
  3. trump2cash

trump2cash

MITPython

A Python bot that analyzes Trump tweets for company mentions, performs sentiment analysis, and automatically executes stock trades.

Visit WebsiteGitHubGitHub
6.5k stars862 forks0 contributors

What is trump2cash?

Trump2Cash is a Python-based automated trading bot that monitors Donald Trump's tweets for mentions of public companies. It performs sentiment analysis on those mentions to predict market reactions and automatically executes stock trades through brokerage APIs. The bot also tweets real-time summaries of its analysis and trades.

Target Audience

Developers and hobbyists interested in algorithmic trading, sentiment analysis, and API automation, particularly those exploring the intersection of social media data and financial markets.

Value Proposition

It provides a fully automated, real-world example of a social media-driven trading strategy, with modular code that can be adapted or extended. Unlike generic trading bots, it focuses on a specific, high-impact data source (Trump's tweets) and demonstrates integration with multiple cloud APIs.

Overview

A stock trading bot powered by Trump tweets

Use Cases

Best For

  • Experimenting with automated stock trading based on social media signals
  • Learning how to integrate Twitter streaming APIs with financial trading platforms
  • Building a sentiment analysis pipeline for real-time text data
  • Creating a bot that reacts to specific public figure announcements
  • Studying modular Python architecture for data processing and API calls
  • Running a self-hosted algorithmic trading system on cloud infrastructure

Not Ideal For

  • High-frequency trading systems requiring sub-second execution latency
  • Users without active TradeKing or similar brokerage API access
  • Projects needing out-of-the-box deployment with minimal configuration
  • Teams requiring robust risk management and regulatory compliance features

Pros & Cons

Pros

Real-Time Tweet Monitoring

Uses Twitter Streaming APIs to instantly capture and process new tweets from Donald Trump, enabling prompt reaction as shown in the main.py callback setup.

Automated Sentiment Analysis

Integrates Google Cloud Natural Language API to detect companies and assign sentiment scores automatically, removing manual analysis steps.

Modular Python Architecture

Code is split into analysis.py, trading.py, and twitter.py modules, making it easy to understand, test, and extend based on the README structure.

Comprehensive Setup Guide

README provides detailed steps for setting up API keys, dependencies, and deployment on Google Compute Engine or Docker, reducing guesswork.

Cons

Multi-API Dependency Hell

Requires setting up and maintaining API keys for Twitter, Google Cloud, TradeKing, and optionally Polygon, which is complex and error-prone as outlined in the auth steps.

Simplistic Trading Logic

Trades are executed based solely on tweet sentiment without considering market conditions or risk diversification, as implied by the basic buy/sell strategies in trading.py.

Vendor Lock-in Risks

Relies on specific APIs like TradeKing (which may be deprecated) and Google Cloud services, making the bot fragile to external changes without code updates.

Financial Risk Exposure

Automates real-money trades with minimal safeguards; the README warns to test with USE_REAL_MONEY=NO first, highlighting potential for losses.

Frequently Asked Questions

Quick Stats

Stars6,528
Forks862
Contributors0
Open Issues25
Last commit3 years ago
CreatedSince 2017

Tags

#trading#twitter-bot#python#automated-trading#sentiment-analysis#docker#twitter#stock-trading#google-cloud#financial-markets#api-integration#bot

Built With

P
Python
D
Docker
T
Twitter API

Links & Resources

Website

Included in

AI in Finance5.6k
Auto-fetched 17 hours ago

Related Projects

stockpredictionaistockpredictionai

In this noteboook I will create a complete process for predicting stock price movements. Follow along and we will achieve some pretty good results. For that purpose we will use a Generative Adversarial Network (GAN) with LSTM, a type of Recurrent Neural Network, as generator, and a Convolutional Neural Network, CNN, as a discriminator. We use LSTM for the obvious reason that we are trying to predict time series data. Why we use GAN and specifically CNN as a discriminator? That is a good question: there are special sections on that later.

Stars5,581
Forks1,885
Last commit11 months ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub