Package org.knowm.xchange.okcoin.service
Class OkCoinMarketDataServiceRaw
java.lang.Object
org.knowm.xchange.service.BaseExchangeService
org.knowm.xchange.okcoin.service.OkCoinBaseService
org.knowm.xchange.okcoin.service.OkCoinMarketDataServiceRaw
- All Implemented Interfaces:
BaseService
- Direct Known Subclasses:
OkCoinFuturesMarketDataService
,OkCoinMarketDataService
public class OkCoinMarketDataServiceRaw extends OkCoinBaseService
-
Field Summary
Fields inherited from class org.knowm.xchange.okcoin.service.OkCoinBaseService
useIntl
Fields inherited from class org.knowm.xchange.service.BaseExchangeService
exchange
-
Constructor Summary
Constructors Constructor Description OkCoinMarketDataServiceRaw(Exchange exchange)
Constructor -
Method Summary
Methods inherited from class org.knowm.xchange.okcoin.service.OkCoinBaseService
createDelimitedString
Methods inherited from class org.knowm.xchange.service.BaseExchangeService
verifyOrder, verifyOrder, verifyOrder
-
Constructor Details
-
OkCoinMarketDataServiceRaw
Constructor- Parameters:
exchange
-
-
-
Method Details
-
getTicker
获取OKEx币币行情- Parameters:
currencyPair
-- Returns:
- Throws:
IOException
-
getFuturesTicker
public OkCoinTickerResponse getFuturesTicker(CurrencyPair currencyPair, FuturesContract prompt) throws IOException获取OKEx合约行情- Parameters:
currencyPair
-prompt
-- Returns:
- Throws:
IOException
-
getDepth
获取OKEx币币市场深度- Parameters:
currencyPair
-- Returns:
- Throws:
IOException
-
getDepth
获取OKEx币币市场深度- Parameters:
currencyPair
-size
- 设置查询数据条数,[1,200]- Returns:
- Throws:
IOException
-
getFuturesDepth
public OkCoinDepth getFuturesDepth(CurrencyPair currencyPair, FuturesContract prompt) throws IOException获取OKEx合约深度信息- Parameters:
currencyPair
-prompt
-- Returns:
- Throws:
IOException
-
getTrades
获取OKEx币币交易信息(60条)- Parameters:
currencyPair
-- Returns:
- Throws:
IOException
-
getTrades
获取OKEx币币交易信息(60条)- Parameters:
currencyPair
-since
- tid:交易记录ID(返回数据为:最新交易信息tid值--当前tid值之间的交易信息 ,但最多返回60条数据)- Returns:
- Throws:
IOException
-
getFuturesTrades
public OkCoinTrade[] getFuturesTrades(CurrencyPair currencyPair, FuturesContract prompt) throws IOException获取OKEx合约交易记录信息- Parameters:
currencyPair
-prompt
-- Returns:
- Throws:
IOException
-
getFuturesIndex
获取OKEx合约指数信息- Parameters:
currencyPair
-- Returns:
- Throws:
IOException
-
getFuturesIndex
- Parameters:
symbol
- btc_usdt,ltc_usdt,eth_usdt 等- Returns:
- Throws:
IOException
-
getExchangRate_US_CH
获取美元人民币汇率- Returns:
- Throws:
IOException
-
getFutureEstimatedPrice
获取交割预估价- Parameters:
currencyPair
-- Returns:
- Throws:
IOException
-
getFutureKline
public List<OkCoinFutureKline> getFutureKline(CurrencyPair currencyPair, OkCoinKlineType type, FuturesContract contractType, Integer size, Long since) throws IOException获取OKEx合约K线信息- Parameters:
currencyPair
-type
-contractType
-size
-since
-- Returns:
- Throws:
IOException
-
getFutureKline
public List<OkCoinFutureKline> getFutureKline(CurrencyPair currencyPair, OkCoinKlineType type, FuturesContract contractType) throws IOException- Throws:
IOException
-
getFutureKline
public List<OkCoinFutureKline> getFutureKline(CurrencyPair currencyPair, OkCoinKlineType type, FuturesContract contractType, Integer size) throws IOException- Throws:
IOException
-
getFutureKline
public List<OkCoinFutureKline> getFutureKline(CurrencyPair currencyPair, OkCoinKlineType type, FuturesContract contractType, Long since) throws IOException- Throws:
IOException
-
getFutureHoldAmount
public OkCoinFutureHoldAmount[] getFutureHoldAmount(CurrencyPair currencyPair, FuturesContract contractType) throws IOException获取当前可用合约总持仓量- Parameters:
currencyPair
-contractType
-- Returns:
- Throws:
IOException
-
getFuturePriceLimit
public OkCoinFutureComment getFuturePriceLimit(CurrencyPair currencyPair, FuturesContract contractType) throws IOException获取合约最高限价和最低限价- Parameters:
currencyPair
-contractType
-- Returns:
- Throws:
IOException
-
getKlines
public List<OkCoinKline> getKlines(CurrencyPair currencyPair, OkCoinKlineType type) throws IOException获取OKEx币币K线数据(每个周期数据条数2000左右)- Parameters:
currencyPair
-type
-- Returns:
- Throws:
IOException
-
getKlines
public List<OkCoinKline> getKlines(CurrencyPair currencyPair, OkCoinKlineType type, Integer size) throws IOException获取OKEx币币K线数据- Parameters:
currencyPair
-type
-size
- 指定获取数据的条数- Returns:
- Throws:
IOException
-
getKlines
public List<OkCoinKline> getKlines(CurrencyPair currencyPair, OkCoinKlineType type, Long timestamp) throws IOException获取OKEx币币K线数据- Parameters:
currencyPair
-type
-timestamp
- 指定获取数据的条数- Returns:
- Throws:
IOException
-
getKlines
public List<OkCoinKline> getKlines(CurrencyPair currencyPair, OkCoinKlineType type, Integer size, Long timestamp) throws IOException获取OKEx币币K线数据- Parameters:
currencyPair
-type
-size
-timestamp
- 返回该时间戳以后的数据- Throws:
IOException
-