Automated Action ab87d3c506 Implement comprehensive cryptocurrency exchange platform
- Built complete CEX platform with FastAPI and Python
- JWT-based authentication system with secure password hashing
- Multi-currency crypto wallet support (BTC, ETH, USDT)
- Fiat account management (USD, EUR, GBP)
- Local transaction signing without external APIs
- Comprehensive transaction handling (send/receive/deposit/withdraw)
- SQLAlchemy models with Alembic migrations
- Security middleware (rate limiting, headers, logging)
- Input validation and sanitization
- Encrypted private key storage with PBKDF2
- Standardized codebase architecture with service layer pattern
- Complete API documentation with health endpoints
- Comprehensive README with setup instructions

Features:
- User registration and authentication
- Crypto wallet creation and management
- Secure transaction signing using local private keys
- Fiat deposit/withdrawal system
- Transaction history and tracking
- Rate limiting and security headers
- Input validation for all endpoints
- Error handling and logging
2025-06-20 23:08:04 +00:00

45 lines
809 B
Python

from pydantic import BaseModel, EmailStr
from typing import Optional
from datetime import datetime
class UserBase(BaseModel):
email: EmailStr
full_name: str
phone_number: Optional[str] = None
country: Optional[str] = None
class UserCreate(UserBase):
password: str
class UserUpdate(BaseModel):
full_name: Optional[str] = None
phone_number: Optional[str] = None
country: Optional[str] = None
class UserResponse(UserBase):
id: int
is_active: bool
is_verified: bool
kyc_level: int
created_at: datetime
class Config:
from_attributes = True
class UserLogin(BaseModel):
email: EmailStr
password: str
class Token(BaseModel):
access_token: str
token_type: str
class TokenData(BaseModel):
email: Optional[str] = None