Class KrakenStreamingAdapters

java.lang.Object
info.bitrich.xchangestream.kraken.KrakenStreamingAdapters

public class KrakenStreamingAdapters extends Object
Kraken streaming adapters
  • 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)