Market data from Webull and Yahoo! Build your own strategy, and let the program trade for you with your Webull account.
- This App is not affiliated with Webull Financial LLC.
- The Webull API used in this App is from:
- https://pypi.org/project/webull/ (Pypi.org)
- https://github.com/tedchou12/webull (Github, by tedchou12)
- Simply speaking, this API is like simulating you are using the Webull web platform.
- The official Webull API is still under testing. This App will switch to the official API when it is ready.
- The App GUI is developed via Tkinter-Designer, an easy and fast way to create a Python GUI.
- Feel free to fork and edit the code to customize the App for your own use.
- 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~
or, just add me on Discord. My Discord ID: squawkwallstreet
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/
git clone https://github.com/LukeWang01/Program-Trading-Based-on-Webull.git
or,
Download the Zip file and unzip to a folder.
pip install -r requirements.txt
or,
pip3 install -r requirements.txt
If got errors when installing (click here)
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 underDISCORD_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 forCHANNEL_ID_GENERAL
,CHANNEL_ID_TRANSACTION
, etc.
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)
Instructions for the first run setup (click here)
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:
Good luck to all traders!
Luke