跳到主要內容

当前市场温度

获取当前市场温度

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服务端内部错误请重试或联系技术人员处理