pub struct BaseClient {
pub transport: Transport,
}
Expand description
The coinbase client
Fields§
§transport: Transport
Implementations§
Source§impl BaseClient
impl BaseClient
pub async fn get_account( &self, paginator: Option<&Paginator>, ) -> Result<Vec<Account>>
pub async fn get_orders( &self, params: Option<&GetOrderRequest>, ) -> Result<Vec<Order>>
pub async fn get_order(&self, order_id: String) -> Result<Order>
pub async fn market_buy( &self, pair: MarketPairInfo, size: Decimal, ) -> Result<Order>
pub async fn market_sell( &self, pair: MarketPairInfo, size: Decimal, ) -> Result<Order>
pub async fn limit_buy( &self, pair: MarketPairInfo, size: Decimal, price: Decimal, time_in_force: OrderTimeInForce, post_only: bool, ) -> Result<Order>
pub async fn limit_sell( &self, pair: MarketPairInfo, size: Decimal, price: Decimal, time_in_force: OrderTimeInForce, post_only: bool, ) -> Result<Order>
pub async fn cancel_order( &self, order_id: String, product_id: Option<&str>, ) -> Result<String>
pub async fn cancel_all_orders<P: Into<MarketPair>>( &self, product_id: Option<P>, ) -> Result<Vec<String>>
pub async fn get_fills(&self, params: Option<&GetFillsReq>) -> Result<Vec<Fill>>
Source§impl BaseClient
impl BaseClient
pub async fn products(&self) -> Result<Vec<Product>>
pub async fn product(&self, pair: &str) -> Result<Product>
pub async fn book<T, P>(&self, pair: P) -> Result<Book<T>>
pub async fn trades<P: Into<MarketPair>>( &self, pair: P, paginator: Option<&Paginator>, ) -> Result<Vec<Trade>>
pub async fn ticker<P: Into<MarketPair>>(&self, pair: P) -> Result<Ticker>
pub async fn candles<P: Into<MarketPair>>( &self, pair: P, params: Option<&CandleRequestParams>, ) -> Result<Vec<Candle>>
Trait Implementations§
Source§impl Clone for BaseClient
impl Clone for BaseClient
Source§fn clone(&self) -> BaseClient
fn clone(&self) -> BaseClient
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for BaseClient
impl !RefUnwindSafe for BaseClient
impl Send for BaseClient
impl Sync for BaseClient
impl Unpin for BaseClient
impl !UnwindSafe for BaseClient
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more