Skip to content

Market data from Webull and Yahoo! Build your own strategy, let the program trade for you with your Webull account.

License

Notifications You must be signed in to change notification settings

LukeWang01/Program-Trading-Based-on-Webull

Repository files navigation

logo Program Trading Based on Webull

Market data from Webull and Yahoo! Build your own strategy, and let the program trade for you with your Webull account.


⚠️ 0. Disclaimer and Security


  • For security:
    • Do NOT save your password and PID locally. Type it when you log in.
    • Do NOT upload or share the credential JSON files generated by the App.
    • The access_token will expire weekly for your account security, you need to re-login to set up a new one.

  • If you don't have Webull account, feel free to use my referral link to sign up, you can get 12 free stocks after depositing $0.01 or more.

  • Give repository a star if it helps~


PS, Discord Server for program trading:

https://discord.gg/9uUpjyyqkZ

or, just add me on Discord. My Discord ID: squawkwallstreet


🤖 1. Install

🐍 1.1 Install Python

Use the link below to download and install Python. (Make sure to add Python to your system PATH during the installation)

https://www.python.org/downloads/

💾 1.2 Clone this repository

git clone https://github.com/LukeWang01/Program-Trading-Based-on-Webull.git

or,

Download the Zip file and unzip to a folder.

💽 1.3 Install the required packages:

pip install -r requirements.txt

or,

pip3 install -r requirements.txt

If got errors when installing (click here)

🔐 1.4 Environment Variables

Create a .env File:

  • Copy the contents from .env_example to a new file named .env in the root directory of your project.
  • This file will store sensitive configuration details such as your Discord bot token and channel IDs.

Create and Configure Your Discord Bot:

  • Visit the Discord Developer Portal to create a new bot. You will need to register a new application and add a bot to that application.
  • After creating your bot, you will find the bot token in the Bot section. Make sure to save this token in your .env file under DISCORD_NOTIFY_TOKEN.

Enable Developer Mode in Discord:

  • On desktop: Discord GUI: Access User Settings -> go to Advanced -> enable Developer Mode.
  • With Developer Mode enabled, you can right-click on any channel in your server to copy its ID. Use these IDs as needed in your .env file for CHANNEL_ID_GENERAL, CHANNEL_ID_TRANSACTION, etc.

🚀 2. Run

2.1 Launch the App

Go to the Program-Trading-Based-on-Webull folder, open the terminal,

python app.py

or,

Double-click the app_launcher.bat to run. (Windows only)


log in



2.2 First-time launch setup (Setup only once for the Authentication)

Instructions for the first run setup (click here)


💲 3. Build your own strategy

You can create your strategy following the example strategy:

Program-Trading-Based-on-Webull/strategy/My_Strategy.py (Click here to open)


Just override the strategy_decision() function in the My_Strategy class, and add any attributes you need.


Run your strategy and make tradings after logging in:


strategy_1

strategy_1


🖥️ 4. App Features

4.1 Log in

strategy_1

4.2 Account Dashboard

strategy_1

4.3 Select and run strategy, monitor the market and strategy

strategy_1

4.4 Edit your profile settings, add notification email account

strategy_1

4.5 View the trading orders and transaction history

strategy_1

4.6 View the performance of your strategy or account

strategy_1

4.7 View the App running log

strategy_1

4.8 Edit the notification email account settings

strategy_1

4.9 Download the stock intraday and history data, saving as csv file

strategy_1

strategy_1

4.10 Safe exit the App

strategy_1




Feel free to edit the code to customize the App for your own use.


Good luck to all traders!

Luke


🦋 Supporting Me


Buy Me A Coffee Paypal

About

Market data from Webull and Yahoo! Build your own strategy, let the program trade for you with your Webull account.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages