Historical data manager for cryptos.
Project description
Coindata
Take one snapshot, use all data as cached.
Use it for machine learning, vector prediction or for whatever you like. Be my guest.
How this works?
You take one snapshot, and access hundreds of cryptos without slowing down.
Basically, this program parses all historical data, stores/caches at CSV files through running a snapshot. When you access through this package, requesting a data vector, calculates what coinmarketcap doesn’t give you, like circulation supply, daily percentage change, datetime object etc. and returns the vector.
If you want, you can use .csv files seperately.
File structure:
source-code: coindata: snapshots: CSV files tickers: JSON files
Install
Install with pip or clone, both works.
$ pip install coindata
---- or ----
$ git clone git@github.com:anaxilaus/coindata
$ python coindata/setup.py install
Modules
There are 3 modules you will use:
snapshot parser request
Update cache with snapshot
Note: It will ask for a snapshot at initial import, and show you the progress, write out the cache path.
>>> coindata.snapshot.take()
Get data with parser
>>> coindata.parser.vector_of('btc')
[
. . .
[ 'Date': string,
'Open*': float,
'High': float,
'Low': float,
'Close**': float,
'Volume': float,
'Market Cap': float,
# additional info below #
'date': datetime.object,
'circulation': decimal,
'change': float ]
. . .
]
Get specific with request
You don’t need to use if you don’t want to get specific. API related operations. ( write, read, retrieve without writing, get ticker etc. )
Note: I recommend caching with snapshot.
# write all history of one $indicator to $where as CSV file
>>> coindata.request.write($indicator, $where)
Get documentation for more with built-in help() or read the code.
Important Notes
+ Symbol, name and case doesn't matter.
btc = BTC = bitcoin = BITCOIN
+ Based on USD.
+ Date notation is ISO8601 in CSV files. .. code:: python
>>> coindata.ISO8601 "%Y-%m-%d"
Give this a star this if you feel this helped you.
Also, if you want to buy a beer:
BTC: 16XwDdxUaphSX4yWDTTiSfNy2dTyEZ5MLy ETH: 0x35F4B63f7eBBB2E6080F7f9f797A068004faf323 LTC: LdukNLZqzeEvvFYMw98L9Rj8AYvP86BhEe
History
1.1 (2019-01-27)
- Major update to data manager
Refactor main.py to request.py
Add snapshot.py and parser.py
Update documentation
1.0 (????-??-??)
First release
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for coindata-1.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 438a8737c8a00f06c696dbcf69133bb574fdccf25ea74aa21bb5f0945cb16a39 |
|
MD5 | 40bb72293dd69744359ad914be13bf37 |
|
BLAKE2b-256 | c32d477357b42a00005aab4af310076448f10535e1c42b10024e4ef3970aa8ce |