public class SyncRequestImpl extends Object implements SyncRequestClient
| 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.
|
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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreate, create, createpublic ExchangeInformation getExchangeInformation()
SyncRequestClientgetExchangeInformation in interface SyncRequestClientpublic OrderBook getOrderBook(String symbol, Integer limit)
SyncRequestClientgetOrderBook in interface SyncRequestClientpublic List<Trade> getRecentTrades(String symbol, Integer limit)
SyncRequestClientgetRecentTrades in interface SyncRequestClientpublic List<Trade> getOldTrades(String symbol, Integer limit, Long fromId)
SyncRequestClientgetOldTrades in interface SyncRequestClientpublic List<AggregateTrade> getAggregateTrades(String symbol, Long fromId, Long startTime, Long endTime, Integer limit)
SyncRequestClientgetAggregateTrades in interface SyncRequestClientpublic List<Candlestick> getCandlestick(String symbol, CandlestickInterval interval, Long startTime, Long endTime, Integer limit)
SyncRequestClientgetCandlestick in interface SyncRequestClientpublic List<Candlestick> getContinuousCandlesticks(String pair, ContractType contractType, CandlestickInterval interval, Long startTime, Long endTime, Integer limit)
SyncRequestClientgetContinuousCandlesticks in interface SyncRequestClientpublic List<Candlestick> getIndexPriceCandlesticks(String pair, CandlestickInterval interval, Long startTime, Long endTime, Integer limit)
SyncRequestClientgetIndexPriceCandlesticks in interface SyncRequestClientpublic List<Candlestick> getMarkPriceCandlesticks(String pair, CandlestickInterval interval, Long startTime, Long endTime, Integer limit)
SyncRequestClientgetMarkPriceCandlesticks in interface SyncRequestClientpublic List<MarkPrice> getMarkPrice(String symbol)
SyncRequestClientgetMarkPrice in interface SyncRequestClientpublic List<FundingRate> getFundingRate(String symbol, Long startTime, Long endTime, Integer limit)
SyncRequestClientgetFundingRate in interface SyncRequestClientpublic List<PriceChangeTicker> get24hrTickerPriceChange(String symbol)
SyncRequestClientget24hrTickerPriceChange in interface SyncRequestClientpublic List<SymbolPrice> getSymbolPriceTicker(String symbol)
SyncRequestClientgetSymbolPriceTicker in interface SyncRequestClientpublic List<SymbolOrderBook> getSymbolOrderBookTicker(String symbol)
SyncRequestClientgetSymbolOrderBookTicker in interface SyncRequestClientpublic List<LiquidationOrder> getLiquidationOrders(String symbol, AutoCloseType type, Long startTime, Long endTime, Integer limit)
SyncRequestClientgetLiquidationOrders in interface SyncRequestClientpublic List<Object> postBatchOrders(String batchOrders)
SyncRequestClientpostBatchOrders in interface SyncRequestClientpublic 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)
SyncRequestClientpostOrder in interface SyncRequestClientpublic Order cancelOrder(String symbol, Long orderId, String origClientOrderId)
SyncRequestClientcancelOrder in interface SyncRequestClientpublic ResponseResult cancelAllOpenOrder(String symbol)
SyncRequestClientcancelAllOpenOrder in interface SyncRequestClientpublic List<Object> batchCancelOrders(String symbol, String orderIdList, String origClientOrderIdList)
SyncRequestClientbatchCancelOrders in interface SyncRequestClientpublic ResponseResult changePositionSide(String dual)
SyncRequestClientchangePositionSide in interface SyncRequestClientpublic ResponseResult changeMarginType(String symbolName, MarginType marginType)
SyncRequestClientchangeMarginType in interface SyncRequestClientpublic com.alibaba.fastjson.JSONObject addIsolatedPositionMargin(String symbolName, int type, String amount, PositionSide positionSide)
SyncRequestClientaddIsolatedPositionMargin in interface SyncRequestClientpositionSide - SHORT, LONG, BOTHpublic List<WalletDeltaLog> getPositionMarginHistory(String symbolName, int type, long startTime, long endTime, int limit)
SyncRequestClientgetPositionMarginHistory in interface SyncRequestClientpublic com.alibaba.fastjson.JSONObject getPositionSide()
SyncRequestClientgetPositionSide in interface SyncRequestClientpublic com.alibaba.fastjson.JSONObject autoCancelAllOrders(String symbol, Long countdownTime)
SyncRequestClientautoCancelAllOrders in interface SyncRequestClientpublic Order getOrder(String symbol, Long orderId, String origClientOrderId)
SyncRequestClientgetOrder in interface SyncRequestClientpublic Order getOpenOrder(String symbol, Long orderId, String origClientOrderId)
SyncRequestClientgetOpenOrder in interface SyncRequestClientpublic List<Order> getOpenOrders(String symbol)
SyncRequestClientgetOpenOrders in interface SyncRequestClientpublic List<Order> getAllOrders(String symbol, Long orderId, Long startTime, Long endTime, Integer limit)
SyncRequestClientgetAllOrders in interface SyncRequestClientpublic List<AccountBalance> getBalance()
SyncRequestClientgetBalance in interface SyncRequestClientpublic AccountInformation getAccountInformation()
SyncRequestClientgetAccountInformation in interface SyncRequestClientpublic Leverage changeInitialLeverage(String symbol, Integer leverage)
SyncRequestClientchangeInitialLeverage in interface SyncRequestClientpublic List<PositionRisk> getPositionRisk(String symbol)
SyncRequestClientgetPositionRisk in interface SyncRequestClientpublic List<MyTrade> getAccountTrades(String symbol, Long startTime, Long endTime, Long fromId, Integer limit)
SyncRequestClientgetAccountTrades in interface SyncRequestClientpublic List<Income> getIncomeHistory(String symbol, IncomeType incomeType, Long startTime, Long endTime, Integer limit)
SyncRequestClientgetIncomeHistory in interface SyncRequestClientpublic String startUserDataStream()
SyncRequestClientstartUserDataStream in interface SyncRequestClientpublic String keepUserDataStream(String listenKey)
SyncRequestClientkeepUserDataStream in interface SyncRequestClientpublic String closeUserDataStream(String listenKey)
SyncRequestClientcloseUserDataStream in interface SyncRequestClientpublic OpenInterest getOpenInterest(String symbol)
SyncRequestClientgetOpenInterest in interface SyncRequestClientpublic List<OpenInterestStat> getOpenInterestStat(String symbol, PeriodType period, Long startTime, Long endTime, Long limit)
SyncRequestClientgetOpenInterestStat in interface SyncRequestClientpublic List<CommonLongShortRatio> getTopTraderAccountRatio(String symbol, PeriodType period, Long startTime, Long endTime, Long limit)
SyncRequestClientgetTopTraderAccountRatio in interface SyncRequestClientpublic List<CommonLongShortRatio> getTopTraderPositionRatio(String symbol, PeriodType period, Long startTime, Long endTime, Long limit)
SyncRequestClientgetTopTraderPositionRatio in interface SyncRequestClientpublic List<CommonLongShortRatio> getGlobalAccountRatio(String symbol, PeriodType period, Long startTime, Long endTime, Long limit)
SyncRequestClientgetGlobalAccountRatio in interface SyncRequestClientpublic List<TakerLongShortStat> getTakerLongShortRatio(String symbol, PeriodType period, Long startTime, Long endTime, Long limit)
SyncRequestClientgetTakerLongShortRatio in interface SyncRequestClientCopyright © 2021. All rights reserved.