How to retrieve closing prices of BTC from 2017 to now

Hello,

I am trying to use the API with the binance python connector (GitHub - binance/binance-connector-python: a simple connector to Binance Public API) but the documentation is scattered in several places .

After having look I could not find how to retrieve the historic of the closing prices of BTC (from 2017), any idea ?

Thanks a lot

The documentation can be found here. (Binance Public API Connector Python — binance-connector documentation)

You can use the kline endpoint (Market Endpoints — binance-connector documentation) and query it with the startTime parameter. Take note of rate limits when doing this because there is a limit of 1000 responses for each query, so you probably will have to make multiple queries if you are trying to get data from 2017.
Alternatively you can go to https://data.binance.vision/ to download historical data which are made readily available.

Thank you Chai.