ChartnautDocs

List timeframes

GET/timeframes

Returns the timeframes a run, or a definition run over history, can use.

Scope

Heavy call

Long poll

CLI

scripts:read

No

No

None

Guidance

  • The list is fixed: 1m, 5m, 15m, 30m, 1h, 2h, 4h, 1d, 1w and 1mo. Read it once and cache it.

  • 1mo is the calendar month, from 00:00 UTC on the 1st. With bars, a window counts whole calendar months.

  • Any other value in timeframe on Create a run, List events or Run a definition over history gets 400 unsupported_timeframe. Upper case is lowered on runs, so 1H works there. A capital M means months: 1M is 1mo, and 5M is refused.

  • One run holds at most 50,000 bars, so a long window needs a larger timeframe: 90 days of 1m is about 130,000 bars and is refused, while 90 days of 5m is about 26,000.

Response

200 with data, an array of strings. The list is not paginated.

Status codes

Status

Code

Meaning

200

-

The supported timeframes

401

unauthorized

No key, or it is wrong, expired or revoked