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
-
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
-
Method Summary
Modifier and TypeMethodDescriptiongetDepth
(CurrencyPair currencyPair) 获取OKEx币币市场深度getDepth
(CurrencyPair currencyPair, Integer size) 获取OKEx币币市场深度获取美元人民币汇率getFutureEstimatedPrice
(CurrencyPair currencyPair) 获取交割预估价getFutureHoldAmount
(CurrencyPair currencyPair, FuturesContract contractType) 获取当前可用合约总持仓量getFutureKline
(CurrencyPair currencyPair, OkCoinKlineType type, FuturesContract contractType) getFutureKline
(CurrencyPair currencyPair, OkCoinKlineType type, FuturesContract contractType, Integer size) getFutureKline
(CurrencyPair currencyPair, OkCoinKlineType type, FuturesContract contractType, Integer size, Long since) 获取OKEx合约K线信息getFutureKline
(CurrencyPair currencyPair, OkCoinKlineType type, FuturesContract contractType, Long since) getFuturePriceLimit
(CurrencyPair currencyPair, FuturesContract contractType) 获取合约最高限价和最低限价getFuturesDepth
(CurrencyPair currencyPair, FuturesContract prompt) 获取OKEx合约深度信息getFuturesIndex
(String symbol) getFuturesIndex
(CurrencyPair currencyPair) 获取OKEx合约指数信息getFuturesTicker
(CurrencyPair currencyPair, FuturesContract prompt) 获取OKEx合约行情getFuturesTrades
(CurrencyPair currencyPair, FuturesContract prompt) 获取OKEx合约交易记录信息getKlines
(CurrencyPair currencyPair, OkCoinKlineType type) 获取OKEx币币K线数据(每个周期数据条数2000左右)getKlines
(CurrencyPair currencyPair, OkCoinKlineType type, Integer size) 获取OKEx币币K线数据getKlines
(CurrencyPair currencyPair, OkCoinKlineType type, Integer size, Long timestamp) 获取OKEx币币K线数据getKlines
(CurrencyPair currencyPair, OkCoinKlineType type, Long timestamp) 获取OKEx币币K线数据getTicker
(CurrencyPair currencyPair) 获取OKEx币币行情getTrades
(CurrencyPair currencyPair) 获取OKEx币币交易信息(60条)getTrades
(CurrencyPair currencyPair, Long since) 获取OKEx币币交易信息(60条)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
-