WebSockets is a great technology with many applications beyond the front end. I have a feeling that websocket APIs will become far more common in the web ecosphere.
I really like this example of how to interact with a WebSockets api with just-released Lomond 0.1.5.
Get the code from Lomond repos on Github.
This connects to the gdax websocket server and periodically prints the latest BTC price information. If you change the text "ticker"
to "level2"
it will spew out information on every trade. You could use this as the foundation for algorithmic trading or to keep an eye on your retirement fund (good luck).
Lomond is a websocket client library sponsored by Dataplicity. It has a focus on robustness and ease of use. continue reading…