Loading...
Loading...
Real-time A-share market quote inquiry. Batch obtain real-time securities quotes from Shanghai, Shenzhen, and Beijing Stock Exchanges. Triggered when users ask about "Moutai real-time price", "Shanghai-Shenzhen real-time market", "A-share quotes", "current stock price".
npx skill4agent add hubblevision/hubble-data-service-skill cn-realtime-quoteAll interfaces are V2 version ()./api/v2/...
BASE="http://43.167.234.49:3101"
AUTH=(-H "X-API-Key: 123456" -H "Content-Type: application/json")| Rule | Value |
|---|---|
| Parameter Name | |
| Code Format | Pure numbers, without exchange suffix |
| Single Request Limit | 500 codes |
| Separator | English comma |
| Market | Example |
|---|---|
| Shanghai Stock Exchange (SH) | |
| Shenzhen Stock Exchange (SZ) | |
| Beijing Stock Exchange (BJ) | |
600519.SHSH600519sh600519| Parameter | Type | Required | Description |
|---|---|---|---|
| string | Yes | Securities codes, separated by commas (e.g., |
| string | No | Return fields, separated by commas (returns all if not provided) |
# Query single stock
curl -sS "${AUTH[@]}" "$BASE/api/v2/cnstock/securities?codes=600519"
# Batch query
curl -sS "${AUTH[@]}" "$BASE/api/v2/cnstock/securities?codes=600519,000001,300750"
# Query specified fields only
curl -sS "${AUTH[@]}" "$BASE/api/v2/cnstock/securities?codes=600519&fields=price,chgPct,volume"
# Parallel query for multiple stocks
curl -sS "${AUTH[@]}" "$BASE/api/v2/cnstock/securities?codes=600519" &
curl -sS "${AUTH[@]}" "$BASE/api/v2/cnstock/securities?codes=000001" &
wait{
"success": true,
"data": {
"600519": {
"name": "Kweichow Moutai",
"price": 1688.50,
"chgPct": 1.25,
"volume": 3500000,
"high": 1695.00,
"low": 1675.00,
"open": 1680.00
}
},
"timestamp": 1710865200000
}| Error | Cause | Fix |
|---|---|---|
| Empty data returned | | Use pure numbers: |
| 400 | Invalid API key | Contact administrator to check API Key |
| No data for some codes | Code does not exist or has been delisted | Verify if the code is correct |