Skip to main content

TickerLab Python SDK

Python client library for the TickerLab financial market data API.

Installation

pip install tickerlab

To enable automatic Pandas DataFrame conversion for time-series and tabular data:

pip install "tickerlab[pandas]"

Quick Start

import tickerlab as tl

# Set API authentication token
tl.set_token("YOUR_API_KEY")

# Fetch daily historical K-line data
df = tl.get_kline("000001.SZ", period="1d", start="2026-01-01", adjust="qfq")
print(df.tail())

# Fetch real-time market quote snapshot
snapshot = tl.get_snapshot("600519.SH")
print(snapshot)

# Fetch technical indicators (MACD, RSI, KDJ, BOLL, MA, EMA)
macd = tl.get_indicators("000001.SZ", indicator="macd")
print(macd.tail())

Authentication

Authentication can be configured programmatically or via environment variable:

export TICKERLAB_API_KEY="YOUR_API_KEY"
import tickerlab as tl

# When TICKERLAB_API_KEY is present in environment, manual set_token is optional
df = tl.get_kline("000001.SZ")

Method Reference

Method Description Return Type
get_kline(symbol, period='1d', start=None, end=None, adjust='qfq') Historical OHLCV market bars DataFrame / dict
get_snapshot(symbol) Real-time market quote snapshot dict / DataFrame
get_daily_basic(symbol, start=None, end=None) Valuation metrics (PE, PB, turnover, market cap) DataFrame
get_indicators(symbol, indicator='macd', period='1d') Calculated technical indicators DataFrame
get_trade_calendar(start=None, end=None) Market trading days and settlement schedule DataFrame
get_stock_list() Master instrument list and metadata DataFrame
search_stocks(query) Symbol and name search DataFrame
get_macro(indicator='cpi') Macroeconomic indicator series DataFrame
get_financial_ratios(symbol) Financial statement ratios DataFrame
query(endpoint, params={}) Low-level generic API request dict / list

License

MIT License. See LICENSE for details.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tickerlab-0.1.0.tar.gz (8.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tickerlab-0.1.0-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

Details for the file tickerlab-0.1.0.tar.gz.

File metadata

  • Download URL: tickerlab-0.1.0.tar.gz
  • Upload date:
  • Size: 8.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.24 {"installer":{"name":"uv","version":"0.9.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for tickerlab-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d4b68b4dc4b7e889bf8db49f8900c609f81aaf89eb5f1cbd64894701b48d385c
MD5 d6be74ba190da33dfe8efa3891863954
BLAKE2b-256 4dbcfcc8c92229f0f2c51d0d0ff570891d028140d1526479ce9eb8ad43cdf327

See more details on using hashes here.

File details

Details for the file tickerlab-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: tickerlab-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 8.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.24 {"installer":{"name":"uv","version":"0.9.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for tickerlab-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b043d08720fab61352b285cca6f14154bdc9170cc5d2076fcd9d0a373c982630
MD5 c9b2dfdbe956c0ab2bb94df59300ed86
BLAKE2b-256 302cc7a2ae764edd33114c3167f36314ca410c997344281c03399b0f0967f63b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page