GithubHelp home page GithubHelp logo

ertosns / historic_crypto Goto Github PK

View Code? Open in Web Editor NEW

This project forked from david-woroniuk/historic_crypto

0.0 0.0 0.0 38 KB

An open source Python library for scraping Historical Cryptocurrency data.

License: MIT License

Python 100.00%

historic_crypto's Introduction

Historic Crypto

Downloads Downloads

An open source Python library for the collection of Historical Cryptocurrency data.

This library interacts with the CoinBase Pro API to:

  • List the Cyptocurrency Pairs available through the API.
  • Return Live Data from the API
  • Return historical data from the API in a Pandas DataFrame.

The HistoricalData class returns all attributes (Open, Close, High, Low, Volume) of the selected Cryptocurrency, whilst the Cryptocurrencies class returns all Cryptocurrencies available through the API, with a 'coin_search' parameter if the user wishes to check if that Coin ID is available.

Installation

From Python:

pip install Historic-Crypto
from Historic_Crypto import HistoricalData
from Historic_Crypto import Cryptocurrencies
from Historic_Crypto import LiveCryptoData

Usage

Cryptocurrencies

If you are unsure of the correct 'ticker' to search for:

pip install Historic-Crypto
from Historic_Crypto import Cryptocurrencies

Cryptocurrencies().find_crypto_pairs()

Returns a Pandas DataFrame containing the columns "id" and "display_name" and "status", with the "id" column indicating the search term which should be queried by the other classes within the package.

Additionally, a number of optional arguments can be added:

Argument Description
coin_search search for a specific cryptocurrency string (str) Default = None.
extended_output displays either a condensed or extended output (Bool) Default = False.
verbose prints status messages (Bool) Default = True.
pip install Historic-Crypto
from Historic_Crypto import Cryptocurrencies

data = Cryptocurrencies(coin_search = 'XLM', extended_output=False).find_crypto_pairs()

HistoricalData

Once you know the ticker which you would like to search for, you can search for it using the HistoricalData class.

pip install Historic-Crypto
from Historic_Crypto import HistoricalData

new = HistoricalData('ETH-USD',300,'2020-06-01-00-00').retrieve_data()

The arguments for the class are listed below:

Argument Description
ticker supply the ticker information which you want to return (str).
granularity please supply a granularity in seconds (60, 300, 900, 3600, 21600, 86400) (int).
start_date a string in the format YYYY-MM-DD-HH-MM (str).
end_date a string in the format YYYY-MM-DD-HH-MM (str). Optional, Default: Now
verbose printing during extraction. Default: True

LiveCryptoData

If you want to see the current Bid/Ask of a specific Cryptocurrency:

pip install Historic-Crypto
from Historic_Crypto import LiveCryptoData

new =  LiveCryptoData('ATOM-USD').return_data()

Returns a Pandas DataFrame 'data', which contains the trade_id, price, size, bid, ask and volume of the previous transaction, indexed by timestamp.

The arguments for the class are listed below:

Argument Description
ticker information for which the user would like to return (str).
verbose print progress during extraction (bool). Default:True

historic_crypto's People

Contributors

david-woroniuk avatar ertosns avatar leonshams avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.