Package org.knowm.xchange.binance
Interface BinanceAuthenticated
-
-
Field Summary
Fields Modifier and Type Field Description static String
SIGNATURE
static String
X_MBX_APIKEY
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description BinanceAccountInformation
account(Long recvWindow, si.mazi.rescu.SynchronizedValueFactory<Long> timestamp, String apiKey, si.mazi.rescu.ParamsDigest signature)
List<BinanceOrder>
allOrders(String symbol, Long orderId, Integer limit, Long recvWindow, si.mazi.rescu.SynchronizedValueFactory<Long> timestamp, String apiKey, si.mazi.rescu.ParamsDigest signature)
AssetDetailResponse
assetDetail(Long recvWindow, si.mazi.rescu.SynchronizedValueFactory<Long> timestamp, String apiKey, si.mazi.rescu.ParamsDigest signature)
AssetDividendResponse
assetDividend(String asset, Long startTime, Long endTime, Long recvWindow, si.mazi.rescu.SynchronizedValueFactory<Long> timestamp, String apiKey, si.mazi.rescu.ParamsDigest signature)
Fetch small amounts of assets exchanged BNB records.List<BinanceCancelledOrder>
cancelAllOpenOrders(String symbol, Long recvWindow, si.mazi.rescu.SynchronizedValueFactory<Long> timestamp, String apiKey, si.mazi.rescu.ParamsDigest signature)
BinanceCancelledOrder
cancelOrder(String symbol, long orderId, String origClientOrderId, String newClientOrderId, Long recvWindow, si.mazi.rescu.SynchronizedValueFactory<Long> timestamp, String apiKey, si.mazi.rescu.ParamsDigest signature)
Map<?,?>
closeUserDataStream(String apiKey, String listenKey)
Closes the websocket authenticated connection.DepositAddress
depositAddress(String asset, Long recvWindow, si.mazi.rescu.SynchronizedValueFactory<Long> timestamp, String apiKey, si.mazi.rescu.ParamsDigest signature)
DepositList
depositHistory(String asset, Long startTime, Long endTime, Long recvWindow, si.mazi.rescu.SynchronizedValueFactory<Long> timestamp, String apiKey, si.mazi.rescu.ParamsDigest signature)
Map<?,?>
keepAliveUserDataStream(String apiKey, String listenKey)
Keeps the authenticated websocket session alive.List<BinanceTrade>
myTrades(String symbol, Integer limit, Long startTime, Long endTime, Long fromId, Long recvWindow, si.mazi.rescu.SynchronizedValueFactory<Long> timestamp, String apiKey, si.mazi.rescu.ParamsDigest signature)
BinanceNewOrder
newOrder(String symbol, OrderSide side, OrderType type, TimeInForce timeInForce, BigDecimal quantity, BigDecimal price, String newClientOrderId, BigDecimal stopPrice, BigDecimal icebergQty, Long recvWindow, si.mazi.rescu.SynchronizedValueFactory<Long> timestamp, String apiKey, si.mazi.rescu.ParamsDigest signature)
List<BinanceOrder>
openOrders(String symbol, Long recvWindow, si.mazi.rescu.SynchronizedValueFactory<Long> timestamp, String apiKey, si.mazi.rescu.ParamsDigest signature)
BinanceOrder
orderStatus(String symbol, long orderId, String origClientOrderId, Long recvWindow, si.mazi.rescu.SynchronizedValueFactory<Long> timestamp, String apiKey, si.mazi.rescu.ParamsDigest signature)
BinanceListenKey
startUserDataStream(String apiKey)
Returns a listen key for websocket login.Object
testNewOrder(String symbol, OrderSide side, OrderType type, TimeInForce timeInForce, BigDecimal quantity, BigDecimal price, String newClientOrderId, BigDecimal stopPrice, BigDecimal icebergQty, Long recvWindow, si.mazi.rescu.SynchronizedValueFactory<Long> timestamp, String apiKey, si.mazi.rescu.ParamsDigest signature)
TransferHistoryResponse
transferHistory(String email, Long startTime, Long endTime, Integer page, Integer limit, Long recvWindow, si.mazi.rescu.SynchronizedValueFactory<Long> timestamp, String apiKey, si.mazi.rescu.ParamsDigest signature)
List<TransferSubUserHistory>
transferSubUserHistory(String asset, Integer type, Long startTime, Long endTime, Integer limit, Long recvWindow, si.mazi.rescu.SynchronizedValueFactory<Long> timestamp, String apiKey, si.mazi.rescu.ParamsDigest signature)
AssetDribbletLogResponse
userAssetDribbletLog(Long recvWindow, si.mazi.rescu.SynchronizedValueFactory<Long> timestamp, String apiKey, si.mazi.rescu.ParamsDigest signature)
Fetch small amounts of assets exchanged BNB records.WithdrawRequest
withdraw(String asset, String address, String addressTag, BigDecimal amount, String name, Long recvWindow, si.mazi.rescu.SynchronizedValueFactory<Long> timestamp, String apiKey, si.mazi.rescu.ParamsDigest signature)
WithdrawList
withdrawHistory(String asset, Long startTime, Long endTime, Long recvWindow, si.mazi.rescu.SynchronizedValueFactory<Long> timestamp, String apiKey, si.mazi.rescu.ParamsDigest signature)
-
Methods inherited from interface org.knowm.xchange.binance.Binance
aggTrades, depth, exchangeInfo, klines, ping, systemStatus, ticker24h, ticker24h, tickerAllBookTickers, tickerAllPrices, tickerPrice, time
-
-
-
-
Field Detail
-
SIGNATURE
static final String SIGNATURE
- See Also:
- Constant Field Values
-
X_MBX_APIKEY
static final String X_MBX_APIKEY
- See Also:
- Constant Field Values
-
-
Method Detail
-
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("price") BigDecimal price, @FormParam("newClientOrderId") String newClientOrderId, @FormParam("stopPrice") BigDecimal stopPrice, @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
- Throws:
IOException
BinanceException
-
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("price") BigDecimal price, @FormParam("newClientOrderId") String newClientOrderId, @FormParam("stopPrice") BigDecimal stopPrice, @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
- Throws:
IOException
BinanceException
-
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
- 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
- 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
- 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
- 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
- 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
- Throws:
IOException
BinanceException
-
myTrades
@GET @Path("api/v3/myTrades") List<BinanceTrade> myTrades(@QueryParam("symbol") String symbol, @QueryParam("limit") Integer limit, @QueryParam("startTime") Long startTime, @QueryParam("endTime") Long endTime, @QueryParam("fromId") Long fromId, @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
-
withdraw
@POST @Path("wapi/v3/withdraw.html") WithdrawRequest withdraw(@QueryParam("asset") String asset, @QueryParam("address") String address, @QueryParam("addressTag") String addressTag, @QueryParam("amount") BigDecimal amount, @QueryParam("name") String name, @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
-
depositHistory
@GET @Path("wapi/v3/depositHistory.html") DepositList depositHistory(@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
- Throws:
IOException
BinanceException
-
withdrawHistory
@GET @Path("wapi/v3/withdrawHistory.html") WithdrawList withdrawHistory(@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
- Throws:
IOException
BinanceException
-
userAssetDribbletLog
@GET @Path("/wapi/v3/userAssetDribbletLog.html") AssetDribbletLogResponse userAssetDribbletLog(@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:
recvWindow
- optionaltimestamp
-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
- optionalstartTime
- optionalendTime
- optionalrecvWindow
- optionaltimestamp
-apiKey
-signature
-- Returns:
- Throws:
IOException
BinanceException
-
transferHistory
@GET @Path("/wapi/v3/sub-account/transfer/history.html") TransferHistoryResponse transferHistory(@QueryParam("email") String email, @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("wapi/v3/depositAddress.html") DepositAddress depositAddress(@QueryParam("asset") String asset, @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
-
assetDetail
@GET @Path("wapi/v3/assetDetail.html") AssetDetailResponse 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
- 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 keylistenKey
- 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 keylistenKey
- the api secret- Returns:
- Throws:
BinanceException
IOException
-
-