asset_bars
Fetches historical OHLCV bars for an asset, ordered oldest-first, with customizable timeframe, count, and session filtering.
Instructions
Return raw OHLCV bars, ordered oldest-first.
Inputs: asset: EXCHANGE:SYMBOL (preferred), for example ICEEUR:BRN1!. The legacy SYMBOL:EXCHANGE form is also accepted. timeframe: 1h, 4h, 1D, or 1W. Default: 1h. timestamp: ISO-8601 window cutoff. Default: current UTC time. count: Bars counting backward from timestamp, 1-1000. Default: 100. sessions: Return all bars from the last N distinct UTC trading dates. When supplied, sessions takes precedence over count.
Returns OHLCV bar objects with t/is_bar_complete/o/h/l/c/v, effective close, sessions and bars covered, ATR-14 on the returned series, and gap quality. A bar is eligible once its open is at or before the requested cutoff. The latest bar may be incomplete; is_bar_complete applies source confirmation plus the configured exchange-specific delay after expected close.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| asset | Yes | ||
| count | No | ||
| sessions | No | ||
| timeframe | No | 1h | |
| timestamp | No |