ingest_csv_data
Import a CSV file of OHLCV market data into AlgoChains by validating columns and storing rows for backtesting via run_backtest(data_source='custom').
Instructions
Ingest a user-provided CSV file of OHLCV market data into AlgoChains. Validates columns, parses rows, and stores in state/custom_data/. The data becomes available for backtesting via run_backtest(data_source='custom'). Requires real file on disk — no synthetic substitution.
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": {
"file_path": "<file_path>",
"symbol": "<symbol>",
"timeframe": "<timeframe>"
},
"name": "ingest_csv_data"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| symbol | Yes | Ticker symbol, e.g. 'MNQ', 'AAPL'. | |
| columns | No | Optional mapping: canonical name -> CSV column header. E.g. {"open": "Open", "close": "Close"}. | |
| file_path | Yes | Absolute path to the CSV file. | |
| timeframe | Yes | Bar timeframe, e.g. '1min', '5min', '1h', '1d'. | |
| date_column | No | Name of the date/timestamp column. Default: 'date'. | |
| date_format | No | strptime format string. Default: '%Y-%m-%d %H:%M:%S'. |