Luzia API Documentation

Real-time cryptocurrency pricing data from multiple exchanges through a unified, simple API. Build trading bots, portfolio trackers, and analytics dashboards.

Quick Start

Get your first price data in seconds with a single API call.

 
curl -X GET "https://api.luzia.dev/v1/ticker/binance/BTC-USDT" \
-H "Authorization: Bearer lz_your_api_key"

Authentication

Most API endpoints require authentication using an API key.

API Key Format
API keys use the format lz_ prefix followed by 32 random characters.
 
lz_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6
Header Usage
Include your API key in the Authorization header with a Bearer prefix.
 
Authorization: Bearer lz_your_api_key

Create an account to get your API key, or manage your existing keys.

Rate Limits

API rate limits depend on your subscription tier.

TierPriceRequests/MinuteRequests/Day
Free$0/mo1005,000
ProPopular$29.99/mo1,000Unlimited

Historical Data

Luzia provides OHLCV (Open, High, Low, Close, Volume) candlestick data built from our real-time WebSocket feeds. Use it to build charts, backtest strategies, and analyze market trends.

Tier Lookback Limits
How far back you can query depends on your subscription tier.
TierLookback
Free30 days
Pro90 days
EnterpriseUnlimited
Supported Intervals
Five intervals from 1-minute to 1-day resolution.
1m5m15m1h1d

API Endpoints

Complete reference for all available API endpoints.

GET/v1/exchangesAuth Required
List all supported cryptocurrency exchanges.
Request
 
curl -X GET "https://api.luzia.dev/v1/exchanges" \
-H "Authorization: Bearer lz_your_api_key"
Response
 
{
"exchanges": [
{ "id": "binance", "name": "Binance", "status": "active" },
{ "id": "coinbase", "name": "Coinbase", "status": "active" },
{ "id": "kraken", "name": "Kraken", "status": "active" }
]
}
GET/v1/markets/:exchangeAuth Required
List all available trading markets for a specific exchange.
Request
 
curl -X GET "https://api.luzia.dev/v1/markets/binance" \
-H "Authorization: Bearer lz_your_api_key"
Response
 
{
"exchange": "binance",
"markets": [
{ "symbol": "BTC-USDT", "base": "BTC", "quote": "USDT" },
{ "symbol": "ETH-USDT", "base": "ETH", "quote": "USDT" },
{ "symbol": "SOL-USDT", "base": "SOL", "quote": "USDT" }
]
}
GET/v1/ticker/:exchange/:symbolAuth Required
Get the current price for a specific trading pair on an exchange. Use the optional maxAge parameter (in milliseconds) to specify the maximum acceptable data age. Default: 120000ms (120 seconds).
Request
 
# Default freshness (120 seconds)
curl -X GET "https://api.luzia.dev/v1/ticker/binance/BTC-USDT" \
-H "Authorization: Bearer lz_your_api_key"
# Custom freshness window (5 seconds)
curl -X GET "https://api.luzia.dev/v1/ticker/binance/BTC-USDT?maxAge=5000" \
-H "Authorization: Bearer lz_your_api_key"
Response
 
{
"symbol": "BTC/USDT",
"exchange": "binance",
"last": 67432.50,
"bid": 67430.00,
"ask": 67435.00,
"high": 68500.00,
"low": 66800.00,
"open": 67000.00,
"close": 67432.50,
"volume": 12345.678,
"quoteVolume": 832456789.50,
"change": 432.50,
"changePercent": 0.65,
"timestamp": "2024-01-20T12:00:00.000Z"
}
GET/v1/tickers/:exchangeAuth Required
Get all current prices for an exchange. Use the optional maxAge parameter (in milliseconds) to specify the maximum acceptable data age. Default: 120000ms (120 seconds). Supports pagination with limit (default: 20, max: 50) and offset parameters.
Request
 
# Default freshness (120 seconds)
curl -X GET "https://api.luzia.dev/v1/tickers/binance" \
-H "Authorization: Bearer lz_your_api_key"
# With pagination and custom freshness (15 seconds)
curl -X GET "https://api.luzia.dev/v1/tickers/binance?limit=50&maxAge=15000" \
-H "Authorization: Bearer lz_your_api_key"
Response
 
{
"tickers": [
{
"symbol": "BTC/USDT",
"exchange": "binance",
"last": 67432.50,
"bid": 67430.00,
"ask": 67435.00,
"high": 68500.00,
"low": 66800.00,
"open": 67000.00,
"close": 67432.50,
"volume": 12345.678,
"quoteVolume": 832456789.50,
"change": 432.50,
"changePercent": 0.65,
"timestamp": "2024-01-20T12:00:00.000Z"
}
],
"total": 150,
"limit": 20,
"offset": 0
}
GET/v1/history/:exchange/:symbolAuth Required
Get historical OHLCV candlestick data for a trading pair. Supports intervals: 1m, 5m, 15m, 1h, 1d. Use start and end parameters (Unix milliseconds) to define the time range (defaults: start = 24h ago, end = now). Limit controls the max candles returned (default: 300, max: 500). Lookback limited by tier (Free: 30 days, Pro: 90 days, Enterprise: unlimited).
Request
 
# Last 24 hours (default)
curl -X GET "https://api.luzia.dev/v1/history/binance/BTC-USDT?interval=1h&limit=24" \
-H "Authorization: Bearer lz_your_api_key"
# Custom time range with start and end (Unix ms)
curl -X GET "https://api.luzia.dev/v1/history/binance/BTC-USDT?interval=1h&start=1705708800000&end=1705795200000&limit=24" \
-H "Authorization: Bearer lz_your_api_key"
Response
 
{
"exchange": "binance",
"symbol": "BTC-USDT",
"interval": "1h",
"candles": [
{
"open": 67000.00,
"high": 67450.00,
"low": 66950.00,
"close": 67432.50,
"volume": 1234.56,
"timestamp": "2024-01-20T12:00:00.000Z"
}
],
"count": 24,
"start": "2024-01-20T00:00:00.000Z",
"end": "2024-01-21T00:00:00.000Z"
}

Interactive API Explorer

Try out the API directly in your browser with our Swagger UI documentation.

Open Swagger UI