blockchainRelayFee

Rostrum Electrum for Bitcoin Cash

Overview

The blockchain.relayfee method queries the minimum transaction fee required for a low-priority transaction to be accepted into the daemon's memory pool. This fee is crucial for users who need to minimize transaction costs while ensuring their transaction is processed.

Returns

The method returns the minimum relay fee required in whole coin units (e.g., BTC, not satoshis for Bitcoin) as a floating-point number.

FieldDescription
feeThe minimum relay fee in coin units.

Example Results

1e-05
0.0

Request Example

curl --location 'https://api.tatum.io/v3/blockchain/node/rostrum-mainnet/' \
--header 'Content-Type: application/json' \
--header 'x-api-key: {API_KEY}' \
--data '{
    "method": "blockchain.relayfee",
    "params": [],
    "id": 1,
    "jsonrpc": "2.0"
}'
// yarn add @tatumio/tatum

import { TatumSDK, Rostrum, Network } from "@tatumio/tatum";

const rostrum = await TatumSDK.init<Rostrum>({ network: Network.ROSTRUM_MAINNET });

const relayFee = await tatum.rpc.getRelayFee();

console.log('Relay Fee:', relayFee);

await rostrum.destroy(); // Destroy Tatum SDK - needed for stopping background jobs when done