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