mirror of
https://github.com/freqtrade/freqtrade.git
synced 2026-01-26 08:50:47 +00:00
Merge branch 'freqtrade:develop' into develop
This commit is contained in:
@@ -18,7 +18,7 @@ repos:
|
||||
- types-requests==2.31.0.1
|
||||
- types-tabulate==0.9.0.2
|
||||
- types-python-dateutil==2.8.19.13
|
||||
- SQLAlchemy==2.0.15
|
||||
- SQLAlchemy==2.0.16
|
||||
# stages: [push]
|
||||
|
||||
- repo: https://github.com/pycqa/isort
|
||||
|
||||
@@ -199,6 +199,7 @@ class Okx(Exchange):
|
||||
order_reg['type'] = 'stoploss'
|
||||
order_reg['status_stop'] = 'triggered'
|
||||
return order_reg
|
||||
order = self._order_contracts_to_amount(order)
|
||||
order['type'] = 'stoploss'
|
||||
return order
|
||||
|
||||
|
||||
@@ -97,7 +97,7 @@ class Order(ModelBase):
|
||||
|
||||
@property
|
||||
def safe_filled(self) -> float:
|
||||
return self.filled if self.filled is not None else self.amount or 0.0
|
||||
return self.filled if self.filled is not None else 0.0
|
||||
|
||||
@property
|
||||
def safe_cost(self) -> float:
|
||||
@@ -703,7 +703,7 @@ class LocalTrade():
|
||||
self.stoploss_order_id = None
|
||||
self.close_rate_requested = self.stop_loss
|
||||
self.exit_reason = ExitType.STOPLOSS_ON_EXCHANGE.value
|
||||
if self.is_open:
|
||||
if self.is_open and order.safe_filled > 0:
|
||||
logger.info(f'{order.order_type.upper()} is hit for {self}.')
|
||||
else:
|
||||
raise ValueError(f'Unknown order type: {order.order_type}')
|
||||
|
||||
@@ -7,10 +7,10 @@
|
||||
-r docs/requirements-docs.txt
|
||||
|
||||
coveralls==3.3.1
|
||||
ruff==0.0.270
|
||||
ruff==0.0.272
|
||||
mypy==1.3.0
|
||||
pre-commit==3.3.2
|
||||
pytest==7.3.1
|
||||
pytest==7.3.2
|
||||
pytest-asyncio==0.21.0
|
||||
pytest-cov==4.1.0
|
||||
pytest-mock==3.10.0
|
||||
|
||||
@@ -5,4 +5,4 @@
|
||||
scipy==1.10.1
|
||||
scikit-learn==1.1.3
|
||||
scikit-optimize==0.9.0
|
||||
filelock==3.12.0
|
||||
filelock==3.12.1
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Include all requirements to run the bot.
|
||||
-r requirements.txt
|
||||
|
||||
plotly==5.14.1
|
||||
plotly==5.15.0
|
||||
|
||||
@@ -2,18 +2,18 @@ numpy==1.24.3
|
||||
pandas==2.0.2
|
||||
pandas-ta==0.3.14b
|
||||
|
||||
ccxt==3.1.23
|
||||
ccxt==3.1.34
|
||||
cryptography==41.0.1; platform_machine != 'armv7l'
|
||||
cryptography==40.0.1; platform_machine == 'armv7l'
|
||||
aiohttp==3.8.4
|
||||
SQLAlchemy==2.0.15
|
||||
SQLAlchemy==2.0.16
|
||||
python-telegram-bot==20.3
|
||||
# can't be hard-pinned due to telegram-bot pinning httpx with ~
|
||||
httpx>=0.24.1
|
||||
arrow==1.2.3
|
||||
cachetools==5.3.1
|
||||
requests==2.31.0
|
||||
urllib3==2.0.2
|
||||
urllib3==2.0.3
|
||||
jsonschema==4.17.3
|
||||
TA-Lib==0.4.26
|
||||
technical==1.4.0
|
||||
@@ -32,14 +32,14 @@ py_find_1st==1.1.5
|
||||
# Load ticker files 30% faster
|
||||
python-rapidjson==1.10
|
||||
# Properly format api responses
|
||||
orjson==3.9.0
|
||||
orjson==3.9.1
|
||||
|
||||
# Notify systemd
|
||||
sdnotify==0.3.2
|
||||
|
||||
# API Server
|
||||
fastapi==0.96.0
|
||||
pydantic==1.10.8
|
||||
pydantic==1.10.9
|
||||
uvicorn==0.22.0
|
||||
pyjwt==2.7.0
|
||||
aiofiles==23.1.0
|
||||
|
||||
@@ -1241,6 +1241,8 @@ def test_handle_stoploss_on_exchange(mocker, default_conf_usdt, fee, caplog, is_
|
||||
'type': 'stop_loss_limit',
|
||||
'price': 3,
|
||||
'average': 2,
|
||||
'filled': enter_order['amount'],
|
||||
'remaining': 0,
|
||||
'amount': enter_order['amount'],
|
||||
})
|
||||
mocker.patch(f'{EXMS}.fetch_stoploss_order', stoploss_order_hit)
|
||||
|
||||
Reference in New Issue
Block a user