[−][src]Struct coinbase_rs::public::Public
Methods
impl<A> Public<A>
[src]
pub fn new_with_keep_alive(uri: &str, keep_alive: bool) -> Self where
A: AdapterNew,
[src]
A: AdapterNew,
pub fn new(uri: &str) -> Self where
A: AdapterNew,
[src]
A: AdapterNew,
pub fn currencies(&self) -> A::Result where
A: Adapter<Vec<Currency>> + 'static,
[src]
A: Adapter<Vec<Currency>> + 'static,
Get currencies
List known currencies. Currency codes will conform to the ISO 4217 standard where possible. Currencies which have or had no representation in ISO 4217 may use a custom code (e.g. BTC).
https://developers.coinbase.com/api/v2#currencies
pub fn exchange_rates(&self) -> A::Result where
A: Adapter<ExchangeRates> + 'static,
[src]
A: Adapter<ExchangeRates> + 'static,
Get exchange rates
Get current exchange rates. Default base currency is USD but it can be defined as any supported currency. Returned rates will define the exchange rate for one unit of the base currency.
https://developers.coinbase.com/api/v2#exchange-rates
pub fn buy_price(&self, currency_pair: &str) -> A::Result where
A: Adapter<CurrencyPrice> + 'static,
[src]
A: Adapter<CurrencyPrice> + 'static,
Get buy price
Get the total price to buy one bitcoin or ether.
https://developers.coinbase.com/api/v2#get-buy-price
pub fn sell_price(&self, currency_pair: &str) -> A::Result where
A: Adapter<CurrencyPrice> + 'static,
[src]
A: Adapter<CurrencyPrice> + 'static,
Get sell price
Get the total price to sell one bitcoin or ether.
https://developers.coinbase.com/api/v2#get-sell-price
pub fn spot_price(
&self,
currency_pair: &str,
_date: Option<NaiveDate>
) -> A::Result where
A: Adapter<CurrencyPrice> + 'static,
[src]
&self,
currency_pair: &str,
_date: Option<NaiveDate>
) -> A::Result where
A: Adapter<CurrencyPrice> + 'static,
Get spot price
Get the current market price for a currency pair. This is usually somewhere in between the buy and sell price.
https://developers.coinbase.com/api/v2#get-spot-price
pub fn current_time(&self) -> A::Result where
A: Adapter<DateTime> + 'static,
[src]
A: Adapter<DateTime> + 'static,
Get current time
Get the API server time.
https://developers.coinbase.com/api/v2#time
Auto Trait Implementations
impl<Adapter> Sync for Public<Adapter> where
Adapter: Sync,
Adapter: Sync,
impl<Adapter> Send for Public<Adapter> where
Adapter: Send,
Adapter: Send,
impl<Adapter> Unpin for Public<Adapter> where
Adapter: Unpin,
Adapter: Unpin,
impl<Adapter> !RefUnwindSafe for Public<Adapter>
impl<Adapter> !UnwindSafe for Public<Adapter>
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Same<T> for T
type Output = T
Should always be Self