Package org.knowm.xchange.ftx
Class FtxAdapters
java.lang.Object
org.knowm.xchange.ftx.FtxAdapters
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic AccountInfo
adaptAccountInfo
(FtxResponse<FtxAccountDto> ftxAccountDto, FtxResponse<List<FtxWalletBalanceDto>> ftxBalancesDto) static LimitOrder
adaptConditionalLimitOrder
(FtxConditionalOrderDto ftxOrderDto) static String
adaptCurrencyPairToFtxMarket
(CurrencyPair currencyPair) static ExchangeMetaData
adaptExchangeMetaData
(FtxMarketsDto marketsDto) static Order.OrderType
adaptFtxOrderSideToOrderType
(FtxOrderSide ftxOrderSide) static Order.OrderStatus
adaptFtxOrderStatusToOrderStatus
(FtxOrderStatus ftxOrderStatus) static LimitOrder
adaptLimitOrder
(FtxOrderDto ftxOrderDto) static FtxOrderRequestPayload
adaptLimitOrderToFtxOrderPayload
(LimitOrder limitOrder) static FtxOrderRequestPayload
adaptMarketOrderToFtxOrderPayload
(MarketOrder marketOrder) static FtxModifyOrderRequestPayload
adaptModifyOrderToFtxOrderPayload
(LimitOrder limitOrder) static OpenOrders
adaptOpenOrders
(FtxResponse<List<FtxOrderDto>> ftxOpenOrdersResponse) static OpenPositions
adaptOpenPositions
(List<FtxPositionDto> ftxPositionDtos) static OrderBook
adaptOrderBook
(FtxResponse<FtxOrderbookDto> ftxOrderbookDto, CurrencyPair currencyPair) static LimitOrder
adaptOrderbookOrder
(BigDecimal amount, BigDecimal price, CurrencyPair currencyPair, Order.OrderType orderType) static FtxOrderSide
adaptOrderTypeToFtxOrderSide
(Order.OrderType orderType) adaptStopOrderToFtxOrderPayload
(StopOrder stopOrder) static Ticker
adaptTicker
(FtxResponse<FtxMarketDto> ftxMarketResp, FtxResponse<List<FtxCandleDto>> ftxCandlesResp, CurrencyPair currencyPair) static Trades
adaptTrades
(List<FtxTradeDto> ftxTradeDtos, CurrencyPair currencyPair) static OpenOrders
adaptTriggerOpenOrders
(FtxResponse<List<FtxConditionalOrderDto>> ftxOpenOrdersResponse) static FtxConditionalOrderType
adaptTriggerOrderIntention
(StopOrder.Intention stopOrderIntention) static UserTrades
adaptUserTrades
(List<FtxFillDto> ftxUserTrades) static BigDecimal
lendingRounding
(BigDecimal value)
-
Constructor Details
-
FtxAdapters
public FtxAdapters()
-
-
Method Details
-
adaptOrderBook
public static OrderBook adaptOrderBook(FtxResponse<FtxOrderbookDto> ftxOrderbookDto, CurrencyPair currencyPair) -
adaptOrderbookOrder
public static LimitOrder adaptOrderbookOrder(BigDecimal amount, BigDecimal price, CurrencyPair currencyPair, Order.OrderType orderType) -
adaptAccountInfo
public static AccountInfo adaptAccountInfo(FtxResponse<FtxAccountDto> ftxAccountDto, FtxResponse<List<FtxWalletBalanceDto>> ftxBalancesDto) -
adaptExchangeMetaData
-
adaptMarketOrderToFtxOrderPayload
-
adaptLimitOrderToFtxOrderPayload
-
adaptModifyOrderToFtxOrderPayload
-
adaptTrades
-
adaptUserTrades
-
adaptLimitOrder
-
adaptConditionalLimitOrder
-
adaptOpenOrders
-
adaptTriggerOpenOrders
public static OpenOrders adaptTriggerOpenOrders(FtxResponse<List<FtxConditionalOrderDto>> ftxOpenOrdersResponse) -
adaptOrderTypeToFtxOrderSide
-
adaptFtxOrderSideToOrderType
-
adaptFtxOrderStatusToOrderStatus
-
adaptCurrencyPairToFtxMarket
-
adaptOpenPositions
-
lendingRounding
-
adaptTicker
public static Ticker adaptTicker(FtxResponse<FtxMarketDto> ftxMarketResp, FtxResponse<List<FtxCandleDto>> ftxCandlesResp, CurrencyPair currencyPair) -
adaptStopOrderToFtxOrderPayload
public static FtxConditionalOrderRequestPayload adaptStopOrderToFtxOrderPayload(StopOrder stopOrder) throws IOException - Throws:
IOException
-
adaptTriggerOrderIntention
public static FtxConditionalOrderType adaptTriggerOrderIntention(StopOrder.Intention stopOrderIntention) throws IOException - Throws:
IOException
-
adaptModifyConditionalOrderToFtxOrderPayload
public static FtxModifyConditionalOrderRequestPayload adaptModifyConditionalOrderToFtxOrderPayload(StopOrder stopOrder)
-