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?
Bitcoin Stack Exchange is a question and answer site for Bitcoin crypto-currency enthusiasts. It only takes a minute to sign up.Sign up to join this community
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.