Skip to content
looot docs
Esc
↑↓navigate↵open⌘Jpreview
On this page

Marketstack / End-of-Day Data

Marketstack tool marketstack-eod on looot: input fields, $0.000899 per call, output shape, and code to run it with curl, JavaScript or Python.

You can use the API’s eod endpoint in order to obtain end-of-day data for one or multiple stock tickers. A single or multiple comma-separated ticker symbols are passed to the API using the symbols parameter. * * * Note: * * * The EOD data has access to over 500,000 tickers from more major world-known exchanges. The full list of supported tickers and exchanges can be seen here: Download * * * A daily updated list of all tickers accessible via Marketstack is available for download: Download Ticker List * * * The V2 EOD endpoint supports data from 30+ stock exchanges, including NASDAQ, PINK, SHG, NYSE, NYSE ARCA, OTCQB, and BATS * * * To retrieve end-of-day data for individual tickers, you can also use the Tickers Endpoint. * * * Ticker Symbol Formatting: When querying ticker symbols that include a period (.), replace the period with a hyphen (-) in the intraday endpoint. Example.B → BRK-B * * The LSE’s/XLON official currency is GBP, however many stocks can be and are quoted in pence (GBX) by convention. It improves readability and pricing precision. If LSE equity price looks “too big” → it’s probably pence. Convert using GBP = GBX / 100 * * Adjusted Prices: * “Adjusted” prices represent stock values that have been modified to accurately reflect the impact of corporate actions such as splits and dividends. These adjustments are applied following the CRSP Calculations methodology established by the Center for Research in Security Prices (CRSP).

Inputs

Name Type Required Description
date_from string no
date_to string no
exchange string no
limit integer no
offset integer no
sort string no
symbols string yes

Output

Shape of the run’s result, the expected shape, not yet checked against real answers:

{ data: { low, date, high, open, close, symbol, volume, adj_low, adj_high, adj_open, dividend, exchange, adj_close, adj_volume, split_factor }[], pagination: { count, limit, total, offset } }

Run it

Every call needs your API token in LOOOT_TOKEN; Sign in shows how to get one. Each run also needs a new idempotency key, so a retry never pays twice. With wait: 30 the answer comes back inline when the run ends within 30 seconds. Otherwise you get the running run back: poll GET /v1/runs/<runId>.

Example input with placeholder values:

curl -X POST "https://api.looot.ai/v1/runs" \
  -H "Authorization: Bearer $LOOOT_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{"endpointId":"marketstack-eod","input":{"symbols":"<symbols>"},"wait":30}'
const response = await fetch("https://api.looot.ai/v1/runs", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.LOOOT_TOKEN}`,
    "Content-Type": "application/json",
    "Idempotency-Key": crypto.randomUUID(),
  },
  body: JSON.stringify({
    endpointId: "marketstack-eod",
    input: {
      symbols: "<symbols>",
    },
    wait: 30,
  }),
});
const run = await response.json();
console.log(run.status, run.result);
import os
import uuid

import requests

response = requests.post(
    "https://api.looot.ai/v1/runs",
    headers={
        "Authorization": f"Bearer {os.environ['LOOOT_TOKEN']}",
        "Idempotency-Key": str(uuid.uuid4()),
    },
    json={
        "endpointId": "marketstack-eod",
        "input": {
            "symbols": "<symbols>",
        },
        "wait": 30,
    },
    timeout=90,
)
run = response.json()
print(run["status"], run.get("result"))

To let looot pick among every provider of this job instead, send job:stocks.historical.prices as endpointId; see the job page.

Was this page helpful?