Examples of BitstampBooleanResponse


Examples of com.xeiam.xchange.bitstamp.dto.account.BitstampBooleanResponse

  @Test
  public void verifyDeserialize() throws IOException {

    ObjectMapper mapper = new ObjectMapper();
    BitstampBooleanResponse response = mapper.readValue("{\"error\": \"User not verified\"}", BitstampBooleanResponse.class);

    Assert.assertEquals("User not verified", response.getError());

    response = mapper.readValue("true", BitstampBooleanResponse.class);

    Assert.assertTrue(response.getResponse());

  }
View Full Code Here

Examples of com.xeiam.xchange.bitstamp.dto.account.BitstampBooleanResponse

    return bitstampAuthenticated.buy(exchangeSpecification.getApiKey(), signatureCreator, BitstampUtils.getNonce(), tradableAmount, price);
  }

  public boolean cancelBitstampOrder(int orderId) throws IOException {

    final BitstampBooleanResponse response = bitstampAuthenticated.cancelOrder(exchangeSpecification.getApiKey(), signatureCreator, BitstampUtils.getNonce(), orderId);

    if (response.getError() != null) {
      throw new ExchangeException("Failed to cancel order " + orderId + " because " + response.getError());
    }

    return response.getResponse();
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.