Quick Start

TickerLab Documentation

Professional China A-share market data APIs for historical prices, technical indicators, financial data, and quantitative research.

Basic Information

ItemDescription
Base URLhttps://tickerlab.org
AuthenticationAPI Key via X-API-Key header
Data FormatJSON
ProtocolHTTPS

Authentication

All API requests require an API Key:

curl -H "X-API-Key: your_api_key" https://tickerlab.org/v1/markets/history?symbol=sz.000001

# Technical indicator request
curl -H "X-API-Key: your_api_key" "https://tickerlab.org/v1/indicators/ma?symbol=sz.000001&timeperiod=20"

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/markets/history",
    params={"symbol": "sz.000001", "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/markets/history?symbol=sz.000001&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/markets/history" \
  -H "X-API-Key: your_api_key" \
  -d "symbol=sz.000001" \
  -d "interval=1d"

API Endpoints Overview

K-Line Data

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

MethodEndpoint
GET/v1/markets/history

Example:

curl -G "https://tickerlab.org/v1/markets/history" \
  -H "X-API-Key: your_key" \
  -d "symbol=sz.000001" \
  -d "interval=1d"

Historical Market Data Export

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

MethodEndpoint
GET/v1/export/history

Example:

curl -H "X-API-Key: your_key" \
  "https://tickerlab.org/v1/export/history?symbol=sh.600519&format=json&start_date=2024-01-01"

Batch Charting

Generate static charts for multiple symbols in a single request.

MethodEndpoint
POST/v1/markets/chart/batch

Example:

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

Technical Indicators

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

Macro Data

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

Capital Flow and Event Data

MethodEndpoint GroupNotes
GET/v1/money-flow/capital-flow, /v1/money-flow/north-flow, /v1/money-flow/south-flowCore fund flow channels
GET/v1/markets/margin, /v1/markets/margin-detailMargin financing summary/detail
GET/v1/rankings/dragon-tiger, /v1/rankings/hsgt-hold-rankMarket leaderboards
GET/v1/markets/hsgt-stock-statisticsHSGT holding statistics
GET/v1/finance/stock-repurchase, /v1/finance/institute-recommendCorporate actions and institutional views
GET/v1/finance/restricted-release-summary, /v1/finance/restricted-release-detail, /v1/finance/restricted-release-queue, /v1/finance/restricted-release-stockholderRestricted release lifecycle
GET/v1/markets/suspend-resume-eventsSuspend/resume events

Summary Intelligence

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

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

Intraday Intelligence

MethodEndpoint GroupNotes
GET/v1/markets/momentumIntraday momentum and breakout/fade risk
GET/v1/markets/sector-pulseSector pulse and continuation probability
GET/v1/markets/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

Rate limits depend on the user’s current subscription and may change as plans are updated. Check the dashboard or Pricing page for the limits currently applied to your account.