Stock Data
Stock Data API
Query base stock market data including stock lists, indices, bonds, trade calendar, and adjust factors.
| Method | Endpoint | Description |
|---|---|---|
| GET | /v1/stock/list | Stock list |
| GET | /v1/stock/index/list | Index list |
| GET | /v1/stock/bond/list | Convertible bond list |
| GET | /v1/stock/calendar | Trade calendar |
| GET | /v1/stock/adjust-factor | Adjust factor history |
1. Stock List
Get list of all A-share stocks.
Endpoint
| Method | Endpoint |
|---|---|
| GET | /v1/stock/list |
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
status | int | - | - | Listing status (1=normal, 0=delisted) |
stock_type | string | - | - | Type filter (主板/创业板/科创板/北交所) |
limit | int | - | 100 | Max records (1-5000) |
offset | int | - | 0 | Pagination offset |
Try It
GET
/v1/stock/listCode Examples
Python
import requests
API_KEY = "your_api_key"
response = requests.get(
"https://tickerlab.org/v1/stock/list",
params={"limit": 100, "status": 1},
headers={"X-API-Key": API_KEY}
)
data = response.json()
print(f"Total stocks: {data['count']}")
for stock in data['data'][:5]:
print(f"{stock['stock_code']}: {stock['stock_name']}")
cURL
curl -H "X-API-Key: your_key" \
"https://tickerlab.org/v1/stock/list?limit=100&status=1"
Response Example
{
"status": "ok",
"count": 100,
"data": [
{
"stock_code": "sh.600000",
"stock_name": "浦发银行",
"status": 1,
"list_date": "1999-11-10",
"stock_type": "主板"
}
]
}
2. Index List
Get list of stock indices.
Endpoint
| Method | Endpoint |
|---|---|
| GET | /v1/stock/index/list |
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
market | string | - | - | Market filter |
limit | int | - | 100 | Max records |
Try It
GET
/v1/stock/index/list3. Bond List
Get list of convertible bonds.
Endpoint
| Method | Endpoint |
|---|---|
| GET | /v1/stock/bond/list |
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
limit | int | - | 100 | Max records |
Try It
GET
/v1/stock/bond/list4. Trade Calendar
Get exchange trade calendar.
Endpoint
| Method | Endpoint |
|---|---|
| GET | /v1/stock/calendar |
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
exchange | string | - | - | Exchange (SSE/SZSE) |
start_date | string | - | - | Start date (YYYY-MM-DD) |
end_date | string | - | - | End date |
is_trading_day | int | - | - | Filter by trading day (1=yes, 0=no) |
limit | int | - | 365 | Max records |
Try It
GET
/v1/stock/calendarResponse Example
{
"status": "ok",
"count": 30,
"data": [
{
"exchange": "SSE",
"date": "2024-01-02",
"is_trading_day": 1
}
]
}
5. Adjust Factor
Get stock adjust factors for forward/backward price adjustment.
Endpoint
| Method | Endpoint |
|---|---|
| GET | /v1/stock/adjust-factor |
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
stock_code | string | ✅ | - | Stock code (e.g., sh.600000) |
start_date | string | - | - | Start date |
end_date | string | - | - | End date |
limit | int | - | 1000 | Max records |
Try It
GET
/v1/stock/adjust-factorResponse Example
{
"status": "ok",
"count": 30,
"data": [
{
"stock_code": "sh.600000",
"date": "2024-01-02",
"fore_adjust_factor": 1.234,
"back_adjust_factor": 0.812
}
]
}