跳到主要內容

當前市場溫度

獲取當前市場溫度

SDK Links

Python
longport.openapi.QuoteContext.market_temperature
Rust
longport::quote::QuoteContext#market_temperature
Go
QuoteContext.MarketTemperature
Node.js
QuoteContext#marketTemperature

Request

HTTP MethodGET
HTTP URL/v1/quote/market_temperature

Parameters

NameTypeRequiredDescription
marketstringYES市場,目前支援 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

StatusDescriptionSchema
200返回成功MarketTemperatureResponse
400參數錯誤None

Schemas

MarketTemperatureResponse

NameTypeRequiredDescription
temperatureintegertrue溫度值
descriptionstringtrue溫度描述
valuationintegertrue市場估值
sentimentintegertrue市場情緒
updated_atintegertrue更新時間

錯誤碼

業務錯誤碼描述排查建議
2601500服務端內部錯誤請重試或聯繫技術人員處理