Macroeconomic Historical Data
Get historical releases for a specific macroeconomic indicator — actual values, forecasts, previous values, and next release dates.
SDK Links
Python | longport.openapi.FundamentalContext.macroeconomic |
Rust | longport::fundamental::FundamentalContext#macroeconomic |
Go | FundamentalContext.Macroeconomic |
Node.js | FundamentalContext#macroeconomic |
Parameters
SDK method parameters.
| Name | Type | Required | Description |
|---|---|---|---|
| indicator_code | string | YES | Indicator code from macroeconomic_indicators |
| start_date | string | NO | Start date in YYYY-MM-DD format |
| end_date | string | NO | End date in YYYY-MM-DD format |
| limit | int | NO | Max records. Default: 100, max: 100 |
Request Example
Response
Response Example
json
{
"count": 24,
"info": {
"indicator_code": "62267",
"country": "US",
"name": "Non-Farm Payroll",
"periodicity": "Monthly",
"describe": "...",
"importance": 3
},
"data": [
{
"period": "2024-12-01",
"release_at": 1735900200,
"actual_value": "256000",
"previous_value": "212000",
"forecast_value": "165000"
}
]
}Response Status
| Status | Description | Schema |
|---|---|---|
| 200 | Success | MacroeconomicResponse |
| 400 | Bad request | None |
Schemas
MacroeconomicResponse
| Name | Type | Required | Description |
|---|---|---|---|
| info | MacroeconomicIndicator | true | Indicator metadata |
| data | Macroeconomic[] | true | Historical data points |
| count | int | true | Total number of data points |
Macroeconomic
| Name | Type | Required | Description |
|---|---|---|---|
| period | string | true | Statistical period (e.g. 2024-12-01, 2024-Q4) |
| release_at | int | false | Unix timestamp of release datetime |
| actual_value | string | true | Actual released value |
| previous_value | string | true | Previous period value |
| forecast_value | string | true | Market consensus forecast |