當前市場溫度
獲取當前市場溫度
SDK Links
Python |
Rust |
Go |
Node.js |
Request
HTTP Method | GET |
HTTP URL | /v1/quote/market_temperature |
Parameters
Name | Type | Required | Description |
---|---|---|---|
market | string | YES | 市場,目前支援 US、HK、SG、CN |
Request Example
from longport.openapi import QuoteContext, Config, Market
config = Config.from_env()
ctx = QuoteContext(config)
resp = ctx.market_temperature(Market.US)
print(resp)
Response
Response Headers
- Content-Type: application/json
Response Example
{
"code": 0,
"data": {
"temperature": 50,
"description": "溫度適宜,保持平穩",
"valuation": 23,
"sentiment": 78,
"updated_at": 1744616612
}
}
Response Status
Status | Description | Schema |
---|---|---|
200 | 返回成功 | MarketTemperatureResponse |
400 | 參數錯誤 | None |
Schemas
MarketTemperatureResponse
Name | Type | Required | Description |
---|---|---|---|
temperature | integer | true | 溫度值 |
description | string | true | 溫度描述 |
valuation | integer | true | 市場估值 |
sentiment | integer | true | 市場情緒 |
updated_at | integer | true | 更新時間 |
錯誤碼
業務錯誤碼 | 描述 | 排查建議 |
---|---|---|
2601500 | 服務端內部錯誤 | 請重試或聯繫技術人員處理 |