Open mike789vvv opened 6 years ago
If it's not implemented in XChange, you'll probably have to do it yourself. I PR with the change would be appreciated.
I have already done and use the local copy of the module. Minor changes were made to several files that I attach to the message.
org.knowm.xchange.cexio.service.CexIOTradeService - added placeMarketOrder org.knowm.xchange.cexio.service.CexIOTradeServiceRaw - added placeCexIOMarketOrder org.knowm.xchange.cexio.dto.PlaceOrderRequest - added param "order_type"
@mike789vvv take a look a this guide on how to fork a project.
Hello, Current implementation placeMarketOrder return NotAvailableFromExchangeException() On documentation https://cex.io/rest-api#/definitions/PlaceOrderRequest For place market order need set up param order_type = "market"
For example: org.knowm.xchange.cexio.dto.PlaceOrderRequest
public class PlaceOrderRequest extends CexIORequest { public final CexIOOrder.Type type; public final BigDecimal price; public final BigDecimal amount; public String order_type = "limit";
public PlaceOrderRequest(CexIOOrder.Type type, BigDecimal price, BigDecimal amount) { this.type = type; this.price = price; this.amount = amount; if (price == null){ this.order_type = "market"; } } }