mirror of
https://github.com/freqtrade/freqtrade.git
synced 2025-12-17 05:11:15 +00:00
Feat: option for order_by_id
This commit is contained in:
@@ -200,9 +200,10 @@ 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"),
|
||||
rpc: RPC = Depends(get_rpc),
|
||||
):
|
||||
return rpc._rpc_trade_history(limit, offset=offset, order_by_id=True)
|
||||
return rpc._rpc_trade_history(limit, offset=offset, order_by_id=order_by_id)
|
||||
|
||||
|
||||
@router.get("/trade/{tradeid}", response_model=OpenTradeSchema, tags=["info", "trading"])
|
||||
|
||||
Reference in New Issue
Block a user