ByteTree API documentation

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
  }
}
FieldWhat it tells you
closeUsdThe latest closing price, in US dollars
byteTrendCapr200wThe long-term (Weekly) trend score against the world market, from 0 to 5. 5 means every sign points up
byteTrendLocal30dThe shorter-term (Daily) trend score of Apple’s own price
trendRegimeCapr200wA 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
returnUsd12MThe 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 countryList Assets
Get today’s pricesLatest Prices
Chart an asset’s price historyPrice History
See an asset’s trend scores todayLatest Metrics
See how an asset’s scores have changedMetric History
Get every asset’s scores in one callLatest Metrics — All Assets
Compare sectors, regions or countriesMacro Dataset
Find assets that have just entered a Leading TrendRegime Transitions
Look up currency exchange ratesLatest Rates
Ask questions from Claude, ChatGPT or another AI assistantByteTree 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