Class BinanceTradeServiceRaw
java.lang.Object
org.knowm.xchange.service.BaseExchangeService<E>
org.knowm.xchange.service.BaseResilientExchangeService<BinanceExchange>
org.knowm.xchange.binance.service.BinanceBaseService
org.knowm.xchange.binance.service.BinanceTradeServiceRaw
- Direct Known Subclasses:
BinanceTradeService
-
Field Summary
Fields inherited from class org.knowm.xchange.binance.service.BinanceBaseService
apiKey, binance, binanceFutures, inverseBinanceFutures, LOG, signatureCreator
Fields inherited from class org.knowm.xchange.service.BaseResilientExchangeService
resilienceRegistries
Fields inherited from class org.knowm.xchange.service.BaseExchangeService
exchange
-
Constructor Summary
ModifierConstructorDescriptionprotected
BinanceTradeServiceRaw
(BinanceExchange exchange, ResilienceRegistries resilienceRegistries) -
Method Summary
Modifier and TypeMethodDescriptionallOrders
(CurrencyPair pair, Long orderId, Integer limit) cancelOrderAllProducts
(Instrument pair, Long orderId, String origClientOrderId, String newClientOrderId) void
closeDataStream
(String listenKey) getDustLog
(Long startTime, Long endTime) Retrieves the dust log from Binance.void
keepAliveDataStream
(String listenKey) myTradesAllProducts
(Instrument pair, Long orderId, Long startTime, Long endTime, Long fromId, Integer limit) protected int
myTradesPermits
(Integer limit) newFutureOrder
(Instrument pair, 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) newInverseFutureOrder
(Instrument pair, 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) newOrder
(Instrument pair, OrderSide side, OrderType type, TimeInForce timeInForce, BigDecimal quantity, BigDecimal quoteOrderQty, BigDecimal price, String newClientOrderId, BigDecimal stopPrice, Long trailingDelta, BigDecimal icebergQty, BinanceNewOrder.NewOrderResponseType newOrderRespType) newPortfolioMarginFutureOrder
(Instrument pair, OrderSide side, OrderType type, TimeInForce timeInForce, BigDecimal quantity, boolean reduceOnly, BigDecimal price, String newClientOrderId, BinanceNewOrder.NewOrderResponseType newOrderRespType) newPortfolioMarginInverseFutureOrder
(Instrument pair, OrderSide side, OrderType type, TimeInForce timeInForce, BigDecimal quantity, boolean reduceOnly, BigDecimal price, String newClientOrderId, BinanceNewOrder.NewOrderResponseType newOrderRespType) protected int
openOrdersPermits
(Instrument pair) orderStatusAllProducts
(Instrument pair, Long orderId, String origClientOrderId) void
testNewOrder
(Instrument pair, OrderSide side, OrderType type, TimeInForce timeInForce, BigDecimal quantity, BigDecimal quoteOrderQty, BigDecimal price, String newClientOrderId, BigDecimal stopPrice, Long trailingDelta, BigDecimal icebergQty) Methods inherited from class org.knowm.xchange.binance.service.BinanceBaseService
getRecvWindow, getSystemStatus, getTimestampFactory
Methods inherited from class org.knowm.xchange.service.BaseResilientExchangeService
decorateApiCall, rateLimiter, rateLimiter, retry, retry
Methods inherited from class org.knowm.xchange.service.BaseExchangeService
verifyOrder, verifyOrder, verifyOrder
-
Constructor Details
-
BinanceTradeServiceRaw
protected BinanceTradeServiceRaw(BinanceExchange exchange, ResilienceRegistries resilienceRegistries)
-
-
Method Details
-
openOrdersAllProducts
- Throws:
BinanceException
IOException
-
openOrdersAllProducts
public List<BinanceOrder> openOrdersAllProducts(Instrument pair) throws BinanceException, IOException - Throws:
BinanceException
IOException
-
newOrder
public BinanceNewOrder newOrder(Instrument pair, OrderSide side, OrderType type, TimeInForce timeInForce, BigDecimal quantity, BigDecimal quoteOrderQty, BigDecimal price, String newClientOrderId, BigDecimal stopPrice, Long trailingDelta, BigDecimal icebergQty, BinanceNewOrder.NewOrderResponseType newOrderRespType) throws IOException, BinanceException - Throws:
IOException
BinanceException
-
newPortfolioMarginFutureOrder
public BinanceFutureNewOrder newPortfolioMarginFutureOrder(Instrument pair, OrderSide side, OrderType type, TimeInForce timeInForce, BigDecimal quantity, boolean reduceOnly, BigDecimal price, String newClientOrderId, BinanceNewOrder.NewOrderResponseType newOrderRespType) throws IOException, BinanceException - Throws:
IOException
BinanceException
-
newPortfolioMarginInverseFutureOrder
public BinanceFutureNewOrder newPortfolioMarginInverseFutureOrder(Instrument pair, OrderSide side, OrderType type, TimeInForce timeInForce, BigDecimal quantity, boolean reduceOnly, BigDecimal price, String newClientOrderId, BinanceNewOrder.NewOrderResponseType newOrderRespType) throws IOException, BinanceException - Throws:
IOException
BinanceException
-
newFutureOrder
public BinanceFutureNewOrder newFutureOrder(Instrument pair, 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) throws IOException, BinanceException - Throws:
IOException
BinanceException
-
newInverseFutureOrder
public BinanceFutureNewOrder newInverseFutureOrder(Instrument pair, 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) throws IOException, BinanceException - Throws:
IOException
BinanceException
-
testNewOrder
public void testNewOrder(Instrument pair, OrderSide side, OrderType type, TimeInForce timeInForce, BigDecimal quantity, BigDecimal quoteOrderQty, BigDecimal price, String newClientOrderId, BigDecimal stopPrice, Long trailingDelta, BigDecimal icebergQty) throws IOException, BinanceException - Throws:
IOException
BinanceException
-
orderStatusAllProducts
public BinanceOrder orderStatusAllProducts(Instrument pair, Long orderId, String origClientOrderId) throws IOException, BinanceException - Throws:
IOException
BinanceException
-
cancelOrderAllProducts
public BinanceCancelledOrder cancelOrderAllProducts(Instrument pair, Long orderId, String origClientOrderId, String newClientOrderId) throws IOException, BinanceException - Throws:
IOException
BinanceException
-
cancelAllOpenOrdersAllProducts
public List<BinanceCancelledOrder> cancelAllOpenOrdersAllProducts(Instrument pair) throws IOException, BinanceException - Throws:
IOException
BinanceException
-
allOrders
public List<BinanceOrder> allOrders(CurrencyPair pair, Long orderId, Integer limit) throws BinanceException, IOException - Throws:
BinanceException
IOException
-
myTradesAllProducts
public List<BinanceTrade> myTradesAllProducts(Instrument pair, Long orderId, Long startTime, Long endTime, Long fromId, Integer limit) throws BinanceException, IOException - Throws:
BinanceException
IOException
-
openPositions
- Throws:
BinanceException
IOException
-
getDustLog
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.- Returns:
- Throws:
IOException
-
startUserDataStream
- Throws:
IOException
-
keepAliveDataStream
- Throws:
IOException
-
closeDataStream
- Throws:
IOException
-
openOrdersPermits
-
myTradesPermits
-