Get fee rate

Retrieves an estimated fee rate for transactions.

POST
/extended/v1/fee_rate

Request Body

application/jsonRequired

Request to fetch fee for a transaction

transactionstring

A serialized transaction

Response Body

Get fee rate information.

TypeScript Definitions

Use the response body type in TypeScript.

fee_rateinteger

Default Response

TypeScript Definitions

Use the response body type in TypeScript.

errorstring
message?string
[key: string]any
curl -X POST "https://api.hiro.so//extended/v1/fee_rate/" \
  -H "Content-Type: application/json" \
  -d '{
    "transaction": "string"
  }'
const body = JSON.stringify({
  "transaction": "string"
})

fetch("https://api.hiro.so//extended/v1/fee_rate/", {
  body
})
package main

import (
  "fmt"
  "net/http"
  "io/ioutil"
  "strings"
)

func main() {
  url := "https://api.hiro.so//extended/v1/fee_rate/"
  body := strings.NewReader(`{
    "transaction": "string"
  }`)
  req, _ := http.NewRequest("POST", url, body)
  req.Header.Add("Content-Type", "application/json")
  res, _ := http.DefaultClient.Do(req)
  defer res.Body.Close()
  body, _ := ioutil.ReadAll(res.Body)

  fmt.Println(res)
  fmt.Println(string(body))
}
import requests

url = "https://api.hiro.so//extended/v1/fee_rate/"
body = {
  "transaction": "string"
}
response = requests.request("POST", url, json = body, headers = {
  "Content-Type": "application/json"
})

print(response.text)
{
  "fee_rate": 0
}
{
  "error": "string",
  "message": "string"
}