Package com.xeiam.xchange.bitstamp.dto.account

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


  @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


    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

Related Classes of com.xeiam.xchange.bitstamp.dto.account.BitstampBooleanResponse$BitstampBooleanResponseDeserializer

Copyright © 2018 www.massapicom. 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.