1

Suppose I want to find the VWAP of BTC-USD in a specific exchange (e.g. Bitstamp) at a specific point in time (e.g. 1/1/2013 00:00:00).

What's an easy way to do this?

2

VWAP isn't calculated at a specific point in time, it is calculated over a period of time (commonly 24 hours or 30 days). A "24-hour VWAP at 1/1/2013 00:00:00" is actually the VWAP over the period from 12/31/2013 00:00:00 to 1/1/2013 00:00:00.

To calculate it, you'd want to use the exchange's API to get a list of the trades that were executed on the exchange during this period, where for each trade you have the execution price and the amount of BTC traded.

You then find the average of the price, weighted by volume; that it, you multiply each price with the corresponding amount, sum all these values, and divide it by the sum of all amounts traded.

Other sources can provide you with the needed data using their API, such as http://bitcoincharts.com/.

Bitcoincharts also offers this information via its web interface. For Bitstamp data, for example, go to http://bitcoincharts.com/charts/bitstampUSD, and click on "Load raw data" below the graph. You will get a table with each interval (day by default) and its "Weighted Price" in the last column. If the default chart does not contain the date you are interest in, you can change the date range with the "Time Period" control at the top.

  • Thanks, I am aware that a VWAP is defined over a period. Is there a page on bitcoincharts where I can choose a date and easily find that exact VWAP for that date? – ripper234 Aug 30 '13 at 6:55
  • @ripper234: ETA. If that's what you wanted all along, you should have said "find" rather than "calculate". – Meni Rosenfeld Aug 30 '13 at 10:34
  • What do you mean by "ETA"? You're correct, I'll edit my question. – ripper234 Aug 30 '13 at 18:30
  • 1
    @ripper234: ETA = Edited to add, it means I edited my answer to address your clarified question. – Meni Rosenfeld Aug 31 '13 at 18:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.