public interface SyncRequestClient
If the invoking failed or timeout, the
BinanceApiException will be thrown.
| Modifier and Type | Method and Description |
|---|---|
com.alibaba.fastjson.JSONObject |
addIsolatedPositionMargin(String symbolName,
int type,
String amount,
PositionSide positionSide)
add isolated position margin
|
com.alibaba.fastjson.JSONObject |
autoCancelAllOrders(String symbol,
Long countdownTime)
Cancel all open orders of the specified symbol at the end of the specified countdown.
|
List<Object> |
batchCancelOrders(String symbol,
String orderIdList,
String origClientOrderIdList)
Batch cancel orders.
|
ResponseResult |
cancelAllOpenOrder(String symbol)
Cancel all open orders.
|
Order |
cancelOrder(String symbol,
Long orderId,
String origClientOrderId)
Cancel an active order.
|
Leverage |
changeInitialLeverage(String symbol,
Integer leverage)
Change initial leverage.
|
ResponseResult |
changeMarginType(String symbolName,
MarginType marginType)
Change margin type (ISOLATED, CROSSED)
|
ResponseResult |
changePositionSide(String dual)
Switch position side.
|
String |
closeUserDataStream(String listenKey)
Close user data stream.
|
static SyncRequestClient |
create()
Create the synchronous client.
|
static SyncRequestClient |
create(String apiKey,
String secretKey)
Create the synchronous client.
|
static SyncRequestClient |
create(String apiKey,
String secretKey,
RequestOptions options)
Create the synchronous client.
|
List<PriceChangeTicker> |
get24hrTickerPriceChange(String symbol)
Get 24 hour rolling window price change statistics.
|
AccountInformation |
getAccountInformation()
Get current account information.
|
List<MyTrade> |
getAccountTrades(String symbol,
Long startTime,
Long endTime,
Long fromId,
Integer limit)
Get trades for a specific account and symbol.
|
List<AggregateTrade> |
getAggregateTrades(String symbol,
Long fromId,
Long startTime,
Long endTime,
Integer limit)
Get compressed, aggregate trades.
|
List<Order> |
getAllOrders(String symbol,
Long orderId,
Long startTime,
Long endTime,
Integer limit)
Get all account orders; active, canceled, or filled.
|
List<AccountBalance> |
getBalance()
Get account balances.
|
List<Candlestick> |
getCandlestick(String symbol,
CandlestickInterval interval,
Long startTime,
Long endTime,
Integer limit)
Get kline/candlestick bars for a symbol.
|
List<Candlestick> |
getContinuousCandlesticks(String pair,
ContractType contractType,
CandlestickInterval interval,
Long startTime,
Long endTime,
Integer limit)
Get Kline/candlestick bars for a specific contract type.
|
ExchangeInformation |
getExchangeInformation()
Fetch current exchange trading rules and symbol information.
|
List<FundingRate> |
getFundingRate(String symbol,
Long startTime,
Long endTime,
Integer limit)
Get funding rate history.
|
List<CommonLongShortRatio> |
getGlobalAccountRatio(String symbol,
PeriodType period,
Long startTime,
Long endTime,
Long limit)
Long/Short Ratio (MARKET DATA)
|
List<Income> |
getIncomeHistory(String symbol,
IncomeType incomeType,
Long startTime,
Long endTime,
Integer limit)
Get income history.
|
List<Candlestick> |
getIndexPriceCandlesticks(String pair,
CandlestickInterval interval,
Long startTime,
Long endTime,
Integer limit)
Get Kline/candlestick bars for the index price of a pair.
|
List<LiquidationOrder> |
getLiquidationOrders(String symbol,
AutoCloseType type,
Long startTime,
Long endTime,
Integer limit)
Get all liquidation orders.
|
List<MarkPrice> |
getMarkPrice(String symbol)
Get mark price for a symbol.
|
List<Candlestick> |
getMarkPriceCandlesticks(String pair,
CandlestickInterval interval,
Long startTime,
Long endTime,
Integer limit)
Get Kline/candlestick bars for the mark price of a symbol.
|
List<Trade> |
getOldTrades(String symbol,
Integer limit,
Long fromId)
Get old Trade.
|
OpenInterest |
getOpenInterest(String symbol)
Get present open interest of a specific symbol.
|
List<OpenInterestStat> |
getOpenInterestStat(String symbol,
PeriodType period,
Long startTime,
Long endTime,
Long limit)
Open Interest Stat (MARKET DATA)
|
Order |
getOpenOrder(String symbol,
Long orderId,
String origClientOrderId)
Get all open order on a symbol.
|
List<Order> |
getOpenOrders(String symbol)
Get current open order on a symbol.
|
Order |
getOrder(String symbol,
Long orderId,
String origClientOrderId)
Check an order's status.
|
OrderBook |
getOrderBook(String symbol,
Integer limit)
Fetch order book.
|
List<WalletDeltaLog> |
getPositionMarginHistory(String symbolName,
int type,
long startTime,
long endTime,
int limit)
get position margin history
|
List<PositionRisk> |
getPositionRisk(String symbol)
Get position.
|
com.alibaba.fastjson.JSONObject |
getPositionSide()
Get if changed to HEDGE mode.
|
List<Trade> |
getRecentTrades(String symbol,
Integer limit)
Get recent trades.
|
List<SymbolOrderBook> |
getSymbolOrderBookTicker(String symbol)
Get best price/qty on the order book for a symbol or symbols.
|
List<SymbolPrice> |
getSymbolPriceTicker(String symbol)
Get latest price for a symbol or symbols.
|
List<TakerLongShortStat> |
getTakerLongShortRatio(String symbol,
PeriodType period,
Long startTime,
Long endTime,
Long limit)
Taker Long/Short Ratio (MARKET DATA)
|
List<CommonLongShortRatio> |
getTopTraderAccountRatio(String symbol,
PeriodType period,
Long startTime,
Long endTime,
Long limit)
Top Trader Long/Short Ratio (Accounts) (MARKET DATA)
|
List<CommonLongShortRatio> |
getTopTraderPositionRatio(String symbol,
PeriodType period,
Long startTime,
Long endTime,
Long limit)
Top Trader Long/Short Ratio (Positions) (MARKET DATA)
|
String |
keepUserDataStream(String listenKey)
Keep user data stream.
|
List<Object> |
postBatchOrders(String batchOrders)
Place new orders
|
Order |
postOrder(String symbol,
OrderSide side,
PositionSide positionSide,
OrderType orderType,
TimeInForce timeInForce,
String quantity,
String price,
String reduceOnly,
String newClientOrderId,
String stopPrice,
String closePosition,
String activationPrice,
String callbackRate,
WorkingType workingType,
String priceProtect,
NewOrderRespType newOrderRespType)
Send in a new order.
|
String |
startUserDataStream()
Start user data stream.
|
static SyncRequestClient create()
static SyncRequestClient create(String apiKey, String secretKey)
apiKey - The public key applied from binance.secretKey - The private key applied from binance.static SyncRequestClient create(String apiKey, String secretKey, RequestOptions options)
apiKey - The public key applied from binance.secretKey - The private key applied from binance.options - The request option.ExchangeInformation getExchangeInformation()
OrderBook getOrderBook(String symbol, Integer limit)
List<Trade> getRecentTrades(String symbol, Integer limit)
List<Trade> getOldTrades(String symbol, Integer limit, Long fromId)
List<AggregateTrade> getAggregateTrades(String symbol, Long fromId, Long startTime, Long endTime, Integer limit)
List<Candlestick> getCandlestick(String symbol, CandlestickInterval interval, Long startTime, Long endTime, Integer limit)
List<Candlestick> getContinuousCandlesticks(String pair, ContractType contractType, CandlestickInterval interval, Long startTime, Long endTime, Integer limit)
List<Candlestick> getIndexPriceCandlesticks(String pair, CandlestickInterval interval, Long startTime, Long endTime, Integer limit)
List<Candlestick> getMarkPriceCandlesticks(String pair, CandlestickInterval interval, Long startTime, Long endTime, Integer limit)
List<MarkPrice> getMarkPrice(String symbol)
List<FundingRate> getFundingRate(String symbol, Long startTime, Long endTime, Integer limit)
List<PriceChangeTicker> get24hrTickerPriceChange(String symbol)
List<SymbolPrice> getSymbolPriceTicker(String symbol)
List<SymbolOrderBook> getSymbolOrderBookTicker(String symbol)
List<LiquidationOrder> getLiquidationOrders(String symbol, AutoCloseType type, Long startTime, Long endTime, Integer limit)
List<Object> postBatchOrders(String batchOrders)
batchOrders - Order postOrder(String symbol, OrderSide side, PositionSide positionSide, OrderType orderType, TimeInForce timeInForce, String quantity, String price, String reduceOnly, String newClientOrderId, String stopPrice, String closePosition, String activationPrice, String callbackRate, WorkingType workingType, String priceProtect, NewOrderRespType newOrderRespType)
Order cancelOrder(String symbol, Long orderId, String origClientOrderId)
ResponseResult cancelAllOpenOrder(String symbol)
List<Object> batchCancelOrders(String symbol, String orderIdList, String origClientOrderIdList)
ResponseResult changePositionSide(String dual)
ResponseResult changeMarginType(String symbolName, MarginType marginType)
symbolName - marginType - com.alibaba.fastjson.JSONObject addIsolatedPositionMargin(String symbolName, int type, String amount, PositionSide positionSide)
symbolName - type - amount - positionSide - SHORT, LONG, BOTHList<WalletDeltaLog> getPositionMarginHistory(String symbolName, int type, long startTime, long endTime, int limit)
symbolName - type - startTime - endTime - limit - com.alibaba.fastjson.JSONObject getPositionSide()
Order getOrder(String symbol, Long orderId, String origClientOrderId)
Order getOpenOrder(String symbol, Long orderId, String origClientOrderId)
List<Order> getOpenOrders(String symbol)
List<Order> getAllOrders(String symbol, Long orderId, Long startTime, Long endTime, Integer limit)
List<AccountBalance> getBalance()
AccountInformation getAccountInformation()
Leverage changeInitialLeverage(String symbol, Integer leverage)
List<PositionRisk> getPositionRisk(String symbol)
List<MyTrade> getAccountTrades(String symbol, Long startTime, Long endTime, Long fromId, Integer limit)
List<Income> getIncomeHistory(String symbol, IncomeType incomeType, Long startTime, Long endTime, Integer limit)
String startUserDataStream()
String keepUserDataStream(String listenKey)
String closeUserDataStream(String listenKey)
OpenInterest getOpenInterest(String symbol)
List<OpenInterestStat> getOpenInterestStat(String symbol, PeriodType period, Long startTime, Long endTime, Long limit)
List<CommonLongShortRatio> getTopTraderAccountRatio(String symbol, PeriodType period, Long startTime, Long endTime, Long limit)
List<CommonLongShortRatio> getTopTraderPositionRatio(String symbol, PeriodType period, Long startTime, Long endTime, Long limit)
List<CommonLongShortRatio> getGlobalAccountRatio(String symbol, PeriodType period, Long startTime, Long endTime, Long limit)
List<TakerLongShortStat> getTakerLongShortRatio(String symbol, PeriodType period, Long startTime, Long endTime, Long limit)
Copyright © 2021. All rights reserved.