交易记录价位和手续费支持小数输入
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user