Struct coinnect::types::Orderbook [] [src]

pub struct Orderbook {
    pub timestamp: i64,
    pub pair: Pair,
    pub asks: Vec<(Price, Volume)>,
    pub bids: Vec<(Price, Volume)>,
}

Fields

UNIX timestamp in ms (when the response was received)

The Pair corresponding to the Orderbook returned (maybe useful later for asynchronous APIs)

Vec containing the ask offers (by ascending price)

Vec containing the bid offers (by descending price)

Methods

impl Orderbook
[src]

Convenient function that returns the average price from the orderbook Return None if Orderbook is empty Average price = (lowest ask + highest bid)/2

Trait Implementations

impl Debug for Orderbook
[src]

Formats the value using the given formatter.