|
1 |
+export const meta = { title: 'Charting', description: 'The /charts page: every symbol of the API from 1-minute to daily, series types, indicators, comparisons, drawing tools, keyboard shortcuts, shareable URLs and the data limits behind them.' } |
|
2 |
+ |
|
3 |
+export const snippets = [ |
|
4 |
+ { |
|
5 |
+ title: 'The same bars the chart loads', |
|
6 |
+ curl: `# newest 1 500 daily bars, exactly what /charts requests on first load |
|
7 |
+curl "https://www.hfmarketdata.io/v1/bars/stock/AAPL?timeframe=1day&order=desc&limit=1500" |
|
8 |
+ |
|
9 |
+# scrolling left loads the next page: end = oldest bar already on screen − 1 day |
|
10 |
+curl "https://www.hfmarketdata.io/v1/bars/stock/AAPL?timeframe=1day&order=desc&limit=1500&end=2018-09-30"`, |
|
11 |
+ python: `import pandas as pd |
|
12 |
+ |
|
13 |
+url = "https://www.hfmarketdata.io/v1/bars/stock/AAPL?timeframe=1day&order=desc&limit=1500&format=csv" |
|
14 |
+bars = pd.read_csv(url, parse_dates=["datetime"]).sort_values("datetime") |
|
15 |
+print(bars.tail())`, |
|
16 |
+ javascript: `const res = await fetch("https://www.hfmarketdata.io/v1/bars/stock/AAPL?timeframe=1day&order=desc&limit=1500"); |
|
17 |
+const { data } = await res.json(); |
|
18 |
+console.log(data.length, "bars, newest first:", data[0]);`, |
|
19 |
+ r: `library(readr) |
|
20 |
+bars <- read_csv("https://www.hfmarketdata.io/v1/bars/stock/AAPL?timeframe=1day&order=desc&limit=1500&format=csv") |
|
21 |
+tail(bars[order(bars$datetime), ])`, |
|
22 |
+ }, |
|
23 |
+] |
|
24 |
+ |
|
25 |
+# Charting |
|
26 |
+ |
|
27 |
+[/charts](/charts) is a full-screen chart on top of the API — every stock, ETF, index, FX pair, crypto asset, continuous futures series and individual futures contract, from 1-minute to daily bars. Nothing is pre-computed on a server: the page calls the same public endpoints you would, draws them with a purpose-built canvas engine, and only ever spends your quota when you ask for more data. |
|
28 |
+ |
|
29 |
+## Symbols and timeframes |
|
30 |
+ |
|
31 |
+Press <kbd>/</kbd> (or <kbd>⌘</kbd> <kbd>/</kbd>) to focus the symbol box and start typing. Results are grouped by asset — stocks, ETFs, indices, continuous futures (`ES`, `CL`…), individual contracts (`ESZ24`), crypto, FX — with prefix matches first, then substring matches, and your recent symbols when the box is empty. <kbd>↑</kbd> <kbd>↓</kbd> move, <kbd>Enter</kbd> picks, <kbd>Esc</kbd> closes. |
|
32 |
+ |
|
33 |
+The timeframe switch offers the five intervals of the dataset: **1m · 5m · 30m · 1h · 1D**. Switching keeps the previous chart on screen at reduced opacity until the new bars arrive — there is never a blank flash. Intraday stamps are the exchange's US/Eastern wall-clock time for the v1 assets (badge **ET**) and UTC for individual futures contracts (badge **UTC**), exactly as documented in [Time zones & sessions](/docs/time-zones). |
|
34 |
+ |
|
35 |
+Equities and ETFs default to the split-and-dividend-adjusted series; the **Adjustment** menu switches to split-only or unadjusted. Continuous futures offer ratio-adjusted, back-adjusted and unadjusted rolls. |
|
36 |
+ |
|
37 |
+## Series types, indicators, comparisons |
|
38 |
+ |
|
39 |
+| Menu | What you get | |
|
40 |
+| --- | --- | |
|
41 |
+| **Series type** | Candles, hollow candles, OHLC bars, line, area, baseline, Heikin-Ashi, columns, HLC bars. | |
|
42 |
+| **Indicators** | Overlays — SMA, EMA, WMA, VWAP, Bollinger, Keltner, Donchian, Supertrend, Ichimoku — and oscillators in their own pane — RSI, MACD, Stochastic, ATR, OBV, ADX, CCI, MFI, Volume MA. Each active indicator has a row in the legend: click its name to edit the parameters inline, the **×** removes it. Colours follow a fixed 8-colour palette so the same indicator keeps the same colour across symbols. | |
|
43 |
+| **Compare** | Overlays other symbols as % change since the first visible bar (the price scale switches to percent while a comparison is active). Chips remove them. | |
|
44 |
+| **Price scale** | Linear, logarithmic or percent; auto-scale can be turned off after you drag the price axis. | |
|
45 |
+| **Settings** | Volume histogram, colour-blind mode (hollow candles + a blue / orange palette), watermark, magnet crosshair, reduced motion, and an optional API key kept **in memory only** for this tab. | |
|
46 |
+ |
|
47 |
+The legend always shows the values under the crosshair — or the last bar when the pointer leaves the chart — and the **Table** button opens the same data as an accessible table with a CSV export, so nothing depends on hovering. |
|
48 |
+ |
|
49 |
+## Drawing tools |
|
50 |
+ |
|
51 |
+The vertical bar on the left holds the drawings: trend line, ray, horizontal and vertical lines, parallel channel, rectangle, Fibonacci retracement, measure, arrow, text and brush. Drawings snap to open / high / low / close when the magnet is on, can be selected, moved and resized, and are saved per symbol and timeframe in your browser. |
|
52 |
+ |
|
53 |
+| Key | Action | |
|
54 |
+| --- | --- | |
|
55 |
+| <kbd>T</kbd> <kbd>H</kbd> <kbd>V</kbd> <kbd>R</kbd> <kbd>F</kbd> <kbd>M</kbd> <kbd>X</kbd> | Trend line · horizontal line · vertical line · rectangle · Fibonacci · measure · text | |
|
56 |
+| <kbd>Esc</kbd> | Back to the cursor (cancels the current tool) | |
|
57 |
+| <kbd>Delete</kbd> / <kbd>Backspace</kbd> | Remove the selected drawing | |
|
58 |
+| <kbd>Ctrl</kbd> <kbd>Z</kbd> · <kbd>Ctrl</kbd> <kbd>Y</kbd> | Undo · redo | |
|
59 |
+| <kbd>←</kbd> <kbd>→</kbd> · <kbd>+</kbd> <kbd>−</kbd> · <kbd>Home</kbd> <kbd>End</kbd> | Pan · zoom · jump to the oldest / latest bar | |
|
60 |
+| Wheel · drag · double-click | Zoom around the cursor · pan · fit the whole series | |
|
61 |
+ |
|
62 |
+## Shareable URLs |
|
63 |
+ |
|
64 |
+Everything that defines the view lives in the URL, so a link reproduces the chart exactly: |
|
65 |
+ |
|
66 |
+```text |
|
67 |
+https://www.hfmarketdata.io/charts?s=AAPL&tf=1hour&type=hollow&ind=ema:20,ema:50,rsi:14&cmp=MSFT&scale=log |
|
68 |
+``` |
|
69 |
+ |
|
70 |
+| Parameter | Values | |
|
71 |
+| --- | --- | |
|
72 |
+| `s` | Symbol (`AAPL`, `ES`, `ESZ24`, `EURUSD`, `BTC`) | |
|
73 |
+| `asset` | `stock` (default), `etf`, `index`, `futures`, `contract`, `crypto`, `fx` | |
|
74 |
+| `tf` | `1min`, `5min`, `30min`, `1hour`, `1day` (default) | |
|
75 |
+| `type` | `candles` (default), `hollow`, `ohlc`, `line`, `area`, `baseline`, `heikin`, `columns`, `hlc` | |
|
76 |
+| `ind` | Comma-separated `type:param1:param2…`, e.g. `sma:20`, `macd:12:26:9`, `bollinger:20:2` | |
|
77 |
+| `cmp` | Comma-separated symbols, `TICKER@asset` for non-stocks (`ES@futures`) | |
|
78 |
+| `scale` | `linear` (default), `log`, `percent` | |
|
79 |
+| `vol` | `0` hides the volume histogram | |
|
80 |
+| `adj` | `adj_split`, `UNADJUSTED`, `contin_UNadj`, `contin_adj_absolute`… | |
|
81 |
+ |
|
82 |
+The **Share** button copies the current URL; **Screenshot** downloads a PNG of the chart with a small attribution. |
|
83 |
+ |
|
84 |
+## Data limits |
|
85 |
+ |
|
86 |
+The chart is a regular API client, so the [rate limits](/docs/rate-limits) apply: keyless visitors get 30 requests per hour and at most 5 000 bars per request, a free account 120 requests per minute and 50 000 bars. The first load asks for ~1 500 daily / hourly bars or ~3 000 minute bars (capped by your tier), and each scroll into older history costs one more request — the status bar shows how many requests are left in the window and says **start of history** once the API has returned everything. A 429 is displayed as *rate limited — not down* with a countdown; the chart you already have stays on screen. |
|
87 |
+ |
|
88 |
+<Callout type="tip" title="Sign in for more history per request"> |
|
89 |
+Signed-in sessions apply your account tier automatically. You can also paste an API key in **Settings** — it stays in memory for this tab only and is never written to storage. |
|
90 |
+</Callout> |
|
91 |
+ |
|
92 |
+Zero-volume minutes are not in the dataset, so intraday charts have no rows for minutes without a trade; the time axis is indexed by bar, not by wall-clock time, so sessions and weekends leave no gaps — the same convention as professional terminals. |