Skip to content

GET /api/v1/stock/spot

Real-time A-Share spot data snapshot.

Returns real-time spot data for A-Share stocks including price, change, volume, and valuation metrics.

Request

GET /api/v1/stock/spot

Headers

HeaderValue
F-API-KEYYour API key

Query Parameters

ParameterTypeRequiredFilterDescription
codestringNoexactStock code
industrystringNoexactIndustry name
sourcestringNoexactData source
namestringNolikeStock name (fuzzy match)
limitintegerNoMax rows per page (default 100, max 1000)
offsetintegerNoRows to skip (default 0)
sortstringNoSort field (default code)
orderasc | descNoSort direction (default asc)

Example

Terminal window
curl -H "F-API-KEY: fk-xxxxx" \
"https://finance-api.xp-java.workers.dev/api/v1/stock/spot?industry=半导体&limit=10"

Response

{
"code": 0,
"message": "ok",
"data": [
{
"code": "688981",
"name": "中芯国际",
"latest_price": 58.35,
"change_pct": 2.15,
"change_amount": 1.23,
"volume": 125000000,
"amount": 7290000000,
"amplitude": 3.82,
"high": 59.10,
"low": 56.88,
"open": 57.20,
"pre_close": 57.12,
"volume_ratio": 1.45,
"turnover": 3.2,
"pe_ttm": 85.4,
"pb": 3.12,
"market_cap": 465000000000,
"industry": "半导体",
"source": "eastmoney",
"updated_at": "2024-12-31T15:00:00Z"
}
],
"meta": {
"total": 156,
"limit": 10,
"offset": 0,
"has_more": true
}
}