API for montly and weekly averages
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, 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&amp;end=2018-07-01