Package org.knowm.xchange.ripple.service
Class RippleTradeServiceRaw
- java.lang.Object
-
- org.knowm.xchange.service.BaseExchangeService
-
- org.knowm.xchange.ripple.service.RippleBaseService
-
- org.knowm.xchange.ripple.service.RippleTradeServiceRaw
-
- All Implemented Interfaces:
org.knowm.xchange.service.BaseService
- Direct Known Subclasses:
RippleTradeService
public class RippleTradeServiceRaw extends RippleBaseService
-
-
Field Summary
-
Fields inherited from class org.knowm.xchange.ripple.service.RippleBaseService
rippleAuthenticated, ripplePublic
-
-
Constructor Summary
Constructors Constructor Description RippleTradeServiceRaw(org.knowm.xchange.Exchange exchange)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancancelOrder(String orderId, boolean validate)voidclearOrderDetailsStore()Clear any stored order details to allow memory to be released.BigDecimalgetExpectedBaseTransferFee(RippleLimitOrder order)BigDecimalgetExpectedCounterTransferFee(RippleLimitOrder order)static BigDecimalgetExpectedTransferFee(ITransferFeeSource transferFeeSource, String counterparty, String currency, BigDecimal quantity, org.knowm.xchange.dto.Order.OrderType type)The expected counterparty transfer fee for an order that results in a transfer of the supplied amount of currency.RippleNotificationsgetNotifications(String account, Boolean excludeFailed, Boolean earliestFirst, Integer resultsPerPage, Integer page, Long startLedger, Long endLedger)RippleAccountOrdersgetOpenAccountOrders()IRippleTradeTransactiongetTrade(String account, RippleNotifications.RippleNotification notification)Retrieve order details from local store if they have been previously stored otherwise query external server.List<IRippleTradeTransaction>getTradesForAccount(org.knowm.xchange.service.trade.params.TradeHistoryParams params, String account)BigDecimalgetTransactionFee()The Ripple network transaction fee varies depending on how busy the network is as described here.StringplaceOrder(RippleLimitOrder order, boolean validate)
-
-
-
Method Detail
-
getExpectedTransferFee
public static BigDecimal getExpectedTransferFee(ITransferFeeSource transferFeeSource, String counterparty, String currency, BigDecimal quantity, org.knowm.xchange.dto.Order.OrderType type) throws IOException
The expected counterparty transfer fee for an order that results in a transfer of the supplied amount of currency. The fee rate is payable when sending the currency (not receiving it) and it set by the issuing counterparty. The rate may be zero. Transfer fees are not applicable to sending XRP. More details can be found here.- Returns:
- transfer fee of the supplied currency
- Throws:
IOException
-
placeOrder
public String placeOrder(RippleLimitOrder order, boolean validate) throws RippleException, IOException
- Throws:
RippleExceptionIOException
-
cancelOrder
public boolean cancelOrder(String orderId, boolean validate) throws RippleException, IOException
- Throws:
RippleExceptionIOException
-
getOpenAccountOrders
public RippleAccountOrders getOpenAccountOrders() throws RippleException, IOException
- Throws:
RippleExceptionIOException
-
getNotifications
public RippleNotifications getNotifications(String account, Boolean excludeFailed, Boolean earliestFirst, Integer resultsPerPage, Integer page, Long startLedger, Long endLedger) throws RippleException, IOException
- Throws:
RippleExceptionIOException
-
getTrade
public IRippleTradeTransaction getTrade(String account, RippleNotifications.RippleNotification notification) throws RippleException, IOException
Retrieve order details from local store if they have been previously stored otherwise query external server.- Throws:
RippleExceptionIOException
-
getTradesForAccount
public List<IRippleTradeTransaction> getTradesForAccount(org.knowm.xchange.service.trade.params.TradeHistoryParams params, String account) throws RippleException, IOException
- Throws:
RippleExceptionIOException
-
getTransactionFee
public BigDecimal getTransactionFee()
The Ripple network transaction fee varies depending on how busy the network is as described here.- Returns:
- current network transaction fee in units of XRP
-
getExpectedBaseTransferFee
public BigDecimal getExpectedBaseTransferFee(RippleLimitOrder order) throws IOException
- Returns:
- transfer fee for the base leg of the order in the base currency
- Throws:
IOException
-
getExpectedCounterTransferFee
public BigDecimal getExpectedCounterTransferFee(RippleLimitOrder order) throws IOException
- Returns:
- transfer fee for the counter leg of the order in the counter currency
- Throws:
IOException
-
clearOrderDetailsStore
public void clearOrderDetailsStore()
Clear any stored order details to allow memory to be released.
-
-