show max_stake_amount in API
This commit is contained in:
parent
55001bf321
commit
cb66663fd2
@ -470,6 +470,7 @@ class LocalTrade():
|
|||||||
'amount': round(self.amount, 8),
|
'amount': round(self.amount, 8),
|
||||||
'amount_requested': round(self.amount_requested, 8) if self.amount_requested else None,
|
'amount_requested': round(self.amount_requested, 8) if self.amount_requested else None,
|
||||||
'stake_amount': round(self.stake_amount, 8),
|
'stake_amount': round(self.stake_amount, 8),
|
||||||
|
'max_stake_amount': round(self.max_stake_amount, 8) if self.max_stake_amount else None,
|
||||||
'strategy': self.strategy,
|
'strategy': self.strategy,
|
||||||
'buy_tag': self.enter_tag,
|
'buy_tag': self.enter_tag,
|
||||||
'enter_tag': self.enter_tag,
|
'enter_tag': self.enter_tag,
|
||||||
|
@ -217,6 +217,7 @@ class TradeSchema(BaseModel):
|
|||||||
amount: float
|
amount: float
|
||||||
amount_requested: float
|
amount_requested: float
|
||||||
stake_amount: float
|
stake_amount: float
|
||||||
|
max_stake_amount: Optional[float]
|
||||||
strategy: str
|
strategy: str
|
||||||
buy_tag: Optional[str] # Deprecated
|
buy_tag: Optional[str] # Deprecated
|
||||||
enter_tag: Optional[str]
|
enter_tag: Optional[str]
|
||||||
|
@ -1359,6 +1359,7 @@ def test_to_json(fee):
|
|||||||
'amount': 123.0,
|
'amount': 123.0,
|
||||||
'amount_requested': 123.0,
|
'amount_requested': 123.0,
|
||||||
'stake_amount': 0.001,
|
'stake_amount': 0.001,
|
||||||
|
'max_stake_amount': None,
|
||||||
'trade_duration': None,
|
'trade_duration': None,
|
||||||
'trade_duration_s': None,
|
'trade_duration_s': None,
|
||||||
'realized_profit': 0.0,
|
'realized_profit': 0.0,
|
||||||
@ -1427,6 +1428,7 @@ def test_to_json(fee):
|
|||||||
'amount': 100.0,
|
'amount': 100.0,
|
||||||
'amount_requested': 101.0,
|
'amount_requested': 101.0,
|
||||||
'stake_amount': 0.001,
|
'stake_amount': 0.001,
|
||||||
|
'max_stake_amount': None,
|
||||||
'trade_duration': 60,
|
'trade_duration': 60,
|
||||||
'trade_duration_s': 3600,
|
'trade_duration_s': 3600,
|
||||||
'stop_loss_abs': None,
|
'stop_loss_abs': None,
|
||||||
|
@ -64,6 +64,7 @@ def test_rpc_trade_status(default_conf, ticker, fee, mocker) -> None:
|
|||||||
'amount': 91.07468123,
|
'amount': 91.07468123,
|
||||||
'amount_requested': 91.07468124,
|
'amount_requested': 91.07468124,
|
||||||
'stake_amount': 0.001,
|
'stake_amount': 0.001,
|
||||||
|
'max_stake_amount': ANY,
|
||||||
'trade_duration': None,
|
'trade_duration': None,
|
||||||
'trade_duration_s': None,
|
'trade_duration_s': None,
|
||||||
'close_profit': None,
|
'close_profit': None,
|
||||||
|
@ -985,6 +985,7 @@ def test_api_status(botclient, mocker, ticker, fee, markets, is_short,
|
|||||||
'base_currency': 'ETH',
|
'base_currency': 'ETH',
|
||||||
'quote_currency': 'BTC',
|
'quote_currency': 'BTC',
|
||||||
'stake_amount': 0.001,
|
'stake_amount': 0.001,
|
||||||
|
'max_stake_amount': ANY,
|
||||||
'stop_loss_abs': ANY,
|
'stop_loss_abs': ANY,
|
||||||
'stop_loss_pct': ANY,
|
'stop_loss_pct': ANY,
|
||||||
'stop_loss_ratio': ANY,
|
'stop_loss_ratio': ANY,
|
||||||
@ -1188,6 +1189,7 @@ def test_api_force_entry(botclient, mocker, fee, endpoint):
|
|||||||
'base_currency': 'ETH',
|
'base_currency': 'ETH',
|
||||||
'quote_currency': 'BTC',
|
'quote_currency': 'BTC',
|
||||||
'stake_amount': 1,
|
'stake_amount': 1,
|
||||||
|
'max_stake_amount': ANY,
|
||||||
'stop_loss_abs': None,
|
'stop_loss_abs': None,
|
||||||
'stop_loss_pct': None,
|
'stop_loss_pct': None,
|
||||||
'stop_loss_ratio': None,
|
'stop_loss_ratio': None,
|
||||||
|
Loading…
Reference in New Issue
Block a user