Interface BTCTrade


@Path("/")
@Produces("application/json")
public interface BTCTrade
  • Method Details

    • getTicker

      @GET @Path("ticker") BTCTradeTicker getTicker() throws IOException
      Returns the quotations.
      Returns:
      the quotations.
      Throws:
      IOException
    • getDepth

      @GET @Path("depth") BTCTradeDepth getDepth() throws IOException
      Returns the depth of the market.
      Returns:
      the depth of the market.
      Throws:
      IOException
    • getTrades

      @GET @Path("trades") BTCTradeTrade[] getTrades() throws IOException
      Returns 500 recent market transactions, in reverse chronological order.
      Returns:
      500 recent market transactions.
      Throws:
      IOException
    • getTrades

      @GET @Path("trades") BTCTradeTrade[] getTrades​(@QueryParam("since") long since) throws IOException
      Returns 500 market transactions which trade ID is greater than since, in reverse chronological order.
      Parameters:
      since - the trade ID.
      Returns:
      500 market transactions which trade ID is grater than the given ID.
      Throws:
      IOException
    • getSecret

      @POST @Path("getsecret") BTCTradeSecretResponse getSecret​(@FormParam("api_passphrase") String passphrase, @FormParam("key") String key) throws IOException
      Returns the secret for signing.
      Parameters:
      passphrase - the API private key.
      key - the API public key.
      Returns:
      the secret for signing.
      Throws:
      IOException
    • getBalance

      @POST @Path("balance") BTCTradeBalance getBalance​(@FormParam("nonce") si.mazi.rescu.SynchronizedValueFactory<Long> nonce, @FormParam("key") String key, @FormParam("signature") si.mazi.rescu.ParamsDigest signature) throws IOException
      Returns the account balance.
      Parameters:
      nonce - the nonce.
      key - the API public key.
      signature - the signature
      Returns:
      the account balance.
      Throws:
      IOException
    • getWallet

      @POST @Path("wallet") BTCTradeWallet getWallet​(@FormParam("nonce") si.mazi.rescu.SynchronizedValueFactory<Long> nonce, @FormParam("key") String key, @FormParam("signature") si.mazi.rescu.ParamsDigest signature) throws IOException
      Returns the deposit address.
      Parameters:
      nonce - the nonce.
      key - the API public key.
      signature - the signature.
      Returns:
      the deposit address.
      Throws:
      IOException
    • getOrders

      @POST @Path("orders") BTCTradeOrder[] getOrders​(@FormParam("since") long since, @FormParam("type") String type, @FormParam("nonce") si.mazi.rescu.SynchronizedValueFactory<Long> nonce, @FormParam("key") String key, @FormParam("signature") si.mazi.rescu.ParamsDigest signature) throws IOException
      Return orders.
      Parameters:
      nonce - the nonce.
      key - the API public key.
      signature - the signature.
      since - unix timestamp(UTC timezone). Default is 0, returns all.
      type - the order type: open, all.
      Throws:
      IOException
    • getOrder

      @POST @Path("fetch_order") BTCTradeOrder getOrder​(@FormParam("id") String id, @FormParam("nonce") si.mazi.rescu.SynchronizedValueFactory<Long> nonce, @FormParam("key") String key, @FormParam("signature") si.mazi.rescu.ParamsDigest signature) throws IOException
      Returns order information.
      Parameters:
      nonce - the nonce.
      key - the API public key.
      signature - the signature.
      id - the order ID.
      Throws:
      IOException
    • cancelOrder

      @POST @Path("cancel_order") BTCTradeResult cancelOrder​(@FormParam("id") String id, @FormParam("nonce") si.mazi.rescu.SynchronizedValueFactory<Long> nonce, @FormParam("key") String key, @FormParam("signature") si.mazi.rescu.ParamsDigest signature) throws IOException
      Cancels order.
      Parameters:
      nonce - the nonce.
      key - the API public key.
      signature - the signature.
      id - the order ID.
      Throws:
      IOException
    • buy

      @POST @Path("buy") BTCTradePlaceOrderResult buy​(@FormParam("amount") String amount, @FormParam("price") String price, @FormParam("nonce") si.mazi.rescu.SynchronizedValueFactory<Long> nonce, @FormParam("key") String key, @FormParam("signature") si.mazi.rescu.ParamsDigest signature) throws IOException
      Places a buy order.
      Parameters:
      nonce - the nonce.
      key - the API public key.
      signature - the signature.
      amount - the quantity to buy.
      price - the price to buy.
      Throws:
      IOException
    • sell

      @POST @Path("sell") BTCTradePlaceOrderResult sell​(@FormParam("amount") String amount, @FormParam("price") String price, @FormParam("nonce") si.mazi.rescu.SynchronizedValueFactory<Long> nonce, @FormParam("key") String key, @FormParam("signature") si.mazi.rescu.ParamsDigest signature) throws IOException
      Places a sell order.
      Parameters:
      nonce - the nonce.
      key - the API public key.
      signature - the signature.
      amount - the quantity to sell.
      price - the price to sell.
      Throws:
      IOException