Federal Deficit

U.S. federal government surplus or deficit from FRED, showing the fiscal balance in dollars and plotted alongside Bitcoin price.

How to call

Request format

GET
curl -X GET "https://newhedge.io/api/v2/metrics/federal-deficit/METRIC_NAME?api_token=YOUR_TOKEN"
Query params

api_token (required) — 24 character token.

resolution (optional) — day1 (default), hour12, hour4, hour1, 30mn, 10mn. Finer buckets are served to Advanced and Enterprise accounts; see Resolutions.

before (optional) — exclusive cursor, returns observations older than this timestamp_ms. Finer resolutions only.

limit (optional) — page size for finer resolutions. Default 2500, maximum 5000. Ignored for day1.

Path params

:metric_name — one of the metric names listed below.

Responses

200 with JSON payload, 401 for missing/invalid token, 404 for missing resources.

Metrics

Each metric is fetched independently. Responses are trimmed samples to show structure.

1 metrics
Metric

Federal Deficit Usd

Data used by the Federal Deficit chart.

Endpoint
https://newhedge.io/api/v2/metrics/federal-deficit/federal_deficit_usd?api_token=YOUR_TOKEN

Replace `YOUR_TOKEN` with your API token.

Sample response
200 Successful response
[
  [
    1759017600000,
    -1815377.0
  ],
  [
    1759104000000,
    -1815377.0
  ],
  [
    1759190400000,
    -1774684.0
  ]
]