Package org.knowm.xchange.binance
Class BinanceExchange
java.lang.Object
org.knowm.xchange.BaseExchange
org.knowm.xchange.binance.BinanceExchange
- All Implemented Interfaces:
Exchange
- Direct Known Subclasses:
BinanceStreamingExchange
,BinanceUsExchange
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
static final String
static final String
protected static ResilienceRegistries
static final String
static final String
static final String
static final String
static final String
protected si.mazi.rescu.SynchronizedValueFactory<Long>
Fields inherited from class org.knowm.xchange.BaseExchange
accountService, exchangeMetaData, exchangeSpecification, logger, marketDataService, tradeService
Fields inherited from interface org.knowm.xchange.Exchange
USE_SANDBOX
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
applySpecification
(ExchangeSpecification exchangeSpecification) Applies any exchange specific parameterssi.mazi.rescu.SynchronizedValueFactory<Long>
The nonce factory used to create a nonce value.resilience4j registries with retry strategies, rate limiters, etc.si.mazi.rescu.SynchronizedValueFactory<Long>
protected void
protected boolean
boolean
boolean
boolean
void
Initialize this instance with the remote meta data.static void
boolean
Methods inherited from class org.knowm.xchange.BaseExchange
getAccountService, getExchangeInstruments, getExchangeMetaData, getExchangeSpecification, getMarketDataService, getMetaDataFileName, getTradeService, loadExchangeMetaData, loadMetaData, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.knowm.xchange.Exchange
getAccountService, getExchangeInstruments, getExchangeMetaData, getExchangeSpecification, getMarketDataService, getTradeService
-
Field Details
-
SPECIFIC_PARAM_USE_SANDBOX
- See Also:
-
SPECIFIC_PARAM_USE_FUTURES_SANDBOX
- See Also:
-
SPECIFIC_PARAM_FUTURES_ENABLED
- See Also:
-
SPECIFIC_PARAM_PORTFOLIO_MARGIN_ENABLED
- See Also:
-
FUTURES_URL
- See Also:
-
INVERSE_FUTURES_URL
- See Also:
-
PORTFOLIO_MARGIN_URL
- See Also:
-
SANDBOX_FUTURES_URL
- See Also:
-
RESILIENCE_REGISTRIES
-
timestampFactory
-
-
Constructor Details
-
BinanceExchange
public BinanceExchange()
-
-
Method Details
-
initServices
protected void initServices()- Specified by:
initServices
in classBaseExchange
-
getTimestampFactory
-
getNonceFactory
Description copied from interface:Exchange
The nonce factory used to create a nonce value. Allows services to accept a placeholder that is replaced with generated value just before message is serialized and sent. If a method of a rest accepts ValueFactory as a parameter, it's evaluated, the message is serialized and sent in a single synchronized block.- Specified by:
getNonceFactory
in interfaceExchange
- Overrides:
getNonceFactory
in classBaseExchange
- Returns:
- Synchronized value factory
-
resetResilienceRegistries
public static void resetResilienceRegistries() -
getResilienceRegistries
Description copied from interface:Exchange
resilience4j registries with retry strategies, rate limiters, etc. used for this exchange.- Specified by:
getResilienceRegistries
in interfaceExchange
- Returns:
- resilience4j registries
-
getDefaultExchangeSpecification
- Specified by:
getDefaultExchangeSpecification
in interfaceExchange
- Returns:
- A default ExchangeSpecification to use during the creation process if one is not supplied
-
applySpecification
Description copied from interface:Exchange
Applies any exchange specific parameters- Specified by:
applySpecification
in interfaceExchange
- Overrides:
applySpecification
in classBaseExchange
- Parameters:
exchangeSpecification
- TheExchangeSpecification
-
isFuturesSandbox
public boolean isFuturesSandbox() -
isFuturesEnabled
public boolean isFuturesEnabled() -
isPortfolioMarginEnabled
public boolean isPortfolioMarginEnabled() -
usingSandbox
public boolean usingSandbox() -
remoteInit
public void remoteInit()Description copied from interface:Exchange
Initialize this instance with the remote meta data. Most exchanges require this method to be called beforeExchange.getExchangeMetaData()
. Some exchanges require it before using some of their services.- Specified by:
remoteInit
in interfaceExchange
- Overrides:
remoteInit
in classBaseExchange
-
isAuthenticated
protected boolean isAuthenticated()
-