<p>You can calculate an average velocity/flow of bitcoin to an address/user by summing all bitcoin received that address/user in a given time period and dividing it by the time period. I think your issue is that you don't have the time each transaction was made. The easiest way to get a rough time (+/- 2 hours) a transaction was made is to look at the timestamp field in the header of the block that transaction was included. So, for example, with if you have the transaction <code>58513acbb340fd24d2b27d8680961196f0363b79f90ee34a974d6593bf64559b</code>, you can get the time of this transaction in bitcoin core by running this command:</p>

<pre><code>&gt;bitcoin-cli getrawtransaction 58513acbb340fd24d2b27d8680961196f0363b79f90ee34a974d6593bf64559b true | jq ".blocktime"
1576581288
</code></pre>

<p>This timestamp is the <a href="https://en.wikipedia.org/wiki/Unix_time" rel="nofollow noreferrer">UNIX epoch timestamp</a> that the miner chose for the block. Bear in mind that miners can choose a timestamp that is off by about up to 2 hours and the block would still be valid, so don't take this the last two/three digits of this timestamp very seriously - this value is mainly used to calculate difficulty adjustments in bitcoin which occurs only about every two weeks. Another way to assign a time to a transaction would be to know when that transaction entered the mempool but that information can be extremely hard or impossible to get a posteriori and can have less practical meaning than the block timestamp.</p>

<p>With an approximate instant when each transaction was made, you can group all transactions done in a day or week, for example, and divide the total bitcoin amount by the time period. To calculate the acceleration takes two consecutive velocities and divide them by the time period again.</p>

<p>Be careful not to confuse the <a href="https://en.wikipedia.org/wiki/Velocity_of_money" rel="nofollow noreferrer">velocity of money</a>, which is an economic concept, with the velocity that you are trying to calculate which is specific to your data set.</p>

CC BY-SA 4.0
2019-12-17T13:03:24.817Z
I appreciate your help.
Actually I have the timestamp of each transaction, and I already grouped all transactions by week. May I know what do you mean by takes two consecutive velocities and is it possible to divide all weely grouped transactions by week means by 7
Thank you so much
Alkaser
CC BY-SA 4.0
2019-12-17T13:17:09.153Z
It depends on what units you want to use. If you have your velocities in [BTC/week] you can have your acceleration in [BTC/week^2] and for that you just need to subtract one velocity by the preceding velocity to get the acceleration, buf if you want your acceleration in [BTC/day^2] you should divide the velocity difference in [BTC/day] per 7 days. It's more like a physics question than a bitcoin one.
Pedro
CC BY-SA 4.0
2019-12-17T12:26:34.820Z
2019-12-17T12:56:43.733Z
2019-12-17T12:56:43.733Z
Pedro
<p>I am working on a Bitcoin project and I would like to extract the following features</p>

<p>1- Average velocity: represents the speed with which bitcoins flow to a user</p>

<p>2- Average acceleration: represents the acceleration of bitcoin flow to a user</p>

<p>I have the following attributes:</p>

<ul>
<li>user ID ( represents the user)</li>
<li>the total number of transaction (e.g 100 transactions)</li>
<li>the total value of Bitcoin transferred (e.g 10000 BTC)</li>
<li>the date of each transaction (represents the date of each
transaction)</li>
</ul>

<p>Can you please help me how to calculate the velocity and acceleration?</p>

<p>Thank you for any help you can provide</p>

<p>Regards, </p>

<p>Khaled</p>

CC BY-SA 4.0
2019-12-17T06:51:42.740Z
This question makes no real sense - acceleration and velocity have no meaning when talking about Bitcoin. What are you trying to achieve?
Raghav Sood
CC BY-SA 4.0
2019-12-17T07:11:57.720Z
I'm trying to extract features from bitcoin dataset, I have linked between the addresses, transactions, and users with their relative values and times. I.ve aggregated the total of transaction value belong to a single user and extracted total amount, average in_amount, average out_amount, max and min, and in_degree and out_degree. So, now I want to calculate the acceleration and velocity of bitcoins flow to a user. I found this solution but I am not sure: Transaction velocity can be calculated by dividing the number of bitcoin transaction volume by the number of bitcoin in circulating. Tq
Alkaser
<bitcoind>
How to calculate the Average velocity and the Average acceleration of Bitcoin transactions
Alkaser
# How to calculate the Average velocity and the Average acceleration of Bitcoin transactions

(Asked by: username_0 on 2019-12-17)

I am working on a Bitcoin project and I would like to extract the following features

1- Average velocity: represents the speed with which bitcoins flow to a user

2- Average acceleration: represents the acceleration of bitcoin flow to a user

I have the following attributes:

* user ID ( represents the user)
* the total number of transaction (e.g 100 transactions)
* the total value of Bitcoin transferred (e.g 10000 BTC)
* the date of each transaction (represents the date of each
  transaction)

Can you please help me how to calculate the velocity and acceleration?

Thank you for any help you can provide

Regards,

Khaled

**Tags:** bitcoind

> **Comments:**
> **username_1**: This question makes no real sense - acceleration and velocity have no meaning when talking about Bitcoin. What are you trying to achieve?  
> **username_0**: I'm trying to extract features from bitcoin dataset, I have linked between the addresses, transactions, and users with their relative values and times. I.ve aggregated the total of transaction value belong to a single user and extracted total amount, average in_amount, average out_amount, max and min, and in_degree and out_degree. So, now I want to calculate the acceleration and velocity of bitcoins flow to a user. I found this solution but I am not sure: Transaction velocity can be calculated by dividing the number of bitcoin transaction volume by the number of bitcoin in circulating. Tq  

---

## 1 answers

### Answer by username_2 on 2019-12-17. Score: 0 | Accepted answer

You can calculate an average velocity/flow of bitcoin to an address/user by summing all bitcoin received that address/user in a given time period and dividing it by the time period. I think your issue is that you don't have the time each transaction was made. The easiest way to get a rough time (+/- 2 hours) a transaction was made is to look at the timestamp field in the header of the block that transaction was included. So, for example, with if you have the transaction 58513acbb340fd24d2b27d8680961196f0363b79f90ee34a974d6593bf64559b, you can get the time of this transaction in bitcoin core by running this command:
>bitcoin-cli getrawtransaction 58513acbb340fd24d2b27d8680961196f0363b79f90ee34a974d6593bf64559b true | jq ".blocktime"
1576581288

This timestamp is the UNIX epoch timestamp that the miner chose for the block. Bear in mind that miners can choose a timestamp that is off by about up to 2 hours and the block would still be valid, so don't take this the last two/three digits of this timestamp very seriously - this value is mainly used to calculate difficulty adjustments in bitcoin which occurs only about every two weeks. Another way to assign a time to a transaction would be to know when that transaction entered the mempool but that information can be extremely hard or impossible to get a posteriori and can have less practical meaning than the block timestamp.
With an approximate instant when each transaction was made, you can group all transactions done in a day or week, for example, and divide the total bitcoin amount by the time period. To calculate the acceleration takes two consecutive velocities and divide them by the time period again.
Be careful not to confuse the velocity of money, which is an economic concept, with the velocity that you are trying to calculate which is specific to your data set.

> **Comments:**
> **username_0**: I appreciate your help. Actually I have the timestamp of each transaction, and I already grouped all transactions by week. May I know what do you mean by takes two consecutive velocities and is it possible to divide all weely grouped transactions by week means by 7 Thank you so much  
> **username_2**: It depends on what units you want to use. If you have your velocities in [BTC/week] you can have your acceleration in [BTC/week^2] and for that you just need to subtract one velocity by the preceding velocity to get the acceleration, buf if you want your acceleration in [BTC/day^2] you should divide the velocity difference in [BTC/day] per 7 days. It's more like a physics question than a bitcoin one.  

---

