first commit
Some checks failed
Deploy / lint (push) Failing after 7s
Deploy / test (push) Has been skipped
Deploy / deploy (push) Has been skipped

This commit is contained in:
Dennis Thiessen
2026-02-20 17:31:01 +01:00
commit 61ab24490d
160 changed files with 17034 additions and 0 deletions

31
app/schemas/ohlcv.py Normal file
View File

@@ -0,0 +1,31 @@
"""OHLCV request/response schemas."""
from __future__ import annotations
import datetime as _dt
from pydantic import BaseModel, Field
class OHLCVCreate(BaseModel):
symbol: str = Field(..., description="Ticker symbol (e.g. AAPL)")
date: _dt.date = Field(..., description="Trading date (YYYY-MM-DD)")
open: float = Field(..., ge=0, description="Opening price")
high: float = Field(..., ge=0, description="High price")
low: float = Field(..., ge=0, description="Low price")
close: float = Field(..., ge=0, description="Closing price")
volume: int = Field(..., ge=0, description="Trading volume")
class OHLCVResponse(BaseModel):
id: int
ticker_id: int
date: _dt.date
open: float
high: float
low: float
close: float
volume: int
created_at: _dt.datetime
model_config = {"from_attributes": True}