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

com.xeiam.xchange.bitstamp.dto.marketdata.BitstampOrderBook Maven / Gradle / Ivy

There is a newer version: 3.1.0
Show newest version
package com.xeiam.xchange.bitstamp.dto.marketdata;

import java.math.BigDecimal;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonProperty;

/**
 * @author Matija Mazi
 */
public class BitstampOrderBook {

  private final Long timestamp;
  private final List> bids;
  private final List> asks;

  /**
   * Constructor
   * 
   * @param timestamp
   * @param bids
   * @param asks
   */
  public BitstampOrderBook(@JsonProperty("timestamp") Long timestamp, @JsonProperty("bids") List> bids,
      @JsonProperty("asks") List> asks) {

    this.bids = bids;
    this.asks = asks;
    this.timestamp = timestamp;
  }

  /**
   * @return Timestamp in Unix milliseconds
   */
  public Long getTimestamp() {

    return timestamp;
  }

  /** (price, amount) */
  public List> getBids() {

    return bids;
  }

  /** (price, amount) */
  public List> getAsks() {

    return asks;
  }

  @Override
  public String toString() {

    return "BitstampOrderBook [timestamp=" + timestamp + ", bids=" + bids + ", asks=" + asks + "]";
  }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy