Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

cryptolab

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cryptolab

Cryptolab library to replay historic data

pipPyPI
Version
0.0.1
Maintainers
1

Libraries Python for CryptoLab

Website: https://www.crypto-lab.app
Documentation: https://www.crypto-lab.app/documentation
Swagger: https://www.crypto-lab.app/swagger

Python

Install library from Pypi pip install cryptolab

Sample to use it to replay data

from cryptolab import CryptoLab

# Init lib with api key
cl = CryptoLab('{YOUR_API_KEY}', on_error)

# Init the raplayer with the parameters
cl.init_replayer(on_event, '{EXCHANGE}', '{MARKET}', '{START_DATE}', '{END_DATE}')

# Replay  On event - callback
def on_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

Keywords

cryptolab backtest cryptocurrency cryptocurrencies api bitcoin binance gateio

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts