September 2018
Intermediate to advanced
398 pages
9h 43m
English
Go to Bitstamp's WebSocket API for live transactions: https://www.bitstamp.net/websocket/.
You will see that this API uses a tool called Pusher channels for real-time WebSocket streaming. The API documentation provides a Pusher Key that we need to use to receive live transactions.
Pusher channels is a hosted solution for delivering a stream of messages using a publish/subscribe pattern. You can find out more on their website: https://pusher.com/features.
Let's try to use Pusher to receive some live BTC/USD transactions. Open the project bitcoin-analyser, start a new Scala console, and type the following:
import com.pusher.client.Pusherimport com.pusher.client.channel.SubscriptionEventListenerval pusher = new Pusher ...
Read now
Unlock full access