Package org.knowm.xchange.dto.meta
Class ExchangeMetaData
java.lang.Object
org.knowm.xchange.dto.meta.ExchangeMetaData
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
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:
...
This 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<Instrument,InstrumentMetaData> instruments, Map<Currency,CurrencyMetaData> currency, RateLimit[] publicRateLimits, RateLimit[] privateRateLimits, Boolean shareRateLimits)
Constructor -
Method Summary
Modifier and Type Method Description static Long
getPollDelayMillis(RateLimit[] rateLimits)
String
toJSONString()
-
Constructor Details
-
ExchangeMetaData
public ExchangeMetaData(Map<Instrument,InstrumentMetaData> instruments, Map<Currency,CurrencyMetaData> currency, RateLimit[] publicRateLimits, RateLimit[] privateRateLimits, Boolean shareRateLimits)Constructor- Parameters:
instruments
- Map ofInstrument
->InstrumentMetaData
currency
- Map of currency ->CurrencyMetaData
-
-
Method Details
-
getPollDelayMillis
- 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
-
toJSONString
-