<p>I would not rely on vol or vol_cur as they are computing data in a way you do not want from data which is available to you.</p>

<p>My recommendation would be to save the data of individual trades using btc-e API function TradeHistory. You can run a loop which would take the first result returned and using the timestamp as the parameter "end" for the next API call. Be aware that you will receive this and other transactions with the same timestamp in duplicate (so be sure to check the record doesn't exist in your db before adding it).</p>

<p>This way, you can write your own scripts to get your own averages and volumes over any time period you want :)</p>

CC BY-SA 3.0
2014-04-07T17:35:47.983Z
thanks for the reply. while that's a possible work around i'd like to avoid having to do that. the api i posted above replies with a 'vol' entry - what is it's purpose?  comparing btc-e's volume on their homepage and bitcoinwisdom for the same time frame (30min) for the same date/time, they are off by quite a bit (btce says 3k while bitcoinwisdom says 8k)

i'm really confused.
user2079531
CC BY-SA 3.0
2014-04-07T17:54:26.830Z
I'm sorry I have also not been able to figure out what these values are exactly, which is why I use methods such as the one I have recommended. Hopefully someone else will have the answer to this.
Mark
CC BY-SA 3.0
2014-04-07T16:42:45.870Z
2014-04-07T16:42:45.870Z
Mark
<p>I agree with Mark, you should use the TradeHistory method. but to answer the other question, according to YoBit.net api docs (most btc exchanges use very similar api):</p>
<blockquote>
<p>vol: traded volume</p>
<p>vol_cur: traded volume in currency</p>
</blockquote>
<p>So &quot;vol&quot; is the volume of the counter currency (the second one in the pair, USD in this case)</p>
<p>and &quot;vol_cur&quot; is the volume in the base currency (the first in the pair, LTC in this case)</p>

CC BY-SA 3.0
2017-05-02T15:53:04.140Z
2017-05-02T15:53:04.140Z
2020-06-16T11:10:03.350Z
Jonathon Hoaglin
<p>I've been logging data from BTC-E for a couple of months now and am writing my own charting app for personal use. I've been stumped for a while now on what the difference between "vol" and "vol_cur" is and how to determine the volume for any given interval I want (1min, 60min, 2month, etc):</p>

<p><a href="https://btc-e.com/api/2/ltc_usd/ticker" rel="nofollow">https://btc-e.com/api/2/ltc_usd/ticker</a></p>

<pre><code>{"ticker":{"high":11.976,"low":11.35,"avg":11.663,"vol":2147898.06418,"vol_cur":184074.26807,"last":11.35,"buy":11.35,"sell":11.32,"updated":1396883318,"server_time":1396883319}}
</code></pre>

<p>Subtracting the "vol" values from the end of my interval to the start sometimes yields negative numbers:</p>

<pre><code>id |   timestamp_open    |   timestamp_close   |   open   |  close  |   high   |   low    |    volume
----+---------------------+---------------------+----------+---------+----------+----------+--------------
2 | 2014-02-15 18:00:00 | 2014-02-15 18:30:00 | 16.05385 | 15.9761 | 16.0675  | 15.9761  | -62044.90371
3 | 2014-02-15 18:30:00 | 2014-02-15 19:00:00 | 15.9761  | 16.049  | 16.05385 | 15.94642 | -40416.73599
4 | 2014-02-15 19:00:00 | 2014-02-15 19:30:00 | 15.94652 | 16.002  | 16.05385 | 15.935   | 32560.39743
5 | 2014-02-15 19:30:00 | 2014-02-15 20:00:00 | 16.002   | 16.05   | 16.05    | 16       | 31619.54125
6 | 2014-02-15 20:00:00 | 2014-02-15 20:30:00 | 16.03175 | 15.999  | 16.0532  | 15.9     | -10595.7155
7 | 2014-02-15 20:30:00 | 2014-02-15 21:00:00 | 15.999   | 15.997  | 15.999   | 15.94    | 61109.18234
8 | 2014-02-15 21:00:00 | 2014-02-15 21:30:00 | 15.997   | 16.132  | 16.25    | 15.997   | -33001.28287
</code></pre>

<p>The price did not close down so it is not representative of volume indicative of selling; how do I properly calculate the volume for an interval?</p>

<api><btce>
BTC-E API and determining volume for any time interval
user2079531
# BTC-E API and determining volume for any time interval

(Asked by: username_0 on 2014-04-07)

I've been logging data from BTC-E for a couple of months now and am writing my own charting app for personal use. I've been stumped for a while now on what the difference between "vol" and "vol\_cur" is and how to determine the volume for any given interval I want (1min, 60min, 2month, etc):

<https://btc-e.com/api/2/ltc_usd/ticker>

```
{"ticker":{"high":11.976,"low":11.35,"avg":11.663,"vol":2147898.06418,"vol_cur":184074.26807,"last":11.35,"buy":11.35,"sell":11.32,"updated":1396883318,"server_time":1396883319}}

```

Subtracting the "vol" values from the end of my interval to the start sometimes yields negative numbers:

```
id |   timestamp_open    |   timestamp_close   |   open   |  close  |   high   |   low    |    volume
----+---------------------+---------------------+----------+---------+----------+----------+--------------
2 | 2014-02-15 18:00:00 | 2014-02-15 18:30:00 | 16.05385 | 15.9761 | 16.0675  | 15.9761  | -62044.90371
3 | 2014-02-15 18:30:00 | 2014-02-15 19:00:00 | 15.9761  | 16.049  | 16.05385 | 15.94642 | -40416.73599
4 | 2014-02-15 19:00:00 | 2014-02-15 19:30:00 | 15.94652 | 16.002  | 16.05385 | 15.935   | 32560.39743
5 | 2014-02-15 19:30:00 | 2014-02-15 20:00:00 | 16.002   | 16.05   | 16.05    | 16       | 31619.54125
6 | 2014-02-15 20:00:00 | 2014-02-15 20:30:00 | 16.03175 | 15.999  | 16.0532  | 15.9     | -10595.7155
7 | 2014-02-15 20:30:00 | 2014-02-15 21:00:00 | 15.999   | 15.997  | 15.999   | 15.94    | 61109.18234
8 | 2014-02-15 21:00:00 | 2014-02-15 21:30:00 | 15.997   | 16.132  | 16.25    | 15.997   | -33001.28287

```

The price did not close down so it is not representative of volume indicative of selling; how do I properly calculate the volume for an interval?

**Tags:** api, btce


---

## 2 answers

### Answer by username_1 on 2014-04-07. Score: 2

I would not rely on vol or vol\_cur as they are computing data in a way you do not want from data which is available to you.

My recommendation would be to save the data of individual trades using btc-e API function TradeHistory. You can run a loop which would take the first result returned and using the timestamp as the parameter "end" for the next API call. Be aware that you will receive this and other transactions with the same timestamp in duplicate (so be sure to check the record doesn't exist in your db before adding it).

This way, you can write your own scripts to get your own averages and volumes over any time period you want :)

> **Comments:**
> **username_0**: thanks for the reply. while that's a possible work around i'd like to avoid having to do that. the api i posted above replies with a 'vol' entry - what is it's purpose?  comparing btc-e's volume on their homepage and bitcoinwisdom for the same time frame (30min) for the same date/time, they are off by quite a bit (btce says 3k while bitcoinwisdom says 8k)  i'm really confused.  
> **username_1**: I'm sorry I have also not been able to figure out what these values are exactly, which is why I use methods such as the one I have recommended. Hopefully someone else will have the answer to this.  

---

### Answer by username_2 on 2017-05-02. Score: 1

I agree with Mark, you should use the TradeHistory method. but to answer the other question, according to YoBit.net api docs (most btc exchanges use very similar api):

> vol: traded volume
>
> vol\_cur: traded volume in currency

So "vol" is the volume of the counter currency (the second one in the pair, USD in this case)

and "vol\_cur" is the volume in the base currency (the first in the pair, LTC in this case)


---

