Struct coinbase_api::MarketDataClient [−][src]
pub struct MarketDataClient { /* fields omitted */ }
HTTP client for the unauthenticated market data API.
Methods
impl MarketDataClient
[src]
impl MarketDataClient
pub fn new(base: &'static str) -> Result<Self, Error>
[src]
pub fn new(base: &'static str) -> Result<Self, Error>
Creates a new client.
The base
argument should be SANDBOX
or LIVE
.
pub fn products(
&self
) -> impl Future<Item = Vec<Product>, Error = Error>
[src]
pub fn products(
&self
) -> impl Future<Item = Vec<Product>, Error = Error>
Retrieves a list of available currency pairs for trading.
pub fn book<T>(
&self,
product_id: &str,
level: &BookLevel<T>
) -> impl Future<Item = T, Error = Error> where
T: DeserializeOwned,
[src]
pub fn book<T>(
&self,
product_id: &str,
level: &BookLevel<T>
) -> impl Future<Item = T, Error = Error> where
T: DeserializeOwned,
Retrieves a list of open orders for a product. The amount of detail shown depends on the level argument:
book_level::Best()
shows only the best bid and ask.book_level::Top50()
shows the top 50 aggregated bids and asks.book_level::Full()
shows the full non aggregated order book.
pub fn ticker(
&self,
product_id: &str
) -> impl Future<Item = Ticker, Error = Error>
[src]
pub fn ticker(
&self,
product_id: &str
) -> impl Future<Item = Ticker, Error = Error>
Retrieves information about the last trade (tick), best bid/ask and 24h volume.
pub fn trades(
&self,
product_id: &str
) -> impl Future<Item = Vec<Trade>, Error = Error>
[src]
pub fn trades(
&self,
product_id: &str
) -> impl Future<Item = Vec<Trade>, Error = Error>
Lists the latest trades for a product.
pub fn candles(
&self,
product_id: &str,
start: &DateTime<Utc>,
end: &DateTime<Utc>,
granularity: &Duration
) -> impl Future<Item = Vec<Candle>, Error = Error>
[src]
pub fn candles(
&self,
product_id: &str,
start: &DateTime<Utc>,
end: &DateTime<Utc>,
granularity: &Duration
) -> impl Future<Item = Vec<Candle>, Error = Error>
Retrieves historic rates for a product.
granularity
must be one of { one minute, five minutes, fifteen minutes, one hour, six hours, one day }.
The maximum number of data points for a single request is 300 candles.
If your selection of start/end time and granularity will result in more than 300 data points, your request will be rejected.
pub fn latest_candles(
&self,
product_id: &str,
granularity: &Duration
) -> impl Future<Item = Vec<Candle>, Error = Error>
[src]
pub fn latest_candles(
&self,
product_id: &str,
granularity: &Duration
) -> impl Future<Item = Vec<Candle>, Error = Error>
Retrieves the latest 300 data points.
pub fn stats(
&self,
product_id: &str
) -> impl Future<Item = Stats, Error = Error>
[src]
pub fn stats(
&self,
product_id: &str
) -> impl Future<Item = Stats, Error = Error>
Retrieves 24 hr stats for the product.
pub fn currencies(
&self
) -> impl Future<Item = Vec<Currency>, Error = Error>
[src]
pub fn currencies(
&self
) -> impl Future<Item = Vec<Currency>, Error = Error>
Lists known currencies.
pub fn time(
&self
) -> impl Future<Item = ServerTime, Error = Error>
[src]
pub fn time(
&self
) -> impl Future<Item = ServerTime, Error = Error>
Gets the API server time.
Auto Trait Implementations
impl Send for MarketDataClient
impl Send for MarketDataClient
impl Sync for MarketDataClient
impl Sync for MarketDataClient