# 宏观经济历史数据

`GET` `/v2/quote/macrodata`

获取指定宏观经济指标的历史发布数据，包括实际值、预测值、前值和下次发布时间。

## Parameters

### Query Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `indicator_code` | string | Yes | 来自 `macroeconomic_indicators` 的指标代码 |
| `start_date` | string | No | 开始日期，`YYYY-MM-DD` 格式 |
| `end_date` | string | No | 结束日期，`YYYY-MM-DD` 格式 |
| `offset` | integer | No | 分页偏移量。默认：0 |
| `limit` | integer | No | 最大记录数。默认：100，最大：100 |

## Request Example

```bash
curl --request GET \
  --url 'https://openapi.longbridge.com/v2/quote/macrodata?indicator_code=<indicator_code>' \
  --header 'Authorization: Bearer <access_token>'
```

## Response

### Response Properties

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `info` | MacroeconomicIndicator | Yes | 指标元数据 |
| `data` | Macroeconomic[] | Yes | 历史数据点 |
| `count` | int | Yes | 数据点总数 |
| `period` | string | Yes | 统计周期（如 `2024-12-01`、`2024-Q4`） |
| `release_at` | int | No | 发布时间的 Unix 时间戳 |
| `actual_value` | string | Yes | 实际公布值 |
| `previous_value` | string | Yes | 上一周期值 |
| `forecast_value` | string | Yes | 市场一致预期 |

### Response JSON Example

```json
{
  "count": 24,
  "info": {
    "indicator_code": "61744",
    "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"
    }
  ]
}
```
