We'd like you to build a very small 'App' that takes a stream of historical trades and displays them to the user, data will be provided from a public websocket endpoint and the UI should update in real-time as new state is received from the websocket and a message should be displayed to users if the list is empty (e.g. state yet received from endpoint).
The websocket endpoint is wss://www.cryptofacilities.com/ws/v1
and once connected you need to send the messasge
{"event":"subscribe","feed":"trade","product_ids":["FI_XBTUSD_180615"]}
to retrieve the list of trades. This will return
an initial trade_snapshot
object which contains an array of trade objects, please display the product_id
, qty
and
price
props of these objects to the user, sorted by the time
prop in descending order.