Skip to content

Search API documentation

Metrics, companies & guides

Start here

Quickstart Authentication API plans & access Bitcoin prices & OHLCV data
Try

Bitcoin Network Fee Estimator API

Live recommended Bitcoin network fees in sat/vB

Request

GET
curl -H "Authorization: Bearer YOUR_TOKEN" "https://newhedge.io/api/v2/network-fees"
curl -H "Authorization: Bearer YOUR_TOKEN" "https://newhedge.io/api/v2/network-fees/quote?vbytes=142"
curl -H "Authorization: Bearer YOUR_TOKEN" "https://newhedge.io/api/v2/network-fees/quote?inputs=1&outputs=2"
Parameters & responses
Query params

Authorization: Bearer YOUR_TOKEN (required) — your 24 character API key with the fee_estimator enterprise feature (also accepted: the X-API-Key header or the api_token query parameter).

Quote size

vbytes — transaction virtual size, takes precedence. Otherwise pass both inputs and outputs to estimate a native P2WPKH size.

Responses

200 on success, 400 for a missing or invalid size, 401 for a missing/invalid token or a token without the feature, 404 when the estimator is not available yet, 429 when the monthly limit is reached.

Plan and quota refusals keep their error texts and add code (plan_required with required_plan enterprise and feature network_fees, or quota_exceeded with limit and resets_at), current_plan and upgrade_url. The 429 for a used-up monthly allowance carries Retry-After, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset. See Errors and plan limits.

Endpoint

Recommended fee rates

Recommended on-chain fee rates in sat/vB by confirmation target: fastest, half hour, hour, economy, and minimum.

LIVE
Endpoint
curl -H "Authorization: Bearer YOUR_TOKEN" "https://newhedge.io/api/v2/network-fees"

Replace YOUR_TOKEN with your API token.

Example response
200 Fictional example
{
  "unit": "sat/vB",
  "fastest": 12.2,
  "half_hour": 8.1,
  "hour": 6.4,
  "economy": 2.2,
  "minimum": 1.1,
  "updated_at": "2025-01-01T12:00:00Z"
}
Endpoint

Fee quote for a transaction size

Total fee in sats and USD per confirmation target. The total per tier is ceil(rate × vbytes) in sats.

Endpoint
curl -H "Authorization: Bearer YOUR_TOKEN" "https://newhedge.io/api/v2/network-fees/quote?vbytes=142"

Pass inputs and outputs instead of vbytes to estimate a native P2WPKH size.

Example response
200 Fictional example
{
  "vbytes": 142,
  "btc_usd": 90000.0,
  "targets": {
    "fastest": {
      "sat_vb": 4,
      "sats": 568,
      "usd": 0.51
    },
    "half_hour": {
      "sat_vb": 3,
      "sats": 426,
      "usd": 0.38
    },
    "hour": {
      "sat_vb": 2,
      "sats": 284,
      "usd": 0.26
    }
  }
}
Errors

Error responses

Parameters & responses
400

{"error":"Provide vbytes or both inputs and outputs"}, or an invalid size parameter.

401

{"error":"Token is required"}, {"error":"Invalid token"}, or {"error":"Network fee estimator is not enabled for this account"}.

404

{"error":"Network fee estimator is not available yet"}

429

{"error":"Monthly API calls limit reached"} when the token has used its monthly allowance. The response carries Retry-After, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset; the count resets on the first day of each month, 00:00 UTC.