Package org.knowm.xchange.dto.meta
Class ExchangeMetaData
- java.lang.Object
-
- org.knowm.xchange.dto.meta.ExchangeMetaData
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
DsxMetaData
,HitbtcMetaData
public class ExchangeMetaData extends Object implements Serializable
This class is loaded during creation of the Exchange and is intended to hold both data that is readily available from an HTTP API request at an exchange extended by semi-static data that is not available from an HTTP API, but is still important information to have. Examples include currency pairs, max polling rates, scaling factors, etc. For more info see: https://github.com/timmolter/XChange/wiki/Design-NotesThis class is used only in the API by the classes that merge metadata stored in custom JSON file and online info from the remote exchange.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ExchangeMetaData(Map<CurrencyPair,CurrencyPairMetaData> currencyPairs, Map<Currency,CurrencyMetaData> currency, RateLimit[] publicRateLimits, RateLimit[] privateRateLimits, Boolean shareRateLimits)
Constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<Currency,CurrencyMetaData>
getCurrencies()
Map<CurrencyPair,CurrencyPairMetaData>
getCurrencyPairs()
static Long
getPollDelayMillis(RateLimit[] rateLimits)
RateLimit[]
getPrivateRateLimits()
RateLimit[]
getPublicRateLimits()
boolean
isShareRateLimits()
String
toJSONString()
String
toString()
-
-
-
Constructor Detail
-
ExchangeMetaData
public ExchangeMetaData(Map<CurrencyPair,CurrencyPairMetaData> currencyPairs, Map<Currency,CurrencyMetaData> currency, RateLimit[] publicRateLimits, RateLimit[] privateRateLimits, Boolean shareRateLimits)
Constructor- Parameters:
currencyPairs
- Map ofCurrencyPair
->CurrencyPairMetaData
currency
- Map of currency ->CurrencyMetaData
-
-
Method Detail
-
getPollDelayMillis
public static Long getPollDelayMillis(RateLimit[] rateLimits)
- Returns:
- minimum number of milliseconds required between any two remote calls, assuming the client makes consecutive calls without any bursts or breaks for an infinite period of time. Returns null if the rateLimits collection is null or empty
-
getCurrencyPairs
public Map<CurrencyPair,CurrencyPairMetaData> getCurrencyPairs()
-
getCurrencies
public Map<Currency,CurrencyMetaData> getCurrencies()
-
getPublicRateLimits
public RateLimit[] getPublicRateLimits()
-
getPrivateRateLimits
public RateLimit[] getPrivateRateLimits()
-
isShareRateLimits
public boolean isShareRateLimits()
-
toJSONString
public String toJSONString()
-
-