Class KrakenStreamingAdapters
java.lang.Object
info.bitrich.xchangestream.kraken.KrakenStreamingAdapters
Kraken streaming adapters
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic LimitOrder
adaptLimitOrder
(Instrument instrument, Order.OrderType orderType, com.fasterxml.jackson.databind.JsonNode node) Adapt a JsonNode containing two decimals into a LimitOrderstatic Iterator<LimitOrder>
adaptLimitOrders
(Instrument instrument, Order.OrderType orderType, com.fasterxml.jackson.databind.JsonNode node) Adapt a JsonNode to a Stream of limit orders, the node past in here should be the body of a a/b/as/bs key.static KrakenStreamingOhlc
adaptOhlc
(Instrument instrument, com.fasterxml.jackson.databind.node.ArrayNode arrayNode) static OrderBook
adaptOrderbookMessage
(int depth, TreeSet<LimitOrder> bids, TreeSet<LimitOrder> asks, Instrument instrument, com.fasterxml.jackson.databind.node.ArrayNode arrayNode) static Ticker
adaptSpreadMessage
(Instrument instrument, com.fasterxml.jackson.databind.node.ArrayNode arrayNode) Adapt an ArrayNode containing a spread message into a Tickerstatic Ticker
adaptTickerMessage
(Instrument instrument, com.fasterxml.jackson.databind.node.ArrayNode arrayNode) Adapt an ArrayNode containing a ticker message into a Tickerstatic Trade
adaptTrade
(Instrument instrument, com.fasterxml.jackson.databind.JsonNode arrayNode) Adapt an JsonNode into a single TradeadaptTrades
(Instrument instrument, com.fasterxml.jackson.databind.JsonNode arrayNode) Adapt an JsonNode into a list of Trade
-
Constructor Details
-
KrakenStreamingAdapters
public KrakenStreamingAdapters()
-
-
Method Details
-
adaptOrderbookMessage
public static OrderBook adaptOrderbookMessage(int depth, TreeSet<LimitOrder> bids, TreeSet<LimitOrder> asks, Instrument instrument, com.fasterxml.jackson.databind.node.ArrayNode arrayNode) -
adaptLimitOrders
public static Iterator<LimitOrder> adaptLimitOrders(Instrument instrument, Order.OrderType orderType, com.fasterxml.jackson.databind.JsonNode node) Adapt a JsonNode to a Stream of limit orders, the node past in here should be the body of a a/b/as/bs key. -
adaptLimitOrder
public static LimitOrder adaptLimitOrder(Instrument instrument, Order.OrderType orderType, com.fasterxml.jackson.databind.JsonNode node) Adapt a JsonNode containing two decimals into a LimitOrder -
adaptTickerMessage
public static Ticker adaptTickerMessage(Instrument instrument, com.fasterxml.jackson.databind.node.ArrayNode arrayNode) Adapt an ArrayNode containing a ticker message into a Ticker -
adaptSpreadMessage
public static Ticker adaptSpreadMessage(Instrument instrument, com.fasterxml.jackson.databind.node.ArrayNode arrayNode) Adapt an ArrayNode containing a spread message into a Ticker -
adaptTrades
public static List<Trade> adaptTrades(Instrument instrument, com.fasterxml.jackson.databind.JsonNode arrayNode) Adapt an JsonNode into a list of Trade -
adaptTrade
public static Trade adaptTrade(Instrument instrument, com.fasterxml.jackson.databind.JsonNode arrayNode) Adapt an JsonNode into a single Trade -
adaptOhlc
public static KrakenStreamingOhlc adaptOhlc(Instrument instrument, com.fasterxml.jackson.databind.node.ArrayNode arrayNode)
-