fix: rename buy_tag to entry_tag
This commit is contained in:
parent
d563bfc3d0
commit
6511b3bec2
@ -280,7 +280,7 @@ class ForceBuyPayload(BaseModel):
|
|||||||
price: Optional[float]
|
price: Optional[float]
|
||||||
ordertype: Optional[OrderTypeValues]
|
ordertype: Optional[OrderTypeValues]
|
||||||
stakeamount: Optional[float]
|
stakeamount: Optional[float]
|
||||||
buy_tag: Optional[str]
|
entry_tag: Optional[str]
|
||||||
|
|
||||||
|
|
||||||
class ForceSellPayload(BaseModel):
|
class ForceSellPayload(BaseModel):
|
||||||
|
@ -136,9 +136,9 @@ def show_config(rpc: Optional[RPC] = Depends(get_rpc_optional), config=Depends(g
|
|||||||
def forcebuy(payload: ForceBuyPayload, rpc: RPC = Depends(get_rpc)):
|
def forcebuy(payload: ForceBuyPayload, rpc: RPC = Depends(get_rpc)):
|
||||||
ordertype = payload.ordertype.value if payload.ordertype else None
|
ordertype = payload.ordertype.value if payload.ordertype else None
|
||||||
stake_amount = payload.stakeamount if payload.stakeamount else None
|
stake_amount = payload.stakeamount if payload.stakeamount else None
|
||||||
buy_tag = payload.buy_tag if payload.buy_tag else None
|
entry_tag = payload.entry_tag if payload.entry_tag else None
|
||||||
|
|
||||||
trade = rpc._rpc_forcebuy(payload.pair, payload.price, ordertype, stake_amount, buy_tag)
|
trade = rpc._rpc_forcebuy(payload.pair, payload.price, ordertype, stake_amount, entry_tag)
|
||||||
|
|
||||||
if trade:
|
if trade:
|
||||||
return ForceBuyResponse.parse_obj(trade.to_json())
|
return ForceBuyResponse.parse_obj(trade.to_json())
|
||||||
|
Loading…
Reference in New Issue
Block a user