Developer guide › Guides
Small project: is today's EUR/USD range unusually wide?
Compare today's high-low range with the average of recent days, using one request.
What it does
Fetches the last 10 daily EUR/USD candles, works out each finished day's range (high minus low), and compares today's range so far with their average. About 15 lines of Python.
Cost: one run (10 daily candles): 1 unit. One unit is $0.002 / £0.002 / €0.002 (in your account's currency), taken from your prepaid balance only when the request succeeds. Full prices.
The data it uses
Sample response to GET /v1/candles/EURUSD?timeframe=D1&limit=10, captured from the live API on 02 November 2026 at 13:49 UTC. It's a real past response, not live data: prices have moved since.
{
"symbol": "EURUSD",
"timeframe": "D1",
"source": "live",
"count": 10,
"truncated": false,
"next_start_time": null,
"candles": [
{
"time": "2026-10-28T21:00:00Z",
"open": 1.1155599999999999,
"high": 1.11854,
"low": 1.11046,
"close": 1.11805,
"tick_volume": 60810,
"spread_points": 0,
"complete": true
},
{
"time": "2026-10-29T21:00:00Z",
"open": 1.11794,
"high": 1.12147,
"low": 1.11365,
"close": 1.11606,
"tick_volume": 63723,
"spread_points": 0,
"complete": true
},
{
"time": "2026-11-01T22:00:00Z",
"open": 1.11547,
"high": 1.1237,
"low": 1.11489,
"close": 1.12189,
"tick_volume": 28218,
"spread_points": 0,
"complete": false
}
],
"notes": [
"The last candle is still forming (complete=false); its values may change."
],
"note": "(trimmed to the last 3 of 10 candles for this page)"
}The code
Needs Python 3.9+ and pip install tickfeed, with your key in
TICKFEED_API_KEY.
from tickfeed import TickFeed
tf = TickFeed()
bars = tf.candles("EURUSD", "D1", limit=10)["candles"]
done = [b for b in bars if b["complete"]]
today = bars[-1] if not bars[-1]["complete"] else None
pips = lambda b: (b["high"] - b["low"]) * 10_000 # 1 pip = 0.0001 for EURUSD
avg = sum(pips(b) for b in done) / len(done)
print(f"Average range over {len(done)} days: {avg:.1f} pips")
if today:
now = pips(today)
print(f"Today so far: {now:.1f} pips ({now / avg:.0%} of average)")
Daily candles follow the forex trading day, which starts at the 17:00 New York close; the time field
shows each day's open in UTC. This is a description of past prices, not a forecast or trading advice.
Make it yours
Swap EURUSD for any supported
symbol. For JPY pairs a pip is 0.01, so multiply by 100 instead of 10,000; for gold, leave the range in dollars.
Or run it each morning and log the result.
More short guides
- Your first TickFeed request: the live gold price
- Several live prices in one request
- Turn TickFeed candles into a small table
- What a TickFeed price response contains, field by field
- One check for your integration: skip the candle that's still forming
- Next week's idea: only act on prices while the market is open