Introduction to the Data Collector open-crypto
This is a short introduction to the package called open-crypto. The program offers generalized REST-API requests to over 100 of the largest and most liquid cryptocurrency exchanges and several well-known platforms. To this point, the program can request (see examples below):
- Ticker data
- Transaction data
- Historical-Rate data
- Order-Book data
- Aggreg. Platform data
We offer an open-source tool which fits the needs for unprocessed and aggregated data in a new, fast, flexible and in many cases unexplored industry. Along with this short introduction we provide several examples to execute listed at the end.
Prerequisites
Getting started
For installation, execute:
pip install open-crypto
in your command prompt. Ensure to set the Python executable as path variable. This can be selected during the installation process.
Run the program
The program is initialized using a configuration file. In order to keep things simple, we offer several exemplary configurations, one for each request method.
In order to make adjustments, all files and collected data will be copied to your current working directory, including the configuration, exchange mappings, log files and database(s). Therefore run the module in the desired directory.
The module runner offers several functionalities to control the program:
>>>runner.check_path() # check if resources are in your working directory.
>>>runner.update_maps() # download the lastest exchanges mappings from the GitHub repository
>>>runner.copy_resources() # copy the resources into the currency working directory
>>>runner.get_session() # return an open database connection.
>>>runner.exchanges_and_methods() # return all implemented exchanges and their supported API endpoints.
>>>runner.get_config() # print a specified or the actual configuration file
>>>runner.get_config_template() # return an empty configuration file to the resource directory.
>>>runner.export() # allow exporting data from the database into csv/hdf-files.
>>>runner.run() # start the program.
To start the data collector, open Python within your working directory of choice and import the program:
>>>from open_crypto import runner
>>>runner.update_maps()
Updating exchange mappings from GitHub.. 100%
The first command will import the module runner. Within runner the function update_maps will download the latest exchange mappings from GitHub and (if the folder already exists overwrite) all resources into your working directory.
Personalized requests can be made by first creating a new configuration file template:
>>>runner.get_config_template()
Created new config template.
The file can be found under: [your/cwd]/resources/configs/user_configs/request_template.yaml. Open and manipulate the file with a text editor of choice. Consider renaming the file accordingly.
Finally, read in the file and execute the program:
>>>from open_crypto import runner
>>>runner.run()
Enter config file name: <your_file_name>
For a first impression, consider executing the following examples before creating personalized tasks.
Examples
By default, several example scripts are offered and can easily be executed:
- exchange_listings()
- static()
- trades()
- order_books()
- platform()
- minute_candles()
To run open_crypto with one of the mentioned configuration files:
>>>from open_crypto import runner
>>>runner.Examples.minute_candles()
Note that all examples will result in a plot of the received data. Furthermore, especially static, exchange_listings may take several minutes.
Release files for open-crypto 3.9.9.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| open-crypto-3.9.9.1.tar.gz | 144.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| open_crypto-3.9.9.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 375.0 kB
Release files / open-crypto-3.9.9.1.tar.gz
| Download URL | open-crypto-3.9.9.1.tar.gz |
|---|---|
| Size | 144.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3ca20853146672e52dca4e46bc830f455aa56d2949235a70db36986525a5db9b
|
|
BLAKE2b-256 checksum How to use checksums |
11d2767d952c7732af61c44682993486f5b1f7c172ed6dba42077b7e44352520
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.8
|
Release files / open_crypto-3.9.9.1-py3-none-any.whl
| Download URL | open_crypto-3.9.9.1-py3-none-any.whl |
|---|---|
| Size | 230.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4f643c5645014db86eb399946da8b87f9767627089bb4087db080d51095ef96c
|
|
BLAKE2b-256 checksum How to use checksums |
0a0424241eb7c65cd9a7574316a63d5d675fbdcb00fce16caddfc59c7787a325
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.8
|