Skip to content

Skvastiani/py-test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Crypto Trading Signals Platform

This project provides a small crypto trading signals API. It exposes REST endpoints for registering users and retrieving calculated signals for a trading pair. Price data is fetched from public APIs and indicators such as moving averages and RSI are computed in background Celery tasks. Signals can also be pushed over WebSockets using Flask-SocketIO.

Requirements

Install dependencies with pip:

pip install -r requirements.txt

Running the application

  1. Ensure Redis is available (Docker Compose provides a ready to use setup).
  2. Start the Flask application:
python run.py
  1. In a separate terminal, run Celery:
celery -A crypto_signals.tasks worker --loglevel=info

You can then send POST /register requests with JSON {"email": "[email protected]"} to create users. Signals for a pair can be retrieved from /signals/<pair>.

Running locally on macOS

  1. Install Homebrew if it is not already available.
  2. Install Python 3 and Redis:
brew install python redis
brew services start redis  # start Redis as a background service
  1. (Optional) create a virtual environment:
python3 -m venv venv
source venv/bin/activate
  1. Install the required Python packages:
pip install -r requirements.txt
  1. Start the Flask application and the Celery worker in separate terminals:
python run.py
celery -A crypto_signals.tasks worker --loglevel=info

Once running, the API will be available at http://localhost:5000.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published