knowm / XChange

XChange is a Java library providing a streamlined API for interacting with 60+ Bitcoin and Altcoin exchanges providing a consistent interface for trading and accessing market data.
http://knowm.org/open-source/xchange/
MIT License
3.87k stars 1.94k forks source link

superclass for tikers and other models for universal working with exchanges #2247

Open FedrBodr opened 6 years ago

FedrBodr commented 6 years ago

Hi all, i am new in XChange, but I see existing architecture does not consist superclass for tikers and other models for future universal working with several exchanges. Please add this or maybe I try to realize it.

bryantharris commented 6 years ago

The exchanges are broken into two layers. One layer is exchange specific (these services typically end in 'Raw' in the class name). In other words, there's a 1:1 correspondence with API end points to the underlying exchange. The second layer is implemented using the lower layer and provides a uniform API for accessing any exchange (it's a shared class layer).

So you can either use the generic interfaces and classes (most likely) or in cases where there's an impedance mismatch between the two layers you can always drop down to the raw lower level interface.

FedrBodr commented 6 years ago

Thank you, I understand now, and can make all that I want) Now i work with Exchanges objects and if i need i cast and use BittrexMarketDataServiceRaw it is perfect.