Assets & markets
QuantConomy models the financial universe in two layers. Assets are the instruments themselves — stocks, currencies, bonds, ETFs, and crypto. Markets are tradable pairs of assets (a base asset quoted in another) on a specific exchange and data platform. Markets carry time-series candle and chart data.
Assets
Section titled “Assets”An asset is a single financial instrument. Each parent asset has a unique key (e.g. apple-inc, bitcoin), a symbol, a name, and a class. Parent assets group children — the same instrument as listed on different exchanges or data platforms (e.g. AAPL on Alpaca and on Polygon), each with its own platformKey and platformAssetId.
Supported asset classes:
| Class | Description |
|---|---|
stock | Equities |
cryptocurrency | Cryptocurrencies |
currency | Foreign-exchange currencies |
etf | Exchange-traded funds |
mutual_fund | Mutual funds |
bond | Bonds and fixed income |
commodity | Commodities (gold, oil, …) |
future | Futures contracts |
option | Options contracts |
The same key values appear in the entries feed as assetKeys, so you can pivot from a news article straight to the asset it mentions.
Endpoints
Section titled “Endpoints”| Method & path | Description | Credits |
|---|---|---|
GET /assets | List parent assets with children (page-based, searchable, sortable) | 1 |
GET /assets/:idOrKey | Single asset by UUID or key | 1 |
GET /assets returns only parent assets. Search across symbol, name, and key (AAPL, Apple), or filter by class with either the class query param or the class:stock search syntax. The detail endpoint’s :idOrKey accepts a UUID or an asset key (e.g. apple-inc).
Example
Section titled “Example”# Search crypto assetscurl "https://api.quantconomy.com/api/v1/assets?class=cryptocurrency&limit=5" \ -H "Authorization: Bearer mtk_your_key_here"
# Look one up by keycurl "https://api.quantconomy.com/api/v1/assets/apple-inc" \ -H "Authorization: Bearer mtk_your_key_here"const res = await fetch( 'https://api.quantconomy.com/api/v1/assets/apple-inc', { headers: { Authorization: 'Bearer mtk_your_key_here' } },);const { data } = await res.json();console.log(data.symbol, data.class, data.children.length);import requests
res = requests.get( "https://api.quantconomy.com/api/v1/assets/apple-inc", headers={"Authorization": "Bearer mtk_your_key_here"},)res.raise_for_status()data = res.json()["data"]print(data["symbol"], data["class"], len(data["children"]))Markets
Section titled “Markets”A market is a trading pair: a base asset quoted in a quoteAsset on a particular exchange (exchangeKey) and data platform (marketDataPlatformKey). For example, AAPL on NASDAQ via Alpaca (quoted in USD), or BTC/USDT on Binance. The market id (a UUID) is what you use to fetch price data.
Data platforms include alpaca (US stocks), binance (crypto), polygon (US stocks), and fmp (Financial Modeling Prep).
Endpoints
Section titled “Endpoints”| Method & path | Description | Credits |
|---|---|---|
GET /markets | List markets (filter by assetId, quoteAssetId, platform) | 1 |
GET /markets/:id/candles | OHLCV candles for a market | 2 |
GET /markets/:id/chart | Simplified time + close-price series | 1 |
GET /markets/:id | Single market | 1 |
Candles (OHLCV)
Section titled “Candles (OHLCV)”GET /markets/:id/candles returns Open/High/Low/Close/Volume bars. The timeframe query param is required and accepts: 1m, 5m, 15m, 30m, 1h, 2h, 4h, 6h, 8h, 12h, 1d, 3d, 1w, 1M, 3M, 1y. Narrow the window with from/to (ISO 8601), set limit (max 1000, default 500), and control order (DESC newest-first by default, or ASC). All numeric values are returned as strings to preserve precision.
Charts
Section titled “Charts”GET /markets/:id/chart is a lightweight alternative that returns just time and value (close price), ideal for sparklines. Pass days (1–365, default 7) and the endpoint auto-selects a sensible timeframe — 5-minute candles for 1 day, 1-hour up to 7 days, 4-hour up to 30 days, and daily beyond that — unless you override it with timeframe.
Example
Section titled “Example”Pull the last 7 days of hourly candles for a market:
curl "https://api.quantconomy.com/api/v1/markets/550e8400-e29b-41d4-a716-446655440000/candles?timeframe=1h&limit=168&order=ASC" \ -H "Authorization: Bearer mtk_your_key_here"const marketId = '550e8400-e29b-41d4-a716-446655440000';const params = new URLSearchParams({ timeframe: '1h', limit: '168', order: 'ASC' });
const res = await fetch( `https://api.quantconomy.com/api/v1/markets/${marketId}/candles?${params}`, { headers: { Authorization: 'Bearer mtk_your_key_here' } },);const { data } = await res.json();console.log(data[0]); // { time, open, high, low, close, volume }import requests
market_id = "550e8400-e29b-41d4-a716-446655440000"res = requests.get( f"https://api.quantconomy.com/api/v1/markets/{market_id}/candles", headers={"Authorization": "Bearer mtk_your_key_here"}, params={"timeframe": "1h", "limit": 168, "order": "ASC"},)res.raise_for_status()print(res.json()["data"][0])From asset to candles
Section titled “From asset to candles”A typical flow ties the two datasets together:
- Find the asset —
GET /assets?query=Apple(or by key,GET /assets/apple-inc). - Find its markets —
GET /markets?assetId=<asset-uuid>to get the tradable pairs and theirids. - Fetch price data —
GET /markets/:id/candles?timeframe=1dorGET /markets/:id/chart?days=30.