个股实时 Tick

公开接口

实时行情 Tick · 个股实时 Tick

按证券代码读取采集端写入的最新 Tick 快照,用于盘中监控与即时涨跌幅计算。tick_type 用于区分股票、ETF 与指数三类标的。

接口地址

GET /cn/stock/tick
完整地址:https://api.databull.cn/cn/stock/tick

接口说明

按证券代码读取采集端写入 Redis 的最新 Tick 快照。

返回前会剔除 timetag、pvolume、askPrice/askVol、bidPrice/bidVol 等字段;代码长度不在 4~8 或缓存缺失时返回空对象 {}。

请求参数

参数位置类型必填默认说明
symbol查询string否600519证券代码(裸码,不带交易所后缀),如 600519
tick_type查询string否stockTick 类型,可选 stock / etf / index

返回字段

字段类型说明
lastPricenumber最新价
open / high / lownumber开盘价 / 最高价 / 最低价
lastClosenumber昨收价
volume / amountnumber成交量 / 成交额
其他字段—由采集端决定;接口只做透传

接口示例

cURL
curl "https://api.databull.cn/cn/stock/tick?symbol=600519&tick_type=stock" \
  -H "Authorization: Bearer $DATABULL_API_KEY"
Python
from databull import DataBull

client = DataBull(api_key="YOUR_API_KEY")
result = client.get_last_tick(symbol="600519", tick_type="stock")
print(result)

响应示例

JSON
{
  "lastPrice": 1580.5,
  "open": 1572.0,
  "high": 1588.0,
  "low": 1570.2,
  "lastClose": 1575.3,
  "volume": 21300,
  "amount": 336500000.0
}

说明

  • 返回前会剔除以下字段:timetag、pvolume、settlementPrice、stockStatus、openInt、lastSettlementPrice、askPrice、askVol、bidPrice、bidVol,因此不含盘口买卖档。
  • 证券代码长度必须在 4~8 之间,否则直接返回空对象;缓存中没有该标的时同样返回 {}。
  • 非交易时段返回的是上一交易日的收盘快照。