python 3.6 code,,
Can you teach me how to connect to bitstamp exchange through websocket api to create an array that includes number of rows equal to number of available pairs and 8 columns including the following:
1- pair (i.e. btcusd)
2- base symbol (i.e. btc)
3- quote symbol (i.e usd)
4- best bid price
5- best ask price
6- time stamp for last change in bid or ask prices
7- best bid volume
8- best ask volume
Then making sure the array is continuously updated by the web socket connection..
On the other hand how can I loop through the array and calculate the price speared (ask-bid) and print a list of all pairs with the spread flashing once bid or ask are changed in the source array?