交易记录价位和手续费支持小数输入

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-07-26 10:48:25 +08:00
parent adec664c52
commit 9b08bd8bfd
3 changed files with 13 additions and 13 deletions
+4 -4
View File
@@ -62,8 +62,8 @@ def open_trade(
contract_code: str = Form(...),
direction: str = Form(...),
open_date: str = Form(...),
open_price: int = Form(...),
open_fee: int = Form(0),
open_price: float = Form(...),
open_fee: float = Form(0.0),
db: Session = Depends(get_db),
):
t = Trade(
@@ -85,8 +85,8 @@ def close_trade(
request: Request,
trade_id: int,
close_date: str = Form(...),
close_price: int = Form(...),
close_fee: int = Form(0),
close_price: float = Form(...),
close_fee: float = Form(0.0),
db: Session = Depends(get_db),
):
t = db.query(Trade).filter(Trade.id == trade_id).first()