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.
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 |