bitrich-info / xchange-stream

XChange-stream is a Java library providing a simple and consistent streaming API for interacting with Bitcoin and other crypto currency exchanges via WebSocket protocol. It is build on top of of XChange library providing new interfaces for streaming API. User can subscribe for live updates via reactive streams of RxJava library.
Apache License 2.0
414 stars 219 forks source link

Add getTickers for #124 and #98 #520

Closed TSavo closed 4 years ago

TSavo commented 4 years ago

Per tickets #98 and #124, it's been requested to allow for a single Observable that emits multiple (or all) currency pairs. This PR enhances the StreamingMarketData interface for all exchanges to support this with a new method: getTickers(CurrencyPair ...). Just pass it all the currencyPairs you are interested in, and on supported exchanges it will filter from a single stream, otherwise it will subscribe to all the tickers listed, and return a composite Observable that emits all the pairs requested.

TSavo commented 4 years ago

@badgerwithagun Requesting a review. :)