feat: add scoped alpha sync and local self-correlation
This commit is contained in:
@@ -40,6 +40,7 @@ from .schemas import (
|
||||
PnlOutput,
|
||||
PreferencesInput,
|
||||
ResearchUpdate,
|
||||
SelfCorrelationOutput,
|
||||
SessionOutput,
|
||||
)
|
||||
from .security import bootstrap, cipher, issue_session, require_auth, token_hash, valid_password
|
||||
@@ -341,6 +342,11 @@ def create_app(settings=None, wq_client=None, ai_model_factory=None):
|
||||
async with sessions() as db:
|
||||
return await Business(db).get_alpha_pnl(alpha_id)
|
||||
|
||||
@api.get("/alphas/{alpha_id}/self-correlation", response_model=SelfCorrelationOutput, tags=["alphas"])
|
||||
async def self_correlation(alpha_id: str):
|
||||
async with sessions() as db:
|
||||
return await Business(db).get_self_correlation(alpha_id)
|
||||
|
||||
@api.post("/sync-jobs", status_code=202, response_model=JobOutput, tags=["sync-jobs"])
|
||||
async def new_job(body: JobInput):
|
||||
async with sessions.begin() as db:
|
||||
|
||||
Reference in New Issue
Block a user