Package org.knowm.xchange.okex
Class OkexExchange
java.lang.Object
org.knowm.xchange.BaseExchange
org.knowm.xchange.okex.OkexExchange
- All Implemented Interfaces:
Exchange
- Direct Known Subclasses:
OkexStreamingExchange
public class OkexExchange extends BaseExchange
Author: Max Gao (gaamox@tutanota.com) Created: 08-06-2021
-
Field Summary
Fields Modifier and Type Field Description static String
PARAM_AWS_HOST
static String
PARAM_AWS_SSL_URI
static String
PARAM_PASSPHRASE
static String
PARAM_SIMULATED
static String
PARAM_USE_AWS
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
Constructors Constructor Description OkexExchange()
-
Method Summary
Modifier and Type Method Description void
applySpecification(ExchangeSpecification exchangeSpecification)
Applies any exchange specific parametersExchangeSpecification
getDefaultExchangeSpecification()
For Demo Trading add the following param to exchangeSpecification: exchangeSpecification.setExchangeSpecificParametersItem(PARAM_SIMULATED_TRADING, "1");si.mazi.rescu.SynchronizedValueFactory<Long>
getNonceFactory()
The nonce factory used to create a nonce value.ResilienceRegistries
getResilienceRegistries()
resilience4j registries with retry strategies, rate limiters, etc.protected void
initServices()
void
remoteInit()
Initialize this instance with the remote meta data.protected boolean
useSandbox()
Methods inherited from class org.knowm.xchange.BaseExchange
getAccountService, getExchangeInstruments, getExchangeMetaData, getExchangeSpecification, getMarketDataService, getMetaDataFileName, getTradeService, loadExchangeMetaData, loadMetaData, toString
-
Field Details
-
PARAM_USE_AWS
- See Also:
- Constant Field Values
-
PARAM_AWS_SSL_URI
- See Also:
- Constant Field Values
-
PARAM_AWS_HOST
- See Also:
- Constant Field Values
-
PARAM_SIMULATED
- See Also:
- Constant Field Values
-
PARAM_PASSPHRASE
- See Also:
- Constant Field Values
-
-
Constructor Details
-
OkexExchange
public OkexExchange()
-
-
Method Details
-
applySpecification
Description copied from interface:Exchange
Applies any exchange specific parameters- Specified by:
applySpecification
in interfaceExchange
- Overrides:
applySpecification
in classBaseExchange
- Parameters:
exchangeSpecification
- TheExchangeSpecification
-
initServices
protected void initServices()- Specified by:
initServices
in classBaseExchange
-
getDefaultExchangeSpecification
For Demo Trading add the following param to exchangeSpecification: exchangeSpecification.setExchangeSpecificParametersItem(PARAM_SIMULATED_TRADING, "1");- Returns:
- A default ExchangeSpecification to use during the creation process if one is not supplied
-
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
-
getResilienceRegistries
Description copied from interface:Exchange
resilience4j registries with retry strategies, rate limiters, etc. used for this exchange.- Returns:
- resilience4j registries
-
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
- Throws:
IOException
-
useSandbox
protected boolean useSandbox()
-