Request
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
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).
vbytes — transaction virtual size, takes precedence. Otherwise pass both inputs and outputs to estimate a native P2WPKH size.
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.
Recommended fee rates
Recommended on-chain fee rates in sat/vB by confirmation target: fastest, half hour, hour, economy, and minimum.
curl -H "Authorization: Bearer YOUR_TOKEN" "https://newhedge.io/api/v2/network-fees"
Replace YOUR_TOKEN with your API token.
{
"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"
}
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.
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.
{
"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
}
}
}
Error responses
Parameters & responses
{"error":"Provide vbytes or both inputs and outputs"}, or an invalid size parameter.
{"error":"Token is required"}, {"error":"Invalid token"}, or {"error":"Network fee estimator is not enabled for this account"}.
{"error":"Network fee estimator is not available yet"}
{"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.