Skip to content

Latest commit

 

History

History
38 lines (28 loc) · 798 Bytes

README.md

File metadata and controls

38 lines (28 loc) · 798 Bytes

Trade

Vue app to show real-time price data from Websocket. Frontend part of Trade-ws. Subscribe and unsubscribe to asset prices feed, which comes through socket.

In case of connection failure try app will try to reestablish connection, and it was successful - resubscribe to existed prices feed.

Subscribe (with native Websockets)

this.websocket.send(
  JSON.stringify({
    event: "events",
    data: { type: "subscribe", subscribe: isin }
  })
);

Unsubscribe

this.websocket.send(
  JSON.stringify({
    event: "events",
    data: { type: "unsubscribe", unsubscribe: isin }
  })
);

Project setup

yarn install
yarn serve