INNER CODE UNIT · Python

myreports_delete

simonlin1212/vibe-astock · vr/app.py:194

def myreports_delete(rid: str):
    return {"data": {"ok": mr.delete_report(rid)}}


class CloseIn(BaseModel):
    code: str
    date: str
    price: float
    shares: float
    cost: float


@app.post("/api/portfolio/close")
def portfolio_close(c: CloseIn):
    """记一笔已清仓(已实现盈亏)。存本地。"""
    code = (c.code or "").strip()
    if not code.isdigit() or len(code) != 6:
        raise HTTPException(400, "代码必须是 6 位数字")

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…