Package org.knowm.xchange.cexio.service
Class CexIOTradeServiceRaw
java.lang.Object
org.knowm.xchange.service.BaseExchangeService
org.knowm.xchange.cexio.service.CexIOBaseService
org.knowm.xchange.cexio.service.CexIOTradeServiceRaw
- All Implemented Interfaces:
BaseService
- Direct Known Subclasses:
CexIOTradeService
-
Nested Class Summary
-
Field Summary
Fields inherited from class org.knowm.xchange.cexio.service.CexIOBaseService
cexIOAuthenticated, signatureCreator
Fields inherited from class org.knowm.xchange.service.BaseExchangeService
exchange
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionarchivedOrders
(TradeHistoryParams tradeHistoryParams) boolean
cancelCexIOOrder
(String orderId) cancelCexIOOrders
(CurrencyPair currencyPair) cancelReplaceCexIOOrder
(CurrencyPair currencyPair, Order.OrderType type, String orderId, BigDecimal amount, BigDecimal price) closePosition
(CurrencyPair currencyPair, String id) getCexIOOpenOrders
(CurrencyPair currencyPair) getOpenPositions
(CurrencyPair currencyPair) getOrderDetail
(String orderId) getOrderFullDetail
(String orderId) getOrderTransactions
(String orderId) getPosition
(String positionId) openCexIOPosition
(CurrencyPair currencyPair, BigDecimal amount, Currency collateral, Integer leverage, CexioPositionType type, Boolean anySlippage, BigDecimal estimatedOpenPrice, BigDecimal stopLossPrice) placeCexIOLimitOrder
(LimitOrder limitOrder) placeCexIOMarketOrder
(MarketOrder marketOrder) Methods inherited from class org.knowm.xchange.service.BaseExchangeService
verifyOrder, verifyOrder, verifyOrder
-
Constructor Details
-
CexIOTradeServiceRaw
-
-
Method Details
-
getCexIOOpenOrders
- Throws:
IOException
-
getCexIOOpenOrders
- Throws:
IOException
-
placeCexIOLimitOrder
- Throws:
IOException
-
placeCexIOMarketOrder
- Throws:
IOException
-
cancelCexIOOrder
- Throws:
IOException
-
cancelCexIOOrders
- Throws:
IOException
-
cancelReplaceCexIOOrder
public CexIOCancelReplaceOrderResponse cancelReplaceCexIOOrder(CurrencyPair currencyPair, Order.OrderType type, String orderId, BigDecimal amount, BigDecimal price) throws ExchangeException, IOException - Throws:
ExchangeException
IOException
-
archivedOrders
public List<CexIOArchivedOrder> archivedOrders(TradeHistoryParams tradeHistoryParams) throws IOException - Throws:
IOException
-
getOrderDetail
- Throws:
IOException
-
getOrderFullDetail
- Throws:
IOException
-
getOrderTransactions
- Throws:
IOException
-
getOpenPositions
- Throws:
IOException
-
getPosition
- Throws:
IOException
-
openCexIOPosition
public CexioOpenPosition openCexIOPosition(CurrencyPair currencyPair, BigDecimal amount, Currency collateral, Integer leverage, CexioPositionType type, Boolean anySlippage, BigDecimal estimatedOpenPrice, BigDecimal stopLossPrice) throws IOException - Parameters:
currencyPair
-amount
- total amount of product to buy using borrowed funds and user's fundscollateral
- currency of user funds used, may be one of currencies in the pair, default is second currency in the pairleverage
- leverage ratio of total funds (user's and borrowed) to user's funds; for example - leverage=3 means - ratio total/user's=3:1, margin=33.(3)%, 1/3 is users, 2/3 are borrowed; Note that in UI it will be presented as 1/3type
- position type. long - buying product, profitable if product price grows; short - selling product, profitable if product price falls;anySlippage
- allows to open position at changed priceestimatedOpenPrice
- allows to open position at changed pricestopLossPrice
- price near which your position will be closed automatically in case of unfavorable market conditions- Returns:
- CexioPosition
- Throws:
IOException
-
closePosition
- Throws:
IOException
-