0% found this document useful (0 votes)
7 views2 pages

Crypto Price Management System Design

The document outlines the development of a Django-based Crypto Data & Organization Management System. It includes requirements for managing organizations and cryptocurrency prices, utilizing the CoinGecko API for real-time data, and implementing scheduled updates with Celery. Additionally, it specifies the need for CRUD APIs, JWT authentication, and optional challenges for enhanced functionality.

Uploaded by

1115 Mani Kandan
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views2 pages

Crypto Price Management System Design

The document outlines the development of a Django-based Crypto Data & Organization Management System. It includes requirements for managing organizations and cryptocurrency prices, utilizing the CoinGecko API for real-time data, and implementing scheduled updates with Celery. Additionally, it specifies the need for CRUD APIs, JWT authentication, and optional challenges for enhanced functionality.

Uploaded by

1115 Mani Kandan
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Assignment: Crypto Data & Organization Management System

Objective
Develop a Django-based system that:
• Manages organizations (org_id)
• Fetches cryptocurrency prices from a public API
• Associates' prices with an organization (org_id)
• Provides scheduled updates using Celery
• Implements full CRUD APIs for organizations and crypto data

Requirements
1. Models
🔹 Organization Model
Create a model Organization with:
• id (UUID, Primary Key)
• name (CharField, max_length=255, unique)
• created_at (DateTimeField, auto_now_add=True)
🔹 CryptoPrice Model
Create a model CryptoPrice with:
• id (Primary Key, AutoField)
• org_id (ForeignKey to Organization)
• symbol (CharField, max_length=10, e.g., "BTC", "ETH")
• price (DecimalField, max_digits=20, decimal_places=10)
• timestamp (DateTimeField, auto_now_add=True)

2. Third-Party API
Use the CoinGecko API to fetch real-time crypto prices.
Example API:
[Link]
usd

3. Scheduler (Celery & Redis)


Set up a Celery task that runs every 5 minutes to:
• Fetch the latest Bitcoin (BTC) and Ethereum (ETH) prices.
• Store or update the data in CryptoPrice for each org_id.
Use Redis as the Celery message broker.
4. API”s

🔹 Organization APIs
Create the organization api’s (CRUD) separately.
🔹 Crypto Price APIs
Create the crypto data api’s separately.

5. Authentication & Security


• JWT Authentication (Django Rest Framework JWT or Simple JWT)
• Users can only access org_id-specific data
• API endpoints should have permissions (only allow org owners to
edit/delete)

6. Additional Challenges (For Extra Marks )


Implement pagination in GET /api/crypto-prices/ API
Store historical price data instead of overwriting previous prices
Implement Django signals to log when an org is created or deleted
Add search and filtering to the Organization API
Write unit tests for all APIs

You might also like