<p>Transaction fees are paid when transacting, not when trading, or at least not necessarily.</p>
<p>Assuming you're trading on an exchange site, you will have an account there. You can buy and sell BTC for other currencies, but all that is happening is that the exchange credits your account with what you buy, and removes it from the seller's account. This process does not involve any interaction with the Bitcoin network; it's all just updating numbers in the exchange's database of accounts.</p>
<p>The exchange may charge trading fees for offering this service, but the details of that would depend on what site/service you use, and the amounts involved. Some exchanges offer multiple fee tiers based on your trading activity.</p>
<p>There <em>are</em> transaction fees involved once you decide to withdraw your BTC from the exchange to a wallet you control yourself. The exchange may eat those for you, or they may charge you for them. Some exchanges may themselves charge a withdrawal fee on top of the BTC network transaction fee. The transaction fee is independent of the amount transferred; it depends on the complexity of the transaction, and that depends on how the exchange chooses to dispatch their withdrawals as Bitcoin transactions.</p>
<p>Once BTC are in your own wallet, and you want to use them, you will be the one to pay transaction fees. Typical transactions are around 150-250 vbytes in size. At 20 sats/vbyte, a 200 vbyte transaction would cost 4000 sats or 0.0004 BTC. Again, this value is largely independent of the amount transacted.</p>

CC BY-SA 4.0
2022-05-01T07:27:44.033Z
thank you for the clarification,
but knowing what you have told me, any idea how i can get the trading fees from a specific  exchange?
Grim Ranger
CC BY-SA 4.0
2022-05-01T12:46:21.577Z
That will depend on the exchange. Usually these numbers are listed on their website.
Pieter Wuille
CC BY-SA 4.0
2022-05-01T01:31:41.093Z
2022-05-01T01:31:41.093Z
Pieter Wuille
<p>so im noob on all of this so bare with me.<br>
im trying to test the possible net revenue of a trading algorithm/bot,
but i dont trust it enough to test it with real money, so im going to simulate how much money it would make, by finding out the transaction fees for each buy/ sell.
now ive read about it online and all i seem to find stuff like :</p>
<pre><code>https://bitcoinfees.earn.com/api/v1/fees/recommended
output:
{ &quot;fastestFee&quot;: 40, &quot;halfHourFee&quot;: 20, &quot;hourFee&quot;: 10 }
</code></pre>
<p>which seems to be in satoshis per byte,
so if i wanted to buy 1 btc at that time, how much would the fee be ?
or is there another API or service i can use ?
thanx</p>

<bitcoin-core><transaction-fees><blockchain.info><api>
how can I get the fee percentage on buying or selling a specific amount of bitcoin at any time?
Grim Ranger
# how can I get the fee percentage on buying or selling a specific amount of bitcoin at any time?

(Asked by: username_0 on 2022-05-01)

so im noob on all of this so bare with me.  
im trying to test the possible net revenue of a trading algorithm/bot,
but i dont trust it enough to test it with real money, so im going to simulate how much money it would make, by finding out the transaction fees for each buy/ sell.
now ive read about it online and all i seem to find stuff like :

```
https://bitcoinfees.earn.com/api/v1/fees/recommended
output:
{ "fastestFee": 40, "halfHourFee": 20, "hourFee": 10 }

```

which seems to be in satoshis per byte,
so if i wanted to buy 1 btc at that time, how much would the fee be ?
or is there another API or service i can use ?
thanx

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


---

## 1 answers

### Answer by username_1 on 2022-05-01. Score: 3

Transaction fees are paid when transacting, not when trading, or at least not necessarily.

Assuming you're trading on an exchange site, you will have an account there. You can buy and sell BTC for other currencies, but all that is happening is that the exchange credits your account with what you buy, and removes it from the seller's account. This process does not involve any interaction with the Bitcoin network; it's all just updating numbers in the exchange's database of accounts.

The exchange may charge trading fees for offering this service, but the details of that would depend on what site/service you use, and the amounts involved. Some exchanges offer multiple fee tiers based on your trading activity.

There *are* transaction fees involved once you decide to withdraw your BTC from the exchange to a wallet you control yourself. The exchange may eat those for you, or they may charge you for them. Some exchanges may themselves charge a withdrawal fee on top of the BTC network transaction fee. The transaction fee is independent of the amount transferred; it depends on the complexity of the transaction, and that depends on how the exchange chooses to dispatch their withdrawals as Bitcoin transactions.

Once BTC are in your own wallet, and you want to use them, you will be the one to pay transaction fees. Typical transactions are around 150-250 vbytes in size. At 20 sats/vbyte, a 200 vbyte transaction would cost 4000 sats or 0.0004 BTC. Again, this value is largely independent of the amount transacted.

> **Comments:**
> **username_0**: thank you for the clarification, but knowing what you have told me, any idea how i can get the trading fees from a specific  exchange?  
> **username_1**: That will depend on the exchange. Usually these numbers are listed on their website.  

---

