跳转到正文

Python SDK

初始化

python
import seeddata as sd

sd.set_base_url("http://127.0.0.1:18637")
sd.set_token("your_token_here")

SQL 查询

python
df = sd.query(
    """
    SELECT instrument, name, exchange, list_status
    FROM market.cn_stock_basic_info
    WHERE list_status = 'L'
    ORDER BY instrument
    LIMIT 10
    """
).df

实时行情

python
df = sd.get_realtime_quotes(
    instruments=["600000.SH", "000001.SZ"],
    fields=["open", "high", "low", "latest_price", "change_ratio", "amount"],
)

同花顺概念查询

python
concepts = sd.get_stock_concept("000001.SZ")
print(concepts)

seeddata front-end portal