Historical bars
get_barsFetch OHLCV price and volume bars for a futures contract, with customizable bar size and time range. Use it to retrieve historical market data for analysis or backtesting.
Instructions
OHLCV bars for a contract, returned oldest→newest. t=bar open time (UTC), o/h/l/c=prices, v=volume. Defaults: endTime=now, startTime chosen to cover limit bars. Max 20,000 bars; rate limit 50 requests / 30s.
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": {
"contractId": "<contractId>"
},
"name": "get_bars"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| live | No | ||
| unit | No | minute | |
| limit | No | ||
| endTime | No | ||
| startTime | No | ||
| contractId | Yes | Contract ID, e.g. "CON.F.US.MNQ.Z25". Get it from search_contracts. | |
| unitNumber | No | Bar size in units, e.g. unit=minute unitNumber=5 → 5-minute bars. | |
| includePartialBar | No |