Skip to main content

Lixinger SDK for Python (Unofficial)

Project description

lixinger

理杏仁 Python SDK (非官方).

包含以下功能:

  • 自动将请求结果转换结果为 Dataframe.
  • 根据官方文档中的返回结果定义, 验证请求结果, 对缺少的列进行补齐, 对列类型进行相应转换.
  • 支持一次性获取时间范围大于 10 年的数据.
  • 适当缓存请求结果, 减少请求 API 次数.
  • 遇到网络错误时, 自动重试请求.

安装

pip install lixinger

用法

获取 Token

Token 获取地址为 https://www.lixinger.com/open/api/token.

调用 API

使用文档请参考 理杏仁开放平台.

方法导入路径可以根据文档中的请求 URL 得出, 例如下面代码中对应的请求 URL 为 /api/cn/company 则把 / 换成 . 即可.

from lixinger.utils import set_token
from lixinger.api.cn.company.base import get_company

# 设置 Token
set_token("your_token")

# 获取股票详细信息
company = get_company(stock_codes=["600519"])
print(company)

将会看到以下输出内容:

  stock_code market            ipo_date  ... mutual_markets  name        fs_type
0     600519      a 2001-08-26 16:00:00  ...             ha  贵州茅台  non_financial

[1 rows x 7 columns]

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

lixinger-0.1.11.tar.gz (11.9 kB view details)

Uploaded Source

Built Distribution

lixinger-0.1.11-py3-none-any.whl (21.6 kB view details)

Uploaded Python 3

File details

Details for the file lixinger-0.1.11.tar.gz.

File metadata

  • Download URL: lixinger-0.1.11.tar.gz
  • Upload date:
  • Size: 11.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: pdm/2.6.1 CPython/3.9.13

File hashes

Hashes for lixinger-0.1.11.tar.gz
Algorithm Hash digest
SHA256 7a1c5d6660763dd9d390e16d1d3fedff61555bb540e4cda1db039d32e459fcce
MD5 d30ee1834b8bdcd8088f0d60a117f3fa
BLAKE2b-256 b3ed0988ddda7b28bd72fc0c840f0533073b43faacb06de9f5915503d2e78c56

See more details on using hashes here.

File details

Details for the file lixinger-0.1.11-py3-none-any.whl.

File metadata

  • Download URL: lixinger-0.1.11-py3-none-any.whl
  • Upload date:
  • Size: 21.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: pdm/2.6.1 CPython/3.9.13

File hashes

Hashes for lixinger-0.1.11-py3-none-any.whl
Algorithm Hash digest
SHA256 da71abf751eac8ff32b23e072d7fa4b0eb94d04be3873597d790351eda53bba7
MD5 3d2056225250e0c358c2b142acb1bd4c
BLAKE2b-256 7447d3ac0db6d4eadaffa0c27044c586fe96a95ad05f326d4a21105375d53bf8

See more details on using hashes here.

Supported by

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