Two formats, same data
| Media type | Use case |
|---|---|
application/json | Default. Browsers, scripts, dashboards. |
application/toon | LLM and AI-agent clients. Tabular encoding, 30–60 % fewer tokens. |
Field names, nullability, and the meta envelope are identical — only the wire encoding differs.
How to ask for TOON
In priority order:
Accept: application/toonheader (standard HTTP content negotiation)."format": "toon"field in the JSON request body (POSTseries endpoints).?format=toonquery parameter.- Default: JSON.
The Content-Type header on the response reflects what was served. An Accept header that lists only types we don't serve returns 415 unsupported_media_type; an unknown format value returns 400 invalid_parameter.
Why TOON
TOON emits field names once as a header and writes value-only rows — exactly the shape of a tabular API response. Per-row overhead drops from object delimiters + field names + colons + commas to just commas.
Side-by-side
A 90-day OHLC pull for BTC-USDT on Binance, in JSON:
{"meta": {"source_type": "exchange","source": "binance","symbol": "BTC-USDT","metric_type": "candlestick","sides": ["ohlc"],"resolution": "daily","start": "2024-01-01","end": "2024-03-30","count": 90},"data": [{"date": "2024-01-01","open": 42190.1,"high": 42910.5,"low": 41805.0,"close": 42500.0,"observation_count": 123456,"price_sum": 1234567.89,"price_variance": 12345.67}]}
The same payload as TOON:
meta:source_type: exchangesource: binancesymbol: BTC-USDTmetric_type: candlesticksides[1]: ohlcresolution: dailystart: 2024-01-01end: 2024-03-30count: 90data[90]{date,open,high,low,close,observation_count,price_sum,price_variance}:2024-01-01,42190.1,42910.5,41805.0,42500.0,123456,1234567.89,12345.672024-01-02,42501.0,43120.0,42310.5,42995.2,130210,1318222.11,11980.04
Side filtering pairs well with TOON
Most metrics carry both sides in one row (e.g. bid_amount and ask_amount). If your agent only needs one, ask for it explicitly:
curl -s "https://zealous.markets/api/v1/market/limit-orders" \-X POST \-H "Authorization: Bearer $ZM_KEY" \-H "Content-Type: application/json" \-H "Accept: application/toon" \-d '{"exchange":"binance","symbol":"BTC-USDT","side":"bid_amount","start":"2024-01-01"}'
Halves the columns and the bytes.
Quota impact
Metering is on the served body, so TOON also reduces your monthly byte quota spend.