Search
 Coin Explorers
Search
 Coin Explorers

Portfolio

Markets

Project Reviews

Founder Stories

Features

Guides

News

Videos

Let’s stay in touch:

News

Getting the full historical dataset for every currency on Binance using the API

Fast and easy way to get the full set of historical data from every cryptocurrency on Binance! Read, update, gather and save data with a single function.

Jun 6, 2019 · 1 min read
  • Share on X
  • Share on Facebook
  • Share on Linkedin
Getting the full historical dataset for every currency on Binance using the API

How: The code will do the following: Check for existing saved data Find difference between the latest saved data (if any) and the newest data Send API calls and append to existing or new DataFrame Save and/or return full DataFrame The only thing you need to do is add your API-key and API-secret to your code, also remember to NEVER share these with anyone. pip install python-binance This is incredibly easy to use, simple call the function in python like this: This is an example of the function simply getting the last 4 minutes of prices (which is a single 5m kline) and updating your data with it.Once downloaded the function will return the entire DataFrame for you to use as you wish, if the argument save is passed as True it’ll save the DataFrame on your computer with the filename “[symbol]-[kline_size]-data.csv” ie. “ICXBTC-5m-data.csv” in the case above. The clever thing about this function though is that it will keep your data up to date at all time. Each time the function is called it will check the latest point of data you’ve downloaded and make sure to fill in the difference if any new data exists! Just call the get_all_binance(“ICXBTC”, “5m”, save = True) each time you’re working with your ICXBTC data to make sure you always have the latest data!


  • Share on X
  • Share on Facebook
  • Share on Linkedin

Related News

Bitcoin has officially entered the Guinness World Records for a number of entries, the first of which is being recognized as the First Decentralized Cryptocurrency
News

Bitcoin has officially entered the Guinness World Records for a number of entries, the first of which is being recognized as the First Decentralized Cryptocurrency

Bitcoin now has multiple entries in the Guinness Book of World Records, including most valuable and the first decentralized cryptocurrency.

Oct 19, 2022

740 Million in Bitcoin exits exchanges, the biggest outflow since June's BTC price crash
News

740 Million in Bitcoin exits exchanges, the biggest outflow since June's BTC price crash

The technical outlook, however, remains bearish for Bitcoin, with the price eyeing a run-down toward $14,000 in Q4/2022.

Oct 18, 2022

Bitcoin Wins the Guinness World Record for First Decentralized Cryptocurrency
News

Bitcoin Wins the Guinness World Record for First Decentralized Cryptocurrency

Bitcoin has been honored as the oldest and most valuable crypto, while El Salvador is recognized as the first country to adopt it as legal tender. 

Oct 18, 2022

 Coin Explorers

PortfolioMarketsProject ReviewsFounder StoriesFeaturesGuidesNewsVideosTerms & ConditionsPrivacy Policy

Powered by

 Coin Explorers

Copyright © 2025 - All Rights Reserved