# Libraries Python for CryptoLab
Website: https://www.crypto-lab.io
Documentation: https://www.crypto-lab.io/documentation
Swagger: https://www.crypto-lab.io/swagger
Git: https://github.com/crypto-lab-io/client-libraries
## Python
Install library from Pypi ```pip install cryptolab```
Sample to use it to replay data
```python
import cryptolab
# Init lib with api key
cl = cryptolab.CryptoLab('{YOUR_API_KEY}', on_error)
# Init the raplayer with the parameters
cl.init_replayer(event, '{EXCHANGE}', '{MARKET}', '{START_DATE}', '{END_DATE}')
# Replay On event - callback
def event(self, trade, message=None):
if(message):
print(message)
if(trade):
print(trade)
# add you algorithm here to backtest your strategy
# On event error
def on_error(message):
print(message) # ex: quota reached, data not avaible, plan inactive, etc.
```
![Logo](https://1.gravatar.com/avatar/5121577298f39a1661507198f8615319a7d7a14fad36f9ec52d20ae0d446bf69?size=128)
Raw data
{
"_id": null,
"home_page": "https://www.crypto-lab.io",
"name": "Cryptolab",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "cryptolab backtest cryptocurrency cryptocurrencies api bitcoin binance gateio",
"author": "CryptoLab, Charles",
"author_email": "contact@crypto-lab.io",
"download_url": "https://files.pythonhosted.org/packages/7c/1f/77dcecdd5066c9901ed842e468f805ea0ace8f799e8222abec9485bd276a/Cryptolab-0.0.5.tar.gz",
"platform": null,
"description": "# Libraries Python for CryptoLab\r\nWebsite: https://www.crypto-lab.io \r\nDocumentation: https://www.crypto-lab.io/documentation \r\nSwagger: https://www.crypto-lab.io/swagger\r\nGit: https://github.com/crypto-lab-io/client-libraries \r\n\r\n## Python\r\nInstall library from Pypi ```pip install cryptolab```\r\n\r\nSample to use it to replay data \r\n```python\r\nimport cryptolab\r\n\r\n# Init lib with api key\r\ncl = cryptolab.CryptoLab('{YOUR_API_KEY}', on_error)\r\n\r\n# Init the raplayer with the parameters\r\ncl.init_replayer(event, '{EXCHANGE}', '{MARKET}', '{START_DATE}', '{END_DATE}')\r\n\r\n# Replay On event - callback\r\ndef event(self, trade, message=None):\r\n\r\n if(message):\r\n print(message)\r\n\r\n if(trade):\r\n print(trade)\r\n # add you algorithm here to backtest your strategy\r\n\r\n# On event error\r\ndef on_error(message):\r\n print(message) # ex: quota reached, data not avaible, plan inactive, etc.\r\n```\r\n\r\n\r\n![Logo](https://1.gravatar.com/avatar/5121577298f39a1661507198f8615319a7d7a14fad36f9ec52d20ae0d446bf69?size=128)\r\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Cryptolab library to replay historic data",
"version": "0.0.5",
"project_urls": {
"Documentation": "https://www.crypto-lab.io/documentation",
"Homepage": "https://www.crypto-lab.io",
"Icon": "https://1.gravatar.com/avatar/5121577298f39a1661507198f8615319a7d7a14fad36f9ec52d20ae0d446bf69?size=512",
"Source Code": "https://github.com/crypto-lab-io/client-libraries"
},
"split_keywords": [
"cryptolab",
"backtest",
"cryptocurrency",
"cryptocurrencies",
"api",
"bitcoin",
"binance",
"gateio"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "b3785a63c6f7d8c5ca892cf3a1cb4f7c9b134bbd2efc962bc3e6524f6194ad52",
"md5": "091a7c79ea593159992bb938a7852fe4",
"sha256": "0d2212ed89a91a8f4a291dd0a71742d65bc41b5b6ec6334d3e5d7bb012443bef"
},
"downloads": -1,
"filename": "Cryptolab-0.0.5-py3-none-any.whl",
"has_sig": false,
"md5_digest": "091a7c79ea593159992bb938a7852fe4",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 1730,
"upload_time": "2024-08-30T19:34:37",
"upload_time_iso_8601": "2024-08-30T19:34:37.966100Z",
"url": "https://files.pythonhosted.org/packages/b3/78/5a63c6f7d8c5ca892cf3a1cb4f7c9b134bbd2efc962bc3e6524f6194ad52/Cryptolab-0.0.5-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "7c1f77dcecdd5066c9901ed842e468f805ea0ace8f799e8222abec9485bd276a",
"md5": "c7592901e1ecf247ad15a50752e53b88",
"sha256": "8c5e7952ffb941787b76a73c34bb6aaa643bed703adab3972b82762ccedce945"
},
"downloads": -1,
"filename": "Cryptolab-0.0.5.tar.gz",
"has_sig": false,
"md5_digest": "c7592901e1ecf247ad15a50752e53b88",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 1753,
"upload_time": "2024-08-30T19:34:39",
"upload_time_iso_8601": "2024-08-30T19:34:39.987496Z",
"url": "https://files.pythonhosted.org/packages/7c/1f/77dcecdd5066c9901ed842e468f805ea0ace8f799e8222abec9485bd276a/Cryptolab-0.0.5.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-08-30 19:34:39",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "crypto-lab-io",
"github_project": "client-libraries",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "cryptolab"
}