Package org.knowm.xchange.binance
Interface BinanceFuturesAuthenticated
- All Superinterfaces:
BinanceFutures
@Path("")
@Produces("application/json")
public interface BinanceFuturesAuthenticated
extends BinanceFutures
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptioncancelAllFutureOpenOrders
(String symbol, Long recvWindow, si.mazi.rescu.SynchronizedValueFactory<Long> timestamp, String apiKey, si.mazi.rescu.ParamsDigest signature) Cancels all active orders on a symbol.cancelFutureOrder
(String symbol, long orderId, String origClientOrderId, Long recvWindow, si.mazi.rescu.SynchronizedValueFactory<Long> timestamp, String apiKey, si.mazi.rescu.ParamsDigest signature) Cancel an active futures order.cancelInverseFutureOrder
(String symbol, long orderId, String origClientOrderId, Long recvWindow, si.mazi.rescu.SynchronizedValueFactory<Long> timestamp, String apiKey, si.mazi.rescu.ParamsDigest signature) Cancel an active inverse futures order.cancelPortfolioMarginFutureOrder
(String symbol, long orderId, String origClientOrderId, Long recvWindow, si.mazi.rescu.SynchronizedValueFactory<Long> timestamp, String apiKey, si.mazi.rescu.ParamsDigest signature) Cancel an active portfolio margin futures order.cancelPortfolioMarginInverseFutureOrder
(String symbol, long orderId, String origClientOrderId, Long recvWindow, si.mazi.rescu.SynchronizedValueFactory<Long> timestamp, String apiKey, si.mazi.rescu.ParamsDigest signature) Cancel an active inverse portfolio margin futures order.futureInverseOrderStatus
(String symbol, long orderId, String origClientOrderId, Long recvWindow, si.mazi.rescu.SynchronizedValueFactory<Long> timestamp, String apiKey, si.mazi.rescu.ParamsDigest signature) Check an inverse order's status.
Either orderId or origClientOrderId must be sent.futureOpenInverseOrders
(String symbol, Long recvWindow, si.mazi.rescu.SynchronizedValueFactory<Long> timestamp, String apiKey, si.mazi.rescu.ParamsDigest signature) Get future open orders on a symbol.futureOpenOrders
(String symbol, Long recvWindow, si.mazi.rescu.SynchronizedValueFactory<Long> timestamp, String apiKey, si.mazi.rescu.ParamsDigest signature) Get future open orders on a symbol.futureOpenPortfolioMarginInverseOrders
(String symbol, Long recvWindow, si.mazi.rescu.SynchronizedValueFactory<Long> timestamp, String apiKey, si.mazi.rescu.ParamsDigest signature) Get future open portfolio margin orders on a symbol.futureOpenPortfolioMarginOrders
(String symbol, Long recvWindow, si.mazi.rescu.SynchronizedValueFactory<Long> timestamp, String apiKey, si.mazi.rescu.ParamsDigest signature) Get future open portfolio margin orders on a symbol.futureOrderStatus
(String symbol, long orderId, String origClientOrderId, Long recvWindow, si.mazi.rescu.SynchronizedValueFactory<Long> timestamp, String apiKey, si.mazi.rescu.ParamsDigest signature) Check an order's status.
Either orderId or origClientOrderId must be sent.futurePortfolioMarginInverseOrderStatus
(String symbol, long orderId, String origClientOrderId, Long recvWindow, si.mazi.rescu.SynchronizedValueFactory<Long> timestamp, String apiKey, si.mazi.rescu.ParamsDigest signature) Check a portfolio margin inverse/coin margin order's status.
Either orderId or origClientOrderId must be sent.futurePortfolioMarginOrderStatus
(String symbol, long orderId, String origClientOrderId, Long recvWindow, si.mazi.rescu.SynchronizedValueFactory<Long> timestamp, String apiKey, si.mazi.rescu.ParamsDigest signature) Check a portfolio margin order's status.
Either orderId or origClientOrderId must be sent.futuresAccount
(Long recvWindow, si.mazi.rescu.SynchronizedValueFactory<Long> timestamp, String apiKey, si.mazi.rescu.ParamsDigest signature) Get current futures account information.myFutureTrades
(String symbol, Long orderId, Long startTime, Long endTime, Long fromId, Integer limit, Long recvWindow, si.mazi.rescu.SynchronizedValueFactory<Long> timestamp, String apiKey, si.mazi.rescu.ParamsDigest signature) Get trades for a specific account and symbol.newInverseOrder
(String symbol, OrderSide side, OrderType type, TimeInForce timeInForce, BigDecimal quantity, boolean reduceOnly, BigDecimal price, String newClientOrderId, BigDecimal stopPrice, boolean closePosition, BigDecimal activationPrice, BigDecimal callbackRate, BinanceNewOrder.NewOrderResponseType newOrderRespType, Long recvWindow, si.mazi.rescu.SynchronizedValueFactory<Long> timestamp, String apiKey, si.mazi.rescu.ParamsDigest signature) Send in a new inverse futures ordernewOrder
(String symbol, OrderSide side, OrderType type, TimeInForce timeInForce, BigDecimal quantity, boolean reduceOnly, BigDecimal price, String newClientOrderId, BigDecimal stopPrice, boolean closePosition, BigDecimal activationPrice, BigDecimal callbackRate, BinanceNewOrder.NewOrderResponseType newOrderRespType, Long recvWindow, si.mazi.rescu.SynchronizedValueFactory<Long> timestamp, String apiKey, si.mazi.rescu.ParamsDigest signature) Send in a new futures ordernewPortfolioMarginInverseOrder
(String symbol, OrderSide side, OrderType type, TimeInForce timeInForce, BigDecimal quantity, boolean reduceOnly, BigDecimal price, String newClientOrderId, BinanceNewOrder.NewOrderResponseType newOrderRespType, Long recvWindow, si.mazi.rescu.SynchronizedValueFactory<Long> timestamp, String apiKey, si.mazi.rescu.ParamsDigest signature) Send in a new coin based (inverse) futures order to portfolio margin enginenewPortfolioMarginLinearOrder
(String symbol, OrderSide side, OrderType type, TimeInForce timeInForce, BigDecimal quantity, boolean reduceOnly, BigDecimal price, String newClientOrderId, BinanceNewOrder.NewOrderResponseType newOrderRespType, Long recvWindow, si.mazi.rescu.SynchronizedValueFactory<Long> timestamp, String apiKey, si.mazi.rescu.ParamsDigest signature) Send in a new USD based (linear) futures order to portfolio margin engineMethods inherited from interface org.knowm.xchange.binance.BinanceFutures
aggTrades, depth, exchangeInfo, fundingRate, fundingRates, systemStatus, ticker24h, ticker24h
-
Field Details
-
SIGNATURE
- See Also:
-
X_MBX_APIKEY
- See Also:
-
-
Method Details
-
futuresAccount
@GET @Path("fapi/v2/account") BinanceFutureAccountInformation futuresAccount(@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 futures account information.- Parameters:
recvWindow
- optionaltimestamp
-- Returns:
- Throws:
IOException
BinanceException
-
newOrder
@POST @Path("fapi/v1/order") BinanceFutureNewOrder newOrder(@FormParam("symbol") String symbol, @FormParam("side") OrderSide side, @FormParam("type") OrderType type, @FormParam("timeInForce") TimeInForce timeInForce, @FormParam("quantity") BigDecimal quantity, @FormParam("reduceOnly") boolean reduceOnly, @FormParam("price") BigDecimal price, @FormParam("newClientOrderId") String newClientOrderId, @FormParam("stopPrice") BigDecimal stopPrice, @FormParam("closePosition") boolean closePosition, @FormParam("activationPrice") BigDecimal activationPrice, @FormParam("callbackRate") BigDecimal callbackRate, @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 futures order- Parameters:
symbol
-side
-type
-timeInForce
-quantity
-price
- optional, must be provided for limit orders onlynewClientOrderId
- optional, a unique id for the order. Automatically generated if not sent.stopPrice
- optional, used with stop ordersnewOrderRespType
- optional, MARKET and LIMIT order types default to FULL, all other orders default to ACKrecvWindow
- optionaltimestamp
-- Returns:
- Throws:
IOException
BinanceException
- See Also:
-
newInverseOrder
@POST @Path("dapi/v1/order") BinanceFutureNewOrder newInverseOrder(@FormParam("symbol") String symbol, @FormParam("side") OrderSide side, @FormParam("type") OrderType type, @FormParam("timeInForce") TimeInForce timeInForce, @FormParam("quantity") BigDecimal quantity, @FormParam("reduceOnly") boolean reduceOnly, @FormParam("price") BigDecimal price, @FormParam("newClientOrderId") String newClientOrderId, @FormParam("stopPrice") BigDecimal stopPrice, @FormParam("closePosition") boolean closePosition, @FormParam("activationPrice") BigDecimal activationPrice, @FormParam("callbackRate") BigDecimal callbackRate, @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 inverse futures order- Parameters:
symbol
-side
-type
-timeInForce
-quantity
-price
- optional, must be provided for limit orders onlynewClientOrderId
- optional, a unique id for the order. Automatically generated if not sent.stopPrice
- optional, used with stop ordersnewOrderRespType
- optional, MARKET and LIMIT order types default to FULL, all other orders default to ACKrecvWindow
- optionaltimestamp
-- Returns:
- Throws:
IOException
BinanceException
- See Also:
-
newPortfolioMarginLinearOrder
@POST @Path("papi/v1/um/order") BinanceFutureNewOrder newPortfolioMarginLinearOrder(@FormParam("symbol") String symbol, @FormParam("side") OrderSide side, @FormParam("type") OrderType type, @FormParam("timeInForce") TimeInForce timeInForce, @FormParam("quantity") BigDecimal quantity, @FormParam("reduceOnly") boolean reduceOnly, @FormParam("price") BigDecimal price, @FormParam("newClientOrderId") String newClientOrderId, @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 USD based (linear) futures order to portfolio margin engine- Parameters:
symbol
-side
-type
-timeInForce
-quantity
-price
- optional, must be provided for limit orders onlynewClientOrderId
- optional, a unique id for the order. Automatically generated if not sent.newOrderRespType
- optional, MARKET and LIMIT order types default to FULL, all other orders default to ACKrecvWindow
- optionaltimestamp
-- Returns:
- Throws:
IOException
BinanceException
- See Also:
-
newPortfolioMarginInverseOrder
@POST @Path("papi/v1/cm/order") BinanceFutureNewOrder newPortfolioMarginInverseOrder(@FormParam("symbol") String symbol, @FormParam("side") OrderSide side, @FormParam("type") OrderType type, @FormParam("timeInForce") TimeInForce timeInForce, @FormParam("quantity") BigDecimal quantity, @FormParam("reduceOnly") boolean reduceOnly, @FormParam("price") BigDecimal price, @FormParam("newClientOrderId") String newClientOrderId, @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 coin based (inverse) futures order to portfolio margin engine- Parameters:
symbol
-side
-type
-timeInForce
-quantity
-price
- optional, must be provided for limit orders onlynewClientOrderId
- optional, a unique id for the order. Automatically generated if not sent.newOrderRespType
- optional, MARKET and LIMIT order types default to FULL, all other orders default to ACKrecvWindow
- optionaltimestamp
-- Returns:
- Throws:
IOException
BinanceException
- See Also:
-
cancelFutureOrder
@DELETE @Path("fapi/v1/order") BinanceCancelledOrder cancelFutureOrder(@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 Cancel an active futures order.- Parameters:
symbol
-orderId
- optionalorigClientOrderId
- optional generated by default.recvWindow
- optionaltimestamp
-apiKey
-signature
-- Returns:
- Throws:
IOException
BinanceException
-
cancelInverseFutureOrder
@DELETE @Path("dapi/v1/order") BinanceCancelledOrder cancelInverseFutureOrder(@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 Cancel an active inverse futures order.- Parameters:
symbol
-orderId
- optionalorigClientOrderId
- optional generated by default.recvWindow
- optionaltimestamp
-apiKey
-signature
-- Returns:
- Throws:
IOException
BinanceException
-
cancelPortfolioMarginInverseFutureOrder
@DELETE @Path("papi/v1/cm/order") BinanceCancelledOrder cancelPortfolioMarginInverseFutureOrder(@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 Cancel an active inverse portfolio margin futures order.- Parameters:
symbol
-orderId
- optionalorigClientOrderId
- optional generated by default.recvWindow
- optionaltimestamp
-apiKey
-signature
-- Returns:
- Throws:
IOException
BinanceException
-
cancelPortfolioMarginFutureOrder
@DELETE @Path("papi/v1/um/order") BinanceCancelledOrder cancelPortfolioMarginFutureOrder(@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 Cancel an active portfolio margin futures order.- Parameters:
symbol
-orderId
- optionalorigClientOrderId
- optional generated by default.recvWindow
- optionaltimestamp
-apiKey
-signature
-- Returns:
- Throws:
IOException
BinanceException
-
futureOpenOrders
@GET @Path("fapi/v1/openOrders") List<BinanceOrder> futureOpenOrders(@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 future open orders on a symbol.- Parameters:
symbol
- optionalrecvWindow
- optionaltimestamp
-- Returns:
- Throws:
IOException
BinanceException
-
futureOpenInverseOrders
@GET @Path("dapi/v1/openOrders") List<BinanceOrder> futureOpenInverseOrders(@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 future open orders on a symbol.- Parameters:
symbol
- optionalrecvWindow
- optionaltimestamp
-- Returns:
- Throws:
IOException
BinanceException
-
futureOpenPortfolioMarginOrders
@GET @Path("/papi/v1/um/openOrders ") List<BinanceOrder> futureOpenPortfolioMarginOrders(@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 future open portfolio margin orders on a symbol.- Parameters:
symbol
- optionalrecvWindow
- optionaltimestamp
-- Returns:
- Throws:
IOException
BinanceException
-
futureOpenPortfolioMarginInverseOrders
@GET @Path("/papi/v1/cm/openOrders") List<BinanceOrder> futureOpenPortfolioMarginInverseOrders(@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 future open portfolio margin orders on a symbol.- Parameters:
symbol
- optionalrecvWindow
- optionaltimestamp
-- Returns:
- Throws:
IOException
BinanceException
-
myFutureTrades
@GET @Path("fapi/v1/userTrades") List<BinanceTrade> myFutureTrades(@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
- optionalstartTime
- optionalendTime
- optionalfromId
- optional, tradeId to fetch from. Default gets most recent trades.limit
- optional, default 500; max 1000.recvWindow
- optionaltimestamp
-apiKey
-signature
-- Returns:
- Throws:
IOException
BinanceException
-
futureOrderStatus
@GET @Path("fapi/v1/order") BinanceOrder futureOrderStatus(@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
- optionalorigClientOrderId
- optionalrecvWindow
- optionaltimestamp
-apiKey
-signature
-- Returns:
- Throws:
IOException
BinanceException
-
futureInverseOrderStatus
@GET @Path("dapi/v1/order") BinanceOrder futureInverseOrderStatus(@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 inverse order's status.
Either orderId or origClientOrderId must be sent.- Parameters:
symbol
-orderId
- optionalorigClientOrderId
- optionalrecvWindow
- optionaltimestamp
-apiKey
-signature
-- Returns:
- Throws:
IOException
BinanceException
-
futurePortfolioMarginOrderStatus
@GET @Path("/papi/v1/um/order") BinanceOrder futurePortfolioMarginOrderStatus(@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 a portfolio margin order's status.
Either orderId or origClientOrderId must be sent.- Parameters:
symbol
-orderId
- optionalorigClientOrderId
- optionalrecvWindow
- optionaltimestamp
-apiKey
-signature
-- Returns:
- Throws:
IOException
BinanceException
-
futurePortfolioMarginInverseOrderStatus
@GET @Path("/papi/v1/cm/order") BinanceOrder futurePortfolioMarginInverseOrderStatus(@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 a portfolio margin inverse/coin margin order's status.
Either orderId or origClientOrderId must be sent.- Parameters:
symbol
-orderId
- optionalorigClientOrderId
- optionalrecvWindow
- optionaltimestamp
-apiKey
-signature
-- Returns:
- Throws:
IOException
BinanceException
-
cancelAllFutureOpenOrders
@DELETE @Path("fapi/v1/allOpenOrders") List<BinanceCancelledOrder> cancelAllFutureOpenOrders(@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
- optionaltimestamp
-- Returns:
- Throws:
IOException
BinanceException
-