An Interest In:
Web News this Week
- March 18, 2024
- March 17, 2024
- March 16, 2024
- March 15, 2024
- March 14, 2024
- March 13, 2024
- March 12, 2024
August 28, 2022 07:07 pm GMT
Original Link: https://dev.to/rohit20001221/crypto-bot-1goe
Crypto Bot
Overview of My Submission
Crypto Bot is a collection of micro services which uses algorithmic trading to generate the BUY / SELL Signals based on the data received from the crypto market (Binance API)
the bot uses the pubsub to publish the live crypto prices to the strategy micro service and redis json to store the orders data and the micro services communicate via gRPC with each other
custom strategies can be writen under the strategy-service/strategies
an example ema.py (Exponential Moving Average) strategy is given in the repo
Submission Category: Microservice
Language Used: Python, Protobuf
Link to Code
Crypto Bot
crypto bot uses algorithmic trading strategies to generate buy and sell signals for tradingthe crypto currency
How it works
How the data is stored:
//historical data { "open": float, "high": float, "low": float, "close": float, "volume": float } // live data { 'open': float, 'high': float, 'low': float, 'close': float, 'volume': float, 'is_interval': boolean, "symbol": string, // btcusdt "interval": string // "5m", "1m", "1h", "1d" }
How the data is accessed:
# subscribing to the live data serviceREDIS> SUBSCRIBE <channel-name># reading historical dataREDIS> JSON.GET historical-<tradingsymbol> '$'
How to run it locally?
Prerequisites
- python
- gRPC
- Redis Stack Server
- Docker
- Binance API Key and Secret
- Pushbullet Access Token
Local installation
to start the
Additional Resources / Info
Collaborators
- Check out Redis OM, client libraries for working with Redis as a multi-model database.
- Use RedisInsight to visualize your data in Redis.
- Sign up for a free Redis database.
Original Link: https://dev.to/rohit20001221/crypto-bot-1goe
Share this article:
Tweet
View Full Article
Dev To
An online community for sharing and discovering great ideas, having debates, and making friendsMore About this Source Visit Dev To