blockchain – Bitcoin transaction using API with custom rates

I want to transfer Bitcoin from one individual address to another using API. But I want to set the transaction fees according to my requirement. So, how can I do it?

Right now I am using blockchain-transaction – npm api to transfer bitcoin from one address to another. So please, put some lights on this.

var bitcoinTransaction = require (& # 39; bitcoin-transaction & # 39;);
// Send all my money from wallet1 to wallet2 in the bitcoin testnet
var from = "mm3gdVh8n6YtcNyaTKYkveB6yTME7aDWNJ";
var a = "mgPUfqJk4X6gE4P5Do5RfpkTFsYmsSjCya";
var privKeyWIF = "cNZi8iySqBToXMpcsQaHKD5uv7HExBQJBSi4dTg3ZPaEzeNAzvbj"; // Private key in WIF format (you can generate this from bitcoinlib-js)
bitcoinTransaction.getBalance (from, {network: "testnet"}). Then ((balanceInBTC) => {
return bitcoinTransaction.sendTransaction ({
since
to
privKeyWIF: privKeyWIF,
btc: balanceInBTC,
network: "testnet"
});
});