It’s useful to visualize the shape of the order book by plotting the cumulative sum of liquidity on each side. In this example you’ll see how Gridarrow can stream exchange data into Excel where such visualisations are easy to create.
What is Gridarrow?Gridarrow is the missing server for Excel. It connects just about any data source to Excel with simple Python scripts.
Why is it awesome?
- It's real-time, so as soon as the data is updated in the Gridarrow App it's updated in Excel, no need to poll or refresh.
- It's multi-user so your colleagues can connect to the same data at the same time.
- It simplifies your spreadsheets by moving data retrieval and pre-processing into Python.
The “best” price for any instrument traded in a limit order book doesn’t tell the full story about the price at which you can actually trade.
Say, for example, that you want to buy 100 lots but there is only 1 lot for sale at the best offer. In this case you won’t be able to simply buy 100 lots at the lowest price available. If you want to trade immediately, you’ll have to “trade through the order book” buying at each price level along the way until you’ve satisfied your demand.
What goes for traditional exchange traded securities is also true for cryptocurrencies. Here’s an example where we’ve connected to the BTC/USD level2 orderbook feed from the GDAX exchange, and used Gridarrow to stream the first 60 price levels to Excel.
The code to maintain the order book and stream the data to Excel is a bit more involved than some of the other examples we’ve blogged about, but fewer than 100 lines still.