Developer guide › Guides
Next week's idea: only act on prices while the market is open
Use two fields that come with every price to pause your script at weekends and holidays.
Why
Gold and forex close at weekends (gold also has a daily one-hour break).
While closed, the API keeps returning the last quote, labelled market_closed. A script that doesn't check
will happily treat Friday's price as current on Saturday.
The check
from tickfeed import TickFeed
tf = TickFeed()
q = tf.price("XAUUSD")
if q["market_open"] and q["freshness"] == "fresh":
print("Trading now:", q["bid"], q["ask"])
else:
print(f"Not trading ({q['freshness']}); last quote at {q['tick_time']}")
Cost: each check: 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.
See the gold market hours page for this week's sessions in your own time zone.
A real response
Sample response to GET /v1/price/XAUUSD, 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": "XAUUSD",
"bid": 3943.0,
"ask": 3943.17,
"spread": 0.17,
"spread_points": 17,
"point": 0.01,
"tick_time": "2026-11-02T13:49:13.543000Z",
"age_seconds": 0.349,
"freshness": "fresh",
"market_open": true,
"stale_after_seconds": 120,
"source": "live"
}More short guides
- Your first TickFeed request: the live gold price
- Several live prices in one request
- Turn TickFeed candles into a small table
- Small project: is today's EUR/USD range unusually wide?
- What a TickFeed price response contains, field by field
- One check for your integration: skip the candle that's still forming