Get Current Market Temperature
SDK Links
Python | longport.openapi.QuoteContext.market_temperature |
Rust | longport::quote::QuoteContext#market_temperature |
Go | QuoteContext.MarketTemperature |
Node.js | QuoteContext#marketTemperature |
Request
| HTTP Method | GET |
| HTTP URL | /v1/quote/market_temperature |
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| market | string | YES | Market, currently supports US, HK, SG, CN |
Request Example
python
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
json
{
"code": 0,
"data": {
"temperature": 50,
"description": "Temperature is moderate, maintaining stability",
"valuation": 23,
"sentiment": 78,
"updated_at": 1744616612
}
}Response Status
| Status | Description | Schema |
|---|---|---|
| 200 | Success | MarketTemperatureResponse |
| 400 | Parameter Error | None |
Schemas
MarketTemperatureResponse
| Name | Type | Required | Description |
|---|---|---|---|
| temperature | integer | true | Temperature value |
| description | string | true | Temperature description |
| valuation | integer | true | Market valuation |
| sentiment | integer | true | Market sentiment |
| updated_at | integer | true | Update time |
Error Codes
| Business Error Code | Description | Troubleshooting |
|---|---|---|
| 2601500 | Server Internal Error | Please retry or contact technical support |