Skip to content

seun-beta/dca-bot

Repository files navigation

Project logo

DCA Bot

Status License


Dollar Cost Averaging Bot

📝 Table of Contents

🧐 About

DCA Bot (Dollar Cost Averaging Bot) is a bot that executes periodic purchases of a target asset (in this case, crypto) in an effort to reduce the impact of volatility on the overall purchase. The purchases occur regardless of the asset's price and at regular intervals.

💻 Tech

DCA Bot is written in Python 3

⚙️ Installation

Fedora 34(Workstation)

Fedora contains many popular packages for Python. Usually, they are named with a python3- prefix, such as python3-requests.

These are useful for scripting and exploring Python and for Fedora-specific applications. For software development or reproducible data analysis, it is better to use virtual environments.

Please install these packages and set up your environment in the order listed below. Run an upgrade or update if you find that the package is already installed:

  • Python 3. Run the 'python3 -V' command to see the version you have installed.

  • Ensure you have python version >= 3.8+ installed.

  • Using VS Code as our text editor: right click on the folder explorer and open a terminal

Using virtual environments When you work on a project, it is good to keep it inside a virtual environment. It will keep the dependencies you need in one place and you do not have to worry about different projects which need different versions of the same module. It also makes it easy to collaborate with people who don’t use Fedora yet.

  • create a virtual environment
<your_preferred_envname>

which will contain Python and pip. You can use pip to install a project’s dependencies.

python -m venv <your_preferred_envname>

If you want to work in the virtual environment, you have to activate it.

source <your_preferred_envname>/bin/activate

When the virtual environment is activated (you can see its name in brackets at the beginning of your prompt), you can install modules via pip install.

<your_preferred_envname> python -m pip install requests

That is all, you have successfully created your own virtual environment. Now you can run Python (see above) and start working on your project.

When you finish your work, you can deactivate the virtual environment.

 <your_preferred_envname>  deactivate
  • Install requirements in the virtual environment created:
pip install -r requirements.txt
  • Install PostgreSQL.

  • Create a database with PostgresQL, the installation instructions for Fedora can be found here. Make sure to note Database name, Database Username and Password and also ensure that the server is running

Windows 10 Users

Please install and set up the following packages first. Upgrade if you find the package is already installed:

  • Download Python 3. It is advisable to install the python package as an administrator. Click on the 'Add path' checkbox before moving on to the next step of the installation process. Run this command in your terminal to see the version you have installed.

    python3 -V
  • Ensure you have python version >= 3.8+ installed.

  • Download pip and follow the instructions in the link as an installation guide.

  • PostgreSQL (Ensure the server is running).

  • It is advisable to install packages in a virtual environment. The README uses virtualenvwrapper to create this environment. You could use any virtualenv package of your choice but for Windows, install this wrapper with:

    pip install virtualenvwrapper-win
  • Create a new virtual environment:

    mkvirtualenv <envname>
  • Activate the virtual environment with:

    <envname>\Scripts\activate

    or use this command

    & C:/Users/<username>/Envs/<envname>/Scripts/Activate.ps1
  • Install requirements in the virtual environment created:

    pip install -r requirements.txt
  • Deactivate the virtual environment with:

    deactivate
  • Create a database with PostgreSQL, if you installed it earlier. If not, installation instructions can be found here. Make sure to note database name, database username and password.

Python installation instructions for Windows, macOS and other Linux distributions

⛏️ Built Using

✍️ Authors

🎉 Acknowledgements

  • Hat tip to anyone whose code was used
  • Inspiration
  • References

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published