Author

Topic: How to get fee from incoming transaction? (Read 210 times)

legendary
Activity: 2268
Merit: 18775
May 28, 2019, 09:51:35 AM
#5
So in that case you can take the string of letters and numbers following "txid" and paste it in to a blockchain explorer. Since that is a testnet transaction rather than a real bitcoin transaction, you will have to use a specific testnet explorer. For example: https://blockstream.info/testnet/tx/232871a92c8ba56f043c43c5c663e7cdd832667a12b4a2e13e09fb1997a7563e

As you can see from that page, the fee for that transaction is 1 sat/vByte.
legendary
Activity: 3038
Merit: 4418
Crypto Swap Exchange
The transaction doesn't actually explicitly contain the transaction fees that is included in the transaction. The only parameters that has the amount of Bitcoins is the inputs and the outputs. The network automatically consider any amount that is not included in the output as a fee.

ie. If a transaction has a 0.01 BTC input and a 0.009 BTC output, the fee will be 0.001.

Most of the wallet's interface allows the users to indicate the fee so as to simplify things.
newbie
Activity: 13
Merit: 1
Ok, look


For example, i send from faucet to my wallet! After that i get transaction id and use command "gettransaction" and see object like this
Code:
{
  "amount": 0.01000000,
  "confirmations": 1,
  "blockhash": "00000000000360708fb414b90b0eccaaf8eb12352fc0f59c81b0de15c81f7bb4",
  "blockindex": 279,
  "blocktime": 1559045534,
  "txid": "232871a92c8ba56f043c43c5c663e7cdd832667a12b4a2e13e09fb1997a7563e",
  "walletconflicts": [
  ],
  "time": 1559044936,
  "timereceived": 1559044936,
  "bip125-replaceable": "no",
  "details": [
    {
      "account": "acc = c01278ba-e83c-4230-b492-da5d1f075e62",
      "address": "2NFWv3z97yK3EnAuvve1eomwRqX5YWEpL1M",
      "category": "receive",
      "amount": 0.01000000,
      "label": "acc = c01278ba-e83c-4230-b492-da5d1f075e62",
      "vout": 1
    }
  ],
  "hex": "02000000000101df760e0882e4d8d35ff237d0098604f8bd2fcc9cea17f5508dd7094c6177d999000000001716001456f001f6e6a2761bb89f4707470f88d8e159b022feffffff02012143000000000017a91425d06c996cddafef75d57ed68fea977885a1e82b8740420f000000000017a914f44a7344dd4b58b6fdbcf401bfcb9cefcd0d224a8702473044022002cb69388d3b496b51106fef58c4aa75b75983101fd009c04b264424a06f9f59022021670487a423764625b04ddb7531f3d5d0bd056401077c51bdee51ecdc26775e012102f3984576609def6d6ec2c1813ce7cbecd57207844b93148d044c85e40bac49258c2c1700"
}

but i haven`t fee
legendary
Activity: 2268
Merit: 18775
Your question isn't entirely clear.

If you are looking to see what fee someone has used on an unconfirmed transaction you are waiting to receive, then enter the transaction in to a block explorer such as or https://blockstream.info/ and look for the fee in sats per vByte.

If you are look to set a fee for an incoming transaction, for example it you are creating a QR code to request a specific amount to be sent to an address, then you can't do that. Setting the fee is entirely dependent on the person sending the transaction.
newbie
Activity: 13
Merit: 1
Hi!


How to get fee from incoming transaction because incoming object hasn`t this parameter?
Jump to: