SeedData Python SDK
SeedData is a Python client SDK for accessing SeedData market data services.
This package only contains the client SDK. The server-side gateway and worker components are not included in this PyPI distribution.
Installation
pip install seeddata-quant
Quick Start
import seeddata as sd
sd.set_token("YOUR_TOKEN")
result = sd.query("SELECT * FROM trade_date LIMIT 5")
print(result.df)
Common APIs
import seeddata as sd
sd.set_token("YOUR_TOKEN")
df = sd.get_klines(
instruments=["000001.SZ"],
fields=["close"],
start_time="2024-01-01",
end_time="2024-01-31",
period="1d",
adjust="none",
market_type="cn_stock",
)
realtime_1min = sd.query(
"SELECT * FROM cn_stock_1min_realtime_data "
"LATEST ON trade_time PARTITION BY ts_code LIMIT 20"
).df
Trading Calendars
Trading calendars are provided by the independent tradecal dependency, installed
with seeddata-quant. Queries run locally without network calls.
import tradecal as cal
calendar = cal.get_calendar("XNYS")
calendar.valid_days("2026-06-01", "2026-06-30")
calendar.schedule("2026-11-27", session="extended")
See the tradecal package documentation for supported MICs, APIs, data sources, and strict coverage boundaries.
Token
Non-local SeedData gateways require a token:
sd.set_token("YOUR_TOKEN")
You can also set the token through an environment variable:
export SEEDDATA_TOKEN="YOUR_TOKEN"
A gateway running on your local machine may allow anonymous local access. In
that case the SDK can send requests without sd.set_token(...); the server
decides whether anonymous requests are allowed.
Base URL
By default, the SDK targets the local gateway of a standard SeedData private deployment:
- history:
http://127.0.0.1:28637 - realtime:
http://127.0.0.1:28637
A single gateway serves both history and realtime endpoints, so with the SeedData database package installed on the same machine, the SDK works out of the box. If your gateway runs on another host, point the SDK at it:
sd.set_base_url(
history="http://192.168.1.10:28637",
realtime="http://192.168.1.10:28637",
)
You can set only one side if needed:
sd.set_base_url(history="http://192.168.1.10:28637")
sd.set_base_url(realtime="http://192.168.1.10:28637")
Missing arguments keep their current values. Trailing slashes are removed, and empty values raise an error. This function only configures request URLs and does not check network connectivity.
Server compatibility
This SDK requires a SeedData server of version 0.1.10 or newer. The query API returns results as an Apache Arrow stream; the staged large-result download mode of SDK 1.0.4 is no longer supported. Floating-point query results are returned exactly as stored, without implicit rounding (server 0.1.10 behavior).
License
This package is proprietary software. Installation and use require authorization from SeedData.
Metadata
Release files for seeddata-quant 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| seeddata_quant-1.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Release files / seeddata_quant-1.1.0-py3-none-any.whl
| Download URL | seeddata_quant-1.1.0-py3-none-any.whl |
|---|---|
| Size | 11.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
74bf274d970343776278a4fb5426ccea3c7c8aa912601303f7fc6346cc9fb7ec
|
|
BLAKE2b-256 checksum How to use checksums |
b684d0b310c7bd1d1c01115486dccfa008dbadae36cbbb24d70bf13efbef612c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.15
|
Security for seeddata-quant 1.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.