All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.xeiam.xchange.coinsetter.dto.marketdata.CoinsetterPairedDepth Maven / Gradle / Ivy

package com.xeiam.xchange.coinsetter.dto.marketdata;

import java.util.Arrays;

import com.fasterxml.jackson.annotation.JsonProperty;

/**
 * The latest Level 2 market data for the top n price levels of the book.
 */
public class CoinsetterPairedDepth {

  private final CoinsetterPair[] topNBidAsks;
  private final int depth;
  private final String exchangeId;
  private final int sequenceNumber;

  public CoinsetterPairedDepth(@JsonProperty("topNBidAsks") CoinsetterPair[] topNBidAsks, @JsonProperty("depth") int depth,
      @JsonProperty("exchangeId") String exchangeId, @JsonProperty("sequenceNumber") int sequenceNumber) {

    this.topNBidAsks = topNBidAsks;
    this.depth = depth;
    this.exchangeId = exchangeId;
    this.sequenceNumber = sequenceNumber;
  }

  public CoinsetterPair[] getTopNBidAsks() {

    return topNBidAsks;
  }

  /**
   * Returns the depth of book returned.
   */
  public int getDepth() {

    return depth;
  }

  /**
   * Returns the exchange.
   */
  public String getExchangeId() {

    return exchangeId;
  }

  /**
   * Returns the sequence number (for COINSETTER exchange only) for synchronizing with
   * incremental ticks stream (See web sockets documentation)
   */
  public int getSequenceNumber() {

    return sequenceNumber;
  }

  @Override
  public String toString() {

    return "CoinsetterPairedDepth [topNBidAsks=" + Arrays.toString(topNBidAsks) + ", depth=" + depth + ", exchangeId=" + exchangeId
        + ", sequenceNumber=" + sequenceNumber + "]";
  }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy