<p><a href="https://github.com/ltftf/binance-historical-data" rel="nofollow noreferrer">https://github.com/ltftf/binance-historical-data</a></p>
<blockquote>
<p>Binance offers two methods to access the historical data: through their API in JSON format or this webpage in CSV format. It's impossible to quickly get historical data for data types like trades and aggTrades with the first method, and it would still require some manual labor to fetch a lot of files with the second method.</p>
<p>This library allows to collect data in CSV format for any date range, any number of symbols and intervals (if present) with a single command.</p>
</blockquote>
<p>Untried.</p>

CC BY-SA 4.0
2024-11-30T16:00:16.903Z
Thank you. It's working. But the utility doesn't allow to export MACD and other indicators data. Of course it can be calculated manually, but I would like to export it to be the same as on Binance.
Andrey I.
CC BY-SA 4.0
2024-12-04T15:33:44.013Z
I'll mark your solution as an answer. And give a little clarification.
This script downloads all necessary data, but some dates may be missing, you need to check this additionally with formulas.
I found it easier to calculate MACD by hand, it is quite easy in Excel.
Andrey I.
CC BY-SA 4.0
2024-11-29T18:15:34.313Z
2024-11-29T18:15:34.313Z
RedGrittyBrick
<p>I need to export data from Binance spot chart: <a href="https://www.binance.com/en/trade/BTC_USDT?type=spot" rel="nofollow noreferrer">https://www.binance.com/en/trade/BTC_USDT?type=spot</a>.</p>
<p>I need data like this:</p>
<ul>
<li>High price</li>
<li>Low price</li>
<li>Open price</li>
<li>Close price</li>
</ul>
<p>I also need MACD indicators:</p>
<ul>
<li>9-day</li>
<li>12-day</li>
<li>26-day</li>
</ul>
<p>Numbers are needed for each week or any other time frame I set. I will also need to export other data like RSI, MFI in the future. And also for other cryptocurrency pairs, not only BTC-USDT. So the solution needs to be scalable.</p>
<p>I do one research, so need this data. I tried this solution: <a href="https://www.binance.com/en/support/faq/how-to-download-historical-market-data-on-binance-5810ae42176b4770b880ce1f14932262" rel="nofollow noreferrer">https://www.binance.com/en/support/faq/how-to-download-historical-market-data-on-binance-5810ae42176b4770b880ce1f14932262</a> - downloaded the data, but it was not what I need.</p>
<p>I need the data in CSV format.</p>
<p>How can I do this in the fastest and easiest way?
Do I have to write a new program or is there already a solution?
<a href="https://i.sstatic.net/f5NYN2t6.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/f5NYN2t6.png" alt="Binance spot" /></a></p>

<historical-trade-data><binance>
How to export data from Binance spot chart?
Andrey I.
# How to export data from Binance spot chart?

(Asked by: username_0 on 2024-11-29)

I need to export data from Binance spot chart: <https://www.binance.com/en/trade/BTC_USDT?type=spot>.

I need data like this:

* High price
* Low price
* Open price
* Close price

I also need MACD indicators:

* 9-day
* 12-day
* 26-day

Numbers are needed for each week or any other time frame I set. I will also need to export other data like RSI, MFI in the future. And also for other cryptocurrency pairs, not only BTC-USDT. So the solution needs to be scalable.

I do one research, so need this data. I tried this solution: <https://www.binance.com/en/support/faq/how-to-download-historical-market-data-on-binance-5810ae42176b4770b880ce1f14932262> - downloaded the data, but it was not what I need.

I need the data in CSV format.

How can I do this in the fastest and easiest way?
Do I have to write a new program or is there already a solution?
[![Binance spot](https://i.sstatic.net/f5NYN2t6.png)](https://i.sstatic.net/f5NYN2t6.png)

**Tags:** historical-trade-data, binance


---

## 1 answers

### Answer by username_1 on 2024-11-29. Score: 1 | Accepted answer

<https://github.com/ltftf/binance-historical-data>

> Binance offers two methods to access the historical data: through their API in JSON format or this webpage in CSV format. It's impossible to quickly get historical data for data types like trades and aggTrades with the first method, and it would still require some manual labor to fetch a lot of files with the second method.
>
> This library allows to collect data in CSV format for any date range, any number of symbols and intervals (if present) with a single command.

Untried.

> **Comments:**
> **username_0**: Thank you. It's working. But the utility doesn't allow to export MACD and other indicators data. Of course it can be calculated manually, but I would like to export it to be the same as on Binance.  
> **username_0**: I'll mark your solution as an answer. And give a little clarification. This script downloads all necessary data, but some dates may be missing, you need to check this additionally with formulas. I found it easier to calculate MACD by hand, it is quite easy in Excel.  

---

