You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Brian Mancini edited this page Aug 15, 2020
·
17 revisions
Document per-exchange requirements
authentication required
single socket / multi-socket / per-socket limits
subscription limits
The goal of this research will be to determine how we can use a more generic base client and we can use composition to enable the required capabilities for an exchange.
authenticate
getSocket
sendMessage
message handling
composite messages
restRequests
Some features:
emit raw message (possibly as third parameter) -> this will be useful for debugging
emit unhandled message for debuugging -> this will be useful for seeing if anything is wrong
Poloniex
performs REST request on client initialization for market identifiers.
treats some markets like rooms, subscribing to ticker, trades, and orderbook in a single call to the market feed
JEX
would benefit from event based pattern matching for subscribe as well as handling messages. It requires subscribing to spotTrade, optionTrade, or contractTrade. These emit similarly named events
Kucoin
limit of 100 subscriptions per socket.
General Thoughts
subscribe pushes subscriptions into central event subscriber for the client
asynchronously acquire a connection which can be customized to meet the needs of the exchange
limits on subscriptions per socket
connection throttling
authentication (based on feed type)
once a connection is provided for the subscription it can be placed into a "send" queue for the socket
the send queue can customize behavior based on how the exchange works