Update tests to test forceenter endpoint

This commit is contained in:
Matthias
2022-01-26 19:24:01 +01:00
parent 48d8cd82af
commit be7ce208dc
5 changed files with 19 additions and 14 deletions

View File

@@ -19,6 +19,6 @@ class SignalTagType(Enum):
EXIT_TAG = "exit_tag"
class SignalDirection(Enum):
class SignalDirection(str, Enum):
LONG = 'long'
SHORT = 'short'

View File

@@ -136,7 +136,8 @@ def show_config(rpc: Optional[RPC] = Depends(get_rpc_optional), config=Depends(g
# /forcebuy is deprecated with short addition. use ForceEntry instead
@router.post(['/forceenter', '/forcebuy'], response_model=ForceEnterResponse, tags=['trading'])
@router.post('/forceenter', response_model=ForceEnterResponse, tags=['trading'])
@router.post('/forcebuy', response_model=ForceEnterResponse, tags=['trading'])
def forceentry(payload: ForceEnterPayload, rpc: RPC = Depends(get_rpc)):
ordertype = payload.ordertype.value if payload.ordertype else None
stake_amount = payload.stakeamount if payload.stakeamount else None