<p>I have not heard about an API that would return averages per se. But there are APIs that will provide you with a historical price data which you can use to calculate averages on your own. </p>

<p>One example would be <a href="https://www.coindesk.com/api/" rel="nofollow noreferrer">CoinDesk</a>, but I am pretty sure there are more. They have a JSON endpoint that will return closing prices for a given period (1 month by default). Examples:</p>

<p>Default (one months period): <a href="https://api.coindesk.com/v1/bpi/historical/close.json" rel="nofollow noreferrer">https://api.coindesk.com/v1/bpi/historical/close.json</a></p>

<p>Custom date range: <a href="https://api.coindesk.com/v1/bpi/historical/close.json?start=2018-01-01&amp;end=2018-07-01" rel="nofollow noreferrer">https://api.coindesk.com/v1/bpi/historical/close.json?start=2018-01-01&amp;end=2018-07-01</a></p>

CC BY-SA 4.0
2018-07-22T20:37:18.647Z
2018-07-22T20:37:18.647Z
slashrsm
<p>Bitcoinwisdom shows in their charts lines for weekly and montly averages. Are these numbers somewhere available in an API? If so, one could setup an automated strategy for trading BTC based on this data.</p>

CC BY-SA 3.0
2018-01-19T17:23:08.070Z
You can get the price data using the API of the exchange you want to trade at. You can then do any calculations based on that data and place orders.
Tanmay
<api><script>
API for montly and weekly averages
Theo
# API for montly and weekly averages

(Asked by: username_0 on 2017-01-13)

Bitcoinwisdom shows in their charts lines for weekly and montly averages. Are these numbers somewhere available in an API? If so, one could setup an automated strategy for trading BTC based on this data.

**Tags:** api, script

> **Comments:**
> **username_1**: You can get the price data using the API of the exchange you want to trade at. You can then do any calculations based on that data and place orders.  

---

## 1 answers

### Answer by username_2 on 2018-07-22. Score: 1

I have not heard about an API that would return averages per se. But there are APIs that will provide you with a historical price data which you can use to calculate averages on your own.

One example would be [CoinDesk](https://www.coindesk.com/api/), but I am pretty sure there are more. They have a JSON endpoint that will return closing prices for a given period (1 month by default). Examples:

Default (one months period): <https://api.coindesk.com/v1/bpi/historical/close.json>

Custom date range: <https://api.coindesk.com/v1/bpi/historical/close.json?start=2018-01-01&end=2018-07-01>


---

