Posts

Trading App Development - in the Stream

avatar of @leoplaw
25
@leoplaw
·
·
0 views
·
1 min read

I've trying to get into the flow of streaming live trade prices from various exchanges.

Each exchange have it's own unique API and stream formatting. This makes life complicated enough, but I went a step further. I wanted an isomorphic code library that would open a web socket stream on both the browser (node.js) and server (javascript).

Node.js and Javascript both support web sockets, but implement it differently. Thus I lept at isomorphic-ws (isomorphic websockts).

But this still did not solve negotiating the connection to the exchange API.

It would seem most people choose the easier and perhaps smarter way out and opt for the local server handling the exchange web sockets and then passing along to the browser or front end.

I chose to have the front end, GUI, User Interface, browser, directly open the exchange web sockets so as to lighten the load on the server.

I tried a number of libraries and methods, as I was trying to avoid writing my own. I had found one, CCXWS, which already supports multiple exchanges,but only works on the server.

Sooo... in then end I had to bite the bullet and roll my own. It took some time, but I did it. I now have a library that will stream web sockets on either the server or the browser.

It was a great deal of hard work, but I believe it will be worth it in the long run.

Posted Using LeoFinance Beta