copy_rates
Downloads MetaTrader 5 bar history for a symbol and timeframe, paging until the terminal has no more data, and saves it as CSV or Parquet for offline analysis.
Instructions
Download bars, paging until the terminal runs out, and write CSV or Parquet.
Omit both dates to request every bar the terminal still serves. Pass both dates for one window. Bars outside that window are dropped, including the older bar the terminal returns when the window is before cached history. This is not how far back M1 goes. Use history_coverage for bars already on disk and extend_history with kind=m1 to download older months. The result is a file path, a count, a time range, and a short preview.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"symbol": "<symbol>"
},
"name": "copy_rates"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| format | No | csv | |
| symbol | Yes | ||
| date_to | No | ||
| save_to | No | ||
| date_from | No | ||
| timeframe | No | H1 |