OrderTypeValues should be in enums

This commit is contained in:
Matthias 2021-12-03 15:33:58 +01:00
parent ad5c8f601c
commit d09a30cc67
3 changed files with 8 additions and 6 deletions

View File

@ -1,5 +1,6 @@
# flake8: noqa: F401 # flake8: noqa: F401
from freqtrade.enums.backteststate import BacktestState from freqtrade.enums.backteststate import BacktestState
from freqtrade.enums.ordertypevalue import OrderTypeValues
from freqtrade.enums.rpcmessagetype import RPCMessageType from freqtrade.enums.rpcmessagetype import RPCMessageType
from freqtrade.enums.runmode import NON_UTIL_MODES, OPTIMIZE_MODES, TRADING_MODES, RunMode from freqtrade.enums.runmode import NON_UTIL_MODES, OPTIMIZE_MODES, TRADING_MODES, RunMode
from freqtrade.enums.selltype import SellType from freqtrade.enums.selltype import SellType

View File

@ -0,0 +1,6 @@
from enum import Enum
class OrderTypeValues(str, Enum):
limit = 'limit'
market = 'market'

View File

@ -1,10 +1,10 @@
from datetime import date, datetime from datetime import date, datetime
from enum import Enum
from typing import Any, Dict, List, Optional, Union from typing import Any, Dict, List, Optional, Union
from pydantic import BaseModel from pydantic import BaseModel
from freqtrade.constants import DATETIME_PRINT_FORMAT from freqtrade.constants import DATETIME_PRINT_FORMAT
from freqtrade.enums import OrderTypeValues
class Ping(BaseModel): class Ping(BaseModel):
@ -132,11 +132,6 @@ class UnfilledTimeout(BaseModel):
exit_timeout_count: Optional[int] exit_timeout_count: Optional[int]
class OrderTypeValues(str, Enum):
limit = 'limit'
market = 'market'
class OrderTypes(BaseModel): class OrderTypes(BaseModel):
buy: OrderTypeValues buy: OrderTypeValues
sell: OrderTypeValues sell: OrderTypeValues