Quick Start

TickerLab Documentation

Professional stock market data API service, providing K-line chart generation, technical indicators, and real-time market data.

Basic Information

ItemDescription
Base URLhttps://tickerlab.org
AuthenticationAPI Key (Header or Query parameter)
Data FormatJSON
ProtocolHTTPS

Authentication

All API requests require an API Key:

# Method 1: Header Authentication (Recommended)
curl -H "X-API-Key: your_api_key" https://tickerlab.org/v1/indicators/time_series?symbol=000001.SZ

# Method 2: Query Parameter
curl "https://tickerlab.org/v1/indicators/query?apikey=your_api_key&symbol=000001.SZ&function=SMA"

Quick Start

Python

import requests

API_KEY = "your_api_key"
BASE_URL = "https://tickerlab.org"

# Get time series data
response = requests.get(
    f"{BASE_URL}/v1/indicators/time_series",
    params={"symbol": "000001.SZ", "interval": "1d"},
    headers={"X-API-Key": API_KEY}
)
data = response.json()
print(data["values"][:5])  # Latest 5 records

JavaScript

const API_KEY = 'your_api_key';
const BASE_URL = 'https://tickerlab.org';

// Get time series data
const response = await fetch(
  `${BASE_URL}/v1/indicators/time_series?symbol=000001.SZ&interval=1d`,
  { headers: { 'X-API-Key': API_KEY } }
);
const data = await response.json();
console.log(data.values.slice(0, 5));

cURL

curl -G "https://tickerlab.org/v1/indicators/time_series" \
  -H "X-API-Key: your_api_key" \
  -d "symbol=000001.SZ" \
  -d "interval=1d"

API Endpoints Overview

Access Policies

/v1/metadata/endpoint-policies is an internal admin endpoint and is no longer public.

Current public/pro split:

TierEndpoint Groups
Free/v1/market/* (except chart batch/storage), /v1/macro/*, /v1/flow/*, /v1/stock/*, /v1/finance/*, /v1/sector/*, /v1/ranking/*, /v1/summary/*, /v1/indicators/*
Pro+/v1/intraday/*, /v1/export/*, /v1/market/chart/storage, /v1/market/chart/batch

K-Line Data

Historical candlestick data with multiple intervals. This is the main entrypoint for time-series analysis.

MethodEndpoint
GET/v1/indicators/time_series
  • Best for: OHLCV time series, backtesting, and charting feeds
  • Common params: symbol, interval, start_date, end_date, outputsize

Example:

curl -G "https://tickerlab.org/v1/indicators/time_series" \
  -H "X-API-Key: your_key" \
  -d "symbol=000001.SZ" \
  -d "interval=1d"

Real-time Quote

Latest bid/ask/last for a single symbol.

MethodEndpoint
GET/v1/market/quote
  • Best for: quotes in dashboards and trading screens

Example:

curl -H "X-API-Key: your_key" "https://tickerlab.org/v1/market/quote?symbol=000001.SZ"

Historical Market Data (Export)

Export-friendly historical data for batch or CSV/JSON download.

MethodEndpoint
GET/v1/market/history
  • Best for: bulk history, CSV/JSON export

Example:

curl -H "X-API-Key: your_key" \
  "https://tickerlab.org/v1/market/history?symbol=BTCUSDT&interval=1d&start_date=2023-01-01"

Batch Charting

Generate static charts for multiple symbols in a single request.

MethodEndpoint
POST/v1/market/chart/batch
  • Best for: batch PNG generation, reporting

Example:

curl -X POST "https://tickerlab.org/v1/market/chart/batch" \
  -H "X-API-Key: your_key" \
  -H "Content-Type: application/json" \
  -d '[
    {"symbol": "000001.SZ", "interval": "1d", "studies": [{"name": "MACD"}]},
    {"symbol": "BTCUSDT", "interval": "4h", "studies": [{"name": "RSI"}]}
  ]'

Technical Indicators

All indicators support symbol, interval, start_date, end_date parameters.

EndpointDescriptionSpecific Parameters
/v1/market/vwapVWAP-
/v1/indicators/bbandsBollinger Bandstimeperiod (default 20), nbdevup (2)
/v1/indicators/macdMACDfastperiod (12), slowperiod (26), signalperiod (9)
/v1/indicators/rsiRSItimeperiod (14)
/v1/market/stochStochasticfastk_period (14), slowk_period (3)
/v1/market/atrATRtimeperiod (14)
/v1/market/obvOBV-
/v1/market/adxADXtimeperiod (14)

Macro Data (Newly Expanded)

Macro and global cross-asset datasets for policy, migration, commodities, FX, crypto, and risk monitoring.

MethodEndpoint GroupNotes
GET/v1/macro/cpi, /v1/macro/ppi, /v1/macro/gdp, /v1/macro/money-supply, /v1/macro/lpr, /v1/macro/pmiChina core macro indicators
GET/v1/macro/social-finance, /v1/macro/new-loans, /v1/macro/fx-reservesCredit and reserve indicators
GET/v1/macro/migration-scale, /v1/macro/migration-area, /v1/macro/epu-indexMigration and policy uncertainty
GET/v1/macro/oil-price-adjustment, /v1/macro/oil-price-regionChina oil price tracking
GET/v1/macro/commodity-daily, /v1/macro/forex-daily, /v1/macro/crypto-dailyDaily commodity / FX / crypto series
GET/v1/macro/global-index-daily, /v1/macro/global-index-spot, /v1/macro/fx-spotGlobal index and FX snapshots
GET/v1/macro/energy-inventory, /v1/macro/global-risk-factorUS energy and global risk factors
  • Common params: start_date, end_date, limit

Market Flow (Newly Expanded)

Capital flow, northbound holdings, restricted release events, and market microstructure event streams.

MethodEndpoint GroupNotes
GET/v1/flow/capital-flow, /v1/flow/north-flow, /v1/flow/south-flowCore fund flow channels
GET/v1/flow/margin, /v1/flow/margin-detailMargin financing summary/detail
GET/v1/flow/dragon-tiger, /v1/flow/institute-recommendTrading activity and institutional view
GET/v1/flow/hsgt-hold-rank, /v1/flow/hsgt-stock-statisticsHSGT holding rank/statistics
GET/v1/flow/stock-repurchaseStock repurchase progress
GET/v1/flow/restricted-release-summary, /v1/flow/restricted-release-detail, /v1/flow/restricted-release-queue, /v1/flow/restricted-release-stockholderRestricted release lifecycle
GET/v1/flow/suspend-resume-eventsSuspend/resume events
  • Common params: symbol/stock_code, start_date, end_date, limit

Summary Intelligence (P0)

Aggregated endpoints designed for agent workflows: market regime detection, sentiment, rotation, and stock-level synthesis.

MethodEndpoint GroupNotes
GET/v1/summary/market/regime, /v1/summary/market/sentimentMarket state and sentiment overview
GET/v1/summary/market/hot-stock-trendHot-stock ranking trend summary
GET/v1/summary/sector/rotationSector leadership and rotation strength
GET/v1/summary/sector/concept-heat, /v1/summary/sector/breadthConcept/sector heat and breadth
GET/v1/summary/stock/snapshotSingle-stock unified snapshot (price/technical/capital/finance/risk)
GET/v1/summary/stock/event-timelineCatalyst timeline for one symbol
GET/v1/summary/opportunity/watchlist, /v1/summary/risk/invalidationOpportunity pool and invalidation tracking
  • Common params: trade_date, sector_type, symbol, start_date, end_date, limit

Intraday Intelligence (Pro)

MethodEndpoint GroupNotes
GET/v1/intraday/momentumIntraday momentum and breakout/fade risk
GET/v1/intraday/sector-pulseSector pulse and continuation probability
GET/v1/intraday/market-breadthMinute-level market breadth turns

Error Handling

All API errors return a standardized JSON format:

{
  "error": {
    "code": "ERROR_CODE",
    "message": "Human readable error description",
    "request_id": "abc123-uuid"
  }
}

Error Codes

CodeHTTP StatusDescription
BAD_REQUEST400Invalid request parameters
UNAUTHORIZED401Invalid or missing API Key
FORBIDDEN403Access denied
NOT_FOUND404Resource not found
VALIDATION_ERROR422Request body validation failed
RATE_LIMIT_EXCEEDED429Rate limit exceeded
GEO_RESTRICTED451Region restricted (e.g. some crypto)
INTERNAL_ERROR500Internal server error

Rate Limits

PlanRequests/minuteRequests/hour
Free3150
Pro601000
Premium30010000