Bot trading Cryptocurrency #Bitcoin #Ethereum #Crypto
Bot trading Cryptocurrency #Bitcoin #Ethereum #Crypto

Today, we will build a simple crypto trading bot using Python, TradingView, and CoinDCX, an Indian crypto exchange.

The functionality of our trading app can be summarized as follows:-

  1. The application will get alerts from TradingView regarding the signal(s) of your choice of strategy. For example MA, EMA, MACD, Supertrend etc. These alerts will mention whether the Indictor is positive for a buy or a sell. This logic we’ll handle at the TradingView end.
  2. The app will simply store the signals and based on what combination of criteria (if ema says buy and supertrend is also buy, let's BUY), we’ll…

We will be integrating apache kafka with springboot micro-services as a mode of communication .

Apache Kafka workflow
Apache Kafka workflow

We will have 2 micro-services —

  1. Publisher (the service that will send out the message)
  2. Subscriber (the service that will consume the message)

Pre-requisites & Setup :

Step.1 — Download and run Zookeeper . (used to track the status of kafka nodes and stores basic metadata such as information about topics, brokers, consumer offsets )

Note — If you face error running zookeeper service regarding config file, try to change the config file name to “zoo.cfg” .

Bash from zookeeper root — sh bin/zkServer.sh start

An API Gateway acts as a reverse proxy sitting between client and micro services, routing requests from client side to various micro-services . User/client makes a request to a single host (gateway server) and need not know all the microservices servers , just single entry point to your application .

API Gateway Basic
API Gateway Basic
Web & Mobile Client calling gateway instead of individual service host machines.

Why API Gateway ?

  • Layer 7 routing and load balancing => enables the load balancer to make smarter load‑balancing decisions, and to apply optimizations and changes to the content (such as compression and encryption). That means based on the content of the request , the routing can be done to specific servers which stores…

Sairav Dev

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store