This repository builds a FastAPI based API used as a gateway to Bitcoin network metrics and other data as needed for the mempool dashboard and other applications.
Clone the Repository:
git clone https://github.com/lone-starr/mempool_api.git
cd mempool_api
python3 -m venv ./venv
Open VS Code from the mempool_api directory:
code .
In VS Code press < Ctrl >< Shift >< p >, type Python and choose 'Python: Select Interpretor', choose the newly created venv for mempool_dashboard
Open a new Terminal in VS Code and use the following command to install the required dependencies. Your Python venv should be indicated in your terminal shell.
pip install -r requirements.txt
Create a .env file with the necessary credentials and API keys for your MongoDB instance. You can create a free cluster to host your collection at https://cloud.mongodb.com/ or create a MongoDB instance on Railway.
Run the Streamlit App:
uvicorn main:app