<blockquote>
  <p>i need to know that what will I be charged by the network.</p>
</blockquote>

<p>The network doesn't charge you, you decide what to pay the miners, and the miners determine if your transaction fee is high enough to include in the next block or not (since they get the transaction fees).</p>

<p>It doesn't look like Blockchain.info has an API for estimating the fee (it is an estimate, since it is primarily based on transaction volume, it varies). But, you can use another api such as <a href="https://bitcoinfees.earn.com/api" rel="nofollow noreferrer">earn.com</a> to estimate a fee rate (in satoshi/B):</p>

<h2>Get Market Fee Rate</h2>

<p><strong>Recommended Transaction Fees</strong>
<a href="https://bitcoinfees.earn.com/api/v1/fees/recommended" rel="nofollow noreferrer">https://bitcoinfees.earn.com/api/v1/fees/recommended</a></p>

<p>Example response:</p>

<pre><code>{ "fastestFee": 40, "halfHourFee": 20, "hourFee": 10 }
</code></pre>

<p><strong>fastestFee</strong>: The lowest fee (in satoshis per byte) that will currently result in the fastest transaction confirmations (usually 0 to 1 block delay).<br>
<strong>halfHourFee</strong>: The lowest fee (in satoshis per byte) that will confirm transactions within half an hour (with 90% probability).<br>
<strong>hourFee</strong>: The lowest fee (in satoshis per byte) that will confirm transactions within an hour (with 90% probability).</p>

<h2>Estimate Fee</h2>

<p>Without knowing the transaction size, you might have to guess. Something with 1 input, and 2 outputs (one for change) might be around 250B.</p>

<p><code>fee = feerate * tx_size</code></p>

<h2>Make Payment</h2>

<p>Then, you can set the fee property when you make a payment. </p>

<p><strong><a href="https://www.blockchain.com/api/blockchain_wallet_api" rel="nofollow noreferrer">Making Outgoing Payments</a></strong></p>

<p>Send bitcoin from your wallet to another bitcoin address. All transactions include a 0.0001 BTC miners fee.</p>

<p>All bitcoin values are in Satoshi i.e. divide by 100000000 to get the amount in BTC. The Base URL for all requests: <a href="https://blockchain.info/merchant/" rel="nofollow noreferrer">https://blockchain.info/merchant/</a>$guid/. $guid should be replaced with your Blockchain Wallet identifier (found on the login page).</p>

<p><a href="http://localhost:3000/merchant/" rel="nofollow noreferrer">http://localhost:3000/merchant/</a>$guid/payment?password=$main_password&amp;second_password=$second_password&amp;to=$address&amp;amount=$amount&amp;from=$from&amp;fee=$fee</p>

<ul>
<li>$main_password Your Main Blockchain Wallet password</li>
<li>$second_password Your second Blockchain Wallet password if double encryption is enabled.</li>
<li>$to Recipient Bitcoin Address.</li>
<li>$amount Amount to send in satoshi.</li>
<li>$from Send from a specific Bitcoin Address (Optional)</li>
<li>$fee Transaction fee value in satoshi (Must be greater than default fee) (Optional)</li>
</ul>

<p>Response: 200 OK, application/json</p>

<pre><code>{ "message" : "Response Message" , "tx_hash": "Transaction Hash", "notice" : "Additional Message" }

{ "message" : "Sent 0.1 BTC to 1A8JiWcwvpY7tAopUkSnGuEYHmzGYfZPiq" , "tx_hash" : "f322d01ad784e5deeb25464a5781c3b20971c1863679ca506e702e3e33c18e9c" , "notice" : "Some funds are pending confirmation and cannot be spent yet (Value 0.001 BTC)" }
</code></pre>

CC BY-SA 4.0
2018-09-22T06:29:59.077Z
but if you send btc from blockchain.info website it charge less than 0.0001 btc depends upon transaction size... so is 0.0001 btc is static size for every transaction?
Muhammad Ahsan Ayaz Khan
CC BY-SA 4.0
2018-09-22T13:10:57.053Z
It is the minimum fee, but you can pay more if your transaction is not getting confirmed.
JBaczuk
CC BY-SA 4.0
2018-09-20T13:21:16.403Z
2018-09-20T13:21:16.403Z
JBaczuk
<p>Blockchain.info offers a fee API: <a href="https://api.blockchain.info/mempool/fees" rel="nofollow noreferrer">https://api.blockchain.info/mempool/fees</a>
The response looks something like this: <code>{"limits":{"min":1,"max":75},"regular":3,"priority":50}</code>. To calculate the transaction fee multiply either the value for <code>regular</code> or <code>priority</code> by your transaction size.</p>

CC BY-SA 4.0
2019-07-16T21:09:46.340Z
2019-07-16T21:09:46.340Z
0xb10c
<p>I am using blockchain.info API to send payments. but i need to know that what will I be charged by the network. So any way to get the network fee with specific amount to sent.. or how to generate it to show to user.</p>

<transaction-fees><blockchain.info><api><bitcoin-wallet-app>
How to estimate/get network fees via blockchain.info API?
Muhammad Ahsan Ayaz Khan
# How to estimate/get network fees via blockchain.info API?

(Asked by: username_0 on 2018-09-20)

I am using blockchain.info API to send payments. but i need to know that what will I be charged by the network. So any way to get the network fee with specific amount to sent.. or how to generate it to show to user.

**Tags:** transaction-fees, blockchain.info, api, bitcoin-wallet-app


---

## 2 answers

### Answer by username_1 on 2018-09-20. Score: 4

i need to know that what will I be charged by the network.

The network doesn't charge you, you decide what to pay the miners, and the miners determine if your transaction fee is high enough to include in the next block or not (since they get the transaction fees).
It doesn't look like Blockchain.info has an API for estimating the fee (it is an estimate, since it is primarily based on transaction volume, it varies). But, you can use another api such as earn.com to estimate a fee rate (in satoshi/B):
Get Market Fee Rate
Recommended Transaction Fees
https://bitcoinfees.earn.com/api/v1/fees/recommended
Example response:
{ "fastestFee": 40, "halfHourFee": 20, "hourFee": 10 }

fastestFee: The lowest fee (in satoshis per byte) that will currently result in the fastest transaction confirmations (usually 0 to 1 block delay).
halfHourFee: The lowest fee (in satoshis per byte) that will confirm transactions within half an hour (with 90% probability).
hourFee: The lowest fee (in satoshis per byte) that will confirm transactions within an hour (with 90% probability).
Estimate Fee
Without knowing the transaction size, you might have to guess. Something with 1 input, and 2 outputs (one for change) might be around 250B.
fee = feerate * tx_size
Make Payment
Then, you can set the fee property when you make a payment. 
Making Outgoing Payments
Send bitcoin from your wallet to another bitcoin address. All transactions include a 0.0001 BTC miners fee.
All bitcoin values are in Satoshi i.e. divide by 100000000 to get the amount in BTC. The Base URL for all requests: https://blockchain.info/merchant/$guid/. $guid should be replaced with your Blockchain Wallet identifier (found on the login page).
http://localhost:3000/merchant/$guid/payment?password=$main_password&second_password=$second_password&to=$address&amount=$amount&from=$from&fee=$fee

$main_password Your Main Blockchain Wallet password
$second_password Your second Blockchain Wallet password if double encryption is enabled.
$to Recipient Bitcoin Address.
$amount Amount to send in satoshi.
$from Send from a specific Bitcoin Address (Optional)
$fee Transaction fee value in satoshi (Must be greater than default fee) (Optional)

Response: 200 OK, application/json
{ "message" : "Response Message" , "tx_hash": "Transaction Hash", "notice" : "Additional Message" }

{ "message" : "Sent 0.1 BTC to 1A8JiWcwvpY7tAopUkSnGuEYHmzGYfZPiq" , "tx_hash" : "f322d01ad784e5deeb25464a5781c3b20971c1863679ca506e702e3e33c18e9c" , "notice" : "Some funds are pending confirmation and cannot be spent yet (Value 0.001 BTC)" }

> **Comments:**
> **username_0**: but if you send btc from blockchain.info website it charge less than 0.0001 btc depends upon transaction size... so is 0.0001 btc is static size for every transaction?  
> **username_1**: It is the minimum fee, but you can pay more if your transaction is not getting confirmed.  

---

### Answer by username_2 on 2019-07-16. Score: 4

Blockchain.info offers a fee API: <https://api.blockchain.info/mempool/fees>
The response looks something like this: `{"limits":{"min":1,"max":75},"regular":3,"priority":50}`. To calculate the transaction fee multiply either the value for `regular` or `priority` by your transaction size.


---

