get_strategy_trade_ledger
Fetch a paginated, stable ledger of all trades from the active Strategy Tester report, including entry/exit, profit, and duration. Pass ledgerId to avoid mixed pages after recalculation.
Instructions
Read a stable, paginated ledger of every trade available in the active Strategy Tester report. Returns entry/exit, direction, profit, quantity, duration, and run-up/drawdown/commission when TradingView exposes them. Start with offset 0; pass the returned ledgerId as expected_ledger_id on later pages to fail closed if the strategy recalculates. Read-only and requires an active strategy.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "get_strategy_trade_ledger"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Trades to return in this page. Default: 200, maximum: 500 | |
| offset | No | Zero-based trade offset. Default: 0 | |
| expected_ledger_id | No | ledgerId from page 1; rejects mixed pages after recalculation |