Extract realtime orderbook data (price and volume) on Jupyter notebook for the following currency pairs BTC/USD, BTC/USDT, BTC/USDC, BTC/EUR, BTC/GBP, BTC/JPY.
Steps to follow:
- Place the krakenwsbook.py file in the same folder as the Jupyter notebook you are working on
- Run the following one line in a shell in your notebook: %run ./krakenwsbook.py BTC/USD 10
- The output will give you the most recent 10 highest Bids and 10 lowest Asks for BTC/USD pair with their sizes in parentheses
- To stop execution, interrupt the kernel
- Modify the one line of code in your choice of pair and number of orders you want to see on your screen
- For more details check out https://docs.kraken.com/websockets/