mirror of
https://github.com/freqtrade/freqtrade.git
synced 2026-01-19 21:40:24 +00:00
fix: tests/formatting
This commit is contained in:
@@ -200,7 +200,9 @@ def status(rpc: RPC = Depends(get_rpc)):
|
||||
def trades(
|
||||
limit: int = Query(500, ge=1, description="Maximum number of different trades to return data"),
|
||||
offset: int = Query(0, ge=0, description="Number of trades to skip for pagination"),
|
||||
order_by_id: bool = Query(True, description="Sort trades by id (default: True). If False, sorts by latest timestamp"),
|
||||
order_by_id: bool = Query(
|
||||
True, description="Sort trades by id (default: True). If False, sorts by latest timestamp"
|
||||
),
|
||||
rpc: RPC = Depends(get_rpc),
|
||||
):
|
||||
return rpc._rpc_trade_history(limit, offset=offset, order_by_id=order_by_id)
|
||||
|
||||
@@ -85,6 +85,8 @@ def test_FtRestClient_call_invalid(caplog):
|
||||
("trades", [], {}),
|
||||
("trades", [5], {}),
|
||||
("trades", [5, 5], {}), # With offset
|
||||
("trades", [5, 5, True], {}), # Explicit order_by_id=True
|
||||
("trades", [5, 5, False], {}), # order_by_id=False
|
||||
("trade", [1], {}),
|
||||
("delete_trade", [1], {}),
|
||||
("cancel_open_order", [1], {}),
|
||||
@@ -127,6 +129,10 @@ def test_FtRestClient_call_invalid(caplog):
|
||||
("pair_candles", ["XRP/USDT", "5m", 500], {"columns": ["close_time,close"]}),
|
||||
("pair_history", ["XRP/USDT", "5m", "SampleStrategy"], {}),
|
||||
("pair_history", ["XRP/USDT", "5m"], {"strategy": "SampleStrategy"}),
|
||||
("trades", [], {"order_by_id": True}),
|
||||
("trades", [], {"order_by_id": False}),
|
||||
("trades", [5], {"order_by_id": False}),
|
||||
("trades", [5, 5], {"order_by_id": True}),
|
||||
("sysinfo", [], {}),
|
||||
("health", [], {}),
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user