Sources › Finance › Histdata › Download M1

Histdata Download M1 API

One-minute OHLC bars from HistData — the fallback book behind `finance/dukascopy`

HistdataGET /download-m1All plans1 Zap

Request

GET
https://api.zapi.ink/v1/finance:histdata/download-m1

Send your key in the x-api-key header. The response is JSON in the { project, data, timestamp } envelope, and an identical request is served from cache for 1 day.

Parameters

NameTypeInRequiredDescription
pairstringqueryYesInstrument code as HistData spells it. XAUUSD starts 2009-03. Example: XAUUSD
yearnumberqueryYesCalendar year to download. Example: 2023
monthnumberqueryNoMonth 1-12. Required for the current year, which ships month by month; narrows a closed year. Example: 7
pagenumberqueryNoPage of bars. Default 1. Example: 1
limitnumberqueryNoBars per page. Default 5000, max 20000. Example: 5000

Code examples

cURL
curl -X GET "https://api.zapi.ink/v1/finance:histdata/download-m1?pair=XAUUSD&year=2023&month=7&page=1&limit=5000" \
  -H "x-api-key: zpi_xxxxxxxxxxxxxxxxxxxxxxxx"
JavaScript
const res = await fetch("https://api.zapi.ink/v1/finance:histdata/download-m1?pair=XAUUSD&year=2023&month=7&page=1&limit=5000", {
  method: "GET",
  headers: {
    "x-api-key": "zpi_xxxxxxxxxxxxxxxxxxxxxxxx"
  },
});
const data = await res.json();
console.log(data);
Python
import requests

res = requests.get(
    "https://api.zapi.ink/v1/finance:histdata/download-m1",
    params={"pair":"XAUUSD","year":"2023","month":"7","page":"1","limit":"5000"},
    headers={"x-api-key":"zpi_xxxxxxxxxxxxxxxxxxxxxxxx"},
)
print(res.json())

Example response

200 OK · application/json
{
  "project": "finance:histdata",
  "data": {
    "file": "DAT_ASCII_XAUUSD_M1_2023.csv",
    "page": 1,
    "pair": "XAUUSD",
    "unit": "year",
    "year": 2023,
    "count": 5000,
    "items": [
      {
        "low": 1826.617,
        "high": 1827.337,
        "open": 1826.837,
        "time": "2023-01-02T18:00:00-05:00",
        "close": 1826.637
      },
      {
        "low": 1826.137,
        "high": 1827.357,
        "open": 1826.537,
        "time": "2023-01-02T18:01:00-05:00",
        "close": 1826.537
      },
      {
        "low": 1826.137,
        "high": 1826.737,
        "open": 1826.137,
        "time": "2023-01-02T18:02:00-05:00",
        "close": 1826.737
      },
      {
        "low": 1827.187,
        "high": 1828.867,
        "open": 1827.187,
        "time": "2023-01-02T18:05:00-05:00",
        "close": 1828.738
      },
      {
        "low": 1828.758,
        "high": 1829.958,
        "open": 1828.758,
        "time": "2023-01-02T18:06:00-05:00",
        "close": 1829.497
      },
      {
        "low": 1828.117,
        "high": 1829.507,
        "open": 1829.497,
        "time": "2023-01-02T18:07:00-05:00",
        "close": 1829.397
      },
      {
        "low": 1828.718,
        "high": 1829.357,
        "open": 1829.357,
        "time": "2023-01-02T18:08:00-05:00",
        "close": 1829.277
      },
      {
        "low": 1828.757,
        "high": 1829.488,
        "open": 1829.277,
        "time": "2023-01-02T18:09:00-05:00",
        "close": 1829.298
      }
    ],
    "month": null,
    "total": 308812,
    "dataset": "m1",
    "hasMore": true,
    "nextPage": 2,
    "provider": "histdata",
    "timezone": "EST-no-DST",
    "priceSide": "bid",
    "timeframe": "M1"
  },
  "timestamp": "2026-08-21T02:23:28Z"
}

Frequently asked questions

How do I call the Histdata Download M1 API?

Send a GET request to https://api.zapi.ink/v1/finance:histdata/download-m1?pair=XAUUSD&year=2023 with your Zapi key in the x-api-key header. Parameters — required: pair, year; optional: month, page, limit. The response is JSON in the { project, data, timestamp } envelope.

What does the Histdata Download M1 API return?

One-minute OHLC bars from HistData — the fallback book behind `finance/dukascopy`. The example response has the fields file, page, pair, unit, year, count, items, month. Each item in items has fields such as low, high, open, time, close.

Is the Histdata Download M1 API free?

Yes. It is on the Zapi free tier: 600 Zap a month with one API key and no credit card. Each call costs 1 Zap. Paid plans raise the limits.

Can an AI assistant call the Histdata Download M1 API?

Yes. Add the Zapi MCP server (https://mcp.zapi.ink/mcp) to Claude, Cursor or another MCP client and ask in plain words; it calls run_scraper with scraper "histdata" and endpoint "download-m1".

What other Histdata API endpoints are there?

It has 5 endpoints. Besides Download M1: Coverage, Gap Report, List Instruments, Download Tick.