Skip to main content

FeeReport

FeeReport allows the caller to obtain a report detailing the current fee schedule enforced by the node globally for each channel.

Source: lightning.proto

gRPC

rpc FeeReport (FeeReportRequest) returns (FeeReportResponse);

REST

HTTP MethodPath
GET /v1/fees

Code Samples

const fs = require('fs');
const grpc = require('@grpc/grpc-js');
const protoLoader = require('@grpc/proto-loader');

const GRPC_HOST = 'localhost:10009'
const MACAROON_PATH = 'LND_DIR/data/chain/bitcoin/regtest/admin.macaroon'
const TLS_PATH = 'LND_DIR/tls.cert'

const loaderOptions = {
keepCase: true,
longs: String,
enums: String,
defaults: true,
oneofs: true,
};
const packageDefinition = protoLoader.loadSync('lightning.proto', loaderOptions);
const lnrpc = grpc.loadPackageDefinition(packageDefinition).lnrpc;
process.env.GRPC_SSL_CIPHER_SUITES = 'HIGH+ECDSA';
const tlsCert = fs.readFileSync(TLS_PATH);
const sslCreds = grpc.credentials.createSsl(tlsCert);
const macaroon = fs.readFileSync(MACAROON_PATH).toString('hex');
const macaroonCreds = grpc.credentials.createFromMetadataGenerator(function(args, callback) {
let metadata = new grpc.Metadata();
metadata.add('macaroon', macaroon);
callback(null, metadata);
});
let creds = grpc.credentials.combineChannelCredentials(sslCreds, macaroonCreds);
let client = new lnrpc.Lightning(GRPC_HOST, creds);
let request = {};
client.feeReport(request, function(err, response) {
console.log(response);
});
// Console output:
// {
// "channel_fees": <ChannelFeeReport>,
// "day_fee_sum": <uint64>,
// "week_fee_sum": <uint64>,
// "month_fee_sum": <uint64>,
// }

Messages

lnrpc.FeeReportRequest

Source: lightning.proto

note

This request has no parameters.

lnrpc.FeeReportResponse

Source: lightning.proto

FieldgRPC TypeREST Type
channel_fees
ChannelFeeReport[]array
day_fee_sum
uint64string
week_fee_sum
uint64string
month_fee_sum
uint64string

Nested Messages

lnrpc.ChannelFeeReport

FieldgRPC TypeREST Type
chan_id
uint64string
channel_point
stringstring
base_fee_msat
int64string
fee_per_mil
int64string
fee_rate
doublenumber