fix: tests/formatting
This commit is contained in:
@@ -200,7 +200,9 @@ def status(rpc: RPC = Depends(get_rpc)):
|
|||||||
def trades(
|
def trades(
|
||||||
limit: int = Query(500, ge=1, description="Maximum number of different trades to return data"),
|
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"),
|
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),
|
rpc: RPC = Depends(get_rpc),
|
||||||
):
|
):
|
||||||
return rpc._rpc_trade_history(limit, offset=offset, order_by_id=order_by_id)
|
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", [], {}),
|
||||||
("trades", [5], {}),
|
("trades", [5], {}),
|
||||||
("trades", [5, 5], {}), # With offset
|
("trades", [5, 5], {}), # With offset
|
||||||
|
("trades", [5, 5, True], {}), # Explicit order_by_id=True
|
||||||
|
("trades", [5, 5, False], {}), # order_by_id=False
|
||||||
("trade", [1], {}),
|
("trade", [1], {}),
|
||||||
("delete_trade", [1], {}),
|
("delete_trade", [1], {}),
|
||||||
("cancel_open_order", [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_candles", ["XRP/USDT", "5m", 500], {"columns": ["close_time,close"]}),
|
||||||
("pair_history", ["XRP/USDT", "5m", "SampleStrategy"], {}),
|
("pair_history", ["XRP/USDT", "5m", "SampleStrategy"], {}),
|
||||||
("pair_history", ["XRP/USDT", "5m"], {"strategy": "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", [], {}),
|
("sysinfo", [], {}),
|
||||||
("health", [], {}),
|
("health", [], {}),
|
||||||
],
|
],
|
||||||
|
|||||||
Reference in New Issue
Block a user