QVeris
Technical Indicator API Guide

Free MACD API
Data, Limits & Python
Free MACD API
Data & Python

Find a free MACD API, inspect its MACD, signal, and histogram fields, then verify symbols, intervals, timestamps, quotas, and usage terms before integration.

Free MACD API workflow

TL;DR

Trend-momentum job

Retrieve MACD, signal, and histogram series for crossover, trend-strength, and momentum-change workflows—not one opaque buy or sell label.

Reproducible calculation

Preserve fast EMA, slow EMA, signal EMA, price source, adjustment policy, interval, seed method, and completed-bar status.

Internal consistency

Verify histogram equals MACD minus signal and compare a trailing sample with a local EMA implementation after sufficient warm-up.

Where QVeris helps

QVeris helps agents discover technical-analysis capabilities and inspect their required inputs before calling them.

Free MACD API response fields and parameters

A MACD indicator API usually derives three series from price data: the MACD line, its signal line, and the histogram difference. Defaults often use 12- and 26-period exponential moving averages with a 9-period signal, but names, precision, source series, and warm-up behavior differ. Treat each provider’s documentation as authoritative.

Reconcile the three MACD series

Verify that histogram equals MACD minus signal within the provider’s rounding tolerance. Store all three values; do not reconstruct a missing line from a chart image or opaque status label.

Confirm EMA seeding and warm-up length

MACD depends on recursive exponential averages. Providers may seed with an SMA, the first value, or a longer hidden history, so early results can differ even with 12/26/9 parameters.

Preserve fast, slow, signal, and price-source settings

Record the two EMA periods, signal EMA, close or adjusted-close input, interval, and adjustment policy. Swapping fast and slow changes the sign and interpretation.

Use completed bars for crossover decisions

A MACD crossover can appear and disappear while the current bar is forming. For reproducible alerts and backtests, label provisional values and confirm the signal on the completed bar.

Verify histogram sign and scale

Most providers define histogram as MACD minus signal, but some charting systems reverse the sign or multiply the difference for display. Check the documented equation and verify it numerically. Do not infer bullish or bearish state from a field named histogram until its sign convention is known.

Separate crossover, zero-line, and momentum rules

A MACD-line crossover, signal-line crossover, zero-line crossing, and expanding histogram describe different events. Store the underlying three series and implement strategy labels in the application with explicit confirmation and cooldown rules instead of accepting an opaque buy or sell flag.

Align multi-timeframe inputs

Daily, hourly, and minute MACD values have different histories and completion times. A combined signal is point-in-time safe only when every contributing candle had closed. Preserve interval, session, timezone, source-bar timestamp, and retrieval time for each series.

How to compare free technical indicator APIs

RequirementWhat to inspectWhy it mattersFailure signal
Endpoint accessIs MACD included in the free tier, demo, or paid plan?A free key may not unlock every indicator.Pricing and docs disagree.
FieldsMACD, signal, histogram, timestamps, metadata.Determines whether the response answers the task.Only a chart or opaque score.
ParametersSymbol, interval, fast/slow/signal periods, series type.Makes output reproducible and comparable.Undocumented fixed defaults.
Quota & rightsRequest weights, 429 behavior, caching, display, storage.Defines safe polling and permitted use.“Unlimited” without written terms.

MACD API for Python: a safe integration path

1. Confirm symbol, asset class, and interval

Resolve the instrument and venue first, then choose a supported interval such as daily or one hour. Do not assume the same ticker maps across providers.

2. Send one documented MACD request

Use the provider’s official HTTP or Python example with an API key stored on the server. Inspect the unmodified JSON before writing a mapper.

3. Normalize MACD JSON data

Parse timestamps with timezone awareness, convert numeric strings safely, preserve null warm-up values, and map MACD, signal, and histogram explicitly.

4. Add rate-limit handling and caching

Respect request weights, back off after 429 responses, cache by completed-bar cadence, and retain provider, parameters, and retrieval timestamps.

5. Recalculate a fixed MACD fixture

Save enough close prices to cover the slow EMA and signal warm-up, then reproduce all three series independently. Compare seed behavior, null rows, timestamps, precision, and histogram identity within a stated tolerance. Include a missing interval and a split-adjusted stock example.

6. Monitor revisions and crossover stability

Track source-bar freshness, candle status, schema changes, historical revisions, quota use, and disagreement with the fixture. If a provisional crossover disappears before close or a backfill changes an earlier signal, preserve the change history instead of overwriting the evidence.

Provider-neutral Python validation. Map the selected API’s field names into timestamp, macd, signal, and histogram, then validate each row before storing it. This example deliberately checks structure and arithmetic without inventing a provider URL or authentication scheme.

from dataclasses import dataclass
from datetime import datetime
from decimal import Decimal, InvalidOperation


@dataclass(frozen=True)
class MacdPoint:
    timestamp: datetime
    macd: Decimal
    signal: Decimal
    histogram: Decimal


def parse_macd_row(row: dict, tolerance=Decimal("0.000001")) -> MacdPoint:
    required = {"timestamp", "macd", "signal", "histogram"}
    missing = required.difference(row)
    if missing:
        raise ValueError(f"Missing MACD fields: {sorted(missing)}")

    timestamp = datetime.fromisoformat(
        str(row["timestamp"]).replace("Z", "+00:00")
    )
    if timestamp.tzinfo is None:
        raise ValueError("MACD timestamp must include a timezone")

    try:
        macd = Decimal(str(row["macd"]))
        signal = Decimal(str(row["signal"]))
        histogram = Decimal(str(row["histogram"]))
    except InvalidOperation as exc:
        raise ValueError("MACD fields must be decimal numbers") from exc

    if abs((macd - signal) - histogram) > tolerance:
        raise ValueError("Histogram does not equal MACD minus signal")

    return MacdPoint(timestamp, macd, signal, histogram)

Run the parser on completed bars only, preserve null warm-up rows separately, and compare a fixed trailing window with a local EMA calculation. A passing arithmetic check confirms internal consistency; it does not prove that the provider used the same seed, price source, or adjustment policy as your strategy.

Use QVeris to discover MACD API capabilities

QVeris is a capability-routing layer, not a market-data vendor and not a promise that a third-party MACD endpoint is free. It can help an agent search for technical-analysis capabilities, inspect inputs and outputs, and call a selected tool under that tool’s documented terms.

  • Open the QVeris MACD tool details to inspect the exact parameters and indicator output.
  • Inspect symbols, intervals, calculation parameters, response schema, provider identity, and limitations before calling.
  • Use the QVeris REST API reference to connect the selected capability to an agent workflow.

Free MACD API FAQ

Is there a free API for MACD data?

Yes. Some providers offer free tiers or demos for pre-calculated MACD. Check the current pricing and endpoint documentation because a free key may exclude the MACD function.

What does a MACD API return?

A useful response normally includes timestamps, MACD values, signal values, and histogram values. Also inspect calculation parameters, ordering, precision, and null warm-up rows.

How do I get MACD data in Python?

Send an authenticated HTTP request with a symbol and interval, parse the JSON, convert numeric strings safely, preserve timestamps, and handle rate limits and errors.

Can I get real-time MACD data from a free API?

Possibly, but source-market entitlements and free-plan rules vary. Verify the underlying bar timestamp and documented delay instead of inferring freshness from response speed.

Authoritative references and next steps