Getting Started
The ByteTree API gives you daily market data — prices for global stocks, ETFs, crypto, commodities and currencies — together with ByteTree’s own trend analysis for each of them. You ask for data with a simple web request, and it comes back as JSON, or as CSV if you’d rather open it in a spreadsheet.
This page takes you from nothing to your first answer in three steps. New to ByteTree’s terms? Read Key Concepts first — it takes about five minutes.
1. Get an API key
Every request needs an API key — a secret code that identifies you. Keys are issued through your ByteTrend.io account on the API + MCP plan. Keep yours private: anyone who has it can use your access. Authentication has the details.
2. Make your first request
All requests go to this address:
https://api.bytetree.io
Send your key in the Authorization header. This request asks for Apple’s latest trend scores:
curl https://api.bytetree.io/api/metrics/AAPL/latest \
-H "Authorization: Bearer YOUR_API_KEY"
Replace YOUR_API_KEY with your own key. curl is built into macOS, Linux and Windows (on Windows, put
the command on one line and type curl.exe); any HTTP client or programming language works the same way.
3. Read the answer
The response looks like this (shortened — the full record has around a hundred fields):
{
"symbol": "AAPL",
"data": {
"date": "2026-09-10T00:00:00.000Z",
"closeUsd": 326.57,
"byteTrendCapr200w": 5,
"byteTrendLocal30d": 4,
"trendRegimeCapr200w": "Neutral",
"returnUsd12M": 0.3754
}
}
| Field | What it tells you |
|---|---|
closeUsd | The latest closing price, in US dollars |
byteTrendCapr200w | The long-term (Weekly) trend score against the world market, from 0 to 5. 5 means every sign points up |
byteTrendLocal30d | The shorter-term (Daily) trend score of Apple’s own price |
trendRegimeCapr200w | A short label for the trend. It can read Neutral even with a score of 5 — the named labels also need a 30-week high or low |
returnUsd12M | The return over the last 12 months, as a decimal — 0.3754 is +37.5% |
Key Concepts explains each of these in more depth.
What can I ask for?
| I want to… | Use |
|---|---|
| Find an asset, or browse by type, sector or country | List Assets |
| Get today’s prices | Latest Prices |
| Chart an asset’s price history | Price History |
| See an asset’s trend scores today | Latest Metrics |
| See how an asset’s scores have changed | Metric History |
| Get every asset’s scores in one call | Latest Metrics — All Assets |
| Compare sectors, regions or countries | Macro Dataset |
| Find assets that have just entered a Leading Trend | Regime Transitions |
| Look up currency exchange rates | Latest Rates |
| Ask questions from Claude, ChatGPT or another AI assistant | ByteTree MCP |
Getting CSV instead of JSON
Add format=csv to a request to get a spreadsheet-ready table — here, today’s prices for every stock:
curl "https://api.bytetree.io/api/prices?type=stock&format=csv" \
-H "Authorization: Bearer YOUR_API_KEY"
One endpoint, Dataset Summary, returns several tables at once, so it offers JSON and TOON but not CSV. Requests & Responses lists the formats, including TOON — a compact format designed for AI tools.
Going further
- Key Concepts — what the scores, labels and groupings mean.
- Requests & Responses — formats, paging through long lists, error messages, and the full list of endpoints.
- Data Model — adjusted and raw prices, and which to use.
- Changelog — what has changed in the API, and when.