Skip to main content

Python SDK for Gangtise OpenAPI

Project description

gangtise-openapi

Python SDK for Gangtise OpenAPI. Feature-parity with the npm CLI gangtise-openapi-cli v0.14.2 across 73 endpoints.

Install

pip install gangtise-openapi

Requires Python 3.10+.

Configure

export GANGTISE_ACCESS_KEY=ak_xxx
export GANGTISE_SECRET_KEY=sk_xxx

(Or pass access_key= and secret_key= explicitly to GangtiseClient.) The token cache file at ~/.config/gangtise/token.json is shared with the npm CLI.

Quickstart

from gangtise_openapi import gangtise

# Tabular endpoints return a pandas DataFrame
df = gangtise.quote.day_kline(
    security="000001.SH",
    start_date="2026-01-01",
    end_date="2026-01-31",
)

# Use raw=True to get the underlying dict/list
result = gangtise.insight.opinion_list(industry=1, size=20, raw=True)

# Async
import asyncio

async def main():
    df = await gangtise.async_.quote.day_kline(security="000001.SH")

asyncio.run(main())

Endpoints

The SDK exposes 73 endpoints across 9 domains:

  • gangtise.auth.* — login, status
  • gangtise.lookup.* — local lookup tables (research areas, brokers, industries, ...)
  • gangtise.reference.* — securities search (GTS codes)
  • gangtise.insight.* — opinions, research reports, announcements, schedules
  • gangtise.quote.* — K-line, real-time quotes
  • gangtise.fundamental.* — financial statements, valuation, holders, forecasts
  • gangtise.ai.* — AI-generated insights (one-pager, peer comparison, earnings reviews, ...)
  • gangtise.vault.* — personal drive, meeting records, stock pools, WeChat
  • gangtise.alternative.* — economic indicators (EDB)

See the npm CLI README for endpoint-by-endpoint documentation; the Python wrappers accept the same parameters as the CLI flags (snake_case instead of --kebab-case).

License

MIT

Project details


Download files

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

Source Distribution

gangtise_openapi-0.1.0.tar.gz (40.1 kB view details)

Uploaded Source

Built Distribution

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

gangtise_openapi-0.1.0-py3-none-any.whl (54.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: gangtise_openapi-0.1.0.tar.gz
  • Upload date:
  • Size: 40.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for gangtise_openapi-0.1.0.tar.gz
Algorithm Hash digest
SHA256 fb7cf1670fe6a56e867b0b5bb22e460ecc201d44e6e7b1d908d8e3a2487049bb
MD5 54ea63d027a674829962a24e92ec4b13
BLAKE2b-256 a46b2b930a55a7a0f8018f3365a022df1394291e7888c0e1b545b59d82203257

See more details on using hashes here.

Provenance

The following attestation bundles were made for gangtise_openapi-0.1.0.tar.gz:

Publisher: release.yml on gangtiser/gangtise-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

File hashes

Hashes for gangtise_openapi-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 dac72097bef005987d9afce191473c18955ab0ce2e83216a2a420a17f1ebc7cf
MD5 c61259b6c4c55591787e8c06c9260319
BLAKE2b-256 d5b820b97bc4ce45689eeb40018be3cdb16aacb9ffc7b4f93cacaf60b2eaae2d

See more details on using hashes here.

Provenance

The following attestation bundles were made for gangtise_openapi-0.1.0-py3-none-any.whl:

Publisher: release.yml on gangtiser/gangtise-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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