public class OKCoinClient extends Object implements AutoCloseable
| Modifier and Type | Field and Description | 
|---|---|
static org.apache.http.entity.ContentType | 
APPLICATION_FORM_URLENCODED  | 
static String | 
ENCODING  | 
| Constructor and Description | 
|---|
OKCoinClient(int socketTimeout,
            int connectTimeout,
            int connectionRequestTimeout)  | 
OKCoinClient(String loginName,
            String password,
            int socketTimeout,
            int connectTimeout,
            int connectionRequestTimeout)  | 
OKCoinClient(String loginName,
            String password,
            String tradePwd,
            int socketTimeout,
            int connectTimeout,
            int connectionRequestTimeout)  | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
ask(BigDecimal amount,
   BigDecimal cnyPrice)
Deprecated. 
 
Use  
OKCoinTradeService#placeLimitOrder(com.xeiam.xchange.dto.trade.LimitOrder) instead. | 
void | 
bid(BigDecimal amount,
   BigDecimal cnyPrice)
Deprecated. 
 
Use  
OKCoinTradeService#placeLimitOrder(com.xeiam.xchange.dto.trade.LimitOrder) instead. | 
boolean | 
cancelContinuousEntrust(int symbol,
                       long id)
Cancel a continuous entrust. 
 | 
void | 
close() | 
Funds | 
getBalance()
Deprecated. 
 
Use  
OKCoinAccountService.getAccountInfo() instead. | 
Depth | 
getDepth()
Deprecated. 
 
 | 
IcebergOrderHistory | 
getIcebergOrders(int symbol,
                int type,
                int sign,
                int strategyType,
                Integer page)
Returns iceberg orders. 
 | 
BigDecimal | 
getMinTradeAmount()  | 
Ticker | 
getTicker()
Deprecated. 
 
 | 
List<Trade> | 
getTrades()
Deprecated. 
 
Use  
OKCoinMarketDataService#getTrades(com.xeiam.xchange.currency.CurrencyPair, Object...) instead. | 
List<Trade> | 
getTrades(int since)
Deprecated. 
 
Use @link  
OKCoinMarketDataService#getTrades(com.xeiam.xchange.currency.CurrencyPair, Object...) instead. | 
void | 
login()  | 
void | 
logout()  | 
Result | 
submitContinuousEntrust(int symbol,
                       int type,
                       BigDecimal tradeValue,
                       BigDecimal singleAvg,
                       BigDecimal depthRange,
                       BigDecimal protePrice)
Submits continuous entrust. 
 | 
public static final String ENCODING
public static final org.apache.http.entity.ContentType APPLICATION_FORM_URLENCODED
public OKCoinClient(int socketTimeout,
                    int connectTimeout,
                    int connectionRequestTimeout)
public OKCoinClient(String loginName, String password, int socketTimeout, int connectTimeout, int connectionRequestTimeout)
@Deprecated public Ticker getTicker() throws IOException
OKCoinMarketDataService.getTicker(org.knowm.xchange.currency.CurrencyPair, java.lang.Object...) instead.IOException - indicates I/O exception.@Deprecated public Depth getDepth() throws IOException
OKCoinMarketDataService.getTicker(org.knowm.xchange.currency.CurrencyPair, java.lang.Object...) instead.IOException - indicates I/O exception.@Deprecated public List<Trade> getTrades() throws IOException
OKCoinMarketDataService#getTrades(com.xeiam.xchange.currency.CurrencyPair, Object...) instead.IOException - indicates I/O exception.@Deprecated public List<Trade> getTrades(int since) throws IOException
OKCoinMarketDataService#getTrades(com.xeiam.xchange.currency.CurrencyPair, Object...) instead.since - 0 based. When pass 0, will return the trades from the first trade.IOException - indicates I/O exception.public void login()
           throws IOException
IOExceptionpublic void logout()
            throws IOException
IOException@Deprecated public Funds getBalance() throws IOException
OKCoinAccountService.getAccountInfo() instead.IOException - indicates I/O exception.public BigDecimal getMinTradeAmount()
@Deprecated public void bid(BigDecimal amount, BigDecimal cnyPrice) throws IOException
OKCoinTradeService#placeLimitOrder(com.xeiam.xchange.dto.trade.LimitOrder) instead.amount - the order quantity.cnyPrice - the order price in CNY.IOException - indicates I/O exception.@Deprecated public void ask(BigDecimal amount, BigDecimal cnyPrice) throws IOException
OKCoinTradeService#placeLimitOrder(com.xeiam.xchange.dto.trade.LimitOrder) instead.amount - the order quantity.cnyPrice - the order price in CNY.IOException - indicates I/O exception.public Result submitContinuousEntrust(int symbol, int type, BigDecimal tradeValue, BigDecimal singleAvg, BigDecimal depthRange, BigDecimal protePrice) throws LoginRequiredException, IOException
symbol - 0: BTC, 1: LTC.type - 1: Buy Iceberg Order, 2: Sell Iceberg Order.tradeValue - total Order amount.singleAvg - average order amount.depthRange - price variance.protePrice - highest buy price for buying, lowest sell price for selling.LoginRequiredException - indicates the client is not logged in.IOException - indicates I/O exception.public boolean cancelContinuousEntrust(int symbol,
                                       long id)
                                throws LoginRequiredException,
                                       IOException
symbol - 0: BTC, 1: LTC.id - the order ID.LoginRequiredException - indicates the client is not logged in.IOException - indicates I/O exception.public IcebergOrderHistory getIcebergOrders(int symbol, int type, int sign, int strategyType, Integer page) throws LoginRequiredException, IOException
symbol - 0: BTC, 1: LTC.type - 5: ?sign - 1: Open Orders, 2: Order HistorystrategyType - 2: ?page - 1 based.LoginRequiredException - indicates the client is not logged in.IOException - indicates I/O exception.public void close()
           throws IOException
close in interface AutoCloseableIOExceptionCopyright © 2013–2017. All rights reserved.