Financial Data API
Financial data from Python or the command line: stock quotes by ticker, crypto market data, DeFi total value locked per chain, ECB foreign-exchange rates, Legal Entity Identifier records and SEC EDGAR filings, as JSON or CSV. The code is free and open source (MIT). Most of these sources publish their own APIs; this package puts all six behind one client and one QuanticData sign-in, returns the same flat rows and CSV export for every source, retries on rate limits and dropped connections, and runs long jobs in the background.
pip install git+https://github.com/quantumproxies/financial-data-api
financial-data login
financial-data marketwatch AAPL MSFT -o quotes.csv
login opens the QuanticData sign-in page in your browser. New accounts get $2 of free usage every month, no card required: create one.
What it scrapes
| Command |
Input |
Returns |
Per run |
financial-data marketwatch |
US tickers |
Price, change, session, day and 52-week range, volume, market cap, P/E, EPS, 31 fields per row (fields and price) |
up to 25 |
financial-data crypto |
coin ids (optional) |
Price, market cap, volume, 24h range and change, supply, all-time high, 28 fields per row (fields and price) |
up to 250 |
financial-data defi |
chain names (optional) |
TVL in USD, rank, share of all chains, native token, chain id, 9 fields per row (fields and price) |
up to 200 |
financial-data fx |
base currency (optional) |
Rate, inverse rate, reference date, one row per currency, 6 fields per row (fields and price) |
up to 50 |
financial-data lei |
legal name or LEI |
LEI, legal name, status, addresses, legal form, BIC, renewal date, 29 fields per row (fields and price) |
up to 100 |
financial-data sec |
full-text query, or --ticker / --cik |
Form, filed and report dates, company, ticker, accession, document links, 24 fields per row (fields and price) |
up to 100 |
sec searches the full text of every filing (QUERY) or lists one company's filings (--ticker or --cik); --forms 10-K,10-Q, --date-from and --date-to narrow both. fx takes --date for a past day, and crypto takes --vs-currency (usd, eur, btc...), --category (stablecoins, meme-token...) and --order (market cap, volume or id).
Sample output
A real row from financial-data marketwatch AAPL MSFT --max-results 2 (2026-10-23):
{
"eps": 8.72,
"url": "https://www.marketwatch.com/investing/stock/aapl",
"beta": 1.17,
"name": "Apple Inc.",
"open": 344.94,
"rank": 1,
"price": 345.92,
"change": -2.31,
"ticker": "AAPL",
"volume": 46898875,
"day_low": 342.28,
"session": "premarket",
"currency": "USD",
"day_high": 348.36,
"dividend": 0.27,
"exchange": "U.S.: Nasdaq",
"pe_ratio": 39.92,
"market_cap": 5080000000000,
"quote_time": "Oct 23, 2026 4:49 a.m. EDT",
"week52_low": 243.42,
"week52_high": 348.36,
"exchange_iso": "XNAS",
"public_float": 14580000000,
"instrument_id": "202934861",
"avg_volume_65d": 44066082,
"change_percent": -0.66,
"previous_close": 348.22,
"instrument_type": "Stock",
"requested_ticker": "AAPL",
"shares_outstanding": 14590000000,
"dividend_yield_percent": 0.31
}
Python
from quanticdata_financial_data_api import Finance
finance = Finance() # saved login, or QUANTICDATA_API_KEY
quotes = finance.marketwatch(["AAPL", "MSFT"])
for q in quotes:
print(q["ticker"], q["price"], q["change_percent"], q["session"], q["quote_time"])
coins = finance.crypto(["bitcoin", "ethereum"], vs_currency="eur")
print([(c["symbol"], c["price"]) for c in coins])
rates = finance.fx("EUR", symbols=["USD", "GBP", "JPY"])
rates.to_csv("eur_rates.csv")
apple = finance.lei("Apple Inc", max_results=1)
print(apple.rows[0]["lei"], apple.rows[0]["registration_status"])
filings = finance.sec(ticker="AAPL", forms="10-K", max_results=5)
for f in filings:
print(f["filed_date"], f["form"], f["url"])
Each call returns a Run: iterate it for the rows (plain dicts), take len(), or save it with to_csv(), to_json(), to_jsonl() or to_dataframe() (pandas). Errors are specific: InsufficientCredit, RateLimited, InvalidInput, JobFailed, AuthError.
Examples
- Watchlist snapshots: Append the current price and change of a list of stocks and coins to one CSV, with a timestamp, every time it runs. See
examples/watchlist_snapshot.py.
- Filing monitor: List the 10-K, 10-Q and 8-K filings a set of companies made since a date, with links to each document and its index. See
examples/new_filings.py.
- Counterparty LEI lookup: Read a list of legal names and add the LEI, entity and registration status, country and next renewal date of the best match to each. See
examples/lei_lookup.py.
Command line
Results print as a table; -o file.csv, -o file.json or -o file.jsonl writes a file. List inputs take a b c, a,b,c, @file.txt (one per line) or - (stdin). --no-wait starts a long run in the background and prints its id; financial-data run <id> -o out.csv collects it later.
financial-data marketwatch
Latest quote per US ticker from MarketWatch: price, change, session, day and 52-week range, volume, market cap, P/E and EPS, with the time the quote is from.
financial-data marketwatch TICKERS [options]
| Option |
Type |
Default |
Description |
TICKERS |
string[] |
|
US-listed ticker symbols as MarketWatch spells them, e.g. AAPL MSFT BRK.B. |
--country |
string |
|
Country to run the request from, as an ISO 3166-1 alpha-2 code (us, gb, de...). |
--max-results |
integer |
10 |
How many quotes to deliver at most (1–25). You pay only for delivered quotes. |
financial-data crypto
Crypto market rows from CoinGecko, for chosen coins or in market-cap order: price, market cap, volume, 24-hour range and change, supply and all-time high and low.
financial-data crypto [COIN_IDS] [options]
| Option |
Type |
Default |
Description |
--vs-currency |
string |
usd |
Quote currency: usd, eur, btc... |
COIN_IDS |
string[] |
|
CoinGecko coin ids, e.g. bitcoin ethereum solana. Omit them for the market-cap ranking. |
--category |
string |
|
Only coins of this CoinGecko category, e.g. stablecoins or meme-token. |
--order |
market_cap_desc / market_cap_asc / volume_desc / volume_asc / id_asc / id_desc |
market_cap_desc |
Sort order (default market_cap_desc). |
--max-results |
integer |
50 |
How many coins to deliver at most (1–250). You pay only for delivered coins. |
financial-data defi
Total value locked per blockchain from DefiLlama, in USD, with its rank and share across all chains, the native token and the chain's CoinGecko and CoinMarketCap ids.
financial-data defi [CHAINS] [options]
| Option |
Type |
Default |
Description |
CHAINS |
string[] |
|
Chain names, e.g. Ethereum Solana Arbitrum. Omit them for every chain, ranked by TVL. |
--max-results |
integer |
50 |
How many chains to deliver at most (1–200). You pay only for delivered chains. |
financial-data fx
Foreign-exchange rates from the European Central Bank reference data, latest or for a past date, one row per target currency with the inverse rate.
financial-data fx [BASE] [options]
| Option |
Type |
Default |
Description |
BASE |
string |
USD |
Base currency, 3 letters, e.g. EUR (default USD). |
--symbols |
string[] |
|
Target currencies, e.g. USD GBP JPY. Omit them for every currency available. |
--date |
string |
|
A past date, YYYY-MM-DD; omit it for the latest rates. |
--max-results |
integer |
40 |
How many currencies to deliver at most (1–50). You pay only for delivered currencies. |
financial-data lei
LEI records from GLEIF, by legal name or exact LEI: legal name and other names, entity and registration status, legal and headquarters addresses, legal form, register number, BIC codes and renewal date.
financial-data lei QUERY [options]
| Option |
Type |
Default |
Description |
QUERY |
string |
|
Legal name to search, e.g. "Apple Inc", or an exact 20-character LEI. |
--country |
string |
|
Limit to entities whose legal address is in this country (ISO 3166-1 alpha-2). |
--max-results |
integer |
25 |
How many entities to deliver at most (1–100). You pay only for delivered entities. |
financial-data sec
SEC EDGAR filings: full-text search across every filing, or one company's filing history by ticker or CIK, with form, dates, accession number and links to the document and its index.
financial-data sec [QUERY] [options]
| Option |
Type |
Default |
Description |