# SwapHunt Macro Event History

> SwapHunt Macro Event History is a paid API for AI agents from x402.swaphunt.dev, paid per call via x402, $0.005/call, status unknown (last checked 2026-09-15).

Returns historical macroeconomic events with actual vs. estimated values so users can analyze market surprise effects and backtest event-driven strategies.

## Facts

- Endpoint: GET https://x402.swaphunt.dev/v1/events/macro/history
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/swaphunt-macro-event-history-bb4e3ce0
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_HsGNTZa7s5Oa6UsR9aatO

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability swaphunt-macro-event-history-bb4e3ce0
```

Example prompt: Pull the historical macro events for the US over the last 90 days — I want to see which ones came in above or below forecast so I can study how markets reacted to surprises like CPI and NFP.

## When to prefer this

Use this endpoint when you need historical macroeconomic event data with actual vs. estimate comparisons for backtesting event-driven trading strategies or studying market reactions to economic surprises. Prefer this over forward-looking endpoints when you need past release data with surprise values rather than upcoming scheduled events.

## Known failure modes

- Invalid date format returns 400 — must use ISO YYYY-MM-DD
- Unknown country code returns empty results or 400
- days parameter out of supported range may return partial data or error
- Payment not processed (x402 flow failure) returns 402
- No events in specified range returns empty array

## How this service works

Historical macro events with actual vs estimate values (e.g. CPI came in above/below forecast). Use to study how markets reacted to surprises and to backtest event-driven strategies.

## Output

A list of historical macroeconomic events with their scheduled dates, country, event name (e.g. CPI, NFP, FOMC), the consensus estimate, the actual reported value, and the surprise direction/magnitude. Useful for identifying market-moving surprises and building backtests.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "properties": {
      "days": {
       "type": "integer",
       "default": 30,
       "description": "Days back"
      },
      "country": {
       "type": "string",
       "description": "Country filter (e.g. US)"
      },
      "end_date": {
       "type": "string",
       "description": "ISO date YYYY-MM-DD"
      },
      "start_date": {
       "type": "string",
       "description": "ISO date YYYY-MM-DD"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/swaphunt-macro-event-history-bb4e3ce0/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402.swaphunt.dev](https://www.zero.xyz/host/x402.swaphunt.dev/llms.txt)
