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, signatureCreatorFields inherited from class org.knowm.xchange.service.BaseResilientExchangeService
resilienceRegistriesFields inherited from class org.knowm.xchange.service.BaseExchangeService
exchange -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedBinanceTradeServiceRaw(BinanceExchange exchange, ResilienceRegistries resilienceRegistries) -
Method Summary
Modifier and TypeMethodDescriptionallOrders(CurrencyPair pair, Long orderId, Integer limit) cancelOrderAllProducts(Instrument pair, Long orderId, String origClientOrderId, String newClientOrderId) voidcloseDataStream(String listenKey) getDustLog(Long startTime, Long endTime) Retrieves the dust log from Binance.voidkeepAliveDataStream(String listenKey) myTradesAllProducts(Instrument pair, Long orderId, Long startTime, Long endTime, Long fromId, Integer limit) protected intmyTradesPermits(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 intopenOrdersPermits(Instrument pair) orderStatusAllProducts(Instrument pair, Long orderId, String origClientOrderId) voidtestNewOrder(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, getTimestampFactoryMethods inherited from class org.knowm.xchange.service.BaseResilientExchangeService
decorateApiCall, rateLimiter, rateLimiter, retry, retryMethods inherited from class org.knowm.xchange.service.BaseExchangeService
verifyOrder, verifyOrder, verifyOrder
-
Constructor Details
-
BinanceTradeServiceRaw
protected BinanceTradeServiceRaw(BinanceExchange exchange, ResilienceRegistries resilienceRegistries)
-
-
Method Details
-
openOrdersAllProducts
- Throws:
BinanceExceptionIOException
-
openOrdersAllProducts
public List<BinanceOrder> openOrdersAllProducts(Instrument pair) throws BinanceException, IOException - Throws:
BinanceExceptionIOException
-
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:
IOExceptionBinanceException
-
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:
IOExceptionBinanceException
-
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:
IOExceptionBinanceException
-
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:
IOExceptionBinanceException
-
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:
IOExceptionBinanceException
-
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:
IOExceptionBinanceException
-
orderStatusAllProducts
public BinanceOrder orderStatusAllProducts(Instrument pair, Long orderId, String origClientOrderId) throws IOException, BinanceException - Throws:
IOExceptionBinanceException
-
cancelOrderAllProducts
public BinanceCancelledOrder cancelOrderAllProducts(Instrument pair, Long orderId, String origClientOrderId, String newClientOrderId) throws IOException, BinanceException - Throws:
IOExceptionBinanceException
-
cancelAllOpenOrdersAllProducts
public List<BinanceCancelledOrder> cancelAllOpenOrdersAllProducts(Instrument pair) throws IOException, BinanceException - Throws:
IOExceptionBinanceException
-
allOrders
public List<BinanceOrder> allOrders(CurrencyPair pair, Long orderId, Integer limit) throws BinanceException, IOException - Throws:
BinanceExceptionIOException
-
myTradesAllProducts
public List<BinanceTrade> myTradesAllProducts(Instrument pair, Long orderId, Long startTime, Long endTime, Long fromId, Integer limit) throws BinanceException, IOException - Throws:
BinanceExceptionIOException
-
openPositions
- Throws:
BinanceExceptionIOException
-
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
-