This project is about analyzing trades on Binance in real time. The program will connect to Binance’s WebSocket API and calculates
the volume-weighted average price (VWAP) of the respective trade for given n minutes.
Refer here (https://hevodata.com/blog/how-to-install-kafka-on-ubuntu/)
- Start the kafka server
./kafka-server-start.sh /opt/kafka/config/server.properties - Start the kafka consumer
./kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic <topic-name>
- clone the project..
2.
cd structuredStreaming mvn clean packagejava -jar target/structured-streaming.jar localhost:9092 binanceTrade 60. localhost:9092 --> kafka host and port, binanceTrade--> kafka topic, 1 --> collect stats for every 60 sec
cd..cd webSocketProducermvn clean packagejava -jar target/webSocketProducer-1.0-kafkaProducer.jar localhost:9092 binanceTrade. localhost:9092 --> kafka host and port, binanceTrade--> kafka topic
NOTE : Resultant stats will be written to /tmp/binance folder
- For using Akka streams and java example for Akka streams
- Custome merge functions
- Connecting to Binance Trades 4.Spark Structured streaming link1 and link2