Update README.md (#215)
This commit is contained in:
23
README.md
23
README.md
@ -61,32 +61,33 @@ Before beginning the installation process, ensure the following prerequisites ar
|
||||
- TA-Lib Library:
|
||||
- Windows: Download and build the TA-Lib library. Install Visual Studio Community with the Visual C++ feature. Navigate to `C:\ta-lib\c\make\cdr\win32\msvc` in the command prompt and build the library using the available makefile.
|
||||
- Linux: Install TA-Lib using your distribution's package manager or compile from source following the instructions available on the TA-Lib GitHub repository.
|
||||
|
||||
- VSCode: Ensure VSCode is installed and the Python interpreter is properly set.
|
||||
- Alpaca Paper Trading Account: Create an account at [Alpaca Markets](https://alpaca.markets/) and generate `API_KEY` and `SECRET_KEY` for your paper trading account.
|
||||
|
||||
## Installation Steps
|
||||
**Clone the Repository:** Clone the remote repository to your local machine.
|
||||
`git clone git@github.com:drew2323/v2trading.git <name_of_local_folder>`
|
||||
|
||||
**Install Python:** Ensure Python 3.10.11 is installed on your system.
|
||||
|
||||
**Create a Virtual Environment:** Set up a Python virtual environment.
|
||||
`python -m venv <path_to_venv_folder>`
|
||||
|
||||
**Activate Virtual Environment:**
|
||||
- Windows: `source ./<venv_folder>/Scripts/activate`
|
||||
- Linux: `source ./<venv_folder>/bin/activate`
|
||||
|
||||
**Install Dependencies:** Install the program requirements.
|
||||
pip install -r requirements.txt
|
||||
Note: It's permissible to comment out references to `keras` and `tensorflow` modules, as well as the `ml-room` repository in `requirements.txt`.
|
||||
**Branching:** Establish and switch to a new branch for your modifications.
|
||||
|
||||
**Environment Variables:** In `run.sh`, modify the `VIRTUAL_ENV_DIR` and `PYTHON_TO_USE` variables as necessary.
|
||||
**Configuration:** In `v2realbot/config.py`, update the `DATA_DIR` path using the `user_data_dir` function with an additional `author` parameter.
|
||||
`DATA_DIR = user_data_dir("v2realbot", "david")`
|
||||
**jQuery Script Tag:** In `v2realbot/static/index.html`, use the jQuery script tag without `integrity` and `crossorigin` attributes.
|
||||
**Git Staging:** Add modified files to the git staging area.
|
||||
git add .
|
||||
**Commit Changes:** Commit your changes with an appropriate message.
|
||||
git commit -m '<commit_message>'
|
||||
|
||||
**Data Directory:** Navigate to `DATA_DIR` and create folders: `aggcache`, `tradecache`, and `models`.
|
||||
|
||||
**Media and Static Folders:** Create `media` and `static` folders one level above the repository directory. Also create `.env` file there.
|
||||
|
||||
**Database Setup:** Create the `v2trading.db` file using SQL commands from `v2trading_create_db.sql`.
|
||||
```
|
||||
import sqlite3
|
||||
@ -99,9 +100,11 @@ Before beginning the installation process, ensure the following prerequisites ar
|
||||
conn.close()
|
||||
```
|
||||
Ensure the `config_table` is not empty by making an initial entry.
|
||||
Environment Variables for API Keys: in .env file create environment variables for `ACCOUNT1_PAPER_API_KEY` and `ACCOUNT1_PAPER_SECRET_KEY` with values from your Alpaca account.
|
||||
|
||||
**Start the Application:** Run `main.py` in VSCode to start the application.
|
||||
**Accessing the Application: **If the uvicorn server runs successfully at `http://0.0.0.0:8000`, access the application at `http://localhost:8000/static/`.
|
||||
|
||||
**Accessing the Application:** If the uvicorn server runs successfully at `http://0.0.0.0:8000`, access the application at `http://localhost:8000/static/`.
|
||||
|
||||
**Database Configuration:** Add dynamic button and JS configurations to the `config_table` in `v2trading.db` via the "Config" section on the main page.
|
||||
Please replace placeholders (e.g., `<name_of_local_folder>`, `<path_to_venv_folder>`) with your actual paths and details. Follow these instructions to ensure the application is set up correctly and ready for use.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user