-
-
Notifications
You must be signed in to change notification settings - Fork 120
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #47 from hummingbot/feat/base-page-class
Feat/base page class
- Loading branch information
Showing
20 changed files
with
194 additions
and
192 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
## Requirements | ||
|
||
You will need to install [StreamLit](https://streamlit.io/). For information about Streamlit installation, see the instructions located at https://docs.streamlit.io/library/get-started/installation. | ||
|
||
You will also need to install either [Anaconda](https://www.anaconda.com/) or [Miniconda](https://docs.conda.io/en/latest/miniconda.html) to get Conda: | ||
* [Anaconda](https://www.anaconda.com/) is a comprehensive Python distribution that includes a large number of pre-installed data science libraries and packages. It is designed to be an all-in-one solution for data science and machine learning tasks. When you install Anaconda, it comes with a collection of popular Python packages like NumPy, pandas, matplotlib, scikit-learn, and more. | ||
* [Miniconda](https://docs.conda.io/en/latest/miniconda.html) is a minimal version of Anaconda. It includes only the essential components, such as Python interpreter and Conda package manager. Unlike Anaconda, Miniconda doesn't come with pre-installed packages, which makes its download size much smaller. | ||
|
||
This repository is maintained by Hummingbot Foundation as a companion for users of [Hummingbot](https://github.com/hummingbot/hummingbot), the open source framework for building high-frequency crypto trading bots. | ||
|
||
Watch this video to understand how it works: | ||
https://www.loom.com/share/72d05bcbaf4048a399e3f9247d756a63 | ||
|
||
## Installation | ||
|
||
1. Install Steamlit and Conda packages utilizing their instructions for your specific environment: | ||
* Install [StreamLit](https://docs.streamlit.io/library/get-started/installation) | ||
* Install [Anaconda](https://docs.anaconda.com/free/anaconda/install/index.html) or [Miniconda](https://docs.conda.io/en/latest/miniconda.html) | ||
|
||
2. Clone this repo and navigate to the created directory | ||
```bash | ||
git clone https://github.com/hummingbot/dashboard.git | ||
cd dashboard | ||
``` | ||
|
||
3. Run conda command to create an isolated `conda` environment and install dependencies | ||
``` | ||
conda env create -f environment_conda.yml | ||
``` | ||
|
||
4. Activate the isoldated 'conda' environment | ||
```bash | ||
conda activate dashboard | ||
``` | ||
|
||
5. Run the app | ||
```bash | ||
streamlit run main.py | ||
``` | ||
|
||
## Data Feed | ||
|
||
Your `dashboard` environment needs to have access to the database for your Hummingbot environment. This is done by setting up a symbolic link to the 'data' directory of your running Hummingbot instance. | ||
|
||
The data directory differs for Docker versus Source installed Hummingbot. Data directory for each is as follows: | ||
* Docker installed: /path/to/hummingbot/hummingbot_files/data | ||
* Source installed: /path/to/hummingbot/data | ||
|
||
|
||
Create a symlink to your Hummingbot `/data` directory | ||
```bash | ||
# replace `/path/to/hummingbotdata` with the actual path | ||
ln -s /path/to/hummingbotdata data | ||
|
||
# if you need to remove the symlink | ||
unlink data | ||
``` | ||
|
||
## Updating Dependencies | ||
|
||
To update the `dashboard` environment for new dependencies, run: | ||
``` | ||
conda env update -f environment_conda.yml | ||
``` | ||
|
||
To updated the `dashboard` source for latest version, run: | ||
``` | ||
cd dashboard | ||
git pull | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,129 +1,31 @@ | ||
# Hummingbot Dashboard | ||
Hummingbot Dashboard is a community project to build dashboards that help you deploy, manage, backtest, and analyze Hummingbot instances (and much more!) Each dashboard is maintained by 1-2 community members. | ||
|
||
Collection of data visualization and analysis Hummingbot-related dashboards. The dashboards helps you run and manage Hummingbot, analyze performance, analyze trade data, and much more! | ||
|
||
Dashboard is built using [StreamLit](https://streamlit.io/) and uses the Conda environment & package manager to simiplify installation, updates, and manage dependencies. | ||
|
||
You will need to install [StreamLit](https://streamlit.io/). For information about Streamlit installation, see the instructions located at https://docs.streamlit.io/library/get-started/installation. | ||
|
||
You will also need to install either [Anaconda](https://www.anaconda.com/) or [Miniconda](https://docs.conda.io/en/latest/miniconda.html) to get Conda: | ||
* [Anaconda](https://www.anaconda.com/) is a comprehensive Python distribution that includes a large number of pre-installed data science libraries and packages. It is designed to be an all-in-one solution for data science and machine learning tasks. When you install Anaconda, it comes with a collection of popular Python packages like NumPy, pandas, matplotlib, scikit-learn, and more. | ||
* [Miniconda](https://docs.conda.io/en/latest/miniconda.html) is a minimal version of Anaconda. It includes only the essential components, such as Python interpreter and Conda package manager. Unlike Anaconda, Miniconda doesn't come with pre-installed packages, which makes its download size much smaller. | ||
|
||
This repository is maintained by Hummingbot Foundation as a companion for users of [Hummingbot](https://github.com/hummingbot/hummingbot), the open source framework for building high-frequency crypto trading bots. | ||
|
||
Watch this video to understand how it works: | ||
https://www.loom.com/share/72d05bcbaf4048a399e3f9247d756a63 | ||
|
||
|
||
|
||
## Dashboards | ||
### Dashboards | ||
|
||
Here are the current dashboards in the collection: | ||
|
||
### 🚀 Strategy Performance (WIP) | ||
|
||
Dashboard that helps you analyze the performance of a running Hummingbot instance | ||
|
||
### 🧙 XE Token Analyzer | ||
|
||
Dashboard that helps you visualize the bid-ask spread and volume of different tokens across the crypto exchange landscape. | ||
|
||
This app is most helpful for Hummingbot users running the [Cross-Exchange Market Making](https://hummingbot.org/strategies/cross-exchange-market-making/) and [Arbitrage](https://hummingbot.org/strategies/arbitrage/) strategies. | ||
|
||
### 🧳 Hummingbot DB | ||
|
||
Inspect and analyze the orders and trades data contained in a SQLite database for a strategy or script. | ||
|
||
These files are located in the `/data` folder in Hummingbot, and are named `<strategy_name>.sqlite`. | ||
|
||
### 🦉 TVL vs MCAP Analysis | ||
|
||
Easily compare various DeFi protocols based on their market capitalization and total value locked, using DeFiLlama data. | ||
|
||
### 🗂 Candles Downloader | ||
|
||
Download historical exchange data as OHLVC candles. Supports multiple trading pairs and custom time ranges/intervals. | ||
|
||
Current Hummingbot connectors supported: | ||
* `binance` | ||
* `binance_perpetual` | ||
|
||
### 📋 Data | ||
|
||
Reference data for the various apps this collection. | ||
|
||
## Installation | ||
|
||
1. Install Steamlit and Conda packages utilizing their instructions for your specific environment: | ||
* Install [StreamLit](https://docs.streamlit.io/library/get-started/installation) | ||
* Install [Anaconda](https://docs.anaconda.com/free/anaconda/install/index.html) or [Miniconda](https://docs.conda.io/en/latest/miniconda.html) | ||
|
||
2. Clone this repo and navigate to the created directory | ||
```bash | ||
git clone https://github.com/hummingbot/dashboard.git | ||
cd dashboard | ||
``` | ||
|
||
3. Run conda command to create an isolated `conda` environment and install dependencies | ||
``` | ||
conda env create -f environment_conda.yml | ||
``` | ||
|
||
4. Activate the isoldated 'conda' environment | ||
```bash | ||
conda activate dashboard | ||
``` | ||
|
||
5. Run the app | ||
```bash | ||
streamlit run main.py | ||
``` | ||
|
||
## Data Feed | ||
|
||
Your `dashboard` environment needs to have access to the database for your Hummingbot environment. This is done by setting up a symbolic link to the 'data' directory of your running Hummingbot instance. | ||
|
||
The data directory differs for Docker versus Source installed Hummingbot. Data directory for each is as follows: | ||
* Docker installed: /path/to/hummingbot/hummingbot_files/data | ||
* Source installed: /path/to/hummingbot/data | ||
|
||
|
||
Create a symlink to your Hummingbot `/data` directory | ||
```bash | ||
# replace `/path/to/hummingbotdata` with the actual path | ||
ln -s /path/to/hummingbotdata data | ||
|
||
# if you need to remove the symlink | ||
unlink data | ||
``` | ||
|
||
|
||
|
||
## Updates | ||
|
||
To update the `dashboard` environment for new dependencies, run: | ||
``` | ||
conda env update -f environment_conda.yml | ||
``` | ||
* 🚀 **Strategy Performance**: Analyze the performance of a running Hummingbot instance | ||
* 🐙 **Bot Orchestration**: Deploy and manage Hummingbot instances | ||
* ⚙️ **Backtest Manager**: Deploy and manage backtests of directional strategies | ||
* 🗂 **Candles Downloader**: Download historical exchange data as OHLVC candles. Supports multiple trading pairs and custom time ranges/intervals. | ||
* 🔍 **DB Inspector**: Inspect and analyze the orders and trades data contained in a Hummingbot strategy database | ||
* 🧙 **Token Spreads**: Identify cross-exchange trading opportunities by analyzing differences in token spreads across venues | ||
* 🦉 **TVL vs MCAPs**: Easily compare various DeFi protocols based on their market capitalization and total value locked, using DeFiLlama data. | ||
|
||
To updated the `dashboard` source for latest version, run: | ||
``` | ||
cd dashboard | ||
git pull | ||
``` | ||
### Installation | ||
|
||
## Contributions | ||
This project is built using [StreamLit](https://streamlit.io/) and uses Anaconda and Docker to simplify installation, updates, and manage dependencies. | ||
|
||
We welcome new data dashboards, bug fixes, and improvements by the community! | ||
See [Installation](https://github.com/hummingbot/dashboard/blob/feat/base-page-class/INSTALLATION.md) for how to install and update the dashboard. | ||
|
||
To submit a contribution, fork a clone of repository, add or make changes, and issue a pull request. See general guidelines for contributing to Hummingbot listed at https://hummingbot.org/developers/contributions. | ||
### Contributions | ||
|
||
We welcome contributions from the community! See [Contribution](https://github.com/hummingbot/dashboard/blob/feat/base-page-class/CONTRIBUTING.md) for more information. | ||
|
||
## Participation | ||
### Meetings | ||
|
||
We hold bi-weekly livestream Dashboard project meetings. You can participate on our [Discord](https://discord.gg/hummingbot) | ||
* Alternating Thursdays, 3pm GMT / 11am EST / 8am PST / 11pm SIN | ||
* Alternating Wenesdays, 3pm GMT / 11am EST / 8am PST / 11pm SIN | ||
* Design, Status, Demos, etc | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,27 @@ | ||
import streamlit as st | ||
from st_pages import Page, show_pages | ||
|
||
apptitle = "High Frequency Trading" | ||
st.set_page_config(page_title=apptitle, page_icon="🦅", layout="wide") | ||
from utils.st_utils import initialize_st_page | ||
|
||
|
||
initialize_st_page(title="Hummingbot Dashboard", icon="📊") | ||
|
||
show_pages( | ||
[ | ||
Page("main.py", "Hummingbot Dashboard", "📊"), | ||
Page("pages/strategy_performance/app.py", "Strategy Performance", "🚀"), | ||
Page("pages/bot_orchestration/app.py", "Bot Orchestration", "🐙"), | ||
Page("pages/backtest_manager/app.py", "Backtest Manager", "⚙️"), | ||
Page("pages/candles_downloader/app.py", "Candles Downloader", "🗂"), | ||
Page("pages/db_inspector/app.py", "DB Inspector", "🔍"), | ||
Page("pages/token_spreads/app.py", "Token Spreads", "🧙"), | ||
Page("pages/tvl_vs_mcap/app.py", "TVL vs Market Cap", "🦉"), | ||
] | ||
) | ||
|
||
st.title("Welcome!") | ||
st.write("---") | ||
st.code("💡 The purpose of this dashboard is to provide useful information for high frequency trading traders") | ||
st.write("") | ||
st.write("Watch this video to understand how the dashboard works! 🦅") | ||
c1, c2, c3 = st.columns([1, 6, 1]) | ||
with c2: | ||
st.video("https://youtu.be/l6PWbN2pDK8") | ||
st.write("If you want to contribute, post your idea in #dev-channel of [hummingbot discord](https://discord.gg/CjxZtkrH)") | ||
st.write("---") | ||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Deploy and manage backtests of directional strategies |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Deploy and manage Hummingbot instances |
18 changes: 7 additions & 11 deletions
18
pages/8_🐙_Bot_Orchestration.py → pages/bot_orchestration/app.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Download historical exchange data as OHLVC candles. Supports multiple trading pairs and custom time ranges/intervals. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Inspect and analyze the orders and trades data contained in a Hummingbot strategy database |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.