Interface BinanceAuthenticated

All Superinterfaces:
Binance

@Path("") @Produces("application/json") public interface BinanceAuthenticated extends Binance
  • Field Details

  • Method Details

    • newOrder

      @POST @Path("api/v3/order") BinanceNewOrder newOrder(@FormParam("symbol") String symbol, @FormParam("side") OrderSide side, @FormParam("type") OrderType type, @FormParam("timeInForce") TimeInForce timeInForce, @FormParam("quantity") BigDecimal quantity, @FormParam("quoteOrderQty") BigDecimal quoteOrderQty, @FormParam("price") BigDecimal price, @FormParam("newClientOrderId") String newClientOrderId, @FormParam("stopPrice") BigDecimal stopPrice, @FormParam("trailingDelta") Long trailingDelta, @FormParam("icebergQty") BigDecimal icebergQty, @FormParam("newOrderRespType") BinanceNewOrder.NewOrderResponseType newOrderRespType, @FormParam("recvWindow") Long recvWindow, @FormParam("timestamp") si.mazi.rescu.SynchronizedValueFactory<Long> timestamp, @HeaderParam("X-MBX-APIKEY") String apiKey, @QueryParam("signature") si.mazi.rescu.ParamsDigest signature) throws IOException, BinanceException
      Send in a new order
      Parameters:
      symbol -
      side -
      type -
      timeInForce -
      quantity -
      quoteOrderQty - optional
      price - optional, must be provided for limit orders only
      newClientOrderId - optional, a unique id for the order. Automatically generated if not sent.
      stopPrice - optional, used with stop orders
      trailingDelta - optional, used with STOP_LOSS, STOP_LOSS_LIMIT, TAKE_PROFIT, and TAKE_PROFIT_LIMIT orders
      icebergQty - optional, used with iceberg orders
      newOrderRespType - optional, MARKET and LIMIT order types default to FULL, all other orders default to ACK
      recvWindow - optional
      timestamp -
      Returns:
      Throws:
      IOException
      BinanceException
      See Also:
    • testNewOrder

      @POST @Path("api/v3/order/test") Object testNewOrder(@FormParam("symbol") String symbol, @FormParam("side") OrderSide side, @FormParam("type") OrderType type, @FormParam("timeInForce") TimeInForce timeInForce, @FormParam("quantity") BigDecimal quantity, @FormParam("quoteOrderQty") BigDecimal quoteOrderQty, @FormParam("price") BigDecimal price, @FormParam("newClientOrderId") String newClientOrderId, @FormParam("stopPrice") BigDecimal stopPrice, @FormParam("trailingDelta") Long trailingDelta, @FormParam("icebergQty") BigDecimal icebergQty, @FormParam("recvWindow") Long recvWindow, @FormParam("timestamp") si.mazi.rescu.SynchronizedValueFactory<Long> timestamp, @HeaderParam("X-MBX-APIKEY") String apiKey, @QueryParam("signature") si.mazi.rescu.ParamsDigest signature) throws IOException, BinanceException
      Test new order creation and signature/recvWindow long. Creates and validates a new order but does not send it into the matching engine.
      Parameters:
      symbol -
      side -
      type -
      timeInForce -
      quantity -
      quoteOrderQty - optional
      price -
      newClientOrderId - optional, a unique id for the order. Automatically generated by default.
      stopPrice - optional, used with STOP orders
      trailingDelta - optional, used with STOP_LOSS, STOP_LOSS_LIMIT, TAKE_PROFIT, and TAKE_PROFIT_LIMIT orders
      icebergQty - optional used with icebergOrders
      recvWindow - optional
      timestamp -
      Returns:
      Throws:
      IOException
      BinanceException
      See Also:
    • orderStatus

      @GET @Path("api/v3/order") BinanceOrder orderStatus(@QueryParam("symbol") String symbol, @QueryParam("orderId") long orderId, @QueryParam("origClientOrderId") String origClientOrderId, @QueryParam("recvWindow") Long recvWindow, @QueryParam("timestamp") si.mazi.rescu.SynchronizedValueFactory<Long> timestamp, @HeaderParam("X-MBX-APIKEY") String apiKey, @QueryParam("signature") si.mazi.rescu.ParamsDigest signature) throws IOException, BinanceException
      Check an order's status.
      Either orderId or origClientOrderId must be sent.
      Parameters:
      symbol -
      orderId - optional
      origClientOrderId - optional
      recvWindow - optional
      timestamp -
      apiKey -
      signature -
      Returns:
      Throws:
      IOException
      BinanceException
    • cancelOrder

      @DELETE @Path("api/v3/order") BinanceCancelledOrder cancelOrder(@QueryParam("symbol") String symbol, @QueryParam("orderId") long orderId, @QueryParam("origClientOrderId") String origClientOrderId, @QueryParam("newClientOrderId") String newClientOrderId, @QueryParam("recvWindow") Long recvWindow, @QueryParam("timestamp") si.mazi.rescu.SynchronizedValueFactory<Long> timestamp, @HeaderParam("X-MBX-APIKEY") String apiKey, @QueryParam("signature") si.mazi.rescu.ParamsDigest signature) throws IOException, BinanceException
      Cancel an active order.
      Parameters:
      symbol -
      orderId - optional
      origClientOrderId - optional
      newClientOrderId - optional, used to uniquely identify this cancel. Automatically generated by default.
      recvWindow - optional
      timestamp -
      apiKey -
      signature -
      Returns:
      Throws:
      IOException
      BinanceException
    • cancelAllOpenOrders

      @DELETE @Path("api/v3/openOrders") List<BinanceCancelledOrder> cancelAllOpenOrders(@QueryParam("symbol") String symbol, @QueryParam("recvWindow") Long recvWindow, @QueryParam("timestamp") si.mazi.rescu.SynchronizedValueFactory<Long> timestamp, @HeaderParam("X-MBX-APIKEY") String apiKey, @QueryParam("signature") si.mazi.rescu.ParamsDigest signature) throws IOException, BinanceException
      Cancels all active orders on a symbol. This includes OCO orders.
      Parameters:
      symbol -
      recvWindow - optional
      timestamp -
      Returns:
      Throws:
      IOException
      BinanceException
    • openOrders

      @GET @Path("api/v3/openOrders") List<BinanceOrder> openOrders(@QueryParam("symbol") String symbol, @QueryParam("recvWindow") Long recvWindow, @QueryParam("timestamp") si.mazi.rescu.SynchronizedValueFactory<Long> timestamp, @HeaderParam("X-MBX-APIKEY") String apiKey, @QueryParam("signature") si.mazi.rescu.ParamsDigest signature) throws IOException, BinanceException
      Get open orders on a symbol.
      Parameters:
      symbol - optional
      recvWindow - optional
      timestamp -
      Returns:
      Throws:
      IOException
      BinanceException
    • allOrders

      @GET @Path("api/v3/allOrders") List<BinanceOrder> allOrders(@QueryParam("symbol") String symbol, @QueryParam("orderId") Long orderId, @QueryParam("limit") Integer limit, @QueryParam("recvWindow") Long recvWindow, @QueryParam("timestamp") si.mazi.rescu.SynchronizedValueFactory<Long> timestamp, @HeaderParam("X-MBX-APIKEY") String apiKey, @QueryParam("signature") si.mazi.rescu.ParamsDigest signature) throws IOException, BinanceException
      Get all account orders; active, canceled, or filled.
      If orderId is set, it will get orders >= that orderId. Otherwise most recent orders are returned.
      Parameters:
      symbol -
      orderId - optional
      limit - optional
      recvWindow - optional
      timestamp -
      apiKey -
      signature -
      Returns:
      Throws:
      IOException
      BinanceException
    • account

      @GET @Path("api/v3/account") BinanceAccountInformation account(@QueryParam("recvWindow") Long recvWindow, @QueryParam("timestamp") si.mazi.rescu.SynchronizedValueFactory<Long> timestamp, @HeaderParam("X-MBX-APIKEY") String apiKey, @QueryParam("signature") si.mazi.rescu.ParamsDigest signature) throws IOException, BinanceException
      Get current account information.
      Parameters:
      recvWindow - optional
      timestamp -
      Returns:
      Throws:
      IOException
      BinanceException
    • myTrades

      @GET @Path("api/v3/myTrades") List<BinanceTrade> myTrades(@QueryParam("symbol") String symbol, @QueryParam("orderId") Long orderId, @QueryParam("startTime") Long startTime, @QueryParam("endTime") Long endTime, @QueryParam("fromId") Long fromId, @QueryParam("limit") Integer limit, @QueryParam("recvWindow") Long recvWindow, @QueryParam("timestamp") si.mazi.rescu.SynchronizedValueFactory<Long> timestamp, @HeaderParam("X-MBX-APIKEY") String apiKey, @QueryParam("signature") si.mazi.rescu.ParamsDigest signature) throws IOException, BinanceException
      Get trades for a specific account and symbol.
      Parameters:
      symbol -
      orderId - optional
      startTime - optional
      endTime - optional
      fromId - optional, tradeId to fetch from. Default gets most recent trades.
      limit - optional, default 500; max 1000.
      recvWindow - optional
      timestamp -
      apiKey -
      signature -
      Returns:
      Throws:
      IOException
      BinanceException
    • getDustLog

      @GET @Path("/sapi/v1/asset/dribblet") BinanceDustLog getDustLog(@QueryParam("startTime") Long startTime, @QueryParam("endTime") Long endTime, @QueryParam("recvWindow") Long recvWindow, @QueryParam("timestamp") si.mazi.rescu.SynchronizedValueFactory<Long> timestamp, @HeaderParam("X-MBX-APIKEY") String apiKey, @QueryParam("signature") si.mazi.rescu.ParamsDigest signature) throws IOException, BinanceException
      Retrieves the dust log from Binance. If you have many currencies with low amount (=dust) that cannot be traded, because their amount is less than the minimum amount required for trading them, you can convert all these currencies at once into BNB with the button "Convert Small Balance to BNB".
      Parameters:
      startTime - optional. If set, also the endTime must be set. If neither time is set, the 100 most recent dust logs are returned.
      endTime - optional. If set, also the startTime must be set. If neither time is set, the 100 most recent dust logs are returned.
      recvWindow - optional
      timestamp - mandatory
      Returns:
      Throws:
      IOException
      BinanceException
    • withdraw

      @POST @Path("/sapi/v1/capital/withdraw/apply") WithdrawResponse withdraw(@FormParam("coin") String coin, @FormParam("address") String address, @FormParam("addressTag") String addressTag, @FormParam("amount") BigDecimal amount, @FormParam("name") String name, @FormParam("recvWindow") Long recvWindow, @FormParam("timestamp") si.mazi.rescu.SynchronizedValueFactory<Long> timestamp, @HeaderParam("X-MBX-APIKEY") String apiKey, @QueryParam("signature") si.mazi.rescu.ParamsDigest signature) throws IOException, BinanceException
      Submit a withdraw request.
      Parameters:
      coin -
      address -
      addressTag - optional for Ripple
      amount -
      name - optional, description of the address
      recvWindow - optional
      timestamp -
      apiKey -
      signature -
      Returns:
      Throws:
      IOException
      BinanceException
    • depositHistory

      @GET @Path("/sapi/v1/capital/deposit/hisrec") List<BinanceDeposit> depositHistory(@QueryParam("coin") String coin, @QueryParam("startTime") Long startTime, @QueryParam("endTime") Long endTime, @QueryParam("recvWindow") Long recvWindow, @QueryParam("timestamp") si.mazi.rescu.SynchronizedValueFactory<Long> timestamp, @HeaderParam("X-MBX-APIKEY") String apiKey, @QueryParam("signature") si.mazi.rescu.ParamsDigest signature) throws IOException, BinanceException
      Fetch deposit history.
      Parameters:
      coin - optional
      startTime - optional
      endTime - optional
      recvWindow - optional
      timestamp -
      apiKey -
      signature -
      Returns:
      Throws:
      IOException
      BinanceException
    • withdrawHistory

      @GET @Path("/sapi/v1/capital/withdraw/history") List<BinanceWithdraw> withdrawHistory(@QueryParam("coin") String coin, @QueryParam("startTime") Long startTime, @QueryParam("endTime") Long endTime, @QueryParam("recvWindow") Long recvWindow, @QueryParam("timestamp") si.mazi.rescu.SynchronizedValueFactory<Long> timestamp, @HeaderParam("X-MBX-APIKEY") String apiKey, @QueryParam("signature") si.mazi.rescu.ParamsDigest signature) throws IOException, BinanceException
      Fetch withdraw history.
      Parameters:
      coin - optional
      startTime - optional
      endTime - optional
      recvWindow - optional
      timestamp -
      apiKey -
      signature -
      Returns:
      Throws:
      IOException
      BinanceException
    • assetDividend

      @GET @Path("/sapi/v1/asset/assetDividend") AssetDividendResponse assetDividend(@QueryParam("asset") String asset, @QueryParam("startTime") Long startTime, @QueryParam("endTime") Long endTime, @QueryParam("recvWindow") Long recvWindow, @QueryParam("timestamp") si.mazi.rescu.SynchronizedValueFactory<Long> timestamp, @HeaderParam("X-MBX-APIKEY") String apiKey, @QueryParam("signature") si.mazi.rescu.ParamsDigest signature) throws IOException, BinanceException
      Fetch small amounts of assets exchanged BNB records.
      Parameters:
      asset - optional
      startTime - optional
      endTime - optional
      recvWindow - optional
      timestamp -
      apiKey -
      signature -
      Returns:
      Throws:
      IOException
      BinanceException
    • transferHistory

      @GET @Path("/sapi/v1/sub-account/sub/transfer/history") List<TransferHistory> transferHistory(@QueryParam("fromEmail") String fromEmail, @QueryParam("startTime") Long startTime, @QueryParam("endTime") Long endTime, @QueryParam("page") Integer page, @QueryParam("limit") Integer limit, @QueryParam("recvWindow") Long recvWindow, @QueryParam("timestamp") si.mazi.rescu.SynchronizedValueFactory<Long> timestamp, @HeaderParam("X-MBX-APIKEY") String apiKey, @QueryParam("signature") si.mazi.rescu.ParamsDigest signature) throws IOException, BinanceException
      Throws:
      IOException
      BinanceException
    • transferSubUserHistory

      @GET @Path("/sapi/v1/sub-account/transfer/subUserHistory") List<TransferSubUserHistory> transferSubUserHistory(@QueryParam("asset") String asset, @QueryParam("type") Integer type, @QueryParam("startTime") Long startTime, @QueryParam("endTime") Long endTime, @QueryParam("limit") Integer limit, @QueryParam("recvWindow") Long recvWindow, @QueryParam("timestamp") si.mazi.rescu.SynchronizedValueFactory<Long> timestamp, @HeaderParam("X-MBX-APIKEY") String apiKey, @QueryParam("signature") si.mazi.rescu.ParamsDigest signature) throws IOException, BinanceException
      Throws:
      IOException
      BinanceException
    • depositAddress

      @GET @Path("/sapi/v1/capital/deposit/address") DepositAddress depositAddress(@QueryParam("coin") String coin, @QueryParam("recvWindow") Long recvWindow, @QueryParam("timestamp") si.mazi.rescu.SynchronizedValueFactory<Long> timestamp, @HeaderParam("X-MBX-APIKEY") String apiKey, @QueryParam("signature") si.mazi.rescu.ParamsDigest signature) throws IOException, BinanceException
      Fetch deposit address.
      Parameters:
      coin -
      recvWindow -
      timestamp -
      apiKey -
      signature -
      Returns:
      Throws:
      IOException
      BinanceException
    • assetDetail

      @GET @Path("/sapi/v1/asset/assetDetail") Map<String,AssetDetail> assetDetail(@QueryParam("recvWindow") Long recvWindow, @QueryParam("timestamp") si.mazi.rescu.SynchronizedValueFactory<Long> timestamp, @HeaderParam("X-MBX-APIKEY") String apiKey, @QueryParam("signature") si.mazi.rescu.ParamsDigest signature) throws IOException, BinanceException
      Fetch asset details.
      Parameters:
      recvWindow -
      timestamp -
      apiKey -
      signature -
      Returns:
      Throws:
      IOException
      BinanceException
    • startUserDataStream

      @POST @Path("/api/v3/userDataStream") BinanceListenKey startUserDataStream(@HeaderParam("X-MBX-APIKEY") String apiKey) throws IOException, BinanceException
      Returns a listen key for websocket login.
      Parameters:
      apiKey - the api key
      Returns:
      Throws:
      BinanceException
      IOException
    • keepAliveUserDataStream

      @PUT @Path("/api/v3/userDataStream?listenKey={listenKey}") Map<?,?> keepAliveUserDataStream(@HeaderParam("X-MBX-APIKEY") String apiKey, @PathParam("listenKey") String listenKey) throws IOException, BinanceException
      Keeps the authenticated websocket session alive.
      Parameters:
      apiKey - the api key
      listenKey - the api secret
      Returns:
      Throws:
      BinanceException
      IOException
    • closeUserDataStream

      @DELETE @Path("/api/v3/userDataStream?listenKey={listenKey}") Map<?,?> closeUserDataStream(@HeaderParam("X-MBX-APIKEY") String apiKey, @PathParam("listenKey") String listenKey) throws IOException, BinanceException
      Closes the websocket authenticated connection.
      Parameters:
      apiKey - the api key
      listenKey - the api secret
      Returns:
      Throws:
      BinanceException
      IOException